GovernanceStaking
This is the staking contract that allows citizens to stake G$ to get GOOD rewards.
Events
ReputationEarned
Emitted when staker
earns an amount
of GOOD tokens.
Parameter name | Annotation |
---|---|
staker | The staker address who earned reputation. |
amount | The amount of reputation. |
Staked
Emitted when staker
stakes an amount
of GoodDollars.
Parameter name | Annotation |
---|---|
staker | The staker address who earned reputation. |
amount | The amount of stake. |
StakeWithdraw
Emitted when staker
withdraws an amount
of staked GoodDollars.
Parameter name | Annotation |
---|---|
staker | The staker address who earned reputation. |
amount | The amount of stake. |
stake
The function allows a staker to deposit Tokens. Notice that approve
is needed to be executed before the execution of this method.
Parameter name | Annotation |
---|---|
_amount | The amount of G$ to stake. |
Can be executed only when the contract is not paused.
withdrawStake
The function withdraws the senders staked G$.
Parameter name | Annotation |
---|---|
_amount | The amount of G$ to withdraw. |
Can be executed only when the contract is not paused.
withdrawRewards
The function allows staker to withdraw their rewards without withdraw their stake.
Returns: amount of rewards that were sent to the msg.sender
.
getUserPendingReward
The function allows to acquire the number of G$ rewards for a specific _user
.
Parameter name | Annotation |
---|---|
_user | User to check the pending rewards. |
Returns: an amount of G$ rewards for the user.
Last updated