@instadapp/interop-x 0.0.0-dev.d71f27e → 0.0.0-dev.e33810b

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.
@@ -51,45 +51,71 @@ export declare namespace InteropXContractBeta {
51
51
  supply: InteropXContractBeta.TokenInfoStructOutput[];
52
52
  withdraw: InteropXContractBeta.TokenInfoStructOutput[];
53
53
  };
54
+
55
+ export type UserDataStruct = {
56
+ deposit: BigNumberish;
57
+ withdraw: BigNumberish;
58
+ };
59
+
60
+ export type UserDataStructOutput = [BigNumber, BigNumber] & {
61
+ deposit: BigNumber;
62
+ withdraw: BigNumber;
63
+ };
54
64
  }
55
65
 
56
66
  export interface InteropXContractInterface extends utils.Interface {
57
67
  functions: {
58
- "_vnonce()": FunctionFragment;
59
- "completeBridge(address,address,address,uint256,uint32,bytes32,bytes)": FunctionFragment;
60
- "requestWithdraw(address,address,uint256,uint32,bytes)": FunctionFragment;
61
- "whitelistedMapping(address)": FunctionFragment;
62
- "withdrawRequested(address,address,address,uint256,uint32,bytes32,bytes)": FunctionFragment;
68
+ "completeBridge(string,address,address,address,uint256,uint32,bytes32,bytes)": FunctionFragment;
69
+ "getBridgeAmounts(address,address[])": FunctionFragment;
70
+ "requestWithdraw(string,address,address,uint256,uint32,bytes)": FunctionFragment;
71
+ "toggleWhitelist(address,bool)": FunctionFragment;
72
+ "userMapping(address,address)": FunctionFragment;
73
+ "whitelistedTokens(address)": FunctionFragment;
74
+ "withdrawRequested(string,address,address,address,uint256,uint32,bytes32,bytes)": FunctionFragment;
63
75
  };
64
76
 
65
77
  getFunction(
66
78
  nameOrSignatureOrTopic:
67
- | "_vnonce"
68
79
  | "completeBridge"
80
+ | "getBridgeAmounts"
69
81
  | "requestWithdraw"
70
- | "whitelistedMapping"
82
+ | "toggleWhitelist"
83
+ | "userMapping"
84
+ | "whitelistedTokens"
71
85
  | "withdrawRequested"
72
86
  ): FunctionFragment;
73
87
 
74
- encodeFunctionData(functionFragment: "_vnonce", values?: undefined): string;
75
88
  encodeFunctionData(
76
89
  functionFragment: "completeBridge",
77
90
  values: [
78
91
  string,
79
92
  string,
80
93
  string,
94
+ string,
81
95
  BigNumberish,
82
96
  BigNumberish,
83
97
  BytesLike,
84
98
  BytesLike
85
99
  ]
86
100
  ): string;
101
+ encodeFunctionData(
102
+ functionFragment: "getBridgeAmounts",
103
+ values: [string, string[]]
104
+ ): string;
87
105
  encodeFunctionData(
88
106
  functionFragment: "requestWithdraw",
89
- values: [string, string, BigNumberish, BigNumberish, BytesLike]
107
+ values: [string, string, string, BigNumberish, BigNumberish, BytesLike]
108
+ ): string;
109
+ encodeFunctionData(
110
+ functionFragment: "toggleWhitelist",
111
+ values: [string, boolean]
112
+ ): string;
113
+ encodeFunctionData(
114
+ functionFragment: "userMapping",
115
+ values: [string, string]
90
116
  ): string;
91
117
  encodeFunctionData(
92
- functionFragment: "whitelistedMapping",
118
+ functionFragment: "whitelistedTokens",
93
119
  values: [string]
94
120
  ): string;
95
121
  encodeFunctionData(
@@ -98,6 +124,7 @@ export interface InteropXContractInterface extends utils.Interface {
98
124
  string,
99
125
  string,
100
126
  string,
127
+ string,
101
128
  BigNumberish,
102
129
  BigNumberish,
103
130
  BytesLike,
@@ -105,17 +132,28 @@ export interface InteropXContractInterface extends utils.Interface {
105
132
  ]
106
133
  ): string;
107
134
 
108
- decodeFunctionResult(functionFragment: "_vnonce", data: BytesLike): Result;
109
135
  decodeFunctionResult(
110
136
  functionFragment: "completeBridge",
111
137
  data: BytesLike
112
138
  ): Result;
139
+ decodeFunctionResult(
140
+ functionFragment: "getBridgeAmounts",
141
+ data: BytesLike
142
+ ): Result;
113
143
  decodeFunctionResult(
114
144
  functionFragment: "requestWithdraw",
115
145
  data: BytesLike
116
146
  ): Result;
117
147
  decodeFunctionResult(
118
- functionFragment: "whitelistedMapping",
148
+ functionFragment: "toggleWhitelist",
149
+ data: BytesLike
150
+ ): Result;
151
+ decodeFunctionResult(
152
+ functionFragment: "userMapping",
153
+ data: BytesLike
154
+ ): Result;
155
+ decodeFunctionResult(
156
+ functionFragment: "whitelistedTokens",
119
157
  data: BytesLike
120
158
  ): Result;
121
159
  decodeFunctionResult(
@@ -124,10 +162,10 @@ export interface InteropXContractInterface extends utils.Interface {
124
162
  ): Result;
125
163
 
126
164
  events: {
127
- "LogBridgeCommitted(address,tuple,uint32,uint32,bytes32,bytes)": EventFragment;
128
- "LogBridgeCompleted(address,tuple,uint256,uint256,bytes32,bytes32,bytes)": EventFragment;
129
- "LogBridgeRequest(address,tuple,uint256,uint256,bytes)": EventFragment;
130
- "LogBridgeRequestSent(address,tuple,uint32,uint32,bytes32,bytes)": EventFragment;
165
+ "LogBridgeCommitted(string,address,tuple,uint32,uint32,bytes32,bytes)": EventFragment;
166
+ "LogBridgeCompleted(string,address,tuple,uint256,uint256,bytes32,bytes32,bytes)": EventFragment;
167
+ "LogBridgeRequest(string,address,tuple,uint256,uint256,bytes)": EventFragment;
168
+ "LogBridgeRequestSent(string,address,tuple,uint32,uint32,bytes32,bytes)": EventFragment;
131
169
  };
132
170
 
133
171
  getEvent(nameOrSignatureOrTopic: "LogBridgeCommitted"): EventFragment;
@@ -137,6 +175,7 @@ export interface InteropXContractInterface extends utils.Interface {
137
175
  }
138
176
 
139
177
  export interface LogBridgeCommittedEventObject {
178
+ actionId: string;
140
179
  bridger: string;
141
180
  position: InteropXContractBeta.PositionStructOutput;
142
181
  sourceChainId: number;
@@ -146,6 +185,7 @@ export interface LogBridgeCommittedEventObject {
146
185
  }
147
186
  export type LogBridgeCommittedEvent = TypedEvent<
148
187
  [
188
+ string,
149
189
  string,
150
190
  InteropXContractBeta.PositionStructOutput,
151
191
  number,
@@ -160,6 +200,7 @@ export type LogBridgeCommittedEventFilter =
160
200
  TypedEventFilter<LogBridgeCommittedEvent>;
161
201
 
162
202
  export interface LogBridgeCompletedEventObject {
203
+ actionId: string;
163
204
  bridger: string;
164
205
  position: InteropXContractBeta.PositionStructOutput;
165
206
  sourceChainId: BigNumber;
@@ -170,6 +211,7 @@ export interface LogBridgeCompletedEventObject {
170
211
  }
171
212
  export type LogBridgeCompletedEvent = TypedEvent<
172
213
  [
214
+ string,
173
215
  string,
174
216
  InteropXContractBeta.PositionStructOutput,
175
217
  BigNumber,
@@ -185,6 +227,7 @@ export type LogBridgeCompletedEventFilter =
185
227
  TypedEventFilter<LogBridgeCompletedEvent>;
186
228
 
187
229
  export interface LogBridgeRequestEventObject {
230
+ actionId: string;
188
231
  bridger: string;
189
232
  position: InteropXContractBeta.PositionStructOutput;
190
233
  sourceChainId: BigNumber;
@@ -193,6 +236,7 @@ export interface LogBridgeRequestEventObject {
193
236
  }
194
237
  export type LogBridgeRequestEvent = TypedEvent<
195
238
  [
239
+ string,
196
240
  string,
197
241
  InteropXContractBeta.PositionStructOutput,
198
242
  BigNumber,
@@ -206,6 +250,7 @@ export type LogBridgeRequestEventFilter =
206
250
  TypedEventFilter<LogBridgeRequestEvent>;
207
251
 
208
252
  export interface LogBridgeRequestSentEventObject {
253
+ actionId: string;
209
254
  bridger: string;
210
255
  position: InteropXContractBeta.PositionStructOutput;
211
256
  sourceChainId: number;
@@ -215,6 +260,7 @@ export interface LogBridgeRequestSentEventObject {
215
260
  }
216
261
  export type LogBridgeRequestSentEvent = TypedEvent<
217
262
  [
263
+ string,
218
264
  string,
219
265
  InteropXContractBeta.PositionStructOutput,
220
266
  number,
@@ -255,20 +301,30 @@ export interface InteropXContract extends BaseContract {
255
301
  removeListener: OnEvent<this>;
256
302
 
257
303
  functions: {
258
- _vnonce(overrides?: CallOverrides): Promise<[BigNumber]>;
259
-
260
304
  completeBridge(
305
+ actionId: string,
261
306
  to_: string,
262
307
  sourceToken_: string,
263
308
  targetToken_: string,
264
309
  amount_: BigNumberish,
265
- targetChainId_: BigNumberish,
310
+ sourceChainId_: BigNumberish,
266
311
  transactionHash_: BytesLike,
267
312
  metadata_: BytesLike,
268
313
  overrides?: Overrides & { from?: string | Promise<string> }
269
314
  ): Promise<ContractTransaction>;
270
315
 
316
+ getBridgeAmounts(
317
+ user: string,
318
+ tokens: string[],
319
+ overrides?: CallOverrides
320
+ ): Promise<
321
+ [InteropXContractBeta.UserDataStructOutput[]] & {
322
+ userData: InteropXContractBeta.UserDataStructOutput[];
323
+ }
324
+ >;
325
+
271
326
  requestWithdraw(
327
+ actionId: string,
272
328
  sourceToken_: string,
273
329
  targetToken_: string,
274
330
  amount_: BigNumberish,
@@ -277,12 +333,27 @@ export interface InteropXContract extends BaseContract {
277
333
  overrides?: Overrides & { from?: string | Promise<string> }
278
334
  ): Promise<ContractTransaction>;
279
335
 
280
- whitelistedMapping(
336
+ toggleWhitelist(
337
+ token: string,
338
+ toggle: boolean,
339
+ overrides?: Overrides & { from?: string | Promise<string> }
340
+ ): Promise<ContractTransaction>;
341
+
342
+ userMapping(
343
+ arg0: string,
344
+ arg1: string,
345
+ overrides?: CallOverrides
346
+ ): Promise<
347
+ [BigNumber, BigNumber] & { deposit: BigNumber; withdraw: BigNumber }
348
+ >;
349
+
350
+ whitelistedTokens(
281
351
  arg0: string,
282
352
  overrides?: CallOverrides
283
- ): Promise<[BigNumber]>;
353
+ ): Promise<[boolean]>;
284
354
 
285
355
  withdrawRequested(
356
+ actionId: string,
286
357
  user_: string,
287
358
  sourceToken_: string,
288
359
  targetToken_: string,
@@ -294,20 +365,26 @@ export interface InteropXContract extends BaseContract {
294
365
  ): Promise<ContractTransaction>;
295
366
  };
296
367
 
297
- _vnonce(overrides?: CallOverrides): Promise<BigNumber>;
298
-
299
368
  completeBridge(
369
+ actionId: string,
300
370
  to_: string,
301
371
  sourceToken_: string,
302
372
  targetToken_: string,
303
373
  amount_: BigNumberish,
304
- targetChainId_: BigNumberish,
374
+ sourceChainId_: BigNumberish,
305
375
  transactionHash_: BytesLike,
306
376
  metadata_: BytesLike,
307
377
  overrides?: Overrides & { from?: string | Promise<string> }
308
378
  ): Promise<ContractTransaction>;
309
379
 
380
+ getBridgeAmounts(
381
+ user: string,
382
+ tokens: string[],
383
+ overrides?: CallOverrides
384
+ ): Promise<InteropXContractBeta.UserDataStructOutput[]>;
385
+
310
386
  requestWithdraw(
387
+ actionId: string,
311
388
  sourceToken_: string,
312
389
  targetToken_: string,
313
390
  amount_: BigNumberish,
@@ -316,12 +393,24 @@ export interface InteropXContract extends BaseContract {
316
393
  overrides?: Overrides & { from?: string | Promise<string> }
317
394
  ): Promise<ContractTransaction>;
318
395
 
319
- whitelistedMapping(
396
+ toggleWhitelist(
397
+ token: string,
398
+ toggle: boolean,
399
+ overrides?: Overrides & { from?: string | Promise<string> }
400
+ ): Promise<ContractTransaction>;
401
+
402
+ userMapping(
320
403
  arg0: string,
404
+ arg1: string,
321
405
  overrides?: CallOverrides
322
- ): Promise<BigNumber>;
406
+ ): Promise<
407
+ [BigNumber, BigNumber] & { deposit: BigNumber; withdraw: BigNumber }
408
+ >;
409
+
410
+ whitelistedTokens(arg0: string, overrides?: CallOverrides): Promise<boolean>;
323
411
 
324
412
  withdrawRequested(
413
+ actionId: string,
325
414
  user_: string,
326
415
  sourceToken_: string,
327
416
  targetToken_: string,
@@ -333,20 +422,26 @@ export interface InteropXContract extends BaseContract {
333
422
  ): Promise<ContractTransaction>;
334
423
 
335
424
  callStatic: {
336
- _vnonce(overrides?: CallOverrides): Promise<BigNumber>;
337
-
338
425
  completeBridge(
426
+ actionId: string,
339
427
  to_: string,
340
428
  sourceToken_: string,
341
429
  targetToken_: string,
342
430
  amount_: BigNumberish,
343
- targetChainId_: BigNumberish,
431
+ sourceChainId_: BigNumberish,
344
432
  transactionHash_: BytesLike,
345
433
  metadata_: BytesLike,
346
434
  overrides?: CallOverrides
347
435
  ): Promise<void>;
348
436
 
437
+ getBridgeAmounts(
438
+ user: string,
439
+ tokens: string[],
440
+ overrides?: CallOverrides
441
+ ): Promise<InteropXContractBeta.UserDataStructOutput[]>;
442
+
349
443
  requestWithdraw(
444
+ actionId: string,
350
445
  sourceToken_: string,
351
446
  targetToken_: string,
352
447
  amount_: BigNumberish,
@@ -355,12 +450,27 @@ export interface InteropXContract extends BaseContract {
355
450
  overrides?: CallOverrides
356
451
  ): Promise<void>;
357
452
 
358
- whitelistedMapping(
453
+ toggleWhitelist(
454
+ token: string,
455
+ toggle: boolean,
456
+ overrides?: CallOverrides
457
+ ): Promise<void>;
458
+
459
+ userMapping(
359
460
  arg0: string,
461
+ arg1: string,
360
462
  overrides?: CallOverrides
361
- ): Promise<BigNumber>;
463
+ ): Promise<
464
+ [BigNumber, BigNumber] & { deposit: BigNumber; withdraw: BigNumber }
465
+ >;
466
+
467
+ whitelistedTokens(
468
+ arg0: string,
469
+ overrides?: CallOverrides
470
+ ): Promise<boolean>;
362
471
 
363
472
  withdrawRequested(
473
+ actionId: string,
364
474
  user_: string,
365
475
  sourceToken_: string,
366
476
  targetToken_: string,
@@ -373,7 +483,8 @@ export interface InteropXContract extends BaseContract {
373
483
  };
374
484
 
375
485
  filters: {
376
- "LogBridgeCommitted(address,tuple,uint32,uint32,bytes32,bytes)"(
486
+ "LogBridgeCommitted(string,address,tuple,uint32,uint32,bytes32,bytes)"(
487
+ actionId?: null,
377
488
  bridger?: string | null,
378
489
  position?: null,
379
490
  sourceChainId?: BigNumberish | null,
@@ -382,6 +493,7 @@ export interface InteropXContract extends BaseContract {
382
493
  metadata?: null
383
494
  ): LogBridgeCommittedEventFilter;
384
495
  LogBridgeCommitted(
496
+ actionId?: null,
385
497
  bridger?: string | null,
386
498
  position?: null,
387
499
  sourceChainId?: BigNumberish | null,
@@ -390,7 +502,8 @@ export interface InteropXContract extends BaseContract {
390
502
  metadata?: null
391
503
  ): LogBridgeCommittedEventFilter;
392
504
 
393
- "LogBridgeCompleted(address,tuple,uint256,uint256,bytes32,bytes32,bytes)"(
505
+ "LogBridgeCompleted(string,address,tuple,uint256,uint256,bytes32,bytes32,bytes)"(
506
+ actionId?: null,
394
507
  bridger?: string | null,
395
508
  position?: null,
396
509
  sourceChainId?: null,
@@ -400,6 +513,7 @@ export interface InteropXContract extends BaseContract {
400
513
  metadata?: null
401
514
  ): LogBridgeCompletedEventFilter;
402
515
  LogBridgeCompleted(
516
+ actionId?: null,
403
517
  bridger?: string | null,
404
518
  position?: null,
405
519
  sourceChainId?: null,
@@ -409,7 +523,8 @@ export interface InteropXContract extends BaseContract {
409
523
  metadata?: null
410
524
  ): LogBridgeCompletedEventFilter;
411
525
 
412
- "LogBridgeRequest(address,tuple,uint256,uint256,bytes)"(
526
+ "LogBridgeRequest(string,address,tuple,uint256,uint256,bytes)"(
527
+ actionId?: null,
413
528
  bridger?: string | null,
414
529
  position?: null,
415
530
  sourceChainId?: null,
@@ -417,6 +532,7 @@ export interface InteropXContract extends BaseContract {
417
532
  metadata?: null
418
533
  ): LogBridgeRequestEventFilter;
419
534
  LogBridgeRequest(
535
+ actionId?: null,
420
536
  bridger?: string | null,
421
537
  position?: null,
422
538
  sourceChainId?: null,
@@ -424,7 +540,8 @@ export interface InteropXContract extends BaseContract {
424
540
  metadata?: null
425
541
  ): LogBridgeRequestEventFilter;
426
542
 
427
- "LogBridgeRequestSent(address,tuple,uint32,uint32,bytes32,bytes)"(
543
+ "LogBridgeRequestSent(string,address,tuple,uint32,uint32,bytes32,bytes)"(
544
+ actionId?: null,
428
545
  bridger?: string | null,
429
546
  position?: null,
430
547
  sourceChainId?: null,
@@ -433,6 +550,7 @@ export interface InteropXContract extends BaseContract {
433
550
  metadata?: null
434
551
  ): LogBridgeRequestSentEventFilter;
435
552
  LogBridgeRequestSent(
553
+ actionId?: null,
436
554
  bridger?: string | null,
437
555
  position?: null,
438
556
  sourceChainId?: null,
@@ -443,20 +561,26 @@ export interface InteropXContract extends BaseContract {
443
561
  };
444
562
 
445
563
  estimateGas: {
446
- _vnonce(overrides?: CallOverrides): Promise<BigNumber>;
447
-
448
564
  completeBridge(
565
+ actionId: string,
449
566
  to_: string,
450
567
  sourceToken_: string,
451
568
  targetToken_: string,
452
569
  amount_: BigNumberish,
453
- targetChainId_: BigNumberish,
570
+ sourceChainId_: BigNumberish,
454
571
  transactionHash_: BytesLike,
455
572
  metadata_: BytesLike,
456
573
  overrides?: Overrides & { from?: string | Promise<string> }
457
574
  ): Promise<BigNumber>;
458
575
 
576
+ getBridgeAmounts(
577
+ user: string,
578
+ tokens: string[],
579
+ overrides?: CallOverrides
580
+ ): Promise<BigNumber>;
581
+
459
582
  requestWithdraw(
583
+ actionId: string,
460
584
  sourceToken_: string,
461
585
  targetToken_: string,
462
586
  amount_: BigNumberish,
@@ -465,12 +589,25 @@ export interface InteropXContract extends BaseContract {
465
589
  overrides?: Overrides & { from?: string | Promise<string> }
466
590
  ): Promise<BigNumber>;
467
591
 
468
- whitelistedMapping(
592
+ toggleWhitelist(
593
+ token: string,
594
+ toggle: boolean,
595
+ overrides?: Overrides & { from?: string | Promise<string> }
596
+ ): Promise<BigNumber>;
597
+
598
+ userMapping(
599
+ arg0: string,
600
+ arg1: string,
601
+ overrides?: CallOverrides
602
+ ): Promise<BigNumber>;
603
+
604
+ whitelistedTokens(
469
605
  arg0: string,
470
606
  overrides?: CallOverrides
471
607
  ): Promise<BigNumber>;
472
608
 
473
609
  withdrawRequested(
610
+ actionId: string,
474
611
  user_: string,
475
612
  sourceToken_: string,
476
613
  targetToken_: string,
@@ -483,20 +620,26 @@ export interface InteropXContract extends BaseContract {
483
620
  };
484
621
 
485
622
  populateTransaction: {
486
- _vnonce(overrides?: CallOverrides): Promise<PopulatedTransaction>;
487
-
488
623
  completeBridge(
624
+ actionId: string,
489
625
  to_: string,
490
626
  sourceToken_: string,
491
627
  targetToken_: string,
492
628
  amount_: BigNumberish,
493
- targetChainId_: BigNumberish,
629
+ sourceChainId_: BigNumberish,
494
630
  transactionHash_: BytesLike,
495
631
  metadata_: BytesLike,
496
632
  overrides?: Overrides & { from?: string | Promise<string> }
497
633
  ): Promise<PopulatedTransaction>;
498
634
 
635
+ getBridgeAmounts(
636
+ user: string,
637
+ tokens: string[],
638
+ overrides?: CallOverrides
639
+ ): Promise<PopulatedTransaction>;
640
+
499
641
  requestWithdraw(
642
+ actionId: string,
500
643
  sourceToken_: string,
501
644
  targetToken_: string,
502
645
  amount_: BigNumberish,
@@ -505,12 +648,25 @@ export interface InteropXContract extends BaseContract {
505
648
  overrides?: Overrides & { from?: string | Promise<string> }
506
649
  ): Promise<PopulatedTransaction>;
507
650
 
508
- whitelistedMapping(
651
+ toggleWhitelist(
652
+ token: string,
653
+ toggle: boolean,
654
+ overrides?: Overrides & { from?: string | Promise<string> }
655
+ ): Promise<PopulatedTransaction>;
656
+
657
+ userMapping(
658
+ arg0: string,
659
+ arg1: string,
660
+ overrides?: CallOverrides
661
+ ): Promise<PopulatedTransaction>;
662
+
663
+ whitelistedTokens(
509
664
  arg0: string,
510
665
  overrides?: CallOverrides
511
666
  ): Promise<PopulatedTransaction>;
512
667
 
513
668
  withdrawRequested(
669
+ actionId: string,
514
670
  user_: string,
515
671
  sourceToken_: string,
516
672
  targetToken_: string,