Anchor is the Solidity of Solana
The Solana program SDK provides low-level interfaces for writing smart contracts. It doesn’t help you define methods for you contract or how data is stored, you can decide for yourself what tools you want to use.
The Anchor framework makes Solana program development much simpler. Developing a contract with Anchor will a little closer to the experience of building with Solidity. It allows programs to define human readable method names and provides helpers for serializing contract state in many different programming languages.
solana-test-validator is the Ganache of Solana
Solana provides a tool called
solana-test-validator which starts up
a local node on your machine for development purposes. It is installed as
part of the Solana Tool Suite.
solana-test-validator to setup a new node with a local blockhain
ledger. Restarting from the same directory will reuse the same ledger state.
--reset flag to start fresh.
Add your own locally built programs (smart contracts) to your local blockchain’s
genesis block by using the
--bpf-program option for as many programs as you
need. This is useful for speeding up development iterations and setting up other
programs that your program will call.
Copy the account state from another cluster by using the
--clone option. This must
be used along with the
--url option to specify which cluster to fetch accounts from.
solana-program-test is the Truffle of Solana
Solana provides Rust package called
solana-program-test which includes a test framework
which can be used to test programs in a local Solana VM instance. Check out the
Solana Program Library to learn how to use it.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.