@luxfi/dex 1.3.0 → 2.0.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.
- package/dist/hooks/index.d.ts +16 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +20 -1
- package/dist/hooks/use-lxbook.d.ts +95 -0
- package/dist/hooks/use-lxbook.d.ts.map +1 -0
- package/dist/hooks/use-lxbook.js +213 -0
- package/dist/hooks/use-lxfeed.d.ts +111 -0
- package/dist/hooks/use-lxfeed.d.ts.map +1 -0
- package/dist/hooks/use-lxfeed.js +152 -0
- package/dist/hooks/use-lxvault.d.ts +137 -0
- package/dist/hooks/use-lxvault.d.ts.map +1 -0
- package/dist/hooks/use-lxvault.js +227 -0
- package/dist/index.d.ts +38 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +57 -26
- package/dist/precompile/abis.d.ts +593 -2
- package/dist/precompile/abis.d.ts.map +1 -1
- package/dist/precompile/abis.js +458 -2
- package/dist/precompile/addresses.d.ts +89 -25
- package/dist/precompile/addresses.d.ts.map +1 -1
- package/dist/precompile/addresses.js +86 -21
- package/dist/precompile/index.d.ts +13 -2
- package/dist/precompile/index.d.ts.map +1 -1
- package/dist/precompile/index.js +13 -2
- package/dist/precompile/types.d.ts +170 -0
- package/dist/precompile/types.d.ts.map +1 -1
- package/dist/precompile/types.js +67 -0
- package/package.json +2 -2
- package/src/hooks/index.ts +24 -1
- package/src/hooks/use-lxbook.ts +343 -0
- package/src/hooks/use-lxfeed.ts +179 -0
- package/src/hooks/use-lxvault.ts +318 -0
- package/src/index.ts +92 -26
- package/src/precompile/abis.ts +466 -2
- package/src/precompile/addresses.ts +109 -28
- package/src/precompile/index.ts +13 -2
- package/src/precompile/types.ts +200 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* DEX Precompile ABIs
|
|
3
|
-
* Native Go implementation at
|
|
2
|
+
* DEX Precompile ABIs (LP-Aligned)
|
|
3
|
+
* Native Go implementation at LP-9010 to LP-9040
|
|
4
|
+
* Address format: 0x0000000000000000000000000000000000LPNUM
|
|
4
5
|
*/
|
|
5
6
|
/**
|
|
6
7
|
* PoolManager ABI (0x0400)
|
|
@@ -397,4 +398,594 @@ export declare const FLASH_LOAN_ABI: readonly [{
|
|
|
397
398
|
readonly outputs: readonly [];
|
|
398
399
|
readonly stateMutability: "nonpayable";
|
|
399
400
|
}];
|
|
401
|
+
/**
|
|
402
|
+
* LXBook ABI (LP-9020)
|
|
403
|
+
* Permissionless orderbooks with Hyperliquid-style execute() endpoint
|
|
404
|
+
*/
|
|
405
|
+
export declare const LX_BOOK_ABI: readonly [{
|
|
406
|
+
readonly type: "function";
|
|
407
|
+
readonly name: "execute";
|
|
408
|
+
readonly inputs: readonly [{
|
|
409
|
+
readonly name: "action";
|
|
410
|
+
readonly type: "tuple";
|
|
411
|
+
readonly components: readonly [{
|
|
412
|
+
readonly name: "actionType";
|
|
413
|
+
readonly type: "uint8";
|
|
414
|
+
}, {
|
|
415
|
+
readonly name: "nonce";
|
|
416
|
+
readonly type: "uint64";
|
|
417
|
+
}, {
|
|
418
|
+
readonly name: "expiresAfter";
|
|
419
|
+
readonly type: "uint64";
|
|
420
|
+
}, {
|
|
421
|
+
readonly name: "data";
|
|
422
|
+
readonly type: "bytes";
|
|
423
|
+
}];
|
|
424
|
+
}];
|
|
425
|
+
readonly outputs: readonly [{
|
|
426
|
+
readonly name: "result";
|
|
427
|
+
readonly type: "bytes";
|
|
428
|
+
}];
|
|
429
|
+
readonly stateMutability: "nonpayable";
|
|
430
|
+
}, {
|
|
431
|
+
readonly type: "function";
|
|
432
|
+
readonly name: "executeBatch";
|
|
433
|
+
readonly inputs: readonly [{
|
|
434
|
+
readonly name: "actions";
|
|
435
|
+
readonly type: "tuple[]";
|
|
436
|
+
readonly components: readonly [{
|
|
437
|
+
readonly name: "actionType";
|
|
438
|
+
readonly type: "uint8";
|
|
439
|
+
}, {
|
|
440
|
+
readonly name: "nonce";
|
|
441
|
+
readonly type: "uint64";
|
|
442
|
+
}, {
|
|
443
|
+
readonly name: "expiresAfter";
|
|
444
|
+
readonly type: "uint64";
|
|
445
|
+
}, {
|
|
446
|
+
readonly name: "data";
|
|
447
|
+
readonly type: "bytes";
|
|
448
|
+
}];
|
|
449
|
+
}];
|
|
450
|
+
readonly outputs: readonly [{
|
|
451
|
+
readonly name: "results";
|
|
452
|
+
readonly type: "bytes[]";
|
|
453
|
+
}];
|
|
454
|
+
readonly stateMutability: "nonpayable";
|
|
455
|
+
}, {
|
|
456
|
+
readonly type: "function";
|
|
457
|
+
readonly name: "createMarket";
|
|
458
|
+
readonly inputs: readonly [{
|
|
459
|
+
readonly name: "cfg";
|
|
460
|
+
readonly type: "tuple";
|
|
461
|
+
readonly components: readonly [{
|
|
462
|
+
readonly name: "baseAsset";
|
|
463
|
+
readonly type: "bytes32";
|
|
464
|
+
}, {
|
|
465
|
+
readonly name: "quoteAsset";
|
|
466
|
+
readonly type: "bytes32";
|
|
467
|
+
}, {
|
|
468
|
+
readonly name: "tickSizeX18";
|
|
469
|
+
readonly type: "uint128";
|
|
470
|
+
}, {
|
|
471
|
+
readonly name: "lotSizeX18";
|
|
472
|
+
readonly type: "uint128";
|
|
473
|
+
}, {
|
|
474
|
+
readonly name: "makerFeePpm";
|
|
475
|
+
readonly type: "uint32";
|
|
476
|
+
}, {
|
|
477
|
+
readonly name: "takerFeePpm";
|
|
478
|
+
readonly type: "uint32";
|
|
479
|
+
}, {
|
|
480
|
+
readonly name: "feedId";
|
|
481
|
+
readonly type: "bytes32";
|
|
482
|
+
}, {
|
|
483
|
+
readonly name: "initialStatus";
|
|
484
|
+
readonly type: "uint8";
|
|
485
|
+
}];
|
|
486
|
+
}];
|
|
487
|
+
readonly outputs: readonly [{
|
|
488
|
+
readonly name: "marketId";
|
|
489
|
+
readonly type: "uint32";
|
|
490
|
+
}];
|
|
491
|
+
readonly stateMutability: "nonpayable";
|
|
492
|
+
}, {
|
|
493
|
+
readonly type: "function";
|
|
494
|
+
readonly name: "getL1";
|
|
495
|
+
readonly inputs: readonly [{
|
|
496
|
+
readonly name: "marketId";
|
|
497
|
+
readonly type: "uint32";
|
|
498
|
+
}];
|
|
499
|
+
readonly outputs: readonly [{
|
|
500
|
+
readonly name: "l1";
|
|
501
|
+
readonly type: "tuple";
|
|
502
|
+
readonly components: readonly [{
|
|
503
|
+
readonly name: "bestBidPxX18";
|
|
504
|
+
readonly type: "uint128";
|
|
505
|
+
}, {
|
|
506
|
+
readonly name: "bestBidSzX18";
|
|
507
|
+
readonly type: "uint128";
|
|
508
|
+
}, {
|
|
509
|
+
readonly name: "bestAskPxX18";
|
|
510
|
+
readonly type: "uint128";
|
|
511
|
+
}, {
|
|
512
|
+
readonly name: "bestAskSzX18";
|
|
513
|
+
readonly type: "uint128";
|
|
514
|
+
}, {
|
|
515
|
+
readonly name: "lastTradePxX18";
|
|
516
|
+
readonly type: "uint128";
|
|
517
|
+
}];
|
|
518
|
+
}];
|
|
519
|
+
readonly stateMutability: "view";
|
|
520
|
+
}, {
|
|
521
|
+
readonly type: "function";
|
|
522
|
+
readonly name: "getMarketConfig";
|
|
523
|
+
readonly inputs: readonly [{
|
|
524
|
+
readonly name: "marketId";
|
|
525
|
+
readonly type: "uint32";
|
|
526
|
+
}];
|
|
527
|
+
readonly outputs: readonly [{
|
|
528
|
+
readonly name: "cfg";
|
|
529
|
+
readonly type: "tuple";
|
|
530
|
+
readonly components: readonly [{
|
|
531
|
+
readonly name: "baseAsset";
|
|
532
|
+
readonly type: "bytes32";
|
|
533
|
+
}, {
|
|
534
|
+
readonly name: "quoteAsset";
|
|
535
|
+
readonly type: "bytes32";
|
|
536
|
+
}, {
|
|
537
|
+
readonly name: "tickSizeX18";
|
|
538
|
+
readonly type: "uint128";
|
|
539
|
+
}, {
|
|
540
|
+
readonly name: "lotSizeX18";
|
|
541
|
+
readonly type: "uint128";
|
|
542
|
+
}, {
|
|
543
|
+
readonly name: "makerFeePpm";
|
|
544
|
+
readonly type: "uint32";
|
|
545
|
+
}, {
|
|
546
|
+
readonly name: "takerFeePpm";
|
|
547
|
+
readonly type: "uint32";
|
|
548
|
+
}, {
|
|
549
|
+
readonly name: "feedId";
|
|
550
|
+
readonly type: "bytes32";
|
|
551
|
+
}, {
|
|
552
|
+
readonly name: "initialStatus";
|
|
553
|
+
readonly type: "uint8";
|
|
554
|
+
}];
|
|
555
|
+
}];
|
|
556
|
+
readonly stateMutability: "view";
|
|
557
|
+
}, {
|
|
558
|
+
readonly type: "function";
|
|
559
|
+
readonly name: "getMarketStatus";
|
|
560
|
+
readonly inputs: readonly [{
|
|
561
|
+
readonly name: "marketId";
|
|
562
|
+
readonly type: "uint32";
|
|
563
|
+
}];
|
|
564
|
+
readonly outputs: readonly [{
|
|
565
|
+
readonly name: "status";
|
|
566
|
+
readonly type: "uint8";
|
|
567
|
+
}];
|
|
568
|
+
readonly stateMutability: "view";
|
|
569
|
+
}];
|
|
570
|
+
/**
|
|
571
|
+
* LXVault ABI (LP-9030)
|
|
572
|
+
* Balances, margin, collateral, liquidations
|
|
573
|
+
*/
|
|
574
|
+
export declare const LX_VAULT_ABI: readonly [{
|
|
575
|
+
readonly type: "function";
|
|
576
|
+
readonly name: "deposit";
|
|
577
|
+
readonly inputs: readonly [{
|
|
578
|
+
readonly name: "token";
|
|
579
|
+
readonly type: "address";
|
|
580
|
+
}, {
|
|
581
|
+
readonly name: "amount";
|
|
582
|
+
readonly type: "uint128";
|
|
583
|
+
}, {
|
|
584
|
+
readonly name: "subaccountId";
|
|
585
|
+
readonly type: "uint8";
|
|
586
|
+
}];
|
|
587
|
+
readonly outputs: readonly [];
|
|
588
|
+
readonly stateMutability: "nonpayable";
|
|
589
|
+
}, {
|
|
590
|
+
readonly type: "function";
|
|
591
|
+
readonly name: "withdraw";
|
|
592
|
+
readonly inputs: readonly [{
|
|
593
|
+
readonly name: "token";
|
|
594
|
+
readonly type: "address";
|
|
595
|
+
}, {
|
|
596
|
+
readonly name: "amount";
|
|
597
|
+
readonly type: "uint128";
|
|
598
|
+
}, {
|
|
599
|
+
readonly name: "subaccountId";
|
|
600
|
+
readonly type: "uint8";
|
|
601
|
+
}];
|
|
602
|
+
readonly outputs: readonly [];
|
|
603
|
+
readonly stateMutability: "nonpayable";
|
|
604
|
+
}, {
|
|
605
|
+
readonly type: "function";
|
|
606
|
+
readonly name: "transfer";
|
|
607
|
+
readonly inputs: readonly [{
|
|
608
|
+
readonly name: "token";
|
|
609
|
+
readonly type: "address";
|
|
610
|
+
}, {
|
|
611
|
+
readonly name: "amount";
|
|
612
|
+
readonly type: "uint128";
|
|
613
|
+
}, {
|
|
614
|
+
readonly name: "fromSubaccount";
|
|
615
|
+
readonly type: "uint8";
|
|
616
|
+
}, {
|
|
617
|
+
readonly name: "toSubaccount";
|
|
618
|
+
readonly type: "uint8";
|
|
619
|
+
}];
|
|
620
|
+
readonly outputs: readonly [];
|
|
621
|
+
readonly stateMutability: "nonpayable";
|
|
622
|
+
}, {
|
|
623
|
+
readonly type: "function";
|
|
624
|
+
readonly name: "getBalance";
|
|
625
|
+
readonly inputs: readonly [{
|
|
626
|
+
readonly name: "account";
|
|
627
|
+
readonly type: "tuple";
|
|
628
|
+
readonly components: readonly [{
|
|
629
|
+
readonly name: "main";
|
|
630
|
+
readonly type: "address";
|
|
631
|
+
}, {
|
|
632
|
+
readonly name: "subaccountId";
|
|
633
|
+
readonly type: "uint8";
|
|
634
|
+
}];
|
|
635
|
+
}, {
|
|
636
|
+
readonly name: "token";
|
|
637
|
+
readonly type: "address";
|
|
638
|
+
}];
|
|
639
|
+
readonly outputs: readonly [{
|
|
640
|
+
readonly name: "balance";
|
|
641
|
+
readonly type: "uint128";
|
|
642
|
+
}];
|
|
643
|
+
readonly stateMutability: "view";
|
|
644
|
+
}, {
|
|
645
|
+
readonly type: "function";
|
|
646
|
+
readonly name: "getPosition";
|
|
647
|
+
readonly inputs: readonly [{
|
|
648
|
+
readonly name: "account";
|
|
649
|
+
readonly type: "tuple";
|
|
650
|
+
readonly components: readonly [{
|
|
651
|
+
readonly name: "main";
|
|
652
|
+
readonly type: "address";
|
|
653
|
+
}, {
|
|
654
|
+
readonly name: "subaccountId";
|
|
655
|
+
readonly type: "uint8";
|
|
656
|
+
}];
|
|
657
|
+
}, {
|
|
658
|
+
readonly name: "marketId";
|
|
659
|
+
readonly type: "uint32";
|
|
660
|
+
}];
|
|
661
|
+
readonly outputs: readonly [{
|
|
662
|
+
readonly name: "position";
|
|
663
|
+
readonly type: "tuple";
|
|
664
|
+
readonly components: readonly [{
|
|
665
|
+
readonly name: "marketId";
|
|
666
|
+
readonly type: "uint32";
|
|
667
|
+
}, {
|
|
668
|
+
readonly name: "side";
|
|
669
|
+
readonly type: "uint8";
|
|
670
|
+
}, {
|
|
671
|
+
readonly name: "sizeX18";
|
|
672
|
+
readonly type: "uint128";
|
|
673
|
+
}, {
|
|
674
|
+
readonly name: "entryPxX18";
|
|
675
|
+
readonly type: "uint128";
|
|
676
|
+
}, {
|
|
677
|
+
readonly name: "unrealizedPnlX18";
|
|
678
|
+
readonly type: "uint128";
|
|
679
|
+
}, {
|
|
680
|
+
readonly name: "accumulatedFundingX18";
|
|
681
|
+
readonly type: "int128";
|
|
682
|
+
}, {
|
|
683
|
+
readonly name: "lastFundingTime";
|
|
684
|
+
readonly type: "uint64";
|
|
685
|
+
}];
|
|
686
|
+
}];
|
|
687
|
+
readonly stateMutability: "view";
|
|
688
|
+
}, {
|
|
689
|
+
readonly type: "function";
|
|
690
|
+
readonly name: "getMargin";
|
|
691
|
+
readonly inputs: readonly [{
|
|
692
|
+
readonly name: "account";
|
|
693
|
+
readonly type: "tuple";
|
|
694
|
+
readonly components: readonly [{
|
|
695
|
+
readonly name: "main";
|
|
696
|
+
readonly type: "address";
|
|
697
|
+
}, {
|
|
698
|
+
readonly name: "subaccountId";
|
|
699
|
+
readonly type: "uint8";
|
|
700
|
+
}];
|
|
701
|
+
}];
|
|
702
|
+
readonly outputs: readonly [{
|
|
703
|
+
readonly name: "info";
|
|
704
|
+
readonly type: "tuple";
|
|
705
|
+
readonly components: readonly [{
|
|
706
|
+
readonly name: "totalCollateralX18";
|
|
707
|
+
readonly type: "uint128";
|
|
708
|
+
}, {
|
|
709
|
+
readonly name: "usedMarginX18";
|
|
710
|
+
readonly type: "uint128";
|
|
711
|
+
}, {
|
|
712
|
+
readonly name: "freeMarginX18";
|
|
713
|
+
readonly type: "uint128";
|
|
714
|
+
}, {
|
|
715
|
+
readonly name: "marginRatioX18";
|
|
716
|
+
readonly type: "uint128";
|
|
717
|
+
}, {
|
|
718
|
+
readonly name: "maintenanceMarginX18";
|
|
719
|
+
readonly type: "uint128";
|
|
720
|
+
}, {
|
|
721
|
+
readonly name: "liquidatable";
|
|
722
|
+
readonly type: "bool";
|
|
723
|
+
}];
|
|
724
|
+
}];
|
|
725
|
+
readonly stateMutability: "view";
|
|
726
|
+
}, {
|
|
727
|
+
readonly type: "function";
|
|
728
|
+
readonly name: "isLiquidatable";
|
|
729
|
+
readonly inputs: readonly [{
|
|
730
|
+
readonly name: "account";
|
|
731
|
+
readonly type: "tuple";
|
|
732
|
+
readonly components: readonly [{
|
|
733
|
+
readonly name: "main";
|
|
734
|
+
readonly type: "address";
|
|
735
|
+
}, {
|
|
736
|
+
readonly name: "subaccountId";
|
|
737
|
+
readonly type: "uint8";
|
|
738
|
+
}];
|
|
739
|
+
}];
|
|
740
|
+
readonly outputs: readonly [{
|
|
741
|
+
readonly name: "liquidatable";
|
|
742
|
+
readonly type: "bool";
|
|
743
|
+
}, {
|
|
744
|
+
readonly name: "shortfall";
|
|
745
|
+
readonly type: "uint128";
|
|
746
|
+
}];
|
|
747
|
+
readonly stateMutability: "view";
|
|
748
|
+
}, {
|
|
749
|
+
readonly type: "function";
|
|
750
|
+
readonly name: "liquidate";
|
|
751
|
+
readonly inputs: readonly [{
|
|
752
|
+
readonly name: "account";
|
|
753
|
+
readonly type: "tuple";
|
|
754
|
+
readonly components: readonly [{
|
|
755
|
+
readonly name: "main";
|
|
756
|
+
readonly type: "address";
|
|
757
|
+
}, {
|
|
758
|
+
readonly name: "subaccountId";
|
|
759
|
+
readonly type: "uint8";
|
|
760
|
+
}];
|
|
761
|
+
}, {
|
|
762
|
+
readonly name: "marketId";
|
|
763
|
+
readonly type: "uint32";
|
|
764
|
+
}, {
|
|
765
|
+
readonly name: "sizeX18";
|
|
766
|
+
readonly type: "uint128";
|
|
767
|
+
}];
|
|
768
|
+
readonly outputs: readonly [{
|
|
769
|
+
readonly name: "result";
|
|
770
|
+
readonly type: "tuple";
|
|
771
|
+
readonly components: readonly [{
|
|
772
|
+
readonly name: "liquidated";
|
|
773
|
+
readonly type: "tuple";
|
|
774
|
+
readonly components: readonly [{
|
|
775
|
+
readonly name: "main";
|
|
776
|
+
readonly type: "address";
|
|
777
|
+
}, {
|
|
778
|
+
readonly name: "subaccountId";
|
|
779
|
+
readonly type: "uint8";
|
|
780
|
+
}];
|
|
781
|
+
}, {
|
|
782
|
+
readonly name: "liquidator";
|
|
783
|
+
readonly type: "tuple";
|
|
784
|
+
readonly components: readonly [{
|
|
785
|
+
readonly name: "main";
|
|
786
|
+
readonly type: "address";
|
|
787
|
+
}, {
|
|
788
|
+
readonly name: "subaccountId";
|
|
789
|
+
readonly type: "uint8";
|
|
790
|
+
}];
|
|
791
|
+
}, {
|
|
792
|
+
readonly name: "marketId";
|
|
793
|
+
readonly type: "uint32";
|
|
794
|
+
}, {
|
|
795
|
+
readonly name: "sizeX18";
|
|
796
|
+
readonly type: "uint128";
|
|
797
|
+
}, {
|
|
798
|
+
readonly name: "priceX18";
|
|
799
|
+
readonly type: "uint128";
|
|
800
|
+
}, {
|
|
801
|
+
readonly name: "penaltyX18";
|
|
802
|
+
readonly type: "uint128";
|
|
803
|
+
}, {
|
|
804
|
+
readonly name: "adlTriggered";
|
|
805
|
+
readonly type: "bool";
|
|
806
|
+
}];
|
|
807
|
+
}];
|
|
808
|
+
readonly stateMutability: "nonpayable";
|
|
809
|
+
}, {
|
|
810
|
+
readonly type: "function";
|
|
811
|
+
readonly name: "getFundingRate";
|
|
812
|
+
readonly inputs: readonly [{
|
|
813
|
+
readonly name: "marketId";
|
|
814
|
+
readonly type: "uint32";
|
|
815
|
+
}];
|
|
816
|
+
readonly outputs: readonly [{
|
|
817
|
+
readonly name: "rateX18";
|
|
818
|
+
readonly type: "int128";
|
|
819
|
+
}, {
|
|
820
|
+
readonly name: "nextFundingTime";
|
|
821
|
+
readonly type: "uint64";
|
|
822
|
+
}];
|
|
823
|
+
readonly stateMutability: "view";
|
|
824
|
+
}];
|
|
825
|
+
/**
|
|
826
|
+
* LXFeed ABI (LP-9040)
|
|
827
|
+
* Mark price, index price, funding calculations
|
|
828
|
+
*/
|
|
829
|
+
export declare const LX_FEED_ABI: readonly [{
|
|
830
|
+
readonly type: "function";
|
|
831
|
+
readonly name: "getMarkPrice";
|
|
832
|
+
readonly inputs: readonly [{
|
|
833
|
+
readonly name: "marketId";
|
|
834
|
+
readonly type: "uint32";
|
|
835
|
+
}];
|
|
836
|
+
readonly outputs: readonly [{
|
|
837
|
+
readonly name: "mark";
|
|
838
|
+
readonly type: "tuple";
|
|
839
|
+
readonly components: readonly [{
|
|
840
|
+
readonly name: "indexPxX18";
|
|
841
|
+
readonly type: "uint128";
|
|
842
|
+
}, {
|
|
843
|
+
readonly name: "markPxX18";
|
|
844
|
+
readonly type: "uint128";
|
|
845
|
+
}, {
|
|
846
|
+
readonly name: "premiumX18";
|
|
847
|
+
readonly type: "int128";
|
|
848
|
+
}, {
|
|
849
|
+
readonly name: "timestamp";
|
|
850
|
+
readonly type: "uint64";
|
|
851
|
+
}];
|
|
852
|
+
}];
|
|
853
|
+
readonly stateMutability: "view";
|
|
854
|
+
}, {
|
|
855
|
+
readonly type: "function";
|
|
856
|
+
readonly name: "getIndexPrice";
|
|
857
|
+
readonly inputs: readonly [{
|
|
858
|
+
readonly name: "marketId";
|
|
859
|
+
readonly type: "uint32";
|
|
860
|
+
}];
|
|
861
|
+
readonly outputs: readonly [{
|
|
862
|
+
readonly name: "priceX18";
|
|
863
|
+
readonly type: "uint128";
|
|
864
|
+
}, {
|
|
865
|
+
readonly name: "timestamp";
|
|
866
|
+
readonly type: "uint64";
|
|
867
|
+
}];
|
|
868
|
+
readonly stateMutability: "view";
|
|
869
|
+
}, {
|
|
870
|
+
readonly type: "function";
|
|
871
|
+
readonly name: "getFundingRate";
|
|
872
|
+
readonly inputs: readonly [{
|
|
873
|
+
readonly name: "marketId";
|
|
874
|
+
readonly type: "uint32";
|
|
875
|
+
}];
|
|
876
|
+
readonly outputs: readonly [{
|
|
877
|
+
readonly name: "rateX18";
|
|
878
|
+
readonly type: "int128";
|
|
879
|
+
}, {
|
|
880
|
+
readonly name: "nextFundingTime";
|
|
881
|
+
readonly type: "uint64";
|
|
882
|
+
}];
|
|
883
|
+
readonly stateMutability: "view";
|
|
884
|
+
}, {
|
|
885
|
+
readonly type: "function";
|
|
886
|
+
readonly name: "getTriggerPrice";
|
|
887
|
+
readonly inputs: readonly [{
|
|
888
|
+
readonly name: "marketId";
|
|
889
|
+
readonly type: "uint32";
|
|
890
|
+
}, {
|
|
891
|
+
readonly name: "isBuy";
|
|
892
|
+
readonly type: "bool";
|
|
893
|
+
}];
|
|
894
|
+
readonly outputs: readonly [{
|
|
895
|
+
readonly name: "priceX18";
|
|
896
|
+
readonly type: "uint128";
|
|
897
|
+
}];
|
|
898
|
+
readonly stateMutability: "view";
|
|
899
|
+
}];
|
|
900
|
+
/**
|
|
901
|
+
* LXOracle ABI (LP-9011)
|
|
902
|
+
* Multi-source price aggregation
|
|
903
|
+
*/
|
|
904
|
+
export declare const LX_ORACLE_ABI: readonly [{
|
|
905
|
+
readonly type: "function";
|
|
906
|
+
readonly name: "getPrice";
|
|
907
|
+
readonly inputs: readonly [{
|
|
908
|
+
readonly name: "baseToken";
|
|
909
|
+
readonly type: "address";
|
|
910
|
+
}, {
|
|
911
|
+
readonly name: "quoteToken";
|
|
912
|
+
readonly type: "address";
|
|
913
|
+
}];
|
|
914
|
+
readonly outputs: readonly [{
|
|
915
|
+
readonly name: "price";
|
|
916
|
+
readonly type: "tuple";
|
|
917
|
+
readonly components: readonly [{
|
|
918
|
+
readonly name: "price";
|
|
919
|
+
readonly type: "uint256";
|
|
920
|
+
}, {
|
|
921
|
+
readonly name: "confidence";
|
|
922
|
+
readonly type: "uint256";
|
|
923
|
+
}, {
|
|
924
|
+
readonly name: "timestamp";
|
|
925
|
+
readonly type: "uint256";
|
|
926
|
+
}, {
|
|
927
|
+
readonly name: "source";
|
|
928
|
+
readonly type: "uint8";
|
|
929
|
+
}, {
|
|
930
|
+
readonly name: "expo";
|
|
931
|
+
readonly type: "int32";
|
|
932
|
+
}];
|
|
933
|
+
}];
|
|
934
|
+
readonly stateMutability: "view";
|
|
935
|
+
}, {
|
|
936
|
+
readonly type: "function";
|
|
937
|
+
readonly name: "getAggregatedPrice";
|
|
938
|
+
readonly inputs: readonly [{
|
|
939
|
+
readonly name: "baseToken";
|
|
940
|
+
readonly type: "address";
|
|
941
|
+
}, {
|
|
942
|
+
readonly name: "quoteToken";
|
|
943
|
+
readonly type: "address";
|
|
944
|
+
}, {
|
|
945
|
+
readonly name: "maxStaleness";
|
|
946
|
+
readonly type: "uint256";
|
|
947
|
+
}];
|
|
948
|
+
readonly outputs: readonly [{
|
|
949
|
+
readonly name: "aggregated";
|
|
950
|
+
readonly type: "tuple";
|
|
951
|
+
readonly components: readonly [{
|
|
952
|
+
readonly name: "price";
|
|
953
|
+
readonly type: "uint256";
|
|
954
|
+
}, {
|
|
955
|
+
readonly name: "minPrice";
|
|
956
|
+
readonly type: "uint256";
|
|
957
|
+
}, {
|
|
958
|
+
readonly name: "maxPrice";
|
|
959
|
+
readonly type: "uint256";
|
|
960
|
+
}, {
|
|
961
|
+
readonly name: "deviation";
|
|
962
|
+
readonly type: "uint256";
|
|
963
|
+
}, {
|
|
964
|
+
readonly name: "numSources";
|
|
965
|
+
readonly type: "uint256";
|
|
966
|
+
}, {
|
|
967
|
+
readonly name: "timestamp";
|
|
968
|
+
readonly type: "uint256";
|
|
969
|
+
}];
|
|
970
|
+
}];
|
|
971
|
+
readonly stateMutability: "view";
|
|
972
|
+
}, {
|
|
973
|
+
readonly type: "function";
|
|
974
|
+
readonly name: "isPriceFresh";
|
|
975
|
+
readonly inputs: readonly [{
|
|
976
|
+
readonly name: "baseToken";
|
|
977
|
+
readonly type: "address";
|
|
978
|
+
}, {
|
|
979
|
+
readonly name: "quoteToken";
|
|
980
|
+
readonly type: "address";
|
|
981
|
+
}, {
|
|
982
|
+
readonly name: "maxStaleness";
|
|
983
|
+
readonly type: "uint256";
|
|
984
|
+
}];
|
|
985
|
+
readonly outputs: readonly [{
|
|
986
|
+
readonly name: "fresh";
|
|
987
|
+
readonly type: "bool";
|
|
988
|
+
}];
|
|
989
|
+
readonly stateMutability: "view";
|
|
990
|
+
}];
|
|
400
991
|
//# sourceMappingURL=abis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../../src/precompile/abis.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../../src/precompile/abis.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuJnB,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiFlB,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;EAkBrB,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;EAajB,CAAA;AAMV;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiHd,CAAA;AAMV;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoMf,CAAA;AAMV;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDd,CAAA;AAMV;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6DhB,CAAA"}
|