Last updated
Last updated
Inherits: MezzGovernor, MezzEIP712, NoncesUpgradeable, IStartupGovernor
Author: Daniel Yamagata
A governance contract that enables the execution of arbitrary transactions by a super-majority of a treasury's signers. A super majority is counted as two-thirds of the signers rounded upwards. Below is a table with a few examples.
The execution of transactions requires an arbitrary deadline. If this deadline passes, the transaction will revert even if provided the correct number of signatures.
Intializes the Governor's state
Parameters
The 'params' argument is maintained in case future versions require additional initialization parameters
Executes an arbitrary transaction. Requires a super majority of board members to sign off
Signatures must be packed in ascending order of the public addresses of the signers and must be packed into a single variable.
Parameters
Returns
Validates the 'signatures' and the number of required signatures for 'safeCache', '_hash', and '_hashData'
Executes a call on a given 'target' with 'data' and 'value'. Reverts if the call fails or the target's code length is zero
Returns the transaction hash of the encoded execute data.
This hash is the one to be signed by a private key. Signatures should then be packed in ascending order by the public keys of the owners when calling executeTx()
Parameters
Encodes a StartupGovernorExecute struct hash following the EIP-191 signed typed data standard
Reference: https://eips.ethereum.org/EIPS/eip-191
Parameters
Returns the hash of a StartupGovernorExecute struct following the EIP-712 encoding standards
Reference: https://eips.ethereum.org/EIPS/eip-712
Parameters
Returns the coreId of the implementation as a bytes32
The core ID is the keccak256 hash of the contract name followed by a version under the following syntax: "mezzanine.coreId.ContractName.vX" For example, the core ID of the 2nd version of the Treasury would be the following: keccak256(abi.encodePacked("mezzanine.coreId.Treasury.v2"))
Returns the version of the implementation as a uint256
Reference: https://eips.ethereum.org/EIPS/eip-721
Reference: https://eips.ethereum.org/EIPS/eip-1155
Reference: https://eips.ethereum.org/EIPS/eip-1155
ERC165 support
initTreasury
address
The address of the Treasury that the Governor is in charge of
<none>
bytes
target
address
The target address to execute the transaction on
value
uint256
The amount of native currency to send with the transaction
data
bytes
The calldata of the transaction
signatures
bytes
The signatures of the board members
deadline
uint256
<none>
bytes
The return data of the transaction
execute
DataTypes.StartupGovernorExecute
The StartupGovernorExecute struct to hash
execute
DataTypes.StartupGovernorExecute
The StartupGovernorExecute struct to hash and subsequently encode
execute
DataTypes.StartupGovernorExecute
The StartupGovernorExecute struct to hash
2
2
3
2
4
3
5
4
6
4