Make ERC20Votes independent from ERC20Permit (#3816)

Co-authored-by: Francisco <frangio.1@gmail.com>
This commit is contained in:
JulissaDantes
2022-11-29 10:25:52 -04:00
committed by GitHub
parent bc8f442d00
commit e2d2ebc8fc
18 changed files with 231 additions and 343 deletions

View File

@ -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);

View File

@ -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);

View File

@ -15,7 +15,7 @@ contract ERC721VotesMock is ERC721Votes {
_mint(account, tokenId);
}
function burn(uint256 tokenId) public {
function burn(address, uint256 tokenId) public {
_burn(tokenId);
}

View 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);
}
}

View File

@ -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);