GovernorNoncesKeyedUpgradeable
Inherits: Initializable, GovernorUpgradeable, NoncesKeyedUpgradeable
An extension of {Governor} that extends existing nonce management to use {NoncesKeyed}, where the key is the low-order 192 bits of the proposalId
.
This is useful for voting by signature while maintaining separate sequences of nonces for each proposal.
NOTE: Traditional (un-keyed) nonces are still supported and can continue to be used as if this extension was not present.
Functions
__GovernorNoncesKeyed_init
function __GovernorNoncesKeyed_init() internal onlyInitializing;
__GovernorNoncesKeyed_init_unchained
function __GovernorNoncesKeyed_init_unchained() internal onlyInitializing;
_useCheckedNonce
function _useCheckedNonce(address owner, uint256 nonce)
internal
virtual
override(NoncesUpgradeable, NoncesKeyedUpgradeable);
_validateVoteSig
Check the signature against keyed nonce and falls back to the traditional nonce.
NOTE: This function won't call super._validateVoteSig
if the keyed nonce is valid.
Side effects may be skipped depending on the linearization of the function.
function _validateVoteSig(uint256 proposalId, uint8 support, address voter, bytes memory signature)
internal
virtual
override
returns (bool);
_validateExtendedVoteSig
Check the signature against keyed nonce and falls back to the traditional nonce.
NOTE: This function won't call super._validateExtendedVoteSig
if the keyed nonce is valid.
Side effects may be skipped depending on the linearization of the function.
function _validateExtendedVoteSig(
uint256 proposalId,
uint8 support,
address voter,
string memory reason,
bytes memory params,
bytes memory signature
) internal virtual override returns (bool);