(name: string, tokenAddress: string)
| 19 | } |
| 20 | |
| 21 | function getDomainSeparator(name: string, tokenAddress: string) { |
| 22 | return keccak256( |
| 23 | defaultAbiCoder.encode( |
| 24 | ['bytes32', 'bytes32', 'bytes32', 'uint256', 'address'], |
| 25 | [ |
| 26 | keccak256(toUtf8Bytes('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)')), |
| 27 | keccak256(toUtf8Bytes(name)), |
| 28 | keccak256(toUtf8Bytes('1')), |
| 29 | 1, |
| 30 | tokenAddress |
| 31 | ] |
| 32 | ) |
| 33 | ) |
| 34 | } |
| 35 | |
| 36 | export function getCreate2Address( |
| 37 | factoryAddress: string, |