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.
staker
The staker address who earned reputation.
amount
The amount of reputation.
Staked
Emitted when staker
stakes an amount
of GoodDollars.
staker
The staker address who earned reputation.
amount
The amount of stake.
StakeWithdraw
Emitted when staker
withdraws an amount
of staked GoodDollars.
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.
_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$.
_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
.
_user
User to check the pending rewards.
Returns: an amount of G$ rewards for the user.
Last updated