@instadapp/interop-x 0.0.0-dev.285d847 → 0.0.0-dev.28f049d

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.
Files changed (78) hide show
  1. package/dist/package.json +5 -4
  2. package/dist/src/abi/index.js +2 -4
  3. package/dist/src/abi/interopXContract.json +391 -0
  4. package/dist/src/alias.js +10 -0
  5. package/dist/src/api/index.js +6 -3
  6. package/dist/src/config/index.js +10 -1
  7. package/dist/src/constants/addresses.js +3 -3
  8. package/dist/src/constants/index.js +0 -1
  9. package/dist/src/db/models/transaction.js +27 -9
  10. package/dist/src/gnosis/actions/index.js +9 -0
  11. package/dist/src/gnosis/actions/withdraw/index.js +41 -0
  12. package/dist/src/gnosis/index.js +20 -0
  13. package/dist/src/index.js +38 -23
  14. package/dist/src/net/peer/index.js +2 -1
  15. package/dist/src/net/pool/index.js +7 -2
  16. package/dist/src/net/protocol/dial/SignatureDialProtocol.js +3 -8
  17. package/dist/src/net/protocol/dial/TransactionStatusDialProtocol.js +30 -0
  18. package/dist/src/net/protocol/index.js +26 -5
  19. package/dist/src/tasks/AutoUpdateTask.js +42 -16
  20. package/dist/src/tasks/BaseTask.js +11 -3
  21. package/dist/src/tasks/{InteropXGateway/ProcessDepositEvents.js → InteropXContract/ProcessBridgeRequestEvents.js} +42 -46
  22. package/dist/src/tasks/InteropXContract/SyncBridgeRequestEvents.js +78 -0
  23. package/dist/src/tasks/Transactions/SyncTransactionStatusTask.js +55 -0
  24. package/dist/src/tasks/index.js +8 -17
  25. package/dist/src/typechain/{InteropBridgeToken.js → InteropXContract.js} +0 -0
  26. package/dist/src/typechain/factories/InteropXContract__factory.js +526 -0
  27. package/dist/src/typechain/factories/index.js +3 -5
  28. package/dist/src/typechain/index.js +3 -5
  29. package/dist/src/utils/index.js +27 -87
  30. package/package.json +5 -4
  31. package/src/abi/index.ts +2 -4
  32. package/src/abi/interopXContract.json +391 -0
  33. package/src/alias.ts +6 -0
  34. package/src/api/index.ts +5 -2
  35. package/src/config/index.ts +9 -1
  36. package/src/constants/addresses.ts +3 -3
  37. package/src/constants/index.ts +0 -1
  38. package/src/db/models/transaction.ts +59 -21
  39. package/src/gnosis/actions/index.ts +5 -0
  40. package/src/gnosis/actions/withdraw/index.ts +56 -0
  41. package/src/gnosis/index.ts +19 -0
  42. package/src/index.ts +52 -25
  43. package/src/net/peer/index.ts +2 -1
  44. package/src/net/pool/index.ts +7 -3
  45. package/src/net/protocol/dial/SignatureDialProtocol.ts +5 -11
  46. package/src/net/protocol/dial/TransactionStatusDialProtocol.ts +33 -0
  47. package/src/net/protocol/index.ts +28 -6
  48. package/src/tasks/AutoUpdateTask.ts +48 -20
  49. package/src/tasks/BaseTask.ts +13 -3
  50. package/src/tasks/{InteropBridge/ProcessWithdrawEvents.ts → InteropXContract/ProcessBridgeRequestEvents.ts} +66 -91
  51. package/src/tasks/InteropXContract/SyncBridgeRequestEvents.ts +116 -0
  52. package/src/tasks/Transactions/SyncTransactionStatusTask.ts +67 -0
  53. package/src/tasks/index.ts +10 -18
  54. package/src/typechain/InteropXContract.ts +524 -0
  55. package/src/typechain/factories/InteropXContract__factory.ts +533 -0
  56. package/src/typechain/factories/index.ts +1 -2
  57. package/src/typechain/index.ts +2 -4
  58. package/src/utils/index.ts +61 -128
  59. package/tsconfig.json +7 -2
  60. package/dist/src/abi/interopBridgeToken.json +0 -286
  61. package/dist/src/abi/interopXGateway.json +0 -184
  62. package/dist/src/constants/itokens.js +0 -13
  63. package/dist/src/tasks/InteropBridge/ProcessWithdrawEvents.js +0 -147
  64. package/dist/src/tasks/InteropBridge/SyncWithdrawEvents.js +0 -70
  65. package/dist/src/tasks/InteropXGateway/SyncDepositEvents.js +0 -75
  66. package/dist/src/typechain/InteropXGateway.js +0 -2
  67. package/dist/src/typechain/factories/InteropBridgeToken__factory.js +0 -459
  68. package/dist/src/typechain/factories/InteropXGateway__factory.js +0 -265
  69. package/src/abi/interopBridgeToken.json +0 -286
  70. package/src/abi/interopXGateway.json +0 -184
  71. package/src/constants/itokens.ts +0 -10
  72. package/src/tasks/InteropBridge/SyncWithdrawEvents.ts +0 -121
  73. package/src/tasks/InteropXGateway/ProcessDepositEvents.ts +0 -245
  74. package/src/tasks/InteropXGateway/SyncDepositEvents.ts +0 -126
  75. package/src/typechain/InteropBridgeToken.ts +0 -686
  76. package/src/typechain/InteropXGateway.ts +0 -407
  77. package/src/typechain/factories/InteropBridgeToken__factory.ts +0 -466
  78. package/src/typechain/factories/InteropXGateway__factory.ts +0 -272
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const BaseTask_1 = require("../BaseTask");
7
+ const logger_1 = __importDefault(require("@/logger"));
8
+ const ethers_1 = require("ethers");
9
+ const abi_1 = __importDefault(require("@/abi"));
10
+ const db_1 = require("@/db");
11
+ const utils_1 = require("@/utils");
12
+ const constants_1 = require("@/constants");
13
+ const config_1 = __importDefault(require("@/config"));
14
+ class SyncBridgeRequestEvents extends BaseTask_1.BaseTask {
15
+ constructor({ chainId }) {
16
+ super({
17
+ logger: new logger_1.default("InteropXContract::SyncBridgeRequestEvents"),
18
+ });
19
+ this.chainId = chainId;
20
+ }
21
+ async pollHandler() {
22
+ const currentBlock = await this.provider.getBlockNumber();
23
+ const events = await this.contract.queryFilter(this.contract.filters.LogBridgeRequest(), currentBlock - 2000, currentBlock);
24
+ let processedEvents = 0;
25
+ for (const event of events) {
26
+ try {
27
+ if (!event.args) {
28
+ continue;
29
+ }
30
+ const { bridger, position, sourceChainId, targetChainId, metadata } = event.args;
31
+ const uniqueIdentifier = {
32
+ action: 'withdraw',
33
+ bridger,
34
+ requestTransactionHash: event.transactionHash,
35
+ sourceChainId: sourceChainId.toNumber(),
36
+ targetChainId: targetChainId.toNumber(),
37
+ };
38
+ let transactionHash = (0, utils_1.generateInteropTransactionHash)(uniqueIdentifier);
39
+ const transaction = await db_1.Transaction.findOne({ where: { transactionHash } });
40
+ if (transaction) {
41
+ return;
42
+ }
43
+ await db_1.Transaction.create(Object.assign(Object.assign({ transactionHash }, uniqueIdentifier), { position,
44
+ metadata, requestBlockNumber: event.blockNumber, requestEvent: {
45
+ bridger,
46
+ position: {
47
+ withdraw: position.withdraw.map((v) => ({
48
+ sourceToken: v.sourceToken,
49
+ targetToken: v.targetToken,
50
+ amount: v.amount.toString()
51
+ })),
52
+ supply: position.supply.map((v) => ({
53
+ sourceToken: v.sourceToken,
54
+ targetToken: v.targetToken,
55
+ amount: v.amount.toString()
56
+ })),
57
+ },
58
+ sourceChainId: sourceChainId.toNumber(),
59
+ targetChainId: targetChainId.toNumber(),
60
+ metadata,
61
+ } }));
62
+ this.logger.info(`New bridge request received: ${transactionHash} `);
63
+ }
64
+ catch (error) {
65
+ this.logger.error(error);
66
+ }
67
+ }
68
+ if (processedEvents > 0)
69
+ this.logger.info(`${processedEvents} events processed`);
70
+ }
71
+ async start() {
72
+ this.contractAddress = constants_1.addresses[this.chainId].interopXContract;
73
+ this.provider = new ethers_1.ethers.providers.JsonRpcProvider((0, utils_1.getRpcProviderUrl)(this.chainId));
74
+ this.contract = (0, utils_1.getContract)(this.contractAddress, abi_1.default.interopXContract, new ethers_1.ethers.Wallet(config_1.default.privateKey, this.provider));
75
+ await super.start();
76
+ }
77
+ }
78
+ exports.default = SyncBridgeRequestEvents;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const BaseTask_1 = require("../BaseTask");
7
+ const logger_1 = __importDefault(require("@/logger"));
8
+ const net_1 = require("@/net");
9
+ const db_1 = require("@/db");
10
+ const sequelize_1 = require("sequelize");
11
+ class SyncTransactionStatusTask extends BaseTask_1.BaseTask {
12
+ constructor() {
13
+ super({
14
+ logger: new logger_1.default("SyncTransactionStatusTask"),
15
+ });
16
+ this.pollIntervalMs = 60 * 1000;
17
+ this.exceptLeadNode = true;
18
+ }
19
+ async pollHandler() {
20
+ // if transaction is pending for more than 1 hour, check lead node for status
21
+ const leadNode = net_1.peerPool.getLeadPeer();
22
+ if (!leadNode) {
23
+ return;
24
+ }
25
+ const transaction = await db_1.Transaction.findOne({
26
+ where: {
27
+ status: 'pending',
28
+ sourceCreatedAt: {
29
+ [sequelize_1.Op.gte]: new Date(Date.now() - 60 * 60 * 1000),
30
+ },
31
+ }
32
+ });
33
+ if (!transaction) {
34
+ return;
35
+ }
36
+ this.logger.info(`Requesting transaction status for ${transaction.transactionHash}`);
37
+ const transactionStatus = await net_1.protocol.requestTransactionStatus(transaction.transactionHash, leadNode.id);
38
+ if (!transactionStatus) {
39
+ return;
40
+ }
41
+ this.logger.info(`Received transaction status for ${transaction.transactionHash}`);
42
+ transaction.sourceStatus = transactionStatus.sourceStatus;
43
+ transaction.sourceTransactionHash = transactionStatus.sourceTransactionHash;
44
+ transaction.sourceErrors = transactionStatus.sourceErrors;
45
+ transaction.sourceLogs = transactionStatus.sourceLogs;
46
+ transaction.targetStatus = transactionStatus.targetStatus;
47
+ transaction.targetTransactionHash = transactionStatus.targetTransactionHash;
48
+ transaction.targetErrors = transactionStatus.targetErrors;
49
+ transaction.targetLogs = transactionStatus.targetLogs;
50
+ transaction.status = transactionStatus.status;
51
+ await transaction.save();
52
+ this.logger.info(`Updated transaction status for ${transaction.transactionHash}`);
53
+ }
54
+ }
55
+ exports.default = SyncTransactionStatusTask;
@@ -4,28 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Tasks = void 0;
7
- const ProcessDepositEvents_1 = __importDefault(require("./InteropXGateway/ProcessDepositEvents"));
8
- const SyncDepositEvents_1 = __importDefault(require("./InteropXGateway/SyncDepositEvents"));
9
- const SyncWithdrawEvents_1 = __importDefault(require("./InteropBridge/SyncWithdrawEvents"));
10
- const ProcessWithdrawEvents_1 = __importDefault(require("./InteropBridge/ProcessWithdrawEvents"));
11
7
  const AutoUpdateTask_1 = __importDefault(require("./AutoUpdateTask"));
8
+ const SyncBridgeRequestEvents_1 = __importDefault(require("./InteropXContract/SyncBridgeRequestEvents"));
9
+ const ProcessBridgeRequestEvents_1 = __importDefault(require("./InteropXContract/ProcessBridgeRequestEvents"));
12
10
  class Tasks {
13
11
  constructor() {
14
12
  this.tasks = [
13
+ // new SyncTransactionStatusTask(),
15
14
  new AutoUpdateTask_1.default(),
16
- new SyncDepositEvents_1.default({
17
- chainId: 43114
18
- }),
19
- new ProcessDepositEvents_1.default({
20
- chainId: 43114
21
- }),
22
- new SyncWithdrawEvents_1.default({
23
- chainId: 137,
24
- itokenAddress: '0xEab02fe1F016eE3e4106c1C6aad35FeEe657268E',
25
- }),
26
- new ProcessWithdrawEvents_1.default({
27
- chainId: 137,
28
- })
15
+ // InteropXContract
16
+ new SyncBridgeRequestEvents_1.default({ chainId: 137 }),
17
+ new SyncBridgeRequestEvents_1.default({ chainId: 43114 }),
18
+ new ProcessBridgeRequestEvents_1.default({ chainId: 137 }),
19
+ new ProcessBridgeRequestEvents_1.default({ chainId: 43114 }),
29
20
  ];
30
21
  }
31
22
  async start() {
@@ -0,0 +1,526 @@
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.InteropXContract__factory = void 0;
7
+ const ethers_1 = require("ethers");
8
+ const _abi = [
9
+ {
10
+ anonymous: false,
11
+ inputs: [
12
+ {
13
+ indexed: true,
14
+ internalType: "address",
15
+ name: "bridger",
16
+ type: "address",
17
+ },
18
+ {
19
+ components: [
20
+ {
21
+ components: [
22
+ {
23
+ internalType: "address",
24
+ name: "sourceToken",
25
+ type: "address",
26
+ },
27
+ {
28
+ internalType: "address",
29
+ name: "targetToken",
30
+ type: "address",
31
+ },
32
+ {
33
+ internalType: "uint256",
34
+ name: "amount",
35
+ type: "uint256",
36
+ },
37
+ ],
38
+ internalType: "struct InteropXContractBeta.TokenInfo[]",
39
+ name: "supply",
40
+ type: "tuple[]",
41
+ },
42
+ {
43
+ components: [
44
+ {
45
+ internalType: "address",
46
+ name: "sourceToken",
47
+ type: "address",
48
+ },
49
+ {
50
+ internalType: "address",
51
+ name: "targetToken",
52
+ type: "address",
53
+ },
54
+ {
55
+ internalType: "uint256",
56
+ name: "amount",
57
+ type: "uint256",
58
+ },
59
+ ],
60
+ internalType: "struct InteropXContractBeta.TokenInfo[]",
61
+ name: "withdraw",
62
+ type: "tuple[]",
63
+ },
64
+ ],
65
+ indexed: false,
66
+ internalType: "struct InteropXContractBeta.Position",
67
+ name: "position",
68
+ type: "tuple",
69
+ },
70
+ {
71
+ indexed: true,
72
+ internalType: "uint32",
73
+ name: "sourceChainId",
74
+ type: "uint32",
75
+ },
76
+ {
77
+ indexed: false,
78
+ internalType: "uint32",
79
+ name: "targetChainId",
80
+ type: "uint32",
81
+ },
82
+ {
83
+ indexed: true,
84
+ internalType: "bytes32",
85
+ name: "requestTransactionHash",
86
+ type: "bytes32",
87
+ },
88
+ {
89
+ indexed: false,
90
+ internalType: "bytes",
91
+ name: "metadata",
92
+ type: "bytes",
93
+ },
94
+ ],
95
+ name: "LogBridgeCommitted",
96
+ type: "event",
97
+ },
98
+ {
99
+ anonymous: false,
100
+ inputs: [
101
+ {
102
+ indexed: true,
103
+ internalType: "address",
104
+ name: "bridger",
105
+ type: "address",
106
+ },
107
+ {
108
+ components: [
109
+ {
110
+ components: [
111
+ {
112
+ internalType: "address",
113
+ name: "sourceToken",
114
+ type: "address",
115
+ },
116
+ {
117
+ internalType: "address",
118
+ name: "targetToken",
119
+ type: "address",
120
+ },
121
+ {
122
+ internalType: "uint256",
123
+ name: "amount",
124
+ type: "uint256",
125
+ },
126
+ ],
127
+ internalType: "struct InteropXContractBeta.TokenInfo[]",
128
+ name: "supply",
129
+ type: "tuple[]",
130
+ },
131
+ {
132
+ components: [
133
+ {
134
+ internalType: "address",
135
+ name: "sourceToken",
136
+ type: "address",
137
+ },
138
+ {
139
+ internalType: "address",
140
+ name: "targetToken",
141
+ type: "address",
142
+ },
143
+ {
144
+ internalType: "uint256",
145
+ name: "amount",
146
+ type: "uint256",
147
+ },
148
+ ],
149
+ internalType: "struct InteropXContractBeta.TokenInfo[]",
150
+ name: "withdraw",
151
+ type: "tuple[]",
152
+ },
153
+ ],
154
+ indexed: false,
155
+ internalType: "struct InteropXContractBeta.Position",
156
+ name: "position",
157
+ type: "tuple",
158
+ },
159
+ {
160
+ indexed: false,
161
+ internalType: "uint256",
162
+ name: "sourceChainId",
163
+ type: "uint256",
164
+ },
165
+ {
166
+ indexed: true,
167
+ internalType: "uint256",
168
+ name: "targetChainId",
169
+ type: "uint256",
170
+ },
171
+ {
172
+ indexed: true,
173
+ internalType: "bytes32",
174
+ name: "requestTransactionHash",
175
+ type: "bytes32",
176
+ },
177
+ {
178
+ indexed: false,
179
+ internalType: "bytes32",
180
+ name: "targetCommittedTransactionHash",
181
+ type: "bytes32",
182
+ },
183
+ {
184
+ indexed: false,
185
+ internalType: "bytes",
186
+ name: "metadata",
187
+ type: "bytes",
188
+ },
189
+ ],
190
+ name: "LogBridgeCompleted",
191
+ type: "event",
192
+ },
193
+ {
194
+ anonymous: false,
195
+ inputs: [
196
+ {
197
+ indexed: true,
198
+ internalType: "address",
199
+ name: "bridger",
200
+ type: "address",
201
+ },
202
+ {
203
+ components: [
204
+ {
205
+ components: [
206
+ {
207
+ internalType: "address",
208
+ name: "sourceToken",
209
+ type: "address",
210
+ },
211
+ {
212
+ internalType: "address",
213
+ name: "targetToken",
214
+ type: "address",
215
+ },
216
+ {
217
+ internalType: "uint256",
218
+ name: "amount",
219
+ type: "uint256",
220
+ },
221
+ ],
222
+ internalType: "struct InteropXContractBeta.TokenInfo[]",
223
+ name: "supply",
224
+ type: "tuple[]",
225
+ },
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: "withdraw",
246
+ type: "tuple[]",
247
+ },
248
+ ],
249
+ indexed: false,
250
+ internalType: "struct InteropXContractBeta.Position",
251
+ name: "position",
252
+ type: "tuple",
253
+ },
254
+ {
255
+ indexed: false,
256
+ internalType: "uint256",
257
+ name: "sourceChainId",
258
+ type: "uint256",
259
+ },
260
+ {
261
+ indexed: true,
262
+ internalType: "uint256",
263
+ name: "targetChainId",
264
+ type: "uint256",
265
+ },
266
+ {
267
+ indexed: false,
268
+ internalType: "bytes",
269
+ name: "metadata",
270
+ type: "bytes",
271
+ },
272
+ ],
273
+ name: "LogBridgeRequest",
274
+ type: "event",
275
+ },
276
+ {
277
+ anonymous: false,
278
+ inputs: [
279
+ {
280
+ indexed: true,
281
+ internalType: "address",
282
+ name: "bridger",
283
+ type: "address",
284
+ },
285
+ {
286
+ components: [
287
+ {
288
+ components: [
289
+ {
290
+ internalType: "address",
291
+ name: "sourceToken",
292
+ type: "address",
293
+ },
294
+ {
295
+ internalType: "address",
296
+ name: "targetToken",
297
+ type: "address",
298
+ },
299
+ {
300
+ internalType: "uint256",
301
+ name: "amount",
302
+ type: "uint256",
303
+ },
304
+ ],
305
+ internalType: "struct InteropXContractBeta.TokenInfo[]",
306
+ name: "supply",
307
+ type: "tuple[]",
308
+ },
309
+ {
310
+ components: [
311
+ {
312
+ internalType: "address",
313
+ name: "sourceToken",
314
+ type: "address",
315
+ },
316
+ {
317
+ internalType: "address",
318
+ name: "targetToken",
319
+ type: "address",
320
+ },
321
+ {
322
+ internalType: "uint256",
323
+ name: "amount",
324
+ type: "uint256",
325
+ },
326
+ ],
327
+ internalType: "struct InteropXContractBeta.TokenInfo[]",
328
+ name: "withdraw",
329
+ type: "tuple[]",
330
+ },
331
+ ],
332
+ indexed: false,
333
+ internalType: "struct InteropXContractBeta.Position",
334
+ name: "position",
335
+ type: "tuple",
336
+ },
337
+ {
338
+ indexed: false,
339
+ internalType: "uint32",
340
+ name: "sourceChainId",
341
+ type: "uint32",
342
+ },
343
+ {
344
+ indexed: true,
345
+ internalType: "uint32",
346
+ name: "targetChainId",
347
+ type: "uint32",
348
+ },
349
+ {
350
+ indexed: true,
351
+ internalType: "bytes32",
352
+ name: "requestTransactionHash",
353
+ type: "bytes32",
354
+ },
355
+ {
356
+ indexed: false,
357
+ internalType: "bytes",
358
+ name: "metadata",
359
+ type: "bytes",
360
+ },
361
+ ],
362
+ name: "LogBridgeRequestSent",
363
+ type: "event",
364
+ },
365
+ {
366
+ inputs: [],
367
+ name: "_vnonce",
368
+ outputs: [
369
+ {
370
+ internalType: "uint256",
371
+ name: "",
372
+ type: "uint256",
373
+ },
374
+ ],
375
+ stateMutability: "view",
376
+ type: "function",
377
+ },
378
+ {
379
+ inputs: [
380
+ {
381
+ internalType: "address",
382
+ name: "to_",
383
+ type: "address",
384
+ },
385
+ {
386
+ internalType: "address",
387
+ name: "sourceToken_",
388
+ type: "address",
389
+ },
390
+ {
391
+ internalType: "address",
392
+ name: "targetToken_",
393
+ type: "address",
394
+ },
395
+ {
396
+ internalType: "uint256",
397
+ name: "amount_",
398
+ type: "uint256",
399
+ },
400
+ {
401
+ internalType: "uint32",
402
+ name: "targetChainId_",
403
+ type: "uint32",
404
+ },
405
+ {
406
+ internalType: "bytes32",
407
+ name: "transactionHash_",
408
+ type: "bytes32",
409
+ },
410
+ {
411
+ internalType: "bytes",
412
+ name: "metadata_",
413
+ type: "bytes",
414
+ },
415
+ ],
416
+ name: "completeBridge",
417
+ outputs: [],
418
+ stateMutability: "nonpayable",
419
+ type: "function",
420
+ },
421
+ {
422
+ inputs: [
423
+ {
424
+ internalType: "address",
425
+ name: "sourceToken_",
426
+ type: "address",
427
+ },
428
+ {
429
+ internalType: "address",
430
+ name: "targetToken_",
431
+ type: "address",
432
+ },
433
+ {
434
+ internalType: "uint256",
435
+ name: "amount_",
436
+ type: "uint256",
437
+ },
438
+ {
439
+ internalType: "uint32",
440
+ name: "targetChainId_",
441
+ type: "uint32",
442
+ },
443
+ {
444
+ internalType: "bytes",
445
+ name: "metadata_",
446
+ type: "bytes",
447
+ },
448
+ ],
449
+ name: "requestWithdraw",
450
+ outputs: [],
451
+ stateMutability: "nonpayable",
452
+ type: "function",
453
+ },
454
+ {
455
+ inputs: [
456
+ {
457
+ internalType: "address",
458
+ name: "",
459
+ type: "address",
460
+ },
461
+ ],
462
+ name: "whitelistedMapping",
463
+ outputs: [
464
+ {
465
+ internalType: "uint256",
466
+ name: "",
467
+ type: "uint256",
468
+ },
469
+ ],
470
+ stateMutability: "view",
471
+ type: "function",
472
+ },
473
+ {
474
+ inputs: [
475
+ {
476
+ internalType: "address",
477
+ name: "user_",
478
+ type: "address",
479
+ },
480
+ {
481
+ internalType: "address",
482
+ name: "sourceToken_",
483
+ type: "address",
484
+ },
485
+ {
486
+ internalType: "address",
487
+ name: "targetToken_",
488
+ type: "address",
489
+ },
490
+ {
491
+ internalType: "uint256",
492
+ name: "amount_",
493
+ type: "uint256",
494
+ },
495
+ {
496
+ internalType: "uint32",
497
+ name: "chainId_",
498
+ type: "uint32",
499
+ },
500
+ {
501
+ internalType: "bytes32",
502
+ name: "transactionHash_",
503
+ type: "bytes32",
504
+ },
505
+ {
506
+ internalType: "bytes",
507
+ name: "metadata_",
508
+ type: "bytes",
509
+ },
510
+ ],
511
+ name: "withdrawRequested",
512
+ outputs: [],
513
+ stateMutability: "nonpayable",
514
+ type: "function",
515
+ },
516
+ ];
517
+ class InteropXContract__factory {
518
+ static createInterface() {
519
+ return new ethers_1.utils.Interface(_abi);
520
+ }
521
+ static connect(address, signerOrProvider) {
522
+ return new ethers_1.Contract(address, _abi, signerOrProvider);
523
+ }
524
+ }
525
+ exports.InteropXContract__factory = InteropXContract__factory;
526
+ InteropXContract__factory.abi = _abi;