Implementation of smart contract for staking solution described in document Smart Contract Staking - Voi Foundation - 20231218.
- algokit >= version 2.0.3
- python >= 3.12.3
- node >= v20.12.2
- puyapy >= 2.2.0
docker build . -t algokit-builder
docker run -v $(pwd):/src -v $(pwd)/artifacts:/artifacts algokit-builder
(docker run -v $(pwd):/src -v $(pwd)/artifacts:/artifacts algokit-builder && cp -v artifacts/BaseClient.ts ./scripts/ && cp -v artifacts/AirdropClient.ts ./scripts/ && cp -v artifacts/StakeRewardClient.ts ./scripts/ && cp -v artifacts/EarlyStakeRewardClient.ts ./scripts/ && cp -v artifacts/BaseFactoryClient.ts ./scripts/ && cp -v artifacts/AirdropFactoryClient.ts ./scripts/ && cp -v artifacts/StakeRewardFactoryClient.ts ./scripts/ && cp -v artifacts/EarlyStakeRewardFactoryClient.ts ./scripts/ && cp -v artifacts/MessengerClient.ts ./scripts/)
(cd scripts && npx tsc && node deploy.js)
pytest
Run the following command to make sure the mab function in the contract matches the mab function in the simulateion python code.
bash check_mab.sh
Generate plot and csv file for all lockup period options
python simulate.py