From f04890ef4c28e475375461a7da4bbe49d4d5b8ba Mon Sep 17 00:00:00 2001 From: Noah Zinsmeister Date: Tue, 14 Jan 2020 14:23:40 -0500 Subject: [PATCH] make GenericERC20 inherit from... ...UniswapV2ERC20 not UniswapV2Exchange tabs -> spaces --- contracts/UniswapV2ERC20.sol | 16 ++++++++-------- contracts/test/GenericERC20.sol | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/contracts/UniswapV2ERC20.sol b/contracts/UniswapV2ERC20.sol index ce1f7d0..2b2dc7c 100644 --- a/contracts/UniswapV2ERC20.sol +++ b/contracts/UniswapV2ERC20.sol @@ -13,9 +13,9 @@ contract UniswapV2ERC20 is IUniswapV2ERC20 { mapping (address => uint) public balanceOf; 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)"); - bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; + bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; mapping (address => uint) public nonces; event Transfer(address indexed from, address indexed to, uint value); @@ -27,12 +27,12 @@ contract UniswapV2ERC20 is IUniswapV2ERC20 { chainId := chainid() } DOMAIN_SEPARATOR = keccak256(abi.encode( - keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), - keccak256(bytes(name)), - keccak256(bytes("1")), - chainId, - address(this) - )); + keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), + keccak256(bytes(name)), + keccak256(bytes("1")), + chainId, + address(this) + )); } function _mint(address to, uint value) internal { diff --git a/contracts/test/GenericERC20.sol b/contracts/test/GenericERC20.sol index 53f4791..e5ae7b9 100644 --- a/contracts/test/GenericERC20.sol +++ b/contracts/test/GenericERC20.sol @@ -1,8 +1,8 @@ pragma solidity 0.5.15; -import "../UniswapV2Exchange.sol"; +import "../UniswapV2ERC20.sol"; -contract GenericERC20 is UniswapV2Exchange { +contract GenericERC20 is UniswapV2ERC20 { constructor(uint _totalSupply) public { if (_totalSupply > 0) _mint(msg.sender, _totalSupply); }