Skip to main content

Module IMonadStaking

Module IMonadStaking 

Source
Available on crate feature monad only.
Expand description

Module containing a contract’s types and functions.

interface IMonadStaking {
    event ValidatorRewarded(uint64 indexed validatorId, address indexed from, uint256 amount, uint64 epoch);
    event ValidatorCreated(uint64 indexed validatorId, address indexed authAddress, uint256 commission);
    event ValidatorStatusChanged(uint64 indexed validatorId, uint64 flags);
    event Delegate(uint64 indexed validatorId, address indexed delegator, uint256 amount, uint64 activationEpoch);
    event Undelegate(uint64 indexed validatorId, address indexed delegator, uint8 withdrawId, uint256 amount, uint64 activationEpoch);
    event Withdraw(uint64 indexed validatorId, address indexed delegator, uint8 withdrawId, uint256 amount, uint64 epoch);
    event ClaimRewards(uint64 indexed validatorId, address indexed delegator, uint256 amount, uint64 epoch);
    event CommissionChanged(uint64 indexed validatorId, uint256 oldCommission, uint256 newCommission);
    event EpochChanged(uint64 oldEpoch, uint64 newEpoch);
    function addValidator(bytes calldata payload, bytes calldata signedSecpMessage, bytes calldata signedBlsMessage) external payable returns (uint64 validatorId);
    function delegate(uint64 validatorId) external payable returns (bool success);
    function undelegate(uint64 validatorId, uint256 amount, uint8 withdrawId) external returns (bool success);
    function compound(uint64 validatorId) external returns (bool success);
    function withdraw(uint64 validatorId, uint8 withdrawId) external returns (bool success);
    function claimRewards(uint64 validatorId) external returns (bool success);
    function changeCommission(uint64 validatorId, uint256 commission) external returns (bool success);
    function externalReward(uint64 validatorId) external payable returns (bool success);
    function getEpoch() external returns (uint64 epoch, bool inEpochDelayPeriod);
    function getProposerValId() external returns (uint64 valId);
    function getValidator(uint64 validatorId) external returns (address authAddress, uint64 flags, uint256 stake, uint256 accRewardPerToken, uint256 commission, uint256 unclaimedRewards, uint256 consensusStake, uint256 consensusCommission, uint256 snapshotStake, uint256 snapshotCommission, bytes memory secpPubkey, bytes memory blsPubkey);
    function getDelegator(uint64 validatorId, address delegator) external returns (uint256 stake, uint256 accRewardPerToken, uint256 unclaimedRewards, uint256 deltaStake, uint256 nextDeltaStake, uint64 deltaEpoch, uint64 nextDeltaEpoch);
    function getWithdrawalRequest(uint64 validatorId, address delegator, uint8 withdrawId) external returns (uint256 withdrawalAmount, uint256 accRewardPerToken, uint64 withdrawEpoch);
    function getConsensusValidatorSet(uint32 startIndex) external returns (bool isDone, uint32 nextIndex, uint64[] memory valIds);
    function getSnapshotValidatorSet(uint32 startIndex) external returns (bool isDone, uint32 nextIndex, uint64[] memory valIds);
    function getExecutionValidatorSet(uint32 startIndex) external returns (bool isDone, uint32 nextIndex, uint64[] memory valIds);
    function getDelegations(address delegator, uint64 startValId) external returns (bool isDone, uint64 nextValId, uint64[] memory valIds);
    function getDelegators(uint64 validatorId, address startDelegator) external returns (bool isDone, address nextDelegator, address[] memory delegators);
}

Modules§

abi
Contains dynamic ABI definitions for this contract.

Structs§

ClaimRewards
Event with signature ClaimRewards(uint64,address,uint256,uint64) and selector 0xcb607e6b63c89c95f6ae24ece9fe0e38a7971aa5ed956254f1df47490921727b.
CommissionChanged
Event with signature CommissionChanged(uint64,uint256,uint256) and selector 0xd1698d3454c5b5384b70aaae33f1704af7c7e055f0c75503ba3146dc28995920.
Delegate
Event with signature Delegate(uint64,address,uint256,uint64) and selector 0xe4d4df1e1827dd28252fd5c3cd7ebccd3da6e0aa31f74c828f3c8542af49d840.
EpochChanged
Event with signature EpochChanged(uint64,uint64) and selector 0x4fae4dbe0ed659e8ce6637e3c273cd8e4d3bf029b9379a9e8b3f3f27dbef809b.
Undelegate
Event with signature Undelegate(uint64,address,uint8,uint256,uint64) and selector 0x3e53c8b91747e1b72a44894db10f2a45fa632b161fdcdd3a17bd6be5482bac62.
ValidatorCreated
Event with signature ValidatorCreated(uint64,address,uint256) and selector 0x6f8045cd38e512b8f12f6f02947c632e5f25af03aad132890ecf50015d97c1b2.
ValidatorRewarded
Event with signature ValidatorRewarded(uint64,address,uint256,uint64) and selector 0x3a420a01486b6b28d6ae89c51f5c3bde3e0e74eecbb646a0c481ccba3aae3754.
ValidatorStatusChanged
Event with signature ValidatorStatusChanged(uint64,uint64) and selector 0xc95966754e882e03faffaf164883d98986dda088d09471a35f9e55363daf0c53.
Withdraw
Event with signature Withdraw(uint64,address,uint8,uint256,uint64) and selector 0x63030e4238e1146c63f38f4ac81b2b23c8be28882e68b03f0887e50d0e9bb18f.
addValidatorCall
Function with signature addValidator(bytes,bytes,bytes) and selector 0xf145204c.
addValidatorReturn
Container type for the return parameters of the addValidator(bytes,bytes,bytes) function.
changeCommissionCall
Function with signature changeCommission(uint64,uint256) and selector 0x9bdcc3c8.
changeCommissionReturn
Container type for the return parameters of the changeCommission(uint64,uint256) function.
claimRewardsCall
Function with signature claimRewards(uint64) and selector 0xa76e2ca5.
claimRewardsReturn
Container type for the return parameters of the claimRewards(uint64) function.
compoundCall
Function with signature compound(uint64) and selector 0xb34fea67.
compoundReturn
Container type for the return parameters of the compound(uint64) function.
delegateCall
Function with signature delegate(uint64) and selector 0x84994fec.
delegateReturn
Container type for the return parameters of the delegate(uint64) function.
externalRewardCall
Function with signature externalReward(uint64) and selector 0xe4b3303b.
externalRewardReturn
Container type for the return parameters of the externalReward(uint64) function.
getConsensusValidatorSetCall
Function with signature getConsensusValidatorSet(uint32) and selector 0xfb29b729.
getConsensusValidatorSetReturn
Container type for the return parameters of the getConsensusValidatorSet(uint32) function.
getDelegationsCall
Function with signature getDelegations(address,uint64) and selector 0x4fd66050.
getDelegationsReturn
Container type for the return parameters of the getDelegations(address,uint64) function.
getDelegatorCall
Function with signature getDelegator(uint64,address) and selector 0x573c1ce0.
getDelegatorReturn
Container type for the return parameters of the getDelegator(uint64,address) function.
getDelegatorsCall
Function with signature getDelegators(uint64,address) and selector 0xa0843a26.
getDelegatorsReturn
Container type for the return parameters of the getDelegators(uint64,address) function.
getEpochCall
Function with signature getEpoch() and selector 0x757991a8.
getEpochReturn
Container type for the return parameters of the getEpoch() function.
getExecutionValidatorSetCall
Function with signature getExecutionValidatorSet(uint32) and selector 0x7cb074df.
getExecutionValidatorSetReturn
Container type for the return parameters of the getExecutionValidatorSet(uint32) function.
getProposerValIdCall
Function with signature getProposerValId() and selector 0xfbacb0be.
getProposerValIdReturn
Container type for the return parameters of the getProposerValId() function.
getSnapshotValidatorSetCall
Function with signature getSnapshotValidatorSet(uint32) and selector 0xde66a368.
getSnapshotValidatorSetReturn
Container type for the return parameters of the getSnapshotValidatorSet(uint32) function.
getValidatorCall
Function with signature getValidator(uint64) and selector 0x2b6d639a.
getValidatorReturn
Container type for the return parameters of the getValidator(uint64) function.
getWithdrawalRequestCall
Function with signature getWithdrawalRequest(uint64,address,uint8) and selector 0x56fa2045.
getWithdrawalRequestReturn
Container type for the return parameters of the getWithdrawalRequest(uint64,address,uint8) function.
undelegateCall
Function with signature undelegate(uint64,uint256,uint8) and selector 0x5cf41514.
undelegateReturn
Container type for the return parameters of the undelegate(uint64,uint256,uint8) function.
withdrawCall
Function with signature withdraw(uint64,uint8) and selector 0xaed2ee73.
withdrawReturn
Container type for the return parameters of the withdraw(uint64,uint8) function.

Enums§

IMonadStakingCalls
Container for all the IMonadStaking function calls.
IMonadStakingEvents
Container for all the IMonadStaking events.