RigoblockGovernanceStrategy
Overview
License: Apache-2.0-or-later
contract RigoblockGovernanceStrategy is IGovernanceStrategyReverts on any time type other than TimeType.Timestamp: see docs/governance/STRATEGY.md.
Errors info
GovCrosschainInvalidData
error GovCrosschainInvalidData()Thrown when a Wormhole cross-chain action has malformed calldata.
GovCrosschainTargetSelf
error GovCrosschainTargetSelf(uint16 targetChainId)Thrown when a Wormhole cross-chain action targets the current chain.
GovCrosschainNotMainnet
error GovCrosschainNotMainnet()Thrown when a Wormhole cross-chain proposal is created outside Ethereum mainnet.
GovCrosschainInvalidValue
Thrown when a Wormhole cross-chain action carries a non-zero wrapper value.
The inner action value is paid on the destination chain from the receiver's balance, so the wrapper must be zero and the Wormhole fee is attached at execution time only.
GovCrosschainInvalidConsistencyLevel
Thrown when a Wormhole message is published with a consistency level other than finalized.
Parameters:
consistencyLevel
uint8
The supplied consistency level.
GovStrategyInvalidProposalThreshold
Thrown when the proposal threshold is outside the allowed range.
GovStrategyInvalidQuorumThreshold
Thrown when the quorum threshold is outside the allowed range.
GovStrategyInvalidTimeType
Thrown when the governance time type is not TimeType.Timestamp.
Functions info
constructor
assertValidInitParams (0x2e100214)
Reverts if initialization paramters are incorrect.
Only used at initialization, as params deleted from factory storage after setup.
Parameters:
params
struct IRigoblockGovernanceFactory.Parameters
Tuple of factory parameters.
assertValidProposalThreshold (0xa564b600)
Reverts if the proposal threshold is incorrect.
Parameters:
proposalThreshold
uint256
Number of votes required to make a proposal.
assertValidQuorumThreshold (0x41fc31a7)
Reverts if the quorum threshold is incorrect.
Parameters:
quorumThreshold
uint256
Number of votes required for a proposal to succeed.
getProposalState (0xad1d8f45)
Returns the state of a proposal for a required quorum.
Must use the same time reference as timeType and revert for unsupported time types. See docs/governance/STRATEGY.md.
Parameters:
proposal
struct IGovernanceState.Proposal
Tuple of the proposal.
minimumQuorum
uint256
Number of votes required for a proposal to pass.
timeType
enum TimeType
Time reference used by the proposal's voting period.
Return values:
[0]
enum ProposalStatus
Tuple of the proposal state.
getVotingPower (0xbb4d4436)
Return a user's voting power.
Parameters:
account
address
Address to check votes for.
votingPeriod (0x02a251a3)
Return the voting period.
Informational only: the enforceable window is the one returned by votingTimestamps.
Return values:
[0]
uint256
Number of blocks or seconds of period duration, matching the governance's time type.
votingTimestamps (0x25bbc354)
Returns the voting timestamps.
Must produce start/end values expressed in the same unit as timeType (block numbers for TimeType.Blocknumber, timestamps for TimeType.Timestamp). See getProposalState.
Parameters:
timeType
enum TimeType
Time reference used by the proposal's voting period.
Return values:
startBlockOrTime
uint256
Timestamp when proposal starts.
endBlockOrTime
uint256
Timestamp when voting ends.
beforePropose (0xcab9110e)
Validates and optionally modifies an action before it is stored as part of a proposal.
Parameters:
action
struct IGovernanceVoting.ProposedAction
The action to validate.
Return values:
[0]
struct IGovernanceVoting.ProposedAction
The validated (possibly modified) action.
beforeExecute (0xfa05b6f6)
Returns the action as it should be executed, optionally modifying the value.
Parameters:
action
struct IGovernanceVoting.ProposedAction
The action to execute.
Return values:
[0]
struct IGovernanceVoting.ProposedAction
The action to execute.
wormhole (0x84acd1bb)
Returns the Wormhole core contract used for cross-chain governance.
Return values:
[0]
address
Address of the Wormhole core contract, or the zero address if this chain is not configured as a cross-chain governance receiver.
wormholeChainId (0x793e64e3)
Returns the Wormhole chain id of the chain this strategy is deployed on.
Last updated