MCPcopy
hub / github.com/Uniswap/v2-core / getDomainSeparator

Function getDomainSeparator

test/shared/utilities.ts:21–34  ·  view source on GitHub ↗
(name: string, tokenAddress: string)

Source from the content-addressed store, hash-verified

19}
20
21function 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
36export function getCreate2Address(
37 factoryAddress: string,

Callers 1

getApprovalDigestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected