viem 2.52.0 → 2.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/_cjs/account-abstraction/actions/bundler/estimateUserOperationGas.js +2 -0
- package/_cjs/account-abstraction/actions/bundler/estimateUserOperationGas.js.map +1 -1
- package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
- package/_cjs/chains/definitions/citrate.js +17 -0
- package/_cjs/chains/definitions/citrate.js.map +1 -0
- package/_cjs/chains/definitions/grav.js +24 -0
- package/_cjs/chains/definitions/grav.js.map +1 -0
- package/_cjs/chains/definitions/ladyChain.js +22 -0
- package/_cjs/chains/definitions/ladyChain.js.map +1 -0
- package/_cjs/chains/definitions/monad.js +5 -5
- package/_cjs/chains/definitions/monad.js.map +1 -1
- package/_cjs/chains/definitions/tempoModerato.js +1 -0
- package/_cjs/chains/definitions/tempoModerato.js.map +1 -1
- package/_cjs/chains/definitions/valygoNft.js +37 -0
- package/_cjs/chains/definitions/valygoNft.js.map +1 -0
- package/_cjs/chains/definitions/valygoSmartchain.js +37 -0
- package/_cjs/chains/definitions/valygoSmartchain.js.map +1 -0
- package/_cjs/chains/definitions/whitechainSepolia.js +31 -0
- package/_cjs/chains/definitions/whitechainSepolia.js.map +1 -0
- package/_cjs/chains/index.js +25 -13
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/tempo/Abis.js +1866 -1866
- package/_cjs/tempo/Abis.js.map +1 -1
- package/_cjs/tempo/Account.js +35 -3
- package/_cjs/tempo/Account.js.map +1 -1
- package/_cjs/tempo/Client.js +27 -0
- package/_cjs/tempo/Client.js.map +1 -0
- package/_cjs/tempo/Formatters.js +2 -1
- package/_cjs/tempo/Formatters.js.map +1 -1
- package/_cjs/tempo/Scopes.js +39 -0
- package/_cjs/tempo/Scopes.js.map +1 -0
- package/_cjs/tempo/Selectors.js +226 -0
- package/_cjs/tempo/Selectors.js.map +1 -0
- package/_cjs/tempo/Transaction.js +22 -0
- package/_cjs/tempo/Transaction.js.map +1 -1
- package/_cjs/tempo/chainConfig.js +10 -0
- package/_cjs/tempo/chainConfig.js.map +1 -1
- package/_cjs/tempo/index.js +14 -1
- package/_cjs/tempo/index.js.map +1 -1
- package/_esm/account-abstraction/actions/bundler/estimateUserOperationGas.js +2 -0
- package/_esm/account-abstraction/actions/bundler/estimateUserOperationGas.js.map +1 -1
- package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
- package/_esm/chains/definitions/citrate.js +14 -0
- package/_esm/chains/definitions/citrate.js.map +1 -0
- package/_esm/chains/definitions/grav.js +21 -0
- package/_esm/chains/definitions/grav.js.map +1 -0
- package/_esm/chains/definitions/ladyChain.js +19 -0
- package/_esm/chains/definitions/ladyChain.js.map +1 -0
- package/_esm/chains/definitions/monad.js +5 -5
- package/_esm/chains/definitions/monad.js.map +1 -1
- package/_esm/chains/definitions/tempoModerato.js +1 -0
- package/_esm/chains/definitions/tempoModerato.js.map +1 -1
- package/_esm/chains/definitions/valygoNft.js +34 -0
- package/_esm/chains/definitions/valygoNft.js.map +1 -0
- package/_esm/chains/definitions/valygoSmartchain.js +34 -0
- package/_esm/chains/definitions/valygoSmartchain.js.map +1 -0
- package/_esm/chains/definitions/whitechainSepolia.js +28 -0
- package/_esm/chains/definitions/whitechainSepolia.js.map +1 -0
- package/_esm/chains/index.js +6 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/tempo/Abis.js +1865 -1865
- package/_esm/tempo/Abis.js.map +1 -1
- package/_esm/tempo/Account.js +81 -4
- package/_esm/tempo/Account.js.map +1 -1
- package/_esm/tempo/Client.js +66 -0
- package/_esm/tempo/Client.js.map +1 -0
- package/_esm/tempo/Formatters.js +5 -1
- package/_esm/tempo/Formatters.js.map +1 -1
- package/_esm/tempo/Scopes.js +49 -0
- package/_esm/tempo/Scopes.js.map +1 -0
- package/_esm/tempo/Selectors.js +224 -0
- package/_esm/tempo/Selectors.js.map +1 -0
- package/_esm/tempo/Transaction.js +34 -0
- package/_esm/tempo/Transaction.js.map +1 -1
- package/_esm/tempo/chainConfig.js +24 -1
- package/_esm/tempo/chainConfig.js.map +1 -1
- package/_esm/tempo/index.js +10 -1
- package/_esm/tempo/index.js.map +1 -1
- package/_types/account-abstraction/actions/bundler/estimateUserOperationGas.d.ts.map +1 -1
- package/_types/actions/wallet/prepareTransactionRequest.d.ts +12 -1
- package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
- package/_types/chains/definitions/citrate.d.ts +57 -0
- package/_types/chains/definitions/citrate.d.ts.map +1 -0
- package/_types/chains/definitions/grav.d.ts +43 -0
- package/_types/chains/definitions/grav.d.ts.map +1 -0
- package/_types/chains/definitions/ladyChain.d.ts +50 -0
- package/_types/chains/definitions/ladyChain.d.ts.map +1 -0
- package/_types/chains/definitions/monad.d.ts +5 -5
- package/_types/chains/definitions/tempo.d.ts +36 -0
- package/_types/chains/definitions/tempo.d.ts.map +1 -1
- package/_types/chains/definitions/tempoDevnet.d.ts +36 -0
- package/_types/chains/definitions/tempoDevnet.d.ts.map +1 -1
- package/_types/chains/definitions/tempoLocalnet.d.ts +36 -0
- package/_types/chains/definitions/tempoLocalnet.d.ts.map +1 -1
- package/_types/chains/definitions/tempoModerato.d.ts +38 -0
- package/_types/chains/definitions/tempoModerato.d.ts.map +1 -1
- package/_types/chains/definitions/valygoNft.d.ts +48 -0
- package/_types/chains/definitions/valygoNft.d.ts.map +1 -0
- package/_types/chains/definitions/valygoSmartchain.d.ts +48 -0
- package/_types/chains/definitions/valygoSmartchain.d.ts.map +1 -0
- package/_types/chains/definitions/whitechainSepolia.d.ts +46 -0
- package/_types/chains/definitions/whitechainSepolia.d.ts.map +1 -0
- package/_types/chains/index.d.ts +6 -0
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/tempo/Abis.d.ts +5816 -5816
- package/_types/tempo/Abis.d.ts.map +1 -1
- package/_types/tempo/Account.d.ts +48 -1
- package/_types/tempo/Account.d.ts.map +1 -1
- package/_types/tempo/Client.d.ts +98 -0
- package/_types/tempo/Client.d.ts.map +1 -0
- package/_types/tempo/Formatters.d.ts.map +1 -1
- package/_types/tempo/Scopes.d.ts +48 -0
- package/_types/tempo/Scopes.d.ts.map +1 -0
- package/_types/tempo/Selectors.d.ts +223 -0
- package/_types/tempo/Selectors.d.ts.map +1 -0
- package/_types/tempo/Transaction.d.ts +5 -1
- package/_types/tempo/Transaction.d.ts.map +1 -1
- package/_types/tempo/chainConfig.d.ts +34 -15
- package/_types/tempo/chainConfig.d.ts.map +1 -1
- package/_types/tempo/index.d.ts +10 -1
- package/_types/tempo/index.d.ts.map +1 -1
- package/_types/tempo/zones/zone.d.ts +108 -0
- package/_types/tempo/zones/zone.d.ts.map +1 -1
- package/account-abstraction/actions/bundler/estimateUserOperationGas.ts +2 -0
- package/actions/wallet/prepareTransactionRequest.ts +40 -5
- package/chains/definitions/citrate.ts +14 -0
- package/chains/definitions/grav.ts +21 -0
- package/chains/definitions/ladyChain.ts +19 -0
- package/chains/definitions/monad.ts +5 -5
- package/chains/definitions/tempoModerato.ts +1 -0
- package/chains/definitions/valygoNft.ts +34 -0
- package/chains/definitions/valygoSmartchain.ts +34 -0
- package/chains/definitions/whitechainSepolia.ts +28 -0
- package/chains/index.ts +6 -0
- package/errors/version.ts +1 -1
- package/package.json +3 -4
- package/tempo/Abis.ts +1869 -1869
- package/tempo/Account.ts +97 -4
- package/tempo/Client.ts +172 -0
- package/tempo/Formatters.ts +12 -1
- package/tempo/Scopes.ts +124 -0
- package/tempo/Selectors.ts +260 -0
- package/tempo/Transaction.ts +42 -0
- package/tempo/chainConfig.ts +32 -3
- package/tempo/index.ts +35 -0
package/_esm/tempo/Abis.js
CHANGED
|
@@ -1,2767 +1,2564 @@
|
|
|
1
1
|
// Generated with `pnpm gen:abis`. Do not modify manually.
|
|
2
|
-
export const
|
|
3
|
-
{
|
|
4
|
-
name: 'CLOSE_GRACE_PERIOD',
|
|
5
|
-
type: 'function',
|
|
6
|
-
stateMutability: 'view',
|
|
7
|
-
inputs: [],
|
|
8
|
-
outputs: [{ type: 'uint64' }],
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
name: 'VOUCHER_TYPEHASH',
|
|
12
|
-
type: 'function',
|
|
13
|
-
stateMutability: 'view',
|
|
14
|
-
inputs: [],
|
|
15
|
-
outputs: [{ type: 'bytes32' }],
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: 'open',
|
|
19
|
-
type: 'function',
|
|
20
|
-
stateMutability: 'nonpayable',
|
|
21
|
-
inputs: [
|
|
22
|
-
{ type: 'address', name: 'payee' },
|
|
23
|
-
{ type: 'address', name: 'operator' },
|
|
24
|
-
{ type: 'address', name: 'token' },
|
|
25
|
-
{ type: 'uint96', name: 'deposit' },
|
|
26
|
-
{ type: 'bytes32', name: 'salt' },
|
|
27
|
-
{ type: 'address', name: 'authorizedSigner' },
|
|
28
|
-
],
|
|
29
|
-
outputs: [{ type: 'bytes32', name: 'channelId' }],
|
|
30
|
-
},
|
|
2
|
+
export const accountKeychain = [
|
|
31
3
|
{
|
|
32
|
-
name: '
|
|
4
|
+
name: 'authorizeKey',
|
|
33
5
|
type: 'function',
|
|
34
6
|
stateMutability: 'nonpayable',
|
|
35
7
|
inputs: [
|
|
8
|
+
{ type: 'address', name: 'keyId' },
|
|
9
|
+
{ type: 'uint8', name: 'signatureType' },
|
|
10
|
+
{ type: 'uint64', name: 'expiry' },
|
|
11
|
+
{ type: 'bool', name: 'enforceLimits' },
|
|
36
12
|
{
|
|
37
|
-
type: 'tuple',
|
|
38
|
-
name: '
|
|
13
|
+
type: 'tuple[]',
|
|
14
|
+
name: 'limits',
|
|
39
15
|
components: [
|
|
40
|
-
{ type: 'address', name: 'payer' },
|
|
41
|
-
{ type: 'address', name: 'payee' },
|
|
42
|
-
{ type: 'address', name: 'operator' },
|
|
43
16
|
{ type: 'address', name: 'token' },
|
|
44
|
-
{ type: '
|
|
45
|
-
{ type: 'address', name: 'authorizedSigner' },
|
|
46
|
-
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
17
|
+
{ type: 'uint256', name: 'amount' },
|
|
47
18
|
],
|
|
48
19
|
},
|
|
49
|
-
{ type: 'uint96', name: 'cumulativeAmount' },
|
|
50
|
-
{ type: 'bytes', name: 'signature' },
|
|
51
20
|
],
|
|
52
21
|
outputs: [],
|
|
53
22
|
},
|
|
54
23
|
{
|
|
55
|
-
name: '
|
|
24
|
+
name: 'authorizeKey',
|
|
56
25
|
type: 'function',
|
|
57
26
|
stateMutability: 'nonpayable',
|
|
58
27
|
inputs: [
|
|
28
|
+
{ type: 'address', name: 'keyId' },
|
|
29
|
+
{ type: 'uint8', name: 'signatureType' },
|
|
59
30
|
{
|
|
60
31
|
type: 'tuple',
|
|
61
|
-
name: '
|
|
32
|
+
name: 'config',
|
|
62
33
|
components: [
|
|
63
|
-
{ type: '
|
|
64
|
-
{ type: '
|
|
65
|
-
{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
34
|
+
{ type: 'uint64', name: 'expiry' },
|
|
35
|
+
{ type: 'bool', name: 'enforceLimits' },
|
|
36
|
+
{
|
|
37
|
+
type: 'tuple[]',
|
|
38
|
+
name: 'limits',
|
|
39
|
+
components: [
|
|
40
|
+
{ type: 'address', name: 'token' },
|
|
41
|
+
{ type: 'uint256', name: 'amount' },
|
|
42
|
+
{ type: 'uint64', name: 'period' },
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
{ type: 'bool', name: 'allowAnyCalls' },
|
|
46
|
+
{
|
|
47
|
+
type: 'tuple[]',
|
|
48
|
+
name: 'allowedCalls',
|
|
49
|
+
components: [
|
|
50
|
+
{ type: 'address', name: 'target' },
|
|
51
|
+
{
|
|
52
|
+
type: 'tuple[]',
|
|
53
|
+
name: 'selectorRules',
|
|
54
|
+
components: [
|
|
55
|
+
{ type: 'bytes4', name: 'selector' },
|
|
56
|
+
{ type: 'address[]', name: 'recipients' },
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
70
61
|
],
|
|
71
62
|
},
|
|
72
|
-
{ type: 'uint96', name: 'additionalDeposit' },
|
|
73
63
|
],
|
|
74
64
|
outputs: [],
|
|
75
65
|
},
|
|
76
66
|
{
|
|
77
|
-
name: '
|
|
67
|
+
name: 'authorizeKey',
|
|
78
68
|
type: 'function',
|
|
79
69
|
stateMutability: 'nonpayable',
|
|
80
70
|
inputs: [
|
|
71
|
+
{ type: 'address', name: 'keyId' },
|
|
72
|
+
{ type: 'uint8', name: 'signatureType' },
|
|
81
73
|
{
|
|
82
74
|
type: 'tuple',
|
|
83
|
-
name: '
|
|
75
|
+
name: 'config',
|
|
84
76
|
components: [
|
|
85
|
-
{ type: '
|
|
86
|
-
{ type: '
|
|
87
|
-
{
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
77
|
+
{ type: 'uint64', name: 'expiry' },
|
|
78
|
+
{ type: 'bool', name: 'enforceLimits' },
|
|
79
|
+
{
|
|
80
|
+
type: 'tuple[]',
|
|
81
|
+
name: 'limits',
|
|
82
|
+
components: [
|
|
83
|
+
{ type: 'address', name: 'token' },
|
|
84
|
+
{ type: 'uint256', name: 'amount' },
|
|
85
|
+
{ type: 'uint64', name: 'period' },
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
{ type: 'bool', name: 'allowAnyCalls' },
|
|
89
|
+
{
|
|
90
|
+
type: 'tuple[]',
|
|
91
|
+
name: 'allowedCalls',
|
|
92
|
+
components: [
|
|
93
|
+
{ type: 'address', name: 'target' },
|
|
94
|
+
{
|
|
95
|
+
type: 'tuple[]',
|
|
96
|
+
name: 'selectorRules',
|
|
97
|
+
components: [
|
|
98
|
+
{ type: 'bytes4', name: 'selector' },
|
|
99
|
+
{ type: 'address[]', name: 'recipients' },
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
},
|
|
92
104
|
],
|
|
93
105
|
},
|
|
94
|
-
{ type: '
|
|
95
|
-
{ type: 'uint96', name: 'captureAmount' },
|
|
96
|
-
{ type: 'bytes', name: 'signature' },
|
|
106
|
+
{ type: 'bytes32', name: 'witness' },
|
|
97
107
|
],
|
|
98
108
|
outputs: [],
|
|
99
109
|
},
|
|
100
110
|
{
|
|
101
|
-
name: '
|
|
111
|
+
name: 'authorizeAdminKey',
|
|
102
112
|
type: 'function',
|
|
103
113
|
stateMutability: 'nonpayable',
|
|
104
114
|
inputs: [
|
|
105
|
-
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
components: [
|
|
109
|
-
{ type: 'address', name: 'payer' },
|
|
110
|
-
{ type: 'address', name: 'payee' },
|
|
111
|
-
{ type: 'address', name: 'operator' },
|
|
112
|
-
{ type: 'address', name: 'token' },
|
|
113
|
-
{ type: 'bytes32', name: 'salt' },
|
|
114
|
-
{ type: 'address', name: 'authorizedSigner' },
|
|
115
|
-
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
116
|
-
],
|
|
117
|
-
},
|
|
115
|
+
{ type: 'address', name: 'keyId' },
|
|
116
|
+
{ type: 'uint8', name: 'signatureType' },
|
|
117
|
+
{ type: 'bytes32', name: 'witness' },
|
|
118
118
|
],
|
|
119
119
|
outputs: [],
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
|
-
name: '
|
|
122
|
+
name: 'burnKeyAuthorizationWitness',
|
|
123
|
+
type: 'function',
|
|
124
|
+
stateMutability: 'nonpayable',
|
|
125
|
+
inputs: [{ type: 'bytes32', name: 'witness' }],
|
|
126
|
+
outputs: [],
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: 'revokeKey',
|
|
130
|
+
type: 'function',
|
|
131
|
+
stateMutability: 'nonpayable',
|
|
132
|
+
inputs: [{ type: 'address', name: 'keyId' }],
|
|
133
|
+
outputs: [],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'updateSpendingLimit',
|
|
123
137
|
type: 'function',
|
|
124
138
|
stateMutability: 'nonpayable',
|
|
125
139
|
inputs: [
|
|
126
|
-
{
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
components: [
|
|
130
|
-
{ type: 'address', name: 'payer' },
|
|
131
|
-
{ type: 'address', name: 'payee' },
|
|
132
|
-
{ type: 'address', name: 'operator' },
|
|
133
|
-
{ type: 'address', name: 'token' },
|
|
134
|
-
{ type: 'bytes32', name: 'salt' },
|
|
135
|
-
{ type: 'address', name: 'authorizedSigner' },
|
|
136
|
-
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
137
|
-
],
|
|
138
|
-
},
|
|
140
|
+
{ type: 'address', name: 'keyId' },
|
|
141
|
+
{ type: 'address', name: 'token' },
|
|
142
|
+
{ type: 'uint256', name: 'newLimit' },
|
|
139
143
|
],
|
|
140
144
|
outputs: [],
|
|
141
145
|
},
|
|
142
146
|
{
|
|
143
|
-
name: '
|
|
147
|
+
name: 'setAllowedCalls',
|
|
144
148
|
type: 'function',
|
|
145
|
-
stateMutability: '
|
|
149
|
+
stateMutability: 'nonpayable',
|
|
146
150
|
inputs: [
|
|
151
|
+
{ type: 'address', name: 'keyId' },
|
|
147
152
|
{
|
|
148
|
-
type: 'tuple',
|
|
149
|
-
name: '
|
|
150
|
-
components: [
|
|
151
|
-
{ type: 'address', name: 'payer' },
|
|
152
|
-
{ type: 'address', name: 'payee' },
|
|
153
|
-
{ type: 'address', name: 'operator' },
|
|
154
|
-
{ type: 'address', name: 'token' },
|
|
155
|
-
{ type: 'bytes32', name: 'salt' },
|
|
156
|
-
{ type: 'address', name: 'authorizedSigner' },
|
|
157
|
-
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
158
|
-
],
|
|
159
|
-
},
|
|
160
|
-
],
|
|
161
|
-
outputs: [
|
|
162
|
-
{
|
|
163
|
-
type: 'tuple',
|
|
153
|
+
type: 'tuple[]',
|
|
154
|
+
name: 'scopes',
|
|
164
155
|
components: [
|
|
156
|
+
{ type: 'address', name: 'target' },
|
|
165
157
|
{
|
|
166
|
-
type: 'tuple',
|
|
167
|
-
name: '
|
|
168
|
-
components: [
|
|
169
|
-
{ type: 'address', name: 'payer' },
|
|
170
|
-
{ type: 'address', name: 'payee' },
|
|
171
|
-
{ type: 'address', name: 'operator' },
|
|
172
|
-
{ type: 'address', name: 'token' },
|
|
173
|
-
{ type: 'bytes32', name: 'salt' },
|
|
174
|
-
{ type: 'address', name: 'authorizedSigner' },
|
|
175
|
-
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
176
|
-
],
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
type: 'tuple',
|
|
180
|
-
name: 'state',
|
|
158
|
+
type: 'tuple[]',
|
|
159
|
+
name: 'selectorRules',
|
|
181
160
|
components: [
|
|
182
|
-
{ type: '
|
|
183
|
-
{ type: '
|
|
184
|
-
{ type: 'uint32', name: 'closeRequestedAt' },
|
|
161
|
+
{ type: 'bytes4', name: 'selector' },
|
|
162
|
+
{ type: 'address[]', name: 'recipients' },
|
|
185
163
|
],
|
|
186
164
|
},
|
|
187
165
|
],
|
|
188
166
|
},
|
|
189
167
|
],
|
|
168
|
+
outputs: [],
|
|
190
169
|
},
|
|
191
170
|
{
|
|
192
|
-
name: '
|
|
171
|
+
name: 'removeAllowedCalls',
|
|
172
|
+
type: 'function',
|
|
173
|
+
stateMutability: 'nonpayable',
|
|
174
|
+
inputs: [
|
|
175
|
+
{ type: 'address', name: 'keyId' },
|
|
176
|
+
{ type: 'address', name: 'target' },
|
|
177
|
+
],
|
|
178
|
+
outputs: [],
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: 'getKey',
|
|
193
182
|
type: 'function',
|
|
194
183
|
stateMutability: 'view',
|
|
195
|
-
inputs: [
|
|
184
|
+
inputs: [
|
|
185
|
+
{ type: 'address', name: 'account' },
|
|
186
|
+
{ type: 'address', name: 'keyId' },
|
|
187
|
+
],
|
|
196
188
|
outputs: [
|
|
197
189
|
{
|
|
198
190
|
type: 'tuple',
|
|
199
191
|
components: [
|
|
200
|
-
{ type: '
|
|
201
|
-
{ type: '
|
|
202
|
-
{ type: '
|
|
192
|
+
{ type: 'uint8', name: 'signatureType' },
|
|
193
|
+
{ type: 'address', name: 'keyId' },
|
|
194
|
+
{ type: 'uint64', name: 'expiry' },
|
|
195
|
+
{ type: 'bool', name: 'enforceLimits' },
|
|
196
|
+
{ type: 'bool', name: 'isRevoked' },
|
|
203
197
|
],
|
|
204
198
|
},
|
|
205
199
|
],
|
|
206
200
|
},
|
|
207
201
|
{
|
|
208
|
-
name: '
|
|
202
|
+
name: 'getRemainingLimit',
|
|
209
203
|
type: 'function',
|
|
210
204
|
stateMutability: 'view',
|
|
211
|
-
inputs: [
|
|
205
|
+
inputs: [
|
|
206
|
+
{ type: 'address', name: 'account' },
|
|
207
|
+
{ type: 'address', name: 'keyId' },
|
|
208
|
+
{ type: 'address', name: 'token' },
|
|
209
|
+
],
|
|
210
|
+
outputs: [{ type: 'uint256', name: 'remaining' }],
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: 'getRemainingLimitWithPeriod',
|
|
214
|
+
type: 'function',
|
|
215
|
+
stateMutability: 'view',
|
|
216
|
+
inputs: [
|
|
217
|
+
{ type: 'address', name: 'account' },
|
|
218
|
+
{ type: 'address', name: 'keyId' },
|
|
219
|
+
{ type: 'address', name: 'token' },
|
|
220
|
+
],
|
|
221
|
+
outputs: [
|
|
222
|
+
{ type: 'uint256', name: 'remaining' },
|
|
223
|
+
{ type: 'uint64', name: 'periodEnd' },
|
|
224
|
+
],
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: 'getAllowedCalls',
|
|
228
|
+
type: 'function',
|
|
229
|
+
stateMutability: 'view',
|
|
230
|
+
inputs: [
|
|
231
|
+
{ type: 'address', name: 'account' },
|
|
232
|
+
{ type: 'address', name: 'keyId' },
|
|
233
|
+
],
|
|
212
234
|
outputs: [
|
|
235
|
+
{ type: 'bool', name: 'isScoped' },
|
|
213
236
|
{
|
|
214
237
|
type: 'tuple[]',
|
|
238
|
+
name: 'scopes',
|
|
215
239
|
components: [
|
|
216
|
-
{ type: '
|
|
217
|
-
{
|
|
218
|
-
|
|
240
|
+
{ type: 'address', name: 'target' },
|
|
241
|
+
{
|
|
242
|
+
type: 'tuple[]',
|
|
243
|
+
name: 'selectorRules',
|
|
244
|
+
components: [
|
|
245
|
+
{ type: 'bytes4', name: 'selector' },
|
|
246
|
+
{ type: 'address[]', name: 'recipients' },
|
|
247
|
+
],
|
|
248
|
+
},
|
|
219
249
|
],
|
|
220
250
|
},
|
|
221
251
|
],
|
|
222
252
|
},
|
|
223
253
|
{
|
|
224
|
-
name: '
|
|
254
|
+
name: 'isKeyAuthorizationWitnessBurned',
|
|
225
255
|
type: 'function',
|
|
226
256
|
stateMutability: 'view',
|
|
227
257
|
inputs: [
|
|
228
|
-
{ type: 'address', name: '
|
|
229
|
-
{ type: '
|
|
230
|
-
{ type: 'address', name: 'operator' },
|
|
231
|
-
{ type: 'address', name: 'token' },
|
|
232
|
-
{ type: 'bytes32', name: 'salt' },
|
|
233
|
-
{ type: 'address', name: 'authorizedSigner' },
|
|
234
|
-
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
258
|
+
{ type: 'address', name: 'account' },
|
|
259
|
+
{ type: 'bytes32', name: 'witness' },
|
|
235
260
|
],
|
|
236
|
-
outputs: [{ type: '
|
|
261
|
+
outputs: [{ type: 'bool' }],
|
|
237
262
|
},
|
|
238
263
|
{
|
|
239
|
-
name: '
|
|
264
|
+
name: 'isAdminKey',
|
|
240
265
|
type: 'function',
|
|
241
266
|
stateMutability: 'view',
|
|
242
267
|
inputs: [
|
|
243
|
-
{ type: '
|
|
244
|
-
{ type: '
|
|
268
|
+
{ type: 'address', name: 'account' },
|
|
269
|
+
{ type: 'address', name: 'keyId' },
|
|
245
270
|
],
|
|
246
|
-
outputs: [{ type: '
|
|
271
|
+
outputs: [{ type: 'bool' }],
|
|
247
272
|
},
|
|
248
273
|
{
|
|
249
|
-
name: '
|
|
274
|
+
name: 'getTransactionKey',
|
|
250
275
|
type: 'function',
|
|
251
276
|
stateMutability: 'view',
|
|
252
277
|
inputs: [],
|
|
253
|
-
outputs: [{ type: '
|
|
278
|
+
outputs: [{ type: 'address' }],
|
|
254
279
|
},
|
|
255
280
|
{
|
|
256
|
-
name: '
|
|
281
|
+
name: 'KeyAuthorized',
|
|
257
282
|
type: 'event',
|
|
258
283
|
inputs: [
|
|
259
|
-
{ type: '
|
|
260
|
-
{ type: 'address', name: '
|
|
261
|
-
{ type: '
|
|
262
|
-
{ type: '
|
|
263
|
-
{ type: 'address', name: 'token' },
|
|
264
|
-
{ type: 'address', name: 'authorizedSigner' },
|
|
265
|
-
{ type: 'bytes32', name: 'salt' },
|
|
266
|
-
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
267
|
-
{ type: 'uint96', name: 'deposit' },
|
|
284
|
+
{ type: 'address', name: 'account', indexed: true },
|
|
285
|
+
{ type: 'address', name: 'publicKey', indexed: true },
|
|
286
|
+
{ type: 'uint8', name: 'signatureType' },
|
|
287
|
+
{ type: 'uint64', name: 'expiry' },
|
|
268
288
|
],
|
|
269
289
|
},
|
|
270
290
|
{
|
|
271
|
-
name: '
|
|
291
|
+
name: 'AdminKeyAuthorized',
|
|
272
292
|
type: 'event',
|
|
273
293
|
inputs: [
|
|
274
|
-
{ type: '
|
|
275
|
-
{ type: 'address', name: '
|
|
276
|
-
{ type: 'address', name: 'payee', indexed: true },
|
|
277
|
-
{ type: 'uint96', name: 'cumulativeAmount' },
|
|
278
|
-
{ type: 'uint96', name: 'deltaPaid' },
|
|
279
|
-
{ type: 'uint96', name: 'newSettled' },
|
|
294
|
+
{ type: 'address', name: 'account', indexed: true },
|
|
295
|
+
{ type: 'address', name: 'publicKey', indexed: true },
|
|
280
296
|
],
|
|
281
297
|
},
|
|
282
298
|
{
|
|
283
|
-
name: '
|
|
299
|
+
name: 'KeyRevoked',
|
|
284
300
|
type: 'event',
|
|
285
301
|
inputs: [
|
|
286
|
-
{ type: '
|
|
287
|
-
{ type: 'address', name: '
|
|
288
|
-
{ type: 'address', name: 'payee', indexed: true },
|
|
289
|
-
{ type: 'uint96', name: 'additionalDeposit' },
|
|
290
|
-
{ type: 'uint96', name: 'newDeposit' },
|
|
302
|
+
{ type: 'address', name: 'account', indexed: true },
|
|
303
|
+
{ type: 'address', name: 'publicKey', indexed: true },
|
|
291
304
|
],
|
|
292
305
|
},
|
|
293
306
|
{
|
|
294
|
-
name: '
|
|
307
|
+
name: 'SpendingLimitUpdated',
|
|
295
308
|
type: 'event',
|
|
296
309
|
inputs: [
|
|
297
|
-
{ type: '
|
|
298
|
-
{ type: 'address', name: '
|
|
299
|
-
{ type: 'address', name: '
|
|
300
|
-
{ type: 'uint256', name: '
|
|
310
|
+
{ type: 'address', name: 'account', indexed: true },
|
|
311
|
+
{ type: 'address', name: 'publicKey', indexed: true },
|
|
312
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
313
|
+
{ type: 'uint256', name: 'newLimit' },
|
|
301
314
|
],
|
|
302
315
|
},
|
|
303
316
|
{
|
|
304
|
-
name: '
|
|
317
|
+
name: 'AccessKeySpend',
|
|
305
318
|
type: 'event',
|
|
306
319
|
inputs: [
|
|
307
|
-
{ type: '
|
|
308
|
-
{ type: 'address', name: '
|
|
309
|
-
{ type: 'address', name: '
|
|
310
|
-
{ type: '
|
|
311
|
-
{ type: '
|
|
320
|
+
{ type: 'address', name: 'account', indexed: true },
|
|
321
|
+
{ type: 'address', name: 'publicKey', indexed: true },
|
|
322
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
323
|
+
{ type: 'uint256', name: 'amount' },
|
|
324
|
+
{ type: 'uint256', name: 'remainingLimit' },
|
|
312
325
|
],
|
|
313
326
|
},
|
|
314
327
|
{
|
|
315
|
-
name: '
|
|
328
|
+
name: 'KeyAuthorizationWitness',
|
|
316
329
|
type: 'event',
|
|
317
330
|
inputs: [
|
|
318
|
-
{ type: '
|
|
319
|
-
{ type: '
|
|
320
|
-
{ type: 'address', name: 'payee', indexed: true },
|
|
331
|
+
{ type: 'address', name: 'account', indexed: true },
|
|
332
|
+
{ type: 'bytes32', name: 'witness', indexed: true },
|
|
321
333
|
],
|
|
322
334
|
},
|
|
323
|
-
{ name: 'ChannelAlreadyExists', type: 'error', inputs: [] },
|
|
324
|
-
{ name: 'ChannelNotFound', type: 'error', inputs: [] },
|
|
325
|
-
{ name: 'NotPayer', type: 'error', inputs: [] },
|
|
326
|
-
{ name: 'NotPayeeOrOperator', type: 'error', inputs: [] },
|
|
327
|
-
{ name: 'InvalidPayee', type: 'error', inputs: [] },
|
|
328
|
-
{ name: 'ZeroDeposit', type: 'error', inputs: [] },
|
|
329
|
-
{ name: 'ExpiringNonceHashNotSet', type: 'error', inputs: [] },
|
|
330
|
-
{ name: 'InvalidSignature', type: 'error', inputs: [] },
|
|
331
|
-
{ name: 'AmountExceedsDeposit', type: 'error', inputs: [] },
|
|
332
|
-
{ name: 'AmountNotIncreasing', type: 'error', inputs: [] },
|
|
333
|
-
{ name: 'CaptureAmountInvalid', type: 'error', inputs: [] },
|
|
334
|
-
{ name: 'CloseNotReady', type: 'error', inputs: [] },
|
|
335
|
-
{ name: 'DepositOverflow', type: 'error', inputs: [] },
|
|
336
|
-
];
|
|
337
|
-
export const tip20 = [
|
|
338
335
|
{
|
|
339
|
-
name: '
|
|
340
|
-
type: '
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
336
|
+
name: 'KeyAuthorizationWitnessBurned',
|
|
337
|
+
type: 'event',
|
|
338
|
+
inputs: [
|
|
339
|
+
{ type: 'address', name: 'account', indexed: true },
|
|
340
|
+
{ type: 'bytes32', name: 'witness', indexed: true },
|
|
341
|
+
],
|
|
344
342
|
},
|
|
343
|
+
{ name: 'UnauthorizedCaller', type: 'error', inputs: [] },
|
|
344
|
+
{ name: 'KeyAlreadyExists', type: 'error', inputs: [] },
|
|
345
|
+
{ name: 'KeyNotFound', type: 'error', inputs: [] },
|
|
346
|
+
{ name: 'KeyExpired', type: 'error', inputs: [] },
|
|
347
|
+
{ name: 'SpendingLimitExceeded', type: 'error', inputs: [] },
|
|
348
|
+
{ name: 'InvalidSpendingLimit', type: 'error', inputs: [] },
|
|
349
|
+
{ name: 'InvalidSignatureType', type: 'error', inputs: [] },
|
|
350
|
+
{ name: 'ZeroPublicKey', type: 'error', inputs: [] },
|
|
351
|
+
{ name: 'ExpiryInPast', type: 'error', inputs: [] },
|
|
352
|
+
{ name: 'KeyAlreadyRevoked', type: 'error', inputs: [] },
|
|
345
353
|
{
|
|
346
|
-
name: '
|
|
347
|
-
type: '
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
354
|
+
name: 'SignatureTypeMismatch',
|
|
355
|
+
type: 'error',
|
|
356
|
+
inputs: [
|
|
357
|
+
{ type: 'uint8', name: 'expected' },
|
|
358
|
+
{ type: 'uint8', name: 'actual' },
|
|
359
|
+
],
|
|
351
360
|
},
|
|
361
|
+
{ name: 'CallNotAllowed', type: 'error', inputs: [] },
|
|
362
|
+
{ name: 'InvalidCallScope', type: 'error', inputs: [] },
|
|
363
|
+
{ name: 'InvalidKeyId', type: 'error', inputs: [] },
|
|
364
|
+
{ name: 'InvalidKeyAuthorizationWitness', type: 'error', inputs: [] },
|
|
365
|
+
{ name: 'KeyAuthorizationWitnessAlreadyBurned', type: 'error', inputs: [] },
|
|
352
366
|
{
|
|
353
|
-
name: '
|
|
354
|
-
type: '
|
|
355
|
-
|
|
356
|
-
inputs: [],
|
|
357
|
-
outputs: [{ type: 'uint8' }],
|
|
367
|
+
name: 'LegacyAuthorizeKeySelectorChanged',
|
|
368
|
+
type: 'error',
|
|
369
|
+
inputs: [{ type: 'bytes4', name: 'newSelector' }],
|
|
358
370
|
},
|
|
371
|
+
];
|
|
372
|
+
export const addressRegistry = [
|
|
359
373
|
{
|
|
360
|
-
name: '
|
|
374
|
+
name: 'registerVirtualMaster',
|
|
361
375
|
type: 'function',
|
|
362
|
-
stateMutability: '
|
|
363
|
-
inputs: [],
|
|
364
|
-
outputs: [{ type: '
|
|
376
|
+
stateMutability: 'nonpayable',
|
|
377
|
+
inputs: [{ type: 'bytes32', name: 'salt' }],
|
|
378
|
+
outputs: [{ type: 'bytes4', name: 'masterId' }],
|
|
365
379
|
},
|
|
366
380
|
{
|
|
367
|
-
name: '
|
|
381
|
+
name: 'getMaster',
|
|
368
382
|
type: 'function',
|
|
369
383
|
stateMutability: 'view',
|
|
370
|
-
inputs: [],
|
|
384
|
+
inputs: [{ type: 'bytes4', name: 'masterId' }],
|
|
371
385
|
outputs: [{ type: 'address' }],
|
|
372
386
|
},
|
|
373
387
|
{
|
|
374
|
-
name: '
|
|
388
|
+
name: 'resolveRecipient',
|
|
375
389
|
type: 'function',
|
|
376
390
|
stateMutability: 'view',
|
|
377
|
-
inputs: [],
|
|
378
|
-
outputs: [{ type: 'address' }],
|
|
391
|
+
inputs: [{ type: 'address', name: 'to' }],
|
|
392
|
+
outputs: [{ type: 'address', name: 'effectiveRecipient' }],
|
|
379
393
|
},
|
|
380
394
|
{
|
|
381
|
-
name: '
|
|
395
|
+
name: 'resolveVirtualAddress',
|
|
382
396
|
type: 'function',
|
|
383
397
|
stateMutability: 'view',
|
|
384
|
-
inputs: [{ type: 'address', name: '
|
|
385
|
-
outputs: [{ type: '
|
|
398
|
+
inputs: [{ type: 'address', name: 'virtualAddr' }],
|
|
399
|
+
outputs: [{ type: 'address', name: 'master' }],
|
|
386
400
|
},
|
|
387
401
|
{
|
|
388
|
-
name: '
|
|
402
|
+
name: 'isVirtualAddress',
|
|
389
403
|
type: 'function',
|
|
390
|
-
stateMutability: '
|
|
391
|
-
inputs: [
|
|
392
|
-
{ type: 'address', name: 'to' },
|
|
393
|
-
{ type: 'uint256', name: 'amount' },
|
|
394
|
-
],
|
|
404
|
+
stateMutability: 'pure',
|
|
405
|
+
inputs: [{ type: 'address', name: 'addr' }],
|
|
395
406
|
outputs: [{ type: 'bool' }],
|
|
396
407
|
},
|
|
397
408
|
{
|
|
398
|
-
name: '
|
|
409
|
+
name: 'decodeVirtualAddress',
|
|
399
410
|
type: 'function',
|
|
400
|
-
stateMutability: '
|
|
401
|
-
inputs: [
|
|
402
|
-
|
|
403
|
-
{ type: '
|
|
411
|
+
stateMutability: 'pure',
|
|
412
|
+
inputs: [{ type: 'address', name: 'addr' }],
|
|
413
|
+
outputs: [
|
|
414
|
+
{ type: 'bool', name: 'isVirtual' },
|
|
415
|
+
{ type: 'bytes4', name: 'masterId' },
|
|
416
|
+
{ type: 'bytes6', name: 'userTag' },
|
|
404
417
|
],
|
|
405
|
-
outputs: [{ type: 'bool' }],
|
|
406
418
|
},
|
|
407
419
|
{
|
|
408
|
-
name: '
|
|
420
|
+
name: 'isImplicitlyApproved',
|
|
409
421
|
type: 'function',
|
|
410
422
|
stateMutability: 'view',
|
|
423
|
+
inputs: [{ type: 'address', name: 'addr' }],
|
|
424
|
+
outputs: [{ type: 'bool' }],
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
name: 'MasterRegistered',
|
|
428
|
+
type: 'event',
|
|
411
429
|
inputs: [
|
|
412
|
-
{ type: '
|
|
413
|
-
{ type: 'address', name: '
|
|
430
|
+
{ type: 'bytes4', name: 'masterId', indexed: true },
|
|
431
|
+
{ type: 'address', name: 'masterAddress', indexed: true },
|
|
414
432
|
],
|
|
415
|
-
outputs: [{ type: 'uint256' }],
|
|
416
433
|
},
|
|
417
434
|
{
|
|
418
|
-
name: '
|
|
435
|
+
name: 'MasterIdCollision',
|
|
436
|
+
type: 'error',
|
|
437
|
+
inputs: [{ type: 'address', name: 'master' }],
|
|
438
|
+
},
|
|
439
|
+
{ name: 'InvalidMasterAddress', type: 'error', inputs: [] },
|
|
440
|
+
{ name: 'ProofOfWorkFailed', type: 'error', inputs: [] },
|
|
441
|
+
{ name: 'VirtualAddressUnregistered', type: 'error', inputs: [] },
|
|
442
|
+
];
|
|
443
|
+
export const nonce = [
|
|
444
|
+
{
|
|
445
|
+
name: 'getNonce',
|
|
419
446
|
type: 'function',
|
|
420
|
-
stateMutability: '
|
|
447
|
+
stateMutability: 'view',
|
|
421
448
|
inputs: [
|
|
422
|
-
{ type: 'address', name: '
|
|
423
|
-
{ type: '
|
|
424
|
-
{ type: 'uint256', name: 'amount' },
|
|
449
|
+
{ type: 'address', name: 'account' },
|
|
450
|
+
{ type: 'uint256', name: 'nonceKey' },
|
|
425
451
|
],
|
|
426
|
-
outputs: [{ type: '
|
|
452
|
+
outputs: [{ type: 'uint64', name: 'nonce' }],
|
|
427
453
|
},
|
|
428
454
|
{
|
|
429
|
-
name: '
|
|
455
|
+
name: 'NonceIncremented',
|
|
456
|
+
type: 'event',
|
|
457
|
+
inputs: [
|
|
458
|
+
{ type: 'address', name: 'account', indexed: true },
|
|
459
|
+
{ type: 'uint256', name: 'nonceKey', indexed: true },
|
|
460
|
+
{ type: 'uint64', name: 'newNonce' },
|
|
461
|
+
],
|
|
462
|
+
},
|
|
463
|
+
{ name: 'ProtocolNonceNotSupported', type: 'error', inputs: [] },
|
|
464
|
+
{ name: 'InvalidNonceKey', type: 'error', inputs: [] },
|
|
465
|
+
{ name: 'NonceOverflow', type: 'error', inputs: [] },
|
|
466
|
+
{ name: 'ExpiringNonceReplay', type: 'error', inputs: [] },
|
|
467
|
+
{ name: 'ExpiringNonceSetFull', type: 'error', inputs: [] },
|
|
468
|
+
{ name: 'InvalidExpiringNonceExpiry', type: 'error', inputs: [] },
|
|
469
|
+
];
|
|
470
|
+
export const receivePolicyGuard = [
|
|
471
|
+
{
|
|
472
|
+
name: 'balanceOf',
|
|
473
|
+
type: 'function',
|
|
474
|
+
stateMutability: 'view',
|
|
475
|
+
inputs: [{ type: 'bytes', name: 'receipt' }],
|
|
476
|
+
outputs: [{ type: 'uint256', name: 'amount' }],
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
name: 'claim',
|
|
430
480
|
type: 'function',
|
|
431
481
|
stateMutability: 'nonpayable',
|
|
432
482
|
inputs: [
|
|
433
483
|
{ type: 'address', name: 'to' },
|
|
434
|
-
{ type: '
|
|
484
|
+
{ type: 'bytes', name: 'receipt' },
|
|
435
485
|
],
|
|
436
486
|
outputs: [],
|
|
437
487
|
},
|
|
438
488
|
{
|
|
439
|
-
name: '
|
|
489
|
+
name: 'burnBlockedReceipt',
|
|
440
490
|
type: 'function',
|
|
441
491
|
stateMutability: 'nonpayable',
|
|
442
|
-
inputs: [{ type: '
|
|
492
|
+
inputs: [{ type: 'bytes', name: 'receipt' }],
|
|
443
493
|
outputs: [],
|
|
444
494
|
},
|
|
445
495
|
{
|
|
446
|
-
name: '
|
|
447
|
-
type: '
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
496
|
+
name: 'TransferBlocked',
|
|
497
|
+
type: 'event',
|
|
498
|
+
inputs: [
|
|
499
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
500
|
+
{ type: 'address', name: 'receiver', indexed: true },
|
|
501
|
+
{ type: 'uint64', name: 'blockedNonce', indexed: true },
|
|
502
|
+
{ type: 'uint256', name: 'amount' },
|
|
503
|
+
{ type: 'uint8', name: 'receiptVersion' },
|
|
504
|
+
{ type: 'bytes', name: 'receipt' },
|
|
505
|
+
],
|
|
451
506
|
},
|
|
452
507
|
{
|
|
453
|
-
name: '
|
|
508
|
+
name: 'ReceiptClaimed',
|
|
509
|
+
type: 'event',
|
|
510
|
+
inputs: [
|
|
511
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
512
|
+
{ type: 'address', name: 'receiver', indexed: true },
|
|
513
|
+
{ type: 'uint64', name: 'blockedNonce', indexed: true },
|
|
514
|
+
{ type: 'uint64', name: 'blockedAt' },
|
|
515
|
+
{ type: 'uint8', name: 'receiptVersion' },
|
|
516
|
+
{ type: 'address', name: 'originator' },
|
|
517
|
+
{ type: 'address', name: 'recipient' },
|
|
518
|
+
{ type: 'address', name: 'recoveryAuthority' },
|
|
519
|
+
{ type: 'address', name: 'caller' },
|
|
520
|
+
{ type: 'address', name: 'to' },
|
|
521
|
+
{ type: 'uint256', name: 'amount' },
|
|
522
|
+
],
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
name: 'ReceiptBurned',
|
|
526
|
+
type: 'event',
|
|
527
|
+
inputs: [
|
|
528
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
529
|
+
{ type: 'address', name: 'receiver', indexed: true },
|
|
530
|
+
{ type: 'uint64', name: 'blockedNonce', indexed: true },
|
|
531
|
+
{ type: 'uint64', name: 'blockedAt' },
|
|
532
|
+
{ type: 'uint8', name: 'receiptVersion' },
|
|
533
|
+
{ type: 'address', name: 'originator' },
|
|
534
|
+
{ type: 'address', name: 'recipient' },
|
|
535
|
+
{ type: 'address', name: 'recoveryAuthority' },
|
|
536
|
+
{ type: 'address', name: 'caller' },
|
|
537
|
+
{ type: 'uint256', name: 'amount' },
|
|
538
|
+
],
|
|
539
|
+
},
|
|
540
|
+
{ name: 'InvalidReceipt', type: 'error', inputs: [] },
|
|
541
|
+
{ name: 'InvalidClaimAddress', type: 'error', inputs: [] },
|
|
542
|
+
{ name: 'UnauthorizedClaimer', type: 'error', inputs: [] },
|
|
543
|
+
{ name: 'AddressReserved', type: 'error', inputs: [] },
|
|
544
|
+
];
|
|
545
|
+
export const signatureVerifier = [
|
|
546
|
+
{
|
|
547
|
+
name: 'recover',
|
|
454
548
|
type: 'function',
|
|
455
549
|
stateMutability: 'view',
|
|
456
|
-
inputs: [
|
|
457
|
-
|
|
550
|
+
inputs: [
|
|
551
|
+
{ type: 'bytes32', name: 'hash' },
|
|
552
|
+
{ type: 'bytes', name: 'signature' },
|
|
553
|
+
],
|
|
554
|
+
outputs: [{ type: 'address', name: 'signer' }],
|
|
458
555
|
},
|
|
459
556
|
{
|
|
460
|
-
name: '
|
|
557
|
+
name: 'verify',
|
|
461
558
|
type: 'function',
|
|
462
559
|
stateMutability: 'view',
|
|
463
|
-
inputs: [
|
|
560
|
+
inputs: [
|
|
561
|
+
{ type: 'address', name: 'signer' },
|
|
562
|
+
{ type: 'bytes32', name: 'hash' },
|
|
563
|
+
{ type: 'bytes', name: 'signature' },
|
|
564
|
+
],
|
|
464
565
|
outputs: [{ type: 'bool' }],
|
|
465
566
|
},
|
|
466
567
|
{
|
|
467
|
-
name: '
|
|
568
|
+
name: 'verifyKeychain',
|
|
468
569
|
type: 'function',
|
|
469
570
|
stateMutability: 'view',
|
|
470
|
-
inputs: [
|
|
471
|
-
|
|
571
|
+
inputs: [
|
|
572
|
+
{ type: 'address', name: 'account' },
|
|
573
|
+
{ type: 'bytes32', name: 'hash' },
|
|
574
|
+
{ type: 'bytes', name: 'signature' },
|
|
575
|
+
],
|
|
576
|
+
outputs: [{ type: 'bool' }],
|
|
472
577
|
},
|
|
473
578
|
{
|
|
474
|
-
name: '
|
|
579
|
+
name: 'verifyKeychainAdmin',
|
|
475
580
|
type: 'function',
|
|
476
581
|
stateMutability: 'view',
|
|
477
|
-
inputs: [
|
|
478
|
-
|
|
582
|
+
inputs: [
|
|
583
|
+
{ type: 'address', name: 'account' },
|
|
584
|
+
{ type: 'bytes32', name: 'hash' },
|
|
585
|
+
{ type: 'bytes', name: 'signature' },
|
|
586
|
+
],
|
|
587
|
+
outputs: [{ type: 'bool' }],
|
|
479
588
|
},
|
|
589
|
+
{ name: 'InvalidFormat', type: 'error', inputs: [] },
|
|
590
|
+
{ name: 'InvalidSignature', type: 'error', inputs: [] },
|
|
591
|
+
];
|
|
592
|
+
export const stablecoinDex = [
|
|
480
593
|
{
|
|
481
|
-
name: '
|
|
594
|
+
name: 'createPair',
|
|
482
595
|
type: 'function',
|
|
483
596
|
stateMutability: 'nonpayable',
|
|
484
|
-
inputs: [{ type: '
|
|
485
|
-
outputs: [],
|
|
597
|
+
inputs: [{ type: 'address', name: 'base' }],
|
|
598
|
+
outputs: [{ type: 'bytes32', name: 'key' }],
|
|
486
599
|
},
|
|
487
600
|
{
|
|
488
|
-
name: '
|
|
601
|
+
name: 'place',
|
|
489
602
|
type: 'function',
|
|
490
603
|
stateMutability: 'nonpayable',
|
|
491
604
|
inputs: [
|
|
492
|
-
{ type: 'address', name: '
|
|
493
|
-
{ type: '
|
|
605
|
+
{ type: 'address', name: 'token' },
|
|
606
|
+
{ type: 'uint128', name: 'amount' },
|
|
607
|
+
{ type: 'bool', name: 'isBid' },
|
|
608
|
+
{ type: 'int16', name: 'tick' },
|
|
494
609
|
],
|
|
495
|
-
outputs: [],
|
|
610
|
+
outputs: [{ type: 'uint128', name: 'orderId' }],
|
|
496
611
|
},
|
|
497
612
|
{
|
|
498
|
-
name: '
|
|
613
|
+
name: 'placeFlip',
|
|
499
614
|
type: 'function',
|
|
500
615
|
stateMutability: 'nonpayable',
|
|
501
616
|
inputs: [
|
|
502
|
-
{ type: 'address', name: '
|
|
503
|
-
{ type: '
|
|
504
|
-
{ type: '
|
|
617
|
+
{ type: 'address', name: 'token' },
|
|
618
|
+
{ type: 'uint128', name: 'amount' },
|
|
619
|
+
{ type: 'bool', name: 'isBid' },
|
|
620
|
+
{ type: 'int16', name: 'tick' },
|
|
621
|
+
{ type: 'int16', name: 'flipTick' },
|
|
505
622
|
],
|
|
506
|
-
outputs: [],
|
|
623
|
+
outputs: [{ type: 'uint128', name: 'orderId' }],
|
|
507
624
|
},
|
|
508
625
|
{
|
|
509
|
-
name: '
|
|
626
|
+
name: 'cancel',
|
|
510
627
|
type: 'function',
|
|
511
628
|
stateMutability: 'nonpayable',
|
|
512
|
-
inputs: [
|
|
513
|
-
{ type: 'uint256', name: 'amount' },
|
|
514
|
-
{ type: 'bytes32', name: 'memo' },
|
|
515
|
-
],
|
|
629
|
+
inputs: [{ type: 'uint128', name: 'orderId' }],
|
|
516
630
|
outputs: [],
|
|
517
631
|
},
|
|
518
632
|
{
|
|
519
|
-
name: '
|
|
633
|
+
name: 'cancelStaleOrder',
|
|
520
634
|
type: 'function',
|
|
521
635
|
stateMutability: 'nonpayable',
|
|
522
|
-
inputs: [
|
|
523
|
-
{ type: 'address', name: 'to' },
|
|
524
|
-
{ type: 'uint256', name: 'amount' },
|
|
525
|
-
{ type: 'bytes32', name: 'memo' },
|
|
526
|
-
],
|
|
636
|
+
inputs: [{ type: 'uint128', name: 'orderId' }],
|
|
527
637
|
outputs: [],
|
|
528
638
|
},
|
|
529
639
|
{
|
|
530
|
-
name: '
|
|
640
|
+
name: 'swapExactAmountIn',
|
|
531
641
|
type: 'function',
|
|
532
642
|
stateMutability: 'nonpayable',
|
|
533
643
|
inputs: [
|
|
534
|
-
{ type: 'address', name: '
|
|
535
|
-
{ type: 'address', name: '
|
|
536
|
-
{ type: '
|
|
537
|
-
{ type: '
|
|
644
|
+
{ type: 'address', name: 'tokenIn' },
|
|
645
|
+
{ type: 'address', name: 'tokenOut' },
|
|
646
|
+
{ type: 'uint128', name: 'amountIn' },
|
|
647
|
+
{ type: 'uint128', name: 'minAmountOut' },
|
|
538
648
|
],
|
|
539
|
-
outputs: [{ type: '
|
|
649
|
+
outputs: [{ type: 'uint128', name: 'amountOut' }],
|
|
540
650
|
},
|
|
541
651
|
{
|
|
542
|
-
name: '
|
|
652
|
+
name: 'swapExactAmountOut',
|
|
543
653
|
type: 'function',
|
|
544
654
|
stateMutability: 'nonpayable',
|
|
545
|
-
inputs: [
|
|
546
|
-
|
|
655
|
+
inputs: [
|
|
656
|
+
{ type: 'address', name: 'tokenIn' },
|
|
657
|
+
{ type: 'address', name: 'tokenOut' },
|
|
658
|
+
{ type: 'uint128', name: 'amountOut' },
|
|
659
|
+
{ type: 'uint128', name: 'maxAmountIn' },
|
|
660
|
+
],
|
|
661
|
+
outputs: [{ type: 'uint128', name: 'amountIn' }],
|
|
547
662
|
},
|
|
548
663
|
{
|
|
549
|
-
name: '
|
|
664
|
+
name: 'quoteSwapExactAmountIn',
|
|
550
665
|
type: 'function',
|
|
551
|
-
stateMutability: '
|
|
552
|
-
inputs: [
|
|
553
|
-
|
|
666
|
+
stateMutability: 'view',
|
|
667
|
+
inputs: [
|
|
668
|
+
{ type: 'address', name: 'tokenIn' },
|
|
669
|
+
{ type: 'address', name: 'tokenOut' },
|
|
670
|
+
{ type: 'uint128', name: 'amountIn' },
|
|
671
|
+
],
|
|
672
|
+
outputs: [{ type: 'uint128', name: 'amountOut' }],
|
|
554
673
|
},
|
|
555
674
|
{
|
|
556
|
-
name: '
|
|
675
|
+
name: 'quoteSwapExactAmountOut',
|
|
557
676
|
type: 'function',
|
|
558
|
-
stateMutability: '
|
|
559
|
-
inputs: [
|
|
560
|
-
|
|
677
|
+
stateMutability: 'view',
|
|
678
|
+
inputs: [
|
|
679
|
+
{ type: 'address', name: 'tokenIn' },
|
|
680
|
+
{ type: 'address', name: 'tokenOut' },
|
|
681
|
+
{ type: 'uint128', name: 'amountOut' },
|
|
682
|
+
],
|
|
683
|
+
outputs: [{ type: 'uint128', name: 'amountIn' }],
|
|
561
684
|
},
|
|
562
685
|
{
|
|
563
|
-
name: '
|
|
686
|
+
name: 'balanceOf',
|
|
564
687
|
type: 'function',
|
|
565
|
-
stateMutability: '
|
|
566
|
-
inputs: [
|
|
567
|
-
|
|
688
|
+
stateMutability: 'view',
|
|
689
|
+
inputs: [
|
|
690
|
+
{ type: 'address', name: 'user' },
|
|
691
|
+
{ type: 'address', name: 'token' },
|
|
692
|
+
],
|
|
693
|
+
outputs: [{ type: 'uint128' }],
|
|
568
694
|
},
|
|
569
695
|
{
|
|
570
|
-
name: '
|
|
696
|
+
name: 'withdraw',
|
|
571
697
|
type: 'function',
|
|
572
698
|
stateMutability: 'nonpayable',
|
|
573
|
-
inputs: [
|
|
699
|
+
inputs: [
|
|
700
|
+
{ type: 'address', name: 'token' },
|
|
701
|
+
{ type: 'uint128', name: 'amount' },
|
|
702
|
+
],
|
|
574
703
|
outputs: [],
|
|
575
704
|
},
|
|
576
705
|
{
|
|
577
|
-
name: '
|
|
578
|
-
type: 'function',
|
|
579
|
-
stateMutability: 'nonpayable',
|
|
580
|
-
inputs: [],
|
|
581
|
-
outputs: [],
|
|
582
|
-
},
|
|
583
|
-
{
|
|
584
|
-
name: 'PAUSE_ROLE',
|
|
706
|
+
name: 'getOrder',
|
|
585
707
|
type: 'function',
|
|
586
708
|
stateMutability: 'view',
|
|
587
|
-
inputs: [],
|
|
588
|
-
outputs: [
|
|
709
|
+
inputs: [{ type: 'uint128', name: 'orderId' }],
|
|
710
|
+
outputs: [
|
|
711
|
+
{
|
|
712
|
+
type: 'tuple',
|
|
713
|
+
components: [
|
|
714
|
+
{ type: 'uint128', name: 'orderId' },
|
|
715
|
+
{ type: 'address', name: 'maker' },
|
|
716
|
+
{ type: 'bytes32', name: 'bookKey' },
|
|
717
|
+
{ type: 'bool', name: 'isBid' },
|
|
718
|
+
{ type: 'int16', name: 'tick' },
|
|
719
|
+
{ type: 'uint128', name: 'amount' },
|
|
720
|
+
{ type: 'uint128', name: 'remaining' },
|
|
721
|
+
{ type: 'uint128', name: 'prev' },
|
|
722
|
+
{ type: 'uint128', name: 'next' },
|
|
723
|
+
{ type: 'bool', name: 'isFlip' },
|
|
724
|
+
{ type: 'int16', name: 'flipTick' },
|
|
725
|
+
],
|
|
726
|
+
},
|
|
727
|
+
],
|
|
589
728
|
},
|
|
590
729
|
{
|
|
591
|
-
name: '
|
|
730
|
+
name: 'getTickLevel',
|
|
592
731
|
type: 'function',
|
|
593
732
|
stateMutability: 'view',
|
|
594
|
-
inputs: [
|
|
595
|
-
|
|
733
|
+
inputs: [
|
|
734
|
+
{ type: 'address', name: 'base' },
|
|
735
|
+
{ type: 'int16', name: 'tick' },
|
|
736
|
+
{ type: 'bool', name: 'isBid' },
|
|
737
|
+
],
|
|
738
|
+
outputs: [
|
|
739
|
+
{ type: 'uint128', name: 'head' },
|
|
740
|
+
{ type: 'uint128', name: 'tail' },
|
|
741
|
+
{ type: 'uint128', name: 'totalLiquidity' },
|
|
742
|
+
],
|
|
596
743
|
},
|
|
597
744
|
{
|
|
598
|
-
name: '
|
|
745
|
+
name: 'pairKey',
|
|
599
746
|
type: 'function',
|
|
600
|
-
stateMutability: '
|
|
601
|
-
inputs: [
|
|
747
|
+
stateMutability: 'pure',
|
|
748
|
+
inputs: [
|
|
749
|
+
{ type: 'address', name: 'tokenA' },
|
|
750
|
+
{ type: 'address', name: 'tokenB' },
|
|
751
|
+
],
|
|
602
752
|
outputs: [{ type: 'bytes32' }],
|
|
603
753
|
},
|
|
604
754
|
{
|
|
605
|
-
name: '
|
|
755
|
+
name: 'nextOrderId',
|
|
606
756
|
type: 'function',
|
|
607
757
|
stateMutability: 'view',
|
|
608
758
|
inputs: [],
|
|
609
|
-
outputs: [{ type: '
|
|
759
|
+
outputs: [{ type: 'uint128' }],
|
|
610
760
|
},
|
|
611
761
|
{
|
|
612
|
-
name: '
|
|
762
|
+
name: 'books',
|
|
613
763
|
type: 'function',
|
|
614
|
-
stateMutability: '
|
|
615
|
-
inputs: [
|
|
616
|
-
|
|
617
|
-
{
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
764
|
+
stateMutability: 'view',
|
|
765
|
+
inputs: [{ type: 'bytes32', name: 'pairKey' }],
|
|
766
|
+
outputs: [
|
|
767
|
+
{
|
|
768
|
+
type: 'tuple',
|
|
769
|
+
components: [
|
|
770
|
+
{ type: 'address', name: 'base' },
|
|
771
|
+
{ type: 'address', name: 'quote' },
|
|
772
|
+
{ type: 'int16', name: 'bestBidTick' },
|
|
773
|
+
{ type: 'int16', name: 'bestAskTick' },
|
|
774
|
+
],
|
|
775
|
+
},
|
|
623
776
|
],
|
|
624
|
-
outputs: [],
|
|
625
777
|
},
|
|
626
778
|
{
|
|
627
|
-
name: '
|
|
779
|
+
name: 'MIN_TICK',
|
|
628
780
|
type: 'function',
|
|
629
|
-
stateMutability: '
|
|
630
|
-
inputs: [
|
|
631
|
-
outputs: [{ type: '
|
|
781
|
+
stateMutability: 'pure',
|
|
782
|
+
inputs: [],
|
|
783
|
+
outputs: [{ type: 'int16' }],
|
|
632
784
|
},
|
|
633
785
|
{
|
|
634
|
-
name: '
|
|
786
|
+
name: 'MAX_TICK',
|
|
635
787
|
type: 'function',
|
|
636
|
-
stateMutability: '
|
|
788
|
+
stateMutability: 'pure',
|
|
637
789
|
inputs: [],
|
|
638
|
-
outputs: [{ type: '
|
|
790
|
+
outputs: [{ type: 'int16' }],
|
|
639
791
|
},
|
|
640
792
|
{
|
|
641
|
-
name: '
|
|
793
|
+
name: 'TICK_SPACING',
|
|
642
794
|
type: 'function',
|
|
643
|
-
stateMutability: '
|
|
644
|
-
inputs: [
|
|
645
|
-
outputs: [],
|
|
795
|
+
stateMutability: 'pure',
|
|
796
|
+
inputs: [],
|
|
797
|
+
outputs: [{ type: 'int16' }],
|
|
646
798
|
},
|
|
647
799
|
{
|
|
648
|
-
name: '
|
|
800
|
+
name: 'PRICE_SCALE',
|
|
649
801
|
type: 'function',
|
|
650
|
-
stateMutability: '
|
|
651
|
-
inputs: [
|
|
652
|
-
outputs: [],
|
|
802
|
+
stateMutability: 'pure',
|
|
803
|
+
inputs: [],
|
|
804
|
+
outputs: [{ type: 'uint32' }],
|
|
653
805
|
},
|
|
654
806
|
{
|
|
655
|
-
name: '
|
|
807
|
+
name: 'MIN_ORDER_AMOUNT',
|
|
656
808
|
type: 'function',
|
|
657
|
-
stateMutability: '
|
|
809
|
+
stateMutability: 'pure',
|
|
658
810
|
inputs: [],
|
|
659
|
-
outputs: [{ type: '
|
|
811
|
+
outputs: [{ type: 'uint128' }],
|
|
660
812
|
},
|
|
661
813
|
{
|
|
662
|
-
name: '
|
|
814
|
+
name: 'MIN_PRICE',
|
|
663
815
|
type: 'function',
|
|
664
|
-
stateMutability: '
|
|
816
|
+
stateMutability: 'pure',
|
|
665
817
|
inputs: [],
|
|
666
|
-
outputs: [{ type: '
|
|
818
|
+
outputs: [{ type: 'uint32' }],
|
|
667
819
|
},
|
|
668
820
|
{
|
|
669
|
-
name: '
|
|
821
|
+
name: 'MAX_PRICE',
|
|
670
822
|
type: 'function',
|
|
671
|
-
stateMutability: '
|
|
823
|
+
stateMutability: 'pure',
|
|
672
824
|
inputs: [],
|
|
673
|
-
outputs: [{ type: '
|
|
825
|
+
outputs: [{ type: 'uint32' }],
|
|
674
826
|
},
|
|
675
827
|
{
|
|
676
|
-
name: '
|
|
828
|
+
name: 'tickToPrice',
|
|
677
829
|
type: 'function',
|
|
678
|
-
stateMutability: '
|
|
679
|
-
inputs: [{ type: '
|
|
680
|
-
outputs: [
|
|
681
|
-
{
|
|
682
|
-
type: 'tuple',
|
|
683
|
-
components: [
|
|
684
|
-
{ type: 'address', name: 'rewardRecipient' },
|
|
685
|
-
{ type: 'uint256', name: 'rewardPerToken' },
|
|
686
|
-
{ type: 'uint256', name: 'rewardBalance' },
|
|
687
|
-
],
|
|
688
|
-
},
|
|
689
|
-
],
|
|
830
|
+
stateMutability: 'pure',
|
|
831
|
+
inputs: [{ type: 'int16', name: 'tick' }],
|
|
832
|
+
outputs: [{ type: 'uint32', name: 'price' }],
|
|
690
833
|
},
|
|
691
834
|
{
|
|
692
|
-
name: '
|
|
835
|
+
name: 'priceToTick',
|
|
693
836
|
type: 'function',
|
|
694
|
-
stateMutability: '
|
|
695
|
-
inputs: [{ type: '
|
|
696
|
-
outputs: [{ type: '
|
|
837
|
+
stateMutability: 'pure',
|
|
838
|
+
inputs: [{ type: 'uint32', name: 'price' }],
|
|
839
|
+
outputs: [{ type: 'int16', name: 'tick' }],
|
|
697
840
|
},
|
|
698
841
|
{
|
|
699
|
-
name: '
|
|
842
|
+
name: 'PairCreated',
|
|
700
843
|
type: 'event',
|
|
701
844
|
inputs: [
|
|
702
|
-
{ type: '
|
|
703
|
-
{ type: 'address', name: '
|
|
704
|
-
{ type: '
|
|
845
|
+
{ type: 'bytes32', name: 'key', indexed: true },
|
|
846
|
+
{ type: 'address', name: 'base', indexed: true },
|
|
847
|
+
{ type: 'address', name: 'quote', indexed: true },
|
|
705
848
|
],
|
|
706
849
|
},
|
|
707
850
|
{
|
|
708
|
-
name: '
|
|
851
|
+
name: 'OrderPlaced',
|
|
709
852
|
type: 'event',
|
|
710
853
|
inputs: [
|
|
711
|
-
{ type: '
|
|
712
|
-
{ type: 'address', name: '
|
|
713
|
-
{ type: '
|
|
854
|
+
{ type: 'uint128', name: 'orderId', indexed: true },
|
|
855
|
+
{ type: 'address', name: 'maker', indexed: true },
|
|
856
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
857
|
+
{ type: 'uint128', name: 'amount' },
|
|
858
|
+
{ type: 'bool', name: 'isBid' },
|
|
859
|
+
{ type: 'int16', name: 'tick' },
|
|
860
|
+
{ type: 'bool', name: 'isFlipOrder' },
|
|
861
|
+
{ type: 'int16', name: 'flipTick' },
|
|
714
862
|
],
|
|
715
863
|
},
|
|
716
864
|
{
|
|
717
|
-
name: '
|
|
865
|
+
name: 'OrderFilled',
|
|
718
866
|
type: 'event',
|
|
719
867
|
inputs: [
|
|
720
|
-
{ type: '
|
|
721
|
-
{ type: '
|
|
868
|
+
{ type: 'uint128', name: 'orderId', indexed: true },
|
|
869
|
+
{ type: 'address', name: 'maker', indexed: true },
|
|
870
|
+
{ type: 'address', name: 'taker', indexed: true },
|
|
871
|
+
{ type: 'uint128', name: 'amountFilled' },
|
|
872
|
+
{ type: 'bool', name: 'partialFill' },
|
|
722
873
|
],
|
|
723
874
|
},
|
|
724
875
|
{
|
|
725
|
-
name: '
|
|
876
|
+
name: 'OrderFlipped',
|
|
726
877
|
type: 'event',
|
|
727
878
|
inputs: [
|
|
728
|
-
{ type: '
|
|
729
|
-
{ type: '
|
|
879
|
+
{ type: 'uint128', name: 'orderId', indexed: true },
|
|
880
|
+
{ type: 'address', name: 'maker', indexed: true },
|
|
881
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
882
|
+
{ type: 'uint128', name: 'amount' },
|
|
883
|
+
{ type: 'bool', name: 'isBid' },
|
|
884
|
+
{ type: 'int16', name: 'tick' },
|
|
885
|
+
{ type: 'int16', name: 'flipTick' },
|
|
730
886
|
],
|
|
731
887
|
},
|
|
732
888
|
{
|
|
733
|
-
name: '
|
|
889
|
+
name: 'FlipFailed',
|
|
734
890
|
type: 'event',
|
|
735
891
|
inputs: [
|
|
736
|
-
{ type: '
|
|
737
|
-
{ type: '
|
|
892
|
+
{ type: 'uint128', name: 'orderId', indexed: true },
|
|
893
|
+
{ type: 'address', name: 'maker', indexed: true },
|
|
894
|
+
{ type: 'bytes4', name: 'reason' },
|
|
738
895
|
],
|
|
739
896
|
},
|
|
740
897
|
{
|
|
741
|
-
name: '
|
|
898
|
+
name: 'OrderCancelled',
|
|
742
899
|
type: 'event',
|
|
743
|
-
inputs: [
|
|
744
|
-
{ type: 'address', name: 'from', indexed: true },
|
|
745
|
-
{ type: 'address', name: 'to', indexed: true },
|
|
746
|
-
{ type: 'uint256', name: 'amount' },
|
|
747
|
-
{ type: 'bytes32', name: 'memo', indexed: true },
|
|
748
|
-
],
|
|
900
|
+
inputs: [{ type: 'uint128', name: 'orderId', indexed: true }],
|
|
749
901
|
},
|
|
902
|
+
{ name: 'Unauthorized', type: 'error', inputs: [] },
|
|
903
|
+
{ name: 'PairDoesNotExist', type: 'error', inputs: [] },
|
|
904
|
+
{ name: 'PairAlreadyExists', type: 'error', inputs: [] },
|
|
905
|
+
{ name: 'OrderDoesNotExist', type: 'error', inputs: [] },
|
|
906
|
+
{ name: 'IdenticalTokens', type: 'error', inputs: [] },
|
|
907
|
+
{ name: 'InvalidToken', type: 'error', inputs: [] },
|
|
750
908
|
{
|
|
751
|
-
name: '
|
|
752
|
-
type: '
|
|
753
|
-
inputs: [
|
|
754
|
-
{ type: 'address', name: 'updater', indexed: true },
|
|
755
|
-
{ type: 'uint64', name: 'newPolicyId', indexed: true },
|
|
756
|
-
],
|
|
909
|
+
name: 'TickOutOfBounds',
|
|
910
|
+
type: 'error',
|
|
911
|
+
inputs: [{ type: 'int16', name: 'tick' }],
|
|
757
912
|
},
|
|
913
|
+
{ name: 'InvalidTick', type: 'error', inputs: [] },
|
|
914
|
+
{ name: 'InvalidFlipTick', type: 'error', inputs: [] },
|
|
915
|
+
{ name: 'InsufficientBalance', type: 'error', inputs: [] },
|
|
916
|
+
{ name: 'InsufficientLiquidity', type: 'error', inputs: [] },
|
|
917
|
+
{ name: 'InsufficientOutput', type: 'error', inputs: [] },
|
|
918
|
+
{ name: 'MaxInputExceeded', type: 'error', inputs: [] },
|
|
758
919
|
{
|
|
759
|
-
name: '
|
|
760
|
-
type: '
|
|
761
|
-
inputs: [
|
|
762
|
-
{ type: 'address', name: 'updater', indexed: true },
|
|
763
|
-
{ type: 'uint256', name: 'newSupplyCap', indexed: true },
|
|
764
|
-
],
|
|
920
|
+
name: 'BelowMinimumOrderSize',
|
|
921
|
+
type: 'error',
|
|
922
|
+
inputs: [{ type: 'uint128', name: 'amount' }],
|
|
765
923
|
},
|
|
924
|
+
{ name: 'InvalidBaseToken', type: 'error', inputs: [] },
|
|
925
|
+
{ name: 'OrderNotStale', type: 'error', inputs: [] },
|
|
926
|
+
];
|
|
927
|
+
export const tip20 = [
|
|
766
928
|
{
|
|
767
|
-
name: '
|
|
768
|
-
type: '
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
],
|
|
929
|
+
name: 'name',
|
|
930
|
+
type: 'function',
|
|
931
|
+
stateMutability: 'view',
|
|
932
|
+
inputs: [],
|
|
933
|
+
outputs: [{ type: 'string' }],
|
|
773
934
|
},
|
|
774
935
|
{
|
|
775
|
-
name: '
|
|
776
|
-
type: '
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
],
|
|
936
|
+
name: 'symbol',
|
|
937
|
+
type: 'function',
|
|
938
|
+
stateMutability: 'view',
|
|
939
|
+
inputs: [],
|
|
940
|
+
outputs: [{ type: 'string' }],
|
|
781
941
|
},
|
|
782
942
|
{
|
|
783
|
-
name: '
|
|
784
|
-
type: '
|
|
943
|
+
name: 'decimals',
|
|
944
|
+
type: 'function',
|
|
945
|
+
stateMutability: 'pure',
|
|
946
|
+
inputs: [],
|
|
947
|
+
outputs: [{ type: 'uint8' }],
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
name: 'totalSupply',
|
|
951
|
+
type: 'function',
|
|
952
|
+
stateMutability: 'view',
|
|
953
|
+
inputs: [],
|
|
954
|
+
outputs: [{ type: 'uint256' }],
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
name: 'quoteToken',
|
|
958
|
+
type: 'function',
|
|
959
|
+
stateMutability: 'view',
|
|
960
|
+
inputs: [],
|
|
961
|
+
outputs: [{ type: 'address' }],
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
name: 'nextQuoteToken',
|
|
965
|
+
type: 'function',
|
|
966
|
+
stateMutability: 'view',
|
|
967
|
+
inputs: [],
|
|
968
|
+
outputs: [{ type: 'address' }],
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
name: 'balanceOf',
|
|
972
|
+
type: 'function',
|
|
973
|
+
stateMutability: 'view',
|
|
974
|
+
inputs: [{ type: 'address', name: 'account' }],
|
|
975
|
+
outputs: [{ type: 'uint256' }],
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
name: 'transfer',
|
|
979
|
+
type: 'function',
|
|
980
|
+
stateMutability: 'nonpayable',
|
|
785
981
|
inputs: [
|
|
786
|
-
{ type: 'address', name: '
|
|
787
|
-
{ type: '
|
|
982
|
+
{ type: 'address', name: 'to' },
|
|
983
|
+
{ type: 'uint256', name: 'amount' },
|
|
788
984
|
],
|
|
985
|
+
outputs: [{ type: 'bool' }],
|
|
789
986
|
},
|
|
790
987
|
{
|
|
791
|
-
name: '
|
|
792
|
-
type: '
|
|
988
|
+
name: 'approve',
|
|
989
|
+
type: 'function',
|
|
990
|
+
stateMutability: 'nonpayable',
|
|
793
991
|
inputs: [
|
|
794
|
-
{ type: 'address', name: '
|
|
992
|
+
{ type: 'address', name: 'spender' },
|
|
795
993
|
{ type: 'uint256', name: 'amount' },
|
|
796
994
|
],
|
|
995
|
+
outputs: [{ type: 'bool' }],
|
|
797
996
|
},
|
|
798
997
|
{
|
|
799
|
-
name: '
|
|
800
|
-
type: '
|
|
998
|
+
name: 'allowance',
|
|
999
|
+
type: 'function',
|
|
1000
|
+
stateMutability: 'view',
|
|
801
1001
|
inputs: [
|
|
802
|
-
{ type: 'address', name: '
|
|
803
|
-
{ type: 'address', name: '
|
|
1002
|
+
{ type: 'address', name: 'owner' },
|
|
1003
|
+
{ type: 'address', name: 'spender' },
|
|
804
1004
|
],
|
|
1005
|
+
outputs: [{ type: 'uint256' }],
|
|
805
1006
|
},
|
|
806
1007
|
{
|
|
807
|
-
name: '
|
|
808
|
-
type: '
|
|
1008
|
+
name: 'transferFrom',
|
|
1009
|
+
type: 'function',
|
|
1010
|
+
stateMutability: 'nonpayable',
|
|
809
1011
|
inputs: [
|
|
810
|
-
{ type: 'address', name: '
|
|
811
|
-
{ type: '
|
|
1012
|
+
{ type: 'address', name: 'from' },
|
|
1013
|
+
{ type: 'address', name: 'to' },
|
|
1014
|
+
{ type: 'uint256', name: 'amount' },
|
|
812
1015
|
],
|
|
1016
|
+
outputs: [{ type: 'bool' }],
|
|
813
1017
|
},
|
|
814
1018
|
{
|
|
815
|
-
name: '
|
|
816
|
-
type: '
|
|
1019
|
+
name: 'mint',
|
|
1020
|
+
type: 'function',
|
|
1021
|
+
stateMutability: 'nonpayable',
|
|
817
1022
|
inputs: [
|
|
818
|
-
{ type: '
|
|
819
|
-
{ type: 'uint256', name: '
|
|
820
|
-
{ type: 'address', name: 'token' },
|
|
1023
|
+
{ type: 'address', name: 'to' },
|
|
1024
|
+
{ type: 'uint256', name: 'amount' },
|
|
821
1025
|
],
|
|
1026
|
+
outputs: [],
|
|
822
1027
|
},
|
|
823
|
-
{ name: 'InsufficientAllowance', type: 'error', inputs: [] },
|
|
824
|
-
{ name: 'SupplyCapExceeded', type: 'error', inputs: [] },
|
|
825
|
-
{ name: 'InvalidSupplyCap', type: 'error', inputs: [] },
|
|
826
|
-
{ name: 'InvalidPayload', type: 'error', inputs: [] },
|
|
827
|
-
{ name: 'PolicyForbids', type: 'error', inputs: [] },
|
|
828
|
-
{ name: 'InvalidRecipient', type: 'error', inputs: [] },
|
|
829
|
-
{ name: 'ContractPaused', type: 'error', inputs: [] },
|
|
830
|
-
{ name: 'InvalidCurrency', type: 'error', inputs: [] },
|
|
831
|
-
{ name: 'InvalidQuoteToken', type: 'error', inputs: [] },
|
|
832
|
-
{ name: 'InvalidAmount', type: 'error', inputs: [] },
|
|
833
|
-
{ name: 'NoOptedInSupply', type: 'error', inputs: [] },
|
|
834
|
-
{ name: 'Unauthorized', type: 'error', inputs: [] },
|
|
835
|
-
{ name: 'ProtectedAddress', type: 'error', inputs: [] },
|
|
836
|
-
{ name: 'InvalidToken', type: 'error', inputs: [] },
|
|
837
|
-
{ name: 'Uninitialized', type: 'error', inputs: [] },
|
|
838
|
-
{ name: 'InvalidTransferPolicyId', type: 'error', inputs: [] },
|
|
839
|
-
{ name: 'PermitExpired', type: 'error', inputs: [] },
|
|
840
|
-
{ name: 'InvalidSignature', type: 'error', inputs: [] },
|
|
841
|
-
{ name: 'LogoURITooLong', type: 'error', inputs: [] },
|
|
842
|
-
{ name: 'InvalidLogoURI', type: 'error', inputs: [] },
|
|
843
1028
|
{
|
|
844
|
-
name: '
|
|
1029
|
+
name: 'burn',
|
|
1030
|
+
type: 'function',
|
|
1031
|
+
stateMutability: 'nonpayable',
|
|
1032
|
+
inputs: [{ type: 'uint256', name: 'amount' }],
|
|
1033
|
+
outputs: [],
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
name: 'currency',
|
|
845
1037
|
type: 'function',
|
|
846
1038
|
stateMutability: 'view',
|
|
847
|
-
inputs: [
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
1039
|
+
inputs: [],
|
|
1040
|
+
outputs: [{ type: 'string' }],
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
name: 'supplyCap',
|
|
1044
|
+
type: 'function',
|
|
1045
|
+
stateMutability: 'view',
|
|
1046
|
+
inputs: [],
|
|
1047
|
+
outputs: [{ type: 'uint256' }],
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
name: 'paused',
|
|
1051
|
+
type: 'function',
|
|
1052
|
+
stateMutability: 'view',
|
|
1053
|
+
inputs: [],
|
|
851
1054
|
outputs: [{ type: 'bool' }],
|
|
852
1055
|
},
|
|
853
1056
|
{
|
|
854
|
-
name: '
|
|
1057
|
+
name: 'transferPolicyId',
|
|
855
1058
|
type: 'function',
|
|
856
1059
|
stateMutability: 'view',
|
|
857
|
-
inputs: [
|
|
858
|
-
outputs: [{ type: '
|
|
1060
|
+
inputs: [],
|
|
1061
|
+
outputs: [{ type: 'uint64' }],
|
|
859
1062
|
},
|
|
860
1063
|
{
|
|
861
|
-
name: '
|
|
1064
|
+
name: 'logoURI',
|
|
1065
|
+
type: 'function',
|
|
1066
|
+
stateMutability: 'view',
|
|
1067
|
+
inputs: [],
|
|
1068
|
+
outputs: [{ type: 'string' }],
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
name: 'setLogoURI',
|
|
862
1072
|
type: 'function',
|
|
863
1073
|
stateMutability: 'nonpayable',
|
|
864
|
-
inputs: [
|
|
865
|
-
{ type: 'bytes32', name: 'role' },
|
|
866
|
-
{ type: 'address', name: 'account' },
|
|
867
|
-
],
|
|
1074
|
+
inputs: [{ type: 'string', name: 'newLogoURI' }],
|
|
868
1075
|
outputs: [],
|
|
869
1076
|
},
|
|
870
1077
|
{
|
|
871
|
-
name: '
|
|
1078
|
+
name: 'burnBlocked',
|
|
872
1079
|
type: 'function',
|
|
873
1080
|
stateMutability: 'nonpayable',
|
|
874
1081
|
inputs: [
|
|
875
|
-
{ type: '
|
|
876
|
-
{ type: '
|
|
1082
|
+
{ type: 'address', name: 'from' },
|
|
1083
|
+
{ type: 'uint256', name: 'amount' },
|
|
877
1084
|
],
|
|
878
1085
|
outputs: [],
|
|
879
1086
|
},
|
|
880
1087
|
{
|
|
881
|
-
name: '
|
|
1088
|
+
name: 'mintWithMemo',
|
|
882
1089
|
type: 'function',
|
|
883
1090
|
stateMutability: 'nonpayable',
|
|
884
|
-
inputs: [
|
|
1091
|
+
inputs: [
|
|
1092
|
+
{ type: 'address', name: 'to' },
|
|
1093
|
+
{ type: 'uint256', name: 'amount' },
|
|
1094
|
+
{ type: 'bytes32', name: 'memo' },
|
|
1095
|
+
],
|
|
885
1096
|
outputs: [],
|
|
886
1097
|
},
|
|
887
1098
|
{
|
|
888
|
-
name: '
|
|
1099
|
+
name: 'burnWithMemo',
|
|
889
1100
|
type: 'function',
|
|
890
1101
|
stateMutability: 'nonpayable',
|
|
891
1102
|
inputs: [
|
|
892
|
-
{ type: '
|
|
893
|
-
{ type: 'bytes32', name: '
|
|
1103
|
+
{ type: 'uint256', name: 'amount' },
|
|
1104
|
+
{ type: 'bytes32', name: 'memo' },
|
|
894
1105
|
],
|
|
895
1106
|
outputs: [],
|
|
896
1107
|
},
|
|
897
1108
|
{
|
|
898
|
-
name: '
|
|
899
|
-
type: '
|
|
1109
|
+
name: 'transferWithMemo',
|
|
1110
|
+
type: 'function',
|
|
1111
|
+
stateMutability: 'nonpayable',
|
|
900
1112
|
inputs: [
|
|
901
|
-
{ type: '
|
|
902
|
-
{ type: '
|
|
903
|
-
{ type: '
|
|
904
|
-
{ type: 'bool', name: 'hasRole' },
|
|
1113
|
+
{ type: 'address', name: 'to' },
|
|
1114
|
+
{ type: 'uint256', name: 'amount' },
|
|
1115
|
+
{ type: 'bytes32', name: 'memo' },
|
|
905
1116
|
],
|
|
1117
|
+
outputs: [],
|
|
906
1118
|
},
|
|
907
1119
|
{
|
|
908
|
-
name: '
|
|
909
|
-
type: '
|
|
1120
|
+
name: 'transferFromWithMemo',
|
|
1121
|
+
type: 'function',
|
|
1122
|
+
stateMutability: 'nonpayable',
|
|
910
1123
|
inputs: [
|
|
911
|
-
{ type: '
|
|
912
|
-
{ type: '
|
|
913
|
-
{ type: '
|
|
1124
|
+
{ type: 'address', name: 'from' },
|
|
1125
|
+
{ type: 'address', name: 'to' },
|
|
1126
|
+
{ type: 'uint256', name: 'amount' },
|
|
1127
|
+
{ type: 'bytes32', name: 'memo' },
|
|
914
1128
|
],
|
|
1129
|
+
outputs: [{ type: 'bool' }],
|
|
915
1130
|
},
|
|
916
|
-
{ name: 'Unauthorized', type: 'error', inputs: [] },
|
|
917
|
-
];
|
|
918
|
-
export const validatorConfigV2 = [
|
|
919
1131
|
{
|
|
920
|
-
name: '
|
|
1132
|
+
name: 'changeTransferPolicyId',
|
|
921
1133
|
type: 'function',
|
|
922
|
-
stateMutability: '
|
|
923
|
-
inputs: [],
|
|
924
|
-
outputs: [
|
|
925
|
-
{
|
|
926
|
-
type: 'tuple[]',
|
|
927
|
-
name: 'validators',
|
|
928
|
-
components: [
|
|
929
|
-
{ type: 'bytes32', name: 'publicKey' },
|
|
930
|
-
{ type: 'address', name: 'validatorAddress' },
|
|
931
|
-
{ type: 'string', name: 'ingress' },
|
|
932
|
-
{ type: 'string', name: 'egress' },
|
|
933
|
-
{ type: 'address', name: 'feeRecipient' },
|
|
934
|
-
{ type: 'uint64', name: 'index' },
|
|
935
|
-
{ type: 'uint64', name: 'addedAtHeight' },
|
|
936
|
-
{ type: 'uint64', name: 'deactivatedAtHeight' },
|
|
937
|
-
],
|
|
938
|
-
},
|
|
939
|
-
],
|
|
1134
|
+
stateMutability: 'nonpayable',
|
|
1135
|
+
inputs: [{ type: 'uint64', name: 'newPolicyId' }],
|
|
1136
|
+
outputs: [],
|
|
940
1137
|
},
|
|
941
1138
|
{
|
|
942
|
-
name: '
|
|
1139
|
+
name: 'setSupplyCap',
|
|
943
1140
|
type: 'function',
|
|
944
|
-
stateMutability: '
|
|
945
|
-
inputs: [],
|
|
946
|
-
outputs: [
|
|
1141
|
+
stateMutability: 'nonpayable',
|
|
1142
|
+
inputs: [{ type: 'uint256', name: 'newSupplyCap' }],
|
|
1143
|
+
outputs: [],
|
|
947
1144
|
},
|
|
948
1145
|
{
|
|
949
|
-
name: '
|
|
1146
|
+
name: 'pause',
|
|
950
1147
|
type: 'function',
|
|
951
|
-
stateMutability: '
|
|
1148
|
+
stateMutability: 'nonpayable',
|
|
952
1149
|
inputs: [],
|
|
953
|
-
outputs: [
|
|
1150
|
+
outputs: [],
|
|
954
1151
|
},
|
|
955
1152
|
{
|
|
956
|
-
name: '
|
|
1153
|
+
name: 'unpause',
|
|
957
1154
|
type: 'function',
|
|
958
|
-
stateMutability: '
|
|
1155
|
+
stateMutability: 'nonpayable',
|
|
959
1156
|
inputs: [],
|
|
960
|
-
outputs: [
|
|
1157
|
+
outputs: [],
|
|
961
1158
|
},
|
|
962
1159
|
{
|
|
963
|
-
name: '
|
|
1160
|
+
name: 'setNextQuoteToken',
|
|
964
1161
|
type: 'function',
|
|
965
|
-
stateMutability: '
|
|
966
|
-
inputs: [{ type: '
|
|
967
|
-
outputs: [
|
|
968
|
-
{
|
|
969
|
-
type: 'tuple',
|
|
970
|
-
components: [
|
|
971
|
-
{ type: 'bytes32', name: 'publicKey' },
|
|
972
|
-
{ type: 'address', name: 'validatorAddress' },
|
|
973
|
-
{ type: 'string', name: 'ingress' },
|
|
974
|
-
{ type: 'string', name: 'egress' },
|
|
975
|
-
{ type: 'address', name: 'feeRecipient' },
|
|
976
|
-
{ type: 'uint64', name: 'index' },
|
|
977
|
-
{ type: 'uint64', name: 'addedAtHeight' },
|
|
978
|
-
{ type: 'uint64', name: 'deactivatedAtHeight' },
|
|
979
|
-
],
|
|
980
|
-
},
|
|
981
|
-
],
|
|
1162
|
+
stateMutability: 'nonpayable',
|
|
1163
|
+
inputs: [{ type: 'address', name: 'newQuoteToken' }],
|
|
1164
|
+
outputs: [],
|
|
982
1165
|
},
|
|
983
1166
|
{
|
|
984
|
-
name: '
|
|
1167
|
+
name: 'completeQuoteTokenUpdate',
|
|
1168
|
+
type: 'function',
|
|
1169
|
+
stateMutability: 'nonpayable',
|
|
1170
|
+
inputs: [],
|
|
1171
|
+
outputs: [],
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
name: 'PAUSE_ROLE',
|
|
985
1175
|
type: 'function',
|
|
986
1176
|
stateMutability: 'view',
|
|
987
|
-
inputs: [
|
|
988
|
-
outputs: [
|
|
989
|
-
{
|
|
990
|
-
type: 'tuple',
|
|
991
|
-
components: [
|
|
992
|
-
{ type: 'bytes32', name: 'publicKey' },
|
|
993
|
-
{ type: 'address', name: 'validatorAddress' },
|
|
994
|
-
{ type: 'string', name: 'ingress' },
|
|
995
|
-
{ type: 'string', name: 'egress' },
|
|
996
|
-
{ type: 'address', name: 'feeRecipient' },
|
|
997
|
-
{ type: 'uint64', name: 'index' },
|
|
998
|
-
{ type: 'uint64', name: 'addedAtHeight' },
|
|
999
|
-
{ type: 'uint64', name: 'deactivatedAtHeight' },
|
|
1000
|
-
],
|
|
1001
|
-
},
|
|
1002
|
-
],
|
|
1177
|
+
inputs: [],
|
|
1178
|
+
outputs: [{ type: 'bytes32' }],
|
|
1003
1179
|
},
|
|
1004
1180
|
{
|
|
1005
|
-
name: '
|
|
1181
|
+
name: 'UNPAUSE_ROLE',
|
|
1006
1182
|
type: 'function',
|
|
1007
1183
|
stateMutability: 'view',
|
|
1008
|
-
inputs: [
|
|
1009
|
-
outputs: [
|
|
1010
|
-
{
|
|
1011
|
-
type: 'tuple',
|
|
1012
|
-
components: [
|
|
1013
|
-
{ type: 'bytes32', name: 'publicKey' },
|
|
1014
|
-
{ type: 'address', name: 'validatorAddress' },
|
|
1015
|
-
{ type: 'string', name: 'ingress' },
|
|
1016
|
-
{ type: 'string', name: 'egress' },
|
|
1017
|
-
{ type: 'address', name: 'feeRecipient' },
|
|
1018
|
-
{ type: 'uint64', name: 'index' },
|
|
1019
|
-
{ type: 'uint64', name: 'addedAtHeight' },
|
|
1020
|
-
{ type: 'uint64', name: 'deactivatedAtHeight' },
|
|
1021
|
-
],
|
|
1022
|
-
},
|
|
1023
|
-
],
|
|
1184
|
+
inputs: [],
|
|
1185
|
+
outputs: [{ type: 'bytes32' }],
|
|
1024
1186
|
},
|
|
1025
1187
|
{
|
|
1026
|
-
name: '
|
|
1188
|
+
name: 'ISSUER_ROLE',
|
|
1027
1189
|
type: 'function',
|
|
1028
1190
|
stateMutability: 'view',
|
|
1029
1191
|
inputs: [],
|
|
1030
|
-
outputs: [{ type: '
|
|
1192
|
+
outputs: [{ type: 'bytes32' }],
|
|
1031
1193
|
},
|
|
1032
1194
|
{
|
|
1033
|
-
name: '
|
|
1195
|
+
name: 'BURN_BLOCKED_ROLE',
|
|
1034
1196
|
type: 'function',
|
|
1035
1197
|
stateMutability: 'view',
|
|
1036
1198
|
inputs: [],
|
|
1037
|
-
outputs: [{ type: '
|
|
1199
|
+
outputs: [{ type: 'bytes32' }],
|
|
1038
1200
|
},
|
|
1039
1201
|
{
|
|
1040
|
-
name: '
|
|
1202
|
+
name: 'permit',
|
|
1041
1203
|
type: 'function',
|
|
1042
1204
|
stateMutability: 'nonpayable',
|
|
1043
1205
|
inputs: [
|
|
1044
|
-
{ type: 'address', name: '
|
|
1045
|
-
{ type: '
|
|
1046
|
-
{ type: '
|
|
1047
|
-
{ type: '
|
|
1048
|
-
{ type: '
|
|
1049
|
-
{ type: '
|
|
1206
|
+
{ type: 'address', name: 'owner' },
|
|
1207
|
+
{ type: 'address', name: 'spender' },
|
|
1208
|
+
{ type: 'uint256', name: 'value' },
|
|
1209
|
+
{ type: 'uint256', name: 'deadline' },
|
|
1210
|
+
{ type: 'uint8', name: 'v' },
|
|
1211
|
+
{ type: 'bytes32', name: 'r' },
|
|
1212
|
+
{ type: 'bytes32', name: 's' },
|
|
1050
1213
|
],
|
|
1051
|
-
outputs: [
|
|
1214
|
+
outputs: [],
|
|
1052
1215
|
},
|
|
1053
1216
|
{
|
|
1054
|
-
name: '
|
|
1217
|
+
name: 'nonces',
|
|
1055
1218
|
type: 'function',
|
|
1056
|
-
stateMutability: '
|
|
1057
|
-
inputs: [{ type: '
|
|
1058
|
-
outputs: [],
|
|
1219
|
+
stateMutability: 'view',
|
|
1220
|
+
inputs: [{ type: 'address', name: 'owner' }],
|
|
1221
|
+
outputs: [{ type: 'uint256' }],
|
|
1059
1222
|
},
|
|
1060
1223
|
{
|
|
1061
|
-
name: '
|
|
1224
|
+
name: 'DOMAIN_SEPARATOR',
|
|
1062
1225
|
type: 'function',
|
|
1063
|
-
stateMutability: '
|
|
1064
|
-
inputs: [
|
|
1065
|
-
|
|
1066
|
-
{ type: 'bytes32', name: 'publicKey' },
|
|
1067
|
-
{ type: 'string', name: 'ingress' },
|
|
1068
|
-
{ type: 'string', name: 'egress' },
|
|
1069
|
-
{ type: 'bytes', name: 'signature' },
|
|
1070
|
-
],
|
|
1071
|
-
outputs: [],
|
|
1226
|
+
stateMutability: 'view',
|
|
1227
|
+
inputs: [],
|
|
1228
|
+
outputs: [{ type: 'bytes32' }],
|
|
1072
1229
|
},
|
|
1073
1230
|
{
|
|
1074
|
-
name: '
|
|
1231
|
+
name: 'distributeReward',
|
|
1075
1232
|
type: 'function',
|
|
1076
1233
|
stateMutability: 'nonpayable',
|
|
1077
|
-
inputs: [
|
|
1078
|
-
{ type: 'uint64', name: 'idx' },
|
|
1079
|
-
{ type: 'address', name: 'feeRecipient' },
|
|
1080
|
-
],
|
|
1234
|
+
inputs: [{ type: 'uint256', name: 'amount' }],
|
|
1081
1235
|
outputs: [],
|
|
1082
1236
|
},
|
|
1083
1237
|
{
|
|
1084
|
-
name: '
|
|
1238
|
+
name: 'setRewardRecipient',
|
|
1085
1239
|
type: 'function',
|
|
1086
1240
|
stateMutability: 'nonpayable',
|
|
1087
|
-
inputs: [
|
|
1088
|
-
{ type: 'uint64', name: 'idx' },
|
|
1089
|
-
{ type: 'string', name: 'ingress' },
|
|
1090
|
-
{ type: 'string', name: 'egress' },
|
|
1091
|
-
],
|
|
1241
|
+
inputs: [{ type: 'address', name: 'recipient' }],
|
|
1092
1242
|
outputs: [],
|
|
1093
1243
|
},
|
|
1094
1244
|
{
|
|
1095
|
-
name: '
|
|
1245
|
+
name: 'claimRewards',
|
|
1096
1246
|
type: 'function',
|
|
1097
1247
|
stateMutability: 'nonpayable',
|
|
1098
|
-
inputs: [
|
|
1099
|
-
|
|
1100
|
-
{ type: 'address', name: 'newAddress' },
|
|
1101
|
-
],
|
|
1102
|
-
outputs: [],
|
|
1248
|
+
inputs: [],
|
|
1249
|
+
outputs: [{ type: 'uint256' }],
|
|
1103
1250
|
},
|
|
1104
1251
|
{
|
|
1105
|
-
name: '
|
|
1252
|
+
name: 'optedInSupply',
|
|
1106
1253
|
type: 'function',
|
|
1107
|
-
stateMutability: '
|
|
1108
|
-
inputs: [
|
|
1109
|
-
outputs: [],
|
|
1254
|
+
stateMutability: 'view',
|
|
1255
|
+
inputs: [],
|
|
1256
|
+
outputs: [{ type: 'uint128' }],
|
|
1110
1257
|
},
|
|
1111
1258
|
{
|
|
1112
|
-
name: '
|
|
1259
|
+
name: 'globalRewardPerToken',
|
|
1113
1260
|
type: 'function',
|
|
1114
|
-
stateMutability: '
|
|
1115
|
-
inputs: [
|
|
1116
|
-
outputs: [],
|
|
1261
|
+
stateMutability: 'view',
|
|
1262
|
+
inputs: [],
|
|
1263
|
+
outputs: [{ type: 'uint256' }],
|
|
1117
1264
|
},
|
|
1118
1265
|
{
|
|
1119
|
-
name: '
|
|
1266
|
+
name: 'userRewardInfo',
|
|
1120
1267
|
type: 'function',
|
|
1121
|
-
stateMutability: '
|
|
1122
|
-
inputs: [{ type: '
|
|
1123
|
-
outputs: [
|
|
1268
|
+
stateMutability: 'view',
|
|
1269
|
+
inputs: [{ type: 'address', name: 'account' }],
|
|
1270
|
+
outputs: [
|
|
1271
|
+
{
|
|
1272
|
+
type: 'tuple',
|
|
1273
|
+
components: [
|
|
1274
|
+
{ type: 'address', name: 'rewardRecipient' },
|
|
1275
|
+
{ type: 'uint256', name: 'rewardPerToken' },
|
|
1276
|
+
{ type: 'uint256', name: 'rewardBalance' },
|
|
1277
|
+
],
|
|
1278
|
+
},
|
|
1279
|
+
],
|
|
1124
1280
|
},
|
|
1125
1281
|
{
|
|
1126
|
-
name: '
|
|
1282
|
+
name: 'getPendingRewards',
|
|
1127
1283
|
type: 'function',
|
|
1128
|
-
stateMutability: '
|
|
1129
|
-
inputs: [],
|
|
1130
|
-
outputs: [],
|
|
1284
|
+
stateMutability: 'view',
|
|
1285
|
+
inputs: [{ type: 'address', name: 'account' }],
|
|
1286
|
+
outputs: [{ type: 'uint128' }],
|
|
1131
1287
|
},
|
|
1132
1288
|
{
|
|
1133
|
-
name: '
|
|
1289
|
+
name: 'Transfer',
|
|
1134
1290
|
type: 'event',
|
|
1135
1291
|
inputs: [
|
|
1136
|
-
{ type: '
|
|
1137
|
-
{ type: 'address', name: '
|
|
1138
|
-
{ type: '
|
|
1139
|
-
{ type: 'string', name: 'ingress' },
|
|
1140
|
-
{ type: 'string', name: 'egress' },
|
|
1141
|
-
{ type: 'address', name: 'feeRecipient' },
|
|
1292
|
+
{ type: 'address', name: 'from', indexed: true },
|
|
1293
|
+
{ type: 'address', name: 'to', indexed: true },
|
|
1294
|
+
{ type: 'uint256', name: 'amount' },
|
|
1142
1295
|
],
|
|
1143
1296
|
},
|
|
1144
1297
|
{
|
|
1145
|
-
name: '
|
|
1298
|
+
name: 'Approval',
|
|
1146
1299
|
type: 'event',
|
|
1147
1300
|
inputs: [
|
|
1148
|
-
{ type: '
|
|
1149
|
-
{ type: 'address', name: '
|
|
1301
|
+
{ type: 'address', name: 'owner', indexed: true },
|
|
1302
|
+
{ type: 'address', name: 'spender', indexed: true },
|
|
1303
|
+
{ type: 'uint256', name: 'amount' },
|
|
1150
1304
|
],
|
|
1151
1305
|
},
|
|
1152
1306
|
{
|
|
1153
|
-
name: '
|
|
1307
|
+
name: 'Mint',
|
|
1154
1308
|
type: 'event',
|
|
1155
1309
|
inputs: [
|
|
1156
|
-
{ type: '
|
|
1157
|
-
{ type: '
|
|
1158
|
-
{ type: 'address', name: 'validatorAddress', indexed: true },
|
|
1159
|
-
{ type: 'bytes32', name: 'oldPublicKey' },
|
|
1160
|
-
{ type: 'bytes32', name: 'newPublicKey' },
|
|
1161
|
-
{ type: 'string', name: 'ingress' },
|
|
1162
|
-
{ type: 'string', name: 'egress' },
|
|
1163
|
-
{ type: 'address', name: 'caller' },
|
|
1310
|
+
{ type: 'address', name: 'to', indexed: true },
|
|
1311
|
+
{ type: 'uint256', name: 'amount' },
|
|
1164
1312
|
],
|
|
1165
1313
|
},
|
|
1166
1314
|
{
|
|
1167
|
-
name: '
|
|
1315
|
+
name: 'Burn',
|
|
1168
1316
|
type: 'event',
|
|
1169
1317
|
inputs: [
|
|
1170
|
-
{ type: '
|
|
1171
|
-
{ type: '
|
|
1172
|
-
{ type: 'address', name: 'caller' },
|
|
1318
|
+
{ type: 'address', name: 'from', indexed: true },
|
|
1319
|
+
{ type: 'uint256', name: 'amount' },
|
|
1173
1320
|
],
|
|
1174
1321
|
},
|
|
1175
1322
|
{
|
|
1176
|
-
name: '
|
|
1323
|
+
name: 'BurnBlocked',
|
|
1177
1324
|
type: 'event',
|
|
1178
1325
|
inputs: [
|
|
1179
|
-
{ type: '
|
|
1180
|
-
{ type: '
|
|
1181
|
-
{ type: 'string', name: 'egress' },
|
|
1182
|
-
{ type: 'address', name: 'caller' },
|
|
1326
|
+
{ type: 'address', name: 'from', indexed: true },
|
|
1327
|
+
{ type: 'uint256', name: 'amount' },
|
|
1183
1328
|
],
|
|
1184
1329
|
},
|
|
1185
1330
|
{
|
|
1186
|
-
name: '
|
|
1331
|
+
name: 'TransferWithMemo',
|
|
1187
1332
|
type: 'event',
|
|
1188
1333
|
inputs: [
|
|
1189
|
-
{ type: '
|
|
1190
|
-
{ type: 'address', name: '
|
|
1191
|
-
{ type: '
|
|
1192
|
-
{ type: '
|
|
1334
|
+
{ type: 'address', name: 'from', indexed: true },
|
|
1335
|
+
{ type: 'address', name: 'to', indexed: true },
|
|
1336
|
+
{ type: 'uint256', name: 'amount' },
|
|
1337
|
+
{ type: 'bytes32', name: 'memo', indexed: true },
|
|
1193
1338
|
],
|
|
1194
1339
|
},
|
|
1195
1340
|
{
|
|
1196
|
-
name: '
|
|
1341
|
+
name: 'TransferPolicyUpdate',
|
|
1197
1342
|
type: 'event',
|
|
1198
1343
|
inputs: [
|
|
1199
|
-
{ type: 'address', name: '
|
|
1200
|
-
{ type: '
|
|
1344
|
+
{ type: 'address', name: 'updater', indexed: true },
|
|
1345
|
+
{ type: 'uint64', name: 'newPolicyId', indexed: true },
|
|
1201
1346
|
],
|
|
1202
1347
|
},
|
|
1203
1348
|
{
|
|
1204
|
-
name: '
|
|
1349
|
+
name: 'SupplyCapUpdate',
|
|
1205
1350
|
type: 'event',
|
|
1206
1351
|
inputs: [
|
|
1207
|
-
{ type: '
|
|
1208
|
-
{ type: '
|
|
1209
|
-
{ type: 'bytes32', name: 'publicKey' },
|
|
1352
|
+
{ type: 'address', name: 'updater', indexed: true },
|
|
1353
|
+
{ type: 'uint256', name: 'newSupplyCap', indexed: true },
|
|
1210
1354
|
],
|
|
1211
1355
|
},
|
|
1212
1356
|
{
|
|
1213
|
-
name: '
|
|
1357
|
+
name: 'PauseStateUpdate',
|
|
1214
1358
|
type: 'event',
|
|
1215
1359
|
inputs: [
|
|
1216
|
-
{ type: '
|
|
1217
|
-
{ type: '
|
|
1360
|
+
{ type: 'address', name: 'updater', indexed: true },
|
|
1361
|
+
{ type: 'bool', name: 'isPaused' },
|
|
1218
1362
|
],
|
|
1219
1363
|
},
|
|
1220
1364
|
{
|
|
1221
|
-
name: '
|
|
1222
|
-
type: 'event',
|
|
1223
|
-
inputs: [{ type: 'uint64', name: 'height' }],
|
|
1224
|
-
},
|
|
1225
|
-
{
|
|
1226
|
-
name: 'SkippedValidatorMigration',
|
|
1365
|
+
name: 'NextQuoteTokenSet',
|
|
1227
1366
|
type: 'event',
|
|
1228
1367
|
inputs: [
|
|
1229
|
-
{ type: '
|
|
1230
|
-
{ type: 'address', name: '
|
|
1231
|
-
{ type: 'bytes32', name: 'publicKey' },
|
|
1368
|
+
{ type: 'address', name: 'updater', indexed: true },
|
|
1369
|
+
{ type: 'address', name: 'nextQuoteToken', indexed: true },
|
|
1232
1370
|
],
|
|
1233
1371
|
},
|
|
1234
|
-
{ name: 'AlreadyInitialized', type: 'error', inputs: [] },
|
|
1235
|
-
{
|
|
1236
|
-
name: 'IngressAlreadyExists',
|
|
1237
|
-
type: 'error',
|
|
1238
|
-
inputs: [{ type: 'string', name: 'ingress' }],
|
|
1239
|
-
},
|
|
1240
|
-
{ name: 'EmptyV1ValidatorSet', type: 'error', inputs: [] },
|
|
1241
|
-
{ name: 'InvalidMigrationIndex', type: 'error', inputs: [] },
|
|
1242
|
-
{ name: 'InvalidOwner', type: 'error', inputs: [] },
|
|
1243
|
-
{ name: 'InvalidPublicKey', type: 'error', inputs: [] },
|
|
1244
|
-
{ name: 'InvalidSignature', type: 'error', inputs: [] },
|
|
1245
|
-
{ name: 'InvalidSignatureFormat', type: 'error', inputs: [] },
|
|
1246
|
-
{ name: 'InvalidValidatorAddress', type: 'error', inputs: [] },
|
|
1247
|
-
{ name: 'MigrationNotComplete', type: 'error', inputs: [] },
|
|
1248
|
-
{ name: 'NotInitialized', type: 'error', inputs: [] },
|
|
1249
1372
|
{
|
|
1250
|
-
name: '
|
|
1251
|
-
type: '
|
|
1373
|
+
name: 'QuoteTokenUpdate',
|
|
1374
|
+
type: 'event',
|
|
1252
1375
|
inputs: [
|
|
1253
|
-
{ type: '
|
|
1254
|
-
{ type: '
|
|
1376
|
+
{ type: 'address', name: 'updater', indexed: true },
|
|
1377
|
+
{ type: 'address', name: 'newQuoteToken', indexed: true },
|
|
1255
1378
|
],
|
|
1256
1379
|
},
|
|
1257
1380
|
{
|
|
1258
|
-
name: '
|
|
1259
|
-
type: '
|
|
1381
|
+
name: 'RewardDistributed',
|
|
1382
|
+
type: 'event',
|
|
1260
1383
|
inputs: [
|
|
1261
|
-
{ type: '
|
|
1262
|
-
{ type: '
|
|
1384
|
+
{ type: 'address', name: 'funder', indexed: true },
|
|
1385
|
+
{ type: 'uint256', name: 'amount' },
|
|
1263
1386
|
],
|
|
1264
1387
|
},
|
|
1265
|
-
{ name: 'PublicKeyAlreadyExists', type: 'error', inputs: [] },
|
|
1266
|
-
{ name: 'Unauthorized', type: 'error', inputs: [] },
|
|
1267
|
-
{ name: 'AddressAlreadyHasValidator', type: 'error', inputs: [] },
|
|
1268
|
-
{ name: 'ValidatorAlreadyDeactivated', type: 'error', inputs: [] },
|
|
1269
|
-
{ name: 'ValidatorNotFound', type: 'error', inputs: [] },
|
|
1270
|
-
];
|
|
1271
|
-
export const signatureVerifier = [
|
|
1272
1388
|
{
|
|
1273
|
-
name: '
|
|
1274
|
-
type: '
|
|
1275
|
-
stateMutability: 'view',
|
|
1389
|
+
name: 'RewardRecipientSet',
|
|
1390
|
+
type: 'event',
|
|
1276
1391
|
inputs: [
|
|
1277
|
-
{ type: '
|
|
1278
|
-
{ type: '
|
|
1392
|
+
{ type: 'address', name: 'holder', indexed: true },
|
|
1393
|
+
{ type: 'address', name: 'recipient', indexed: true },
|
|
1279
1394
|
],
|
|
1280
|
-
outputs: [{ type: 'address', name: 'signer' }],
|
|
1281
1395
|
},
|
|
1282
1396
|
{
|
|
1283
|
-
name: '
|
|
1284
|
-
type: '
|
|
1285
|
-
stateMutability: 'view',
|
|
1397
|
+
name: 'LogoURIUpdated',
|
|
1398
|
+
type: 'event',
|
|
1286
1399
|
inputs: [
|
|
1287
|
-
{ type: 'address', name: '
|
|
1288
|
-
{ type: '
|
|
1289
|
-
{ type: 'bytes', name: 'signature' },
|
|
1400
|
+
{ type: 'address', name: 'updater', indexed: true },
|
|
1401
|
+
{ type: 'string', name: 'newLogoURI' },
|
|
1290
1402
|
],
|
|
1291
|
-
outputs: [{ type: 'bool' }],
|
|
1292
1403
|
},
|
|
1293
1404
|
{
|
|
1294
|
-
name: '
|
|
1295
|
-
type: '
|
|
1296
|
-
stateMutability: 'view',
|
|
1405
|
+
name: 'InsufficientBalance',
|
|
1406
|
+
type: 'error',
|
|
1297
1407
|
inputs: [
|
|
1298
|
-
{ type: '
|
|
1299
|
-
{ type: '
|
|
1300
|
-
{ type: '
|
|
1408
|
+
{ type: 'uint256', name: 'available' },
|
|
1409
|
+
{ type: 'uint256', name: 'required' },
|
|
1410
|
+
{ type: 'address', name: 'token' },
|
|
1301
1411
|
],
|
|
1302
|
-
outputs: [{ type: 'bool' }],
|
|
1303
1412
|
},
|
|
1413
|
+
{ name: 'InsufficientAllowance', type: 'error', inputs: [] },
|
|
1414
|
+
{ name: 'SupplyCapExceeded', type: 'error', inputs: [] },
|
|
1415
|
+
{ name: 'InvalidSupplyCap', type: 'error', inputs: [] },
|
|
1416
|
+
{ name: 'InvalidPayload', type: 'error', inputs: [] },
|
|
1417
|
+
{ name: 'PolicyForbids', type: 'error', inputs: [] },
|
|
1418
|
+
{ name: 'InvalidRecipient', type: 'error', inputs: [] },
|
|
1419
|
+
{ name: 'ContractPaused', type: 'error', inputs: [] },
|
|
1420
|
+
{ name: 'InvalidCurrency', type: 'error', inputs: [] },
|
|
1421
|
+
{ name: 'InvalidQuoteToken', type: 'error', inputs: [] },
|
|
1422
|
+
{ name: 'InvalidAmount', type: 'error', inputs: [] },
|
|
1423
|
+
{ name: 'NoOptedInSupply', type: 'error', inputs: [] },
|
|
1424
|
+
{ name: 'Unauthorized', type: 'error', inputs: [] },
|
|
1425
|
+
{ name: 'ProtectedAddress', type: 'error', inputs: [] },
|
|
1426
|
+
{ name: 'InvalidToken', type: 'error', inputs: [] },
|
|
1427
|
+
{ name: 'Uninitialized', type: 'error', inputs: [] },
|
|
1428
|
+
{ name: 'InvalidTransferPolicyId', type: 'error', inputs: [] },
|
|
1429
|
+
{ name: 'PermitExpired', type: 'error', inputs: [] },
|
|
1430
|
+
{ name: 'InvalidSignature', type: 'error', inputs: [] },
|
|
1431
|
+
{ name: 'LogoURITooLong', type: 'error', inputs: [] },
|
|
1432
|
+
{ name: 'InvalidLogoURI', type: 'error', inputs: [] },
|
|
1304
1433
|
{
|
|
1305
|
-
name: '
|
|
1434
|
+
name: 'hasRole',
|
|
1306
1435
|
type: 'function',
|
|
1307
1436
|
stateMutability: 'view',
|
|
1308
1437
|
inputs: [
|
|
1309
1438
|
{ type: 'address', name: 'account' },
|
|
1310
|
-
{ type: 'bytes32', name: '
|
|
1311
|
-
{ type: 'bytes', name: 'signature' },
|
|
1439
|
+
{ type: 'bytes32', name: 'role' },
|
|
1312
1440
|
],
|
|
1313
1441
|
outputs: [{ type: 'bool' }],
|
|
1314
1442
|
},
|
|
1315
|
-
{ name: 'InvalidFormat', type: 'error', inputs: [] },
|
|
1316
|
-
{ name: 'InvalidSignature', type: 'error', inputs: [] },
|
|
1317
|
-
];
|
|
1318
|
-
export const stablecoinDex = [
|
|
1319
1443
|
{
|
|
1320
|
-
name: '
|
|
1444
|
+
name: 'getRoleAdmin',
|
|
1321
1445
|
type: 'function',
|
|
1322
|
-
stateMutability: '
|
|
1323
|
-
inputs: [{ type: '
|
|
1324
|
-
outputs: [{ type: 'bytes32'
|
|
1446
|
+
stateMutability: 'view',
|
|
1447
|
+
inputs: [{ type: 'bytes32', name: 'role' }],
|
|
1448
|
+
outputs: [{ type: 'bytes32' }],
|
|
1325
1449
|
},
|
|
1326
1450
|
{
|
|
1327
|
-
name: '
|
|
1451
|
+
name: 'grantRole',
|
|
1328
1452
|
type: 'function',
|
|
1329
1453
|
stateMutability: 'nonpayable',
|
|
1330
1454
|
inputs: [
|
|
1331
|
-
{ type: '
|
|
1332
|
-
{ type: '
|
|
1333
|
-
{ type: 'bool', name: 'isBid' },
|
|
1334
|
-
{ type: 'int16', name: 'tick' },
|
|
1455
|
+
{ type: 'bytes32', name: 'role' },
|
|
1456
|
+
{ type: 'address', name: 'account' },
|
|
1335
1457
|
],
|
|
1336
|
-
outputs: [
|
|
1458
|
+
outputs: [],
|
|
1337
1459
|
},
|
|
1338
1460
|
{
|
|
1339
|
-
name: '
|
|
1461
|
+
name: 'revokeRole',
|
|
1340
1462
|
type: 'function',
|
|
1341
1463
|
stateMutability: 'nonpayable',
|
|
1342
1464
|
inputs: [
|
|
1343
|
-
{ type: '
|
|
1344
|
-
{ type: '
|
|
1345
|
-
{ type: 'bool', name: 'isBid' },
|
|
1346
|
-
{ type: 'int16', name: 'tick' },
|
|
1347
|
-
{ type: 'int16', name: 'flipTick' },
|
|
1465
|
+
{ type: 'bytes32', name: 'role' },
|
|
1466
|
+
{ type: 'address', name: 'account' },
|
|
1348
1467
|
],
|
|
1349
|
-
outputs: [{ type: 'uint128', name: 'orderId' }],
|
|
1350
|
-
},
|
|
1351
|
-
{
|
|
1352
|
-
name: 'cancel',
|
|
1353
|
-
type: 'function',
|
|
1354
|
-
stateMutability: 'nonpayable',
|
|
1355
|
-
inputs: [{ type: 'uint128', name: 'orderId' }],
|
|
1356
1468
|
outputs: [],
|
|
1357
1469
|
},
|
|
1358
1470
|
{
|
|
1359
|
-
name: '
|
|
1471
|
+
name: 'renounceRole',
|
|
1360
1472
|
type: 'function',
|
|
1361
1473
|
stateMutability: 'nonpayable',
|
|
1362
|
-
inputs: [{ type: '
|
|
1474
|
+
inputs: [{ type: 'bytes32', name: 'role' }],
|
|
1363
1475
|
outputs: [],
|
|
1364
1476
|
},
|
|
1365
1477
|
{
|
|
1366
|
-
name: '
|
|
1478
|
+
name: 'setRoleAdmin',
|
|
1367
1479
|
type: 'function',
|
|
1368
1480
|
stateMutability: 'nonpayable',
|
|
1369
1481
|
inputs: [
|
|
1370
|
-
{ type: '
|
|
1371
|
-
{ type: '
|
|
1372
|
-
{ type: 'uint128', name: 'amountIn' },
|
|
1373
|
-
{ type: 'uint128', name: 'minAmountOut' },
|
|
1482
|
+
{ type: 'bytes32', name: 'role' },
|
|
1483
|
+
{ type: 'bytes32', name: 'adminRole' },
|
|
1374
1484
|
],
|
|
1375
|
-
outputs: [
|
|
1485
|
+
outputs: [],
|
|
1376
1486
|
},
|
|
1377
1487
|
{
|
|
1378
|
-
name: '
|
|
1379
|
-
type: '
|
|
1380
|
-
stateMutability: 'nonpayable',
|
|
1488
|
+
name: 'RoleMembershipUpdated',
|
|
1489
|
+
type: 'event',
|
|
1381
1490
|
inputs: [
|
|
1382
|
-
{ type: '
|
|
1383
|
-
{ type: 'address', name: '
|
|
1384
|
-
{ type: '
|
|
1385
|
-
{ type: '
|
|
1491
|
+
{ type: 'bytes32', name: 'role', indexed: true },
|
|
1492
|
+
{ type: 'address', name: 'account', indexed: true },
|
|
1493
|
+
{ type: 'address', name: 'sender', indexed: true },
|
|
1494
|
+
{ type: 'bool', name: 'hasRole' },
|
|
1386
1495
|
],
|
|
1387
|
-
outputs: [{ type: 'uint128', name: 'amountIn' }],
|
|
1388
1496
|
},
|
|
1389
1497
|
{
|
|
1390
|
-
name: '
|
|
1391
|
-
type: '
|
|
1392
|
-
stateMutability: 'view',
|
|
1498
|
+
name: 'RoleAdminUpdated',
|
|
1499
|
+
type: 'event',
|
|
1393
1500
|
inputs: [
|
|
1394
|
-
{ type: '
|
|
1395
|
-
{ type: '
|
|
1396
|
-
{ type: '
|
|
1501
|
+
{ type: 'bytes32', name: 'role', indexed: true },
|
|
1502
|
+
{ type: 'bytes32', name: 'newAdminRole', indexed: true },
|
|
1503
|
+
{ type: 'address', name: 'sender', indexed: true },
|
|
1397
1504
|
],
|
|
1398
|
-
outputs: [{ type: 'uint128', name: 'amountOut' }],
|
|
1399
1505
|
},
|
|
1506
|
+
{ name: 'Unauthorized', type: 'error', inputs: [] },
|
|
1507
|
+
];
|
|
1508
|
+
export const tip20ChannelReserve = [
|
|
1400
1509
|
{
|
|
1401
|
-
name: '
|
|
1510
|
+
name: 'CLOSE_GRACE_PERIOD',
|
|
1402
1511
|
type: 'function',
|
|
1403
1512
|
stateMutability: 'view',
|
|
1404
|
-
inputs: [
|
|
1405
|
-
|
|
1406
|
-
{ type: 'address', name: 'tokenOut' },
|
|
1407
|
-
{ type: 'uint128', name: 'amountOut' },
|
|
1408
|
-
],
|
|
1409
|
-
outputs: [{ type: 'uint128', name: 'amountIn' }],
|
|
1513
|
+
inputs: [],
|
|
1514
|
+
outputs: [{ type: 'uint64' }],
|
|
1410
1515
|
},
|
|
1411
1516
|
{
|
|
1412
|
-
name: '
|
|
1517
|
+
name: 'VOUCHER_TYPEHASH',
|
|
1413
1518
|
type: 'function',
|
|
1414
1519
|
stateMutability: 'view',
|
|
1415
|
-
inputs: [
|
|
1416
|
-
|
|
1417
|
-
{ type: 'address', name: 'token' },
|
|
1418
|
-
],
|
|
1419
|
-
outputs: [{ type: 'uint128' }],
|
|
1520
|
+
inputs: [],
|
|
1521
|
+
outputs: [{ type: 'bytes32' }],
|
|
1420
1522
|
},
|
|
1421
1523
|
{
|
|
1422
|
-
name: '
|
|
1524
|
+
name: 'open',
|
|
1423
1525
|
type: 'function',
|
|
1424
1526
|
stateMutability: 'nonpayable',
|
|
1425
1527
|
inputs: [
|
|
1528
|
+
{ type: 'address', name: 'payee' },
|
|
1529
|
+
{ type: 'address', name: 'operator' },
|
|
1426
1530
|
{ type: 'address', name: 'token' },
|
|
1427
|
-
{ type: '
|
|
1531
|
+
{ type: 'uint96', name: 'deposit' },
|
|
1532
|
+
{ type: 'bytes32', name: 'salt' },
|
|
1533
|
+
{ type: 'address', name: 'authorizedSigner' },
|
|
1428
1534
|
],
|
|
1429
|
-
outputs: [],
|
|
1535
|
+
outputs: [{ type: 'bytes32', name: 'channelId' }],
|
|
1430
1536
|
},
|
|
1431
1537
|
{
|
|
1432
|
-
name: '
|
|
1538
|
+
name: 'settle',
|
|
1433
1539
|
type: 'function',
|
|
1434
|
-
stateMutability: '
|
|
1435
|
-
inputs: [
|
|
1436
|
-
outputs: [
|
|
1540
|
+
stateMutability: 'nonpayable',
|
|
1541
|
+
inputs: [
|
|
1437
1542
|
{
|
|
1438
1543
|
type: 'tuple',
|
|
1544
|
+
name: 'descriptor',
|
|
1439
1545
|
components: [
|
|
1440
|
-
{ type: '
|
|
1441
|
-
{ type: 'address', name: '
|
|
1442
|
-
{ type: '
|
|
1443
|
-
{ type: '
|
|
1444
|
-
{ type: '
|
|
1445
|
-
{ type: '
|
|
1446
|
-
{ type: '
|
|
1447
|
-
{ type: 'uint128', name: 'prev' },
|
|
1448
|
-
{ type: 'uint128', name: 'next' },
|
|
1449
|
-
{ type: 'bool', name: 'isFlip' },
|
|
1450
|
-
{ type: 'int16', name: 'flipTick' },
|
|
1546
|
+
{ type: 'address', name: 'payer' },
|
|
1547
|
+
{ type: 'address', name: 'payee' },
|
|
1548
|
+
{ type: 'address', name: 'operator' },
|
|
1549
|
+
{ type: 'address', name: 'token' },
|
|
1550
|
+
{ type: 'bytes32', name: 'salt' },
|
|
1551
|
+
{ type: 'address', name: 'authorizedSigner' },
|
|
1552
|
+
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
1451
1553
|
],
|
|
1452
1554
|
},
|
|
1555
|
+
{ type: 'uint96', name: 'cumulativeAmount' },
|
|
1556
|
+
{ type: 'bytes', name: 'signature' },
|
|
1453
1557
|
],
|
|
1558
|
+
outputs: [],
|
|
1454
1559
|
},
|
|
1455
1560
|
{
|
|
1456
|
-
name: '
|
|
1561
|
+
name: 'topUp',
|
|
1457
1562
|
type: 'function',
|
|
1458
|
-
stateMutability: '
|
|
1563
|
+
stateMutability: 'nonpayable',
|
|
1459
1564
|
inputs: [
|
|
1460
|
-
{
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1565
|
+
{
|
|
1566
|
+
type: 'tuple',
|
|
1567
|
+
name: 'descriptor',
|
|
1568
|
+
components: [
|
|
1569
|
+
{ type: 'address', name: 'payer' },
|
|
1570
|
+
{ type: 'address', name: 'payee' },
|
|
1571
|
+
{ type: 'address', name: 'operator' },
|
|
1572
|
+
{ type: 'address', name: 'token' },
|
|
1573
|
+
{ type: 'bytes32', name: 'salt' },
|
|
1574
|
+
{ type: 'address', name: 'authorizedSigner' },
|
|
1575
|
+
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
1576
|
+
],
|
|
1577
|
+
},
|
|
1578
|
+
{ type: 'uint96', name: 'additionalDeposit' },
|
|
1468
1579
|
],
|
|
1580
|
+
outputs: [],
|
|
1469
1581
|
},
|
|
1470
1582
|
{
|
|
1471
|
-
name: '
|
|
1583
|
+
name: 'close',
|
|
1472
1584
|
type: 'function',
|
|
1473
|
-
stateMutability: '
|
|
1585
|
+
stateMutability: 'nonpayable',
|
|
1474
1586
|
inputs: [
|
|
1475
|
-
{
|
|
1476
|
-
|
|
1587
|
+
{
|
|
1588
|
+
type: 'tuple',
|
|
1589
|
+
name: 'descriptor',
|
|
1590
|
+
components: [
|
|
1591
|
+
{ type: 'address', name: 'payer' },
|
|
1592
|
+
{ type: 'address', name: 'payee' },
|
|
1593
|
+
{ type: 'address', name: 'operator' },
|
|
1594
|
+
{ type: 'address', name: 'token' },
|
|
1595
|
+
{ type: 'bytes32', name: 'salt' },
|
|
1596
|
+
{ type: 'address', name: 'authorizedSigner' },
|
|
1597
|
+
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
1598
|
+
],
|
|
1599
|
+
},
|
|
1600
|
+
{ type: 'uint96', name: 'cumulativeAmount' },
|
|
1601
|
+
{ type: 'uint96', name: 'captureAmount' },
|
|
1602
|
+
{ type: 'bytes', name: 'signature' },
|
|
1477
1603
|
],
|
|
1478
|
-
outputs: [
|
|
1479
|
-
},
|
|
1480
|
-
{
|
|
1481
|
-
name: 'nextOrderId',
|
|
1482
|
-
type: 'function',
|
|
1483
|
-
stateMutability: 'view',
|
|
1484
|
-
inputs: [],
|
|
1485
|
-
outputs: [{ type: 'uint128' }],
|
|
1604
|
+
outputs: [],
|
|
1486
1605
|
},
|
|
1487
1606
|
{
|
|
1488
|
-
name: '
|
|
1607
|
+
name: 'requestClose',
|
|
1489
1608
|
type: 'function',
|
|
1490
|
-
stateMutability: '
|
|
1491
|
-
inputs: [
|
|
1492
|
-
outputs: [
|
|
1609
|
+
stateMutability: 'nonpayable',
|
|
1610
|
+
inputs: [
|
|
1493
1611
|
{
|
|
1494
1612
|
type: 'tuple',
|
|
1613
|
+
name: 'descriptor',
|
|
1495
1614
|
components: [
|
|
1496
|
-
{ type: 'address', name: '
|
|
1497
|
-
{ type: 'address', name: '
|
|
1498
|
-
{ type: '
|
|
1499
|
-
{ type: '
|
|
1615
|
+
{ type: 'address', name: 'payer' },
|
|
1616
|
+
{ type: 'address', name: 'payee' },
|
|
1617
|
+
{ type: 'address', name: 'operator' },
|
|
1618
|
+
{ type: 'address', name: 'token' },
|
|
1619
|
+
{ type: 'bytes32', name: 'salt' },
|
|
1620
|
+
{ type: 'address', name: 'authorizedSigner' },
|
|
1621
|
+
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
1500
1622
|
],
|
|
1501
1623
|
},
|
|
1502
1624
|
],
|
|
1625
|
+
outputs: [],
|
|
1503
1626
|
},
|
|
1504
1627
|
{
|
|
1505
|
-
name: '
|
|
1628
|
+
name: 'withdraw',
|
|
1506
1629
|
type: 'function',
|
|
1507
|
-
stateMutability: '
|
|
1508
|
-
inputs: [
|
|
1509
|
-
|
|
1630
|
+
stateMutability: 'nonpayable',
|
|
1631
|
+
inputs: [
|
|
1632
|
+
{
|
|
1633
|
+
type: 'tuple',
|
|
1634
|
+
name: 'descriptor',
|
|
1635
|
+
components: [
|
|
1636
|
+
{ type: 'address', name: 'payer' },
|
|
1637
|
+
{ type: 'address', name: 'payee' },
|
|
1638
|
+
{ type: 'address', name: 'operator' },
|
|
1639
|
+
{ type: 'address', name: 'token' },
|
|
1640
|
+
{ type: 'bytes32', name: 'salt' },
|
|
1641
|
+
{ type: 'address', name: 'authorizedSigner' },
|
|
1642
|
+
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
1643
|
+
],
|
|
1644
|
+
},
|
|
1645
|
+
],
|
|
1646
|
+
outputs: [],
|
|
1510
1647
|
},
|
|
1511
1648
|
{
|
|
1512
|
-
name: '
|
|
1649
|
+
name: 'getChannel',
|
|
1513
1650
|
type: 'function',
|
|
1514
|
-
stateMutability: '
|
|
1515
|
-
inputs: [
|
|
1516
|
-
|
|
1651
|
+
stateMutability: 'view',
|
|
1652
|
+
inputs: [
|
|
1653
|
+
{
|
|
1654
|
+
type: 'tuple',
|
|
1655
|
+
name: 'descriptor',
|
|
1656
|
+
components: [
|
|
1657
|
+
{ type: 'address', name: 'payer' },
|
|
1658
|
+
{ type: 'address', name: 'payee' },
|
|
1659
|
+
{ type: 'address', name: 'operator' },
|
|
1660
|
+
{ type: 'address', name: 'token' },
|
|
1661
|
+
{ type: 'bytes32', name: 'salt' },
|
|
1662
|
+
{ type: 'address', name: 'authorizedSigner' },
|
|
1663
|
+
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
1664
|
+
],
|
|
1665
|
+
},
|
|
1666
|
+
],
|
|
1667
|
+
outputs: [
|
|
1668
|
+
{
|
|
1669
|
+
type: 'tuple',
|
|
1670
|
+
components: [
|
|
1671
|
+
{
|
|
1672
|
+
type: 'tuple',
|
|
1673
|
+
name: 'descriptor',
|
|
1674
|
+
components: [
|
|
1675
|
+
{ type: 'address', name: 'payer' },
|
|
1676
|
+
{ type: 'address', name: 'payee' },
|
|
1677
|
+
{ type: 'address', name: 'operator' },
|
|
1678
|
+
{ type: 'address', name: 'token' },
|
|
1679
|
+
{ type: 'bytes32', name: 'salt' },
|
|
1680
|
+
{ type: 'address', name: 'authorizedSigner' },
|
|
1681
|
+
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
1682
|
+
],
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
type: 'tuple',
|
|
1686
|
+
name: 'state',
|
|
1687
|
+
components: [
|
|
1688
|
+
{ type: 'uint96', name: 'settled' },
|
|
1689
|
+
{ type: 'uint96', name: 'deposit' },
|
|
1690
|
+
{ type: 'uint32', name: 'closeRequestedAt' },
|
|
1691
|
+
],
|
|
1692
|
+
},
|
|
1693
|
+
],
|
|
1694
|
+
},
|
|
1695
|
+
],
|
|
1517
1696
|
},
|
|
1518
1697
|
{
|
|
1519
|
-
name: '
|
|
1698
|
+
name: 'getChannelState',
|
|
1520
1699
|
type: 'function',
|
|
1521
|
-
stateMutability: '
|
|
1522
|
-
inputs: [],
|
|
1523
|
-
outputs: [
|
|
1700
|
+
stateMutability: 'view',
|
|
1701
|
+
inputs: [{ type: 'bytes32', name: 'channelId' }],
|
|
1702
|
+
outputs: [
|
|
1703
|
+
{
|
|
1704
|
+
type: 'tuple',
|
|
1705
|
+
components: [
|
|
1706
|
+
{ type: 'uint96', name: 'settled' },
|
|
1707
|
+
{ type: 'uint96', name: 'deposit' },
|
|
1708
|
+
{ type: 'uint32', name: 'closeRequestedAt' },
|
|
1709
|
+
],
|
|
1710
|
+
},
|
|
1711
|
+
],
|
|
1524
1712
|
},
|
|
1525
1713
|
{
|
|
1526
|
-
name: '
|
|
1714
|
+
name: 'getChannelStatesBatch',
|
|
1527
1715
|
type: 'function',
|
|
1528
|
-
stateMutability: '
|
|
1529
|
-
inputs: [],
|
|
1530
|
-
outputs: [
|
|
1716
|
+
stateMutability: 'view',
|
|
1717
|
+
inputs: [{ type: 'bytes32[]', name: 'channelIds' }],
|
|
1718
|
+
outputs: [
|
|
1719
|
+
{
|
|
1720
|
+
type: 'tuple[]',
|
|
1721
|
+
components: [
|
|
1722
|
+
{ type: 'uint96', name: 'settled' },
|
|
1723
|
+
{ type: 'uint96', name: 'deposit' },
|
|
1724
|
+
{ type: 'uint32', name: 'closeRequestedAt' },
|
|
1725
|
+
],
|
|
1726
|
+
},
|
|
1727
|
+
],
|
|
1531
1728
|
},
|
|
1532
1729
|
{
|
|
1533
|
-
name: '
|
|
1730
|
+
name: 'computeChannelId',
|
|
1534
1731
|
type: 'function',
|
|
1535
|
-
stateMutability: '
|
|
1536
|
-
inputs: [
|
|
1537
|
-
|
|
1732
|
+
stateMutability: 'view',
|
|
1733
|
+
inputs: [
|
|
1734
|
+
{ type: 'address', name: 'payer' },
|
|
1735
|
+
{ type: 'address', name: 'payee' },
|
|
1736
|
+
{ type: 'address', name: 'operator' },
|
|
1737
|
+
{ type: 'address', name: 'token' },
|
|
1738
|
+
{ type: 'bytes32', name: 'salt' },
|
|
1739
|
+
{ type: 'address', name: 'authorizedSigner' },
|
|
1740
|
+
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
1741
|
+
],
|
|
1742
|
+
outputs: [{ type: 'bytes32' }],
|
|
1538
1743
|
},
|
|
1539
1744
|
{
|
|
1540
|
-
name: '
|
|
1745
|
+
name: 'getVoucherDigest',
|
|
1541
1746
|
type: 'function',
|
|
1542
|
-
stateMutability: '
|
|
1543
|
-
inputs: [
|
|
1544
|
-
|
|
1747
|
+
stateMutability: 'view',
|
|
1748
|
+
inputs: [
|
|
1749
|
+
{ type: 'bytes32', name: 'channelId' },
|
|
1750
|
+
{ type: 'uint96', name: 'cumulativeAmount' },
|
|
1751
|
+
],
|
|
1752
|
+
outputs: [{ type: 'bytes32' }],
|
|
1545
1753
|
},
|
|
1546
1754
|
{
|
|
1547
|
-
name: '
|
|
1755
|
+
name: 'domainSeparator',
|
|
1548
1756
|
type: 'function',
|
|
1549
|
-
stateMutability: '
|
|
1757
|
+
stateMutability: 'view',
|
|
1550
1758
|
inputs: [],
|
|
1551
|
-
outputs: [{ type: '
|
|
1552
|
-
},
|
|
1553
|
-
{
|
|
1554
|
-
name: 'tickToPrice',
|
|
1555
|
-
type: 'function',
|
|
1556
|
-
stateMutability: 'pure',
|
|
1557
|
-
inputs: [{ type: 'int16', name: 'tick' }],
|
|
1558
|
-
outputs: [{ type: 'uint32', name: 'price' }],
|
|
1559
|
-
},
|
|
1560
|
-
{
|
|
1561
|
-
name: 'priceToTick',
|
|
1562
|
-
type: 'function',
|
|
1563
|
-
stateMutability: 'pure',
|
|
1564
|
-
inputs: [{ type: 'uint32', name: 'price' }],
|
|
1565
|
-
outputs: [{ type: 'int16', name: 'tick' }],
|
|
1759
|
+
outputs: [{ type: 'bytes32' }],
|
|
1566
1760
|
},
|
|
1567
1761
|
{
|
|
1568
|
-
name: '
|
|
1762
|
+
name: 'ChannelOpened',
|
|
1569
1763
|
type: 'event',
|
|
1570
1764
|
inputs: [
|
|
1571
|
-
{ type: 'bytes32', name: '
|
|
1572
|
-
{ type: 'address', name: '
|
|
1573
|
-
{ type: 'address', name: '
|
|
1765
|
+
{ type: 'bytes32', name: 'channelId', indexed: true },
|
|
1766
|
+
{ type: 'address', name: 'payer', indexed: true },
|
|
1767
|
+
{ type: 'address', name: 'payee', indexed: true },
|
|
1768
|
+
{ type: 'address', name: 'operator' },
|
|
1769
|
+
{ type: 'address', name: 'token' },
|
|
1770
|
+
{ type: 'address', name: 'authorizedSigner' },
|
|
1771
|
+
{ type: 'bytes32', name: 'salt' },
|
|
1772
|
+
{ type: 'bytes32', name: 'expiringNonceHash' },
|
|
1773
|
+
{ type: 'uint96', name: 'deposit' },
|
|
1574
1774
|
],
|
|
1575
1775
|
},
|
|
1576
1776
|
{
|
|
1577
|
-
name: '
|
|
1777
|
+
name: 'Settled',
|
|
1578
1778
|
type: 'event',
|
|
1579
1779
|
inputs: [
|
|
1580
|
-
{ type: '
|
|
1581
|
-
{ type: 'address', name: '
|
|
1582
|
-
{ type: 'address', name: '
|
|
1583
|
-
{ type: '
|
|
1584
|
-
{ type: '
|
|
1585
|
-
{ type: '
|
|
1586
|
-
{ type: 'bool', name: 'isFlipOrder' },
|
|
1587
|
-
{ type: 'int16', name: 'flipTick' },
|
|
1780
|
+
{ type: 'bytes32', name: 'channelId', indexed: true },
|
|
1781
|
+
{ type: 'address', name: 'payer', indexed: true },
|
|
1782
|
+
{ type: 'address', name: 'payee', indexed: true },
|
|
1783
|
+
{ type: 'uint96', name: 'cumulativeAmount' },
|
|
1784
|
+
{ type: 'uint96', name: 'deltaPaid' },
|
|
1785
|
+
{ type: 'uint96', name: 'newSettled' },
|
|
1588
1786
|
],
|
|
1589
1787
|
},
|
|
1590
1788
|
{
|
|
1591
|
-
name: '
|
|
1789
|
+
name: 'TopUp',
|
|
1592
1790
|
type: 'event',
|
|
1593
1791
|
inputs: [
|
|
1594
|
-
{ type: '
|
|
1595
|
-
{ type: 'address', name: '
|
|
1596
|
-
{ type: 'address', name: '
|
|
1597
|
-
{ type: '
|
|
1598
|
-
{ type: '
|
|
1792
|
+
{ type: 'bytes32', name: 'channelId', indexed: true },
|
|
1793
|
+
{ type: 'address', name: 'payer', indexed: true },
|
|
1794
|
+
{ type: 'address', name: 'payee', indexed: true },
|
|
1795
|
+
{ type: 'uint96', name: 'additionalDeposit' },
|
|
1796
|
+
{ type: 'uint96', name: 'newDeposit' },
|
|
1599
1797
|
],
|
|
1600
1798
|
},
|
|
1601
1799
|
{
|
|
1602
|
-
name: '
|
|
1800
|
+
name: 'CloseRequested',
|
|
1603
1801
|
type: 'event',
|
|
1604
1802
|
inputs: [
|
|
1605
|
-
{ type: '
|
|
1606
|
-
{ type: 'address', name: '
|
|
1607
|
-
{ type: 'address', name: '
|
|
1608
|
-
{ type: '
|
|
1609
|
-
{ type: 'bool', name: 'isBid' },
|
|
1610
|
-
{ type: 'int16', name: 'tick' },
|
|
1611
|
-
{ type: 'int16', name: 'flipTick' },
|
|
1803
|
+
{ type: 'bytes32', name: 'channelId', indexed: true },
|
|
1804
|
+
{ type: 'address', name: 'payer', indexed: true },
|
|
1805
|
+
{ type: 'address', name: 'payee', indexed: true },
|
|
1806
|
+
{ type: 'uint256', name: 'closeGraceEnd' },
|
|
1612
1807
|
],
|
|
1613
1808
|
},
|
|
1614
1809
|
{
|
|
1615
|
-
name: '
|
|
1810
|
+
name: 'ChannelClosed',
|
|
1616
1811
|
type: 'event',
|
|
1617
1812
|
inputs: [
|
|
1618
|
-
{ type: '
|
|
1619
|
-
{ type: 'address', name: '
|
|
1620
|
-
{ type: '
|
|
1813
|
+
{ type: 'bytes32', name: 'channelId', indexed: true },
|
|
1814
|
+
{ type: 'address', name: 'payer', indexed: true },
|
|
1815
|
+
{ type: 'address', name: 'payee', indexed: true },
|
|
1816
|
+
{ type: 'uint96', name: 'settledToPayee' },
|
|
1817
|
+
{ type: 'uint96', name: 'refundedToPayer' },
|
|
1621
1818
|
],
|
|
1622
1819
|
},
|
|
1623
1820
|
{
|
|
1624
|
-
name: '
|
|
1821
|
+
name: 'CloseRequestCancelled',
|
|
1625
1822
|
type: 'event',
|
|
1626
|
-
inputs: [
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
{ name: 'OrderDoesNotExist', type: 'error', inputs: [] },
|
|
1632
|
-
{ name: 'IdenticalTokens', type: 'error', inputs: [] },
|
|
1633
|
-
{ name: 'InvalidToken', type: 'error', inputs: [] },
|
|
1634
|
-
{
|
|
1635
|
-
name: 'TickOutOfBounds',
|
|
1636
|
-
type: 'error',
|
|
1637
|
-
inputs: [{ type: 'int16', name: 'tick' }],
|
|
1638
|
-
},
|
|
1639
|
-
{ name: 'InvalidTick', type: 'error', inputs: [] },
|
|
1640
|
-
{ name: 'InvalidFlipTick', type: 'error', inputs: [] },
|
|
1641
|
-
{ name: 'InsufficientBalance', type: 'error', inputs: [] },
|
|
1642
|
-
{ name: 'InsufficientLiquidity', type: 'error', inputs: [] },
|
|
1643
|
-
{ name: 'InsufficientOutput', type: 'error', inputs: [] },
|
|
1644
|
-
{ name: 'MaxInputExceeded', type: 'error', inputs: [] },
|
|
1645
|
-
{
|
|
1646
|
-
name: 'BelowMinimumOrderSize',
|
|
1647
|
-
type: 'error',
|
|
1648
|
-
inputs: [{ type: 'uint128', name: 'amount' }],
|
|
1823
|
+
inputs: [
|
|
1824
|
+
{ type: 'bytes32', name: 'channelId', indexed: true },
|
|
1825
|
+
{ type: 'address', name: 'payer', indexed: true },
|
|
1826
|
+
{ type: 'address', name: 'payee', indexed: true },
|
|
1827
|
+
],
|
|
1649
1828
|
},
|
|
1650
|
-
{ name: '
|
|
1651
|
-
{ name: '
|
|
1829
|
+
{ name: 'ChannelAlreadyExists', type: 'error', inputs: [] },
|
|
1830
|
+
{ name: 'ChannelNotFound', type: 'error', inputs: [] },
|
|
1831
|
+
{ name: 'NotPayer', type: 'error', inputs: [] },
|
|
1832
|
+
{ name: 'NotPayeeOrOperator', type: 'error', inputs: [] },
|
|
1833
|
+
{ name: 'InvalidPayee', type: 'error', inputs: [] },
|
|
1834
|
+
{ name: 'ZeroDeposit', type: 'error', inputs: [] },
|
|
1835
|
+
{ name: 'ExpiringNonceHashNotSet', type: 'error', inputs: [] },
|
|
1836
|
+
{ name: 'InvalidSignature', type: 'error', inputs: [] },
|
|
1837
|
+
{ name: 'AmountExceedsDeposit', type: 'error', inputs: [] },
|
|
1838
|
+
{ name: 'AmountNotIncreasing', type: 'error', inputs: [] },
|
|
1839
|
+
{ name: 'CaptureAmountInvalid', type: 'error', inputs: [] },
|
|
1840
|
+
{ name: 'CloseNotReady', type: 'error', inputs: [] },
|
|
1841
|
+
{ name: 'DepositOverflow', type: 'error', inputs: [] },
|
|
1652
1842
|
];
|
|
1653
|
-
export const
|
|
1843
|
+
export const tip20Factory = [
|
|
1654
1844
|
{
|
|
1655
|
-
name: '
|
|
1845
|
+
name: 'createToken',
|
|
1656
1846
|
type: 'function',
|
|
1657
1847
|
stateMutability: 'nonpayable',
|
|
1658
|
-
inputs: [
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1848
|
+
inputs: [
|
|
1849
|
+
{ type: 'string', name: 'name' },
|
|
1850
|
+
{ type: 'string', name: 'symbol' },
|
|
1851
|
+
{ type: 'string', name: 'currency' },
|
|
1852
|
+
{ type: 'address', name: 'quoteToken' },
|
|
1853
|
+
{ type: 'address', name: 'admin' },
|
|
1854
|
+
{ type: 'bytes32', name: 'salt' },
|
|
1855
|
+
],
|
|
1666
1856
|
outputs: [{ type: 'address' }],
|
|
1667
1857
|
},
|
|
1668
1858
|
{
|
|
1669
|
-
name: '
|
|
1859
|
+
name: 'createToken',
|
|
1670
1860
|
type: 'function',
|
|
1671
|
-
stateMutability: '
|
|
1672
|
-
inputs: [
|
|
1673
|
-
|
|
1861
|
+
stateMutability: 'nonpayable',
|
|
1862
|
+
inputs: [
|
|
1863
|
+
{ type: 'string', name: 'name' },
|
|
1864
|
+
{ type: 'string', name: 'symbol' },
|
|
1865
|
+
{ type: 'string', name: 'currency' },
|
|
1866
|
+
{ type: 'address', name: 'quoteToken' },
|
|
1867
|
+
{ type: 'address', name: 'admin' },
|
|
1868
|
+
{ type: 'bytes32', name: 'salt' },
|
|
1869
|
+
{ type: 'string', name: 'logoURI' },
|
|
1870
|
+
],
|
|
1871
|
+
outputs: [{ type: 'address' }],
|
|
1674
1872
|
},
|
|
1675
1873
|
{
|
|
1676
|
-
name: '
|
|
1874
|
+
name: 'isTIP20',
|
|
1677
1875
|
type: 'function',
|
|
1678
1876
|
stateMutability: 'view',
|
|
1679
|
-
inputs: [{ type: 'address', name: '
|
|
1680
|
-
outputs: [{ type: 'address', name: 'master' }],
|
|
1681
|
-
},
|
|
1682
|
-
{
|
|
1683
|
-
name: 'isVirtualAddress',
|
|
1684
|
-
type: 'function',
|
|
1685
|
-
stateMutability: 'pure',
|
|
1686
|
-
inputs: [{ type: 'address', name: 'addr' }],
|
|
1877
|
+
inputs: [{ type: 'address', name: 'token' }],
|
|
1687
1878
|
outputs: [{ type: 'bool' }],
|
|
1688
1879
|
},
|
|
1689
1880
|
{
|
|
1690
|
-
name: '
|
|
1881
|
+
name: 'getTokenAddress',
|
|
1691
1882
|
type: 'function',
|
|
1692
1883
|
stateMutability: 'pure',
|
|
1693
|
-
inputs: [
|
|
1694
|
-
|
|
1695
|
-
{ type: '
|
|
1696
|
-
{ type: 'bytes4', name: 'masterId' },
|
|
1697
|
-
{ type: 'bytes6', name: 'userTag' },
|
|
1884
|
+
inputs: [
|
|
1885
|
+
{ type: 'address', name: 'sender' },
|
|
1886
|
+
{ type: 'bytes32', name: 'salt' },
|
|
1698
1887
|
],
|
|
1888
|
+
outputs: [{ type: 'address' }],
|
|
1699
1889
|
},
|
|
1700
1890
|
{
|
|
1701
|
-
name: '
|
|
1702
|
-
type: 'function',
|
|
1703
|
-
stateMutability: 'view',
|
|
1704
|
-
inputs: [{ type: 'address', name: 'addr' }],
|
|
1705
|
-
outputs: [{ type: 'bool' }],
|
|
1706
|
-
},
|
|
1707
|
-
{
|
|
1708
|
-
name: 'MasterRegistered',
|
|
1891
|
+
name: 'TokenCreated',
|
|
1709
1892
|
type: 'event',
|
|
1710
1893
|
inputs: [
|
|
1711
|
-
{ type: '
|
|
1712
|
-
{ type: '
|
|
1894
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
1895
|
+
{ type: 'string', name: 'name' },
|
|
1896
|
+
{ type: 'string', name: 'symbol' },
|
|
1897
|
+
{ type: 'string', name: 'currency' },
|
|
1898
|
+
{ type: 'address', name: 'quoteToken' },
|
|
1899
|
+
{ type: 'address', name: 'admin' },
|
|
1900
|
+
{ type: 'bytes32', name: 'salt' },
|
|
1713
1901
|
],
|
|
1714
1902
|
},
|
|
1903
|
+
{ name: 'AddressReserved', type: 'error', inputs: [] },
|
|
1904
|
+
{ name: 'AddressNotReserved', type: 'error', inputs: [] },
|
|
1905
|
+
{ name: 'InvalidQuoteToken', type: 'error', inputs: [] },
|
|
1715
1906
|
{
|
|
1716
|
-
name: '
|
|
1907
|
+
name: 'TokenAlreadyExists',
|
|
1717
1908
|
type: 'error',
|
|
1718
|
-
inputs: [{ type: 'address', name: '
|
|
1909
|
+
inputs: [{ type: 'address', name: 'token' }],
|
|
1719
1910
|
},
|
|
1720
|
-
{ name: 'InvalidMasterAddress', type: 'error', inputs: [] },
|
|
1721
|
-
{ name: 'ProofOfWorkFailed', type: 'error', inputs: [] },
|
|
1722
|
-
{ name: 'VirtualAddressUnregistered', type: 'error', inputs: [] },
|
|
1723
1911
|
];
|
|
1724
|
-
export const
|
|
1912
|
+
export const tip403Registry = [
|
|
1725
1913
|
{
|
|
1726
|
-
name: '
|
|
1914
|
+
name: 'policyIdCounter',
|
|
1727
1915
|
type: 'function',
|
|
1728
1916
|
stateMutability: 'view',
|
|
1729
|
-
inputs: [
|
|
1730
|
-
outputs: [{ type: '
|
|
1917
|
+
inputs: [],
|
|
1918
|
+
outputs: [{ type: 'uint64' }],
|
|
1731
1919
|
},
|
|
1732
1920
|
{
|
|
1733
|
-
name: '
|
|
1921
|
+
name: 'policyExists',
|
|
1734
1922
|
type: 'function',
|
|
1735
1923
|
stateMutability: 'view',
|
|
1736
|
-
inputs: [{ type: '
|
|
1737
|
-
outputs: [{ type: '
|
|
1738
|
-
},
|
|
1739
|
-
{
|
|
1740
|
-
name: 'setUserToken',
|
|
1741
|
-
type: 'function',
|
|
1742
|
-
stateMutability: 'nonpayable',
|
|
1743
|
-
inputs: [{ type: 'address', name: 'token' }],
|
|
1744
|
-
outputs: [],
|
|
1745
|
-
},
|
|
1746
|
-
{
|
|
1747
|
-
name: 'setValidatorToken',
|
|
1748
|
-
type: 'function',
|
|
1749
|
-
stateMutability: 'nonpayable',
|
|
1750
|
-
inputs: [{ type: 'address', name: 'token' }],
|
|
1751
|
-
outputs: [],
|
|
1924
|
+
inputs: [{ type: 'uint64', name: 'policyId' }],
|
|
1925
|
+
outputs: [{ type: 'bool' }],
|
|
1752
1926
|
},
|
|
1753
1927
|
{
|
|
1754
|
-
name: '
|
|
1928
|
+
name: 'policyData',
|
|
1755
1929
|
type: 'function',
|
|
1756
|
-
stateMutability: '
|
|
1757
|
-
inputs: [
|
|
1758
|
-
|
|
1759
|
-
{ type: '
|
|
1930
|
+
stateMutability: 'view',
|
|
1931
|
+
inputs: [{ type: 'uint64', name: 'policyId' }],
|
|
1932
|
+
outputs: [
|
|
1933
|
+
{ type: 'uint8', name: 'policyType' },
|
|
1934
|
+
{ type: 'address', name: 'admin' },
|
|
1760
1935
|
],
|
|
1761
|
-
outputs: [],
|
|
1762
1936
|
},
|
|
1763
1937
|
{
|
|
1764
|
-
name: '
|
|
1938
|
+
name: 'isAuthorized',
|
|
1765
1939
|
type: 'function',
|
|
1766
1940
|
stateMutability: 'view',
|
|
1767
1941
|
inputs: [
|
|
1768
|
-
{ type: '
|
|
1769
|
-
{ type: 'address', name: '
|
|
1770
|
-
],
|
|
1771
|
-
outputs: [{ type: 'uint256' }],
|
|
1772
|
-
},
|
|
1773
|
-
{
|
|
1774
|
-
name: 'UserTokenSet',
|
|
1775
|
-
type: 'event',
|
|
1776
|
-
inputs: [
|
|
1777
|
-
{ type: 'address', name: 'user', indexed: true },
|
|
1778
|
-
{ type: 'address', name: 'token', indexed: true },
|
|
1779
|
-
],
|
|
1780
|
-
},
|
|
1781
|
-
{
|
|
1782
|
-
name: 'ValidatorTokenSet',
|
|
1783
|
-
type: 'event',
|
|
1784
|
-
inputs: [
|
|
1785
|
-
{ type: 'address', name: 'validator', indexed: true },
|
|
1786
|
-
{ type: 'address', name: 'token', indexed: true },
|
|
1787
|
-
],
|
|
1788
|
-
},
|
|
1789
|
-
{
|
|
1790
|
-
name: 'FeesDistributed',
|
|
1791
|
-
type: 'event',
|
|
1792
|
-
inputs: [
|
|
1793
|
-
{ type: 'address', name: 'validator', indexed: true },
|
|
1794
|
-
{ type: 'address', name: 'token', indexed: true },
|
|
1795
|
-
{ type: 'uint256', name: 'amount' },
|
|
1942
|
+
{ type: 'uint64', name: 'policyId' },
|
|
1943
|
+
{ type: 'address', name: 'user' },
|
|
1796
1944
|
],
|
|
1797
|
-
|
|
1798
|
-
{ name: 'InvalidToken', type: 'error', inputs: [] },
|
|
1799
|
-
{ name: 'InsufficientFeeTokenBalance', type: 'error', inputs: [] },
|
|
1800
|
-
{ name: 'CannotChangeWithinBlock', type: 'error', inputs: [] },
|
|
1801
|
-
];
|
|
1802
|
-
export const feeAmm = [
|
|
1803
|
-
{
|
|
1804
|
-
name: 'M',
|
|
1805
|
-
type: 'function',
|
|
1806
|
-
stateMutability: 'view',
|
|
1807
|
-
inputs: [],
|
|
1808
|
-
outputs: [{ type: 'uint256' }],
|
|
1945
|
+
outputs: [{ type: 'bool' }],
|
|
1809
1946
|
},
|
|
1810
1947
|
{
|
|
1811
|
-
name: '
|
|
1948
|
+
name: 'isAuthorizedSender',
|
|
1812
1949
|
type: 'function',
|
|
1813
1950
|
stateMutability: 'view',
|
|
1814
|
-
inputs: [
|
|
1815
|
-
|
|
1951
|
+
inputs: [
|
|
1952
|
+
{ type: 'uint64', name: 'policyId' },
|
|
1953
|
+
{ type: 'address', name: 'user' },
|
|
1954
|
+
],
|
|
1955
|
+
outputs: [{ type: 'bool' }],
|
|
1816
1956
|
},
|
|
1817
1957
|
{
|
|
1818
|
-
name: '
|
|
1958
|
+
name: 'isAuthorizedRecipient',
|
|
1819
1959
|
type: 'function',
|
|
1820
1960
|
stateMutability: 'view',
|
|
1821
|
-
inputs: [],
|
|
1822
|
-
outputs: [{ type: 'uint256' }],
|
|
1823
|
-
},
|
|
1824
|
-
{
|
|
1825
|
-
name: 'MIN_LIQUIDITY',
|
|
1826
|
-
type: 'function',
|
|
1827
|
-
stateMutability: 'view',
|
|
1828
|
-
inputs: [],
|
|
1829
|
-
outputs: [{ type: 'uint256' }],
|
|
1830
|
-
},
|
|
1831
|
-
{
|
|
1832
|
-
name: 'getPoolId',
|
|
1833
|
-
type: 'function',
|
|
1834
|
-
stateMutability: 'pure',
|
|
1835
1961
|
inputs: [
|
|
1836
|
-
{ type: '
|
|
1837
|
-
{ type: 'address', name: 'validatorToken' },
|
|
1838
|
-
],
|
|
1839
|
-
outputs: [{ type: 'bytes32' }],
|
|
1840
|
-
},
|
|
1841
|
-
{
|
|
1842
|
-
name: 'getPool',
|
|
1843
|
-
type: 'function',
|
|
1844
|
-
stateMutability: 'view',
|
|
1845
|
-
inputs: [
|
|
1846
|
-
{ type: 'address', name: 'userToken' },
|
|
1847
|
-
{ type: 'address', name: 'validatorToken' },
|
|
1848
|
-
],
|
|
1849
|
-
outputs: [
|
|
1850
|
-
{
|
|
1851
|
-
type: 'tuple',
|
|
1852
|
-
components: [
|
|
1853
|
-
{ type: 'uint128', name: 'reserveUserToken' },
|
|
1854
|
-
{ type: 'uint128', name: 'reserveValidatorToken' },
|
|
1855
|
-
],
|
|
1856
|
-
},
|
|
1857
|
-
],
|
|
1858
|
-
},
|
|
1859
|
-
{
|
|
1860
|
-
name: 'pools',
|
|
1861
|
-
type: 'function',
|
|
1862
|
-
stateMutability: 'view',
|
|
1863
|
-
inputs: [{ type: 'bytes32', name: 'poolId' }],
|
|
1864
|
-
outputs: [
|
|
1865
|
-
{
|
|
1866
|
-
type: 'tuple',
|
|
1867
|
-
components: [
|
|
1868
|
-
{ type: 'uint128', name: 'reserveUserToken' },
|
|
1869
|
-
{ type: 'uint128', name: 'reserveValidatorToken' },
|
|
1870
|
-
],
|
|
1871
|
-
},
|
|
1872
|
-
],
|
|
1873
|
-
},
|
|
1874
|
-
{
|
|
1875
|
-
name: 'mint',
|
|
1876
|
-
type: 'function',
|
|
1877
|
-
stateMutability: 'nonpayable',
|
|
1878
|
-
inputs: [
|
|
1879
|
-
{ type: 'address', name: 'userToken' },
|
|
1880
|
-
{ type: 'address', name: 'validatorToken' },
|
|
1881
|
-
{ type: 'uint256', name: 'amountValidatorToken' },
|
|
1882
|
-
{ type: 'address', name: 'to' },
|
|
1883
|
-
],
|
|
1884
|
-
outputs: [{ type: 'uint256', name: 'liquidity' }],
|
|
1885
|
-
},
|
|
1886
|
-
{
|
|
1887
|
-
name: 'burn',
|
|
1888
|
-
type: 'function',
|
|
1889
|
-
stateMutability: 'nonpayable',
|
|
1890
|
-
inputs: [
|
|
1891
|
-
{ type: 'address', name: 'userToken' },
|
|
1892
|
-
{ type: 'address', name: 'validatorToken' },
|
|
1893
|
-
{ type: 'uint256', name: 'liquidity' },
|
|
1894
|
-
{ type: 'address', name: 'to' },
|
|
1895
|
-
],
|
|
1896
|
-
outputs: [
|
|
1897
|
-
{ type: 'uint256', name: 'amountUserToken' },
|
|
1898
|
-
{ type: 'uint256', name: 'amountValidatorToken' },
|
|
1899
|
-
],
|
|
1900
|
-
},
|
|
1901
|
-
{
|
|
1902
|
-
name: 'totalSupply',
|
|
1903
|
-
type: 'function',
|
|
1904
|
-
stateMutability: 'view',
|
|
1905
|
-
inputs: [{ type: 'bytes32', name: 'poolId' }],
|
|
1906
|
-
outputs: [{ type: 'uint256' }],
|
|
1907
|
-
},
|
|
1908
|
-
{
|
|
1909
|
-
name: 'liquidityBalances',
|
|
1910
|
-
type: 'function',
|
|
1911
|
-
stateMutability: 'view',
|
|
1912
|
-
inputs: [
|
|
1913
|
-
{ type: 'bytes32', name: 'poolId' },
|
|
1962
|
+
{ type: 'uint64', name: 'policyId' },
|
|
1914
1963
|
{ type: 'address', name: 'user' },
|
|
1915
1964
|
],
|
|
1916
|
-
outputs: [{ type: '
|
|
1917
|
-
},
|
|
1918
|
-
{
|
|
1919
|
-
name: 'rebalanceSwap',
|
|
1920
|
-
type: 'function',
|
|
1921
|
-
stateMutability: 'nonpayable',
|
|
1922
|
-
inputs: [
|
|
1923
|
-
{ type: 'address', name: 'userToken' },
|
|
1924
|
-
{ type: 'address', name: 'validatorToken' },
|
|
1925
|
-
{ type: 'uint256', name: 'amountOut' },
|
|
1926
|
-
{ type: 'address', name: 'to' },
|
|
1927
|
-
],
|
|
1928
|
-
outputs: [{ type: 'uint256', name: 'amountIn' }],
|
|
1929
|
-
},
|
|
1930
|
-
{
|
|
1931
|
-
name: 'Mint',
|
|
1932
|
-
type: 'event',
|
|
1933
|
-
inputs: [
|
|
1934
|
-
{ type: 'address', name: 'sender' },
|
|
1935
|
-
{ type: 'address', name: 'to', indexed: true },
|
|
1936
|
-
{ type: 'address', name: 'userToken', indexed: true },
|
|
1937
|
-
{ type: 'address', name: 'validatorToken', indexed: true },
|
|
1938
|
-
{ type: 'uint256', name: 'amountValidatorToken' },
|
|
1939
|
-
{ type: 'uint256', name: 'liquidity' },
|
|
1940
|
-
],
|
|
1941
|
-
},
|
|
1942
|
-
{
|
|
1943
|
-
name: 'Burn',
|
|
1944
|
-
type: 'event',
|
|
1945
|
-
inputs: [
|
|
1946
|
-
{ type: 'address', name: 'sender', indexed: true },
|
|
1947
|
-
{ type: 'address', name: 'userToken', indexed: true },
|
|
1948
|
-
{ type: 'address', name: 'validatorToken', indexed: true },
|
|
1949
|
-
{ type: 'uint256', name: 'amountUserToken' },
|
|
1950
|
-
{ type: 'uint256', name: 'amountValidatorToken' },
|
|
1951
|
-
{ type: 'uint256', name: 'liquidity' },
|
|
1952
|
-
{ type: 'address', name: 'to' },
|
|
1953
|
-
],
|
|
1954
|
-
},
|
|
1955
|
-
{
|
|
1956
|
-
name: 'RebalanceSwap',
|
|
1957
|
-
type: 'event',
|
|
1958
|
-
inputs: [
|
|
1959
|
-
{ type: 'address', name: 'userToken', indexed: true },
|
|
1960
|
-
{ type: 'address', name: 'validatorToken', indexed: true },
|
|
1961
|
-
{ type: 'address', name: 'swapper', indexed: true },
|
|
1962
|
-
{ type: 'uint256', name: 'amountIn' },
|
|
1963
|
-
{ type: 'uint256', name: 'amountOut' },
|
|
1964
|
-
],
|
|
1965
|
-
},
|
|
1966
|
-
{ name: 'IdenticalAddresses', type: 'error', inputs: [] },
|
|
1967
|
-
{ name: 'InvalidToken', type: 'error', inputs: [] },
|
|
1968
|
-
{ name: 'InsufficientLiquidity', type: 'error', inputs: [] },
|
|
1969
|
-
{ name: 'InsufficientReserves', type: 'error', inputs: [] },
|
|
1970
|
-
{ name: 'InvalidAmount', type: 'error', inputs: [] },
|
|
1971
|
-
{ name: 'DivisionByZero', type: 'error', inputs: [] },
|
|
1972
|
-
{ name: 'InvalidSwapCalculation', type: 'error', inputs: [] },
|
|
1973
|
-
];
|
|
1974
|
-
export const receivePolicyGuard = [
|
|
1975
|
-
{
|
|
1976
|
-
name: 'balanceOf',
|
|
1977
|
-
type: 'function',
|
|
1978
|
-
stateMutability: 'view',
|
|
1979
|
-
inputs: [{ type: 'bytes', name: 'receipt' }],
|
|
1980
|
-
outputs: [{ type: 'uint256', name: 'amount' }],
|
|
1981
|
-
},
|
|
1982
|
-
{
|
|
1983
|
-
name: 'claim',
|
|
1984
|
-
type: 'function',
|
|
1985
|
-
stateMutability: 'nonpayable',
|
|
1986
|
-
inputs: [
|
|
1987
|
-
{ type: 'address', name: 'to' },
|
|
1988
|
-
{ type: 'bytes', name: 'receipt' },
|
|
1989
|
-
],
|
|
1990
|
-
outputs: [],
|
|
1991
|
-
},
|
|
1992
|
-
{
|
|
1993
|
-
name: 'burnBlockedReceipt',
|
|
1994
|
-
type: 'function',
|
|
1995
|
-
stateMutability: 'nonpayable',
|
|
1996
|
-
inputs: [{ type: 'bytes', name: 'receipt' }],
|
|
1997
|
-
outputs: [],
|
|
1998
|
-
},
|
|
1999
|
-
{
|
|
2000
|
-
name: 'TransferBlocked',
|
|
2001
|
-
type: 'event',
|
|
2002
|
-
inputs: [
|
|
2003
|
-
{ type: 'address', name: 'token', indexed: true },
|
|
2004
|
-
{ type: 'address', name: 'receiver', indexed: true },
|
|
2005
|
-
{ type: 'uint64', name: 'blockedNonce', indexed: true },
|
|
2006
|
-
{ type: 'uint256', name: 'amount' },
|
|
2007
|
-
{ type: 'uint8', name: 'receiptVersion' },
|
|
2008
|
-
{ type: 'bytes', name: 'receipt' },
|
|
2009
|
-
],
|
|
2010
|
-
},
|
|
2011
|
-
{
|
|
2012
|
-
name: 'ReceiptClaimed',
|
|
2013
|
-
type: 'event',
|
|
2014
|
-
inputs: [
|
|
2015
|
-
{ type: 'address', name: 'token', indexed: true },
|
|
2016
|
-
{ type: 'address', name: 'receiver', indexed: true },
|
|
2017
|
-
{ type: 'uint64', name: 'blockedNonce', indexed: true },
|
|
2018
|
-
{ type: 'uint64', name: 'blockedAt' },
|
|
2019
|
-
{ type: 'uint8', name: 'receiptVersion' },
|
|
2020
|
-
{ type: 'address', name: 'originator' },
|
|
2021
|
-
{ type: 'address', name: 'recipient' },
|
|
2022
|
-
{ type: 'address', name: 'recoveryAuthority' },
|
|
2023
|
-
{ type: 'address', name: 'caller' },
|
|
2024
|
-
{ type: 'address', name: 'to' },
|
|
2025
|
-
{ type: 'uint256', name: 'amount' },
|
|
2026
|
-
],
|
|
2027
|
-
},
|
|
2028
|
-
{
|
|
2029
|
-
name: 'ReceiptBurned',
|
|
2030
|
-
type: 'event',
|
|
2031
|
-
inputs: [
|
|
2032
|
-
{ type: 'address', name: 'token', indexed: true },
|
|
2033
|
-
{ type: 'address', name: 'receiver', indexed: true },
|
|
2034
|
-
{ type: 'uint64', name: 'blockedNonce', indexed: true },
|
|
2035
|
-
{ type: 'uint64', name: 'blockedAt' },
|
|
2036
|
-
{ type: 'uint8', name: 'receiptVersion' },
|
|
2037
|
-
{ type: 'address', name: 'originator' },
|
|
2038
|
-
{ type: 'address', name: 'recipient' },
|
|
2039
|
-
{ type: 'address', name: 'recoveryAuthority' },
|
|
2040
|
-
{ type: 'address', name: 'caller' },
|
|
2041
|
-
{ type: 'uint256', name: 'amount' },
|
|
2042
|
-
],
|
|
2043
|
-
},
|
|
2044
|
-
{ name: 'InvalidReceipt', type: 'error', inputs: [] },
|
|
2045
|
-
{ name: 'InvalidClaimAddress', type: 'error', inputs: [] },
|
|
2046
|
-
{ name: 'UnauthorizedClaimer', type: 'error', inputs: [] },
|
|
2047
|
-
{ name: 'AddressReserved', type: 'error', inputs: [] },
|
|
2048
|
-
];
|
|
2049
|
-
export const accountKeychain = [
|
|
2050
|
-
{
|
|
2051
|
-
name: 'authorizeKey',
|
|
2052
|
-
type: 'function',
|
|
2053
|
-
stateMutability: 'nonpayable',
|
|
2054
|
-
inputs: [
|
|
2055
|
-
{ type: 'address', name: 'keyId' },
|
|
2056
|
-
{ type: 'uint8', name: 'signatureType' },
|
|
2057
|
-
{ type: 'uint64', name: 'expiry' },
|
|
2058
|
-
{ type: 'bool', name: 'enforceLimits' },
|
|
2059
|
-
{
|
|
2060
|
-
type: 'tuple[]',
|
|
2061
|
-
name: 'limits',
|
|
2062
|
-
components: [
|
|
2063
|
-
{ type: 'address', name: 'token' },
|
|
2064
|
-
{ type: 'uint256', name: 'amount' },
|
|
2065
|
-
],
|
|
2066
|
-
},
|
|
2067
|
-
],
|
|
2068
|
-
outputs: [],
|
|
2069
|
-
},
|
|
2070
|
-
{
|
|
2071
|
-
name: 'authorizeKey',
|
|
2072
|
-
type: 'function',
|
|
2073
|
-
stateMutability: 'nonpayable',
|
|
2074
|
-
inputs: [
|
|
2075
|
-
{ type: 'address', name: 'keyId' },
|
|
2076
|
-
{ type: 'uint8', name: 'signatureType' },
|
|
2077
|
-
{
|
|
2078
|
-
type: 'tuple',
|
|
2079
|
-
name: 'config',
|
|
2080
|
-
components: [
|
|
2081
|
-
{ type: 'uint64', name: 'expiry' },
|
|
2082
|
-
{ type: 'bool', name: 'enforceLimits' },
|
|
2083
|
-
{
|
|
2084
|
-
type: 'tuple[]',
|
|
2085
|
-
name: 'limits',
|
|
2086
|
-
components: [
|
|
2087
|
-
{ type: 'address', name: 'token' },
|
|
2088
|
-
{ type: 'uint256', name: 'amount' },
|
|
2089
|
-
{ type: 'uint64', name: 'period' },
|
|
2090
|
-
],
|
|
2091
|
-
},
|
|
2092
|
-
{ type: 'bool', name: 'allowAnyCalls' },
|
|
2093
|
-
{
|
|
2094
|
-
type: 'tuple[]',
|
|
2095
|
-
name: 'allowedCalls',
|
|
2096
|
-
components: [
|
|
2097
|
-
{ type: 'address', name: 'target' },
|
|
2098
|
-
{
|
|
2099
|
-
type: 'tuple[]',
|
|
2100
|
-
name: 'selectorRules',
|
|
2101
|
-
components: [
|
|
2102
|
-
{ type: 'bytes4', name: 'selector' },
|
|
2103
|
-
{ type: 'address[]', name: 'recipients' },
|
|
2104
|
-
],
|
|
2105
|
-
},
|
|
2106
|
-
],
|
|
2107
|
-
},
|
|
2108
|
-
],
|
|
2109
|
-
},
|
|
2110
|
-
],
|
|
2111
|
-
outputs: [],
|
|
2112
|
-
},
|
|
2113
|
-
{
|
|
2114
|
-
name: 'authorizeKey',
|
|
2115
|
-
type: 'function',
|
|
2116
|
-
stateMutability: 'nonpayable',
|
|
2117
|
-
inputs: [
|
|
2118
|
-
{ type: 'address', name: 'keyId' },
|
|
2119
|
-
{ type: 'uint8', name: 'signatureType' },
|
|
2120
|
-
{
|
|
2121
|
-
type: 'tuple',
|
|
2122
|
-
name: 'config',
|
|
2123
|
-
components: [
|
|
2124
|
-
{ type: 'uint64', name: 'expiry' },
|
|
2125
|
-
{ type: 'bool', name: 'enforceLimits' },
|
|
2126
|
-
{
|
|
2127
|
-
type: 'tuple[]',
|
|
2128
|
-
name: 'limits',
|
|
2129
|
-
components: [
|
|
2130
|
-
{ type: 'address', name: 'token' },
|
|
2131
|
-
{ type: 'uint256', name: 'amount' },
|
|
2132
|
-
{ type: 'uint64', name: 'period' },
|
|
2133
|
-
],
|
|
2134
|
-
},
|
|
2135
|
-
{ type: 'bool', name: 'allowAnyCalls' },
|
|
2136
|
-
{
|
|
2137
|
-
type: 'tuple[]',
|
|
2138
|
-
name: 'allowedCalls',
|
|
2139
|
-
components: [
|
|
2140
|
-
{ type: 'address', name: 'target' },
|
|
2141
|
-
{
|
|
2142
|
-
type: 'tuple[]',
|
|
2143
|
-
name: 'selectorRules',
|
|
2144
|
-
components: [
|
|
2145
|
-
{ type: 'bytes4', name: 'selector' },
|
|
2146
|
-
{ type: 'address[]', name: 'recipients' },
|
|
2147
|
-
],
|
|
2148
|
-
},
|
|
2149
|
-
],
|
|
2150
|
-
},
|
|
2151
|
-
],
|
|
2152
|
-
},
|
|
2153
|
-
{ type: 'bytes32', name: 'witness' },
|
|
2154
|
-
],
|
|
2155
|
-
outputs: [],
|
|
2156
|
-
},
|
|
2157
|
-
{
|
|
2158
|
-
name: 'authorizeAdminKey',
|
|
2159
|
-
type: 'function',
|
|
2160
|
-
stateMutability: 'nonpayable',
|
|
2161
|
-
inputs: [
|
|
2162
|
-
{ type: 'address', name: 'keyId' },
|
|
2163
|
-
{ type: 'uint8', name: 'signatureType' },
|
|
2164
|
-
{ type: 'bytes32', name: 'witness' },
|
|
2165
|
-
],
|
|
2166
|
-
outputs: [],
|
|
2167
|
-
},
|
|
2168
|
-
{
|
|
2169
|
-
name: 'burnKeyAuthorizationWitness',
|
|
2170
|
-
type: 'function',
|
|
2171
|
-
stateMutability: 'nonpayable',
|
|
2172
|
-
inputs: [{ type: 'bytes32', name: 'witness' }],
|
|
2173
|
-
outputs: [],
|
|
2174
|
-
},
|
|
2175
|
-
{
|
|
2176
|
-
name: 'revokeKey',
|
|
2177
|
-
type: 'function',
|
|
2178
|
-
stateMutability: 'nonpayable',
|
|
2179
|
-
inputs: [{ type: 'address', name: 'keyId' }],
|
|
2180
|
-
outputs: [],
|
|
2181
|
-
},
|
|
2182
|
-
{
|
|
2183
|
-
name: 'updateSpendingLimit',
|
|
2184
|
-
type: 'function',
|
|
2185
|
-
stateMutability: 'nonpayable',
|
|
2186
|
-
inputs: [
|
|
2187
|
-
{ type: 'address', name: 'keyId' },
|
|
2188
|
-
{ type: 'address', name: 'token' },
|
|
2189
|
-
{ type: 'uint256', name: 'newLimit' },
|
|
2190
|
-
],
|
|
2191
|
-
outputs: [],
|
|
2192
|
-
},
|
|
2193
|
-
{
|
|
2194
|
-
name: 'setAllowedCalls',
|
|
2195
|
-
type: 'function',
|
|
2196
|
-
stateMutability: 'nonpayable',
|
|
2197
|
-
inputs: [
|
|
2198
|
-
{ type: 'address', name: 'keyId' },
|
|
2199
|
-
{
|
|
2200
|
-
type: 'tuple[]',
|
|
2201
|
-
name: 'scopes',
|
|
2202
|
-
components: [
|
|
2203
|
-
{ type: 'address', name: 'target' },
|
|
2204
|
-
{
|
|
2205
|
-
type: 'tuple[]',
|
|
2206
|
-
name: 'selectorRules',
|
|
2207
|
-
components: [
|
|
2208
|
-
{ type: 'bytes4', name: 'selector' },
|
|
2209
|
-
{ type: 'address[]', name: 'recipients' },
|
|
2210
|
-
],
|
|
2211
|
-
},
|
|
2212
|
-
],
|
|
2213
|
-
},
|
|
2214
|
-
],
|
|
2215
|
-
outputs: [],
|
|
2216
|
-
},
|
|
2217
|
-
{
|
|
2218
|
-
name: 'removeAllowedCalls',
|
|
2219
|
-
type: 'function',
|
|
2220
|
-
stateMutability: 'nonpayable',
|
|
2221
|
-
inputs: [
|
|
2222
|
-
{ type: 'address', name: 'keyId' },
|
|
2223
|
-
{ type: 'address', name: 'target' },
|
|
2224
|
-
],
|
|
2225
|
-
outputs: [],
|
|
1965
|
+
outputs: [{ type: 'bool' }],
|
|
2226
1966
|
},
|
|
2227
1967
|
{
|
|
2228
|
-
name: '
|
|
1968
|
+
name: 'isAuthorizedMintRecipient',
|
|
2229
1969
|
type: 'function',
|
|
2230
1970
|
stateMutability: 'view',
|
|
2231
1971
|
inputs: [
|
|
2232
|
-
{ type: '
|
|
2233
|
-
{ type: 'address', name: '
|
|
1972
|
+
{ type: 'uint64', name: 'policyId' },
|
|
1973
|
+
{ type: 'address', name: 'user' },
|
|
2234
1974
|
],
|
|
1975
|
+
outputs: [{ type: 'bool' }],
|
|
1976
|
+
},
|
|
1977
|
+
{
|
|
1978
|
+
name: 'compoundPolicyData',
|
|
1979
|
+
type: 'function',
|
|
1980
|
+
stateMutability: 'view',
|
|
1981
|
+
inputs: [{ type: 'uint64', name: 'policyId' }],
|
|
2235
1982
|
outputs: [
|
|
2236
|
-
{
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
{ type: 'uint8', name: 'signatureType' },
|
|
2240
|
-
{ type: 'address', name: 'keyId' },
|
|
2241
|
-
{ type: 'uint64', name: 'expiry' },
|
|
2242
|
-
{ type: 'bool', name: 'enforceLimits' },
|
|
2243
|
-
{ type: 'bool', name: 'isRevoked' },
|
|
2244
|
-
],
|
|
2245
|
-
},
|
|
1983
|
+
{ type: 'uint64', name: 'senderPolicyId' },
|
|
1984
|
+
{ type: 'uint64', name: 'recipientPolicyId' },
|
|
1985
|
+
{ type: 'uint64', name: 'mintRecipientPolicyId' },
|
|
2246
1986
|
],
|
|
2247
1987
|
},
|
|
2248
1988
|
{
|
|
2249
|
-
name: '
|
|
1989
|
+
name: 'receivePolicy',
|
|
2250
1990
|
type: 'function',
|
|
2251
1991
|
stateMutability: 'view',
|
|
2252
|
-
inputs: [
|
|
2253
|
-
|
|
2254
|
-
{ type: '
|
|
2255
|
-
{ type: '
|
|
1992
|
+
inputs: [{ type: 'address', name: 'account' }],
|
|
1993
|
+
outputs: [
|
|
1994
|
+
{ type: 'bool', name: 'hasReceivePolicy' },
|
|
1995
|
+
{ type: 'uint64', name: 'senderPolicyId' },
|
|
1996
|
+
{ type: 'uint8', name: 'senderPolicyType' },
|
|
1997
|
+
{ type: 'uint64', name: 'tokenFilterId' },
|
|
1998
|
+
{ type: 'uint8', name: 'tokenFilterType' },
|
|
1999
|
+
{ type: 'address', name: 'recoveryAuthority' },
|
|
2256
2000
|
],
|
|
2257
|
-
outputs: [{ type: 'uint256', name: 'remaining' }],
|
|
2258
2001
|
},
|
|
2259
2002
|
{
|
|
2260
|
-
name: '
|
|
2003
|
+
name: 'validateReceivePolicy',
|
|
2261
2004
|
type: 'function',
|
|
2262
2005
|
stateMutability: 'view',
|
|
2263
2006
|
inputs: [
|
|
2264
|
-
{ type: 'address', name: 'account' },
|
|
2265
|
-
{ type: 'address', name: 'keyId' },
|
|
2266
2007
|
{ type: 'address', name: 'token' },
|
|
2008
|
+
{ type: 'address', name: 'sender' },
|
|
2009
|
+
{ type: 'address', name: 'receiver' },
|
|
2267
2010
|
],
|
|
2268
2011
|
outputs: [
|
|
2269
|
-
{ type: '
|
|
2270
|
-
{ type: '
|
|
2012
|
+
{ type: 'bool', name: 'authorized' },
|
|
2013
|
+
{ type: 'uint8', name: 'blockedReason' },
|
|
2271
2014
|
],
|
|
2272
2015
|
},
|
|
2273
2016
|
{
|
|
2274
|
-
name: '
|
|
2017
|
+
name: 'createPolicy',
|
|
2275
2018
|
type: 'function',
|
|
2276
|
-
stateMutability: '
|
|
2019
|
+
stateMutability: 'nonpayable',
|
|
2277
2020
|
inputs: [
|
|
2278
|
-
{ type: 'address', name: '
|
|
2279
|
-
{ type: '
|
|
2021
|
+
{ type: 'address', name: 'admin' },
|
|
2022
|
+
{ type: 'uint8', name: 'policyType' },
|
|
2280
2023
|
],
|
|
2281
|
-
outputs: [
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
components: [
|
|
2292
|
-
{ type: 'bytes4', name: 'selector' },
|
|
2293
|
-
{ type: 'address[]', name: 'recipients' },
|
|
2294
|
-
],
|
|
2295
|
-
},
|
|
2296
|
-
],
|
|
2297
|
-
},
|
|
2024
|
+
outputs: [{ type: 'uint64' }],
|
|
2025
|
+
},
|
|
2026
|
+
{
|
|
2027
|
+
name: 'createPolicyWithAccounts',
|
|
2028
|
+
type: 'function',
|
|
2029
|
+
stateMutability: 'nonpayable',
|
|
2030
|
+
inputs: [
|
|
2031
|
+
{ type: 'address', name: 'admin' },
|
|
2032
|
+
{ type: 'uint8', name: 'policyType' },
|
|
2033
|
+
{ type: 'address[]', name: 'accounts' },
|
|
2298
2034
|
],
|
|
2035
|
+
outputs: [{ type: 'uint64' }],
|
|
2299
2036
|
},
|
|
2300
2037
|
{
|
|
2301
|
-
name: '
|
|
2038
|
+
name: 'setPolicyAdmin',
|
|
2302
2039
|
type: 'function',
|
|
2303
|
-
stateMutability: '
|
|
2040
|
+
stateMutability: 'nonpayable',
|
|
2304
2041
|
inputs: [
|
|
2305
|
-
{ type: '
|
|
2306
|
-
{ type: '
|
|
2042
|
+
{ type: 'uint64', name: 'policyId' },
|
|
2043
|
+
{ type: 'address', name: 'admin' },
|
|
2307
2044
|
],
|
|
2308
|
-
outputs: [
|
|
2045
|
+
outputs: [],
|
|
2309
2046
|
},
|
|
2310
2047
|
{
|
|
2311
|
-
name: '
|
|
2048
|
+
name: 'modifyPolicyWhitelist',
|
|
2312
2049
|
type: 'function',
|
|
2313
|
-
stateMutability: '
|
|
2050
|
+
stateMutability: 'nonpayable',
|
|
2314
2051
|
inputs: [
|
|
2052
|
+
{ type: 'uint64', name: 'policyId' },
|
|
2315
2053
|
{ type: 'address', name: 'account' },
|
|
2316
|
-
{ type: '
|
|
2054
|
+
{ type: 'bool', name: 'allowed' },
|
|
2317
2055
|
],
|
|
2318
|
-
outputs: [
|
|
2056
|
+
outputs: [],
|
|
2319
2057
|
},
|
|
2320
2058
|
{
|
|
2321
|
-
name: '
|
|
2059
|
+
name: 'modifyPolicyBlacklist',
|
|
2322
2060
|
type: 'function',
|
|
2323
|
-
stateMutability: '
|
|
2324
|
-
inputs: [
|
|
2325
|
-
|
|
2061
|
+
stateMutability: 'nonpayable',
|
|
2062
|
+
inputs: [
|
|
2063
|
+
{ type: 'uint64', name: 'policyId' },
|
|
2064
|
+
{ type: 'address', name: 'account' },
|
|
2065
|
+
{ type: 'bool', name: 'restricted' },
|
|
2066
|
+
],
|
|
2067
|
+
outputs: [],
|
|
2326
2068
|
},
|
|
2327
2069
|
{
|
|
2328
|
-
name: '
|
|
2329
|
-
type: '
|
|
2070
|
+
name: 'createCompoundPolicy',
|
|
2071
|
+
type: 'function',
|
|
2072
|
+
stateMutability: 'nonpayable',
|
|
2330
2073
|
inputs: [
|
|
2331
|
-
{ type: '
|
|
2332
|
-
{ type: '
|
|
2333
|
-
{ type: '
|
|
2334
|
-
{ type: 'uint64', name: 'expiry' },
|
|
2074
|
+
{ type: 'uint64', name: 'senderPolicyId' },
|
|
2075
|
+
{ type: 'uint64', name: 'recipientPolicyId' },
|
|
2076
|
+
{ type: 'uint64', name: 'mintRecipientPolicyId' },
|
|
2335
2077
|
],
|
|
2078
|
+
outputs: [{ type: 'uint64' }],
|
|
2336
2079
|
},
|
|
2337
2080
|
{
|
|
2338
|
-
name: '
|
|
2339
|
-
type: '
|
|
2081
|
+
name: 'setReceivePolicy',
|
|
2082
|
+
type: 'function',
|
|
2083
|
+
stateMutability: 'nonpayable',
|
|
2340
2084
|
inputs: [
|
|
2341
|
-
{ type: '
|
|
2342
|
-
{ type: '
|
|
2085
|
+
{ type: 'uint64', name: 'senderPolicyId' },
|
|
2086
|
+
{ type: 'uint64', name: 'tokenFilterId' },
|
|
2087
|
+
{ type: 'address', name: 'recoveryAuthority' },
|
|
2343
2088
|
],
|
|
2089
|
+
outputs: [],
|
|
2344
2090
|
},
|
|
2345
2091
|
{
|
|
2346
|
-
name: '
|
|
2092
|
+
name: 'PolicyAdminUpdated',
|
|
2347
2093
|
type: 'event',
|
|
2348
2094
|
inputs: [
|
|
2349
|
-
{ type: '
|
|
2350
|
-
{ type: 'address', name: '
|
|
2095
|
+
{ type: 'uint64', name: 'policyId', indexed: true },
|
|
2096
|
+
{ type: 'address', name: 'updater', indexed: true },
|
|
2097
|
+
{ type: 'address', name: 'admin', indexed: true },
|
|
2351
2098
|
],
|
|
2352
2099
|
},
|
|
2353
2100
|
{
|
|
2354
|
-
name: '
|
|
2101
|
+
name: 'PolicyCreated',
|
|
2355
2102
|
type: 'event',
|
|
2356
2103
|
inputs: [
|
|
2357
|
-
{ type: '
|
|
2358
|
-
{ type: 'address', name: '
|
|
2359
|
-
{ type: '
|
|
2360
|
-
{ type: 'uint256', name: 'newLimit' },
|
|
2104
|
+
{ type: 'uint64', name: 'policyId', indexed: true },
|
|
2105
|
+
{ type: 'address', name: 'updater', indexed: true },
|
|
2106
|
+
{ type: 'uint8', name: 'policyType' },
|
|
2361
2107
|
],
|
|
2362
2108
|
},
|
|
2363
2109
|
{
|
|
2364
|
-
name: '
|
|
2110
|
+
name: 'WhitelistUpdated',
|
|
2365
2111
|
type: 'event',
|
|
2366
2112
|
inputs: [
|
|
2113
|
+
{ type: 'uint64', name: 'policyId', indexed: true },
|
|
2114
|
+
{ type: 'address', name: 'updater', indexed: true },
|
|
2367
2115
|
{ type: 'address', name: 'account', indexed: true },
|
|
2368
|
-
{ type: '
|
|
2369
|
-
{ type: 'address', name: 'token', indexed: true },
|
|
2370
|
-
{ type: 'uint256', name: 'amount' },
|
|
2371
|
-
{ type: 'uint256', name: 'remainingLimit' },
|
|
2116
|
+
{ type: 'bool', name: 'allowed' },
|
|
2372
2117
|
],
|
|
2373
2118
|
},
|
|
2374
2119
|
{
|
|
2375
|
-
name: '
|
|
2120
|
+
name: 'BlacklistUpdated',
|
|
2376
2121
|
type: 'event',
|
|
2377
2122
|
inputs: [
|
|
2123
|
+
{ type: 'uint64', name: 'policyId', indexed: true },
|
|
2124
|
+
{ type: 'address', name: 'updater', indexed: true },
|
|
2378
2125
|
{ type: 'address', name: 'account', indexed: true },
|
|
2379
|
-
{ type: '
|
|
2126
|
+
{ type: 'bool', name: 'restricted' },
|
|
2380
2127
|
],
|
|
2381
2128
|
},
|
|
2382
2129
|
{
|
|
2383
|
-
name: '
|
|
2130
|
+
name: 'CompoundPolicyCreated',
|
|
2384
2131
|
type: 'event',
|
|
2385
2132
|
inputs: [
|
|
2386
|
-
{ type: '
|
|
2387
|
-
{ type: '
|
|
2133
|
+
{ type: 'uint64', name: 'policyId', indexed: true },
|
|
2134
|
+
{ type: 'address', name: 'creator', indexed: true },
|
|
2135
|
+
{ type: 'uint64', name: 'senderPolicyId' },
|
|
2136
|
+
{ type: 'uint64', name: 'recipientPolicyId' },
|
|
2137
|
+
{ type: 'uint64', name: 'mintRecipientPolicyId' },
|
|
2388
2138
|
],
|
|
2389
2139
|
},
|
|
2390
|
-
{ name: 'UnauthorizedCaller', type: 'error', inputs: [] },
|
|
2391
|
-
{ name: 'KeyAlreadyExists', type: 'error', inputs: [] },
|
|
2392
|
-
{ name: 'KeyNotFound', type: 'error', inputs: [] },
|
|
2393
|
-
{ name: 'KeyExpired', type: 'error', inputs: [] },
|
|
2394
|
-
{ name: 'SpendingLimitExceeded', type: 'error', inputs: [] },
|
|
2395
|
-
{ name: 'InvalidSpendingLimit', type: 'error', inputs: [] },
|
|
2396
|
-
{ name: 'InvalidSignatureType', type: 'error', inputs: [] },
|
|
2397
|
-
{ name: 'ZeroPublicKey', type: 'error', inputs: [] },
|
|
2398
|
-
{ name: 'ExpiryInPast', type: 'error', inputs: [] },
|
|
2399
|
-
{ name: 'KeyAlreadyRevoked', type: 'error', inputs: [] },
|
|
2400
2140
|
{
|
|
2401
|
-
name: '
|
|
2402
|
-
type: '
|
|
2141
|
+
name: 'ReceivePolicyUpdated',
|
|
2142
|
+
type: 'event',
|
|
2403
2143
|
inputs: [
|
|
2404
|
-
{ type: '
|
|
2405
|
-
{ type: '
|
|
2144
|
+
{ type: 'address', name: 'account', indexed: true },
|
|
2145
|
+
{ type: 'uint64', name: 'senderPolicyId' },
|
|
2146
|
+
{ type: 'uint64', name: 'tokenFilterId' },
|
|
2147
|
+
{ type: 'address', name: 'recoveryAuthority' },
|
|
2406
2148
|
],
|
|
2407
2149
|
},
|
|
2408
|
-
{ name: '
|
|
2409
|
-
{ name: '
|
|
2410
|
-
{ name: '
|
|
2411
|
-
{ name: '
|
|
2412
|
-
{ name: '
|
|
2413
|
-
{
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
inputs: [{ type: 'bytes4', name: 'newSelector' }],
|
|
2417
|
-
},
|
|
2150
|
+
{ name: 'Unauthorized', type: 'error', inputs: [] },
|
|
2151
|
+
{ name: 'PolicyNotFound', type: 'error', inputs: [] },
|
|
2152
|
+
{ name: 'PolicyNotSimple', type: 'error', inputs: [] },
|
|
2153
|
+
{ name: 'InvalidPolicyType', type: 'error', inputs: [] },
|
|
2154
|
+
{ name: 'IncompatiblePolicyType', type: 'error', inputs: [] },
|
|
2155
|
+
{ name: 'VirtualAddressNotAllowed', type: 'error', inputs: [] },
|
|
2156
|
+
{ name: 'InvalidReceivePolicyType', type: 'error', inputs: [] },
|
|
2157
|
+
{ name: 'InvalidRecoveryAuthority', type: 'error', inputs: [] },
|
|
2418
2158
|
];
|
|
2419
|
-
export const
|
|
2159
|
+
export const feeManager = [
|
|
2420
2160
|
{
|
|
2421
|
-
name: '
|
|
2161
|
+
name: 'userTokens',
|
|
2422
2162
|
type: 'function',
|
|
2423
2163
|
stateMutability: 'view',
|
|
2424
|
-
inputs: [
|
|
2425
|
-
|
|
2426
|
-
{ type: 'uint256', name: 'nonceKey' },
|
|
2427
|
-
],
|
|
2428
|
-
outputs: [{ type: 'uint64', name: 'nonce' }],
|
|
2164
|
+
inputs: [{ type: 'address', name: 'user' }],
|
|
2165
|
+
outputs: [{ type: 'address' }],
|
|
2429
2166
|
},
|
|
2430
2167
|
{
|
|
2431
|
-
name: '
|
|
2432
|
-
type: '
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2168
|
+
name: 'validatorTokens',
|
|
2169
|
+
type: 'function',
|
|
2170
|
+
stateMutability: 'view',
|
|
2171
|
+
inputs: [{ type: 'address', name: 'validator' }],
|
|
2172
|
+
outputs: [{ type: 'address' }],
|
|
2173
|
+
},
|
|
2174
|
+
{
|
|
2175
|
+
name: 'setUserToken',
|
|
2176
|
+
type: 'function',
|
|
2177
|
+
stateMutability: 'nonpayable',
|
|
2178
|
+
inputs: [{ type: 'address', name: 'token' }],
|
|
2179
|
+
outputs: [],
|
|
2438
2180
|
},
|
|
2439
|
-
{ name: 'ProtocolNonceNotSupported', type: 'error', inputs: [] },
|
|
2440
|
-
{ name: 'InvalidNonceKey', type: 'error', inputs: [] },
|
|
2441
|
-
{ name: 'NonceOverflow', type: 'error', inputs: [] },
|
|
2442
|
-
{ name: 'ExpiringNonceReplay', type: 'error', inputs: [] },
|
|
2443
|
-
{ name: 'ExpiringNonceSetFull', type: 'error', inputs: [] },
|
|
2444
|
-
{ name: 'InvalidExpiringNonceExpiry', type: 'error', inputs: [] },
|
|
2445
|
-
];
|
|
2446
|
-
export const tip20Factory = [
|
|
2447
2181
|
{
|
|
2448
|
-
name: '
|
|
2182
|
+
name: 'setValidatorToken',
|
|
2449
2183
|
type: 'function',
|
|
2450
2184
|
stateMutability: 'nonpayable',
|
|
2451
|
-
inputs: [
|
|
2452
|
-
|
|
2453
|
-
{ type: 'string', name: 'symbol' },
|
|
2454
|
-
{ type: 'string', name: 'currency' },
|
|
2455
|
-
{ type: 'address', name: 'quoteToken' },
|
|
2456
|
-
{ type: 'address', name: 'admin' },
|
|
2457
|
-
{ type: 'bytes32', name: 'salt' },
|
|
2458
|
-
],
|
|
2459
|
-
outputs: [{ type: 'address' }],
|
|
2185
|
+
inputs: [{ type: 'address', name: 'token' }],
|
|
2186
|
+
outputs: [],
|
|
2460
2187
|
},
|
|
2461
2188
|
{
|
|
2462
|
-
name: '
|
|
2189
|
+
name: 'distributeFees',
|
|
2463
2190
|
type: 'function',
|
|
2464
2191
|
stateMutability: 'nonpayable',
|
|
2465
2192
|
inputs: [
|
|
2466
|
-
{ type: '
|
|
2467
|
-
{ type: '
|
|
2468
|
-
{ type: 'string', name: 'currency' },
|
|
2469
|
-
{ type: 'address', name: 'quoteToken' },
|
|
2470
|
-
{ type: 'address', name: 'admin' },
|
|
2471
|
-
{ type: 'bytes32', name: 'salt' },
|
|
2472
|
-
{ type: 'string', name: 'logoURI' },
|
|
2193
|
+
{ type: 'address', name: 'validator' },
|
|
2194
|
+
{ type: 'address', name: 'token' },
|
|
2473
2195
|
],
|
|
2474
|
-
outputs: [
|
|
2196
|
+
outputs: [],
|
|
2475
2197
|
},
|
|
2476
2198
|
{
|
|
2477
|
-
name: '
|
|
2199
|
+
name: 'collectedFees',
|
|
2478
2200
|
type: 'function',
|
|
2479
2201
|
stateMutability: 'view',
|
|
2480
|
-
inputs: [
|
|
2481
|
-
|
|
2202
|
+
inputs: [
|
|
2203
|
+
{ type: 'address', name: 'validator' },
|
|
2204
|
+
{ type: 'address', name: 'token' },
|
|
2205
|
+
],
|
|
2206
|
+
outputs: [{ type: 'uint256' }],
|
|
2482
2207
|
},
|
|
2483
2208
|
{
|
|
2484
|
-
name: '
|
|
2485
|
-
type: '
|
|
2486
|
-
stateMutability: 'pure',
|
|
2209
|
+
name: 'UserTokenSet',
|
|
2210
|
+
type: 'event',
|
|
2487
2211
|
inputs: [
|
|
2488
|
-
{ type: 'address', name: '
|
|
2489
|
-
{ type: '
|
|
2212
|
+
{ type: 'address', name: 'user', indexed: true },
|
|
2213
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
2490
2214
|
],
|
|
2491
|
-
outputs: [{ type: 'address' }],
|
|
2492
2215
|
},
|
|
2493
2216
|
{
|
|
2494
|
-
name: '
|
|
2217
|
+
name: 'ValidatorTokenSet',
|
|
2495
2218
|
type: 'event',
|
|
2496
2219
|
inputs: [
|
|
2220
|
+
{ type: 'address', name: 'validator', indexed: true },
|
|
2497
2221
|
{ type: 'address', name: 'token', indexed: true },
|
|
2498
|
-
{ type: 'string', name: 'name' },
|
|
2499
|
-
{ type: 'string', name: 'symbol' },
|
|
2500
|
-
{ type: 'string', name: 'currency' },
|
|
2501
|
-
{ type: 'address', name: 'quoteToken' },
|
|
2502
|
-
{ type: 'address', name: 'admin' },
|
|
2503
|
-
{ type: 'bytes32', name: 'salt' },
|
|
2504
2222
|
],
|
|
2505
2223
|
},
|
|
2506
|
-
{ name: 'AddressReserved', type: 'error', inputs: [] },
|
|
2507
|
-
{ name: 'AddressNotReserved', type: 'error', inputs: [] },
|
|
2508
|
-
{ name: 'InvalidQuoteToken', type: 'error', inputs: [] },
|
|
2509
2224
|
{
|
|
2510
|
-
name: '
|
|
2511
|
-
type: '
|
|
2512
|
-
inputs: [
|
|
2225
|
+
name: 'FeesDistributed',
|
|
2226
|
+
type: 'event',
|
|
2227
|
+
inputs: [
|
|
2228
|
+
{ type: 'address', name: 'validator', indexed: true },
|
|
2229
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
2230
|
+
{ type: 'uint256', name: 'amount' },
|
|
2231
|
+
],
|
|
2513
2232
|
},
|
|
2233
|
+
{ name: 'InvalidToken', type: 'error', inputs: [] },
|
|
2234
|
+
{ name: 'InsufficientFeeTokenBalance', type: 'error', inputs: [] },
|
|
2235
|
+
{ name: 'CannotChangeWithinBlock', type: 'error', inputs: [] },
|
|
2514
2236
|
];
|
|
2515
|
-
export const
|
|
2237
|
+
export const feeAmm = [
|
|
2516
2238
|
{
|
|
2517
|
-
name: '
|
|
2239
|
+
name: 'M',
|
|
2518
2240
|
type: 'function',
|
|
2519
2241
|
stateMutability: 'view',
|
|
2520
2242
|
inputs: [],
|
|
2521
|
-
outputs: [{ type: '
|
|
2243
|
+
outputs: [{ type: 'uint256' }],
|
|
2522
2244
|
},
|
|
2523
2245
|
{
|
|
2524
|
-
name: '
|
|
2246
|
+
name: 'N',
|
|
2525
2247
|
type: 'function',
|
|
2526
2248
|
stateMutability: 'view',
|
|
2527
|
-
inputs: [
|
|
2528
|
-
outputs: [{ type: '
|
|
2249
|
+
inputs: [],
|
|
2250
|
+
outputs: [{ type: 'uint256' }],
|
|
2529
2251
|
},
|
|
2530
2252
|
{
|
|
2531
|
-
name: '
|
|
2253
|
+
name: 'SCALE',
|
|
2532
2254
|
type: 'function',
|
|
2533
2255
|
stateMutability: 'view',
|
|
2534
|
-
inputs: [
|
|
2535
|
-
outputs: [
|
|
2536
|
-
{ type: 'uint8', name: 'policyType' },
|
|
2537
|
-
{ type: 'address', name: 'admin' },
|
|
2538
|
-
],
|
|
2256
|
+
inputs: [],
|
|
2257
|
+
outputs: [{ type: 'uint256' }],
|
|
2539
2258
|
},
|
|
2540
2259
|
{
|
|
2541
|
-
name: '
|
|
2260
|
+
name: 'MIN_LIQUIDITY',
|
|
2542
2261
|
type: 'function',
|
|
2543
2262
|
stateMutability: 'view',
|
|
2263
|
+
inputs: [],
|
|
2264
|
+
outputs: [{ type: 'uint256' }],
|
|
2265
|
+
},
|
|
2266
|
+
{
|
|
2267
|
+
name: 'getPoolId',
|
|
2268
|
+
type: 'function',
|
|
2269
|
+
stateMutability: 'pure',
|
|
2544
2270
|
inputs: [
|
|
2545
|
-
{ type: '
|
|
2546
|
-
{ type: 'address', name: '
|
|
2271
|
+
{ type: 'address', name: 'userToken' },
|
|
2272
|
+
{ type: 'address', name: 'validatorToken' },
|
|
2547
2273
|
],
|
|
2548
|
-
outputs: [{ type: '
|
|
2274
|
+
outputs: [{ type: 'bytes32' }],
|
|
2549
2275
|
},
|
|
2550
2276
|
{
|
|
2551
|
-
name: '
|
|
2277
|
+
name: 'getPool',
|
|
2552
2278
|
type: 'function',
|
|
2553
2279
|
stateMutability: 'view',
|
|
2554
2280
|
inputs: [
|
|
2555
|
-
{ type: '
|
|
2556
|
-
{ type: 'address', name: '
|
|
2281
|
+
{ type: 'address', name: 'userToken' },
|
|
2282
|
+
{ type: 'address', name: 'validatorToken' },
|
|
2283
|
+
],
|
|
2284
|
+
outputs: [
|
|
2285
|
+
{
|
|
2286
|
+
type: 'tuple',
|
|
2287
|
+
components: [
|
|
2288
|
+
{ type: 'uint128', name: 'reserveUserToken' },
|
|
2289
|
+
{ type: 'uint128', name: 'reserveValidatorToken' },
|
|
2290
|
+
],
|
|
2291
|
+
},
|
|
2557
2292
|
],
|
|
2558
|
-
outputs: [{ type: 'bool' }],
|
|
2559
2293
|
},
|
|
2560
2294
|
{
|
|
2561
|
-
name: '
|
|
2295
|
+
name: 'pools',
|
|
2562
2296
|
type: 'function',
|
|
2563
2297
|
stateMutability: 'view',
|
|
2564
|
-
inputs: [
|
|
2565
|
-
|
|
2566
|
-
{
|
|
2298
|
+
inputs: [{ type: 'bytes32', name: 'poolId' }],
|
|
2299
|
+
outputs: [
|
|
2300
|
+
{
|
|
2301
|
+
type: 'tuple',
|
|
2302
|
+
components: [
|
|
2303
|
+
{ type: 'uint128', name: 'reserveUserToken' },
|
|
2304
|
+
{ type: 'uint128', name: 'reserveValidatorToken' },
|
|
2305
|
+
],
|
|
2306
|
+
},
|
|
2567
2307
|
],
|
|
2568
|
-
outputs: [{ type: 'bool' }],
|
|
2569
2308
|
},
|
|
2570
2309
|
{
|
|
2571
|
-
name: '
|
|
2310
|
+
name: 'mint',
|
|
2572
2311
|
type: 'function',
|
|
2573
|
-
stateMutability: '
|
|
2312
|
+
stateMutability: 'nonpayable',
|
|
2574
2313
|
inputs: [
|
|
2575
|
-
{ type: '
|
|
2576
|
-
{ type: 'address', name: '
|
|
2314
|
+
{ type: 'address', name: 'userToken' },
|
|
2315
|
+
{ type: 'address', name: 'validatorToken' },
|
|
2316
|
+
{ type: 'uint256', name: 'amountValidatorToken' },
|
|
2317
|
+
{ type: 'address', name: 'to' },
|
|
2577
2318
|
],
|
|
2578
|
-
outputs: [{ type: '
|
|
2319
|
+
outputs: [{ type: 'uint256', name: 'liquidity' }],
|
|
2579
2320
|
},
|
|
2580
2321
|
{
|
|
2581
|
-
name: '
|
|
2322
|
+
name: 'burn',
|
|
2582
2323
|
type: 'function',
|
|
2583
|
-
stateMutability: '
|
|
2584
|
-
inputs: [
|
|
2324
|
+
stateMutability: 'nonpayable',
|
|
2325
|
+
inputs: [
|
|
2326
|
+
{ type: 'address', name: 'userToken' },
|
|
2327
|
+
{ type: 'address', name: 'validatorToken' },
|
|
2328
|
+
{ type: 'uint256', name: 'liquidity' },
|
|
2329
|
+
{ type: 'address', name: 'to' },
|
|
2330
|
+
],
|
|
2585
2331
|
outputs: [
|
|
2586
|
-
{ type: '
|
|
2587
|
-
{ type: '
|
|
2588
|
-
{ type: 'uint64', name: 'mintRecipientPolicyId' },
|
|
2332
|
+
{ type: 'uint256', name: 'amountUserToken' },
|
|
2333
|
+
{ type: 'uint256', name: 'amountValidatorToken' },
|
|
2589
2334
|
],
|
|
2590
2335
|
},
|
|
2591
2336
|
{
|
|
2592
|
-
name: '
|
|
2337
|
+
name: 'totalSupply',
|
|
2593
2338
|
type: 'function',
|
|
2594
2339
|
stateMutability: 'view',
|
|
2595
|
-
inputs: [{ type: '
|
|
2596
|
-
outputs: [
|
|
2597
|
-
{ type: 'bool', name: 'hasReceivePolicy' },
|
|
2598
|
-
{ type: 'uint64', name: 'senderPolicyId' },
|
|
2599
|
-
{ type: 'uint8', name: 'senderPolicyType' },
|
|
2600
|
-
{ type: 'uint64', name: 'tokenFilterId' },
|
|
2601
|
-
{ type: 'uint8', name: 'tokenFilterType' },
|
|
2602
|
-
{ type: 'address', name: 'recoveryAuthority' },
|
|
2603
|
-
],
|
|
2340
|
+
inputs: [{ type: 'bytes32', name: 'poolId' }],
|
|
2341
|
+
outputs: [{ type: 'uint256' }],
|
|
2604
2342
|
},
|
|
2605
2343
|
{
|
|
2606
|
-
name: '
|
|
2344
|
+
name: 'liquidityBalances',
|
|
2607
2345
|
type: 'function',
|
|
2608
2346
|
stateMutability: 'view',
|
|
2609
2347
|
inputs: [
|
|
2610
|
-
{ type: '
|
|
2348
|
+
{ type: 'bytes32', name: 'poolId' },
|
|
2349
|
+
{ type: 'address', name: 'user' },
|
|
2350
|
+
],
|
|
2351
|
+
outputs: [{ type: 'uint256' }],
|
|
2352
|
+
},
|
|
2353
|
+
{
|
|
2354
|
+
name: 'rebalanceSwap',
|
|
2355
|
+
type: 'function',
|
|
2356
|
+
stateMutability: 'nonpayable',
|
|
2357
|
+
inputs: [
|
|
2358
|
+
{ type: 'address', name: 'userToken' },
|
|
2359
|
+
{ type: 'address', name: 'validatorToken' },
|
|
2360
|
+
{ type: 'uint256', name: 'amountOut' },
|
|
2361
|
+
{ type: 'address', name: 'to' },
|
|
2362
|
+
],
|
|
2363
|
+
outputs: [{ type: 'uint256', name: 'amountIn' }],
|
|
2364
|
+
},
|
|
2365
|
+
{
|
|
2366
|
+
name: 'Mint',
|
|
2367
|
+
type: 'event',
|
|
2368
|
+
inputs: [
|
|
2611
2369
|
{ type: 'address', name: 'sender' },
|
|
2612
|
-
{ type: 'address', name: '
|
|
2370
|
+
{ type: 'address', name: 'to', indexed: true },
|
|
2371
|
+
{ type: 'address', name: 'userToken', indexed: true },
|
|
2372
|
+
{ type: 'address', name: 'validatorToken', indexed: true },
|
|
2373
|
+
{ type: 'uint256', name: 'amountValidatorToken' },
|
|
2374
|
+
{ type: 'uint256', name: 'liquidity' },
|
|
2375
|
+
],
|
|
2376
|
+
},
|
|
2377
|
+
{
|
|
2378
|
+
name: 'Burn',
|
|
2379
|
+
type: 'event',
|
|
2380
|
+
inputs: [
|
|
2381
|
+
{ type: 'address', name: 'sender', indexed: true },
|
|
2382
|
+
{ type: 'address', name: 'userToken', indexed: true },
|
|
2383
|
+
{ type: 'address', name: 'validatorToken', indexed: true },
|
|
2384
|
+
{ type: 'uint256', name: 'amountUserToken' },
|
|
2385
|
+
{ type: 'uint256', name: 'amountValidatorToken' },
|
|
2386
|
+
{ type: 'uint256', name: 'liquidity' },
|
|
2387
|
+
{ type: 'address', name: 'to' },
|
|
2388
|
+
],
|
|
2389
|
+
},
|
|
2390
|
+
{
|
|
2391
|
+
name: 'RebalanceSwap',
|
|
2392
|
+
type: 'event',
|
|
2393
|
+
inputs: [
|
|
2394
|
+
{ type: 'address', name: 'userToken', indexed: true },
|
|
2395
|
+
{ type: 'address', name: 'validatorToken', indexed: true },
|
|
2396
|
+
{ type: 'address', name: 'swapper', indexed: true },
|
|
2397
|
+
{ type: 'uint256', name: 'amountIn' },
|
|
2398
|
+
{ type: 'uint256', name: 'amountOut' },
|
|
2613
2399
|
],
|
|
2400
|
+
},
|
|
2401
|
+
{ name: 'IdenticalAddresses', type: 'error', inputs: [] },
|
|
2402
|
+
{ name: 'InvalidToken', type: 'error', inputs: [] },
|
|
2403
|
+
{ name: 'InsufficientLiquidity', type: 'error', inputs: [] },
|
|
2404
|
+
{ name: 'InsufficientReserves', type: 'error', inputs: [] },
|
|
2405
|
+
{ name: 'InvalidAmount', type: 'error', inputs: [] },
|
|
2406
|
+
{ name: 'DivisionByZero', type: 'error', inputs: [] },
|
|
2407
|
+
{ name: 'InvalidSwapCalculation', type: 'error', inputs: [] },
|
|
2408
|
+
];
|
|
2409
|
+
export const validatorConfig = [
|
|
2410
|
+
{
|
|
2411
|
+
name: 'getValidators',
|
|
2412
|
+
type: 'function',
|
|
2413
|
+
stateMutability: 'view',
|
|
2414
|
+
inputs: [],
|
|
2614
2415
|
outputs: [
|
|
2615
|
-
{
|
|
2616
|
-
|
|
2416
|
+
{
|
|
2417
|
+
type: 'tuple[]',
|
|
2418
|
+
name: 'validators',
|
|
2419
|
+
components: [
|
|
2420
|
+
{ type: 'bytes32', name: 'publicKey' },
|
|
2421
|
+
{ type: 'bool', name: 'active' },
|
|
2422
|
+
{ type: 'uint64', name: 'index' },
|
|
2423
|
+
{ type: 'address', name: 'validatorAddress' },
|
|
2424
|
+
{ type: 'string', name: 'inboundAddress' },
|
|
2425
|
+
{ type: 'string', name: 'outboundAddress' },
|
|
2426
|
+
],
|
|
2427
|
+
},
|
|
2617
2428
|
],
|
|
2618
2429
|
},
|
|
2619
2430
|
{
|
|
2620
|
-
name: '
|
|
2431
|
+
name: 'addValidator',
|
|
2621
2432
|
type: 'function',
|
|
2622
2433
|
stateMutability: 'nonpayable',
|
|
2623
2434
|
inputs: [
|
|
2624
|
-
{ type: 'address', name: '
|
|
2625
|
-
{ type: '
|
|
2435
|
+
{ type: 'address', name: 'newValidatorAddress' },
|
|
2436
|
+
{ type: 'bytes32', name: 'publicKey' },
|
|
2437
|
+
{ type: 'bool', name: 'active' },
|
|
2438
|
+
{ type: 'string', name: 'inboundAddress' },
|
|
2439
|
+
{ type: 'string', name: 'outboundAddress' },
|
|
2626
2440
|
],
|
|
2627
|
-
outputs: [
|
|
2441
|
+
outputs: [],
|
|
2628
2442
|
},
|
|
2629
2443
|
{
|
|
2630
|
-
name: '
|
|
2444
|
+
name: 'updateValidator',
|
|
2631
2445
|
type: 'function',
|
|
2632
2446
|
stateMutability: 'nonpayable',
|
|
2633
2447
|
inputs: [
|
|
2634
|
-
{ type: 'address', name: '
|
|
2635
|
-
{ type: '
|
|
2636
|
-
{ type: '
|
|
2448
|
+
{ type: 'address', name: 'newValidatorAddress' },
|
|
2449
|
+
{ type: 'bytes32', name: 'publicKey' },
|
|
2450
|
+
{ type: 'string', name: 'inboundAddress' },
|
|
2451
|
+
{ type: 'string', name: 'outboundAddress' },
|
|
2637
2452
|
],
|
|
2638
|
-
outputs: [
|
|
2453
|
+
outputs: [],
|
|
2639
2454
|
},
|
|
2640
2455
|
{
|
|
2641
|
-
name: '
|
|
2456
|
+
name: 'changeValidatorStatus',
|
|
2642
2457
|
type: 'function',
|
|
2643
2458
|
stateMutability: 'nonpayable',
|
|
2644
2459
|
inputs: [
|
|
2645
|
-
{ type: '
|
|
2646
|
-
{ type: '
|
|
2460
|
+
{ type: 'address', name: 'validator' },
|
|
2461
|
+
{ type: 'bool', name: 'active' },
|
|
2647
2462
|
],
|
|
2648
2463
|
outputs: [],
|
|
2649
2464
|
},
|
|
2650
2465
|
{
|
|
2651
|
-
name: '
|
|
2466
|
+
name: 'changeValidatorStatusByIndex',
|
|
2652
2467
|
type: 'function',
|
|
2653
2468
|
stateMutability: 'nonpayable',
|
|
2654
2469
|
inputs: [
|
|
2655
|
-
{ type: 'uint64', name: '
|
|
2656
|
-
{ type: '
|
|
2657
|
-
{ type: 'bool', name: 'allowed' },
|
|
2470
|
+
{ type: 'uint64', name: 'index' },
|
|
2471
|
+
{ type: 'bool', name: 'active' },
|
|
2658
2472
|
],
|
|
2659
2473
|
outputs: [],
|
|
2660
2474
|
},
|
|
2661
2475
|
{
|
|
2662
|
-
name: '
|
|
2476
|
+
name: 'owner',
|
|
2477
|
+
type: 'function',
|
|
2478
|
+
stateMutability: 'view',
|
|
2479
|
+
inputs: [],
|
|
2480
|
+
outputs: [{ type: 'address' }],
|
|
2481
|
+
},
|
|
2482
|
+
{
|
|
2483
|
+
name: 'changeOwner',
|
|
2663
2484
|
type: 'function',
|
|
2664
2485
|
stateMutability: 'nonpayable',
|
|
2665
|
-
inputs: [
|
|
2666
|
-
{ type: 'uint64', name: 'policyId' },
|
|
2667
|
-
{ type: 'address', name: 'account' },
|
|
2668
|
-
{ type: 'bool', name: 'restricted' },
|
|
2669
|
-
],
|
|
2486
|
+
inputs: [{ type: 'address', name: 'newOwner' }],
|
|
2670
2487
|
outputs: [],
|
|
2671
2488
|
},
|
|
2672
2489
|
{
|
|
2673
|
-
name: '
|
|
2490
|
+
name: 'getNextFullDkgCeremony',
|
|
2674
2491
|
type: 'function',
|
|
2675
|
-
stateMutability: '
|
|
2676
|
-
inputs: [
|
|
2677
|
-
{ type: 'uint64', name: 'senderPolicyId' },
|
|
2678
|
-
{ type: 'uint64', name: 'recipientPolicyId' },
|
|
2679
|
-
{ type: 'uint64', name: 'mintRecipientPolicyId' },
|
|
2680
|
-
],
|
|
2492
|
+
stateMutability: 'view',
|
|
2493
|
+
inputs: [],
|
|
2681
2494
|
outputs: [{ type: 'uint64' }],
|
|
2682
2495
|
},
|
|
2683
2496
|
{
|
|
2684
|
-
name: '
|
|
2497
|
+
name: 'setNextFullDkgCeremony',
|
|
2685
2498
|
type: 'function',
|
|
2686
2499
|
stateMutability: 'nonpayable',
|
|
2687
|
-
inputs: [
|
|
2688
|
-
{ type: 'uint64', name: 'senderPolicyId' },
|
|
2689
|
-
{ type: 'uint64', name: 'tokenFilterId' },
|
|
2690
|
-
{ type: 'address', name: 'recoveryAuthority' },
|
|
2691
|
-
],
|
|
2500
|
+
inputs: [{ type: 'uint64', name: 'epoch' }],
|
|
2692
2501
|
outputs: [],
|
|
2693
2502
|
},
|
|
2694
2503
|
{
|
|
2695
|
-
name: '
|
|
2696
|
-
type: '
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
{ type: 'address', name: 'admin', indexed: true },
|
|
2701
|
-
],
|
|
2702
|
-
},
|
|
2703
|
-
{
|
|
2704
|
-
name: 'PolicyCreated',
|
|
2705
|
-
type: 'event',
|
|
2706
|
-
inputs: [
|
|
2707
|
-
{ type: 'uint64', name: 'policyId', indexed: true },
|
|
2708
|
-
{ type: 'address', name: 'updater', indexed: true },
|
|
2709
|
-
{ type: 'uint8', name: 'policyType' },
|
|
2710
|
-
],
|
|
2504
|
+
name: 'validatorsArray',
|
|
2505
|
+
type: 'function',
|
|
2506
|
+
stateMutability: 'view',
|
|
2507
|
+
inputs: [{ type: 'uint256', name: 'index' }],
|
|
2508
|
+
outputs: [{ type: 'address' }],
|
|
2711
2509
|
},
|
|
2712
2510
|
{
|
|
2713
|
-
name: '
|
|
2714
|
-
type: '
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
{
|
|
2719
|
-
|
|
2511
|
+
name: 'validators',
|
|
2512
|
+
type: 'function',
|
|
2513
|
+
stateMutability: 'view',
|
|
2514
|
+
inputs: [{ type: 'address', name: 'validator' }],
|
|
2515
|
+
outputs: [
|
|
2516
|
+
{
|
|
2517
|
+
type: 'tuple',
|
|
2518
|
+
components: [
|
|
2519
|
+
{ type: 'bytes32', name: 'publicKey' },
|
|
2520
|
+
{ type: 'bool', name: 'active' },
|
|
2521
|
+
{ type: 'uint64', name: 'index' },
|
|
2522
|
+
{ type: 'address', name: 'validatorAddress' },
|
|
2523
|
+
{ type: 'string', name: 'inboundAddress' },
|
|
2524
|
+
{ type: 'string', name: 'outboundAddress' },
|
|
2525
|
+
],
|
|
2526
|
+
},
|
|
2720
2527
|
],
|
|
2721
2528
|
},
|
|
2722
2529
|
{
|
|
2723
|
-
name: '
|
|
2724
|
-
type: '
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
{ type: 'address', name: 'account', indexed: true },
|
|
2729
|
-
{ type: 'bool', name: 'restricted' },
|
|
2730
|
-
],
|
|
2530
|
+
name: 'validatorCount',
|
|
2531
|
+
type: 'function',
|
|
2532
|
+
stateMutability: 'view',
|
|
2533
|
+
inputs: [],
|
|
2534
|
+
outputs: [{ type: 'uint64' }],
|
|
2731
2535
|
},
|
|
2536
|
+
{ name: 'Unauthorized', type: 'error', inputs: [] },
|
|
2537
|
+
{ name: 'ValidatorAlreadyExists', type: 'error', inputs: [] },
|
|
2538
|
+
{ name: 'ValidatorNotFound', type: 'error', inputs: [] },
|
|
2539
|
+
{ name: 'InvalidPublicKey', type: 'error', inputs: [] },
|
|
2732
2540
|
{
|
|
2733
|
-
name: '
|
|
2734
|
-
type: '
|
|
2541
|
+
name: 'NotHostPort',
|
|
2542
|
+
type: 'error',
|
|
2735
2543
|
inputs: [
|
|
2736
|
-
{ type: '
|
|
2737
|
-
{ type: '
|
|
2738
|
-
{ type: '
|
|
2739
|
-
{ type: 'uint64', name: 'recipientPolicyId' },
|
|
2740
|
-
{ type: 'uint64', name: 'mintRecipientPolicyId' },
|
|
2544
|
+
{ type: 'string', name: 'field' },
|
|
2545
|
+
{ type: 'string', name: 'input' },
|
|
2546
|
+
{ type: 'string', name: 'backtrace' },
|
|
2741
2547
|
],
|
|
2742
2548
|
},
|
|
2743
2549
|
{
|
|
2744
|
-
name: '
|
|
2745
|
-
type: '
|
|
2550
|
+
name: 'NotIpPort',
|
|
2551
|
+
type: 'error',
|
|
2746
2552
|
inputs: [
|
|
2747
|
-
{ type: '
|
|
2748
|
-
{ type: '
|
|
2749
|
-
{ type: '
|
|
2750
|
-
{ type: 'address', name: 'recoveryAuthority' },
|
|
2553
|
+
{ type: 'string', name: 'field' },
|
|
2554
|
+
{ type: 'string', name: 'input' },
|
|
2555
|
+
{ type: 'string', name: 'backtrace' },
|
|
2751
2556
|
],
|
|
2752
2557
|
},
|
|
2753
|
-
{ name: 'Unauthorized', type: 'error', inputs: [] },
|
|
2754
|
-
{ name: 'PolicyNotFound', type: 'error', inputs: [] },
|
|
2755
|
-
{ name: 'PolicyNotSimple', type: 'error', inputs: [] },
|
|
2756
|
-
{ name: 'InvalidPolicyType', type: 'error', inputs: [] },
|
|
2757
|
-
{ name: 'IncompatiblePolicyType', type: 'error', inputs: [] },
|
|
2758
|
-
{ name: 'VirtualAddressNotAllowed', type: 'error', inputs: [] },
|
|
2759
|
-
{ name: 'InvalidReceivePolicyType', type: 'error', inputs: [] },
|
|
2760
|
-
{ name: 'InvalidRecoveryAuthority', type: 'error', inputs: [] },
|
|
2761
2558
|
];
|
|
2762
|
-
export const
|
|
2559
|
+
export const validatorConfigV2 = [
|
|
2763
2560
|
{
|
|
2764
|
-
name: '
|
|
2561
|
+
name: 'getActiveValidators',
|
|
2765
2562
|
type: 'function',
|
|
2766
2563
|
stateMutability: 'view',
|
|
2767
2564
|
inputs: [],
|
|
@@ -2771,130 +2568,329 @@ export const validatorConfig = [
|
|
|
2771
2568
|
name: 'validators',
|
|
2772
2569
|
components: [
|
|
2773
2570
|
{ type: 'bytes32', name: 'publicKey' },
|
|
2774
|
-
{ type: '
|
|
2571
|
+
{ type: 'address', name: 'validatorAddress' },
|
|
2572
|
+
{ type: 'string', name: 'ingress' },
|
|
2573
|
+
{ type: 'string', name: 'egress' },
|
|
2574
|
+
{ type: 'address', name: 'feeRecipient' },
|
|
2575
|
+
{ type: 'uint64', name: 'index' },
|
|
2576
|
+
{ type: 'uint64', name: 'addedAtHeight' },
|
|
2577
|
+
{ type: 'uint64', name: 'deactivatedAtHeight' },
|
|
2578
|
+
],
|
|
2579
|
+
},
|
|
2580
|
+
],
|
|
2581
|
+
},
|
|
2582
|
+
{
|
|
2583
|
+
name: 'getInitializedAtHeight',
|
|
2584
|
+
type: 'function',
|
|
2585
|
+
stateMutability: 'view',
|
|
2586
|
+
inputs: [],
|
|
2587
|
+
outputs: [{ type: 'uint64' }],
|
|
2588
|
+
},
|
|
2589
|
+
{
|
|
2590
|
+
name: 'owner',
|
|
2591
|
+
type: 'function',
|
|
2592
|
+
stateMutability: 'view',
|
|
2593
|
+
inputs: [],
|
|
2594
|
+
outputs: [{ type: 'address' }],
|
|
2595
|
+
},
|
|
2596
|
+
{
|
|
2597
|
+
name: 'validatorCount',
|
|
2598
|
+
type: 'function',
|
|
2599
|
+
stateMutability: 'view',
|
|
2600
|
+
inputs: [],
|
|
2601
|
+
outputs: [{ type: 'uint64' }],
|
|
2602
|
+
},
|
|
2603
|
+
{
|
|
2604
|
+
name: 'validatorByIndex',
|
|
2605
|
+
type: 'function',
|
|
2606
|
+
stateMutability: 'view',
|
|
2607
|
+
inputs: [{ type: 'uint64', name: 'index' }],
|
|
2608
|
+
outputs: [
|
|
2609
|
+
{
|
|
2610
|
+
type: 'tuple',
|
|
2611
|
+
components: [
|
|
2612
|
+
{ type: 'bytes32', name: 'publicKey' },
|
|
2613
|
+
{ type: 'address', name: 'validatorAddress' },
|
|
2614
|
+
{ type: 'string', name: 'ingress' },
|
|
2615
|
+
{ type: 'string', name: 'egress' },
|
|
2616
|
+
{ type: 'address', name: 'feeRecipient' },
|
|
2617
|
+
{ type: 'uint64', name: 'index' },
|
|
2618
|
+
{ type: 'uint64', name: 'addedAtHeight' },
|
|
2619
|
+
{ type: 'uint64', name: 'deactivatedAtHeight' },
|
|
2620
|
+
],
|
|
2621
|
+
},
|
|
2622
|
+
],
|
|
2623
|
+
},
|
|
2624
|
+
{
|
|
2625
|
+
name: 'validatorByAddress',
|
|
2626
|
+
type: 'function',
|
|
2627
|
+
stateMutability: 'view',
|
|
2628
|
+
inputs: [{ type: 'address', name: 'validatorAddress' }],
|
|
2629
|
+
outputs: [
|
|
2630
|
+
{
|
|
2631
|
+
type: 'tuple',
|
|
2632
|
+
components: [
|
|
2633
|
+
{ type: 'bytes32', name: 'publicKey' },
|
|
2634
|
+
{ type: 'address', name: 'validatorAddress' },
|
|
2635
|
+
{ type: 'string', name: 'ingress' },
|
|
2636
|
+
{ type: 'string', name: 'egress' },
|
|
2637
|
+
{ type: 'address', name: 'feeRecipient' },
|
|
2775
2638
|
{ type: 'uint64', name: 'index' },
|
|
2639
|
+
{ type: 'uint64', name: 'addedAtHeight' },
|
|
2640
|
+
{ type: 'uint64', name: 'deactivatedAtHeight' },
|
|
2641
|
+
],
|
|
2642
|
+
},
|
|
2643
|
+
],
|
|
2644
|
+
},
|
|
2645
|
+
{
|
|
2646
|
+
name: 'validatorByPublicKey',
|
|
2647
|
+
type: 'function',
|
|
2648
|
+
stateMutability: 'view',
|
|
2649
|
+
inputs: [{ type: 'bytes32', name: 'publicKey' }],
|
|
2650
|
+
outputs: [
|
|
2651
|
+
{
|
|
2652
|
+
type: 'tuple',
|
|
2653
|
+
components: [
|
|
2654
|
+
{ type: 'bytes32', name: 'publicKey' },
|
|
2776
2655
|
{ type: 'address', name: 'validatorAddress' },
|
|
2777
|
-
{ type: 'string', name: '
|
|
2778
|
-
{ type: 'string', name: '
|
|
2656
|
+
{ type: 'string', name: 'ingress' },
|
|
2657
|
+
{ type: 'string', name: 'egress' },
|
|
2658
|
+
{ type: 'address', name: 'feeRecipient' },
|
|
2659
|
+
{ type: 'uint64', name: 'index' },
|
|
2660
|
+
{ type: 'uint64', name: 'addedAtHeight' },
|
|
2661
|
+
{ type: 'uint64', name: 'deactivatedAtHeight' },
|
|
2779
2662
|
],
|
|
2780
2663
|
},
|
|
2781
2664
|
],
|
|
2782
2665
|
},
|
|
2666
|
+
{
|
|
2667
|
+
name: 'getNextNetworkIdentityRotationEpoch',
|
|
2668
|
+
type: 'function',
|
|
2669
|
+
stateMutability: 'view',
|
|
2670
|
+
inputs: [],
|
|
2671
|
+
outputs: [{ type: 'uint64' }],
|
|
2672
|
+
},
|
|
2673
|
+
{
|
|
2674
|
+
name: 'isInitialized',
|
|
2675
|
+
type: 'function',
|
|
2676
|
+
stateMutability: 'view',
|
|
2677
|
+
inputs: [],
|
|
2678
|
+
outputs: [{ type: 'bool' }],
|
|
2679
|
+
},
|
|
2783
2680
|
{
|
|
2784
2681
|
name: 'addValidator',
|
|
2785
2682
|
type: 'function',
|
|
2786
2683
|
stateMutability: 'nonpayable',
|
|
2787
2684
|
inputs: [
|
|
2788
|
-
{ type: 'address', name: '
|
|
2685
|
+
{ type: 'address', name: 'validatorAddress' },
|
|
2789
2686
|
{ type: 'bytes32', name: 'publicKey' },
|
|
2790
|
-
{ type: '
|
|
2791
|
-
{ type: 'string', name: '
|
|
2792
|
-
{ type: '
|
|
2687
|
+
{ type: 'string', name: 'ingress' },
|
|
2688
|
+
{ type: 'string', name: 'egress' },
|
|
2689
|
+
{ type: 'address', name: 'feeRecipient' },
|
|
2690
|
+
{ type: 'bytes', name: 'signature' },
|
|
2793
2691
|
],
|
|
2692
|
+
outputs: [{ type: 'uint64', name: 'index' }],
|
|
2693
|
+
},
|
|
2694
|
+
{
|
|
2695
|
+
name: 'deactivateValidator',
|
|
2696
|
+
type: 'function',
|
|
2697
|
+
stateMutability: 'nonpayable',
|
|
2698
|
+
inputs: [{ type: 'uint64', name: 'idx' }],
|
|
2794
2699
|
outputs: [],
|
|
2795
2700
|
},
|
|
2796
2701
|
{
|
|
2797
|
-
name: '
|
|
2702
|
+
name: 'rotateValidator',
|
|
2798
2703
|
type: 'function',
|
|
2799
2704
|
stateMutability: 'nonpayable',
|
|
2800
2705
|
inputs: [
|
|
2801
|
-
{ type: '
|
|
2706
|
+
{ type: 'uint64', name: 'idx' },
|
|
2802
2707
|
{ type: 'bytes32', name: 'publicKey' },
|
|
2803
|
-
{ type: 'string', name: '
|
|
2804
|
-
{ type: 'string', name: '
|
|
2708
|
+
{ type: 'string', name: 'ingress' },
|
|
2709
|
+
{ type: 'string', name: 'egress' },
|
|
2710
|
+
{ type: 'bytes', name: 'signature' },
|
|
2805
2711
|
],
|
|
2806
2712
|
outputs: [],
|
|
2807
2713
|
},
|
|
2808
2714
|
{
|
|
2809
|
-
name: '
|
|
2715
|
+
name: 'setFeeRecipient',
|
|
2810
2716
|
type: 'function',
|
|
2811
2717
|
stateMutability: 'nonpayable',
|
|
2812
2718
|
inputs: [
|
|
2813
|
-
{ type: '
|
|
2814
|
-
{ type: '
|
|
2719
|
+
{ type: 'uint64', name: 'idx' },
|
|
2720
|
+
{ type: 'address', name: 'feeRecipient' },
|
|
2815
2721
|
],
|
|
2816
2722
|
outputs: [],
|
|
2817
2723
|
},
|
|
2818
2724
|
{
|
|
2819
|
-
name: '
|
|
2725
|
+
name: 'setIpAddresses',
|
|
2820
2726
|
type: 'function',
|
|
2821
2727
|
stateMutability: 'nonpayable',
|
|
2822
2728
|
inputs: [
|
|
2823
|
-
{ type: 'uint64', name: '
|
|
2824
|
-
{ type: '
|
|
2729
|
+
{ type: 'uint64', name: 'idx' },
|
|
2730
|
+
{ type: 'string', name: 'ingress' },
|
|
2731
|
+
{ type: 'string', name: 'egress' },
|
|
2825
2732
|
],
|
|
2826
2733
|
outputs: [],
|
|
2827
2734
|
},
|
|
2828
2735
|
{
|
|
2829
|
-
name: '
|
|
2736
|
+
name: 'transferValidatorOwnership',
|
|
2830
2737
|
type: 'function',
|
|
2831
|
-
stateMutability: '
|
|
2832
|
-
inputs: [
|
|
2833
|
-
|
|
2738
|
+
stateMutability: 'nonpayable',
|
|
2739
|
+
inputs: [
|
|
2740
|
+
{ type: 'uint64', name: 'idx' },
|
|
2741
|
+
{ type: 'address', name: 'newAddress' },
|
|
2742
|
+
],
|
|
2743
|
+
outputs: [],
|
|
2834
2744
|
},
|
|
2835
2745
|
{
|
|
2836
|
-
name: '
|
|
2746
|
+
name: 'transferOwnership',
|
|
2837
2747
|
type: 'function',
|
|
2838
2748
|
stateMutability: 'nonpayable',
|
|
2839
2749
|
inputs: [{ type: 'address', name: 'newOwner' }],
|
|
2840
2750
|
outputs: [],
|
|
2841
2751
|
},
|
|
2842
2752
|
{
|
|
2843
|
-
name: '
|
|
2753
|
+
name: 'setNetworkIdentityRotationEpoch',
|
|
2844
2754
|
type: 'function',
|
|
2845
|
-
stateMutability: '
|
|
2846
|
-
inputs: [],
|
|
2847
|
-
outputs: [
|
|
2755
|
+
stateMutability: 'nonpayable',
|
|
2756
|
+
inputs: [{ type: 'uint64', name: 'epoch' }],
|
|
2757
|
+
outputs: [],
|
|
2848
2758
|
},
|
|
2849
2759
|
{
|
|
2850
|
-
name: '
|
|
2760
|
+
name: 'migrateValidator',
|
|
2851
2761
|
type: 'function',
|
|
2852
2762
|
stateMutability: 'nonpayable',
|
|
2853
|
-
inputs: [{ type: 'uint64', name: '
|
|
2763
|
+
inputs: [{ type: 'uint64', name: 'idx' }],
|
|
2854
2764
|
outputs: [],
|
|
2855
2765
|
},
|
|
2856
2766
|
{
|
|
2857
|
-
name: '
|
|
2767
|
+
name: 'initializeIfMigrated',
|
|
2858
2768
|
type: 'function',
|
|
2859
|
-
stateMutability: '
|
|
2860
|
-
inputs: [
|
|
2861
|
-
outputs: [
|
|
2769
|
+
stateMutability: 'nonpayable',
|
|
2770
|
+
inputs: [],
|
|
2771
|
+
outputs: [],
|
|
2862
2772
|
},
|
|
2863
2773
|
{
|
|
2864
|
-
name: '
|
|
2865
|
-
type: '
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
{
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
{ type: 'bool', name: 'active' },
|
|
2874
|
-
{ type: 'uint64', name: 'index' },
|
|
2875
|
-
{ type: 'address', name: 'validatorAddress' },
|
|
2876
|
-
{ type: 'string', name: 'inboundAddress' },
|
|
2877
|
-
{ type: 'string', name: 'outboundAddress' },
|
|
2878
|
-
],
|
|
2879
|
-
},
|
|
2774
|
+
name: 'ValidatorAdded',
|
|
2775
|
+
type: 'event',
|
|
2776
|
+
inputs: [
|
|
2777
|
+
{ type: 'uint64', name: 'index', indexed: true },
|
|
2778
|
+
{ type: 'address', name: 'validatorAddress', indexed: true },
|
|
2779
|
+
{ type: 'bytes32', name: 'publicKey' },
|
|
2780
|
+
{ type: 'string', name: 'ingress' },
|
|
2781
|
+
{ type: 'string', name: 'egress' },
|
|
2782
|
+
{ type: 'address', name: 'feeRecipient' },
|
|
2880
2783
|
],
|
|
2881
2784
|
},
|
|
2882
2785
|
{
|
|
2883
|
-
name: '
|
|
2884
|
-
type: '
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2786
|
+
name: 'ValidatorDeactivated',
|
|
2787
|
+
type: 'event',
|
|
2788
|
+
inputs: [
|
|
2789
|
+
{ type: 'uint64', name: 'index', indexed: true },
|
|
2790
|
+
{ type: 'address', name: 'validatorAddress', indexed: true },
|
|
2791
|
+
],
|
|
2888
2792
|
},
|
|
2889
|
-
{
|
|
2890
|
-
|
|
2891
|
-
|
|
2793
|
+
{
|
|
2794
|
+
name: 'ValidatorRotated',
|
|
2795
|
+
type: 'event',
|
|
2796
|
+
inputs: [
|
|
2797
|
+
{ type: 'uint64', name: 'index', indexed: true },
|
|
2798
|
+
{ type: 'uint64', name: 'deactivatedIndex', indexed: true },
|
|
2799
|
+
{ type: 'address', name: 'validatorAddress', indexed: true },
|
|
2800
|
+
{ type: 'bytes32', name: 'oldPublicKey' },
|
|
2801
|
+
{ type: 'bytes32', name: 'newPublicKey' },
|
|
2802
|
+
{ type: 'string', name: 'ingress' },
|
|
2803
|
+
{ type: 'string', name: 'egress' },
|
|
2804
|
+
{ type: 'address', name: 'caller' },
|
|
2805
|
+
],
|
|
2806
|
+
},
|
|
2807
|
+
{
|
|
2808
|
+
name: 'FeeRecipientUpdated',
|
|
2809
|
+
type: 'event',
|
|
2810
|
+
inputs: [
|
|
2811
|
+
{ type: 'uint64', name: 'index', indexed: true },
|
|
2812
|
+
{ type: 'address', name: 'feeRecipient' },
|
|
2813
|
+
{ type: 'address', name: 'caller' },
|
|
2814
|
+
],
|
|
2815
|
+
},
|
|
2816
|
+
{
|
|
2817
|
+
name: 'IpAddressesUpdated',
|
|
2818
|
+
type: 'event',
|
|
2819
|
+
inputs: [
|
|
2820
|
+
{ type: 'uint64', name: 'index', indexed: true },
|
|
2821
|
+
{ type: 'string', name: 'ingress' },
|
|
2822
|
+
{ type: 'string', name: 'egress' },
|
|
2823
|
+
{ type: 'address', name: 'caller' },
|
|
2824
|
+
],
|
|
2825
|
+
},
|
|
2826
|
+
{
|
|
2827
|
+
name: 'ValidatorOwnershipTransferred',
|
|
2828
|
+
type: 'event',
|
|
2829
|
+
inputs: [
|
|
2830
|
+
{ type: 'uint64', name: 'index', indexed: true },
|
|
2831
|
+
{ type: 'address', name: 'oldAddress', indexed: true },
|
|
2832
|
+
{ type: 'address', name: 'newAddress', indexed: true },
|
|
2833
|
+
{ type: 'address', name: 'caller' },
|
|
2834
|
+
],
|
|
2835
|
+
},
|
|
2836
|
+
{
|
|
2837
|
+
name: 'OwnershipTransferred',
|
|
2838
|
+
type: 'event',
|
|
2839
|
+
inputs: [
|
|
2840
|
+
{ type: 'address', name: 'oldOwner', indexed: true },
|
|
2841
|
+
{ type: 'address', name: 'newOwner', indexed: true },
|
|
2842
|
+
],
|
|
2843
|
+
},
|
|
2844
|
+
{
|
|
2845
|
+
name: 'ValidatorMigrated',
|
|
2846
|
+
type: 'event',
|
|
2847
|
+
inputs: [
|
|
2848
|
+
{ type: 'uint64', name: 'index', indexed: true },
|
|
2849
|
+
{ type: 'address', name: 'validatorAddress', indexed: true },
|
|
2850
|
+
{ type: 'bytes32', name: 'publicKey' },
|
|
2851
|
+
],
|
|
2852
|
+
},
|
|
2853
|
+
{
|
|
2854
|
+
name: 'NetworkIdentityRotationEpochSet',
|
|
2855
|
+
type: 'event',
|
|
2856
|
+
inputs: [
|
|
2857
|
+
{ type: 'uint64', name: 'previousEpoch', indexed: true },
|
|
2858
|
+
{ type: 'uint64', name: 'nextEpoch', indexed: true },
|
|
2859
|
+
],
|
|
2860
|
+
},
|
|
2861
|
+
{
|
|
2862
|
+
name: 'Initialized',
|
|
2863
|
+
type: 'event',
|
|
2864
|
+
inputs: [{ type: 'uint64', name: 'height' }],
|
|
2865
|
+
},
|
|
2866
|
+
{
|
|
2867
|
+
name: 'SkippedValidatorMigration',
|
|
2868
|
+
type: 'event',
|
|
2869
|
+
inputs: [
|
|
2870
|
+
{ type: 'uint64', name: 'index', indexed: true },
|
|
2871
|
+
{ type: 'address', name: 'validatorAddress', indexed: true },
|
|
2872
|
+
{ type: 'bytes32', name: 'publicKey' },
|
|
2873
|
+
],
|
|
2874
|
+
},
|
|
2875
|
+
{ name: 'AlreadyInitialized', type: 'error', inputs: [] },
|
|
2876
|
+
{
|
|
2877
|
+
name: 'IngressAlreadyExists',
|
|
2878
|
+
type: 'error',
|
|
2879
|
+
inputs: [{ type: 'string', name: 'ingress' }],
|
|
2880
|
+
},
|
|
2881
|
+
{ name: 'EmptyV1ValidatorSet', type: 'error', inputs: [] },
|
|
2882
|
+
{ name: 'InvalidMigrationIndex', type: 'error', inputs: [] },
|
|
2883
|
+
{ name: 'InvalidOwner', type: 'error', inputs: [] },
|
|
2892
2884
|
{ name: 'InvalidPublicKey', type: 'error', inputs: [] },
|
|
2885
|
+
{ name: 'InvalidSignature', type: 'error', inputs: [] },
|
|
2886
|
+
{ name: 'InvalidSignatureFormat', type: 'error', inputs: [] },
|
|
2887
|
+
{ name: 'InvalidValidatorAddress', type: 'error', inputs: [] },
|
|
2888
|
+
{ name: 'MigrationNotComplete', type: 'error', inputs: [] },
|
|
2889
|
+
{ name: 'NotInitialized', type: 'error', inputs: [] },
|
|
2893
2890
|
{
|
|
2894
|
-
name: '
|
|
2891
|
+
name: 'NotIp',
|
|
2895
2892
|
type: 'error',
|
|
2896
2893
|
inputs: [
|
|
2897
|
-
{ type: 'string', name: 'field' },
|
|
2898
2894
|
{ type: 'string', name: 'input' },
|
|
2899
2895
|
{ type: 'string', name: 'backtrace' },
|
|
2900
2896
|
],
|
|
@@ -2903,26 +2899,30 @@ export const validatorConfig = [
|
|
|
2903
2899
|
name: 'NotIpPort',
|
|
2904
2900
|
type: 'error',
|
|
2905
2901
|
inputs: [
|
|
2906
|
-
{ type: 'string', name: 'field' },
|
|
2907
2902
|
{ type: 'string', name: 'input' },
|
|
2908
2903
|
{ type: 'string', name: 'backtrace' },
|
|
2909
2904
|
],
|
|
2910
2905
|
},
|
|
2906
|
+
{ name: 'PublicKeyAlreadyExists', type: 'error', inputs: [] },
|
|
2907
|
+
{ name: 'Unauthorized', type: 'error', inputs: [] },
|
|
2908
|
+
{ name: 'AddressAlreadyHasValidator', type: 'error', inputs: [] },
|
|
2909
|
+
{ name: 'ValidatorAlreadyDeactivated', type: 'error', inputs: [] },
|
|
2910
|
+
{ name: 'ValidatorNotFound', type: 'error', inputs: [] },
|
|
2911
2911
|
];
|
|
2912
2912
|
export const abis = [
|
|
2913
|
-
...tip20ChannelReserve,
|
|
2914
|
-
...tip20,
|
|
2915
|
-
...validatorConfigV2,
|
|
2916
|
-
...signatureVerifier,
|
|
2917
|
-
...stablecoinDex,
|
|
2918
|
-
...addressRegistry,
|
|
2919
|
-
...feeManager,
|
|
2920
|
-
...feeAmm,
|
|
2921
|
-
...receivePolicyGuard,
|
|
2922
2913
|
...accountKeychain,
|
|
2914
|
+
...addressRegistry,
|
|
2923
2915
|
...nonce,
|
|
2916
|
+
...receivePolicyGuard,
|
|
2917
|
+
...signatureVerifier,
|
|
2918
|
+
...stablecoinDex,
|
|
2919
|
+
...tip20,
|
|
2920
|
+
...tip20ChannelReserve,
|
|
2924
2921
|
...tip20Factory,
|
|
2925
2922
|
...tip403Registry,
|
|
2923
|
+
...feeManager,
|
|
2924
|
+
...feeAmm,
|
|
2926
2925
|
...validatorConfig,
|
|
2926
|
+
...validatorConfigV2,
|
|
2927
2927
|
];
|
|
2928
2928
|
//# sourceMappingURL=Abis.js.map
|