@instadapp/interop-x 0.0.0-dev.ef78459 → 0.0.0-dev.f0a6281

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. package/.env.example +2 -1
  2. package/bin/interop-x +1 -1
  3. package/dist/package.json +73 -0
  4. package/dist/src/abi/erc20.json +350 -0
  5. package/dist/src/abi/gnosisSafe.json +747 -0
  6. package/dist/src/abi/index.js +15 -0
  7. package/dist/src/abi/interopBridgeToken.json +298 -0
  8. package/dist/src/abi/interopXGateway.json +184 -0
  9. package/dist/src/api/index.js +33 -0
  10. package/dist/src/config/index.js +31 -0
  11. package/dist/src/constants/addresses.js +20 -0
  12. package/dist/{constants → src/constants}/index.js +2 -0
  13. package/dist/src/constants/itokens.js +13 -0
  14. package/dist/src/constants/tokens.js +107 -0
  15. package/dist/{db → src/db}/index.js +0 -0
  16. package/dist/{db → src/db}/models/index.js +1 -1
  17. package/dist/src/db/models/transaction.js +54 -0
  18. package/dist/{db → src/db}/sequelize.js +2 -1
  19. package/dist/src/index.js +130 -0
  20. package/dist/{logger → src/logger}/index.js +0 -0
  21. package/dist/{net → src/net}/index.js +0 -0
  22. package/dist/{net → src/net}/peer/index.js +8 -3
  23. package/dist/{net → src/net}/pool/index.js +32 -9
  24. package/dist/{net → src/net}/protocol/dial/BaseDialProtocol.js +0 -0
  25. package/dist/{net → src/net}/protocol/dial/SignatureDialProtocol.js +20 -12
  26. package/dist/src/net/protocol/dial/TransactionStatusDialProtocol.js +28 -0
  27. package/dist/{net → src/net}/protocol/index.js +44 -4
  28. package/dist/src/tasks/AutoUpdateTask.js +70 -0
  29. package/dist/{tasks → src/tasks}/BaseTask.js +13 -5
  30. package/dist/src/tasks/InteropBridge/ProcessWithdrawEvents.js +146 -0
  31. package/dist/src/tasks/InteropBridge/SyncWithdrawEvents.js +71 -0
  32. package/dist/src/tasks/InteropXGateway/ProcessDepositEvents.js +161 -0
  33. package/dist/src/tasks/InteropXGateway/SyncDepositEvents.js +74 -0
  34. package/dist/src/tasks/Transactions/SyncTransactionStatusTask.js +53 -0
  35. package/dist/src/tasks/index.js +44 -0
  36. package/dist/src/typechain/Erc20.js +2 -0
  37. package/dist/src/typechain/GnosisSafe.js +2 -0
  38. package/dist/src/typechain/InteropBridgeToken.js +2 -0
  39. package/dist/src/typechain/InteropXGateway.js +2 -0
  40. package/dist/src/typechain/common.js +2 -0
  41. package/dist/src/typechain/factories/Erc20__factory.js +367 -0
  42. package/dist/src/typechain/factories/GnosisSafe__factory.js +1174 -0
  43. package/dist/src/typechain/factories/InteropBridgeToken__factory.js +471 -0
  44. package/dist/src/typechain/factories/InteropXGateway__factory.js +265 -0
  45. package/dist/src/typechain/factories/index.js +14 -0
  46. package/dist/src/typechain/index.js +35 -0
  47. package/dist/{types.js → src/types.js} +0 -0
  48. package/dist/src/utils/index.js +238 -0
  49. package/package.json +18 -10
  50. package/patches/@ethersproject+properties+5.6.0.patch +13 -0
  51. package/src/abi/erc20.json +350 -0
  52. package/src/abi/gnosisSafe.json +747 -0
  53. package/src/abi/index.ts +11 -0
  54. package/src/abi/interopBridgeToken.json +298 -0
  55. package/src/abi/interopXGateway.json +184 -0
  56. package/src/api/index.ts +33 -0
  57. package/src/config/index.ts +17 -1
  58. package/src/constants/addresses.ts +9 -2
  59. package/src/constants/index.ts +2 -0
  60. package/src/constants/itokens.ts +10 -0
  61. package/src/constants/tokens.ts +104 -0
  62. package/src/db/models/index.ts +1 -1
  63. package/src/db/models/transaction.ts +96 -0
  64. package/src/db/sequelize.ts +2 -1
  65. package/src/index.ts +119 -7
  66. package/src/net/peer/index.ts +9 -7
  67. package/src/net/pool/index.ts +41 -11
  68. package/src/net/protocol/dial/SignatureDialProtocol.ts +24 -15
  69. package/src/net/protocol/dial/TransactionStatusDialProtocol.ts +31 -0
  70. package/src/net/protocol/index.ts +60 -4
  71. package/src/tasks/AutoUpdateTask.ts +82 -0
  72. package/src/tasks/BaseTask.ts +15 -6
  73. package/src/tasks/InteropBridge/ProcessWithdrawEvents.ts +231 -0
  74. package/src/tasks/InteropBridge/SyncWithdrawEvents.ts +121 -0
  75. package/src/tasks/InteropXGateway/ProcessDepositEvents.ts +256 -0
  76. package/src/tasks/InteropXGateway/SyncDepositEvents.ts +124 -0
  77. package/src/tasks/Transactions/SyncTransactionStatusTask.ts +65 -0
  78. package/src/tasks/index.ts +26 -1
  79. package/src/typechain/Erc20.ts +491 -0
  80. package/src/typechain/GnosisSafe.ts +1728 -0
  81. package/src/typechain/InteropBridgeToken.ts +692 -0
  82. package/src/typechain/InteropXGateway.ts +407 -0
  83. package/src/typechain/common.ts +44 -0
  84. package/src/typechain/factories/Erc20__factory.ts +368 -0
  85. package/src/typechain/factories/GnosisSafe__factory.ts +1178 -0
  86. package/src/typechain/factories/InteropBridgeToken__factory.ts +478 -0
  87. package/src/typechain/factories/InteropXGateway__factory.ts +272 -0
  88. package/src/typechain/factories/index.ts +7 -0
  89. package/src/typechain/index.ts +12 -0
  90. package/src/types.ts +1 -1
  91. package/src/utils/index.ts +206 -3
  92. package/dist/config/index.js +0 -17
  93. package/dist/constants/addresses.js +0 -13
  94. package/dist/db/models/execution.js +0 -38
  95. package/dist/index.js +0 -43
  96. package/dist/tasks/index.js +0 -19
  97. package/dist/utils/index.js +0 -89
  98. package/src/db/models/execution.ts +0 -57
@@ -0,0 +1,478 @@
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
+ InteropBridgeToken,
9
+ InteropBridgeTokenInterface,
10
+ } from "../InteropBridgeToken";
11
+
12
+ const _abi = [
13
+ {
14
+ inputs: [
15
+ {
16
+ internalType: "address",
17
+ name: "__owner",
18
+ type: "address",
19
+ },
20
+ ],
21
+ stateMutability: "nonpayable",
22
+ type: "constructor",
23
+ },
24
+ {
25
+ anonymous: false,
26
+ inputs: [
27
+ {
28
+ indexed: true,
29
+ internalType: "address",
30
+ name: "owner",
31
+ type: "address",
32
+ },
33
+ {
34
+ indexed: true,
35
+ internalType: "address",
36
+ name: "spender",
37
+ type: "address",
38
+ },
39
+ {
40
+ indexed: false,
41
+ internalType: "uint256",
42
+ name: "value",
43
+ type: "uint256",
44
+ },
45
+ ],
46
+ name: "Approval",
47
+ type: "event",
48
+ },
49
+ {
50
+ anonymous: false,
51
+ inputs: [
52
+ {
53
+ indexed: true,
54
+ internalType: "address",
55
+ name: "to",
56
+ type: "address",
57
+ },
58
+ {
59
+ indexed: false,
60
+ internalType: "uint256",
61
+ name: "amount",
62
+ type: "uint256",
63
+ },
64
+ {
65
+ indexed: false,
66
+ internalType: "uint32",
67
+ name: "sourceChainId",
68
+ type: "uint32",
69
+ },
70
+ {
71
+ indexed: true,
72
+ internalType: "uint32",
73
+ name: "targetChainId",
74
+ type: "uint32",
75
+ },
76
+ ],
77
+ name: "Burn",
78
+ type: "event",
79
+ },
80
+ {
81
+ anonymous: false,
82
+ inputs: [
83
+ {
84
+ indexed: true,
85
+ internalType: "address",
86
+ name: "to",
87
+ type: "address",
88
+ },
89
+ {
90
+ indexed: false,
91
+ internalType: "uint256",
92
+ name: "amount",
93
+ type: "uint256",
94
+ },
95
+ {
96
+ indexed: true,
97
+ internalType: "uint32",
98
+ name: "sourceChainId",
99
+ type: "uint32",
100
+ },
101
+ {
102
+ indexed: false,
103
+ internalType: "uint32",
104
+ name: "targetChainId",
105
+ type: "uint32",
106
+ },
107
+ {
108
+ indexed: true,
109
+ internalType: "bytes32",
110
+ name: "submitTransactionHash",
111
+ type: "bytes32",
112
+ },
113
+ ],
114
+ name: "Mint",
115
+ type: "event",
116
+ },
117
+ {
118
+ anonymous: false,
119
+ inputs: [
120
+ {
121
+ indexed: true,
122
+ internalType: "address",
123
+ name: "previousOwner",
124
+ type: "address",
125
+ },
126
+ {
127
+ indexed: true,
128
+ internalType: "address",
129
+ name: "newOwner",
130
+ type: "address",
131
+ },
132
+ ],
133
+ name: "OwnershipTransferred",
134
+ type: "event",
135
+ },
136
+ {
137
+ anonymous: false,
138
+ inputs: [
139
+ {
140
+ indexed: true,
141
+ internalType: "address",
142
+ name: "from",
143
+ type: "address",
144
+ },
145
+ {
146
+ indexed: true,
147
+ internalType: "address",
148
+ name: "to",
149
+ type: "address",
150
+ },
151
+ {
152
+ indexed: false,
153
+ internalType: "uint256",
154
+ name: "value",
155
+ type: "uint256",
156
+ },
157
+ ],
158
+ name: "Transfer",
159
+ type: "event",
160
+ },
161
+ {
162
+ inputs: [
163
+ {
164
+ internalType: "address",
165
+ name: "owner",
166
+ type: "address",
167
+ },
168
+ {
169
+ internalType: "address",
170
+ name: "spender",
171
+ type: "address",
172
+ },
173
+ ],
174
+ name: "allowance",
175
+ outputs: [
176
+ {
177
+ internalType: "uint256",
178
+ name: "",
179
+ type: "uint256",
180
+ },
181
+ ],
182
+ stateMutability: "view",
183
+ type: "function",
184
+ },
185
+ {
186
+ inputs: [
187
+ {
188
+ internalType: "address",
189
+ name: "spender",
190
+ type: "address",
191
+ },
192
+ {
193
+ internalType: "uint256",
194
+ name: "amount",
195
+ type: "uint256",
196
+ },
197
+ ],
198
+ name: "approve",
199
+ outputs: [
200
+ {
201
+ internalType: "bool",
202
+ name: "",
203
+ type: "bool",
204
+ },
205
+ ],
206
+ stateMutability: "nonpayable",
207
+ type: "function",
208
+ },
209
+ {
210
+ inputs: [
211
+ {
212
+ internalType: "address",
213
+ name: "account",
214
+ type: "address",
215
+ },
216
+ ],
217
+ name: "balanceOf",
218
+ outputs: [
219
+ {
220
+ internalType: "uint256",
221
+ name: "",
222
+ type: "uint256",
223
+ },
224
+ ],
225
+ stateMutability: "view",
226
+ type: "function",
227
+ },
228
+ {
229
+ inputs: [
230
+ {
231
+ internalType: "address",
232
+ name: "to",
233
+ type: "address",
234
+ },
235
+ {
236
+ internalType: "uint256",
237
+ name: "amount",
238
+ type: "uint256",
239
+ },
240
+ {
241
+ internalType: "uint32",
242
+ name: "chainId",
243
+ type: "uint32",
244
+ },
245
+ ],
246
+ name: "burn",
247
+ outputs: [],
248
+ stateMutability: "nonpayable",
249
+ type: "function",
250
+ },
251
+ {
252
+ inputs: [],
253
+ name: "decimals",
254
+ outputs: [
255
+ {
256
+ internalType: "uint8",
257
+ name: "",
258
+ type: "uint8",
259
+ },
260
+ ],
261
+ stateMutability: "view",
262
+ type: "function",
263
+ },
264
+ {
265
+ inputs: [
266
+ {
267
+ internalType: "address",
268
+ name: "spender",
269
+ type: "address",
270
+ },
271
+ {
272
+ internalType: "uint256",
273
+ name: "subtractedValue",
274
+ type: "uint256",
275
+ },
276
+ ],
277
+ name: "decreaseAllowance",
278
+ outputs: [
279
+ {
280
+ internalType: "bool",
281
+ name: "",
282
+ type: "bool",
283
+ },
284
+ ],
285
+ stateMutability: "nonpayable",
286
+ type: "function",
287
+ },
288
+ {
289
+ inputs: [
290
+ {
291
+ internalType: "address",
292
+ name: "spender",
293
+ type: "address",
294
+ },
295
+ {
296
+ internalType: "uint256",
297
+ name: "addedValue",
298
+ type: "uint256",
299
+ },
300
+ ],
301
+ name: "increaseAllowance",
302
+ outputs: [
303
+ {
304
+ internalType: "bool",
305
+ name: "",
306
+ type: "bool",
307
+ },
308
+ ],
309
+ stateMutability: "nonpayable",
310
+ type: "function",
311
+ },
312
+ {
313
+ inputs: [
314
+ {
315
+ internalType: "address",
316
+ name: "to",
317
+ type: "address",
318
+ },
319
+ {
320
+ internalType: "uint256",
321
+ name: "amount",
322
+ type: "uint256",
323
+ },
324
+ {
325
+ internalType: "uint32",
326
+ name: "chainId",
327
+ type: "uint32",
328
+ },
329
+ {
330
+ internalType: "bytes32",
331
+ name: "transactionHash",
332
+ type: "bytes32",
333
+ },
334
+ ],
335
+ name: "mint",
336
+ outputs: [],
337
+ stateMutability: "nonpayable",
338
+ type: "function",
339
+ },
340
+ {
341
+ inputs: [],
342
+ name: "name",
343
+ outputs: [
344
+ {
345
+ internalType: "string",
346
+ name: "",
347
+ type: "string",
348
+ },
349
+ ],
350
+ stateMutability: "view",
351
+ type: "function",
352
+ },
353
+ {
354
+ inputs: [],
355
+ name: "owner",
356
+ outputs: [
357
+ {
358
+ internalType: "address",
359
+ name: "",
360
+ type: "address",
361
+ },
362
+ ],
363
+ stateMutability: "view",
364
+ type: "function",
365
+ },
366
+ {
367
+ inputs: [],
368
+ name: "renounceOwnership",
369
+ outputs: [],
370
+ stateMutability: "nonpayable",
371
+ type: "function",
372
+ },
373
+ {
374
+ inputs: [],
375
+ name: "symbol",
376
+ outputs: [
377
+ {
378
+ internalType: "string",
379
+ name: "",
380
+ type: "string",
381
+ },
382
+ ],
383
+ stateMutability: "view",
384
+ type: "function",
385
+ },
386
+ {
387
+ inputs: [],
388
+ name: "totalSupply",
389
+ outputs: [
390
+ {
391
+ internalType: "uint256",
392
+ name: "",
393
+ type: "uint256",
394
+ },
395
+ ],
396
+ stateMutability: "view",
397
+ type: "function",
398
+ },
399
+ {
400
+ inputs: [
401
+ {
402
+ internalType: "address",
403
+ name: "to",
404
+ type: "address",
405
+ },
406
+ {
407
+ internalType: "uint256",
408
+ name: "amount",
409
+ type: "uint256",
410
+ },
411
+ ],
412
+ name: "transfer",
413
+ outputs: [
414
+ {
415
+ internalType: "bool",
416
+ name: "",
417
+ type: "bool",
418
+ },
419
+ ],
420
+ stateMutability: "nonpayable",
421
+ type: "function",
422
+ },
423
+ {
424
+ inputs: [
425
+ {
426
+ internalType: "address",
427
+ name: "from",
428
+ type: "address",
429
+ },
430
+ {
431
+ internalType: "address",
432
+ name: "to",
433
+ type: "address",
434
+ },
435
+ {
436
+ internalType: "uint256",
437
+ name: "amount",
438
+ type: "uint256",
439
+ },
440
+ ],
441
+ name: "transferFrom",
442
+ outputs: [
443
+ {
444
+ internalType: "bool",
445
+ name: "",
446
+ type: "bool",
447
+ },
448
+ ],
449
+ stateMutability: "nonpayable",
450
+ type: "function",
451
+ },
452
+ {
453
+ inputs: [
454
+ {
455
+ internalType: "address",
456
+ name: "newOwner",
457
+ type: "address",
458
+ },
459
+ ],
460
+ name: "transferOwnership",
461
+ outputs: [],
462
+ stateMutability: "nonpayable",
463
+ type: "function",
464
+ },
465
+ ];
466
+
467
+ export class InteropBridgeToken__factory {
468
+ static readonly abi = _abi;
469
+ static createInterface(): InteropBridgeTokenInterface {
470
+ return new utils.Interface(_abi) as InteropBridgeTokenInterface;
471
+ }
472
+ static connect(
473
+ address: string,
474
+ signerOrProvider: Signer | Provider
475
+ ): InteropBridgeToken {
476
+ return new Contract(address, _abi, signerOrProvider) as InteropBridgeToken;
477
+ }
478
+ }