Skip to main content

Module MonadVm

Module MonadVm 

Source
Available on crate feature monad only.
Expand description

Monad-specific cheatcodes. Accessible via MonadVm(MONAD_CHEATCODE_ADDRESS).

interface MonadVm {
    function setEpoch(uint64 epoch, bool inDelayPeriod) external;
    function setProposer(uint64 valId) external;
    function setAccumulator(uint64 valId, uint256 value) external;
    function blockReward(address author, uint256 reward) external;
    function epochSnapshot() external;
    function epochChange(uint64 newEpoch) external;
    function epochBoundary(uint64 newEpoch) external;
}

Structs§

blockRewardCall
Distribute block reward via the real syscallReward handler. Function with signature blockReward(address,uint256) and selector 0x2714fe4b.
blockRewardReturn
Distribute block reward via the real syscallReward handler. Container type for the return parameters of the blockReward(address,uint256) function.
epochBoundaryCall
Convenience: epochSnapshot() then epochChange(newEpoch). Function with signature epochBoundary(uint64) and selector 0xfd138d27.
epochBoundaryReturn
Convenience: epochSnapshot() then epochChange(newEpoch). Container type for the return parameters of the epochBoundary(uint64) function.
epochChangeCall
Execute syscallOnEpochChange. Function with signature epochChange(uint64) and selector 0x3a3b7cb7.
epochChangeReturn
Execute syscallOnEpochChange. Container type for the return parameters of the epochChange(uint64) function.
epochSnapshotCall
Execute syscallSnapshot. Function with signature epochSnapshot() and selector 0x5ab25e92.
epochSnapshotReturn
Execute syscallSnapshot. Container type for the return parameters of the epochSnapshot() function.
setAccumulatorCall
Directly sets a validator’s accumulated reward per token. Function with signature setAccumulator(uint64,uint256) and selector 0xe0480ffb.
setAccumulatorReturn
Directly sets a validator’s accumulated reward per token. Container type for the return parameters of the setAccumulator(uint64,uint256) function.
setEpochCall
Sets the current epoch and delay period for the staking precompile. Function with signature setEpoch(uint64,bool) and selector 0x8d33af46.
setEpochReturn
Sets the current epoch and delay period for the staking precompile. Container type for the return parameters of the setEpoch(uint64,bool) function.
setProposerCall
Sets the current block proposer validator ID. Function with signature setProposer(uint64) and selector 0x53417aa5.
setProposerReturn
Sets the current block proposer validator ID. Container type for the return parameters of the setProposer(uint64) function.

Enums§

MonadVmCalls
Container for all the MonadVm function calls.