Codes from the Solana bootcamp hosted by Chainlink
To compile the solana program:
cargo build-bpf --manifest-path=./Cargo.toml --bpf-out-dir=dist/program
You will need to install the Solana CLI first before selecting the test cluster (either local or remote devnet)
sh -c "$(curl -sSfL https://release.solana.com/stable/install)
Test your installation:
solana --version
Select local cluster for testing and deploy.
solana config set --url localhost
Create a new keypair/wallet for interacting on our local validator node:
solana-keygen new
Start local validator
solana-test-validator
Change the endpoint of your CLI to the devnet and also asking for some funds
solana config set --url https://api.devnet.solana.com
solana airdrop 2
To deploy your smart-contract/program (replace with path to compiled library as needed):
solana program deploy dist/program/gm_program.so
To run client program:
npm run start
For more information on the bootcamp: