tempo.ts 0.1.0 → 0.1.2

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 (133) hide show
  1. package/package.json +17 -18
  2. package/src/ox/TokenId.test.ts +11 -0
  3. package/src/ox/TokenId.ts +15 -0
  4. package/src/prool/Instance.ts +2 -2
  5. package/src/viem/Abis.ts +2 -1
  6. package/src/viem/Actions/dex.test.ts +15 -15
  7. package/src/viem/Actions/token.test.ts +34 -0
  8. package/src/viem/Actions/token.ts +81 -14
  9. package/src/viem/e2e.test.ts +11 -10
  10. package/dist/chains.d.ts +0 -1180
  11. package/dist/chains.d.ts.map +0 -1
  12. package/dist/chains.js +0 -30
  13. package/dist/chains.js.map +0 -1
  14. package/dist/index.d.ts +0 -2
  15. package/dist/index.d.ts.map +0 -1
  16. package/dist/index.js +0 -2
  17. package/dist/index.js.map +0 -1
  18. package/dist/internal/types.d.ts +0 -284
  19. package/dist/internal/types.d.ts.map +0 -1
  20. package/dist/internal/types.js +0 -2
  21. package/dist/internal/types.js.map +0 -1
  22. package/dist/ox/SignatureEnvelope.d.ts +0 -245
  23. package/dist/ox/SignatureEnvelope.d.ts.map +0 -1
  24. package/dist/ox/SignatureEnvelope.js +0 -437
  25. package/dist/ox/SignatureEnvelope.js.map +0 -1
  26. package/dist/ox/TokenId.d.ts +0 -18
  27. package/dist/ox/TokenId.d.ts.map +0 -1
  28. package/dist/ox/TokenId.js +0 -29
  29. package/dist/ox/TokenId.js.map +0 -1
  30. package/dist/ox/TokenRole.d.ts +0 -11
  31. package/dist/ox/TokenRole.d.ts.map +0 -1
  32. package/dist/ox/TokenRole.js +0 -22
  33. package/dist/ox/TokenRole.js.map +0 -1
  34. package/dist/ox/Transaction.d.ts +0 -198
  35. package/dist/ox/Transaction.d.ts.map +0 -1
  36. package/dist/ox/Transaction.js +0 -162
  37. package/dist/ox/Transaction.js.map +0 -1
  38. package/dist/ox/TransactionEnvelopeAA.d.ts +0 -461
  39. package/dist/ox/TransactionEnvelopeAA.d.ts.map +0 -1
  40. package/dist/ox/TransactionEnvelopeAA.js +0 -528
  41. package/dist/ox/TransactionEnvelopeAA.js.map +0 -1
  42. package/dist/ox/TransactionRequest.d.ts +0 -64
  43. package/dist/ox/TransactionRequest.d.ts.map +0 -1
  44. package/dist/ox/TransactionRequest.js +0 -75
  45. package/dist/ox/TransactionRequest.js.map +0 -1
  46. package/dist/ox/index.d.ts +0 -6
  47. package/dist/ox/index.d.ts.map +0 -1
  48. package/dist/ox/index.js +0 -6
  49. package/dist/ox/index.js.map +0 -1
  50. package/dist/prool/Instance.d.ts +0 -88
  51. package/dist/prool/Instance.d.ts.map +0 -1
  52. package/dist/prool/Instance.js +0 -96
  53. package/dist/prool/Instance.js.map +0 -1
  54. package/dist/prool/index.d.ts +0 -2
  55. package/dist/prool/index.d.ts.map +0 -1
  56. package/dist/prool/index.js +0 -2
  57. package/dist/prool/index.js.map +0 -1
  58. package/dist/viem/Abis.d.ts +0 -1881
  59. package/dist/viem/Abis.d.ts.map +0 -1
  60. package/dist/viem/Abis.js +0 -1173
  61. package/dist/viem/Abis.js.map +0 -1
  62. package/dist/viem/Actions/amm.d.ts +0 -2006
  63. package/dist/viem/Actions/amm.d.ts.map +0 -1
  64. package/dist/viem/Actions/amm.js +0 -900
  65. package/dist/viem/Actions/amm.js.map +0 -1
  66. package/dist/viem/Actions/dex.d.ts +0 -3263
  67. package/dist/viem/Actions/dex.d.ts.map +0 -1
  68. package/dist/viem/Actions/dex.js +0 -1357
  69. package/dist/viem/Actions/dex.js.map +0 -1
  70. package/dist/viem/Actions/fee.d.ts +0 -374
  71. package/dist/viem/Actions/fee.d.ts.map +0 -1
  72. package/dist/viem/Actions/fee.js +0 -235
  73. package/dist/viem/Actions/fee.js.map +0 -1
  74. package/dist/viem/Actions/index.d.ts +0 -6
  75. package/dist/viem/Actions/index.d.ts.map +0 -1
  76. package/dist/viem/Actions/index.js +0 -6
  77. package/dist/viem/Actions/index.js.map +0 -1
  78. package/dist/viem/Actions/policy.d.ts +0 -1672
  79. package/dist/viem/Actions/policy.d.ts.map +0 -1
  80. package/dist/viem/Actions/policy.js +0 -875
  81. package/dist/viem/Actions/policy.js.map +0 -1
  82. package/dist/viem/Actions/token.d.ts +0 -13687
  83. package/dist/viem/Actions/token.d.ts.map +0 -1
  84. package/dist/viem/Actions/token.js +0 -3020
  85. package/dist/viem/Actions/token.js.map +0 -1
  86. package/dist/viem/Addresses.d.ts +0 -9
  87. package/dist/viem/Addresses.d.ts.map +0 -1
  88. package/dist/viem/Addresses.js +0 -9
  89. package/dist/viem/Addresses.js.map +0 -1
  90. package/dist/viem/Chain.d.ts +0 -365
  91. package/dist/viem/Chain.d.ts.map +0 -1
  92. package/dist/viem/Chain.js +0 -22
  93. package/dist/viem/Chain.js.map +0 -1
  94. package/dist/viem/Client.d.ts +0 -27
  95. package/dist/viem/Client.d.ts.map +0 -1
  96. package/dist/viem/Client.js +0 -28
  97. package/dist/viem/Client.js.map +0 -1
  98. package/dist/viem/Decorator.d.ts +0 -2161
  99. package/dist/viem/Decorator.d.ts.map +0 -1
  100. package/dist/viem/Decorator.js +0 -122
  101. package/dist/viem/Decorator.js.map +0 -1
  102. package/dist/viem/Formatters.d.ts +0 -4
  103. package/dist/viem/Formatters.d.ts.map +0 -1
  104. package/dist/viem/Formatters.js +0 -76
  105. package/dist/viem/Formatters.js.map +0 -1
  106. package/dist/viem/Tick.d.ts +0 -111
  107. package/dist/viem/Tick.d.ts.map +0 -1
  108. package/dist/viem/Tick.js +0 -127
  109. package/dist/viem/Tick.js.map +0 -1
  110. package/dist/viem/TokenIds.d.ts +0 -3
  111. package/dist/viem/TokenIds.d.ts.map +0 -1
  112. package/dist/viem/TokenIds.js +0 -3
  113. package/dist/viem/TokenIds.js.map +0 -1
  114. package/dist/viem/Transaction.d.ts +0 -57
  115. package/dist/viem/Transaction.d.ts.map +0 -1
  116. package/dist/viem/Transaction.js +0 -137
  117. package/dist/viem/Transaction.js.map +0 -1
  118. package/dist/viem/Transport.d.ts +0 -16
  119. package/dist/viem/Transport.d.ts.map +0 -1
  120. package/dist/viem/Transport.js +0 -33
  121. package/dist/viem/Transport.js.map +0 -1
  122. package/dist/viem/index.d.ts +0 -14
  123. package/dist/viem/index.d.ts.map +0 -1
  124. package/dist/viem/index.js +0 -14
  125. package/dist/viem/index.js.map +0 -1
  126. package/dist/viem/internal/types.d.ts +0 -10
  127. package/dist/viem/internal/types.d.ts.map +0 -1
  128. package/dist/viem/internal/types.js +0 -2
  129. package/dist/viem/internal/types.js.map +0 -1
  130. package/dist/viem/internal/utils.d.ts +0 -8
  131. package/dist/viem/internal/utils.d.ts.map +0 -1
  132. package/dist/viem/internal/utils.js +0 -9
  133. package/dist/viem/internal/utils.js.map +0 -1
package/dist/viem/Abis.js DELETED
@@ -1,1173 +0,0 @@
1
- // Generated with `bun run gen:abis`. Do not modify manually.
2
- export const tip20 = [
3
- {
4
- name: 'name',
5
- type: 'function',
6
- stateMutability: 'view',
7
- inputs: [],
8
- outputs: [{ type: 'string' }],
9
- },
10
- {
11
- name: 'symbol',
12
- type: 'function',
13
- stateMutability: 'view',
14
- inputs: [],
15
- outputs: [{ type: 'string' }],
16
- },
17
- {
18
- name: 'decimals',
19
- type: 'function',
20
- stateMutability: 'view',
21
- inputs: [],
22
- outputs: [{ type: 'uint8' }],
23
- },
24
- {
25
- name: 'totalSupply',
26
- type: 'function',
27
- stateMutability: 'view',
28
- inputs: [],
29
- outputs: [{ type: 'uint256' }],
30
- },
31
- {
32
- name: 'quoteToken',
33
- type: 'function',
34
- stateMutability: 'view',
35
- inputs: [],
36
- outputs: [{ type: 'address' }],
37
- },
38
- {
39
- name: 'nextQuoteToken',
40
- type: 'function',
41
- stateMutability: 'view',
42
- inputs: [],
43
- outputs: [{ type: 'address' }],
44
- },
45
- {
46
- name: 'balanceOf',
47
- type: 'function',
48
- stateMutability: 'view',
49
- inputs: [{ type: 'address', name: 'account' }],
50
- outputs: [{ type: 'uint256' }],
51
- },
52
- {
53
- name: 'transfer',
54
- type: 'function',
55
- stateMutability: 'nonpayable',
56
- inputs: [
57
- { type: 'address', name: 'to' },
58
- { type: 'uint256', name: 'amount' },
59
- ],
60
- outputs: [{ type: 'bool' }],
61
- },
62
- {
63
- name: 'approve',
64
- type: 'function',
65
- stateMutability: 'nonpayable',
66
- inputs: [
67
- { type: 'address', name: 'spender' },
68
- { type: 'uint256', name: 'amount' },
69
- ],
70
- outputs: [{ type: 'bool' }],
71
- },
72
- {
73
- name: 'allowance',
74
- type: 'function',
75
- stateMutability: 'view',
76
- inputs: [
77
- { type: 'address', name: 'owner' },
78
- { type: 'address', name: 'spender' },
79
- ],
80
- outputs: [{ type: 'uint256' }],
81
- },
82
- {
83
- name: 'transferFrom',
84
- type: 'function',
85
- stateMutability: 'nonpayable',
86
- inputs: [
87
- { type: 'address', name: 'from' },
88
- { type: 'address', name: 'to' },
89
- { type: 'uint256', name: 'amount' },
90
- ],
91
- outputs: [{ type: 'bool' }],
92
- },
93
- {
94
- name: 'mint',
95
- type: 'function',
96
- stateMutability: 'nonpayable',
97
- inputs: [
98
- { type: 'address', name: 'to' },
99
- { type: 'uint256', name: 'amount' },
100
- ],
101
- outputs: [],
102
- },
103
- {
104
- name: 'burn',
105
- type: 'function',
106
- stateMutability: 'nonpayable',
107
- inputs: [{ type: 'uint256', name: 'amount' }],
108
- outputs: [],
109
- },
110
- {
111
- name: 'currency',
112
- type: 'function',
113
- stateMutability: 'view',
114
- inputs: [],
115
- outputs: [{ type: 'string' }],
116
- },
117
- {
118
- name: 'supplyCap',
119
- type: 'function',
120
- stateMutability: 'view',
121
- inputs: [],
122
- outputs: [{ type: 'uint256' }],
123
- },
124
- {
125
- name: 'paused',
126
- type: 'function',
127
- stateMutability: 'view',
128
- inputs: [],
129
- outputs: [{ type: 'bool' }],
130
- },
131
- {
132
- name: 'transferPolicyId',
133
- type: 'function',
134
- stateMutability: 'view',
135
- inputs: [],
136
- outputs: [{ type: 'uint64' }],
137
- },
138
- {
139
- name: 'nonces',
140
- type: 'function',
141
- stateMutability: 'view',
142
- inputs: [{ type: 'address', name: 'owner' }],
143
- outputs: [{ type: 'uint256' }],
144
- },
145
- {
146
- name: 'salts',
147
- type: 'function',
148
- stateMutability: 'view',
149
- inputs: [
150
- { type: 'address', name: 'owner' },
151
- { type: 'bytes4', name: 'salt' },
152
- ],
153
- outputs: [{ type: 'bool' }],
154
- },
155
- {
156
- name: 'burnBlocked',
157
- type: 'function',
158
- stateMutability: 'nonpayable',
159
- inputs: [
160
- { type: 'address', name: 'from' },
161
- { type: 'uint256', name: 'amount' },
162
- ],
163
- outputs: [],
164
- },
165
- {
166
- name: 'mintWithMemo',
167
- type: 'function',
168
- stateMutability: 'nonpayable',
169
- inputs: [
170
- { type: 'address', name: 'to' },
171
- { type: 'uint256', name: 'amount' },
172
- { type: 'bytes32', name: 'memo' },
173
- ],
174
- outputs: [],
175
- },
176
- {
177
- name: 'burnWithMemo',
178
- type: 'function',
179
- stateMutability: 'nonpayable',
180
- inputs: [
181
- { type: 'uint256', name: 'amount' },
182
- { type: 'bytes32', name: 'memo' },
183
- ],
184
- outputs: [],
185
- },
186
- {
187
- name: 'transferWithMemo',
188
- type: 'function',
189
- stateMutability: 'nonpayable',
190
- inputs: [
191
- { type: 'address', name: 'to' },
192
- { type: 'uint256', name: 'amount' },
193
- { type: 'bytes32', name: 'memo' },
194
- ],
195
- outputs: [],
196
- },
197
- {
198
- name: 'transferFromWithMemo',
199
- type: 'function',
200
- stateMutability: 'nonpayable',
201
- inputs: [
202
- { type: 'address', name: 'from' },
203
- { type: 'address', name: 'to' },
204
- { type: 'uint256', name: 'amount' },
205
- { type: 'bytes32', name: 'memo' },
206
- ],
207
- outputs: [{ type: 'bool' }],
208
- },
209
- {
210
- name: 'changeTransferPolicyId',
211
- type: 'function',
212
- stateMutability: 'nonpayable',
213
- inputs: [{ type: 'uint64', name: 'newPolicyId' }],
214
- outputs: [],
215
- },
216
- {
217
- name: 'setSupplyCap',
218
- type: 'function',
219
- stateMutability: 'nonpayable',
220
- inputs: [{ type: 'uint256', name: 'newSupplyCap' }],
221
- outputs: [],
222
- },
223
- {
224
- name: 'pause',
225
- type: 'function',
226
- stateMutability: 'nonpayable',
227
- inputs: [],
228
- outputs: [],
229
- },
230
- {
231
- name: 'unpause',
232
- type: 'function',
233
- stateMutability: 'nonpayable',
234
- inputs: [],
235
- outputs: [],
236
- },
237
- {
238
- name: 'updateQuoteToken',
239
- type: 'function',
240
- stateMutability: 'nonpayable',
241
- inputs: [{ type: 'address', name: 'newQuoteToken' }],
242
- outputs: [],
243
- },
244
- {
245
- name: 'finalizeQuoteTokenUpdate',
246
- type: 'function',
247
- stateMutability: 'nonpayable',
248
- inputs: [],
249
- outputs: [],
250
- },
251
- {
252
- name: 'permit',
253
- type: 'function',
254
- stateMutability: 'nonpayable',
255
- inputs: [
256
- { type: 'address', name: 'owner' },
257
- { type: 'address', name: 'spender' },
258
- { type: 'uint256', name: 'value' },
259
- { type: 'uint256', name: 'deadline' },
260
- { type: 'uint8', name: 'v' },
261
- { type: 'bytes32', name: 'r' },
262
- { type: 'bytes32', name: 's' },
263
- ],
264
- outputs: [],
265
- },
266
- {
267
- name: 'DOMAIN_SEPARATOR',
268
- type: 'function',
269
- stateMutability: 'view',
270
- inputs: [],
271
- outputs: [{ type: 'bytes32' }],
272
- },
273
- {
274
- name: 'Transfer',
275
- type: 'event',
276
- inputs: [
277
- { type: 'address', name: 'from', indexed: true },
278
- { type: 'address', name: 'to', indexed: true },
279
- { type: 'uint256', name: 'amount' },
280
- ],
281
- },
282
- {
283
- name: 'Approval',
284
- type: 'event',
285
- inputs: [
286
- { type: 'address', name: 'owner', indexed: true },
287
- { type: 'address', name: 'spender', indexed: true },
288
- { type: 'uint256', name: 'amount' },
289
- ],
290
- },
291
- {
292
- name: 'Mint',
293
- type: 'event',
294
- inputs: [
295
- { type: 'address', name: 'to', indexed: true },
296
- { type: 'uint256', name: 'amount' },
297
- ],
298
- },
299
- {
300
- name: 'Burn',
301
- type: 'event',
302
- inputs: [
303
- { type: 'address', name: 'from', indexed: true },
304
- { type: 'uint256', name: 'amount' },
305
- ],
306
- },
307
- {
308
- name: 'BurnBlocked',
309
- type: 'event',
310
- inputs: [
311
- { type: 'address', name: 'from', indexed: true },
312
- { type: 'uint256', name: 'amount' },
313
- ],
314
- },
315
- {
316
- name: 'TransferWithMemo',
317
- type: 'event',
318
- inputs: [
319
- { type: 'address', name: 'from', indexed: true },
320
- { type: 'address', name: 'to', indexed: true },
321
- { type: 'uint256', name: 'amount' },
322
- { type: 'bytes32', name: 'memo' },
323
- ],
324
- },
325
- {
326
- name: 'TransferPolicyUpdate',
327
- type: 'event',
328
- inputs: [
329
- { type: 'address', name: 'updater', indexed: true },
330
- { type: 'uint64', name: 'newPolicyId', indexed: true },
331
- ],
332
- },
333
- {
334
- name: 'SupplyCapUpdate',
335
- type: 'event',
336
- inputs: [
337
- { type: 'address', name: 'updater', indexed: true },
338
- { type: 'uint256', name: 'newSupplyCap', indexed: true },
339
- ],
340
- },
341
- {
342
- name: 'PauseStateUpdate',
343
- type: 'event',
344
- inputs: [
345
- { type: 'address', name: 'updater', indexed: true },
346
- { type: 'bool', name: 'isPaused' },
347
- ],
348
- },
349
- {
350
- name: 'UpdateQuoteToken',
351
- type: 'event',
352
- inputs: [
353
- { type: 'address', name: 'updater', indexed: true },
354
- { type: 'address', name: 'newQuoteToken', indexed: true },
355
- ],
356
- },
357
- {
358
- name: 'QuoteTokenUpdateFinalized',
359
- type: 'event',
360
- inputs: [
361
- { type: 'address', name: 'updater', indexed: true },
362
- { type: 'address', name: 'newQuoteToken', indexed: true },
363
- ],
364
- },
365
- { name: 'InsufficientBalance', type: 'error', inputs: [] },
366
- { name: 'InsufficientAllowance', type: 'error', inputs: [] },
367
- { name: 'SupplyCapExceeded', type: 'error', inputs: [] },
368
- { name: 'InvalidSignature', type: 'error', inputs: [] },
369
- { name: 'InvalidPayload', type: 'error', inputs: [] },
370
- { name: 'InvalidNonce', type: 'error', inputs: [] },
371
- { name: 'StringTooLong', type: 'error', inputs: [] },
372
- { name: 'PolicyForbids', type: 'error', inputs: [] },
373
- { name: 'InvalidRecipient', type: 'error', inputs: [] },
374
- { name: 'Expired', type: 'error', inputs: [] },
375
- { name: 'SaltAlreadyUsed', type: 'error', inputs: [] },
376
- { name: 'ContractPaused', type: 'error', inputs: [] },
377
- { name: 'InvalidCurrency', type: 'error', inputs: [] },
378
- { name: 'InvalidQuoteToken', type: 'error', inputs: [] },
379
- { name: 'TransfersDisabled', type: 'error', inputs: [] },
380
- {
381
- name: 'grantRole',
382
- type: 'function',
383
- stateMutability: 'nonpayable',
384
- inputs: [
385
- { type: 'bytes32', name: 'role' },
386
- { type: 'address', name: 'account' },
387
- ],
388
- outputs: [],
389
- },
390
- {
391
- name: 'revokeRole',
392
- type: 'function',
393
- stateMutability: 'nonpayable',
394
- inputs: [
395
- { type: 'bytes32', name: 'role' },
396
- { type: 'address', name: 'account' },
397
- ],
398
- outputs: [],
399
- },
400
- {
401
- name: 'renounceRole',
402
- type: 'function',
403
- stateMutability: 'nonpayable',
404
- inputs: [{ type: 'bytes32', name: 'role' }],
405
- outputs: [],
406
- },
407
- {
408
- name: 'setRoleAdmin',
409
- type: 'function',
410
- stateMutability: 'nonpayable',
411
- inputs: [
412
- { type: 'bytes32', name: 'role' },
413
- { type: 'bytes32', name: 'adminRole' },
414
- ],
415
- outputs: [],
416
- },
417
- {
418
- name: 'hasRole',
419
- type: 'function',
420
- stateMutability: 'view',
421
- inputs: [
422
- { type: 'address', name: 'account' },
423
- { type: 'bytes32', name: 'role' },
424
- ],
425
- outputs: [{ type: 'bool' }],
426
- },
427
- {
428
- name: 'getRoleAdmin',
429
- type: 'function',
430
- stateMutability: 'view',
431
- inputs: [{ type: 'bytes32', name: 'role' }],
432
- outputs: [{ type: 'bytes32' }],
433
- },
434
- {
435
- name: 'RoleMembershipUpdated',
436
- type: 'event',
437
- inputs: [
438
- { type: 'bytes32', name: 'role', indexed: true },
439
- { type: 'address', name: 'account', indexed: true },
440
- { type: 'address', name: 'sender', indexed: true },
441
- { type: 'bool', name: 'hasRole' },
442
- ],
443
- },
444
- {
445
- name: 'RoleAdminUpdated',
446
- type: 'event',
447
- inputs: [
448
- { type: 'bytes32', name: 'role', indexed: true },
449
- { type: 'bytes32', name: 'newAdminRole', indexed: true },
450
- { type: 'address', name: 'sender', indexed: true },
451
- ],
452
- },
453
- { name: 'Unauthorized', type: 'error', inputs: [] },
454
- ];
455
- export const tip20Factory = [
456
- {
457
- name: 'createToken',
458
- type: 'function',
459
- stateMutability: 'nonpayable',
460
- inputs: [
461
- { type: 'string', name: 'name' },
462
- { type: 'string', name: 'symbol' },
463
- { type: 'string', name: 'currency' },
464
- { type: 'address', name: 'quoteToken' },
465
- { type: 'address', name: 'admin' },
466
- ],
467
- outputs: [{ type: 'uint256' }],
468
- },
469
- {
470
- name: 'tokenIdCounter',
471
- type: 'function',
472
- stateMutability: 'view',
473
- inputs: [],
474
- outputs: [{ type: 'uint256' }],
475
- },
476
- {
477
- name: 'TokenCreated',
478
- type: 'event',
479
- inputs: [
480
- { type: 'address', name: 'token', indexed: true },
481
- { type: 'uint256', name: 'tokenId', indexed: true },
482
- { type: 'string', name: 'name' },
483
- { type: 'string', name: 'symbol' },
484
- { type: 'string', name: 'currency' },
485
- { type: 'address', name: 'admin' },
486
- ],
487
- },
488
- ];
489
- export const tip403Registry = [
490
- {
491
- name: 'policyIdCounter',
492
- type: 'function',
493
- stateMutability: 'view',
494
- inputs: [],
495
- outputs: [{ type: 'uint64' }],
496
- },
497
- {
498
- name: 'policyData',
499
- type: 'function',
500
- stateMutability: 'view',
501
- inputs: [{ type: 'uint64', name: 'policyId' }],
502
- outputs: [
503
- { type: 'uint8', name: 'policyType' },
504
- { type: 'address', name: 'admin' },
505
- ],
506
- },
507
- {
508
- name: 'isAuthorized',
509
- type: 'function',
510
- stateMutability: 'view',
511
- inputs: [
512
- { type: 'uint64', name: 'policyId' },
513
- { type: 'address', name: 'user' },
514
- ],
515
- outputs: [{ type: 'bool' }],
516
- },
517
- {
518
- name: 'createPolicy',
519
- type: 'function',
520
- stateMutability: 'nonpayable',
521
- inputs: [
522
- { type: 'address', name: 'admin' },
523
- { type: 'uint8', name: 'policyType' },
524
- ],
525
- outputs: [{ type: 'uint64' }],
526
- },
527
- {
528
- name: 'createPolicyWithAccounts',
529
- type: 'function',
530
- stateMutability: 'nonpayable',
531
- inputs: [
532
- { type: 'address', name: 'admin' },
533
- { type: 'uint8', name: 'policyType' },
534
- { type: 'address[]', name: 'accounts' },
535
- ],
536
- outputs: [{ type: 'uint64' }],
537
- },
538
- {
539
- name: 'setPolicyAdmin',
540
- type: 'function',
541
- stateMutability: 'nonpayable',
542
- inputs: [
543
- { type: 'uint64', name: 'policyId' },
544
- { type: 'address', name: 'admin' },
545
- ],
546
- outputs: [],
547
- },
548
- {
549
- name: 'modifyPolicyWhitelist',
550
- type: 'function',
551
- stateMutability: 'nonpayable',
552
- inputs: [
553
- { type: 'uint64', name: 'policyId' },
554
- { type: 'address', name: 'account' },
555
- { type: 'bool', name: 'allowed' },
556
- ],
557
- outputs: [],
558
- },
559
- {
560
- name: 'modifyPolicyBlacklist',
561
- type: 'function',
562
- stateMutability: 'nonpayable',
563
- inputs: [
564
- { type: 'uint64', name: 'policyId' },
565
- { type: 'address', name: 'account' },
566
- { type: 'bool', name: 'restricted' },
567
- ],
568
- outputs: [],
569
- },
570
- {
571
- name: 'PolicyAdminUpdated',
572
- type: 'event',
573
- inputs: [
574
- { type: 'uint64', name: 'policyId', indexed: true },
575
- { type: 'address', name: 'updater', indexed: true },
576
- { type: 'address', name: 'admin', indexed: true },
577
- ],
578
- },
579
- {
580
- name: 'PolicyCreated',
581
- type: 'event',
582
- inputs: [
583
- { type: 'uint64', name: 'policyId', indexed: true },
584
- { type: 'address', name: 'updater', indexed: true },
585
- { type: 'uint8', name: 'policyType' },
586
- ],
587
- },
588
- {
589
- name: 'WhitelistUpdated',
590
- type: 'event',
591
- inputs: [
592
- { type: 'uint64', name: 'policyId', indexed: true },
593
- { type: 'address', name: 'updater', indexed: true },
594
- { type: 'address', name: 'account', indexed: true },
595
- { type: 'bool', name: 'allowed' },
596
- ],
597
- },
598
- {
599
- name: 'BlacklistUpdated',
600
- type: 'event',
601
- inputs: [
602
- { type: 'uint64', name: 'policyId', indexed: true },
603
- { type: 'address', name: 'updater', indexed: true },
604
- { type: 'address', name: 'account', indexed: true },
605
- { type: 'bool', name: 'restricted' },
606
- ],
607
- },
608
- { name: 'Unauthorized', type: 'error', inputs: [] },
609
- { name: 'IncompatiblePolicyType', type: 'error', inputs: [] },
610
- { name: 'SelfOwnedPolicyMustBeWhitelist', type: 'error', inputs: [] },
611
- ];
612
- export const tip4217Registry = [
613
- {
614
- name: 'getCurrencyDecimals',
615
- type: 'function',
616
- stateMutability: 'view',
617
- inputs: [{ type: 'string', name: 'currency' }],
618
- outputs: [{ type: 'uint8' }],
619
- },
620
- ];
621
- export const nonce = [
622
- {
623
- name: 'getNonce',
624
- type: 'function',
625
- stateMutability: 'view',
626
- inputs: [
627
- { type: 'address', name: 'account' },
628
- { type: 'uint64', name: 'nonceKey' },
629
- ],
630
- outputs: [{ type: 'uint64' }],
631
- },
632
- {
633
- name: 'getActiveNonceKeyCount',
634
- type: 'function',
635
- stateMutability: 'view',
636
- inputs: [{ type: 'address', name: 'account' }],
637
- outputs: [{ type: 'uint256' }],
638
- },
639
- ];
640
- export const tipAccountRegistrar = [
641
- {
642
- name: 'delegateToDefault',
643
- type: 'function',
644
- stateMutability: 'nonpayable',
645
- inputs: [
646
- { type: 'bytes32', name: 'hash' },
647
- { type: 'bytes', name: 'signature' },
648
- ],
649
- outputs: [{ type: 'address', name: 'authority' }],
650
- },
651
- {
652
- name: 'getDelegationMessage',
653
- type: 'function',
654
- stateMutability: 'pure',
655
- inputs: [],
656
- outputs: [{ type: 'string' }],
657
- },
658
- { name: 'InvalidSignature', type: 'error', inputs: [] },
659
- { name: 'CodeNotEmpty', type: 'error', inputs: [] },
660
- { name: 'NonceNotZero', type: 'error', inputs: [] },
661
- ];
662
- export const feeAmm = [
663
- {
664
- name: 'getPoolId',
665
- type: 'function',
666
- stateMutability: 'pure',
667
- inputs: [
668
- { type: 'address', name: 'userToken' },
669
- { type: 'address', name: 'validatorToken' },
670
- ],
671
- outputs: [{ type: 'bytes32' }],
672
- },
673
- {
674
- name: 'getPool',
675
- type: 'function',
676
- stateMutability: 'view',
677
- inputs: [
678
- { type: 'address', name: 'userToken' },
679
- { type: 'address', name: 'validatorToken' },
680
- ],
681
- outputs: [
682
- {
683
- type: 'tuple',
684
- components: [
685
- { type: 'uint128', name: 'reserveUserToken' },
686
- { type: 'uint128', name: 'reserveValidatorToken' },
687
- ],
688
- },
689
- ],
690
- },
691
- {
692
- name: 'pools',
693
- type: 'function',
694
- stateMutability: 'view',
695
- inputs: [{ type: 'bytes32', name: 'poolId' }],
696
- outputs: [
697
- {
698
- type: 'tuple',
699
- components: [
700
- { type: 'uint128', name: 'reserveUserToken' },
701
- { type: 'uint128', name: 'reserveValidatorToken' },
702
- ],
703
- },
704
- ],
705
- },
706
- {
707
- name: 'mint',
708
- type: 'function',
709
- stateMutability: 'nonpayable',
710
- inputs: [
711
- { type: 'address', name: 'userToken' },
712
- { type: 'address', name: 'validatorToken' },
713
- { type: 'uint256', name: 'amountUserToken' },
714
- { type: 'uint256', name: 'amountValidatorToken' },
715
- { type: 'address', name: 'to' },
716
- ],
717
- outputs: [{ type: 'uint256', name: 'liquidity' }],
718
- },
719
- {
720
- name: 'burn',
721
- type: 'function',
722
- stateMutability: 'nonpayable',
723
- inputs: [
724
- { type: 'address', name: 'userToken' },
725
- { type: 'address', name: 'validatorToken' },
726
- { type: 'uint256', name: 'liquidity' },
727
- { type: 'address', name: 'to' },
728
- ],
729
- outputs: [
730
- { type: 'uint256', name: 'amountUserToken' },
731
- { type: 'uint256', name: 'amountValidatorToken' },
732
- ],
733
- },
734
- {
735
- name: 'totalSupply',
736
- type: 'function',
737
- stateMutability: 'view',
738
- inputs: [{ type: 'bytes32', name: 'poolId' }],
739
- outputs: [{ type: 'uint256' }],
740
- },
741
- {
742
- name: 'liquidityBalances',
743
- type: 'function',
744
- stateMutability: 'view',
745
- inputs: [
746
- { type: 'bytes32', name: 'poolId' },
747
- { type: 'address', name: 'user' },
748
- ],
749
- outputs: [{ type: 'uint256' }],
750
- },
751
- {
752
- name: 'rebalanceSwap',
753
- type: 'function',
754
- stateMutability: 'nonpayable',
755
- inputs: [
756
- { type: 'address', name: 'userToken' },
757
- { type: 'address', name: 'validatorToken' },
758
- { type: 'uint256', name: 'amountOut' },
759
- { type: 'address', name: 'to' },
760
- ],
761
- outputs: [{ type: 'uint256', name: 'amountIn' }],
762
- },
763
- {
764
- name: 'calculateLiquidity',
765
- type: 'function',
766
- stateMutability: 'pure',
767
- inputs: [
768
- { type: 'uint256', name: 'x' },
769
- { type: 'uint256', name: 'y' },
770
- ],
771
- outputs: [{ type: 'uint256' }],
772
- },
773
- {
774
- name: 'Mint',
775
- type: 'event',
776
- inputs: [
777
- { type: 'address', name: 'sender', indexed: true },
778
- { type: 'address', name: 'userToken', indexed: true },
779
- { type: 'address', name: 'validatorToken', indexed: true },
780
- { type: 'uint256', name: 'amountUserToken' },
781
- { type: 'uint256', name: 'amountValidatorToken' },
782
- { type: 'uint256', name: 'liquidity' },
783
- ],
784
- },
785
- {
786
- name: 'Burn',
787
- type: 'event',
788
- inputs: [
789
- { type: 'address', name: 'sender', indexed: true },
790
- { type: 'address', name: 'userToken', indexed: true },
791
- { type: 'address', name: 'validatorToken', indexed: true },
792
- { type: 'uint256', name: 'amountUserToken' },
793
- { type: 'uint256', name: 'amountValidatorToken' },
794
- { type: 'uint256', name: 'liquidity' },
795
- { type: 'address', name: 'to' },
796
- ],
797
- },
798
- {
799
- name: 'RebalanceSwap',
800
- type: 'event',
801
- inputs: [
802
- { type: 'address', name: 'userToken', indexed: true },
803
- { type: 'address', name: 'validatorToken', indexed: true },
804
- { type: 'address', name: 'swapper', indexed: true },
805
- { type: 'uint256', name: 'amountIn' },
806
- { type: 'uint256', name: 'amountOut' },
807
- ],
808
- },
809
- {
810
- name: 'FeeSwap',
811
- type: 'event',
812
- inputs: [
813
- { type: 'address', name: 'userToken', indexed: true },
814
- { type: 'address', name: 'validatorToken', indexed: true },
815
- { type: 'uint256', name: 'amountIn' },
816
- { type: 'uint256', name: 'amountOut' },
817
- ],
818
- },
819
- { name: 'IdenticalAddresses', type: 'error', inputs: [] },
820
- { name: 'ZeroAddress', type: 'error', inputs: [] },
821
- { name: 'PoolExists', type: 'error', inputs: [] },
822
- { name: 'PoolDoesNotExist', type: 'error', inputs: [] },
823
- { name: 'InvalidToken', type: 'error', inputs: [] },
824
- { name: 'InsufficientLiquidity', type: 'error', inputs: [] },
825
- { name: 'OnlyProtocol', type: 'error', inputs: [] },
826
- { name: 'InsufficientPoolBalance', type: 'error', inputs: [] },
827
- { name: 'InsufficientReserves', type: 'error', inputs: [] },
828
- { name: 'InsufficientLiquidityBalance', type: 'error', inputs: [] },
829
- { name: 'MustDepositLowerBalanceToken', type: 'error', inputs: [] },
830
- { name: 'InvalidAmount', type: 'error', inputs: [] },
831
- { name: 'InvalidRebalanceState', type: 'error', inputs: [] },
832
- { name: 'InvalidRebalanceDirection', type: 'error', inputs: [] },
833
- { name: 'InvalidNewReserves', type: 'error', inputs: [] },
834
- { name: 'CannotSupportPendingSwaps', type: 'error', inputs: [] },
835
- { name: 'DivisionByZero', type: 'error', inputs: [] },
836
- { name: 'InvalidSwapCalculation', type: 'error', inputs: [] },
837
- { name: 'InsufficientLiquidityForPending', type: 'error', inputs: [] },
838
- { name: 'TokenTransferFailed', type: 'error', inputs: [] },
839
- { name: 'InternalError', type: 'error', inputs: [] },
840
- ];
841
- export const feeManager = [
842
- {
843
- name: 'BASIS_POINTS',
844
- type: 'function',
845
- stateMutability: 'pure',
846
- inputs: [],
847
- outputs: [{ type: 'uint256' }],
848
- },
849
- {
850
- name: 'FEE_BPS',
851
- type: 'function',
852
- stateMutability: 'pure',
853
- inputs: [],
854
- outputs: [{ type: 'uint256' }],
855
- },
856
- {
857
- name: 'userTokens',
858
- type: 'function',
859
- stateMutability: 'view',
860
- inputs: [{ type: 'address', name: 'user' }],
861
- outputs: [{ type: 'address' }],
862
- },
863
- {
864
- name: 'validatorTokens',
865
- type: 'function',
866
- stateMutability: 'view',
867
- inputs: [{ type: 'address', name: 'validator' }],
868
- outputs: [{ type: 'address' }],
869
- },
870
- {
871
- name: 'setUserToken',
872
- type: 'function',
873
- stateMutability: 'nonpayable',
874
- inputs: [{ type: 'address', name: 'token' }],
875
- outputs: [],
876
- },
877
- {
878
- name: 'setValidatorToken',
879
- type: 'function',
880
- stateMutability: 'nonpayable',
881
- inputs: [{ type: 'address', name: 'token' }],
882
- outputs: [],
883
- },
884
- {
885
- name: 'getFeeTokenBalance',
886
- type: 'function',
887
- stateMutability: 'view',
888
- inputs: [
889
- { type: 'address', name: 'sender' },
890
- { type: 'address', name: 'validator' },
891
- ],
892
- outputs: [{ type: 'address' }, { type: 'uint256' }],
893
- },
894
- {
895
- name: 'executeBlock',
896
- type: 'function',
897
- stateMutability: 'nonpayable',
898
- inputs: [],
899
- outputs: [],
900
- },
901
- {
902
- name: 'UserTokenSet',
903
- type: 'event',
904
- inputs: [
905
- { type: 'address', name: 'user', indexed: true },
906
- { type: 'address', name: 'token', indexed: true },
907
- ],
908
- },
909
- {
910
- name: 'ValidatorTokenSet',
911
- type: 'event',
912
- inputs: [
913
- { type: 'address', name: 'validator', indexed: true },
914
- { type: 'address', name: 'token', indexed: true },
915
- ],
916
- },
917
- { name: 'OnlyValidator', type: 'error', inputs: [] },
918
- { name: 'OnlySystemContract', type: 'error', inputs: [] },
919
- { name: 'InvalidToken', type: 'error', inputs: [] },
920
- { name: 'PoolDoesNotExist', type: 'error', inputs: [] },
921
- { name: 'InsufficientLiquidity', type: 'error', inputs: [] },
922
- { name: 'InsufficientFeeTokenBalance', type: 'error', inputs: [] },
923
- { name: 'InternalError', type: 'error', inputs: [] },
924
- { name: 'CannotChangeWithinBlock', type: 'error', inputs: [] },
925
- { name: 'TokenPolicyForbids', type: 'error', inputs: [] },
926
- ];
927
- export const stablecoinExchange = [
928
- {
929
- name: 'balanceOf',
930
- type: 'function',
931
- stateMutability: 'view',
932
- inputs: [
933
- { type: 'address', name: 'user' },
934
- { type: 'address', name: 'token' },
935
- ],
936
- outputs: [{ type: 'uint128' }],
937
- },
938
- {
939
- name: 'quoteSwapExactAmountOut',
940
- type: 'function',
941
- stateMutability: 'view',
942
- inputs: [
943
- { type: 'address', name: 'tokenIn' },
944
- { type: 'address', name: 'tokenOut' },
945
- { type: 'uint128', name: 'amountOut' },
946
- ],
947
- outputs: [{ type: 'uint128', name: 'amountIn' }],
948
- },
949
- {
950
- name: 'quoteSwapExactAmountIn',
951
- type: 'function',
952
- stateMutability: 'view',
953
- inputs: [
954
- { type: 'address', name: 'tokenIn' },
955
- { type: 'address', name: 'tokenOut' },
956
- { type: 'uint128', name: 'amountIn' },
957
- ],
958
- outputs: [{ type: 'uint128', name: 'amountOut' }],
959
- },
960
- {
961
- name: 'pairKey',
962
- type: 'function',
963
- stateMutability: 'pure',
964
- inputs: [
965
- { type: 'address', name: 'tokenA' },
966
- { type: 'address', name: 'tokenB' },
967
- ],
968
- outputs: [{ type: 'bytes32', name: 'key' }],
969
- },
970
- {
971
- name: 'getPriceLevel',
972
- type: 'function',
973
- stateMutability: 'view',
974
- inputs: [
975
- { type: 'address', name: 'base' },
976
- { type: 'int16', name: 'tick' },
977
- { type: 'bool', name: 'isBid' },
978
- ],
979
- outputs: [
980
- {
981
- type: 'tuple',
982
- name: 'level',
983
- components: [
984
- { type: 'uint128', name: 'head' },
985
- { type: 'uint128', name: 'tail' },
986
- { type: 'uint128', name: 'totalLiquidity' },
987
- ],
988
- },
989
- ],
990
- },
991
- {
992
- name: 'activeOrderId',
993
- type: 'function',
994
- stateMutability: 'view',
995
- inputs: [],
996
- outputs: [{ type: 'uint128' }],
997
- },
998
- {
999
- name: 'pendingOrderId',
1000
- type: 'function',
1001
- stateMutability: 'view',
1002
- inputs: [],
1003
- outputs: [{ type: 'uint128' }],
1004
- },
1005
- {
1006
- name: 'getOrder',
1007
- type: 'function',
1008
- stateMutability: 'view',
1009
- inputs: [{ type: 'uint128', name: 'orderId' }],
1010
- outputs: [
1011
- {
1012
- type: 'tuple',
1013
- components: [
1014
- { type: 'address', name: 'maker' },
1015
- { type: 'bytes32', name: 'bookKey' },
1016
- { type: 'bool', name: 'isBid' },
1017
- { type: 'int16', name: 'tick' },
1018
- { type: 'uint128', name: 'amount' },
1019
- { type: 'uint128', name: 'remaining' },
1020
- { type: 'uint128', name: 'prev' },
1021
- { type: 'uint128', name: 'next' },
1022
- { type: 'bool', name: 'isFlip' },
1023
- { type: 'int16', name: 'flipTick' },
1024
- ],
1025
- },
1026
- ],
1027
- },
1028
- {
1029
- name: 'createPair',
1030
- type: 'function',
1031
- stateMutability: 'nonpayable',
1032
- inputs: [{ type: 'address', name: 'base' }],
1033
- outputs: [{ type: 'bytes32', name: 'key' }],
1034
- },
1035
- {
1036
- name: 'swapExactAmountIn',
1037
- type: 'function',
1038
- stateMutability: 'nonpayable',
1039
- inputs: [
1040
- { type: 'address', name: 'tokenIn' },
1041
- { type: 'address', name: 'tokenOut' },
1042
- { type: 'uint128', name: 'amountIn' },
1043
- { type: 'uint128', name: 'minAmountOut' },
1044
- ],
1045
- outputs: [{ type: 'uint128', name: 'amountOut' }],
1046
- },
1047
- {
1048
- name: 'swapExactAmountOut',
1049
- type: 'function',
1050
- stateMutability: 'nonpayable',
1051
- inputs: [
1052
- { type: 'address', name: 'tokenIn' },
1053
- { type: 'address', name: 'tokenOut' },
1054
- { type: 'uint128', name: 'amountOut' },
1055
- { type: 'uint128', name: 'maxAmountIn' },
1056
- ],
1057
- outputs: [{ type: 'uint128', name: 'amountIn' }],
1058
- },
1059
- {
1060
- name: 'place',
1061
- type: 'function',
1062
- stateMutability: 'nonpayable',
1063
- inputs: [
1064
- { type: 'address', name: 'token' },
1065
- { type: 'uint128', name: 'amount' },
1066
- { type: 'bool', name: 'isBid' },
1067
- { type: 'int16', name: 'tick' },
1068
- ],
1069
- outputs: [{ type: 'uint128', name: 'orderId' }],
1070
- },
1071
- {
1072
- name: 'placeFlip',
1073
- type: 'function',
1074
- stateMutability: 'nonpayable',
1075
- inputs: [
1076
- { type: 'address', name: 'token' },
1077
- { type: 'uint128', name: 'amount' },
1078
- { type: 'bool', name: 'isBid' },
1079
- { type: 'int16', name: 'tick' },
1080
- { type: 'int16', name: 'flipTick' },
1081
- ],
1082
- outputs: [{ type: 'uint128', name: 'orderId' }],
1083
- },
1084
- {
1085
- name: 'cancel',
1086
- type: 'function',
1087
- stateMutability: 'nonpayable',
1088
- inputs: [{ type: 'uint128', name: 'orderId' }],
1089
- outputs: [],
1090
- },
1091
- {
1092
- name: 'withdraw',
1093
- type: 'function',
1094
- stateMutability: 'nonpayable',
1095
- inputs: [
1096
- { type: 'address', name: 'token' },
1097
- { type: 'uint128', name: 'amount' },
1098
- ],
1099
- outputs: [],
1100
- },
1101
- {
1102
- name: 'executeBlock',
1103
- type: 'function',
1104
- stateMutability: 'nonpayable',
1105
- inputs: [],
1106
- outputs: [],
1107
- },
1108
- {
1109
- name: 'PairCreated',
1110
- type: 'event',
1111
- inputs: [
1112
- { type: 'bytes32', name: 'key', indexed: true },
1113
- { type: 'address', name: 'base', indexed: true },
1114
- { type: 'address', name: 'quote', indexed: true },
1115
- ],
1116
- },
1117
- {
1118
- name: 'OrderPlaced',
1119
- type: 'event',
1120
- inputs: [
1121
- { type: 'uint128', name: 'orderId', indexed: true },
1122
- { type: 'address', name: 'maker', indexed: true },
1123
- { type: 'address', name: 'token', indexed: true },
1124
- { type: 'uint128', name: 'amount' },
1125
- { type: 'bool', name: 'isBid' },
1126
- { type: 'int16', name: 'tick' },
1127
- ],
1128
- },
1129
- {
1130
- name: 'FlipOrderPlaced',
1131
- type: 'event',
1132
- inputs: [
1133
- { type: 'uint128', name: 'orderId', indexed: true },
1134
- { type: 'address', name: 'maker', indexed: true },
1135
- { type: 'address', name: 'token', indexed: true },
1136
- { type: 'uint128', name: 'amount' },
1137
- { type: 'bool', name: 'isBid' },
1138
- { type: 'int16', name: 'tick' },
1139
- { type: 'int16', name: 'flipTick' },
1140
- ],
1141
- },
1142
- {
1143
- name: 'OrderCancelled',
1144
- type: 'event',
1145
- inputs: [{ type: 'uint128', name: 'orderId', indexed: true }],
1146
- },
1147
- {
1148
- name: 'OrderFilled',
1149
- type: 'event',
1150
- inputs: [
1151
- { type: 'uint128', name: 'orderId', indexed: true },
1152
- { type: 'address', name: 'maker', indexed: true },
1153
- { type: 'uint128', name: 'amountFilled' },
1154
- { type: 'bool', name: 'partialFill' },
1155
- ],
1156
- },
1157
- { name: 'OrderDoesNotExist', type: 'error', inputs: [] },
1158
- { name: 'Unauthorized', type: 'error', inputs: [] },
1159
- { name: 'FillFailed', type: 'error', inputs: [] },
1160
- { name: 'InvalidTick', type: 'error', inputs: [] },
1161
- { name: 'InsufficientBalance', type: 'error', inputs: [] },
1162
- { name: 'InvalidFlipTick', type: 'error', inputs: [] },
1163
- {
1164
- name: 'TickOutOfBounds',
1165
- type: 'error',
1166
- inputs: [{ type: 'int16', name: 'tick' }],
1167
- },
1168
- { name: 'InsufficientLiquidity', type: 'error', inputs: [] },
1169
- { name: 'MaxInputExceeded', type: 'error', inputs: [] },
1170
- { name: 'InsufficientOutput', type: 'error', inputs: [] },
1171
- { name: 'PairDoesNotExist', type: 'error', inputs: [] },
1172
- ];
1173
- //# sourceMappingURL=Abis.js.map