make GenericERC20 inherit from...
...UniswapV2ERC20 not UniswapV2Exchange tabs -> spaces
This commit is contained in:
@ -13,9 +13,9 @@ contract UniswapV2ERC20 is IUniswapV2ERC20 {
|
|||||||
mapping (address => uint) public balanceOf;
|
mapping (address => uint) public balanceOf;
|
||||||
mapping (address => mapping (address => uint)) public allowance;
|
mapping (address => mapping (address => uint)) public allowance;
|
||||||
|
|
||||||
bytes32 public DOMAIN_SEPARATOR;
|
bytes32 public DOMAIN_SEPARATOR;
|
||||||
// keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
|
// keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
|
||||||
bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
|
bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
|
||||||
mapping (address => uint) public nonces;
|
mapping (address => uint) public nonces;
|
||||||
|
|
||||||
event Transfer(address indexed from, address indexed to, uint value);
|
event Transfer(address indexed from, address indexed to, uint value);
|
||||||
@ -27,12 +27,12 @@ contract UniswapV2ERC20 is IUniswapV2ERC20 {
|
|||||||
chainId := chainid()
|
chainId := chainid()
|
||||||
}
|
}
|
||||||
DOMAIN_SEPARATOR = keccak256(abi.encode(
|
DOMAIN_SEPARATOR = keccak256(abi.encode(
|
||||||
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
|
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
|
||||||
keccak256(bytes(name)),
|
keccak256(bytes(name)),
|
||||||
keccak256(bytes("1")),
|
keccak256(bytes("1")),
|
||||||
chainId,
|
chainId,
|
||||||
address(this)
|
address(this)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
function _mint(address to, uint value) internal {
|
function _mint(address to, uint value) internal {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
pragma solidity 0.5.15;
|
pragma solidity 0.5.15;
|
||||||
|
|
||||||
import "../UniswapV2Exchange.sol";
|
import "../UniswapV2ERC20.sol";
|
||||||
|
|
||||||
contract GenericERC20 is UniswapV2Exchange {
|
contract GenericERC20 is UniswapV2ERC20 {
|
||||||
constructor(uint _totalSupply) public {
|
constructor(uint _totalSupply) public {
|
||||||
if (_totalSupply > 0) _mint(msg.sender, _totalSupply);
|
if (_totalSupply > 0) _mint(msg.sender, _totalSupply);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user