Skip to content

AnonJon/solana-staking-example

Repository files navigation

Solana Staking Example

Setup

Generate new wallet to test with

solana-keygen new -o ./key.json

Run a test validator in a new terminal

solana-test-validator

Airdrop tokens to your new keypair

solana airdrop 10 --keypair ./key.json --url http://localhost:8899

Install Anchor

Deploy on Localnet

 anchor deploy --provider.cluster localnet

Run a demo

anchor run client

Possible Gotchas

Error: AnchorError occurred. Error Code: DeclaredProgramIdMismatch. Error Number: 4100. Error Message: The declared program id does not match the actual program id.

Make sure you take the deployed programId from the terminal and update the declare_id in the program, then build then redeploy.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors