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