solana-test-validator
Change the api cluster:
solana config set --url localhost
See activity:
solana logs
cargo init hello_world
cargo add solana-program
anchor init hello_world
cargo build-bpf
anchor build
solana program deploy ./target/deploy/hello_world.so
anchor deploy
https://explorer.solana.com/?cluster=custom&customUrl=http%3A%2F%2F127.0%3A8899
Get program_id:
anchor keys list
Add program_id to /target/idl/hello_world.json
:
,
"metadata":
{"address": "progam_id"}
Test contract:
anchor test
#if you already have test-validator running
anchor run test