On Ethereum, I can go to the Etherscan link for a contract address and view the code and Read/Write ABIs. I can't seem to find this on Solana Explorer, Solscan, or anything. What's the best way for me to see IDL signatures and/or the Rust code in the functions?
Thanks
Like on Ethereum, some programs are submitted and verified. This is done using the Anchor verification process.
An example can be found with the Serum V3 program.
The Anchor Verified
badge links to the actual source code of the program, where you can get the IDL, Anchor's version of ABI.
Note: Also like Ethereum, not all programs are verified. This feature is rather new, and still being adopted. I hope to see more programs use this feature in the future.
Unlike Ethereum, Solana doesn't have a standard way to view a program's source code or verify that it matches the deployed binary
If the project is open source, you can try to find the GitHub repo manually, but there's no on-chain link to verify it's the same code that was deployed.
So if you want to find the original IDL you may go through these steps:
Use anchor idl fetch <PROGRAM_ID>
if you have Anchor CLI installed
Go to https://solscan.io/account/<PROGRAM_ID>#anchorProgramIDL
Try tools like solvitor or idlGuesser for reverse-engineering IDL/source-code:(https://solvitor.xyz/public_idl/<PROGRAM_ID>
)
There are tools for verifiable builds (e.g., https://github.com/Ellipsis-Labs/solana-verifiable-build
), and Anchor supports anchor build --verifiable
, but there's no explorer integration that ties the build to a source repo like Etherscan does.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With