Make ERC20Votes independent from ERC20Permit (#3816)
Co-authored-by: Francisco <frangio.1@gmail.com>
This commit is contained in:
@ -5,7 +5,7 @@ pragma solidity ^0.8.0;
|
||||
import "../token/ERC20/extensions/ERC20VotesComp.sol";
|
||||
|
||||
contract ERC20VotesCompMock is ERC20VotesComp {
|
||||
constructor(string memory name, string memory symbol) ERC20(name, symbol) ERC20Permit(name) {}
|
||||
constructor(string memory name, string memory symbol) ERC20(name, symbol) EIP712(name, "1") {}
|
||||
|
||||
function mint(address account, uint256 amount) public {
|
||||
_mint(account, amount);
|
||||
|
||||
@ -5,7 +5,7 @@ pragma solidity ^0.8.0;
|
||||
import "../token/ERC20/extensions/ERC20Votes.sol";
|
||||
|
||||
contract ERC20VotesMock is ERC20Votes {
|
||||
constructor(string memory name, string memory symbol) ERC20(name, symbol) ERC20Permit(name) {}
|
||||
constructor(string memory name, string memory symbol) ERC20(name, symbol) EIP712(name, "1") {}
|
||||
|
||||
function mint(address account, uint256 amount) public {
|
||||
_mint(account, amount);
|
||||
|
||||
@ -15,7 +15,7 @@ contract ERC721VotesMock is ERC721Votes {
|
||||
_mint(account, tokenId);
|
||||
}
|
||||
|
||||
function burn(uint256 tokenId) public {
|
||||
function burn(address, uint256 tokenId) public {
|
||||
_burn(tokenId);
|
||||
}
|
||||
|
||||
|
||||
11
contracts/mocks/NoncesImpl.sol
Normal file
11
contracts/mocks/NoncesImpl.sol
Normal file
@ -0,0 +1,11 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
import "../utils/Nonces.sol";
|
||||
|
||||
contract NoncesImpl is Nonces {
|
||||
function useNonce(address owner) public {
|
||||
super._useNonce(owner);
|
||||
}
|
||||
}
|
||||
@ -28,7 +28,7 @@ contract VotesMock is Votes {
|
||||
_transferVotingUnits(address(0), account, 1);
|
||||
}
|
||||
|
||||
function burn(uint256 voteId) external {
|
||||
function burn(address, uint256 voteId) external {
|
||||
address owner = _owners[voteId];
|
||||
_balances[owner] -= 1;
|
||||
_transferVotingUnits(owner, address(0), 1);
|
||||
|
||||
Reference in New Issue
Block a user