Autogenerate Anchor IDL from programs written in Native Solana.
The instructions must follow strict set of rules in order for the autogeneration to work.
For example: InitializeAccount instruction requires initialize_account function. The program will panic in the case of a mismatch.
This is especially the case with Serum and Mango.
- Clone the repo:
git clone https://github.com/acheroncrypto/native-to-anchor.git
cd native-to-anchor- Put instructions file inside
instructions/directory. - Run the program.
cargo run
- Anchor dummy programs will be generated in
anchor/. - IDLs will be generated in
idl/.
Licensed under MIT.