An example Dapp project build for Solana network using the Anchor framework.
-
To generate a new public-private key use command:
solana-keygen new -o id.json
-
After modifing src folder and Anchor.toml use command:
anchor build
we can get the program id by using command:
solana address -k ./target/deploy/crowd_funding-keypair.json
then, we copy the program id and past it in
- crowd_funding field inside Anchor.toml.
- declare_id! macro inside src/lib.rs.
then run command:
anchor build # again
then run command:
anchor deploy
-
To see the Dapp in Solana Explorer:
- copy the Program Id shown after deploying the Dapp.
- go to https://explorer.solana.com/ and paste the Program Id in the search field.