Add GovernorSequentialProposalId extension for sequential numbers on proposals (#5290)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com> Co-authored-by: Ernesto García <ernestognw@gmail.com>
This commit is contained in:
@ -3,6 +3,34 @@ const { interfaceId } = require('../../helpers/methods');
|
||||
const { mapValues } = require('../../helpers/iterate');
|
||||
|
||||
const INVALID_ID = '0xffffffff';
|
||||
const GOVERNOR_INTERFACE = [
|
||||
'name()',
|
||||
'version()',
|
||||
'COUNTING_MODE()',
|
||||
'hashProposal(address[],uint256[],bytes[],bytes32)',
|
||||
'state(uint256)',
|
||||
'proposalThreshold()',
|
||||
'proposalSnapshot(uint256)',
|
||||
'proposalDeadline(uint256)',
|
||||
'proposalProposer(uint256)',
|
||||
'proposalEta(uint256)',
|
||||
'proposalNeedsQueuing(uint256)',
|
||||
'votingDelay()',
|
||||
'votingPeriod()',
|
||||
'quorum(uint256)',
|
||||
'getVotes(address,uint256)',
|
||||
'getVotesWithParams(address,uint256,bytes)',
|
||||
'hasVoted(uint256,address)',
|
||||
'propose(address[],uint256[],bytes[],string)',
|
||||
'queue(address[],uint256[],bytes[],bytes32)',
|
||||
'execute(address[],uint256[],bytes[],bytes32)',
|
||||
'cancel(address[],uint256[],bytes[],bytes32)',
|
||||
'castVote(uint256,uint8)',
|
||||
'castVoteWithReason(uint256,uint8,string)',
|
||||
'castVoteWithReasonAndParams(uint256,uint8,string,bytes)',
|
||||
'castVoteBySig(uint256,uint8,address,bytes)',
|
||||
'castVoteWithReasonAndParamsBySig(uint256,uint8,address,string,bytes,bytes)',
|
||||
];
|
||||
const SIGNATURES = {
|
||||
ERC165: ['supportsInterface(bytes4)'],
|
||||
ERC721: [
|
||||
@ -59,34 +87,8 @@ const SIGNATURES = {
|
||||
'acceptDefaultAdminTransfer()',
|
||||
'cancelDefaultAdminTransfer()',
|
||||
],
|
||||
Governor: [
|
||||
'name()',
|
||||
'version()',
|
||||
'COUNTING_MODE()',
|
||||
'hashProposal(address[],uint256[],bytes[],bytes32)',
|
||||
'state(uint256)',
|
||||
'proposalThreshold()',
|
||||
'proposalSnapshot(uint256)',
|
||||
'proposalDeadline(uint256)',
|
||||
'proposalProposer(uint256)',
|
||||
'proposalEta(uint256)',
|
||||
'proposalNeedsQueuing(uint256)',
|
||||
'votingDelay()',
|
||||
'votingPeriod()',
|
||||
'quorum(uint256)',
|
||||
'getVotes(address,uint256)',
|
||||
'getVotesWithParams(address,uint256,bytes)',
|
||||
'hasVoted(uint256,address)',
|
||||
'propose(address[],uint256[],bytes[],string)',
|
||||
'queue(address[],uint256[],bytes[],bytes32)',
|
||||
'execute(address[],uint256[],bytes[],bytes32)',
|
||||
'cancel(address[],uint256[],bytes[],bytes32)',
|
||||
'castVote(uint256,uint8)',
|
||||
'castVoteWithReason(uint256,uint8,string)',
|
||||
'castVoteWithReasonAndParams(uint256,uint8,string,bytes)',
|
||||
'castVoteBySig(uint256,uint8,address,bytes)',
|
||||
'castVoteWithReasonAndParamsBySig(uint256,uint8,address,string,bytes,bytes)',
|
||||
],
|
||||
Governor: GOVERNOR_INTERFACE,
|
||||
Governor_5_3: GOVERNOR_INTERFACE.concat('getProposalId(address[],uint256[],bytes[],bytes32)'),
|
||||
ERC2981: ['royaltyInfo(uint256,uint256)'],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user