@instadapp/interop-x 0.0.0-dev.73e5298 → 0.0.0-dev.7738003

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/.github/workflows/ci.yml +19 -0
  2. package/dist/package.json +1 -1
  3. package/dist/src/abi/index.js +2 -2
  4. package/dist/src/abi/interopX.json +1436 -0
  5. package/dist/src/api/index.js +1 -1
  6. package/dist/src/constants/addresses.js +2 -7
  7. package/dist/src/db/models/transaction.js +11 -9
  8. package/dist/src/gnosis/actions/withdraw/index.js +106 -107
  9. package/dist/src/index.js +1 -1
  10. package/dist/src/tasks/{InteropXContract/SyncBridgeRequestEvents.js → InteropX/SyncLogSubmitEvents.js} +18 -12
  11. package/dist/src/tasks/Transactions/SyncTransactionStatusTask.js +3 -3
  12. package/dist/src/tasks/index.js +4 -13
  13. package/dist/src/typechain/{InteropXContract.js → InteropX.js} +0 -0
  14. package/dist/src/typechain/factories/InteropX__factory.js +1928 -0
  15. package/dist/src/typechain/factories/index.js +3 -3
  16. package/dist/src/typechain/index.js +3 -3
  17. package/dist/src/utils/index.js +5 -3
  18. package/package.json +1 -1
  19. package/src/abi/index.ts +2 -2
  20. package/src/abi/interopX.json +1436 -0
  21. package/src/api/index.ts +1 -1
  22. package/src/constants/addresses.ts +3 -8
  23. package/src/db/models/transaction.ts +28 -37
  24. package/src/gnosis/actions/withdraw/index.ts +131 -131
  25. package/src/tasks/{InteropXContract/SyncBridgeRequestEvents.ts → InteropX/SyncLogSubmitEvents.ts} +37 -16
  26. package/src/tasks/Transactions/SyncTransactionStatusTask.ts +3 -3
  27. package/src/tasks/index.ts +5 -17
  28. package/src/typechain/InteropX.ts +1216 -0
  29. package/src/typechain/factories/InteropX__factory.ts +1932 -0
  30. package/src/typechain/factories/index.ts +1 -1
  31. package/src/typechain/index.ts +2 -2
  32. package/src/utils/index.ts +22 -8
  33. package/dist/src/abi/interopXContract.json +0 -454
  34. package/dist/src/tasks/InteropXContract/ProcessBridgeRequestEvents.js +0 -158
  35. package/dist/src/tasks/InteropXContract/SyncBridgeCommittedEvents.js +0 -93
  36. package/dist/src/tasks/InteropXContract/SyncBridgeRequestSentEvents.js +0 -90
  37. package/dist/src/typechain/factories/InteropXContract__factory.js +0 -635
  38. package/src/abi/interopXContract.json +0 -454
  39. package/src/tasks/InteropXContract/ProcessBridgeRequestEvents.ts +0 -226
  40. package/src/tasks/InteropXContract/SyncBridgeCommittedEvents.ts +0 -125
  41. package/src/tasks/InteropXContract/SyncBridgeRequestSentEvents.ts +0 -121
  42. package/src/typechain/InteropXContract.ts +0 -680
  43. package/src/typechain/factories/InteropXContract__factory.ts +0 -642
@@ -1,642 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
-
5
- import { Contract, Signer, utils } from "ethers";
6
- import type { Provider } from "@ethersproject/providers";
7
- import type {
8
- InteropXContract,
9
- InteropXContractInterface,
10
- } from "../InteropXContract";
11
-
12
- const _abi = [
13
- {
14
- anonymous: false,
15
- inputs: [
16
- {
17
- indexed: false,
18
- internalType: "string",
19
- name: "actionId",
20
- type: "string",
21
- },
22
- {
23
- indexed: true,
24
- internalType: "address",
25
- name: "bridger",
26
- type: "address",
27
- },
28
- {
29
- components: [
30
- {
31
- components: [
32
- {
33
- internalType: "address",
34
- name: "sourceToken",
35
- type: "address",
36
- },
37
- {
38
- internalType: "address",
39
- name: "targetToken",
40
- type: "address",
41
- },
42
- {
43
- internalType: "uint256",
44
- name: "amount",
45
- type: "uint256",
46
- },
47
- ],
48
- internalType: "struct InteropXContractBeta.TokenInfo[]",
49
- name: "supply",
50
- type: "tuple[]",
51
- },
52
- {
53
- components: [
54
- {
55
- internalType: "address",
56
- name: "sourceToken",
57
- type: "address",
58
- },
59
- {
60
- internalType: "address",
61
- name: "targetToken",
62
- type: "address",
63
- },
64
- {
65
- internalType: "uint256",
66
- name: "amount",
67
- type: "uint256",
68
- },
69
- ],
70
- internalType: "struct InteropXContractBeta.TokenInfo[]",
71
- name: "withdraw",
72
- type: "tuple[]",
73
- },
74
- ],
75
- indexed: false,
76
- internalType: "struct InteropXContractBeta.Position",
77
- name: "position",
78
- type: "tuple",
79
- },
80
- {
81
- indexed: true,
82
- internalType: "uint32",
83
- name: "sourceChainId",
84
- type: "uint32",
85
- },
86
- {
87
- indexed: false,
88
- internalType: "uint32",
89
- name: "targetChainId",
90
- type: "uint32",
91
- },
92
- {
93
- indexed: true,
94
- internalType: "bytes32",
95
- name: "requestTransactionHash",
96
- type: "bytes32",
97
- },
98
- {
99
- indexed: false,
100
- internalType: "bytes",
101
- name: "metadata",
102
- type: "bytes",
103
- },
104
- ],
105
- name: "LogBridgeCommitted",
106
- type: "event",
107
- },
108
- {
109
- anonymous: false,
110
- inputs: [
111
- {
112
- indexed: false,
113
- internalType: "string",
114
- name: "actionId",
115
- type: "string",
116
- },
117
- {
118
- indexed: true,
119
- internalType: "address",
120
- name: "bridger",
121
- type: "address",
122
- },
123
- {
124
- components: [
125
- {
126
- components: [
127
- {
128
- internalType: "address",
129
- name: "sourceToken",
130
- type: "address",
131
- },
132
- {
133
- internalType: "address",
134
- name: "targetToken",
135
- type: "address",
136
- },
137
- {
138
- internalType: "uint256",
139
- name: "amount",
140
- type: "uint256",
141
- },
142
- ],
143
- internalType: "struct InteropXContractBeta.TokenInfo[]",
144
- name: "supply",
145
- type: "tuple[]",
146
- },
147
- {
148
- components: [
149
- {
150
- internalType: "address",
151
- name: "sourceToken",
152
- type: "address",
153
- },
154
- {
155
- internalType: "address",
156
- name: "targetToken",
157
- type: "address",
158
- },
159
- {
160
- internalType: "uint256",
161
- name: "amount",
162
- type: "uint256",
163
- },
164
- ],
165
- internalType: "struct InteropXContractBeta.TokenInfo[]",
166
- name: "withdraw",
167
- type: "tuple[]",
168
- },
169
- ],
170
- indexed: false,
171
- internalType: "struct InteropXContractBeta.Position",
172
- name: "position",
173
- type: "tuple",
174
- },
175
- {
176
- indexed: false,
177
- internalType: "uint256",
178
- name: "sourceChainId",
179
- type: "uint256",
180
- },
181
- {
182
- indexed: true,
183
- internalType: "uint256",
184
- name: "targetChainId",
185
- type: "uint256",
186
- },
187
- {
188
- indexed: true,
189
- internalType: "bytes32",
190
- name: "requestTransactionHash",
191
- type: "bytes32",
192
- },
193
- {
194
- indexed: false,
195
- internalType: "bytes32",
196
- name: "targetCommittedTransactionHash",
197
- type: "bytes32",
198
- },
199
- {
200
- indexed: false,
201
- internalType: "bytes",
202
- name: "metadata",
203
- type: "bytes",
204
- },
205
- ],
206
- name: "LogBridgeCompleted",
207
- type: "event",
208
- },
209
- {
210
- anonymous: false,
211
- inputs: [
212
- {
213
- indexed: false,
214
- internalType: "string",
215
- name: "actionId",
216
- type: "string",
217
- },
218
- {
219
- indexed: true,
220
- internalType: "address",
221
- name: "bridger",
222
- type: "address",
223
- },
224
- {
225
- components: [
226
- {
227
- components: [
228
- {
229
- internalType: "address",
230
- name: "sourceToken",
231
- type: "address",
232
- },
233
- {
234
- internalType: "address",
235
- name: "targetToken",
236
- type: "address",
237
- },
238
- {
239
- internalType: "uint256",
240
- name: "amount",
241
- type: "uint256",
242
- },
243
- ],
244
- internalType: "struct InteropXContractBeta.TokenInfo[]",
245
- name: "supply",
246
- type: "tuple[]",
247
- },
248
- {
249
- components: [
250
- {
251
- internalType: "address",
252
- name: "sourceToken",
253
- type: "address",
254
- },
255
- {
256
- internalType: "address",
257
- name: "targetToken",
258
- type: "address",
259
- },
260
- {
261
- internalType: "uint256",
262
- name: "amount",
263
- type: "uint256",
264
- },
265
- ],
266
- internalType: "struct InteropXContractBeta.TokenInfo[]",
267
- name: "withdraw",
268
- type: "tuple[]",
269
- },
270
- ],
271
- indexed: false,
272
- internalType: "struct InteropXContractBeta.Position",
273
- name: "position",
274
- type: "tuple",
275
- },
276
- {
277
- indexed: false,
278
- internalType: "uint256",
279
- name: "sourceChainId",
280
- type: "uint256",
281
- },
282
- {
283
- indexed: true,
284
- internalType: "uint256",
285
- name: "targetChainId",
286
- type: "uint256",
287
- },
288
- {
289
- indexed: false,
290
- internalType: "bytes",
291
- name: "metadata",
292
- type: "bytes",
293
- },
294
- ],
295
- name: "LogBridgeRequest",
296
- type: "event",
297
- },
298
- {
299
- anonymous: false,
300
- inputs: [
301
- {
302
- indexed: false,
303
- internalType: "string",
304
- name: "actionId",
305
- type: "string",
306
- },
307
- {
308
- indexed: true,
309
- internalType: "address",
310
- name: "bridger",
311
- type: "address",
312
- },
313
- {
314
- components: [
315
- {
316
- components: [
317
- {
318
- internalType: "address",
319
- name: "sourceToken",
320
- type: "address",
321
- },
322
- {
323
- internalType: "address",
324
- name: "targetToken",
325
- type: "address",
326
- },
327
- {
328
- internalType: "uint256",
329
- name: "amount",
330
- type: "uint256",
331
- },
332
- ],
333
- internalType: "struct InteropXContractBeta.TokenInfo[]",
334
- name: "supply",
335
- type: "tuple[]",
336
- },
337
- {
338
- components: [
339
- {
340
- internalType: "address",
341
- name: "sourceToken",
342
- type: "address",
343
- },
344
- {
345
- internalType: "address",
346
- name: "targetToken",
347
- type: "address",
348
- },
349
- {
350
- internalType: "uint256",
351
- name: "amount",
352
- type: "uint256",
353
- },
354
- ],
355
- internalType: "struct InteropXContractBeta.TokenInfo[]",
356
- name: "withdraw",
357
- type: "tuple[]",
358
- },
359
- ],
360
- indexed: false,
361
- internalType: "struct InteropXContractBeta.Position",
362
- name: "position",
363
- type: "tuple",
364
- },
365
- {
366
- indexed: false,
367
- internalType: "uint32",
368
- name: "sourceChainId",
369
- type: "uint32",
370
- },
371
- {
372
- indexed: true,
373
- internalType: "uint32",
374
- name: "targetChainId",
375
- type: "uint32",
376
- },
377
- {
378
- indexed: true,
379
- internalType: "bytes32",
380
- name: "requestTransactionHash",
381
- type: "bytes32",
382
- },
383
- {
384
- indexed: false,
385
- internalType: "bytes",
386
- name: "metadata",
387
- type: "bytes",
388
- },
389
- ],
390
- name: "LogBridgeRequestSent",
391
- type: "event",
392
- },
393
- {
394
- inputs: [
395
- {
396
- internalType: "string",
397
- name: "actionId",
398
- type: "string",
399
- },
400
- {
401
- internalType: "address",
402
- name: "to_",
403
- type: "address",
404
- },
405
- {
406
- internalType: "address",
407
- name: "sourceToken_",
408
- type: "address",
409
- },
410
- {
411
- internalType: "address",
412
- name: "targetToken_",
413
- type: "address",
414
- },
415
- {
416
- internalType: "uint256",
417
- name: "amount_",
418
- type: "uint256",
419
- },
420
- {
421
- internalType: "uint32",
422
- name: "sourceChainId_",
423
- type: "uint32",
424
- },
425
- {
426
- internalType: "bytes32",
427
- name: "transactionHash_",
428
- type: "bytes32",
429
- },
430
- {
431
- internalType: "bytes",
432
- name: "metadata_",
433
- type: "bytes",
434
- },
435
- ],
436
- name: "completeBridge",
437
- outputs: [],
438
- stateMutability: "nonpayable",
439
- type: "function",
440
- },
441
- {
442
- inputs: [
443
- {
444
- internalType: "address",
445
- name: "user",
446
- type: "address",
447
- },
448
- {
449
- internalType: "address[]",
450
- name: "tokens",
451
- type: "address[]",
452
- },
453
- ],
454
- name: "getBridgeAmounts",
455
- outputs: [
456
- {
457
- components: [
458
- {
459
- internalType: "uint256",
460
- name: "deposit",
461
- type: "uint256",
462
- },
463
- {
464
- internalType: "uint256",
465
- name: "withdraw",
466
- type: "uint256",
467
- },
468
- ],
469
- internalType: "struct InteropXContractBeta.UserData[]",
470
- name: "userData",
471
- type: "tuple[]",
472
- },
473
- ],
474
- stateMutability: "view",
475
- type: "function",
476
- },
477
- {
478
- inputs: [
479
- {
480
- internalType: "string",
481
- name: "actionId",
482
- type: "string",
483
- },
484
- {
485
- internalType: "address",
486
- name: "sourceToken_",
487
- type: "address",
488
- },
489
- {
490
- internalType: "address",
491
- name: "targetToken_",
492
- type: "address",
493
- },
494
- {
495
- internalType: "uint256",
496
- name: "amount_",
497
- type: "uint256",
498
- },
499
- {
500
- internalType: "uint32",
501
- name: "targetChainId_",
502
- type: "uint32",
503
- },
504
- {
505
- internalType: "bytes",
506
- name: "metadata_",
507
- type: "bytes",
508
- },
509
- ],
510
- name: "requestWithdraw",
511
- outputs: [],
512
- stateMutability: "nonpayable",
513
- type: "function",
514
- },
515
- {
516
- inputs: [
517
- {
518
- internalType: "address",
519
- name: "token",
520
- type: "address",
521
- },
522
- {
523
- internalType: "bool",
524
- name: "toggle",
525
- type: "bool",
526
- },
527
- ],
528
- name: "toggleWhitelist",
529
- outputs: [],
530
- stateMutability: "nonpayable",
531
- type: "function",
532
- },
533
- {
534
- inputs: [
535
- {
536
- internalType: "address",
537
- name: "",
538
- type: "address",
539
- },
540
- {
541
- internalType: "address",
542
- name: "",
543
- type: "address",
544
- },
545
- ],
546
- name: "userMapping",
547
- outputs: [
548
- {
549
- internalType: "uint256",
550
- name: "deposit",
551
- type: "uint256",
552
- },
553
- {
554
- internalType: "uint256",
555
- name: "withdraw",
556
- type: "uint256",
557
- },
558
- ],
559
- stateMutability: "view",
560
- type: "function",
561
- },
562
- {
563
- inputs: [
564
- {
565
- internalType: "address",
566
- name: "",
567
- type: "address",
568
- },
569
- ],
570
- name: "whitelistedTokens",
571
- outputs: [
572
- {
573
- internalType: "bool",
574
- name: "",
575
- type: "bool",
576
- },
577
- ],
578
- stateMutability: "view",
579
- type: "function",
580
- },
581
- {
582
- inputs: [
583
- {
584
- internalType: "string",
585
- name: "actionId",
586
- type: "string",
587
- },
588
- {
589
- internalType: "address",
590
- name: "user_",
591
- type: "address",
592
- },
593
- {
594
- internalType: "address",
595
- name: "sourceToken_",
596
- type: "address",
597
- },
598
- {
599
- internalType: "address",
600
- name: "targetToken_",
601
- type: "address",
602
- },
603
- {
604
- internalType: "uint256",
605
- name: "amount_",
606
- type: "uint256",
607
- },
608
- {
609
- internalType: "uint32",
610
- name: "chainId_",
611
- type: "uint32",
612
- },
613
- {
614
- internalType: "bytes32",
615
- name: "transactionHash_",
616
- type: "bytes32",
617
- },
618
- {
619
- internalType: "bytes",
620
- name: "metadata_",
621
- type: "bytes",
622
- },
623
- ],
624
- name: "withdrawRequested",
625
- outputs: [],
626
- stateMutability: "nonpayable",
627
- type: "function",
628
- },
629
- ];
630
-
631
- export class InteropXContract__factory {
632
- static readonly abi = _abi;
633
- static createInterface(): InteropXContractInterface {
634
- return new utils.Interface(_abi) as InteropXContractInterface;
635
- }
636
- static connect(
637
- address: string,
638
- signerOrProvider: Signer | Provider
639
- ): InteropXContract {
640
- return new Contract(address, _abi, signerOrProvider) as InteropXContract;
641
- }
642
- }