@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,368 @@
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 { Erc20, Erc20Interface } from "../Erc20";
8
+
9
+ const _abi = [
10
+ {
11
+ inputs: [
12
+ {
13
+ internalType: "uint256",
14
+ name: "_totalSupply",
15
+ type: "uint256",
16
+ },
17
+ ],
18
+ payable: false,
19
+ stateMutability: "nonpayable",
20
+ type: "constructor",
21
+ },
22
+ {
23
+ anonymous: false,
24
+ inputs: [
25
+ {
26
+ indexed: true,
27
+ internalType: "address",
28
+ name: "owner",
29
+ type: "address",
30
+ },
31
+ {
32
+ indexed: true,
33
+ internalType: "address",
34
+ name: "spender",
35
+ type: "address",
36
+ },
37
+ {
38
+ indexed: false,
39
+ internalType: "uint256",
40
+ name: "value",
41
+ type: "uint256",
42
+ },
43
+ ],
44
+ name: "Approval",
45
+ type: "event",
46
+ },
47
+ {
48
+ anonymous: false,
49
+ inputs: [
50
+ {
51
+ indexed: true,
52
+ internalType: "address",
53
+ name: "from",
54
+ type: "address",
55
+ },
56
+ {
57
+ indexed: true,
58
+ internalType: "address",
59
+ name: "to",
60
+ type: "address",
61
+ },
62
+ {
63
+ indexed: false,
64
+ internalType: "uint256",
65
+ name: "value",
66
+ type: "uint256",
67
+ },
68
+ ],
69
+ name: "Transfer",
70
+ type: "event",
71
+ },
72
+ {
73
+ constant: true,
74
+ inputs: [],
75
+ name: "DOMAIN_SEPARATOR",
76
+ outputs: [
77
+ {
78
+ internalType: "bytes32",
79
+ name: "",
80
+ type: "bytes32",
81
+ },
82
+ ],
83
+ payable: false,
84
+ stateMutability: "view",
85
+ type: "function",
86
+ },
87
+ {
88
+ constant: true,
89
+ inputs: [],
90
+ name: "PERMIT_TYPEHASH",
91
+ outputs: [
92
+ {
93
+ internalType: "bytes32",
94
+ name: "",
95
+ type: "bytes32",
96
+ },
97
+ ],
98
+ payable: false,
99
+ stateMutability: "view",
100
+ type: "function",
101
+ },
102
+ {
103
+ constant: true,
104
+ inputs: [
105
+ {
106
+ internalType: "address",
107
+ name: "",
108
+ type: "address",
109
+ },
110
+ {
111
+ internalType: "address",
112
+ name: "",
113
+ type: "address",
114
+ },
115
+ ],
116
+ name: "allowance",
117
+ outputs: [
118
+ {
119
+ internalType: "uint256",
120
+ name: "",
121
+ type: "uint256",
122
+ },
123
+ ],
124
+ payable: false,
125
+ stateMutability: "view",
126
+ type: "function",
127
+ },
128
+ {
129
+ constant: false,
130
+ inputs: [
131
+ {
132
+ internalType: "address",
133
+ name: "spender",
134
+ type: "address",
135
+ },
136
+ {
137
+ internalType: "uint256",
138
+ name: "value",
139
+ type: "uint256",
140
+ },
141
+ ],
142
+ name: "approve",
143
+ outputs: [
144
+ {
145
+ internalType: "bool",
146
+ name: "",
147
+ type: "bool",
148
+ },
149
+ ],
150
+ payable: false,
151
+ stateMutability: "nonpayable",
152
+ type: "function",
153
+ },
154
+ {
155
+ constant: true,
156
+ inputs: [
157
+ {
158
+ internalType: "address",
159
+ name: "",
160
+ type: "address",
161
+ },
162
+ ],
163
+ name: "balanceOf",
164
+ outputs: [
165
+ {
166
+ internalType: "uint256",
167
+ name: "",
168
+ type: "uint256",
169
+ },
170
+ ],
171
+ payable: false,
172
+ stateMutability: "view",
173
+ type: "function",
174
+ },
175
+ {
176
+ constant: true,
177
+ inputs: [],
178
+ name: "decimals",
179
+ outputs: [
180
+ {
181
+ internalType: "uint8",
182
+ name: "",
183
+ type: "uint8",
184
+ },
185
+ ],
186
+ payable: false,
187
+ stateMutability: "view",
188
+ type: "function",
189
+ },
190
+ {
191
+ constant: true,
192
+ inputs: [],
193
+ name: "name",
194
+ outputs: [
195
+ {
196
+ internalType: "string",
197
+ name: "",
198
+ type: "string",
199
+ },
200
+ ],
201
+ payable: false,
202
+ stateMutability: "view",
203
+ type: "function",
204
+ },
205
+ {
206
+ constant: true,
207
+ inputs: [
208
+ {
209
+ internalType: "address",
210
+ name: "",
211
+ type: "address",
212
+ },
213
+ ],
214
+ name: "nonces",
215
+ outputs: [
216
+ {
217
+ internalType: "uint256",
218
+ name: "",
219
+ type: "uint256",
220
+ },
221
+ ],
222
+ payable: false,
223
+ stateMutability: "view",
224
+ type: "function",
225
+ },
226
+ {
227
+ constant: false,
228
+ inputs: [
229
+ {
230
+ internalType: "address",
231
+ name: "owner",
232
+ type: "address",
233
+ },
234
+ {
235
+ internalType: "address",
236
+ name: "spender",
237
+ type: "address",
238
+ },
239
+ {
240
+ internalType: "uint256",
241
+ name: "value",
242
+ type: "uint256",
243
+ },
244
+ {
245
+ internalType: "uint256",
246
+ name: "deadline",
247
+ type: "uint256",
248
+ },
249
+ {
250
+ internalType: "uint8",
251
+ name: "v",
252
+ type: "uint8",
253
+ },
254
+ {
255
+ internalType: "bytes32",
256
+ name: "r",
257
+ type: "bytes32",
258
+ },
259
+ {
260
+ internalType: "bytes32",
261
+ name: "s",
262
+ type: "bytes32",
263
+ },
264
+ ],
265
+ name: "permit",
266
+ outputs: [],
267
+ payable: false,
268
+ stateMutability: "nonpayable",
269
+ type: "function",
270
+ },
271
+ {
272
+ constant: true,
273
+ inputs: [],
274
+ name: "symbol",
275
+ outputs: [
276
+ {
277
+ internalType: "string",
278
+ name: "",
279
+ type: "string",
280
+ },
281
+ ],
282
+ payable: false,
283
+ stateMutability: "view",
284
+ type: "function",
285
+ },
286
+ {
287
+ constant: true,
288
+ inputs: [],
289
+ name: "totalSupply",
290
+ outputs: [
291
+ {
292
+ internalType: "uint256",
293
+ name: "",
294
+ type: "uint256",
295
+ },
296
+ ],
297
+ payable: false,
298
+ stateMutability: "view",
299
+ type: "function",
300
+ },
301
+ {
302
+ constant: false,
303
+ inputs: [
304
+ {
305
+ internalType: "address",
306
+ name: "to",
307
+ type: "address",
308
+ },
309
+ {
310
+ internalType: "uint256",
311
+ name: "value",
312
+ type: "uint256",
313
+ },
314
+ ],
315
+ name: "transfer",
316
+ outputs: [
317
+ {
318
+ internalType: "bool",
319
+ name: "",
320
+ type: "bool",
321
+ },
322
+ ],
323
+ payable: false,
324
+ stateMutability: "nonpayable",
325
+ type: "function",
326
+ },
327
+ {
328
+ constant: false,
329
+ inputs: [
330
+ {
331
+ internalType: "address",
332
+ name: "from",
333
+ type: "address",
334
+ },
335
+ {
336
+ internalType: "address",
337
+ name: "to",
338
+ type: "address",
339
+ },
340
+ {
341
+ internalType: "uint256",
342
+ name: "value",
343
+ type: "uint256",
344
+ },
345
+ ],
346
+ name: "transferFrom",
347
+ outputs: [
348
+ {
349
+ internalType: "bool",
350
+ name: "",
351
+ type: "bool",
352
+ },
353
+ ],
354
+ payable: false,
355
+ stateMutability: "nonpayable",
356
+ type: "function",
357
+ },
358
+ ];
359
+
360
+ export class Erc20__factory {
361
+ static readonly abi = _abi;
362
+ static createInterface(): Erc20Interface {
363
+ return new utils.Interface(_abi) as Erc20Interface;
364
+ }
365
+ static connect(address: string, signerOrProvider: Signer | Provider): Erc20 {
366
+ return new Contract(address, _abi, signerOrProvider) as Erc20;
367
+ }
368
+ }