StakeManager
Contents
Globals
Modifiers
onlyRouterOrFeePool
No description
Declaration:
Functions
constructor
No description
Declaration:
Modifiers:
indexedValidatorsLength
Get the indexed validators length.
Declaration:
Modifiers: No modifiers
indexedValidatorsExists
Determine whether the index validator exists by id.
Declaration:
Modifiers: No modifiers
Args:
indexedValidatorsByIndex
Get indexed validator address by index.
Declaration:
Modifiers: No modifiers
Args:
indexedValidatorsById
Get indexed validator address by id.
Declaration:
Modifiers: No modifiers
Args:
getVotingPowerByIndex
Get the voting power by validator index, if index is out of range or validator doesn't exist, return 0.
Declaration:
Modifiers: No modifiers
Args:
getVotingPowerById
Get the voting power by validator id, if doesn't exist, return 0.
Declaration:
Modifiers: No modifiers
Args:
getVotingPowerByAddress
Get the voting power by validator address, if the validator doesn't exist, return 0.
Declaration:
Modifiers: No modifiers
Args:
getTotalLockedAmountAndValidatorCount
Get the total locked amount and the validator count, but no including the excludes
.
Declaration:
Modifiers: No modifiers
Args:
activeValidatorsLength
Get the active validators list length.
Declaration:
Modifiers: No modifiers
estimateSharesToAmount
Estimate how much GXC should be stake, if user wants to get the number of shares, Or estimate how much GXC can be obtained, if user unstake the amount of GXC.
Declaration:
Modifiers: No modifiers
Args:
estimateAmountToShares
Estimate how much shares should be unstake, if user wants to get the amount of GXC. Or estimate how much shares can be obtained, if user stake the amount of GXC. If the validator doesn't exist, return 0.
Declaration:
Modifiers: No modifiers
Args:
estimateUnstakeAmount
Estimate how much GXC can be claim, if unstake the number of shares(when unstake timeout). If the validator doesn't exist, return 0.
Declaration:
Modifiers: No modifiers
Args:
receive
No description
Declaration:
Modifiers: No modifiers
stake
Stake for validator and mint share token to to
address. It will emit Stake
event.
Declaration:
Modifiers:
Args:
startUnstake
Start unstake shares for validator. Stake manager will burn the shares immediately, but return GXC to to
address after config.unstakeDelay
. It will emit StartUnstake
event.
Declaration:
Modifiers:
Args:
Returns:
Declaration:
Modifiers:
Args:
Returns:
Declaration:
Modifiers:
Args:
unstake
Unstake by id, return unstake amount.
Declaration:
Modifiers:
Args:
removeIndexedValidator
Remove the validator from indexedValidators
if the voting power is less than minIndexVotingPower
This can be called by anyone.
Declaration:
Modifiers:
Args:
addIndexedValidator
Add the validator to indexedValidators
if the voting power is greater than minIndexVotingPower
This can be called by anyone.
Declaration:
Modifiers:
Args:
reward
Reward validator, only can be called by system caller
Declaration:
Modifiers:
Args:
slash
Slash validator, only can be called by system caller
Declaration:
Modifiers:
Args:
onAfterBlock
After block callback, it will be called by system caller after each block is processed
Declaration:
Modifiers:
Args:
Events
Reward
Emitted when a validator gets a reward NOTE: this event is never shown in the block, because the reward
function is only called by the system caller
Params:
Params:
Params:
Params:
Params:
Params:
Params:
Params:
Last updated