From c64a24f51434cc568958c50b29dec5fddc95c168 Mon Sep 17 00:00:00 2001 From: Vedran Bidin Date: Wed, 21 Jun 2023 16:44:24 +0300 Subject: [PATCH] fix: replace functions with storage --- contracts/ERC20Proxied.sol | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/contracts/ERC20Proxied.sol b/contracts/ERC20Proxied.sol index 3a95a7d..2c62807 100644 --- a/contracts/ERC20Proxied.sol +++ b/contracts/ERC20Proxied.sol @@ -22,6 +22,11 @@ abstract contract ERC20Proxied is IERC20 { /*** ERC-20 ***/ /**************************************************************************************************************************************/ + string public override name; + string public override symbol; + + uint8 public override decimals; + uint256 public override totalSupply; mapping(address => uint256) public override balanceOf; @@ -37,17 +42,6 @@ abstract contract ERC20Proxied is IERC20 { mapping(address => uint256) public override nonces; - - /**************************************************************************************************************************************/ - /*** Overriding Functions ***/ - /**************************************************************************************************************************************/ - - function decimals() public view virtual override returns (uint8 decimals_); - - function name() public view virtual override returns (string memory name_); - - function symbol() public view virtual override returns (string memory symbol_); - /**************************************************************************************************************************************/ /*** External Functions ***/ /**************************************************************************************************************************************/ @@ -117,7 +111,7 @@ abstract contract ERC20Proxied is IERC20 { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), - keccak256(bytes(name())), + keccak256(bytes(name)), keccak256(bytes("1")), block.chainid, address(this)