-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.go
56 lines (51 loc) · 1014 Bytes
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package zrx
import "github.com/ethereum/go-ethereum/signer/core"
// ZeroExTestChainID is the chain ID of the 0x ganache snapshot network
const ZeroExTestChainID = 1337
// TypeEIP712Domain is the name of the EIP-712 domain type
const TypeEIP712Domain = "EIP712Domain"
// TypeZeroExTransaction is the name of the 0x transaction type
const TypeZeroExTransaction = "ZeroExTransaction"
// EIP712Types are the EIP-712 type definitions for the relevant 0x types and domain
var EIP712Types = core.Types{
"EIP712Domain": {
{
Name: "name",
Type: "string",
},
{
Name: "version",
Type: "string",
},
{
Name: "chainId",
Type: "uint256",
},
{
Name: "verifyingContract",
Type: "address",
},
},
"ZeroExTransaction": {
{
Name: "salt",
Type: "uint256",
},
{
Name: "expirationTimeSeconds",
Type: "uint256",
},
{
Name: "gasPrice",
Type: "uint256",
},
{
Name: "signerAddress",
Type: "address",
},
{
Name: "data",
Type: "bytes",
},
},
}