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