Program for staking and receiving rewards.
draw.io editable
- This code is unaudited. Use at your own risk.
Anchor is used for developoment, and it's recommended workflow is used here. To get started, see the guide.
anchor build --verifiable
The --verifiable
flag should be used before deploying so that your build artifacts
can be deterministically generated with docker.
When testing locally, be sure to build with feature "local-testing" to enable the testing IDs. You can do this by editing programs/step-staking/Cargo.toml
and uncommenting the default feature set line.
anchor test
To verify the program deployed on Solana matches your local source code, change directory
into the program you want to verify, e.g., cd program
, and run
anchor verify <program-id | write-buffer>
A list of build artifacts can be found under releases.
To deploy the program, configure your CLI to the desired network/wallet and run
solana program deploy --programid <keypair> target/verifiable/reward_pool.so
I would not suggest using anchor deploy at this time; it wouldn't/couldn't really add much value. Be sure to use --programid <keypair>
to deploy to the correct address.
Note: By default, programs are deployed to accounts that are twice the size of the original deployment. Doing so leaves room for program growth in future redeployments. For this program, I beleive that's proper - I wouldn't want to limit further, but I do see some possibility for growth, but not beyond double.
There is no initial migration required with this program.