Skip to content

Commit

Permalink
Remove castVoteWithParams without reason parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
apbendi committed Jan 17, 2022
1 parent ae3119a commit abf9e35
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
17 changes: 2 additions & 15 deletions contracts/governance/Governor.sol
Expand Up @@ -68,10 +68,9 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {
// In addition to the current interfaceId, also support previous version of the interfaceId that did not
// include the castVoteWithParams() and castVoteWithReasonAndParams() functions as standard
// include the castVoteWithReasonAndParams() function as standard
return
interfaceId ==
(type(IGovernor).interfaceId ^ this.castVoteWithReasonAndParams.selector ^ this.castVoteWithParams.selector) ||
interfaceId == (type(IGovernor).interfaceId ^ this.castVoteWithReasonAndParams.selector) ||
interfaceId == type(IGovernor).interfaceId ||
super.supportsInterface(interfaceId);
}
Expand Down Expand Up @@ -313,18 +312,6 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
return _castVote(proposalId, voter, support, "", "");
}

/**
* @dev See {IGovernor-castVoteWithParams}.
*/
function castVoteWithParams(
uint256 proposalId,
uint8 support,
bytes memory params
) public virtual override returns (uint256) {
address voter = _msgSender();
return _castVote(proposalId, voter, support, "", params);
}

/**
* @dev See {IGovernor-castVoteWithReason}.
*/
Expand Down
11 changes: 0 additions & 11 deletions contracts/governance/IGovernor.sol
Expand Up @@ -192,17 +192,6 @@ abstract contract IGovernor is IERC165 {
*/
function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256 balance);

/**
* @dev Cast a vote with additional encoded parameters
*
* Emits a {VoteCast} event.
*/
function castVoteWithParams(
uint256 proposalId,
uint8 support,
bytes memory params
) public virtual returns (uint256 balance);

/**
* @dev Cast a vote with a reason
*
Expand Down
1 change: 0 additions & 1 deletion test/utils/introspection/SupportsInterface.behavior.js
Expand Up @@ -85,7 +85,6 @@ const INTERFACES = {
'propose(address[],uint256[],bytes[],string)',
'execute(address[],uint256[],bytes[],bytes32)',
'castVote(uint256,uint8)',
'castVoteWithParams(uint256,uint8,bytes)',
'castVoteWithReason(uint256,uint8,string)',
'castVoteWithReasonAndParams(uint256,uint8,string,bytes)',
'castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)',
Expand Down

0 comments on commit abf9e35

Please sign in to comment.