anchor-decoder
A procedural macro to help with decoding Solana accounts and instructions for programs written with the Anchor framework.
Note: this tool relies on IDLs generated by Anchor 0.30.0. Fortunately, there's a CLI command to help convert legacy IDLs to the new format.
Usage
Add the crate to your Cargo.toml, and point the macro at your IDL:
use anchor_idl;
pub const ID: Pubkey = crateID;
You can create separate crates for each program. You can also call the macro multiple times in the same files by using separate modules.
For more examples, see the examples directory in the repository.
License
The project is licensed under Apache 2.0.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.
Contribution
Any contributions are welcome. If you notice there's an IDL that doesn't breaks the macro, please open an issue or submit a pull request.