GovernorStandalone
Inherits: Governor, Initializable
Title: GovernorStandalone
Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/governance/Governor.sol)
Non-Diamond deployable Governor. Initializes inside an initializer-guarded
constructor and accepts ETH for value-bearing proposal execution.
Initializes EIP-712 (for castVoteBySig), Nonces (for signature replay-protection),
and Governor inside a single initializer-guarded constructor.
The token_ address must implement IVotes (e.g. an ERC20Votes token).
Notes:
- lattice-version: 0.1.0
- lattice-source: OpenZeppelin v5.1.0
Functions
constructor
constructor(Config memory cfg) initializer;Parameters
| Name | Type | Description |
|---|---|---|
| cfg | Config |
receive
Accept ETH so the governor can hold and forward value during proposal execution.
receive() external payable;Structs
Config
Governance configuration struct to avoid stack-too-deep.
struct Config {
string name;
address token;
address timelock;
uint48 votingDelay;
uint32 votingPeriod;
uint256 proposalThreshold;
uint256 quorumNumerator;
}Properties
| Name | Type | Description |
|---|---|---|
| name | string | |
| token | address | |
| timelock | address | |
| votingDelay | uint48 | |
| votingPeriod | uint32 | |
| proposalThreshold | uint256 | |
| quorumNumerator | uint256 |