The staking contract is complete and answers to the requested issue criterion except for the following note where I had to set up the reward amount as an entrypoint different to the constructor:
Special Note: Could not set rewards during the contract deployment (as requested in the issue criterion) because as stated in a comment I made on the issue, in order to set the reward amount, we need to make sure the contract indeed has those rewards. Yet, the contract could not have received any reward before its deployment (as it was not deployed yet). For that reason, we cannot set the reward amount in the contract deployment. We need to set the reward amount afterward the contract has been deployed, hence the entrypoint set_reward_amount (and set_reward_duration) available only to the owner of the contract.
Checklist
[x] CI Verifier: Run ./scripts/cairo_programs_verifier.sh successfully
[x] Contract Tests: Added tests to cover the changes
Issue(s): Close #192
Description
The staking contract is complete and answers to the requested issue criterion except for the following note where I had to set up the reward amount as an entrypoint different to the constructor:
Special Note: Could not set rewards during the contract deployment (as requested in the issue criterion) because as stated in a comment I made on the issue, in order to set the reward amount, we need to make sure the contract indeed has those rewards. Yet, the contract could not have received any reward before its deployment (as it was not deployed yet). For that reason, we cannot set the reward amount in the contract deployment. We need to set the reward amount afterward the contract has been deployed, hence the entrypoint
set_reward_amount
(andset_reward_duration
) available only to the owner of the contract.Checklist
./scripts/cairo_programs_verifier.sh
successfully