From 8397ce732ccc9dd529798aa179c5f349cf33d204 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Thu, 9 Feb 2023 16:48:09 +0100 Subject: [PATCH] remove full IGovernor from ERC165 --- contracts/governance/Governor.sol | 1 - test/governance/Governor.test.js | 2 +- .../SupportsInterface.behavior.js | 25 ------------------- 3 files changed, 1 insertion(+), 27 deletions(-) diff --git a/contracts/governance/Governor.sol b/contracts/governance/Governor.sol index d1b7deee3b6..e3691a3ed3a 100644 --- a/contracts/governance/Governor.sol +++ b/contracts/governance/Governor.sol @@ -109,7 +109,6 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receive this.getVotesWithParams.selector) || // Previous interface for backwards compatibility interfaceId == (type(IGovernor).interfaceId ^ type(IERC6372).interfaceId ^ this.cancel.selector) || - interfaceId == type(IGovernor).interfaceId || interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); } diff --git a/test/governance/Governor.test.js b/test/governance/Governor.test.js index 8d9a4f2da72..1eabaccf034 100644 --- a/test/governance/Governor.test.js +++ b/test/governance/Governor.test.js @@ -70,7 +70,7 @@ contract('Governor', function (accounts) { ); }); - shouldSupportInterfaces(['ERC165', 'ERC1155Receiver', 'Governor', 'GovernorWithParams', 'GovernorFull']); + shouldSupportInterfaces(['ERC165', 'ERC1155Receiver', 'Governor', 'GovernorWithParams']); shouldBehaveLikeEIP6372(mode); it('deployment check', async function () { diff --git a/test/utils/introspection/SupportsInterface.behavior.js b/test/utils/introspection/SupportsInterface.behavior.js index 7c192992ddb..ba5aca2fc06 100644 --- a/test/utils/introspection/SupportsInterface.behavior.js +++ b/test/utils/introspection/SupportsInterface.behavior.js @@ -78,31 +78,6 @@ const INTERFACES = { 'castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)', 'castVoteWithReasonAndParamsBySig(uint256,uint8,string,bytes,uint8,bytes32,bytes32)', ], - GovernorFull: [ - 'name()', - 'version()', - 'COUNTING_MODE()', - 'hashProposal(address[],uint256[],bytes[],bytes32)', - 'state(uint256)', - 'proposalSnapshot(uint256)', - 'proposalDeadline(uint256)', - 'votingDelay()', - 'votingPeriod()', - 'quorum(uint256)', - 'getVotes(address,uint256)', - 'getVotesWithParams(address,uint256,bytes)', - 'hasVoted(uint256,address)', - 'propose(address[],uint256[],bytes[],string)', - 'execute(address[],uint256[],bytes[],bytes32)', - 'castVote(uint256,uint8)', - 'castVoteWithReason(uint256,uint8,string)', - 'castVoteWithReasonAndParams(uint256,uint8,string,bytes)', - 'castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)', - 'castVoteWithReasonAndParamsBySig(uint256,uint8,string,bytes,uint8,bytes32,bytes32)', - 'cancel(uint256)', - 'clock()', - 'CLOCK_MODE()', - ], GovernorTimelock: ['timelock()', 'proposalEta(uint256)', 'queue(address[],uint256[],bytes[],bytes32)'], ERC2981: ['royaltyInfo(uint256,uint256)'], };