Created
March 7, 2024 09:15
-
-
Save hcheng826/f01a4ad37d5bea183b33a712a2d6f4cf to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.24+commit.e11b9ed9.js&optimize=false&runs=200&gist=
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity ^0.8.17; | |
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol"; | |
contract Test is EIP712 { | |
constructor() EIP712("native pool", "1") {} | |
bytes32 private constant ORDER_SIGNATURE_HASH = 0xcdd3cf1659a8da07564b163a4df90f66944547e93f0bb61ba676c459a2db4e20; | |
function getHash() public view returns (bytes32 a) { | |
a = _hashTypedDataV4( | |
keccak256( | |
abi.encode( | |
ORDER_SIGNATURE_HASH, | |
1, | |
0x504f151d587881366Ae63fDD6302917aDD2c8bA7, | |
0x504f151d587881366Ae63fDD6302917aDD2c8bA7, | |
0x504f151d587881366Ae63fDD6302917aDD2c8bA7, | |
0xdAC17F958D2ee523a2206206994597C13D831ec7, | |
0x0000000000000000000000000000000000000000, | |
3547053, | |
1000000000000000, | |
1709799751, | |
0x504f151d587881366Ae63fDD6302917aDD2c8bA7, | |
0x89c295fca2174c1485480e2404dd22fe | |
) | |
) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment