SolanaBootcamp

Note: We're expecting you have both rust and solana cli installed. If you are running on the MacOS M1 and encounter issues, we suggest NOT to use brew to install rust, instead use curl or install from source.

  1. Install and build - creates binary files for each of the examples in examples_baremtal/ creates inside target/

    npm i
    npm run build
  2. Set your config to localhost

    solana config set --url localhost
  3. Run in seperate terminal window. This will spin up local solana cluster for you with RPC enpoint defaulted to localhost:8899, same as running solana-test-validator --reset

    npm run start-local-cluster
  4. Monitor the logs in seperate window by running

     solana logs

Commans for each example

  1. For each example run the following commands. The program would be deployed to the network specified in solana config

    npm run deploy:n

    where n is example number from 1 to 7 what this script does in the background solana program deploy ./examples_baremetal/target/deploy/nameOfExampleProgram.so

  2. To interact with the contract, we'll be running the typescript code located in client/ within each example

    npm run call:n

    where n is example number from 1 to 7

Devnet

  1. If you want to use devnet run:

    solana config set --url https://api.devnet.solana.com
    
    # or
    
    solana config set --url devnet