Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement anchor IDL support for C++ #80

Open
godmodegalactus opened this issue Nov 23, 2022 · 0 comments
Open

Implement anchor IDL support for C++ #80

godmodegalactus opened this issue Nov 23, 2022 · 0 comments
Assignees

Comments

@godmodegalactus
Copy link
Collaborator

We want to implement anchor IDL support for solcpp. At start we do not expect a runtime support for IDL but a generator is fine. The generator will create classes, methods which can be compiled and used to interact with onchain program. This generator can be in any language but preferably python, typescript etc.

For more info check :
https://www.anchor-lang.com/docs/cli#idl

What is anchor IDL :
When you create a smart contract for solana with anchor, with anchor cli you can also create an IDL for the same program. The IDL consists of information about the instructions handled by the program in binary format. This IDL is then uploaded in the cluster so that anyone can query the cluster to find out which instructions are available for a smart contract.

Check https://kevinheavey.github.io/anchorpy/clientgen/ for python implementation to decrypt IDL.
The you should be able to compile this c++ class and then link create library.

You should then test your implementation to interact with basic program like:
https://github.com/coral-xyz/anchor/tree/master/tests/tictactoe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants