Skip to content

Instantly share code, notes, and snippets.

@nikkaroraa
Last active May 5, 2022 08:12
Show Gist options
  • Save nikkaroraa/b77b68a4dbadbaa3967c7f058f12158d to your computer and use it in GitHub Desktop.
Save nikkaroraa/b77b68a4dbadbaa3967c7f058f12158d to your computer and use it in GitHub Desktop.

Deployment

localnet

source: introduction to programming on solana

  • Use the cargo build-bpf command to compile your program to a file with the so file extension.
  • Run solana-keygen new to create and save a solana keypair locally.
  • Check solana config: make sure the RPC URL is set to http://localhost:8899
    • If it isn't already, do it with solana config set --url http://localhost:8899
  • Fire up your localnet with solana-test-validator
  • Then use solana deploy PATH_TO_YOUR_PROGRAM_SO_FILE
  • The deploy command should print the "program id" that will be used to reference the program in subsequent transactions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment