Anchor.toml
Ensure that
cluster = "devnet"wallet = "~/.config/solana/id.json"is the location of your solana key pair[programs.devnet]
[toolchain]
[features]
seeds = false
skip-lint = false
[programs.devnet]
mango = "FnPEsqZTAgJpbYmNKYTyWY6NaHm6yZ1Z2yXjXkMFjU6f"
[registry]
url = "https://api.apr.dev"
[provider]
cluster = "devnet"
wallet = "~/.config/solana/id.json"
[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"CLI
- Open your terminal
- Run this command to set solana configuration
solana config set --keypair ~/.config/solana/id.json --url devnet- Run this command to check configuration
solana config get - Run the command to view address
solana address- Run the command to get testnet SOL
solana airdrop 5- Run the command to deploy to testnet
anchor deploy Command above should return success with a Program Id.
- View deployed contract using this command
solana program show <Program Id>The command above should provide relevant details of the deployed contract
Modify program/src/lib.rs
declare_id!("FnPEsqZTAgJpbYmNKYTyWY6NaHm6yZ1Z2yXjXkMFjU6f");to
declare_id!("<Program Id>")Modify Anchor.toml
[programs.devnet]
mango = "FnPEsqZTAgJpbYmNKYTyWY6NaHm6yZ1Z2yXjXkMFjU6f"to
[programs.devnet]
mango = "<Program Id>"Anchor.toml
Ensure that
cluster = "mainnet"wallet = "~/.config/solana/id.json"is the location of your solana key pair[programs.mainnet]
[toolchain]
[features]
seeds = false
skip-lint = false
[programs.mainnet]
mango = "FnPEsqZTAgJpbYmNKYTyWY6NaHm6yZ1Z2yXjXkMFjU6f"
[registry]
url = "https://api.apr.dev"
[provider]
cluster = "mainnet"
wallet = "~/.config/solana/id.json"
[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"CLI
-
Open your terminal
-
Get Mainnet account keypair from wallet eg. Phantom and save in
~/.config/solana/<YOUR_ACCOUNT_KEYPAIR>.json -
Run this command to set solana configuration to mainnet
solana config set --keypair ~/.config/solana/<YOUR_ACCOUNT_KEYPAIR>.json --url mainnet- Run this command to check configuration
solana config get - Run the command to view address
solana address-
Fund address with >5 SOL
-
Get authority(admin) account ready and copy address
-
Run the command to deploy to mainnet
anchor deploy stakeunstakeaddReferralclaimReward