This repository contains the program login and integrations for a token staking contract for solana.
It includes the following features:
- A solana smart contract that implements staking logic for an spl token
- A script that creates some accounts, creates a token and mints it to the accounts
- Scripts to call the various functions in the staking contract.
- Readme for each function in the contract
Prerequisites:
- Rust: Installation Guide(v1.72.1)
- Solana: Installation Guide(v1.16.17)
- Anchor: Installation Guide(v0.29.0)
- Node: Installation Guide (v16)
git clone https://github.com/lawmeskiviahs/staking-program.git
cd staking-program/
npm install
anchor test
anchor build
anchor deploy
cd ./app
Note:- Find the proper documentation for each function in the docs folder in the root directory.
cd ./docs
- createAndDistributeTokens
- initialize
- stake
- unstake/get_rewards