Skip to content

Commit

Permalink
🔥 Remove PERMIT_TYPEHASH
Browse files Browse the repository at this point in the history
  • Loading branch information
transmissions11 committed Feb 5, 2022
1 parent 0575fa0 commit 1349df8
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/tokens/ERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ abstract contract ERC20 {
EIP-2612 STORAGE
//////////////////////////////////////////////////////////////*/

bytes32 internal constant PERMIT_TYPEHASH =
keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

uint256 internal immutable INITIAL_CHAIN_ID;

bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;
Expand Down Expand Up @@ -134,7 +131,18 @@ abstract contract ERC20 {
abi.encodePacked(
"\x19\x01",
DOMAIN_SEPARATOR(),
keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))
keccak256(
abi.encode(
keccak256(
"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
),
owner,
spender,
value,
nonces[owner]++,
deadline
)
)
)
);

Expand Down

0 comments on commit 1349df8

Please sign in to comment.