use EIP712 name in Governor

pull/4741/head
BCJdevelopment 1 year ago
parent 4e17c2e958
commit 4f48468558
  1. 7
      contracts/governance/Governor.sol

@ -44,7 +44,6 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72
} }
bytes32 private constant ALL_PROPOSAL_STATES_BITMAP = bytes32((2 ** (uint8(type(ProposalState).max) + 1)) - 1); bytes32 private constant ALL_PROPOSAL_STATES_BITMAP = bytes32((2 ** (uint8(type(ProposalState).max) + 1)) - 1);
string private _name;
mapping(uint256 proposalId => ProposalCore) private _proposals; mapping(uint256 proposalId => ProposalCore) private _proposals;
@ -72,9 +71,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72
/** /**
* @dev Sets the value for {name} and {version} * @dev Sets the value for {name} and {version}
*/ */
constructor(string memory name_) EIP712(name_, version()) { constructor(string memory name_) EIP712(name_, version()) {}
_name = name_;
}
/** /**
* @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract) * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract)
@ -99,7 +96,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72
* @dev See {IGovernor-name}. * @dev See {IGovernor-name}.
*/ */
function name() public view virtual returns (string memory) { function name() public view virtual returns (string memory) {
return _name; return _EIP712Name();
} }
/** /**

Loading…
Cancel
Save