@lombard.finance/sdk 0.1.0

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 (68) hide show
  1. package/README.md +32 -0
  2. package/dist/index.js +12574 -0
  3. package/dist/index.js.map +1 -0
  4. package/package.json +55 -0
  5. package/src/btcSdk/utils/getOutputScript.ts +54 -0
  6. package/src/common/const.ts +3 -0
  7. package/src/common/types/internalTypes.ts +8 -0
  8. package/src/common/types/types.ts +13 -0
  9. package/src/common/utils/convertSatoshi.ts +21 -0
  10. package/src/common/utils/getErrorMessage.ts +35 -0
  11. package/src/common/utils/isValidChain.ts +5 -0
  12. package/src/index.ts +5 -0
  13. package/src/provider/Provider.ts +174 -0
  14. package/src/provider/ReadProvider.ts +120 -0
  15. package/src/provider/index.ts +2 -0
  16. package/src/provider/rpcUrlConfig.ts +8 -0
  17. package/src/provider/types.ts +58 -0
  18. package/src/provider/utils/getMaxPriorityFeePerGas.ts +25 -0
  19. package/src/sdk/apiConfig.ts +20 -0
  20. package/src/sdk/generateDepositBtcAddress/generateDepositBtcAddress.stories.tsx +52 -0
  21. package/src/sdk/generateDepositBtcAddress/generateDepositBtcAddress.ts +64 -0
  22. package/src/sdk/generateDepositBtcAddress/index.ts +1 -0
  23. package/src/sdk/getDepositBtcAddress/getDepositBtcAddress.stories.tsx +53 -0
  24. package/src/sdk/getDepositBtcAddress/getDepositBtcAddress.ts +101 -0
  25. package/src/sdk/getDepositBtcAddress/index.ts +1 -0
  26. package/src/sdk/getDepositsByAddress/getDepositsByAddress.stories.tsx +49 -0
  27. package/src/sdk/getDepositsByAddress/getDepositsByAddress.ts +146 -0
  28. package/src/sdk/getDepositsByAddress/index.ts +1 -0
  29. package/src/sdk/index.ts +3 -0
  30. package/src/sdk/internalTypes.ts +5 -0
  31. package/src/sdk/utils/getCainIdByName.ts +21 -0
  32. package/src/sdk/utils/getChainNameById.ts +17 -0
  33. package/src/stories/components/Button/Button.tsx +43 -0
  34. package/src/stories/components/Button/index.ts +1 -0
  35. package/src/stories/components/CodeBlock/CodeBlock.tsx +24 -0
  36. package/src/stories/components/CodeBlock/CodeBlockStyles.css +3 -0
  37. package/src/stories/components/CodeBlock/index.ts +1 -0
  38. package/src/stories/components/Spinner/Spinner.tsx +25 -0
  39. package/src/stories/components/Spinner/index.ts +1 -0
  40. package/src/stories/const.ts +1 -0
  41. package/src/stories/hooks/useConnect.ts +47 -0
  42. package/src/stories/hooks/useQuery.ts +56 -0
  43. package/src/stories/utils/connectInjectedWallet.ts +12 -0
  44. package/src/stories/utils/fromCamelCase.ts +16 -0
  45. package/src/stories/utils/getMetaTitle.ts +7 -0
  46. package/src/stories/utils/getWalletInfo.ts +31 -0
  47. package/src/vite-env.d.ts +1 -0
  48. package/src/web3Sdk/abi/IERC20.json +222 -0
  49. package/src/web3Sdk/abi/LBTC.json +1400 -0
  50. package/src/web3Sdk/abi/index.ts +4 -0
  51. package/src/web3Sdk/approveLBTC/approveLBTC.stories.tsx +77 -0
  52. package/src/web3Sdk/approveLBTC/approveLBTC.ts +48 -0
  53. package/src/web3Sdk/approveLBTC/index.ts +1 -0
  54. package/src/web3Sdk/claimLBTC/claimLBTC.stories.tsx +77 -0
  55. package/src/web3Sdk/claimLBTC/claimLBTC.ts +62 -0
  56. package/src/web3Sdk/claimLBTC/index.ts +1 -0
  57. package/src/web3Sdk/index.ts +4 -0
  58. package/src/web3Sdk/internalTypes.ts +19 -0
  59. package/src/web3Sdk/lbtcAddressConfig.ts +16 -0
  60. package/src/web3Sdk/signLbtcDestionationAddr/index.ts +1 -0
  61. package/src/web3Sdk/signLbtcDestionationAddr/signLbtcDestionationAddr.stories.tsx +97 -0
  62. package/src/web3Sdk/signLbtcDestionationAddr/signLbtcDestionationAddr.ts +25 -0
  63. package/src/web3Sdk/unstakeLBTC/index.ts +1 -0
  64. package/src/web3Sdk/unstakeLBTC/unstakeLBTC.stories.tsx +77 -0
  65. package/src/web3Sdk/unstakeLBTC/unstakeLBTC.ts +51 -0
  66. package/src/web3Sdk/utils/getGasMultiplier.ts +19 -0
  67. package/src/web3Sdk/utils/getLbtcTokenContract.ts +28 -0
  68. package/src/web3Sdk/utils/getTokenABI.ts +12 -0
@@ -0,0 +1,1400 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "stateMutability": "nonpayable",
5
+ "type": "constructor"
6
+ },
7
+ {
8
+ "inputs": [
9
+ {
10
+ "internalType": "address",
11
+ "name": "target",
12
+ "type": "address"
13
+ }
14
+ ],
15
+ "name": "AddressEmptyCode",
16
+ "type": "error"
17
+ },
18
+ {
19
+ "inputs": [
20
+ {
21
+ "internalType": "address",
22
+ "name": "account",
23
+ "type": "address"
24
+ }
25
+ ],
26
+ "name": "AddressInsufficientBalance",
27
+ "type": "error"
28
+ },
29
+ {
30
+ "inputs": [
31
+ {
32
+ "internalType": "uint256",
33
+ "name": "expected",
34
+ "type": "uint256"
35
+ },
36
+ {
37
+ "internalType": "uint256",
38
+ "name": "received",
39
+ "type": "uint256"
40
+ }
41
+ ],
42
+ "name": "BadChainId",
43
+ "type": "error"
44
+ },
45
+ {
46
+ "inputs": [],
47
+ "name": "BadCommission",
48
+ "type": "error"
49
+ },
50
+ {
51
+ "inputs": [],
52
+ "name": "BadFromToken",
53
+ "type": "error"
54
+ },
55
+ {
56
+ "inputs": [],
57
+ "name": "BadSignature",
58
+ "type": "error"
59
+ },
60
+ {
61
+ "inputs": [],
62
+ "name": "BadSignature",
63
+ "type": "error"
64
+ },
65
+ {
66
+ "inputs": [],
67
+ "name": "ECDSAInvalidSignature",
68
+ "type": "error"
69
+ },
70
+ {
71
+ "inputs": [
72
+ {
73
+ "internalType": "uint256",
74
+ "name": "length",
75
+ "type": "uint256"
76
+ }
77
+ ],
78
+ "name": "ECDSAInvalidSignatureLength",
79
+ "type": "error"
80
+ },
81
+ {
82
+ "inputs": [
83
+ {
84
+ "internalType": "bytes32",
85
+ "name": "s",
86
+ "type": "bytes32"
87
+ }
88
+ ],
89
+ "name": "ECDSAInvalidSignatureS",
90
+ "type": "error"
91
+ },
92
+ {
93
+ "inputs": [
94
+ {
95
+ "internalType": "address",
96
+ "name": "spender",
97
+ "type": "address"
98
+ },
99
+ {
100
+ "internalType": "uint256",
101
+ "name": "allowance",
102
+ "type": "uint256"
103
+ },
104
+ {
105
+ "internalType": "uint256",
106
+ "name": "needed",
107
+ "type": "uint256"
108
+ }
109
+ ],
110
+ "name": "ERC20InsufficientAllowance",
111
+ "type": "error"
112
+ },
113
+ {
114
+ "inputs": [
115
+ {
116
+ "internalType": "address",
117
+ "name": "sender",
118
+ "type": "address"
119
+ },
120
+ {
121
+ "internalType": "uint256",
122
+ "name": "balance",
123
+ "type": "uint256"
124
+ },
125
+ {
126
+ "internalType": "uint256",
127
+ "name": "needed",
128
+ "type": "uint256"
129
+ }
130
+ ],
131
+ "name": "ERC20InsufficientBalance",
132
+ "type": "error"
133
+ },
134
+ {
135
+ "inputs": [
136
+ {
137
+ "internalType": "address",
138
+ "name": "approver",
139
+ "type": "address"
140
+ }
141
+ ],
142
+ "name": "ERC20InvalidApprover",
143
+ "type": "error"
144
+ },
145
+ {
146
+ "inputs": [
147
+ {
148
+ "internalType": "address",
149
+ "name": "receiver",
150
+ "type": "address"
151
+ }
152
+ ],
153
+ "name": "ERC20InvalidReceiver",
154
+ "type": "error"
155
+ },
156
+ {
157
+ "inputs": [
158
+ {
159
+ "internalType": "address",
160
+ "name": "sender",
161
+ "type": "address"
162
+ }
163
+ ],
164
+ "name": "ERC20InvalidSender",
165
+ "type": "error"
166
+ },
167
+ {
168
+ "inputs": [
169
+ {
170
+ "internalType": "address",
171
+ "name": "spender",
172
+ "type": "address"
173
+ }
174
+ ],
175
+ "name": "ERC20InvalidSpender",
176
+ "type": "error"
177
+ },
178
+ {
179
+ "inputs": [],
180
+ "name": "EnforcedPause",
181
+ "type": "error"
182
+ },
183
+ {
184
+ "inputs": [],
185
+ "name": "EventFromUnknownContract",
186
+ "type": "error"
187
+ },
188
+ {
189
+ "inputs": [],
190
+ "name": "ExpectedPause",
191
+ "type": "error"
192
+ },
193
+ {
194
+ "inputs": [],
195
+ "name": "FailedInnerCall",
196
+ "type": "error"
197
+ },
198
+ {
199
+ "inputs": [],
200
+ "name": "InvalidContractAddress",
201
+ "type": "error"
202
+ },
203
+ {
204
+ "inputs": [],
205
+ "name": "InvalidInitialization",
206
+ "type": "error"
207
+ },
208
+ {
209
+ "inputs": [],
210
+ "name": "InvalidType",
211
+ "type": "error"
212
+ },
213
+ {
214
+ "inputs": [],
215
+ "name": "KnownDestination",
216
+ "type": "error"
217
+ },
218
+ {
219
+ "inputs": [],
220
+ "name": "MathOverflowedMulDiv",
221
+ "type": "error"
222
+ },
223
+ {
224
+ "inputs": [],
225
+ "name": "NotInitializing",
226
+ "type": "error"
227
+ },
228
+ {
229
+ "inputs": [
230
+ {
231
+ "internalType": "address",
232
+ "name": "owner",
233
+ "type": "address"
234
+ }
235
+ ],
236
+ "name": "OwnableInvalidOwner",
237
+ "type": "error"
238
+ },
239
+ {
240
+ "inputs": [
241
+ {
242
+ "internalType": "address",
243
+ "name": "account",
244
+ "type": "address"
245
+ }
246
+ ],
247
+ "name": "OwnableUnauthorizedAccount",
248
+ "type": "error"
249
+ },
250
+ {
251
+ "inputs": [],
252
+ "name": "ProofAlreadyUsed",
253
+ "type": "error"
254
+ },
255
+ {
256
+ "inputs": [],
257
+ "name": "ReentrancyGuardReentrantCall",
258
+ "type": "error"
259
+ },
260
+ {
261
+ "inputs": [
262
+ {
263
+ "internalType": "address",
264
+ "name": "token",
265
+ "type": "address"
266
+ }
267
+ ],
268
+ "name": "SafeERC20FailedOperation",
269
+ "type": "error"
270
+ },
271
+ {
272
+ "inputs": [],
273
+ "name": "ScriptPubkeyUnsupported",
274
+ "type": "error"
275
+ },
276
+ {
277
+ "inputs": [],
278
+ "name": "SignatureVerificationFailed",
279
+ "type": "error"
280
+ },
281
+ {
282
+ "inputs": [],
283
+ "name": "UnknownDestination",
284
+ "type": "error"
285
+ },
286
+ {
287
+ "inputs": [
288
+ {
289
+ "internalType": "uint8",
290
+ "name": "expected",
291
+ "type": "uint8"
292
+ },
293
+ {
294
+ "internalType": "uint8",
295
+ "name": "got",
296
+ "type": "uint8"
297
+ }
298
+ ],
299
+ "name": "WBTCDecimalsMissmatch",
300
+ "type": "error"
301
+ },
302
+ {
303
+ "inputs": [],
304
+ "name": "WBTCNotSet",
305
+ "type": "error"
306
+ },
307
+ {
308
+ "inputs": [],
309
+ "name": "WBTCStakingDisabled",
310
+ "type": "error"
311
+ },
312
+ {
313
+ "inputs": [],
314
+ "name": "WithdrawalsDisabled",
315
+ "type": "error"
316
+ },
317
+ {
318
+ "inputs": [],
319
+ "name": "WrongAddressEncoding",
320
+ "type": "error"
321
+ },
322
+ {
323
+ "inputs": [],
324
+ "name": "WrongChainIdEncoding",
325
+ "type": "error"
326
+ },
327
+ {
328
+ "inputs": [],
329
+ "name": "WrongDataLength",
330
+ "type": "error"
331
+ },
332
+ {
333
+ "inputs": [],
334
+ "name": "WrongTxIdEncoding",
335
+ "type": "error"
336
+ },
337
+ {
338
+ "inputs": [],
339
+ "name": "ZeroAddress",
340
+ "type": "error"
341
+ },
342
+ {
343
+ "inputs": [],
344
+ "name": "ZeroAmount",
345
+ "type": "error"
346
+ },
347
+ {
348
+ "anonymous": false,
349
+ "inputs": [
350
+ {
351
+ "indexed": true,
352
+ "internalType": "address",
353
+ "name": "owner",
354
+ "type": "address"
355
+ },
356
+ {
357
+ "indexed": true,
358
+ "internalType": "address",
359
+ "name": "spender",
360
+ "type": "address"
361
+ },
362
+ {
363
+ "indexed": false,
364
+ "internalType": "uint256",
365
+ "name": "value",
366
+ "type": "uint256"
367
+ }
368
+ ],
369
+ "name": "Approval",
370
+ "type": "event"
371
+ },
372
+ {
373
+ "anonymous": false,
374
+ "inputs": [
375
+ {
376
+ "indexed": true,
377
+ "internalType": "uint256",
378
+ "name": "toChain",
379
+ "type": "uint256"
380
+ },
381
+ {
382
+ "indexed": true,
383
+ "internalType": "address",
384
+ "name": "toToken",
385
+ "type": "address"
386
+ }
387
+ ],
388
+ "name": "BridgeDestinationAdded",
389
+ "type": "event"
390
+ },
391
+ {
392
+ "anonymous": false,
393
+ "inputs": [
394
+ {
395
+ "indexed": true,
396
+ "internalType": "uint256",
397
+ "name": "toChain",
398
+ "type": "uint256"
399
+ },
400
+ {
401
+ "indexed": true,
402
+ "internalType": "address",
403
+ "name": "toToken",
404
+ "type": "address"
405
+ }
406
+ ],
407
+ "name": "BridgeDestinationRemoved",
408
+ "type": "event"
409
+ },
410
+ {
411
+ "anonymous": false,
412
+ "inputs": [
413
+ {
414
+ "indexed": true,
415
+ "internalType": "address",
416
+ "name": "prevVal",
417
+ "type": "address"
418
+ },
419
+ {
420
+ "indexed": true,
421
+ "internalType": "address",
422
+ "name": "newVal",
423
+ "type": "address"
424
+ }
425
+ ],
426
+ "name": "ConsortiumChanged",
427
+ "type": "event"
428
+ },
429
+ {
430
+ "anonymous": false,
431
+ "inputs": [
432
+ {
433
+ "indexed": false,
434
+ "internalType": "uint16",
435
+ "name": "newValue",
436
+ "type": "uint16"
437
+ },
438
+ {
439
+ "indexed": false,
440
+ "internalType": "uint256",
441
+ "name": "toChain",
442
+ "type": "uint256"
443
+ }
444
+ ],
445
+ "name": "DepositCommissionChanged",
446
+ "type": "event"
447
+ },
448
+ {
449
+ "anonymous": false,
450
+ "inputs": [
451
+ {
452
+ "indexed": false,
453
+ "internalType": "uint256",
454
+ "name": "chainId",
455
+ "type": "uint256"
456
+ },
457
+ {
458
+ "indexed": false,
459
+ "internalType": "address",
460
+ "name": "fromToken",
461
+ "type": "address"
462
+ },
463
+ {
464
+ "indexed": false,
465
+ "internalType": "address",
466
+ "name": "toToken",
467
+ "type": "address"
468
+ },
469
+ {
470
+ "indexed": false,
471
+ "internalType": "uint256",
472
+ "name": "totalAmount",
473
+ "type": "uint256"
474
+ },
475
+ {
476
+ "indexed": false,
477
+ "internalType": "uint256",
478
+ "name": "nonce",
479
+ "type": "uint256"
480
+ }
481
+ ],
482
+ "name": "DepositToBridge",
483
+ "type": "event"
484
+ },
485
+ {
486
+ "anonymous": false,
487
+ "inputs": [
488
+ {
489
+ "indexed": false,
490
+ "internalType": "uint64",
491
+ "name": "version",
492
+ "type": "uint64"
493
+ }
494
+ ],
495
+ "name": "Initialized",
496
+ "type": "event"
497
+ },
498
+ {
499
+ "anonymous": false,
500
+ "inputs": [
501
+ {
502
+ "indexed": false,
503
+ "internalType": "string",
504
+ "name": "name",
505
+ "type": "string"
506
+ },
507
+ {
508
+ "indexed": false,
509
+ "internalType": "string",
510
+ "name": "symbol",
511
+ "type": "string"
512
+ }
513
+ ],
514
+ "name": "NameAndSymbolChanged",
515
+ "type": "event"
516
+ },
517
+ {
518
+ "anonymous": false,
519
+ "inputs": [
520
+ {
521
+ "indexed": true,
522
+ "internalType": "bytes32",
523
+ "name": "transactionId",
524
+ "type": "bytes32"
525
+ },
526
+ {
527
+ "indexed": true,
528
+ "internalType": "uint32",
529
+ "name": "index",
530
+ "type": "uint32"
531
+ },
532
+ {
533
+ "indexed": false,
534
+ "internalType": "bytes32",
535
+ "name": "hash",
536
+ "type": "bytes32"
537
+ }
538
+ ],
539
+ "name": "OutputProcessed",
540
+ "type": "event"
541
+ },
542
+ {
543
+ "anonymous": false,
544
+ "inputs": [
545
+ {
546
+ "indexed": true,
547
+ "internalType": "address",
548
+ "name": "previousOwner",
549
+ "type": "address"
550
+ },
551
+ {
552
+ "indexed": true,
553
+ "internalType": "address",
554
+ "name": "newOwner",
555
+ "type": "address"
556
+ }
557
+ ],
558
+ "name": "OwnershipTransferStarted",
559
+ "type": "event"
560
+ },
561
+ {
562
+ "anonymous": false,
563
+ "inputs": [
564
+ {
565
+ "indexed": true,
566
+ "internalType": "address",
567
+ "name": "previousOwner",
568
+ "type": "address"
569
+ },
570
+ {
571
+ "indexed": true,
572
+ "internalType": "address",
573
+ "name": "newOwner",
574
+ "type": "address"
575
+ }
576
+ ],
577
+ "name": "OwnershipTransferred",
578
+ "type": "event"
579
+ },
580
+ {
581
+ "anonymous": false,
582
+ "inputs": [
583
+ {
584
+ "indexed": false,
585
+ "internalType": "address",
586
+ "name": "account",
587
+ "type": "address"
588
+ }
589
+ ],
590
+ "name": "Paused",
591
+ "type": "event"
592
+ },
593
+ {
594
+ "anonymous": false,
595
+ "inputs": [
596
+ {
597
+ "indexed": true,
598
+ "internalType": "address",
599
+ "name": "from",
600
+ "type": "address"
601
+ },
602
+ {
603
+ "indexed": true,
604
+ "internalType": "address",
605
+ "name": "to",
606
+ "type": "address"
607
+ },
608
+ {
609
+ "indexed": false,
610
+ "internalType": "uint256",
611
+ "name": "value",
612
+ "type": "uint256"
613
+ }
614
+ ],
615
+ "name": "Transfer",
616
+ "type": "event"
617
+ },
618
+ {
619
+ "anonymous": false,
620
+ "inputs": [
621
+ {
622
+ "indexed": true,
623
+ "internalType": "address",
624
+ "name": "prevValue",
625
+ "type": "address"
626
+ },
627
+ {
628
+ "indexed": true,
629
+ "internalType": "address",
630
+ "name": "newValue",
631
+ "type": "address"
632
+ }
633
+ ],
634
+ "name": "TreasuryAddressChanged",
635
+ "type": "event"
636
+ },
637
+ {
638
+ "anonymous": false,
639
+ "inputs": [
640
+ {
641
+ "indexed": false,
642
+ "internalType": "address",
643
+ "name": "account",
644
+ "type": "address"
645
+ }
646
+ ],
647
+ "name": "Unpaused",
648
+ "type": "event"
649
+ },
650
+ {
651
+ "anonymous": false,
652
+ "inputs": [
653
+ {
654
+ "indexed": true,
655
+ "internalType": "address",
656
+ "name": "fromAddress",
657
+ "type": "address"
658
+ },
659
+ {
660
+ "indexed": false,
661
+ "internalType": "bytes",
662
+ "name": "scriptPubKey",
663
+ "type": "bytes"
664
+ },
665
+ {
666
+ "indexed": false,
667
+ "internalType": "uint256",
668
+ "name": "amount",
669
+ "type": "uint256"
670
+ }
671
+ ],
672
+ "name": "UnstakeRequest",
673
+ "type": "event"
674
+ },
675
+ {
676
+ "anonymous": false,
677
+ "inputs": [
678
+ {
679
+ "indexed": true,
680
+ "internalType": "address",
681
+ "name": "prevVal",
682
+ "type": "address"
683
+ },
684
+ {
685
+ "indexed": true,
686
+ "internalType": "address",
687
+ "name": "newVal",
688
+ "type": "address"
689
+ }
690
+ ],
691
+ "name": "WBTCChanged",
692
+ "type": "event"
693
+ },
694
+ {
695
+ "anonymous": false,
696
+ "inputs": [
697
+ {
698
+ "indexed": true,
699
+ "internalType": "address",
700
+ "name": "staker",
701
+ "type": "address"
702
+ },
703
+ {
704
+ "indexed": true,
705
+ "internalType": "address",
706
+ "name": "to",
707
+ "type": "address"
708
+ },
709
+ {
710
+ "indexed": false,
711
+ "internalType": "uint256",
712
+ "name": "amount",
713
+ "type": "uint256"
714
+ }
715
+ ],
716
+ "name": "WBTCStaked",
717
+ "type": "event"
718
+ },
719
+ {
720
+ "anonymous": false,
721
+ "inputs": [
722
+ {
723
+ "indexed": false,
724
+ "internalType": "bool",
725
+ "name": "",
726
+ "type": "bool"
727
+ }
728
+ ],
729
+ "name": "WBTCStakingEnabled",
730
+ "type": "event"
731
+ },
732
+ {
733
+ "anonymous": false,
734
+ "inputs": [
735
+ {
736
+ "indexed": true,
737
+ "internalType": "bytes32",
738
+ "name": "receiptHash",
739
+ "type": "bytes32"
740
+ },
741
+ {
742
+ "indexed": true,
743
+ "internalType": "address",
744
+ "name": "fromAddress",
745
+ "type": "address"
746
+ },
747
+ {
748
+ "indexed": true,
749
+ "internalType": "address",
750
+ "name": "toAddress",
751
+ "type": "address"
752
+ },
753
+ {
754
+ "indexed": false,
755
+ "internalType": "address",
756
+ "name": "fromToken",
757
+ "type": "address"
758
+ },
759
+ {
760
+ "indexed": false,
761
+ "internalType": "address",
762
+ "name": "toToken",
763
+ "type": "address"
764
+ },
765
+ {
766
+ "indexed": false,
767
+ "internalType": "uint256",
768
+ "name": "totalAmount",
769
+ "type": "uint256"
770
+ }
771
+ ],
772
+ "name": "WithdrawFromBridge",
773
+ "type": "event"
774
+ },
775
+ {
776
+ "anonymous": false,
777
+ "inputs": [
778
+ {
779
+ "indexed": false,
780
+ "internalType": "bool",
781
+ "name": "",
782
+ "type": "bool"
783
+ }
784
+ ],
785
+ "name": "WithdrawalsEnabled",
786
+ "type": "event"
787
+ },
788
+ {
789
+ "inputs": [],
790
+ "name": "MAX_COMMISSION",
791
+ "outputs": [
792
+ {
793
+ "internalType": "uint16",
794
+ "name": "",
795
+ "type": "uint16"
796
+ }
797
+ ],
798
+ "stateMutability": "view",
799
+ "type": "function"
800
+ },
801
+ {
802
+ "inputs": [],
803
+ "name": "WBTC",
804
+ "outputs": [
805
+ {
806
+ "internalType": "contract IERC20",
807
+ "name": "",
808
+ "type": "address"
809
+ }
810
+ ],
811
+ "stateMutability": "view",
812
+ "type": "function"
813
+ },
814
+ {
815
+ "inputs": [],
816
+ "name": "acceptOwnership",
817
+ "outputs": [],
818
+ "stateMutability": "nonpayable",
819
+ "type": "function"
820
+ },
821
+ {
822
+ "inputs": [
823
+ {
824
+ "internalType": "uint256",
825
+ "name": "toChain",
826
+ "type": "uint256"
827
+ },
828
+ {
829
+ "internalType": "address",
830
+ "name": "toToken",
831
+ "type": "address"
832
+ },
833
+ {
834
+ "internalType": "uint16",
835
+ "name": "commission",
836
+ "type": "uint16"
837
+ }
838
+ ],
839
+ "name": "addDestination",
840
+ "outputs": [],
841
+ "stateMutability": "nonpayable",
842
+ "type": "function"
843
+ },
844
+ {
845
+ "inputs": [
846
+ {
847
+ "internalType": "address",
848
+ "name": "owner",
849
+ "type": "address"
850
+ },
851
+ {
852
+ "internalType": "address",
853
+ "name": "spender",
854
+ "type": "address"
855
+ }
856
+ ],
857
+ "name": "allowance",
858
+ "outputs": [
859
+ {
860
+ "internalType": "uint256",
861
+ "name": "",
862
+ "type": "uint256"
863
+ }
864
+ ],
865
+ "stateMutability": "view",
866
+ "type": "function"
867
+ },
868
+ {
869
+ "inputs": [
870
+ {
871
+ "internalType": "address",
872
+ "name": "spender",
873
+ "type": "address"
874
+ },
875
+ {
876
+ "internalType": "uint256",
877
+ "name": "value",
878
+ "type": "uint256"
879
+ }
880
+ ],
881
+ "name": "approve",
882
+ "outputs": [
883
+ {
884
+ "internalType": "bool",
885
+ "name": "",
886
+ "type": "bool"
887
+ }
888
+ ],
889
+ "stateMutability": "nonpayable",
890
+ "type": "function"
891
+ },
892
+ {
893
+ "inputs": [
894
+ {
895
+ "internalType": "address",
896
+ "name": "account",
897
+ "type": "address"
898
+ }
899
+ ],
900
+ "name": "balanceOf",
901
+ "outputs": [
902
+ {
903
+ "internalType": "uint256",
904
+ "name": "",
905
+ "type": "uint256"
906
+ }
907
+ ],
908
+ "stateMutability": "view",
909
+ "type": "function"
910
+ },
911
+ {
912
+ "inputs": [
913
+ {
914
+ "internalType": "bytes",
915
+ "name": "scriptPubkey",
916
+ "type": "bytes"
917
+ },
918
+ {
919
+ "internalType": "uint256",
920
+ "name": "amount",
921
+ "type": "uint256"
922
+ }
923
+ ],
924
+ "name": "burn",
925
+ "outputs": [],
926
+ "stateMutability": "nonpayable",
927
+ "type": "function"
928
+ },
929
+ {
930
+ "inputs": [
931
+ {
932
+ "internalType": "address",
933
+ "name": "newVal",
934
+ "type": "address"
935
+ }
936
+ ],
937
+ "name": "changeConsortium",
938
+ "outputs": [],
939
+ "stateMutability": "nonpayable",
940
+ "type": "function"
941
+ },
942
+ {
943
+ "inputs": [
944
+ {
945
+ "internalType": "uint16",
946
+ "name": "newValue",
947
+ "type": "uint16"
948
+ },
949
+ {
950
+ "internalType": "uint256",
951
+ "name": "chain",
952
+ "type": "uint256"
953
+ }
954
+ ],
955
+ "name": "changeDepositCommission",
956
+ "outputs": [],
957
+ "stateMutability": "nonpayable",
958
+ "type": "function"
959
+ },
960
+ {
961
+ "inputs": [
962
+ {
963
+ "internalType": "string",
964
+ "name": "name_",
965
+ "type": "string"
966
+ },
967
+ {
968
+ "internalType": "string",
969
+ "name": "symbol_",
970
+ "type": "string"
971
+ }
972
+ ],
973
+ "name": "changeNameAndSymbol",
974
+ "outputs": [],
975
+ "stateMutability": "nonpayable",
976
+ "type": "function"
977
+ },
978
+ {
979
+ "inputs": [
980
+ {
981
+ "internalType": "address",
982
+ "name": "newValue",
983
+ "type": "address"
984
+ }
985
+ ],
986
+ "name": "changeTreasuryAddress",
987
+ "outputs": [],
988
+ "stateMutability": "nonpayable",
989
+ "type": "function"
990
+ },
991
+ {
992
+ "inputs": [
993
+ {
994
+ "internalType": "address",
995
+ "name": "wbtc_",
996
+ "type": "address"
997
+ }
998
+ ],
999
+ "name": "changeWBTC",
1000
+ "outputs": [],
1001
+ "stateMutability": "nonpayable",
1002
+ "type": "function"
1003
+ },
1004
+ {
1005
+ "inputs": [],
1006
+ "name": "consortium",
1007
+ "outputs": [
1008
+ {
1009
+ "internalType": "address",
1010
+ "name": "",
1011
+ "type": "address"
1012
+ }
1013
+ ],
1014
+ "stateMutability": "view",
1015
+ "type": "function"
1016
+ },
1017
+ {
1018
+ "inputs": [],
1019
+ "name": "decimals",
1020
+ "outputs": [
1021
+ {
1022
+ "internalType": "uint8",
1023
+ "name": "",
1024
+ "type": "uint8"
1025
+ }
1026
+ ],
1027
+ "stateMutability": "view",
1028
+ "type": "function"
1029
+ },
1030
+ {
1031
+ "inputs": [
1032
+ {
1033
+ "internalType": "uint256",
1034
+ "name": "toChain",
1035
+ "type": "uint256"
1036
+ },
1037
+ {
1038
+ "internalType": "address",
1039
+ "name": "toAddress",
1040
+ "type": "address"
1041
+ },
1042
+ {
1043
+ "internalType": "uint256",
1044
+ "name": "amount",
1045
+ "type": "uint256"
1046
+ }
1047
+ ],
1048
+ "name": "depositToBridge",
1049
+ "outputs": [],
1050
+ "stateMutability": "nonpayable",
1051
+ "type": "function"
1052
+ },
1053
+ {
1054
+ "inputs": [],
1055
+ "name": "enableWBTCStaking",
1056
+ "outputs": [],
1057
+ "stateMutability": "nonpayable",
1058
+ "type": "function"
1059
+ },
1060
+ {
1061
+ "inputs": [
1062
+ {
1063
+ "internalType": "uint256",
1064
+ "name": "toChain",
1065
+ "type": "uint256"
1066
+ }
1067
+ ],
1068
+ "name": "getDepositCommission",
1069
+ "outputs": [
1070
+ {
1071
+ "internalType": "uint16",
1072
+ "name": "commission",
1073
+ "type": "uint16"
1074
+ }
1075
+ ],
1076
+ "stateMutability": "view",
1077
+ "type": "function"
1078
+ },
1079
+ {
1080
+ "inputs": [
1081
+ {
1082
+ "internalType": "uint256",
1083
+ "name": "chain",
1084
+ "type": "uint256"
1085
+ }
1086
+ ],
1087
+ "name": "getDestination",
1088
+ "outputs": [
1089
+ {
1090
+ "internalType": "address",
1091
+ "name": "",
1092
+ "type": "address"
1093
+ }
1094
+ ],
1095
+ "stateMutability": "view",
1096
+ "type": "function"
1097
+ },
1098
+ {
1099
+ "inputs": [],
1100
+ "name": "getTreasury",
1101
+ "outputs": [
1102
+ {
1103
+ "internalType": "address",
1104
+ "name": "",
1105
+ "type": "address"
1106
+ }
1107
+ ],
1108
+ "stateMutability": "view",
1109
+ "type": "function"
1110
+ },
1111
+ {
1112
+ "inputs": [
1113
+ {
1114
+ "internalType": "address",
1115
+ "name": "consortium_",
1116
+ "type": "address"
1117
+ }
1118
+ ],
1119
+ "name": "initialize",
1120
+ "outputs": [],
1121
+ "stateMutability": "nonpayable",
1122
+ "type": "function"
1123
+ },
1124
+ {
1125
+ "inputs": [
1126
+ {
1127
+ "internalType": "bytes32",
1128
+ "name": "proof",
1129
+ "type": "bytes32"
1130
+ }
1131
+ ],
1132
+ "name": "isUsed",
1133
+ "outputs": [
1134
+ {
1135
+ "internalType": "bool",
1136
+ "name": "",
1137
+ "type": "bool"
1138
+ }
1139
+ ],
1140
+ "stateMutability": "view",
1141
+ "type": "function"
1142
+ },
1143
+ {
1144
+ "inputs": [
1145
+ {
1146
+ "internalType": "bytes",
1147
+ "name": "data",
1148
+ "type": "bytes"
1149
+ },
1150
+ {
1151
+ "internalType": "bytes",
1152
+ "name": "proofSignature",
1153
+ "type": "bytes"
1154
+ }
1155
+ ],
1156
+ "name": "mint",
1157
+ "outputs": [],
1158
+ "stateMutability": "nonpayable",
1159
+ "type": "function"
1160
+ },
1161
+ {
1162
+ "inputs": [],
1163
+ "name": "name",
1164
+ "outputs": [
1165
+ {
1166
+ "internalType": "string",
1167
+ "name": "",
1168
+ "type": "string"
1169
+ }
1170
+ ],
1171
+ "stateMutability": "view",
1172
+ "type": "function"
1173
+ },
1174
+ {
1175
+ "inputs": [],
1176
+ "name": "owner",
1177
+ "outputs": [
1178
+ {
1179
+ "internalType": "address",
1180
+ "name": "",
1181
+ "type": "address"
1182
+ }
1183
+ ],
1184
+ "stateMutability": "view",
1185
+ "type": "function"
1186
+ },
1187
+ {
1188
+ "inputs": [],
1189
+ "name": "pause",
1190
+ "outputs": [],
1191
+ "stateMutability": "nonpayable",
1192
+ "type": "function"
1193
+ },
1194
+ {
1195
+ "inputs": [],
1196
+ "name": "paused",
1197
+ "outputs": [
1198
+ {
1199
+ "internalType": "bool",
1200
+ "name": "",
1201
+ "type": "bool"
1202
+ }
1203
+ ],
1204
+ "stateMutability": "view",
1205
+ "type": "function"
1206
+ },
1207
+ {
1208
+ "inputs": [],
1209
+ "name": "pendingOwner",
1210
+ "outputs": [
1211
+ {
1212
+ "internalType": "address",
1213
+ "name": "",
1214
+ "type": "address"
1215
+ }
1216
+ ],
1217
+ "stateMutability": "view",
1218
+ "type": "function"
1219
+ },
1220
+ {
1221
+ "inputs": [
1222
+ {
1223
+ "internalType": "uint256",
1224
+ "name": "toChain",
1225
+ "type": "uint256"
1226
+ }
1227
+ ],
1228
+ "name": "removeDestination",
1229
+ "outputs": [],
1230
+ "stateMutability": "nonpayable",
1231
+ "type": "function"
1232
+ },
1233
+ {
1234
+ "inputs": [],
1235
+ "name": "renounceOwnership",
1236
+ "outputs": [],
1237
+ "stateMutability": "nonpayable",
1238
+ "type": "function"
1239
+ },
1240
+ {
1241
+ "inputs": [
1242
+ {
1243
+ "internalType": "uint256",
1244
+ "name": "amount",
1245
+ "type": "uint256"
1246
+ }
1247
+ ],
1248
+ "name": "stakeWBTC",
1249
+ "outputs": [],
1250
+ "stateMutability": "nonpayable",
1251
+ "type": "function"
1252
+ },
1253
+ {
1254
+ "inputs": [
1255
+ {
1256
+ "internalType": "uint256",
1257
+ "name": "amount",
1258
+ "type": "uint256"
1259
+ },
1260
+ {
1261
+ "internalType": "address",
1262
+ "name": "to",
1263
+ "type": "address"
1264
+ }
1265
+ ],
1266
+ "name": "stakeWBTCFor",
1267
+ "outputs": [],
1268
+ "stateMutability": "nonpayable",
1269
+ "type": "function"
1270
+ },
1271
+ {
1272
+ "inputs": [],
1273
+ "name": "symbol",
1274
+ "outputs": [
1275
+ {
1276
+ "internalType": "string",
1277
+ "name": "",
1278
+ "type": "string"
1279
+ }
1280
+ ],
1281
+ "stateMutability": "view",
1282
+ "type": "function"
1283
+ },
1284
+ {
1285
+ "inputs": [],
1286
+ "name": "toggleWithdrawals",
1287
+ "outputs": [],
1288
+ "stateMutability": "nonpayable",
1289
+ "type": "function"
1290
+ },
1291
+ {
1292
+ "inputs": [],
1293
+ "name": "totalSupply",
1294
+ "outputs": [
1295
+ {
1296
+ "internalType": "uint256",
1297
+ "name": "",
1298
+ "type": "uint256"
1299
+ }
1300
+ ],
1301
+ "stateMutability": "view",
1302
+ "type": "function"
1303
+ },
1304
+ {
1305
+ "inputs": [
1306
+ {
1307
+ "internalType": "address",
1308
+ "name": "to",
1309
+ "type": "address"
1310
+ },
1311
+ {
1312
+ "internalType": "uint256",
1313
+ "name": "value",
1314
+ "type": "uint256"
1315
+ }
1316
+ ],
1317
+ "name": "transfer",
1318
+ "outputs": [
1319
+ {
1320
+ "internalType": "bool",
1321
+ "name": "",
1322
+ "type": "bool"
1323
+ }
1324
+ ],
1325
+ "stateMutability": "nonpayable",
1326
+ "type": "function"
1327
+ },
1328
+ {
1329
+ "inputs": [
1330
+ {
1331
+ "internalType": "address",
1332
+ "name": "from",
1333
+ "type": "address"
1334
+ },
1335
+ {
1336
+ "internalType": "address",
1337
+ "name": "to",
1338
+ "type": "address"
1339
+ },
1340
+ {
1341
+ "internalType": "uint256",
1342
+ "name": "value",
1343
+ "type": "uint256"
1344
+ }
1345
+ ],
1346
+ "name": "transferFrom",
1347
+ "outputs": [
1348
+ {
1349
+ "internalType": "bool",
1350
+ "name": "",
1351
+ "type": "bool"
1352
+ }
1353
+ ],
1354
+ "stateMutability": "nonpayable",
1355
+ "type": "function"
1356
+ },
1357
+ {
1358
+ "inputs": [
1359
+ {
1360
+ "internalType": "address",
1361
+ "name": "newOwner",
1362
+ "type": "address"
1363
+ }
1364
+ ],
1365
+ "name": "transferOwnership",
1366
+ "outputs": [],
1367
+ "stateMutability": "nonpayable",
1368
+ "type": "function"
1369
+ },
1370
+ {
1371
+ "inputs": [],
1372
+ "name": "unpause",
1373
+ "outputs": [],
1374
+ "stateMutability": "nonpayable",
1375
+ "type": "function"
1376
+ },
1377
+ {
1378
+ "inputs": [
1379
+ {
1380
+ "internalType": "bytes",
1381
+ "name": "",
1382
+ "type": "bytes"
1383
+ },
1384
+ {
1385
+ "internalType": "bytes",
1386
+ "name": "rawReceipt",
1387
+ "type": "bytes"
1388
+ },
1389
+ {
1390
+ "internalType": "bytes",
1391
+ "name": "proofSignature",
1392
+ "type": "bytes"
1393
+ }
1394
+ ],
1395
+ "name": "withdrawFromBridge",
1396
+ "outputs": [],
1397
+ "stateMutability": "nonpayable",
1398
+ "type": "function"
1399
+ }
1400
+ ]