@towns-labs/contracts 2.0.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.
@@ -0,0 +1,1857 @@
1
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2
+ // Escrow
3
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4
+ export const escrowAbi = [
5
+ {
6
+ type: "function",
7
+ inputs: [],
8
+ name: "eip712Domain",
9
+ outputs: [
10
+ { name: "fields", internalType: "bytes1", type: "bytes1" },
11
+ { name: "name", internalType: "string", type: "string" },
12
+ { name: "version", internalType: "string", type: "string" },
13
+ { name: "chainId", internalType: "uint256", type: "uint256" },
14
+ { name: "verifyingContract", internalType: "address", type: "address" },
15
+ { name: "salt", internalType: "bytes32", type: "bytes32" },
16
+ { name: "extensions", internalType: "uint256[]", type: "uint256[]" },
17
+ ],
18
+ stateMutability: "view",
19
+ },
20
+ {
21
+ type: "function",
22
+ inputs: [
23
+ {
24
+ name: "_escrows",
25
+ internalType: "struct IEscrow.Escrow[]",
26
+ type: "tuple[]",
27
+ components: [
28
+ { name: "salt", internalType: "bytes12", type: "bytes12" },
29
+ { name: "depositor", internalType: "address", type: "address" },
30
+ { name: "recipient", internalType: "address", type: "address" },
31
+ { name: "token", internalType: "address", type: "address" },
32
+ { name: "escrowAmount", internalType: "uint256", type: "uint256" },
33
+ { name: "refundAmount", internalType: "uint256", type: "uint256" },
34
+ { name: "refundTimestamp", internalType: "uint256", type: "uint256" },
35
+ { name: "settler", internalType: "address", type: "address" },
36
+ { name: "sender", internalType: "address", type: "address" },
37
+ { name: "settlementId", internalType: "bytes32", type: "bytes32" },
38
+ { name: "senderChainId", internalType: "uint256", type: "uint256" },
39
+ ],
40
+ },
41
+ ],
42
+ name: "escrow",
43
+ outputs: [],
44
+ stateMutability: "payable",
45
+ },
46
+ {
47
+ type: "function",
48
+ inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
49
+ name: "escrows",
50
+ outputs: [
51
+ { name: "salt", internalType: "bytes12", type: "bytes12" },
52
+ { name: "depositor", internalType: "address", type: "address" },
53
+ { name: "recipient", internalType: "address", type: "address" },
54
+ { name: "token", internalType: "address", type: "address" },
55
+ { name: "escrowAmount", internalType: "uint256", type: "uint256" },
56
+ { name: "refundAmount", internalType: "uint256", type: "uint256" },
57
+ { name: "refundTimestamp", internalType: "uint256", type: "uint256" },
58
+ { name: "settler", internalType: "address", type: "address" },
59
+ { name: "sender", internalType: "address", type: "address" },
60
+ { name: "settlementId", internalType: "bytes32", type: "bytes32" },
61
+ { name: "senderChainId", internalType: "uint256", type: "uint256" },
62
+ ],
63
+ stateMutability: "view",
64
+ },
65
+ {
66
+ type: "function",
67
+ inputs: [
68
+ { name: "escrowIds", internalType: "bytes32[]", type: "bytes32[]" },
69
+ ],
70
+ name: "refund",
71
+ outputs: [],
72
+ stateMutability: "nonpayable",
73
+ },
74
+ {
75
+ type: "function",
76
+ inputs: [
77
+ { name: "escrowIds", internalType: "bytes32[]", type: "bytes32[]" },
78
+ ],
79
+ name: "refundDepositor",
80
+ outputs: [],
81
+ stateMutability: "nonpayable",
82
+ },
83
+ {
84
+ type: "function",
85
+ inputs: [
86
+ { name: "escrowIds", internalType: "bytes32[]", type: "bytes32[]" },
87
+ ],
88
+ name: "refundRecipient",
89
+ outputs: [],
90
+ stateMutability: "nonpayable",
91
+ },
92
+ {
93
+ type: "function",
94
+ inputs: [
95
+ { name: "escrowIds", internalType: "bytes32[]", type: "bytes32[]" },
96
+ ],
97
+ name: "settle",
98
+ outputs: [],
99
+ stateMutability: "nonpayable",
100
+ },
101
+ {
102
+ type: "function",
103
+ inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
104
+ name: "statuses",
105
+ outputs: [
106
+ { name: "", internalType: "enum IEscrow.EscrowStatus", type: "uint8" },
107
+ ],
108
+ stateMutability: "view",
109
+ },
110
+ {
111
+ type: "event",
112
+ anonymous: false,
113
+ inputs: [
114
+ {
115
+ name: "escrowId",
116
+ internalType: "bytes32",
117
+ type: "bytes32",
118
+ indexed: false,
119
+ },
120
+ ],
121
+ name: "EscrowCreated",
122
+ },
123
+ {
124
+ type: "event",
125
+ anonymous: false,
126
+ inputs: [
127
+ {
128
+ name: "escrowId",
129
+ internalType: "bytes32",
130
+ type: "bytes32",
131
+ indexed: false,
132
+ },
133
+ ],
134
+ name: "EscrowRefundedDepositor",
135
+ },
136
+ {
137
+ type: "event",
138
+ anonymous: false,
139
+ inputs: [
140
+ {
141
+ name: "escrowId",
142
+ internalType: "bytes32",
143
+ type: "bytes32",
144
+ indexed: false,
145
+ },
146
+ ],
147
+ name: "EscrowRefundedRecipient",
148
+ },
149
+ {
150
+ type: "event",
151
+ anonymous: false,
152
+ inputs: [
153
+ {
154
+ name: "escrowId",
155
+ internalType: "bytes32",
156
+ type: "bytes32",
157
+ indexed: false,
158
+ },
159
+ ],
160
+ name: "EscrowSettled",
161
+ },
162
+ { type: "error", inputs: [], name: "InvalidEscrow" },
163
+ { type: "error", inputs: [], name: "InvalidStatus" },
164
+ { type: "error", inputs: [], name: "RefundInvalid" },
165
+ { type: "error", inputs: [], name: "SettlementInvalid" },
166
+ ];
167
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
168
+ // MultiSigSigner
169
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
170
+ export const multiSigSignerAbi = [
171
+ {
172
+ type: "function",
173
+ inputs: [
174
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
175
+ { name: "ownerKeyHash", internalType: "bytes32", type: "bytes32" },
176
+ ],
177
+ name: "addOwner",
178
+ outputs: [],
179
+ stateMutability: "nonpayable",
180
+ },
181
+ {
182
+ type: "function",
183
+ inputs: [],
184
+ name: "eip712Domain",
185
+ outputs: [
186
+ { name: "fields", internalType: "bytes1", type: "bytes1" },
187
+ { name: "name", internalType: "string", type: "string" },
188
+ { name: "version", internalType: "string", type: "string" },
189
+ { name: "chainId", internalType: "uint256", type: "uint256" },
190
+ { name: "verifyingContract", internalType: "address", type: "address" },
191
+ { name: "salt", internalType: "bytes32", type: "bytes32" },
192
+ { name: "extensions", internalType: "uint256[]", type: "uint256[]" },
193
+ ],
194
+ stateMutability: "view",
195
+ },
196
+ {
197
+ type: "function",
198
+ inputs: [
199
+ { name: "account", internalType: "address", type: "address" },
200
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
201
+ ],
202
+ name: "getConfig",
203
+ outputs: [
204
+ { name: "threshold", internalType: "uint256", type: "uint256" },
205
+ { name: "ownerKeyHashes", internalType: "bytes32[]", type: "bytes32[]" },
206
+ ],
207
+ stateMutability: "view",
208
+ },
209
+ {
210
+ type: "function",
211
+ inputs: [
212
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
213
+ { name: "threshold", internalType: "uint256", type: "uint256" },
214
+ { name: "ownerKeyHashes", internalType: "bytes32[]", type: "bytes32[]" },
215
+ ],
216
+ name: "initConfig",
217
+ outputs: [],
218
+ stateMutability: "nonpayable",
219
+ },
220
+ {
221
+ type: "function",
222
+ inputs: [
223
+ { name: "digest", internalType: "bytes32", type: "bytes32" },
224
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
225
+ { name: "signature", internalType: "bytes", type: "bytes" },
226
+ ],
227
+ name: "isValidSignatureWithKeyHash",
228
+ outputs: [{ name: "magicValue", internalType: "bytes4", type: "bytes4" }],
229
+ stateMutability: "view",
230
+ },
231
+ {
232
+ type: "function",
233
+ inputs: [
234
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
235
+ { name: "ownerKeyHash", internalType: "bytes32", type: "bytes32" },
236
+ ],
237
+ name: "removeOwner",
238
+ outputs: [],
239
+ stateMutability: "nonpayable",
240
+ },
241
+ {
242
+ type: "function",
243
+ inputs: [
244
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
245
+ { name: "threshold", internalType: "uint256", type: "uint256" },
246
+ ],
247
+ name: "setThreshold",
248
+ outputs: [],
249
+ stateMutability: "nonpayable",
250
+ },
251
+ { type: "error", inputs: [], name: "ConfigAlreadySet" },
252
+ { type: "error", inputs: [], name: "InvalidKeyHash" },
253
+ { type: "error", inputs: [], name: "InvalidThreshold" },
254
+ { type: "error", inputs: [], name: "OwnerNotFound" },
255
+ ];
256
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
257
+ // Orchestrator
258
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
259
+ export const orchestratorAbi = [
260
+ { type: "receive", stateMutability: "payable" },
261
+ {
262
+ type: "function",
263
+ inputs: [],
264
+ name: "CALL_TYPEHASH",
265
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
266
+ stateMutability: "view",
267
+ },
268
+ {
269
+ type: "function",
270
+ inputs: [],
271
+ name: "DOMAIN_TYPEHASH",
272
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
273
+ stateMutability: "view",
274
+ },
275
+ {
276
+ type: "function",
277
+ inputs: [],
278
+ name: "INTENT_TYPEHASH",
279
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
280
+ stateMutability: "view",
281
+ },
282
+ {
283
+ type: "function",
284
+ inputs: [],
285
+ name: "MULTICHAIN_NONCE_PREFIX",
286
+ outputs: [{ name: "", internalType: "uint16", type: "uint16" }],
287
+ stateMutability: "view",
288
+ },
289
+ {
290
+ type: "function",
291
+ inputs: [],
292
+ name: "SIGNED_CALL_TYPEHASH",
293
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
294
+ stateMutability: "view",
295
+ },
296
+ {
297
+ type: "function",
298
+ inputs: [{ name: "eoa", internalType: "address", type: "address" }],
299
+ name: "accountImplementationOf",
300
+ outputs: [{ name: "result", internalType: "address", type: "address" }],
301
+ stateMutability: "view",
302
+ },
303
+ {
304
+ type: "function",
305
+ inputs: [],
306
+ name: "eip712Domain",
307
+ outputs: [
308
+ { name: "fields", internalType: "bytes1", type: "bytes1" },
309
+ { name: "name", internalType: "string", type: "string" },
310
+ { name: "version", internalType: "string", type: "string" },
311
+ { name: "chainId", internalType: "uint256", type: "uint256" },
312
+ { name: "verifyingContract", internalType: "address", type: "address" },
313
+ { name: "salt", internalType: "bytes32", type: "bytes32" },
314
+ { name: "extensions", internalType: "uint256[]", type: "uint256[]" },
315
+ ],
316
+ stateMutability: "view",
317
+ },
318
+ {
319
+ type: "function",
320
+ inputs: [{ name: "encodedIntent", internalType: "bytes", type: "bytes" }],
321
+ name: "execute",
322
+ outputs: [{ name: "err", internalType: "bytes4", type: "bytes4" }],
323
+ stateMutability: "payable",
324
+ },
325
+ {
326
+ type: "function",
327
+ inputs: [
328
+ { name: "encodedIntents", internalType: "bytes[]", type: "bytes[]" },
329
+ ],
330
+ name: "execute",
331
+ outputs: [{ name: "errs", internalType: "bytes4[]", type: "bytes4[]" }],
332
+ stateMutability: "payable",
333
+ },
334
+ {
335
+ type: "function",
336
+ inputs: [
337
+ { name: "parentEOA", internalType: "address", type: "address" },
338
+ {
339
+ name: "preCalls",
340
+ internalType: "struct ICommon.SignedCall[]",
341
+ type: "tuple[]",
342
+ components: [
343
+ { name: "eoa", internalType: "address", type: "address" },
344
+ { name: "executionData", internalType: "bytes", type: "bytes" },
345
+ { name: "nonce", internalType: "uint256", type: "uint256" },
346
+ { name: "signature", internalType: "bytes", type: "bytes" },
347
+ ],
348
+ },
349
+ ],
350
+ name: "executePreCalls",
351
+ outputs: [],
352
+ stateMutability: "nonpayable",
353
+ },
354
+ {
355
+ type: "function",
356
+ inputs: [],
357
+ name: "selfCallPayVerifyCall537021665",
358
+ outputs: [],
359
+ stateMutability: "payable",
360
+ },
361
+ {
362
+ type: "function",
363
+ inputs: [
364
+ { name: "isStateOverride", internalType: "bool", type: "bool" },
365
+ { name: "combinedGasOverride", internalType: "uint256", type: "uint256" },
366
+ { name: "encodedIntent", internalType: "bytes", type: "bytes" },
367
+ ],
368
+ name: "simulateExecute",
369
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
370
+ stateMutability: "payable",
371
+ },
372
+ {
373
+ type: "function",
374
+ inputs: [
375
+ { name: "token", internalType: "address", type: "address" },
376
+ { name: "recipient", internalType: "address", type: "address" },
377
+ { name: "amount", internalType: "uint256", type: "uint256" },
378
+ ],
379
+ name: "withdrawTokens",
380
+ outputs: [],
381
+ stateMutability: "nonpayable",
382
+ },
383
+ {
384
+ type: "event",
385
+ anonymous: false,
386
+ inputs: [
387
+ { name: "eoa", internalType: "address", type: "address", indexed: true },
388
+ {
389
+ name: "nonce",
390
+ internalType: "uint256",
391
+ type: "uint256",
392
+ indexed: true,
393
+ },
394
+ {
395
+ name: "incremented",
396
+ internalType: "bool",
397
+ type: "bool",
398
+ indexed: false,
399
+ },
400
+ { name: "err", internalType: "bytes4", type: "bytes4", indexed: false },
401
+ ],
402
+ name: "IntentExecuted",
403
+ },
404
+ { type: "error", inputs: [], name: "CallError" },
405
+ { type: "error", inputs: [], name: "InsufficientGas" },
406
+ { type: "error", inputs: [], name: "IntentExpired" },
407
+ { type: "error", inputs: [], name: "InvalidPreCallEOA" },
408
+ { type: "error", inputs: [], name: "OrderAlreadyFilled" },
409
+ { type: "error", inputs: [], name: "PaymentError" },
410
+ { type: "error", inputs: [], name: "PreCallError" },
411
+ { type: "error", inputs: [], name: "PreCallVerificationError" },
412
+ { type: "error", inputs: [], name: "Reentrancy" },
413
+ { type: "error", inputs: [], name: "SimulateExecuteFailed" },
414
+ {
415
+ type: "error",
416
+ inputs: [{ name: "gUsed", internalType: "uint256", type: "uint256" }],
417
+ name: "SimulationPassed",
418
+ },
419
+ { type: "error", inputs: [], name: "StateOverrideError" },
420
+ { type: "error", inputs: [], name: "UnauthorizedCallContext" },
421
+ { type: "error", inputs: [], name: "UnsupportedAccountImplementation" },
422
+ { type: "error", inputs: [], name: "VerificationError" },
423
+ { type: "error", inputs: [], name: "VerifiedCallError" },
424
+ ];
425
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
426
+ // SimpleFunder
427
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
428
+ export const simpleFunderAbi = [
429
+ {
430
+ type: "constructor",
431
+ inputs: [
432
+ { name: "_funder", internalType: "address", type: "address" },
433
+ { name: "_owner", internalType: "address", type: "address" },
434
+ ],
435
+ stateMutability: "nonpayable",
436
+ },
437
+ { type: "receive", stateMutability: "payable" },
438
+ {
439
+ type: "function",
440
+ inputs: [],
441
+ name: "cancelOwnershipHandover",
442
+ outputs: [],
443
+ stateMutability: "payable",
444
+ },
445
+ {
446
+ type: "function",
447
+ inputs: [
448
+ { name: "pendingOwner", internalType: "address", type: "address" },
449
+ ],
450
+ name: "completeOwnershipHandover",
451
+ outputs: [],
452
+ stateMutability: "payable",
453
+ },
454
+ {
455
+ type: "function",
456
+ inputs: [],
457
+ name: "eip712Domain",
458
+ outputs: [
459
+ { name: "fields", internalType: "bytes1", type: "bytes1" },
460
+ { name: "name", internalType: "string", type: "string" },
461
+ { name: "version", internalType: "string", type: "string" },
462
+ { name: "chainId", internalType: "uint256", type: "uint256" },
463
+ { name: "verifyingContract", internalType: "address", type: "address" },
464
+ { name: "salt", internalType: "bytes32", type: "bytes32" },
465
+ { name: "extensions", internalType: "uint256[]", type: "uint256[]" },
466
+ ],
467
+ stateMutability: "view",
468
+ },
469
+ {
470
+ type: "function",
471
+ inputs: [
472
+ { name: "", internalType: "address", type: "address" },
473
+ { name: "digest", internalType: "bytes32", type: "bytes32" },
474
+ {
475
+ name: "transfers",
476
+ internalType: "struct ICommon.Transfer[]",
477
+ type: "tuple[]",
478
+ components: [
479
+ { name: "token", internalType: "address", type: "address" },
480
+ { name: "amount", internalType: "uint256", type: "uint256" },
481
+ ],
482
+ },
483
+ { name: "funderSignature", internalType: "bytes", type: "bytes" },
484
+ ],
485
+ name: "fund",
486
+ outputs: [],
487
+ stateMutability: "nonpayable",
488
+ },
489
+ {
490
+ type: "function",
491
+ inputs: [
492
+ { name: "digest", internalType: "bytes32", type: "bytes32" },
493
+ {
494
+ name: "transfers",
495
+ internalType: "struct ICommon.Transfer[]",
496
+ type: "tuple[]",
497
+ components: [
498
+ { name: "token", internalType: "address", type: "address" },
499
+ { name: "amount", internalType: "uint256", type: "uint256" },
500
+ ],
501
+ },
502
+ { name: "funderSignature", internalType: "bytes", type: "bytes" },
503
+ ],
504
+ name: "fund",
505
+ outputs: [],
506
+ stateMutability: "nonpayable",
507
+ },
508
+ {
509
+ type: "function",
510
+ inputs: [],
511
+ name: "funder",
512
+ outputs: [{ name: "", internalType: "address", type: "address" }],
513
+ stateMutability: "view",
514
+ },
515
+ {
516
+ type: "function",
517
+ inputs: [{ name: "", internalType: "address", type: "address" }],
518
+ name: "gasWallets",
519
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
520
+ stateMutability: "view",
521
+ },
522
+ {
523
+ type: "function",
524
+ inputs: [{ name: "", internalType: "uint256", type: "uint256" }],
525
+ name: "nonces",
526
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
527
+ stateMutability: "view",
528
+ },
529
+ {
530
+ type: "function",
531
+ inputs: [{ name: "", internalType: "address", type: "address" }],
532
+ name: "orchestrators",
533
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
534
+ stateMutability: "view",
535
+ },
536
+ {
537
+ type: "function",
538
+ inputs: [],
539
+ name: "owner",
540
+ outputs: [{ name: "result", internalType: "address", type: "address" }],
541
+ stateMutability: "view",
542
+ },
543
+ {
544
+ type: "function",
545
+ inputs: [
546
+ { name: "pendingOwner", internalType: "address", type: "address" },
547
+ ],
548
+ name: "ownershipHandoverExpiresAt",
549
+ outputs: [{ name: "result", internalType: "uint256", type: "uint256" }],
550
+ stateMutability: "view",
551
+ },
552
+ {
553
+ type: "function",
554
+ inputs: [{ name: "amount", internalType: "uint256", type: "uint256" }],
555
+ name: "pullGas",
556
+ outputs: [],
557
+ stateMutability: "nonpayable",
558
+ },
559
+ {
560
+ type: "function",
561
+ inputs: [],
562
+ name: "renounceOwnership",
563
+ outputs: [],
564
+ stateMutability: "payable",
565
+ },
566
+ {
567
+ type: "function",
568
+ inputs: [],
569
+ name: "requestOwnershipHandover",
570
+ outputs: [],
571
+ stateMutability: "payable",
572
+ },
573
+ {
574
+ type: "function",
575
+ inputs: [{ name: "newFunder", internalType: "address", type: "address" }],
576
+ name: "setFunder",
577
+ outputs: [],
578
+ stateMutability: "nonpayable",
579
+ },
580
+ {
581
+ type: "function",
582
+ inputs: [
583
+ { name: "wallets", internalType: "address[]", type: "address[]" },
584
+ { name: "isGasWallet", internalType: "bool", type: "bool" },
585
+ ],
586
+ name: "setGasWallet",
587
+ outputs: [],
588
+ stateMutability: "nonpayable",
589
+ },
590
+ {
591
+ type: "function",
592
+ inputs: [
593
+ { name: "ocs", internalType: "address[]", type: "address[]" },
594
+ { name: "val", internalType: "bool", type: "bool" },
595
+ ],
596
+ name: "setOrchestrators",
597
+ outputs: [],
598
+ stateMutability: "nonpayable",
599
+ },
600
+ {
601
+ type: "function",
602
+ inputs: [{ name: "newOwner", internalType: "address", type: "address" }],
603
+ name: "transferOwnership",
604
+ outputs: [],
605
+ stateMutability: "payable",
606
+ },
607
+ {
608
+ type: "function",
609
+ inputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
610
+ name: "usedDigests",
611
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
612
+ stateMutability: "view",
613
+ },
614
+ {
615
+ type: "function",
616
+ inputs: [
617
+ { name: "token", internalType: "address", type: "address" },
618
+ { name: "recipient", internalType: "address", type: "address" },
619
+ { name: "amount", internalType: "uint256", type: "uint256" },
620
+ ],
621
+ name: "withdrawTokens",
622
+ outputs: [],
623
+ stateMutability: "nonpayable",
624
+ },
625
+ {
626
+ type: "function",
627
+ inputs: [
628
+ { name: "token", internalType: "address", type: "address" },
629
+ { name: "recipient", internalType: "address", type: "address" },
630
+ { name: "amount", internalType: "uint256", type: "uint256" },
631
+ { name: "deadline", internalType: "uint256", type: "uint256" },
632
+ { name: "nonce", internalType: "uint256", type: "uint256" },
633
+ { name: "signature", internalType: "bytes", type: "bytes" },
634
+ ],
635
+ name: "withdrawTokensWithSignature",
636
+ outputs: [],
637
+ stateMutability: "nonpayable",
638
+ },
639
+ {
640
+ type: "event",
641
+ anonymous: false,
642
+ inputs: [
643
+ {
644
+ name: "pendingOwner",
645
+ internalType: "address",
646
+ type: "address",
647
+ indexed: true,
648
+ },
649
+ ],
650
+ name: "OwnershipHandoverCanceled",
651
+ },
652
+ {
653
+ type: "event",
654
+ anonymous: false,
655
+ inputs: [
656
+ {
657
+ name: "pendingOwner",
658
+ internalType: "address",
659
+ type: "address",
660
+ indexed: true,
661
+ },
662
+ ],
663
+ name: "OwnershipHandoverRequested",
664
+ },
665
+ {
666
+ type: "event",
667
+ anonymous: false,
668
+ inputs: [
669
+ {
670
+ name: "oldOwner",
671
+ internalType: "address",
672
+ type: "address",
673
+ indexed: true,
674
+ },
675
+ {
676
+ name: "newOwner",
677
+ internalType: "address",
678
+ type: "address",
679
+ indexed: true,
680
+ },
681
+ ],
682
+ name: "OwnershipTransferred",
683
+ },
684
+ { type: "error", inputs: [], name: "AlreadyInitialized" },
685
+ { type: "error", inputs: [], name: "DeadlineExpired" },
686
+ { type: "error", inputs: [], name: "DigestUsed" },
687
+ { type: "error", inputs: [], name: "InvalidFunderSignature" },
688
+ { type: "error", inputs: [], name: "InvalidNonce" },
689
+ { type: "error", inputs: [], name: "InvalidWithdrawalSignature" },
690
+ { type: "error", inputs: [], name: "NewOwnerIsZeroAddress" },
691
+ { type: "error", inputs: [], name: "NoHandoverRequest" },
692
+ { type: "error", inputs: [], name: "OnlyGasWallet" },
693
+ { type: "error", inputs: [], name: "OnlyOrchestrator" },
694
+ { type: "error", inputs: [], name: "Unauthorized" },
695
+ ];
696
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
697
+ // SimpleSettler
698
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
699
+ export const simpleSettlerAbi = [
700
+ {
701
+ type: "constructor",
702
+ inputs: [{ name: "_owner", internalType: "address", type: "address" }],
703
+ stateMutability: "nonpayable",
704
+ },
705
+ {
706
+ type: "function",
707
+ inputs: [],
708
+ name: "cancelOwnershipHandover",
709
+ outputs: [],
710
+ stateMutability: "payable",
711
+ },
712
+ {
713
+ type: "function",
714
+ inputs: [
715
+ { name: "pendingOwner", internalType: "address", type: "address" },
716
+ ],
717
+ name: "completeOwnershipHandover",
718
+ outputs: [],
719
+ stateMutability: "payable",
720
+ },
721
+ {
722
+ type: "function",
723
+ inputs: [],
724
+ name: "eip712Domain",
725
+ outputs: [
726
+ { name: "fields", internalType: "bytes1", type: "bytes1" },
727
+ { name: "name", internalType: "string", type: "string" },
728
+ { name: "version", internalType: "string", type: "string" },
729
+ { name: "chainId", internalType: "uint256", type: "uint256" },
730
+ { name: "verifyingContract", internalType: "address", type: "address" },
731
+ { name: "salt", internalType: "bytes32", type: "bytes32" },
732
+ { name: "extensions", internalType: "uint256[]", type: "uint256[]" },
733
+ ],
734
+ stateMutability: "view",
735
+ },
736
+ {
737
+ type: "function",
738
+ inputs: [],
739
+ name: "owner",
740
+ outputs: [{ name: "result", internalType: "address", type: "address" }],
741
+ stateMutability: "view",
742
+ },
743
+ {
744
+ type: "function",
745
+ inputs: [
746
+ { name: "pendingOwner", internalType: "address", type: "address" },
747
+ ],
748
+ name: "ownershipHandoverExpiresAt",
749
+ outputs: [{ name: "result", internalType: "uint256", type: "uint256" }],
750
+ stateMutability: "view",
751
+ },
752
+ {
753
+ type: "function",
754
+ inputs: [
755
+ { name: "settlementId", internalType: "bytes32", type: "bytes32" },
756
+ { name: "attester", internalType: "address", type: "address" },
757
+ { name: "chainId", internalType: "uint256", type: "uint256" },
758
+ ],
759
+ name: "read",
760
+ outputs: [{ name: "isSettled", internalType: "bool", type: "bool" }],
761
+ stateMutability: "view",
762
+ },
763
+ {
764
+ type: "function",
765
+ inputs: [],
766
+ name: "renounceOwnership",
767
+ outputs: [],
768
+ stateMutability: "payable",
769
+ },
770
+ {
771
+ type: "function",
772
+ inputs: [],
773
+ name: "requestOwnershipHandover",
774
+ outputs: [],
775
+ stateMutability: "payable",
776
+ },
777
+ {
778
+ type: "function",
779
+ inputs: [
780
+ { name: "settlementId", internalType: "bytes32", type: "bytes32" },
781
+ { name: "settlerContext", internalType: "bytes", type: "bytes" },
782
+ ],
783
+ name: "send",
784
+ outputs: [],
785
+ stateMutability: "payable",
786
+ },
787
+ {
788
+ type: "function",
789
+ inputs: [
790
+ { name: "", internalType: "bytes32", type: "bytes32" },
791
+ { name: "", internalType: "address", type: "address" },
792
+ { name: "", internalType: "uint256", type: "uint256" },
793
+ ],
794
+ name: "settled",
795
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
796
+ stateMutability: "view",
797
+ },
798
+ {
799
+ type: "function",
800
+ inputs: [{ name: "newOwner", internalType: "address", type: "address" }],
801
+ name: "transferOwnership",
802
+ outputs: [],
803
+ stateMutability: "payable",
804
+ },
805
+ {
806
+ type: "function",
807
+ inputs: [
808
+ { name: "sender", internalType: "address", type: "address" },
809
+ { name: "settlementId", internalType: "bytes32", type: "bytes32" },
810
+ { name: "chainId", internalType: "uint256", type: "uint256" },
811
+ ],
812
+ name: "write",
813
+ outputs: [],
814
+ stateMutability: "nonpayable",
815
+ },
816
+ {
817
+ type: "function",
818
+ inputs: [
819
+ { name: "sender", internalType: "address", type: "address" },
820
+ { name: "settlementId", internalType: "bytes32", type: "bytes32" },
821
+ { name: "chainId", internalType: "uint256", type: "uint256" },
822
+ { name: "signature", internalType: "bytes", type: "bytes" },
823
+ ],
824
+ name: "write",
825
+ outputs: [],
826
+ stateMutability: "nonpayable",
827
+ },
828
+ {
829
+ type: "event",
830
+ anonymous: false,
831
+ inputs: [
832
+ {
833
+ name: "pendingOwner",
834
+ internalType: "address",
835
+ type: "address",
836
+ indexed: true,
837
+ },
838
+ ],
839
+ name: "OwnershipHandoverCanceled",
840
+ },
841
+ {
842
+ type: "event",
843
+ anonymous: false,
844
+ inputs: [
845
+ {
846
+ name: "pendingOwner",
847
+ internalType: "address",
848
+ type: "address",
849
+ indexed: true,
850
+ },
851
+ ],
852
+ name: "OwnershipHandoverRequested",
853
+ },
854
+ {
855
+ type: "event",
856
+ anonymous: false,
857
+ inputs: [
858
+ {
859
+ name: "oldOwner",
860
+ internalType: "address",
861
+ type: "address",
862
+ indexed: true,
863
+ },
864
+ {
865
+ name: "newOwner",
866
+ internalType: "address",
867
+ type: "address",
868
+ indexed: true,
869
+ },
870
+ ],
871
+ name: "OwnershipTransferred",
872
+ },
873
+ {
874
+ type: "event",
875
+ anonymous: false,
876
+ inputs: [
877
+ {
878
+ name: "sender",
879
+ internalType: "address",
880
+ type: "address",
881
+ indexed: true,
882
+ },
883
+ {
884
+ name: "settlementId",
885
+ internalType: "bytes32",
886
+ type: "bytes32",
887
+ indexed: true,
888
+ },
889
+ {
890
+ name: "receiverChainId",
891
+ internalType: "uint256",
892
+ type: "uint256",
893
+ indexed: false,
894
+ },
895
+ ],
896
+ name: "Sent",
897
+ },
898
+ { type: "error", inputs: [], name: "AlreadyInitialized" },
899
+ { type: "error", inputs: [], name: "InvalidSettlementSignature" },
900
+ { type: "error", inputs: [], name: "NewOwnerIsZeroAddress" },
901
+ { type: "error", inputs: [], name: "NoHandoverRequest" },
902
+ { type: "error", inputs: [], name: "Unauthorized" },
903
+ ];
904
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
905
+ // Simulator
906
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
907
+ export const simulatorAbi = [
908
+ {
909
+ type: "function",
910
+ inputs: [],
911
+ name: "eip712Domain",
912
+ outputs: [
913
+ { name: "fields", internalType: "bytes1", type: "bytes1" },
914
+ { name: "name", internalType: "string", type: "string" },
915
+ { name: "version", internalType: "string", type: "string" },
916
+ { name: "chainId", internalType: "uint256", type: "uint256" },
917
+ { name: "verifyingContract", internalType: "address", type: "address" },
918
+ { name: "salt", internalType: "bytes32", type: "bytes32" },
919
+ { name: "extensions", internalType: "uint256[]", type: "uint256[]" },
920
+ ],
921
+ stateMutability: "view",
922
+ },
923
+ {
924
+ type: "function",
925
+ inputs: [
926
+ { name: "oc", internalType: "address", type: "address" },
927
+ { name: "paymentPerGasPrecision", internalType: "uint8", type: "uint8" },
928
+ { name: "paymentPerGas", internalType: "uint256", type: "uint256" },
929
+ {
930
+ name: "combinedGasIncrement",
931
+ internalType: "uint256",
932
+ type: "uint256",
933
+ },
934
+ { name: "encodedIntent", internalType: "bytes", type: "bytes" },
935
+ ],
936
+ name: "simulateCombinedGas",
937
+ outputs: [
938
+ { name: "gasUsed", internalType: "uint256", type: "uint256" },
939
+ { name: "combinedGas", internalType: "uint256", type: "uint256" },
940
+ ],
941
+ stateMutability: "payable",
942
+ },
943
+ {
944
+ type: "function",
945
+ inputs: [
946
+ { name: "oc", internalType: "address", type: "address" },
947
+ { name: "overrideCombinedGas", internalType: "bool", type: "bool" },
948
+ { name: "encodedIntent", internalType: "bytes", type: "bytes" },
949
+ ],
950
+ name: "simulateGasUsed",
951
+ outputs: [{ name: "gasUsed", internalType: "uint256", type: "uint256" }],
952
+ stateMutability: "payable",
953
+ },
954
+ {
955
+ type: "function",
956
+ inputs: [
957
+ { name: "multicall3", internalType: "address", type: "address" },
958
+ {
959
+ name: "calls",
960
+ internalType: "struct IMulticall3.Call3[]",
961
+ type: "tuple[]",
962
+ components: [
963
+ { name: "target", internalType: "address", type: "address" },
964
+ { name: "allowFailure", internalType: "bool", type: "bool" },
965
+ { name: "callData", internalType: "bytes", type: "bytes" },
966
+ ],
967
+ },
968
+ { name: "oc", internalType: "address", type: "address" },
969
+ { name: "paymentPerGasPrecision", internalType: "uint8", type: "uint8" },
970
+ { name: "paymentPerGas", internalType: "uint256", type: "uint256" },
971
+ {
972
+ name: "combinedGasIncrement",
973
+ internalType: "uint256",
974
+ type: "uint256",
975
+ },
976
+ { name: "encodedIntent", internalType: "bytes", type: "bytes" },
977
+ ],
978
+ name: "simulateMulticall3CombinedGas",
979
+ outputs: [
980
+ { name: "gasUsed", internalType: "uint256", type: "uint256" },
981
+ { name: "multicall3Gas", internalType: "uint256", type: "uint256" },
982
+ { name: "combinedGas", internalType: "uint256", type: "uint256" },
983
+ ],
984
+ stateMutability: "payable",
985
+ },
986
+ {
987
+ type: "function",
988
+ inputs: [
989
+ { name: "multicall3", internalType: "address", type: "address" },
990
+ {
991
+ name: "calls",
992
+ internalType: "struct IMulticall3.Call3[]",
993
+ type: "tuple[]",
994
+ components: [
995
+ { name: "target", internalType: "address", type: "address" },
996
+ { name: "allowFailure", internalType: "bool", type: "bool" },
997
+ { name: "callData", internalType: "bytes", type: "bytes" },
998
+ ],
999
+ },
1000
+ { name: "oc", internalType: "address", type: "address" },
1001
+ { name: "paymentPerGasPrecision", internalType: "uint8", type: "uint8" },
1002
+ { name: "paymentPerGas", internalType: "uint256", type: "uint256" },
1003
+ {
1004
+ name: "combinedGasIncrement",
1005
+ internalType: "uint256",
1006
+ type: "uint256",
1007
+ },
1008
+ {
1009
+ name: "combinedGasVerificationOffset",
1010
+ internalType: "uint256",
1011
+ type: "uint256",
1012
+ },
1013
+ { name: "encodedIntent", internalType: "bytes", type: "bytes" },
1014
+ ],
1015
+ name: "simulateMulticall3V1Logs",
1016
+ outputs: [
1017
+ { name: "gasUsed", internalType: "uint256", type: "uint256" },
1018
+ { name: "multicall3Gas", internalType: "uint256", type: "uint256" },
1019
+ { name: "combinedGas", internalType: "uint256", type: "uint256" },
1020
+ ],
1021
+ stateMutability: "payable",
1022
+ },
1023
+ {
1024
+ type: "function",
1025
+ inputs: [
1026
+ { name: "oc", internalType: "address", type: "address" },
1027
+ { name: "paymentPerGasPrecision", internalType: "uint8", type: "uint8" },
1028
+ { name: "paymentPerGas", internalType: "uint256", type: "uint256" },
1029
+ {
1030
+ name: "combinedGasIncrement",
1031
+ internalType: "uint256",
1032
+ type: "uint256",
1033
+ },
1034
+ {
1035
+ name: "combinedGasVerificationOffset",
1036
+ internalType: "uint256",
1037
+ type: "uint256",
1038
+ },
1039
+ { name: "encodedIntent", internalType: "bytes", type: "bytes" },
1040
+ ],
1041
+ name: "simulateV1Logs",
1042
+ outputs: [
1043
+ { name: "gasUsed", internalType: "uint256", type: "uint256" },
1044
+ { name: "combinedGas", internalType: "uint256", type: "uint256" },
1045
+ ],
1046
+ stateMutability: "payable",
1047
+ },
1048
+ ];
1049
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1050
+ // TownsAccount
1051
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1052
+ export const townsAccountAbi = [
1053
+ {
1054
+ type: "constructor",
1055
+ inputs: [
1056
+ { name: "orchestrator", internalType: "address", type: "address" },
1057
+ ],
1058
+ stateMutability: "payable",
1059
+ },
1060
+ { type: "fallback", stateMutability: "payable" },
1061
+ { type: "receive", stateMutability: "payable" },
1062
+ {
1063
+ type: "function",
1064
+ inputs: [],
1065
+ name: "ANY_FN_SEL",
1066
+ outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }],
1067
+ stateMutability: "view",
1068
+ },
1069
+ {
1070
+ type: "function",
1071
+ inputs: [],
1072
+ name: "ANY_KEYHASH",
1073
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
1074
+ stateMutability: "view",
1075
+ },
1076
+ {
1077
+ type: "function",
1078
+ inputs: [],
1079
+ name: "ANY_TARGET",
1080
+ outputs: [{ name: "", internalType: "address", type: "address" }],
1081
+ stateMutability: "view",
1082
+ },
1083
+ {
1084
+ type: "function",
1085
+ inputs: [],
1086
+ name: "CALL_TYPEHASH",
1087
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
1088
+ stateMutability: "view",
1089
+ },
1090
+ {
1091
+ type: "function",
1092
+ inputs: [],
1093
+ name: "DOMAIN_TYPEHASH",
1094
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
1095
+ stateMutability: "view",
1096
+ },
1097
+ {
1098
+ type: "function",
1099
+ inputs: [],
1100
+ name: "EMPTY_CALLDATA_FN_SEL",
1101
+ outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }],
1102
+ stateMutability: "view",
1103
+ },
1104
+ {
1105
+ type: "function",
1106
+ inputs: [],
1107
+ name: "EXECUTE_TYPEHASH",
1108
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
1109
+ stateMutability: "view",
1110
+ },
1111
+ {
1112
+ type: "function",
1113
+ inputs: [],
1114
+ name: "MULTICHAIN_NONCE_PREFIX",
1115
+ outputs: [{ name: "", internalType: "uint16", type: "uint16" }],
1116
+ stateMutability: "view",
1117
+ },
1118
+ {
1119
+ type: "function",
1120
+ inputs: [],
1121
+ name: "ORCHESTRATOR",
1122
+ outputs: [{ name: "", internalType: "address", type: "address" }],
1123
+ stateMutability: "view",
1124
+ },
1125
+ {
1126
+ type: "function",
1127
+ inputs: [],
1128
+ name: "SIGN_TYPEHASH",
1129
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
1130
+ stateMutability: "view",
1131
+ },
1132
+ {
1133
+ type: "function",
1134
+ inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }],
1135
+ name: "approvedSignatureCheckers",
1136
+ outputs: [{ name: "", internalType: "address[]", type: "address[]" }],
1137
+ stateMutability: "view",
1138
+ },
1139
+ {
1140
+ type: "function",
1141
+ inputs: [
1142
+ {
1143
+ name: "key",
1144
+ internalType: "struct TownsAccount.Key",
1145
+ type: "tuple",
1146
+ components: [
1147
+ { name: "expiry", internalType: "uint40", type: "uint40" },
1148
+ {
1149
+ name: "keyType",
1150
+ internalType: "enum TownsAccount.KeyType",
1151
+ type: "uint8",
1152
+ },
1153
+ { name: "isSuperAdmin", internalType: "bool", type: "bool" },
1154
+ { name: "publicKey", internalType: "bytes", type: "bytes" },
1155
+ ],
1156
+ },
1157
+ ],
1158
+ name: "authorize",
1159
+ outputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }],
1160
+ stateMutability: "nonpayable",
1161
+ },
1162
+ {
1163
+ type: "function",
1164
+ inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }],
1165
+ name: "callCheckerInfos",
1166
+ outputs: [
1167
+ {
1168
+ name: "results",
1169
+ internalType: "struct GuardedExecutor.CallCheckerInfo[]",
1170
+ type: "tuple[]",
1171
+ components: [
1172
+ { name: "target", internalType: "address", type: "address" },
1173
+ { name: "checker", internalType: "address", type: "address" },
1174
+ ],
1175
+ },
1176
+ ],
1177
+ stateMutability: "view",
1178
+ },
1179
+ {
1180
+ type: "function",
1181
+ inputs: [
1182
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
1183
+ { name: "target", internalType: "address", type: "address" },
1184
+ { name: "data", internalType: "bytes", type: "bytes" },
1185
+ ],
1186
+ name: "canExecute",
1187
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
1188
+ stateMutability: "view",
1189
+ },
1190
+ {
1191
+ type: "function",
1192
+ inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }],
1193
+ name: "canExecutePackedInfos",
1194
+ outputs: [{ name: "", internalType: "bytes32[]", type: "bytes32[]" }],
1195
+ stateMutability: "view",
1196
+ },
1197
+ {
1198
+ type: "function",
1199
+ inputs: [{ name: "nonce", internalType: "uint256", type: "uint256" }],
1200
+ name: "checkAndIncrementNonce",
1201
+ outputs: [],
1202
+ stateMutability: "payable",
1203
+ },
1204
+ {
1205
+ type: "function",
1206
+ inputs: [
1207
+ {
1208
+ name: "calls",
1209
+ internalType: "struct ERC7821.Call[]",
1210
+ type: "tuple[]",
1211
+ components: [
1212
+ { name: "to", internalType: "address", type: "address" },
1213
+ { name: "value", internalType: "uint256", type: "uint256" },
1214
+ { name: "data", internalType: "bytes", type: "bytes" },
1215
+ ],
1216
+ },
1217
+ { name: "nonce", internalType: "uint256", type: "uint256" },
1218
+ ],
1219
+ name: "computeDigest",
1220
+ outputs: [{ name: "result", internalType: "bytes32", type: "bytes32" }],
1221
+ stateMutability: "view",
1222
+ },
1223
+ {
1224
+ type: "function",
1225
+ inputs: [],
1226
+ name: "eip712Domain",
1227
+ outputs: [
1228
+ { name: "fields", internalType: "bytes1", type: "bytes1" },
1229
+ { name: "name", internalType: "string", type: "string" },
1230
+ { name: "version", internalType: "string", type: "string" },
1231
+ { name: "chainId", internalType: "uint256", type: "uint256" },
1232
+ { name: "verifyingContract", internalType: "address", type: "address" },
1233
+ { name: "salt", internalType: "bytes32", type: "bytes32" },
1234
+ { name: "extensions", internalType: "uint256[]", type: "uint256[]" },
1235
+ ],
1236
+ stateMutability: "view",
1237
+ },
1238
+ {
1239
+ type: "function",
1240
+ inputs: [
1241
+ { name: "mode", internalType: "bytes32", type: "bytes32" },
1242
+ { name: "executionData", internalType: "bytes", type: "bytes" },
1243
+ ],
1244
+ name: "execute",
1245
+ outputs: [],
1246
+ stateMutability: "payable",
1247
+ },
1248
+ {
1249
+ type: "function",
1250
+ inputs: [],
1251
+ name: "getContextKeyHash",
1252
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
1253
+ stateMutability: "view",
1254
+ },
1255
+ {
1256
+ type: "function",
1257
+ inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }],
1258
+ name: "getKey",
1259
+ outputs: [
1260
+ {
1261
+ name: "key",
1262
+ internalType: "struct TownsAccount.Key",
1263
+ type: "tuple",
1264
+ components: [
1265
+ { name: "expiry", internalType: "uint40", type: "uint40" },
1266
+ {
1267
+ name: "keyType",
1268
+ internalType: "enum TownsAccount.KeyType",
1269
+ type: "uint8",
1270
+ },
1271
+ { name: "isSuperAdmin", internalType: "bool", type: "bool" },
1272
+ { name: "publicKey", internalType: "bytes", type: "bytes" },
1273
+ ],
1274
+ },
1275
+ ],
1276
+ stateMutability: "view",
1277
+ },
1278
+ {
1279
+ type: "function",
1280
+ inputs: [],
1281
+ name: "getKeys",
1282
+ outputs: [
1283
+ {
1284
+ name: "keys",
1285
+ internalType: "struct TownsAccount.Key[]",
1286
+ type: "tuple[]",
1287
+ components: [
1288
+ { name: "expiry", internalType: "uint40", type: "uint40" },
1289
+ {
1290
+ name: "keyType",
1291
+ internalType: "enum TownsAccount.KeyType",
1292
+ type: "uint8",
1293
+ },
1294
+ { name: "isSuperAdmin", internalType: "bool", type: "bool" },
1295
+ { name: "publicKey", internalType: "bytes", type: "bytes" },
1296
+ ],
1297
+ },
1298
+ { name: "keyHashes", internalType: "bytes32[]", type: "bytes32[]" },
1299
+ ],
1300
+ stateMutability: "view",
1301
+ },
1302
+ {
1303
+ type: "function",
1304
+ inputs: [{ name: "seqKey", internalType: "uint192", type: "uint192" }],
1305
+ name: "getNonce",
1306
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
1307
+ stateMutability: "view",
1308
+ },
1309
+ {
1310
+ type: "function",
1311
+ inputs: [
1312
+ {
1313
+ name: "key",
1314
+ internalType: "struct TownsAccount.Key",
1315
+ type: "tuple",
1316
+ components: [
1317
+ { name: "expiry", internalType: "uint40", type: "uint40" },
1318
+ {
1319
+ name: "keyType",
1320
+ internalType: "enum TownsAccount.KeyType",
1321
+ type: "uint8",
1322
+ },
1323
+ { name: "isSuperAdmin", internalType: "bool", type: "bool" },
1324
+ { name: "publicKey", internalType: "bytes", type: "bytes" },
1325
+ ],
1326
+ },
1327
+ ],
1328
+ name: "hash",
1329
+ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
1330
+ stateMutability: "pure",
1331
+ },
1332
+ {
1333
+ type: "function",
1334
+ inputs: [{ name: "nonce", internalType: "uint256", type: "uint256" }],
1335
+ name: "invalidateNonce",
1336
+ outputs: [],
1337
+ stateMutability: "nonpayable",
1338
+ },
1339
+ {
1340
+ type: "function",
1341
+ inputs: [
1342
+ { name: "digest", internalType: "bytes32", type: "bytes32" },
1343
+ { name: "signature", internalType: "bytes", type: "bytes" },
1344
+ ],
1345
+ name: "isValidSignature",
1346
+ outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }],
1347
+ stateMutability: "view",
1348
+ },
1349
+ {
1350
+ type: "function",
1351
+ inputs: [{ name: "i", internalType: "uint256", type: "uint256" }],
1352
+ name: "keyAt",
1353
+ outputs: [
1354
+ {
1355
+ name: "",
1356
+ internalType: "struct TownsAccount.Key",
1357
+ type: "tuple",
1358
+ components: [
1359
+ { name: "expiry", internalType: "uint40", type: "uint40" },
1360
+ {
1361
+ name: "keyType",
1362
+ internalType: "enum TownsAccount.KeyType",
1363
+ type: "uint8",
1364
+ },
1365
+ { name: "isSuperAdmin", internalType: "bool", type: "bool" },
1366
+ { name: "publicKey", internalType: "bytes", type: "bytes" },
1367
+ ],
1368
+ },
1369
+ ],
1370
+ stateMutability: "view",
1371
+ },
1372
+ {
1373
+ type: "function",
1374
+ inputs: [],
1375
+ name: "keyCount",
1376
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
1377
+ stateMutability: "view",
1378
+ },
1379
+ {
1380
+ type: "function",
1381
+ inputs: [],
1382
+ name: "label",
1383
+ outputs: [{ name: "", internalType: "string", type: "string" }],
1384
+ stateMutability: "view",
1385
+ },
1386
+ {
1387
+ type: "function",
1388
+ inputs: [
1389
+ { name: "paymentAmount", internalType: "uint256", type: "uint256" },
1390
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
1391
+ { name: "intentDigest", internalType: "bytes32", type: "bytes32" },
1392
+ { name: "encodedIntent", internalType: "bytes", type: "bytes" },
1393
+ ],
1394
+ name: "pay",
1395
+ outputs: [],
1396
+ stateMutability: "nonpayable",
1397
+ },
1398
+ {
1399
+ type: "function",
1400
+ inputs: [
1401
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
1402
+ { name: "token", internalType: "address", type: "address" },
1403
+ {
1404
+ name: "period",
1405
+ internalType: "enum GuardedExecutor.SpendPeriod",
1406
+ type: "uint8",
1407
+ },
1408
+ ],
1409
+ name: "removeSpendLimit",
1410
+ outputs: [],
1411
+ stateMutability: "nonpayable",
1412
+ },
1413
+ {
1414
+ type: "function",
1415
+ inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }],
1416
+ name: "revoke",
1417
+ outputs: [],
1418
+ stateMutability: "nonpayable",
1419
+ },
1420
+ {
1421
+ type: "function",
1422
+ inputs: [
1423
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
1424
+ { name: "target", internalType: "address", type: "address" },
1425
+ { name: "checker", internalType: "address", type: "address" },
1426
+ ],
1427
+ name: "setCallChecker",
1428
+ outputs: [],
1429
+ stateMutability: "nonpayable",
1430
+ },
1431
+ {
1432
+ type: "function",
1433
+ inputs: [
1434
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
1435
+ { name: "target", internalType: "address", type: "address" },
1436
+ { name: "fnSel", internalType: "bytes4", type: "bytes4" },
1437
+ { name: "can", internalType: "bool", type: "bool" },
1438
+ ],
1439
+ name: "setCanExecute",
1440
+ outputs: [],
1441
+ stateMutability: "nonpayable",
1442
+ },
1443
+ {
1444
+ type: "function",
1445
+ inputs: [{ name: "newLabel", internalType: "string", type: "string" }],
1446
+ name: "setLabel",
1447
+ outputs: [],
1448
+ stateMutability: "nonpayable",
1449
+ },
1450
+ {
1451
+ type: "function",
1452
+ inputs: [
1453
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
1454
+ { name: "checker", internalType: "address", type: "address" },
1455
+ { name: "isApproved", internalType: "bool", type: "bool" },
1456
+ ],
1457
+ name: "setSignatureCheckerApproval",
1458
+ outputs: [],
1459
+ stateMutability: "nonpayable",
1460
+ },
1461
+ {
1462
+ type: "function",
1463
+ inputs: [
1464
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
1465
+ { name: "token", internalType: "address", type: "address" },
1466
+ {
1467
+ name: "period",
1468
+ internalType: "enum GuardedExecutor.SpendPeriod",
1469
+ type: "uint8",
1470
+ },
1471
+ { name: "limit", internalType: "uint256", type: "uint256" },
1472
+ ],
1473
+ name: "setSpendLimit",
1474
+ outputs: [],
1475
+ stateMutability: "nonpayable",
1476
+ },
1477
+ {
1478
+ type: "function",
1479
+ inputs: [
1480
+ { name: "keyHashes", internalType: "bytes32[]", type: "bytes32[]" },
1481
+ ],
1482
+ name: "spendAndExecuteInfos",
1483
+ outputs: [
1484
+ {
1485
+ name: "spends",
1486
+ internalType: "struct GuardedExecutor.SpendInfo[][]",
1487
+ type: "tuple[][]",
1488
+ components: [
1489
+ { name: "token", internalType: "address", type: "address" },
1490
+ {
1491
+ name: "period",
1492
+ internalType: "enum GuardedExecutor.SpendPeriod",
1493
+ type: "uint8",
1494
+ },
1495
+ { name: "limit", internalType: "uint256", type: "uint256" },
1496
+ { name: "spent", internalType: "uint256", type: "uint256" },
1497
+ { name: "lastUpdated", internalType: "uint256", type: "uint256" },
1498
+ { name: "currentSpent", internalType: "uint256", type: "uint256" },
1499
+ { name: "current", internalType: "uint256", type: "uint256" },
1500
+ ],
1501
+ },
1502
+ { name: "executes", internalType: "bytes32[][]", type: "bytes32[][]" },
1503
+ ],
1504
+ stateMutability: "view",
1505
+ },
1506
+ {
1507
+ type: "function",
1508
+ inputs: [{ name: "keyHash", internalType: "bytes32", type: "bytes32" }],
1509
+ name: "spendInfos",
1510
+ outputs: [
1511
+ {
1512
+ name: "results",
1513
+ internalType: "struct GuardedExecutor.SpendInfo[]",
1514
+ type: "tuple[]",
1515
+ components: [
1516
+ { name: "token", internalType: "address", type: "address" },
1517
+ {
1518
+ name: "period",
1519
+ internalType: "enum GuardedExecutor.SpendPeriod",
1520
+ type: "uint8",
1521
+ },
1522
+ { name: "limit", internalType: "uint256", type: "uint256" },
1523
+ { name: "spent", internalType: "uint256", type: "uint256" },
1524
+ { name: "lastUpdated", internalType: "uint256", type: "uint256" },
1525
+ { name: "currentSpent", internalType: "uint256", type: "uint256" },
1526
+ { name: "current", internalType: "uint256", type: "uint256" },
1527
+ ],
1528
+ },
1529
+ ],
1530
+ stateMutability: "view",
1531
+ },
1532
+ {
1533
+ type: "function",
1534
+ inputs: [
1535
+ { name: "unixTimestamp", internalType: "uint256", type: "uint256" },
1536
+ {
1537
+ name: "period",
1538
+ internalType: "enum GuardedExecutor.SpendPeriod",
1539
+ type: "uint8",
1540
+ },
1541
+ ],
1542
+ name: "startOfSpendPeriod",
1543
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
1544
+ stateMutability: "pure",
1545
+ },
1546
+ {
1547
+ type: "function",
1548
+ inputs: [{ name: "mode", internalType: "bytes32", type: "bytes32" }],
1549
+ name: "supportsExecutionMode",
1550
+ outputs: [{ name: "result", internalType: "bool", type: "bool" }],
1551
+ stateMutability: "view",
1552
+ },
1553
+ {
1554
+ type: "function",
1555
+ inputs: [
1556
+ { name: "digest", internalType: "bytes32", type: "bytes32" },
1557
+ { name: "signature", internalType: "bytes", type: "bytes" },
1558
+ ],
1559
+ name: "unwrapAndValidateSignature",
1560
+ outputs: [
1561
+ { name: "isValid", internalType: "bool", type: "bool" },
1562
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
1563
+ ],
1564
+ stateMutability: "view",
1565
+ },
1566
+ {
1567
+ type: "function",
1568
+ inputs: [
1569
+ { name: "previousVersion", internalType: "bytes32", type: "bytes32" },
1570
+ ],
1571
+ name: "upgradeHook",
1572
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
1573
+ stateMutability: "nonpayable",
1574
+ },
1575
+ {
1576
+ type: "function",
1577
+ inputs: [
1578
+ { name: "newImplementation", internalType: "address", type: "address" },
1579
+ ],
1580
+ name: "upgradeProxyAccount",
1581
+ outputs: [],
1582
+ stateMutability: "nonpayable",
1583
+ },
1584
+ {
1585
+ type: "event",
1586
+ anonymous: false,
1587
+ inputs: [
1588
+ {
1589
+ name: "keyHash",
1590
+ internalType: "bytes32",
1591
+ type: "bytes32",
1592
+ indexed: true,
1593
+ },
1594
+ {
1595
+ name: "key",
1596
+ internalType: "struct TownsAccount.Key",
1597
+ type: "tuple",
1598
+ components: [
1599
+ { name: "expiry", internalType: "uint40", type: "uint40" },
1600
+ {
1601
+ name: "keyType",
1602
+ internalType: "enum TownsAccount.KeyType",
1603
+ type: "uint8",
1604
+ },
1605
+ { name: "isSuperAdmin", internalType: "bool", type: "bool" },
1606
+ { name: "publicKey", internalType: "bytes", type: "bytes" },
1607
+ ],
1608
+ indexed: false,
1609
+ },
1610
+ ],
1611
+ name: "Authorized",
1612
+ },
1613
+ {
1614
+ type: "event",
1615
+ anonymous: false,
1616
+ inputs: [
1617
+ {
1618
+ name: "keyHash",
1619
+ internalType: "bytes32",
1620
+ type: "bytes32",
1621
+ indexed: false,
1622
+ },
1623
+ {
1624
+ name: "target",
1625
+ internalType: "address",
1626
+ type: "address",
1627
+ indexed: false,
1628
+ },
1629
+ {
1630
+ name: "checker",
1631
+ internalType: "address",
1632
+ type: "address",
1633
+ indexed: false,
1634
+ },
1635
+ ],
1636
+ name: "CallCheckerSet",
1637
+ },
1638
+ {
1639
+ type: "event",
1640
+ anonymous: false,
1641
+ inputs: [
1642
+ {
1643
+ name: "keyHash",
1644
+ internalType: "bytes32",
1645
+ type: "bytes32",
1646
+ indexed: false,
1647
+ },
1648
+ {
1649
+ name: "target",
1650
+ internalType: "address",
1651
+ type: "address",
1652
+ indexed: false,
1653
+ },
1654
+ { name: "fnSel", internalType: "bytes4", type: "bytes4", indexed: false },
1655
+ { name: "can", internalType: "bool", type: "bool", indexed: false },
1656
+ ],
1657
+ name: "CanExecuteSet",
1658
+ },
1659
+ {
1660
+ type: "event",
1661
+ anonymous: false,
1662
+ inputs: [
1663
+ {
1664
+ name: "implementation",
1665
+ internalType: "address",
1666
+ type: "address",
1667
+ indexed: true,
1668
+ },
1669
+ {
1670
+ name: "isApproved",
1671
+ internalType: "bool",
1672
+ type: "bool",
1673
+ indexed: false,
1674
+ },
1675
+ ],
1676
+ name: "ImplementationApprovalSet",
1677
+ },
1678
+ {
1679
+ type: "event",
1680
+ anonymous: false,
1681
+ inputs: [
1682
+ {
1683
+ name: "implementation",
1684
+ internalType: "address",
1685
+ type: "address",
1686
+ indexed: true,
1687
+ },
1688
+ {
1689
+ name: "caller",
1690
+ internalType: "address",
1691
+ type: "address",
1692
+ indexed: true,
1693
+ },
1694
+ {
1695
+ name: "isApproved",
1696
+ internalType: "bool",
1697
+ type: "bool",
1698
+ indexed: false,
1699
+ },
1700
+ ],
1701
+ name: "ImplementationCallerApprovalSet",
1702
+ },
1703
+ {
1704
+ type: "event",
1705
+ anonymous: false,
1706
+ inputs: [
1707
+ {
1708
+ name: "newLabel",
1709
+ internalType: "string",
1710
+ type: "string",
1711
+ indexed: false,
1712
+ },
1713
+ ],
1714
+ name: "LabelSet",
1715
+ },
1716
+ {
1717
+ type: "event",
1718
+ anonymous: false,
1719
+ inputs: [
1720
+ {
1721
+ name: "nonce",
1722
+ internalType: "uint256",
1723
+ type: "uint256",
1724
+ indexed: false,
1725
+ },
1726
+ ],
1727
+ name: "NonceInvalidated",
1728
+ },
1729
+ {
1730
+ type: "event",
1731
+ anonymous: false,
1732
+ inputs: [
1733
+ {
1734
+ name: "keyHash",
1735
+ internalType: "bytes32",
1736
+ type: "bytes32",
1737
+ indexed: true,
1738
+ },
1739
+ ],
1740
+ name: "Revoked",
1741
+ },
1742
+ {
1743
+ type: "event",
1744
+ anonymous: false,
1745
+ inputs: [
1746
+ {
1747
+ name: "keyHash",
1748
+ internalType: "bytes32",
1749
+ type: "bytes32",
1750
+ indexed: true,
1751
+ },
1752
+ {
1753
+ name: "checker",
1754
+ internalType: "address",
1755
+ type: "address",
1756
+ indexed: true,
1757
+ },
1758
+ {
1759
+ name: "isApproved",
1760
+ internalType: "bool",
1761
+ type: "bool",
1762
+ indexed: false,
1763
+ },
1764
+ ],
1765
+ name: "SignatureCheckerApprovalSet",
1766
+ },
1767
+ {
1768
+ type: "event",
1769
+ anonymous: false,
1770
+ inputs: [
1771
+ {
1772
+ name: "keyHash",
1773
+ internalType: "bytes32",
1774
+ type: "bytes32",
1775
+ indexed: false,
1776
+ },
1777
+ {
1778
+ name: "token",
1779
+ internalType: "address",
1780
+ type: "address",
1781
+ indexed: false,
1782
+ },
1783
+ {
1784
+ name: "period",
1785
+ internalType: "enum GuardedExecutor.SpendPeriod",
1786
+ type: "uint8",
1787
+ indexed: false,
1788
+ },
1789
+ ],
1790
+ name: "SpendLimitRemoved",
1791
+ },
1792
+ {
1793
+ type: "event",
1794
+ anonymous: false,
1795
+ inputs: [
1796
+ {
1797
+ name: "keyHash",
1798
+ internalType: "bytes32",
1799
+ type: "bytes32",
1800
+ indexed: false,
1801
+ },
1802
+ {
1803
+ name: "token",
1804
+ internalType: "address",
1805
+ type: "address",
1806
+ indexed: false,
1807
+ },
1808
+ {
1809
+ name: "period",
1810
+ internalType: "enum GuardedExecutor.SpendPeriod",
1811
+ type: "uint8",
1812
+ indexed: false,
1813
+ },
1814
+ {
1815
+ name: "limit",
1816
+ internalType: "uint256",
1817
+ type: "uint256",
1818
+ indexed: false,
1819
+ },
1820
+ ],
1821
+ name: "SpendLimitSet",
1822
+ },
1823
+ { type: "error", inputs: [], name: "BatchOfBatchesDecodingError" },
1824
+ { type: "error", inputs: [], name: "CannotSelfExecute" },
1825
+ {
1826
+ type: "error",
1827
+ inputs: [{ name: "token", internalType: "address", type: "address" }],
1828
+ name: "ExceededSpendLimit",
1829
+ },
1830
+ { type: "error", inputs: [], name: "ExceedsCapacity" },
1831
+ { type: "error", inputs: [], name: "FnSelectorNotRecognized" },
1832
+ { type: "error", inputs: [], name: "IndexOutOfBounds" },
1833
+ { type: "error", inputs: [], name: "InvalidNonce" },
1834
+ { type: "error", inputs: [], name: "InvalidPublicKey" },
1835
+ { type: "error", inputs: [], name: "KeyDoesNotExist" },
1836
+ { type: "error", inputs: [], name: "KeyHashIsZero" },
1837
+ { type: "error", inputs: [], name: "KeyTypeCannotBeSuperAdmin" },
1838
+ { type: "error", inputs: [], name: "NewImplementationIsZero" },
1839
+ { type: "error", inputs: [], name: "NewSequenceMustBeLarger" },
1840
+ { type: "error", inputs: [], name: "NoSpendPermissions" },
1841
+ { type: "error", inputs: [], name: "OpDataError" },
1842
+ { type: "error", inputs: [], name: "PaymasterNonceError" },
1843
+ { type: "error", inputs: [], name: "SuperAdminCanExecuteEverything" },
1844
+ { type: "error", inputs: [], name: "SuperAdminCanSpendAnything" },
1845
+ { type: "error", inputs: [], name: "Unauthorized" },
1846
+ {
1847
+ type: "error",
1848
+ inputs: [
1849
+ { name: "keyHash", internalType: "bytes32", type: "bytes32" },
1850
+ { name: "target", internalType: "address", type: "address" },
1851
+ { name: "data", internalType: "bytes", type: "bytes" },
1852
+ ],
1853
+ name: "UnauthorizedCall",
1854
+ },
1855
+ { type: "error", inputs: [], name: "UnsupportedExecutionMode" },
1856
+ ];
1857
+ //# sourceMappingURL=index.js.map