GovernanceCoreFacetImpl
Inherits: IGovernor
This is a concrete implementation that implements all IGovernor interface functions
Complete implementation contract for ERC7752 lot-based governance
State Variables
_proposals
mapping(uint256 => bool) private _proposals;
_proposalEtas
mapping(uint256 => uint256) private _proposalEtas;
Functions
supportsInterface
See IERC165-supportsInterface.
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool);
initializeGovernance
Initialize governance with basic parameters
function initializeGovernance(
string memory _name,
uint256 _votingDelay,
uint256 _votingPeriod,
uint256 _proposalThreshold,
uint256 _quorumNumerator
) external;
configureShareClass
Configure a share class for governance participation
function configureShareClass(
address shareClass,
bool enabled,
uint256 votingWeight,
bool requiresLotVoting,
uint256 minimumHoldingPeriod,
bool allowDelegation
) external;
castLotVote
Cast a vote using a specific lot
function castLotVote(uint256 proposalId, bytes32 lotId, uint8 support, string memory reason)
external
returns (uint256 weight);
name
function name() public pure returns (string memory);
version
function version() public pure returns (string memory);
hashProposal
function hashProposal(
address[] memory targets,
uint256[] memory values,
bytes[] memory calldatas,
bytes32 descriptionHash
) public pure returns (uint256);
state
function state(uint256 proposalId) public view returns (ProposalState);
proposalSnapshot
function proposalSnapshot(uint256 proposalId) public pure returns (uint256);
proposalDeadline
function proposalDeadline(uint256 proposalId) public pure returns (uint256);
proposalProposer
function proposalProposer(uint256 proposalId) public pure returns (address);
proposalEta
function proposalEta(uint256 proposalId) public view returns (uint256);
proposalNeedsQueuing
function proposalNeedsQueuing(uint256 proposalId) public pure returns (bool);
proposalThreshold
function proposalThreshold() public pure returns (uint256);
votingDelay
function votingDelay() public pure returns (uint256);
votingPeriod
function votingPeriod() public pure returns (uint256);
quorum
function quorum(uint256 timepoint) public pure returns (uint256);
getVotes
function getVotes(address account, uint256 timepoint) public pure returns (uint256);
getVotesWithParams
function getVotesWithParams(address account, uint256 timepoint, bytes memory params) public pure returns (uint256);
hasVoted
function hasVoted(uint256 proposalId, address account) public pure returns (bool);
propose
function propose(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, string memory description)
public
returns (uint256 proposalId);
execute
function execute(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)
public
payable
returns (uint256 proposalId);
cancel
function cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)
public
returns (uint256 proposalId);
queue
function queue(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)
public
returns (uint256 proposalId);
castVote
function castVote(uint256 proposalId, uint8 support) public returns (uint256 weight);
castVoteWithReason
function castVoteWithReason(uint256 proposalId, uint8 support, string memory reason) public returns (uint256 weight);
castVoteWithReasonAndParams
function castVoteWithReasonAndParams(uint256 proposalId, uint8 support, string memory reason, bytes memory params)
public
returns (uint256 weight);
castVoteBySig
function castVoteBySig(uint256 proposalId, uint8 support, address voter, bytes memory signature)
external
returns (uint256 balance);
castVoteWithReasonAndParamsBySig
function castVoteWithReasonAndParamsBySig(
uint256 proposalId,
uint8 support,
address voter,
string calldata reason,
bytes memory params,
bytes memory signature
) external returns (uint256 balance);
clock
function clock() public view returns (uint48);
CLOCK_MODE
function CLOCK_MODE() public pure returns (string memory);
COUNTING_MODE
function COUNTING_MODE() public pure returns (string memory);
Last updated
Was this helpful?