@defisaver/positions-sdk 2.1.127-dev → 2.1.127-midnight-1-dev
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/cjs/config/contracts.d.ts +249 -0
- package/cjs/config/contracts.js +11 -1
- package/cjs/contracts.d.ts +1510 -0
- package/cjs/contracts.js +3 -2
- package/cjs/helpers/index.d.ts +1 -0
- package/cjs/helpers/index.js +2 -1
- package/cjs/helpers/morphoBlueHelpers/index.js +0 -1
- package/cjs/helpers/morphoMidnightHelpers/index.d.ts +50 -0
- package/cjs/helpers/morphoMidnightHelpers/index.js +170 -0
- package/cjs/index.d.ts +2 -1
- package/cjs/index.js +3 -1
- package/cjs/markets/index.d.ts +1 -0
- package/cjs/markets/index.js +4 -1
- package/cjs/markets/morphoMidnight/index.d.ts +16 -0
- package/cjs/markets/morphoMidnight/index.js +159 -0
- package/cjs/morphoBlue/index.d.ts +6 -8
- package/cjs/morphoBlue/index.js +40 -69
- package/cjs/morphoMidnight/index.d.ts +14 -0
- package/cjs/morphoMidnight/index.js +244 -0
- package/cjs/portfolio/discovery.js +4 -0
- package/cjs/portfolio/index.js +45 -1
- package/cjs/services/viem.d.ts +11 -11
- package/cjs/types/index.d.ts +1 -0
- package/cjs/types/index.js +1 -0
- package/cjs/types/morphoBlue.d.ts +0 -9
- package/cjs/types/morphoMidnight.d.ts +94 -0
- package/cjs/types/morphoMidnight.js +15 -0
- package/cjs/types/portfolio.d.ts +4 -0
- package/esm/config/contracts.d.ts +249 -0
- package/esm/config/contracts.js +9 -0
- package/esm/contracts.d.ts +1510 -0
- package/esm/contracts.js +1 -0
- package/esm/helpers/index.d.ts +1 -0
- package/esm/helpers/index.js +1 -0
- package/esm/helpers/morphoBlueHelpers/index.js +0 -1
- package/esm/helpers/morphoMidnightHelpers/index.d.ts +50 -0
- package/esm/helpers/morphoMidnightHelpers/index.js +159 -0
- package/esm/index.d.ts +2 -1
- package/esm/index.js +2 -1
- package/esm/markets/index.d.ts +1 -0
- package/esm/markets/index.js +1 -0
- package/esm/markets/morphoMidnight/index.d.ts +16 -0
- package/esm/markets/morphoMidnight/index.js +148 -0
- package/esm/morphoBlue/index.d.ts +6 -8
- package/esm/morphoBlue/index.js +39 -62
- package/esm/morphoMidnight/index.d.ts +14 -0
- package/esm/morphoMidnight/index.js +231 -0
- package/esm/portfolio/discovery.js +5 -1
- package/esm/portfolio/index.js +47 -3
- package/esm/services/viem.d.ts +11 -11
- package/esm/types/index.d.ts +1 -0
- package/esm/types/index.js +1 -0
- package/esm/types/morphoBlue.d.ts +0 -9
- package/esm/types/morphoMidnight.d.ts +94 -0
- package/esm/types/morphoMidnight.js +12 -0
- package/esm/types/portfolio.d.ts +4 -0
- package/package.json +1 -1
- package/src/config/contracts.ts +9 -0
- package/src/contracts.ts +1 -0
- package/src/helpers/index.ts +1 -0
- package/src/helpers/morphoBlueHelpers/index.ts +0 -1
- package/src/helpers/morphoMidnightHelpers/index.ts +219 -0
- package/src/index.ts +2 -0
- package/src/markets/index.ts +1 -0
- package/src/markets/morphoMidnight/index.ts +161 -0
- package/src/morphoBlue/index.ts +44 -101
- package/src/morphoMidnight/index.ts +261 -0
- package/src/portfolio/discovery.ts +6 -0
- package/src/portfolio/index.ts +46 -2
- package/src/types/index.ts +1 -0
- package/src/types/morphoBlue.ts +0 -11
- package/src/types/morphoMidnight.ts +110 -0
- package/src/types/portfolio.ts +4 -0
package/cjs/contracts.d.ts
CHANGED
|
@@ -100742,6 +100742,1516 @@ export declare const MorphoBlueViewContractViem: (client: Client, network: Netwo
|
|
|
100742
100742
|
readonly type: "function";
|
|
100743
100743
|
}];
|
|
100744
100744
|
};
|
|
100745
|
+
export declare const MorphoMidnightViewContractViem: (client: Client, network: NetworkNumber, block?: Blockish) => {
|
|
100746
|
+
read: {
|
|
100747
|
+
getRatio: (args: readonly [`0x${string}`, `0x${string}`], options?: import("viem").Prettify<import("viem").UnionOmit<import("viem").ReadContractParameters<readonly [{
|
|
100748
|
+
readonly inputs: readonly [{
|
|
100749
|
+
readonly internalType: "bytes32";
|
|
100750
|
+
readonly name: "_id";
|
|
100751
|
+
readonly type: "bytes32";
|
|
100752
|
+
}];
|
|
100753
|
+
readonly name: "getMarketInfo";
|
|
100754
|
+
readonly outputs: readonly [{
|
|
100755
|
+
readonly components: readonly [{
|
|
100756
|
+
readonly internalType: "bytes32";
|
|
100757
|
+
readonly name: "id";
|
|
100758
|
+
readonly type: "bytes32";
|
|
100759
|
+
}, {
|
|
100760
|
+
readonly internalType: "uint128";
|
|
100761
|
+
readonly name: "totalUnits";
|
|
100762
|
+
readonly type: "uint128";
|
|
100763
|
+
}, {
|
|
100764
|
+
readonly internalType: "uint128";
|
|
100765
|
+
readonly name: "lossFactor";
|
|
100766
|
+
readonly type: "uint128";
|
|
100767
|
+
}, {
|
|
100768
|
+
readonly internalType: "uint128";
|
|
100769
|
+
readonly name: "withdrawable";
|
|
100770
|
+
readonly type: "uint128";
|
|
100771
|
+
}, {
|
|
100772
|
+
readonly internalType: "uint128";
|
|
100773
|
+
readonly name: "continuousFeeCredit";
|
|
100774
|
+
readonly type: "uint128";
|
|
100775
|
+
}, {
|
|
100776
|
+
readonly internalType: "uint16[7]";
|
|
100777
|
+
readonly name: "settlementFees";
|
|
100778
|
+
readonly type: "uint16[7]";
|
|
100779
|
+
}, {
|
|
100780
|
+
readonly internalType: "uint32";
|
|
100781
|
+
readonly name: "continuousFee";
|
|
100782
|
+
readonly type: "uint32";
|
|
100783
|
+
}, {
|
|
100784
|
+
readonly internalType: "uint8";
|
|
100785
|
+
readonly name: "tickSpacing";
|
|
100786
|
+
readonly type: "uint8";
|
|
100787
|
+
}, {
|
|
100788
|
+
readonly internalType: "uint256[]";
|
|
100789
|
+
readonly name: "prices";
|
|
100790
|
+
readonly type: "uint256[]";
|
|
100791
|
+
}];
|
|
100792
|
+
readonly internalType: "struct MidnightView.MarketInfo";
|
|
100793
|
+
readonly name: "info";
|
|
100794
|
+
readonly type: "tuple";
|
|
100795
|
+
}];
|
|
100796
|
+
readonly stateMutability: "view";
|
|
100797
|
+
readonly type: "function";
|
|
100798
|
+
}, {
|
|
100799
|
+
readonly inputs: readonly [{
|
|
100800
|
+
readonly internalType: "bytes32";
|
|
100801
|
+
readonly name: "_id";
|
|
100802
|
+
readonly type: "bytes32";
|
|
100803
|
+
}, {
|
|
100804
|
+
readonly internalType: "address";
|
|
100805
|
+
readonly name: "_user";
|
|
100806
|
+
readonly type: "address";
|
|
100807
|
+
}];
|
|
100808
|
+
readonly name: "getPositionInfo";
|
|
100809
|
+
readonly outputs: readonly [{
|
|
100810
|
+
readonly components: readonly [{
|
|
100811
|
+
readonly internalType: "uint128";
|
|
100812
|
+
readonly name: "credit";
|
|
100813
|
+
readonly type: "uint128";
|
|
100814
|
+
}, {
|
|
100815
|
+
readonly internalType: "uint128";
|
|
100816
|
+
readonly name: "pendingFee";
|
|
100817
|
+
readonly type: "uint128";
|
|
100818
|
+
}, {
|
|
100819
|
+
readonly internalType: "uint128";
|
|
100820
|
+
readonly name: "debt";
|
|
100821
|
+
readonly type: "uint128";
|
|
100822
|
+
}, {
|
|
100823
|
+
readonly internalType: "uint128";
|
|
100824
|
+
readonly name: "collateralBitmap";
|
|
100825
|
+
readonly type: "uint128";
|
|
100826
|
+
}, {
|
|
100827
|
+
readonly internalType: "uint128[]";
|
|
100828
|
+
readonly name: "collateral";
|
|
100829
|
+
readonly type: "uint128[]";
|
|
100830
|
+
}, {
|
|
100831
|
+
readonly internalType: "uint256";
|
|
100832
|
+
readonly name: "ratio";
|
|
100833
|
+
readonly type: "uint256";
|
|
100834
|
+
}];
|
|
100835
|
+
readonly internalType: "struct MidnightView.PositionInfo";
|
|
100836
|
+
readonly name: "pos";
|
|
100837
|
+
readonly type: "tuple";
|
|
100838
|
+
}];
|
|
100839
|
+
readonly stateMutability: "view";
|
|
100840
|
+
readonly type: "function";
|
|
100841
|
+
}, {
|
|
100842
|
+
readonly inputs: readonly [{
|
|
100843
|
+
readonly internalType: "bytes32";
|
|
100844
|
+
readonly name: "_id";
|
|
100845
|
+
readonly type: "bytes32";
|
|
100846
|
+
}, {
|
|
100847
|
+
readonly internalType: "address";
|
|
100848
|
+
readonly name: "_user";
|
|
100849
|
+
readonly type: "address";
|
|
100850
|
+
}];
|
|
100851
|
+
readonly name: "getRatio";
|
|
100852
|
+
readonly outputs: readonly [{
|
|
100853
|
+
readonly internalType: "uint256";
|
|
100854
|
+
readonly name: "ratio";
|
|
100855
|
+
readonly type: "uint256";
|
|
100856
|
+
}];
|
|
100857
|
+
readonly stateMutability: "view";
|
|
100858
|
+
readonly type: "function";
|
|
100859
|
+
}, {
|
|
100860
|
+
readonly inputs: readonly [{
|
|
100861
|
+
readonly components: readonly [{
|
|
100862
|
+
readonly internalType: "uint256";
|
|
100863
|
+
readonly name: "chainId";
|
|
100864
|
+
readonly type: "uint256";
|
|
100865
|
+
}, {
|
|
100866
|
+
readonly internalType: "address";
|
|
100867
|
+
readonly name: "midnight";
|
|
100868
|
+
readonly type: "address";
|
|
100869
|
+
}, {
|
|
100870
|
+
readonly internalType: "address";
|
|
100871
|
+
readonly name: "loanToken";
|
|
100872
|
+
readonly type: "address";
|
|
100873
|
+
}, {
|
|
100874
|
+
readonly components: readonly [{
|
|
100875
|
+
readonly internalType: "address";
|
|
100876
|
+
readonly name: "token";
|
|
100877
|
+
readonly type: "address";
|
|
100878
|
+
}, {
|
|
100879
|
+
readonly internalType: "uint256";
|
|
100880
|
+
readonly name: "lltv";
|
|
100881
|
+
readonly type: "uint256";
|
|
100882
|
+
}, {
|
|
100883
|
+
readonly internalType: "uint256";
|
|
100884
|
+
readonly name: "liquidationCursor";
|
|
100885
|
+
readonly type: "uint256";
|
|
100886
|
+
}, {
|
|
100887
|
+
readonly internalType: "address";
|
|
100888
|
+
readonly name: "oracle";
|
|
100889
|
+
readonly type: "address";
|
|
100890
|
+
}];
|
|
100891
|
+
readonly internalType: "struct CollateralParams[]";
|
|
100892
|
+
readonly name: "collateralParams";
|
|
100893
|
+
readonly type: "tuple[]";
|
|
100894
|
+
}, {
|
|
100895
|
+
readonly internalType: "uint256";
|
|
100896
|
+
readonly name: "maturity";
|
|
100897
|
+
readonly type: "uint256";
|
|
100898
|
+
}, {
|
|
100899
|
+
readonly internalType: "uint256";
|
|
100900
|
+
readonly name: "rcfThreshold";
|
|
100901
|
+
readonly type: "uint256";
|
|
100902
|
+
}, {
|
|
100903
|
+
readonly internalType: "address";
|
|
100904
|
+
readonly name: "enterGate";
|
|
100905
|
+
readonly type: "address";
|
|
100906
|
+
}, {
|
|
100907
|
+
readonly internalType: "address";
|
|
100908
|
+
readonly name: "liquidatorGate";
|
|
100909
|
+
readonly type: "address";
|
|
100910
|
+
}];
|
|
100911
|
+
readonly internalType: "struct Market";
|
|
100912
|
+
readonly name: "_market";
|
|
100913
|
+
readonly type: "tuple";
|
|
100914
|
+
}];
|
|
100915
|
+
readonly name: "toId";
|
|
100916
|
+
readonly outputs: readonly [{
|
|
100917
|
+
readonly internalType: "bytes32";
|
|
100918
|
+
readonly name: "id";
|
|
100919
|
+
readonly type: "bytes32";
|
|
100920
|
+
}];
|
|
100921
|
+
readonly stateMutability: "pure";
|
|
100922
|
+
readonly type: "function";
|
|
100923
|
+
}, {
|
|
100924
|
+
readonly inputs: readonly [{
|
|
100925
|
+
readonly internalType: "bytes32";
|
|
100926
|
+
readonly name: "_id";
|
|
100927
|
+
readonly type: "bytes32";
|
|
100928
|
+
}];
|
|
100929
|
+
readonly name: "toMarket";
|
|
100930
|
+
readonly outputs: readonly [{
|
|
100931
|
+
readonly components: readonly [{
|
|
100932
|
+
readonly internalType: "uint256";
|
|
100933
|
+
readonly name: "chainId";
|
|
100934
|
+
readonly type: "uint256";
|
|
100935
|
+
}, {
|
|
100936
|
+
readonly internalType: "address";
|
|
100937
|
+
readonly name: "midnight";
|
|
100938
|
+
readonly type: "address";
|
|
100939
|
+
}, {
|
|
100940
|
+
readonly internalType: "address";
|
|
100941
|
+
readonly name: "loanToken";
|
|
100942
|
+
readonly type: "address";
|
|
100943
|
+
}, {
|
|
100944
|
+
readonly components: readonly [{
|
|
100945
|
+
readonly internalType: "address";
|
|
100946
|
+
readonly name: "token";
|
|
100947
|
+
readonly type: "address";
|
|
100948
|
+
}, {
|
|
100949
|
+
readonly internalType: "uint256";
|
|
100950
|
+
readonly name: "lltv";
|
|
100951
|
+
readonly type: "uint256";
|
|
100952
|
+
}, {
|
|
100953
|
+
readonly internalType: "uint256";
|
|
100954
|
+
readonly name: "liquidationCursor";
|
|
100955
|
+
readonly type: "uint256";
|
|
100956
|
+
}, {
|
|
100957
|
+
readonly internalType: "address";
|
|
100958
|
+
readonly name: "oracle";
|
|
100959
|
+
readonly type: "address";
|
|
100960
|
+
}];
|
|
100961
|
+
readonly internalType: "struct CollateralParams[]";
|
|
100962
|
+
readonly name: "collateralParams";
|
|
100963
|
+
readonly type: "tuple[]";
|
|
100964
|
+
}, {
|
|
100965
|
+
readonly internalType: "uint256";
|
|
100966
|
+
readonly name: "maturity";
|
|
100967
|
+
readonly type: "uint256";
|
|
100968
|
+
}, {
|
|
100969
|
+
readonly internalType: "uint256";
|
|
100970
|
+
readonly name: "rcfThreshold";
|
|
100971
|
+
readonly type: "uint256";
|
|
100972
|
+
}, {
|
|
100973
|
+
readonly internalType: "address";
|
|
100974
|
+
readonly name: "enterGate";
|
|
100975
|
+
readonly type: "address";
|
|
100976
|
+
}, {
|
|
100977
|
+
readonly internalType: "address";
|
|
100978
|
+
readonly name: "liquidatorGate";
|
|
100979
|
+
readonly type: "address";
|
|
100980
|
+
}];
|
|
100981
|
+
readonly internalType: "struct Market";
|
|
100982
|
+
readonly name: "market";
|
|
100983
|
+
readonly type: "tuple";
|
|
100984
|
+
}];
|
|
100985
|
+
readonly stateMutability: "view";
|
|
100986
|
+
readonly type: "function";
|
|
100987
|
+
}], "getRatio", readonly [`0x${string}`, `0x${string}`]>, "address" | "args" | "abi" | "functionName">> | undefined) => Promise<bigint>;
|
|
100988
|
+
getMarketInfo: (args: readonly [`0x${string}`], options?: import("viem").Prettify<import("viem").UnionOmit<import("viem").ReadContractParameters<readonly [{
|
|
100989
|
+
readonly inputs: readonly [{
|
|
100990
|
+
readonly internalType: "bytes32";
|
|
100991
|
+
readonly name: "_id";
|
|
100992
|
+
readonly type: "bytes32";
|
|
100993
|
+
}];
|
|
100994
|
+
readonly name: "getMarketInfo";
|
|
100995
|
+
readonly outputs: readonly [{
|
|
100996
|
+
readonly components: readonly [{
|
|
100997
|
+
readonly internalType: "bytes32";
|
|
100998
|
+
readonly name: "id";
|
|
100999
|
+
readonly type: "bytes32";
|
|
101000
|
+
}, {
|
|
101001
|
+
readonly internalType: "uint128";
|
|
101002
|
+
readonly name: "totalUnits";
|
|
101003
|
+
readonly type: "uint128";
|
|
101004
|
+
}, {
|
|
101005
|
+
readonly internalType: "uint128";
|
|
101006
|
+
readonly name: "lossFactor";
|
|
101007
|
+
readonly type: "uint128";
|
|
101008
|
+
}, {
|
|
101009
|
+
readonly internalType: "uint128";
|
|
101010
|
+
readonly name: "withdrawable";
|
|
101011
|
+
readonly type: "uint128";
|
|
101012
|
+
}, {
|
|
101013
|
+
readonly internalType: "uint128";
|
|
101014
|
+
readonly name: "continuousFeeCredit";
|
|
101015
|
+
readonly type: "uint128";
|
|
101016
|
+
}, {
|
|
101017
|
+
readonly internalType: "uint16[7]";
|
|
101018
|
+
readonly name: "settlementFees";
|
|
101019
|
+
readonly type: "uint16[7]";
|
|
101020
|
+
}, {
|
|
101021
|
+
readonly internalType: "uint32";
|
|
101022
|
+
readonly name: "continuousFee";
|
|
101023
|
+
readonly type: "uint32";
|
|
101024
|
+
}, {
|
|
101025
|
+
readonly internalType: "uint8";
|
|
101026
|
+
readonly name: "tickSpacing";
|
|
101027
|
+
readonly type: "uint8";
|
|
101028
|
+
}, {
|
|
101029
|
+
readonly internalType: "uint256[]";
|
|
101030
|
+
readonly name: "prices";
|
|
101031
|
+
readonly type: "uint256[]";
|
|
101032
|
+
}];
|
|
101033
|
+
readonly internalType: "struct MidnightView.MarketInfo";
|
|
101034
|
+
readonly name: "info";
|
|
101035
|
+
readonly type: "tuple";
|
|
101036
|
+
}];
|
|
101037
|
+
readonly stateMutability: "view";
|
|
101038
|
+
readonly type: "function";
|
|
101039
|
+
}, {
|
|
101040
|
+
readonly inputs: readonly [{
|
|
101041
|
+
readonly internalType: "bytes32";
|
|
101042
|
+
readonly name: "_id";
|
|
101043
|
+
readonly type: "bytes32";
|
|
101044
|
+
}, {
|
|
101045
|
+
readonly internalType: "address";
|
|
101046
|
+
readonly name: "_user";
|
|
101047
|
+
readonly type: "address";
|
|
101048
|
+
}];
|
|
101049
|
+
readonly name: "getPositionInfo";
|
|
101050
|
+
readonly outputs: readonly [{
|
|
101051
|
+
readonly components: readonly [{
|
|
101052
|
+
readonly internalType: "uint128";
|
|
101053
|
+
readonly name: "credit";
|
|
101054
|
+
readonly type: "uint128";
|
|
101055
|
+
}, {
|
|
101056
|
+
readonly internalType: "uint128";
|
|
101057
|
+
readonly name: "pendingFee";
|
|
101058
|
+
readonly type: "uint128";
|
|
101059
|
+
}, {
|
|
101060
|
+
readonly internalType: "uint128";
|
|
101061
|
+
readonly name: "debt";
|
|
101062
|
+
readonly type: "uint128";
|
|
101063
|
+
}, {
|
|
101064
|
+
readonly internalType: "uint128";
|
|
101065
|
+
readonly name: "collateralBitmap";
|
|
101066
|
+
readonly type: "uint128";
|
|
101067
|
+
}, {
|
|
101068
|
+
readonly internalType: "uint128[]";
|
|
101069
|
+
readonly name: "collateral";
|
|
101070
|
+
readonly type: "uint128[]";
|
|
101071
|
+
}, {
|
|
101072
|
+
readonly internalType: "uint256";
|
|
101073
|
+
readonly name: "ratio";
|
|
101074
|
+
readonly type: "uint256";
|
|
101075
|
+
}];
|
|
101076
|
+
readonly internalType: "struct MidnightView.PositionInfo";
|
|
101077
|
+
readonly name: "pos";
|
|
101078
|
+
readonly type: "tuple";
|
|
101079
|
+
}];
|
|
101080
|
+
readonly stateMutability: "view";
|
|
101081
|
+
readonly type: "function";
|
|
101082
|
+
}, {
|
|
101083
|
+
readonly inputs: readonly [{
|
|
101084
|
+
readonly internalType: "bytes32";
|
|
101085
|
+
readonly name: "_id";
|
|
101086
|
+
readonly type: "bytes32";
|
|
101087
|
+
}, {
|
|
101088
|
+
readonly internalType: "address";
|
|
101089
|
+
readonly name: "_user";
|
|
101090
|
+
readonly type: "address";
|
|
101091
|
+
}];
|
|
101092
|
+
readonly name: "getRatio";
|
|
101093
|
+
readonly outputs: readonly [{
|
|
101094
|
+
readonly internalType: "uint256";
|
|
101095
|
+
readonly name: "ratio";
|
|
101096
|
+
readonly type: "uint256";
|
|
101097
|
+
}];
|
|
101098
|
+
readonly stateMutability: "view";
|
|
101099
|
+
readonly type: "function";
|
|
101100
|
+
}, {
|
|
101101
|
+
readonly inputs: readonly [{
|
|
101102
|
+
readonly components: readonly [{
|
|
101103
|
+
readonly internalType: "uint256";
|
|
101104
|
+
readonly name: "chainId";
|
|
101105
|
+
readonly type: "uint256";
|
|
101106
|
+
}, {
|
|
101107
|
+
readonly internalType: "address";
|
|
101108
|
+
readonly name: "midnight";
|
|
101109
|
+
readonly type: "address";
|
|
101110
|
+
}, {
|
|
101111
|
+
readonly internalType: "address";
|
|
101112
|
+
readonly name: "loanToken";
|
|
101113
|
+
readonly type: "address";
|
|
101114
|
+
}, {
|
|
101115
|
+
readonly components: readonly [{
|
|
101116
|
+
readonly internalType: "address";
|
|
101117
|
+
readonly name: "token";
|
|
101118
|
+
readonly type: "address";
|
|
101119
|
+
}, {
|
|
101120
|
+
readonly internalType: "uint256";
|
|
101121
|
+
readonly name: "lltv";
|
|
101122
|
+
readonly type: "uint256";
|
|
101123
|
+
}, {
|
|
101124
|
+
readonly internalType: "uint256";
|
|
101125
|
+
readonly name: "liquidationCursor";
|
|
101126
|
+
readonly type: "uint256";
|
|
101127
|
+
}, {
|
|
101128
|
+
readonly internalType: "address";
|
|
101129
|
+
readonly name: "oracle";
|
|
101130
|
+
readonly type: "address";
|
|
101131
|
+
}];
|
|
101132
|
+
readonly internalType: "struct CollateralParams[]";
|
|
101133
|
+
readonly name: "collateralParams";
|
|
101134
|
+
readonly type: "tuple[]";
|
|
101135
|
+
}, {
|
|
101136
|
+
readonly internalType: "uint256";
|
|
101137
|
+
readonly name: "maturity";
|
|
101138
|
+
readonly type: "uint256";
|
|
101139
|
+
}, {
|
|
101140
|
+
readonly internalType: "uint256";
|
|
101141
|
+
readonly name: "rcfThreshold";
|
|
101142
|
+
readonly type: "uint256";
|
|
101143
|
+
}, {
|
|
101144
|
+
readonly internalType: "address";
|
|
101145
|
+
readonly name: "enterGate";
|
|
101146
|
+
readonly type: "address";
|
|
101147
|
+
}, {
|
|
101148
|
+
readonly internalType: "address";
|
|
101149
|
+
readonly name: "liquidatorGate";
|
|
101150
|
+
readonly type: "address";
|
|
101151
|
+
}];
|
|
101152
|
+
readonly internalType: "struct Market";
|
|
101153
|
+
readonly name: "_market";
|
|
101154
|
+
readonly type: "tuple";
|
|
101155
|
+
}];
|
|
101156
|
+
readonly name: "toId";
|
|
101157
|
+
readonly outputs: readonly [{
|
|
101158
|
+
readonly internalType: "bytes32";
|
|
101159
|
+
readonly name: "id";
|
|
101160
|
+
readonly type: "bytes32";
|
|
101161
|
+
}];
|
|
101162
|
+
readonly stateMutability: "pure";
|
|
101163
|
+
readonly type: "function";
|
|
101164
|
+
}, {
|
|
101165
|
+
readonly inputs: readonly [{
|
|
101166
|
+
readonly internalType: "bytes32";
|
|
101167
|
+
readonly name: "_id";
|
|
101168
|
+
readonly type: "bytes32";
|
|
101169
|
+
}];
|
|
101170
|
+
readonly name: "toMarket";
|
|
101171
|
+
readonly outputs: readonly [{
|
|
101172
|
+
readonly components: readonly [{
|
|
101173
|
+
readonly internalType: "uint256";
|
|
101174
|
+
readonly name: "chainId";
|
|
101175
|
+
readonly type: "uint256";
|
|
101176
|
+
}, {
|
|
101177
|
+
readonly internalType: "address";
|
|
101178
|
+
readonly name: "midnight";
|
|
101179
|
+
readonly type: "address";
|
|
101180
|
+
}, {
|
|
101181
|
+
readonly internalType: "address";
|
|
101182
|
+
readonly name: "loanToken";
|
|
101183
|
+
readonly type: "address";
|
|
101184
|
+
}, {
|
|
101185
|
+
readonly components: readonly [{
|
|
101186
|
+
readonly internalType: "address";
|
|
101187
|
+
readonly name: "token";
|
|
101188
|
+
readonly type: "address";
|
|
101189
|
+
}, {
|
|
101190
|
+
readonly internalType: "uint256";
|
|
101191
|
+
readonly name: "lltv";
|
|
101192
|
+
readonly type: "uint256";
|
|
101193
|
+
}, {
|
|
101194
|
+
readonly internalType: "uint256";
|
|
101195
|
+
readonly name: "liquidationCursor";
|
|
101196
|
+
readonly type: "uint256";
|
|
101197
|
+
}, {
|
|
101198
|
+
readonly internalType: "address";
|
|
101199
|
+
readonly name: "oracle";
|
|
101200
|
+
readonly type: "address";
|
|
101201
|
+
}];
|
|
101202
|
+
readonly internalType: "struct CollateralParams[]";
|
|
101203
|
+
readonly name: "collateralParams";
|
|
101204
|
+
readonly type: "tuple[]";
|
|
101205
|
+
}, {
|
|
101206
|
+
readonly internalType: "uint256";
|
|
101207
|
+
readonly name: "maturity";
|
|
101208
|
+
readonly type: "uint256";
|
|
101209
|
+
}, {
|
|
101210
|
+
readonly internalType: "uint256";
|
|
101211
|
+
readonly name: "rcfThreshold";
|
|
101212
|
+
readonly type: "uint256";
|
|
101213
|
+
}, {
|
|
101214
|
+
readonly internalType: "address";
|
|
101215
|
+
readonly name: "enterGate";
|
|
101216
|
+
readonly type: "address";
|
|
101217
|
+
}, {
|
|
101218
|
+
readonly internalType: "address";
|
|
101219
|
+
readonly name: "liquidatorGate";
|
|
101220
|
+
readonly type: "address";
|
|
101221
|
+
}];
|
|
101222
|
+
readonly internalType: "struct Market";
|
|
101223
|
+
readonly name: "market";
|
|
101224
|
+
readonly type: "tuple";
|
|
101225
|
+
}];
|
|
101226
|
+
readonly stateMutability: "view";
|
|
101227
|
+
readonly type: "function";
|
|
101228
|
+
}], "getMarketInfo", readonly [`0x${string}`]>, "address" | "args" | "abi" | "functionName">> | undefined) => Promise<{
|
|
101229
|
+
id: `0x${string}`;
|
|
101230
|
+
totalUnits: bigint;
|
|
101231
|
+
lossFactor: bigint;
|
|
101232
|
+
withdrawable: bigint;
|
|
101233
|
+
continuousFeeCredit: bigint;
|
|
101234
|
+
settlementFees: readonly [number, number, number, number, number, number, number];
|
|
101235
|
+
continuousFee: number;
|
|
101236
|
+
tickSpacing: number;
|
|
101237
|
+
prices: readonly bigint[];
|
|
101238
|
+
}>;
|
|
101239
|
+
getPositionInfo: (args: readonly [`0x${string}`, `0x${string}`], options?: import("viem").Prettify<import("viem").UnionOmit<import("viem").ReadContractParameters<readonly [{
|
|
101240
|
+
readonly inputs: readonly [{
|
|
101241
|
+
readonly internalType: "bytes32";
|
|
101242
|
+
readonly name: "_id";
|
|
101243
|
+
readonly type: "bytes32";
|
|
101244
|
+
}];
|
|
101245
|
+
readonly name: "getMarketInfo";
|
|
101246
|
+
readonly outputs: readonly [{
|
|
101247
|
+
readonly components: readonly [{
|
|
101248
|
+
readonly internalType: "bytes32";
|
|
101249
|
+
readonly name: "id";
|
|
101250
|
+
readonly type: "bytes32";
|
|
101251
|
+
}, {
|
|
101252
|
+
readonly internalType: "uint128";
|
|
101253
|
+
readonly name: "totalUnits";
|
|
101254
|
+
readonly type: "uint128";
|
|
101255
|
+
}, {
|
|
101256
|
+
readonly internalType: "uint128";
|
|
101257
|
+
readonly name: "lossFactor";
|
|
101258
|
+
readonly type: "uint128";
|
|
101259
|
+
}, {
|
|
101260
|
+
readonly internalType: "uint128";
|
|
101261
|
+
readonly name: "withdrawable";
|
|
101262
|
+
readonly type: "uint128";
|
|
101263
|
+
}, {
|
|
101264
|
+
readonly internalType: "uint128";
|
|
101265
|
+
readonly name: "continuousFeeCredit";
|
|
101266
|
+
readonly type: "uint128";
|
|
101267
|
+
}, {
|
|
101268
|
+
readonly internalType: "uint16[7]";
|
|
101269
|
+
readonly name: "settlementFees";
|
|
101270
|
+
readonly type: "uint16[7]";
|
|
101271
|
+
}, {
|
|
101272
|
+
readonly internalType: "uint32";
|
|
101273
|
+
readonly name: "continuousFee";
|
|
101274
|
+
readonly type: "uint32";
|
|
101275
|
+
}, {
|
|
101276
|
+
readonly internalType: "uint8";
|
|
101277
|
+
readonly name: "tickSpacing";
|
|
101278
|
+
readonly type: "uint8";
|
|
101279
|
+
}, {
|
|
101280
|
+
readonly internalType: "uint256[]";
|
|
101281
|
+
readonly name: "prices";
|
|
101282
|
+
readonly type: "uint256[]";
|
|
101283
|
+
}];
|
|
101284
|
+
readonly internalType: "struct MidnightView.MarketInfo";
|
|
101285
|
+
readonly name: "info";
|
|
101286
|
+
readonly type: "tuple";
|
|
101287
|
+
}];
|
|
101288
|
+
readonly stateMutability: "view";
|
|
101289
|
+
readonly type: "function";
|
|
101290
|
+
}, {
|
|
101291
|
+
readonly inputs: readonly [{
|
|
101292
|
+
readonly internalType: "bytes32";
|
|
101293
|
+
readonly name: "_id";
|
|
101294
|
+
readonly type: "bytes32";
|
|
101295
|
+
}, {
|
|
101296
|
+
readonly internalType: "address";
|
|
101297
|
+
readonly name: "_user";
|
|
101298
|
+
readonly type: "address";
|
|
101299
|
+
}];
|
|
101300
|
+
readonly name: "getPositionInfo";
|
|
101301
|
+
readonly outputs: readonly [{
|
|
101302
|
+
readonly components: readonly [{
|
|
101303
|
+
readonly internalType: "uint128";
|
|
101304
|
+
readonly name: "credit";
|
|
101305
|
+
readonly type: "uint128";
|
|
101306
|
+
}, {
|
|
101307
|
+
readonly internalType: "uint128";
|
|
101308
|
+
readonly name: "pendingFee";
|
|
101309
|
+
readonly type: "uint128";
|
|
101310
|
+
}, {
|
|
101311
|
+
readonly internalType: "uint128";
|
|
101312
|
+
readonly name: "debt";
|
|
101313
|
+
readonly type: "uint128";
|
|
101314
|
+
}, {
|
|
101315
|
+
readonly internalType: "uint128";
|
|
101316
|
+
readonly name: "collateralBitmap";
|
|
101317
|
+
readonly type: "uint128";
|
|
101318
|
+
}, {
|
|
101319
|
+
readonly internalType: "uint128[]";
|
|
101320
|
+
readonly name: "collateral";
|
|
101321
|
+
readonly type: "uint128[]";
|
|
101322
|
+
}, {
|
|
101323
|
+
readonly internalType: "uint256";
|
|
101324
|
+
readonly name: "ratio";
|
|
101325
|
+
readonly type: "uint256";
|
|
101326
|
+
}];
|
|
101327
|
+
readonly internalType: "struct MidnightView.PositionInfo";
|
|
101328
|
+
readonly name: "pos";
|
|
101329
|
+
readonly type: "tuple";
|
|
101330
|
+
}];
|
|
101331
|
+
readonly stateMutability: "view";
|
|
101332
|
+
readonly type: "function";
|
|
101333
|
+
}, {
|
|
101334
|
+
readonly inputs: readonly [{
|
|
101335
|
+
readonly internalType: "bytes32";
|
|
101336
|
+
readonly name: "_id";
|
|
101337
|
+
readonly type: "bytes32";
|
|
101338
|
+
}, {
|
|
101339
|
+
readonly internalType: "address";
|
|
101340
|
+
readonly name: "_user";
|
|
101341
|
+
readonly type: "address";
|
|
101342
|
+
}];
|
|
101343
|
+
readonly name: "getRatio";
|
|
101344
|
+
readonly outputs: readonly [{
|
|
101345
|
+
readonly internalType: "uint256";
|
|
101346
|
+
readonly name: "ratio";
|
|
101347
|
+
readonly type: "uint256";
|
|
101348
|
+
}];
|
|
101349
|
+
readonly stateMutability: "view";
|
|
101350
|
+
readonly type: "function";
|
|
101351
|
+
}, {
|
|
101352
|
+
readonly inputs: readonly [{
|
|
101353
|
+
readonly components: readonly [{
|
|
101354
|
+
readonly internalType: "uint256";
|
|
101355
|
+
readonly name: "chainId";
|
|
101356
|
+
readonly type: "uint256";
|
|
101357
|
+
}, {
|
|
101358
|
+
readonly internalType: "address";
|
|
101359
|
+
readonly name: "midnight";
|
|
101360
|
+
readonly type: "address";
|
|
101361
|
+
}, {
|
|
101362
|
+
readonly internalType: "address";
|
|
101363
|
+
readonly name: "loanToken";
|
|
101364
|
+
readonly type: "address";
|
|
101365
|
+
}, {
|
|
101366
|
+
readonly components: readonly [{
|
|
101367
|
+
readonly internalType: "address";
|
|
101368
|
+
readonly name: "token";
|
|
101369
|
+
readonly type: "address";
|
|
101370
|
+
}, {
|
|
101371
|
+
readonly internalType: "uint256";
|
|
101372
|
+
readonly name: "lltv";
|
|
101373
|
+
readonly type: "uint256";
|
|
101374
|
+
}, {
|
|
101375
|
+
readonly internalType: "uint256";
|
|
101376
|
+
readonly name: "liquidationCursor";
|
|
101377
|
+
readonly type: "uint256";
|
|
101378
|
+
}, {
|
|
101379
|
+
readonly internalType: "address";
|
|
101380
|
+
readonly name: "oracle";
|
|
101381
|
+
readonly type: "address";
|
|
101382
|
+
}];
|
|
101383
|
+
readonly internalType: "struct CollateralParams[]";
|
|
101384
|
+
readonly name: "collateralParams";
|
|
101385
|
+
readonly type: "tuple[]";
|
|
101386
|
+
}, {
|
|
101387
|
+
readonly internalType: "uint256";
|
|
101388
|
+
readonly name: "maturity";
|
|
101389
|
+
readonly type: "uint256";
|
|
101390
|
+
}, {
|
|
101391
|
+
readonly internalType: "uint256";
|
|
101392
|
+
readonly name: "rcfThreshold";
|
|
101393
|
+
readonly type: "uint256";
|
|
101394
|
+
}, {
|
|
101395
|
+
readonly internalType: "address";
|
|
101396
|
+
readonly name: "enterGate";
|
|
101397
|
+
readonly type: "address";
|
|
101398
|
+
}, {
|
|
101399
|
+
readonly internalType: "address";
|
|
101400
|
+
readonly name: "liquidatorGate";
|
|
101401
|
+
readonly type: "address";
|
|
101402
|
+
}];
|
|
101403
|
+
readonly internalType: "struct Market";
|
|
101404
|
+
readonly name: "_market";
|
|
101405
|
+
readonly type: "tuple";
|
|
101406
|
+
}];
|
|
101407
|
+
readonly name: "toId";
|
|
101408
|
+
readonly outputs: readonly [{
|
|
101409
|
+
readonly internalType: "bytes32";
|
|
101410
|
+
readonly name: "id";
|
|
101411
|
+
readonly type: "bytes32";
|
|
101412
|
+
}];
|
|
101413
|
+
readonly stateMutability: "pure";
|
|
101414
|
+
readonly type: "function";
|
|
101415
|
+
}, {
|
|
101416
|
+
readonly inputs: readonly [{
|
|
101417
|
+
readonly internalType: "bytes32";
|
|
101418
|
+
readonly name: "_id";
|
|
101419
|
+
readonly type: "bytes32";
|
|
101420
|
+
}];
|
|
101421
|
+
readonly name: "toMarket";
|
|
101422
|
+
readonly outputs: readonly [{
|
|
101423
|
+
readonly components: readonly [{
|
|
101424
|
+
readonly internalType: "uint256";
|
|
101425
|
+
readonly name: "chainId";
|
|
101426
|
+
readonly type: "uint256";
|
|
101427
|
+
}, {
|
|
101428
|
+
readonly internalType: "address";
|
|
101429
|
+
readonly name: "midnight";
|
|
101430
|
+
readonly type: "address";
|
|
101431
|
+
}, {
|
|
101432
|
+
readonly internalType: "address";
|
|
101433
|
+
readonly name: "loanToken";
|
|
101434
|
+
readonly type: "address";
|
|
101435
|
+
}, {
|
|
101436
|
+
readonly components: readonly [{
|
|
101437
|
+
readonly internalType: "address";
|
|
101438
|
+
readonly name: "token";
|
|
101439
|
+
readonly type: "address";
|
|
101440
|
+
}, {
|
|
101441
|
+
readonly internalType: "uint256";
|
|
101442
|
+
readonly name: "lltv";
|
|
101443
|
+
readonly type: "uint256";
|
|
101444
|
+
}, {
|
|
101445
|
+
readonly internalType: "uint256";
|
|
101446
|
+
readonly name: "liquidationCursor";
|
|
101447
|
+
readonly type: "uint256";
|
|
101448
|
+
}, {
|
|
101449
|
+
readonly internalType: "address";
|
|
101450
|
+
readonly name: "oracle";
|
|
101451
|
+
readonly type: "address";
|
|
101452
|
+
}];
|
|
101453
|
+
readonly internalType: "struct CollateralParams[]";
|
|
101454
|
+
readonly name: "collateralParams";
|
|
101455
|
+
readonly type: "tuple[]";
|
|
101456
|
+
}, {
|
|
101457
|
+
readonly internalType: "uint256";
|
|
101458
|
+
readonly name: "maturity";
|
|
101459
|
+
readonly type: "uint256";
|
|
101460
|
+
}, {
|
|
101461
|
+
readonly internalType: "uint256";
|
|
101462
|
+
readonly name: "rcfThreshold";
|
|
101463
|
+
readonly type: "uint256";
|
|
101464
|
+
}, {
|
|
101465
|
+
readonly internalType: "address";
|
|
101466
|
+
readonly name: "enterGate";
|
|
101467
|
+
readonly type: "address";
|
|
101468
|
+
}, {
|
|
101469
|
+
readonly internalType: "address";
|
|
101470
|
+
readonly name: "liquidatorGate";
|
|
101471
|
+
readonly type: "address";
|
|
101472
|
+
}];
|
|
101473
|
+
readonly internalType: "struct Market";
|
|
101474
|
+
readonly name: "market";
|
|
101475
|
+
readonly type: "tuple";
|
|
101476
|
+
}];
|
|
101477
|
+
readonly stateMutability: "view";
|
|
101478
|
+
readonly type: "function";
|
|
101479
|
+
}], "getPositionInfo", readonly [`0x${string}`, `0x${string}`]>, "address" | "args" | "abi" | "functionName">> | undefined) => Promise<{
|
|
101480
|
+
credit: bigint;
|
|
101481
|
+
pendingFee: bigint;
|
|
101482
|
+
debt: bigint;
|
|
101483
|
+
collateralBitmap: bigint;
|
|
101484
|
+
collateral: readonly bigint[];
|
|
101485
|
+
ratio: bigint;
|
|
101486
|
+
}>;
|
|
101487
|
+
toId: (args: readonly [{
|
|
101488
|
+
chainId: bigint;
|
|
101489
|
+
midnight: `0x${string}`;
|
|
101490
|
+
loanToken: `0x${string}`;
|
|
101491
|
+
collateralParams: readonly {
|
|
101492
|
+
token: `0x${string}`;
|
|
101493
|
+
lltv: bigint;
|
|
101494
|
+
liquidationCursor: bigint;
|
|
101495
|
+
oracle: `0x${string}`;
|
|
101496
|
+
}[];
|
|
101497
|
+
maturity: bigint;
|
|
101498
|
+
rcfThreshold: bigint;
|
|
101499
|
+
enterGate: `0x${string}`;
|
|
101500
|
+
liquidatorGate: `0x${string}`;
|
|
101501
|
+
}], options?: import("viem").Prettify<import("viem").UnionOmit<import("viem").ReadContractParameters<readonly [{
|
|
101502
|
+
readonly inputs: readonly [{
|
|
101503
|
+
readonly internalType: "bytes32";
|
|
101504
|
+
readonly name: "_id";
|
|
101505
|
+
readonly type: "bytes32";
|
|
101506
|
+
}];
|
|
101507
|
+
readonly name: "getMarketInfo";
|
|
101508
|
+
readonly outputs: readonly [{
|
|
101509
|
+
readonly components: readonly [{
|
|
101510
|
+
readonly internalType: "bytes32";
|
|
101511
|
+
readonly name: "id";
|
|
101512
|
+
readonly type: "bytes32";
|
|
101513
|
+
}, {
|
|
101514
|
+
readonly internalType: "uint128";
|
|
101515
|
+
readonly name: "totalUnits";
|
|
101516
|
+
readonly type: "uint128";
|
|
101517
|
+
}, {
|
|
101518
|
+
readonly internalType: "uint128";
|
|
101519
|
+
readonly name: "lossFactor";
|
|
101520
|
+
readonly type: "uint128";
|
|
101521
|
+
}, {
|
|
101522
|
+
readonly internalType: "uint128";
|
|
101523
|
+
readonly name: "withdrawable";
|
|
101524
|
+
readonly type: "uint128";
|
|
101525
|
+
}, {
|
|
101526
|
+
readonly internalType: "uint128";
|
|
101527
|
+
readonly name: "continuousFeeCredit";
|
|
101528
|
+
readonly type: "uint128";
|
|
101529
|
+
}, {
|
|
101530
|
+
readonly internalType: "uint16[7]";
|
|
101531
|
+
readonly name: "settlementFees";
|
|
101532
|
+
readonly type: "uint16[7]";
|
|
101533
|
+
}, {
|
|
101534
|
+
readonly internalType: "uint32";
|
|
101535
|
+
readonly name: "continuousFee";
|
|
101536
|
+
readonly type: "uint32";
|
|
101537
|
+
}, {
|
|
101538
|
+
readonly internalType: "uint8";
|
|
101539
|
+
readonly name: "tickSpacing";
|
|
101540
|
+
readonly type: "uint8";
|
|
101541
|
+
}, {
|
|
101542
|
+
readonly internalType: "uint256[]";
|
|
101543
|
+
readonly name: "prices";
|
|
101544
|
+
readonly type: "uint256[]";
|
|
101545
|
+
}];
|
|
101546
|
+
readonly internalType: "struct MidnightView.MarketInfo";
|
|
101547
|
+
readonly name: "info";
|
|
101548
|
+
readonly type: "tuple";
|
|
101549
|
+
}];
|
|
101550
|
+
readonly stateMutability: "view";
|
|
101551
|
+
readonly type: "function";
|
|
101552
|
+
}, {
|
|
101553
|
+
readonly inputs: readonly [{
|
|
101554
|
+
readonly internalType: "bytes32";
|
|
101555
|
+
readonly name: "_id";
|
|
101556
|
+
readonly type: "bytes32";
|
|
101557
|
+
}, {
|
|
101558
|
+
readonly internalType: "address";
|
|
101559
|
+
readonly name: "_user";
|
|
101560
|
+
readonly type: "address";
|
|
101561
|
+
}];
|
|
101562
|
+
readonly name: "getPositionInfo";
|
|
101563
|
+
readonly outputs: readonly [{
|
|
101564
|
+
readonly components: readonly [{
|
|
101565
|
+
readonly internalType: "uint128";
|
|
101566
|
+
readonly name: "credit";
|
|
101567
|
+
readonly type: "uint128";
|
|
101568
|
+
}, {
|
|
101569
|
+
readonly internalType: "uint128";
|
|
101570
|
+
readonly name: "pendingFee";
|
|
101571
|
+
readonly type: "uint128";
|
|
101572
|
+
}, {
|
|
101573
|
+
readonly internalType: "uint128";
|
|
101574
|
+
readonly name: "debt";
|
|
101575
|
+
readonly type: "uint128";
|
|
101576
|
+
}, {
|
|
101577
|
+
readonly internalType: "uint128";
|
|
101578
|
+
readonly name: "collateralBitmap";
|
|
101579
|
+
readonly type: "uint128";
|
|
101580
|
+
}, {
|
|
101581
|
+
readonly internalType: "uint128[]";
|
|
101582
|
+
readonly name: "collateral";
|
|
101583
|
+
readonly type: "uint128[]";
|
|
101584
|
+
}, {
|
|
101585
|
+
readonly internalType: "uint256";
|
|
101586
|
+
readonly name: "ratio";
|
|
101587
|
+
readonly type: "uint256";
|
|
101588
|
+
}];
|
|
101589
|
+
readonly internalType: "struct MidnightView.PositionInfo";
|
|
101590
|
+
readonly name: "pos";
|
|
101591
|
+
readonly type: "tuple";
|
|
101592
|
+
}];
|
|
101593
|
+
readonly stateMutability: "view";
|
|
101594
|
+
readonly type: "function";
|
|
101595
|
+
}, {
|
|
101596
|
+
readonly inputs: readonly [{
|
|
101597
|
+
readonly internalType: "bytes32";
|
|
101598
|
+
readonly name: "_id";
|
|
101599
|
+
readonly type: "bytes32";
|
|
101600
|
+
}, {
|
|
101601
|
+
readonly internalType: "address";
|
|
101602
|
+
readonly name: "_user";
|
|
101603
|
+
readonly type: "address";
|
|
101604
|
+
}];
|
|
101605
|
+
readonly name: "getRatio";
|
|
101606
|
+
readonly outputs: readonly [{
|
|
101607
|
+
readonly internalType: "uint256";
|
|
101608
|
+
readonly name: "ratio";
|
|
101609
|
+
readonly type: "uint256";
|
|
101610
|
+
}];
|
|
101611
|
+
readonly stateMutability: "view";
|
|
101612
|
+
readonly type: "function";
|
|
101613
|
+
}, {
|
|
101614
|
+
readonly inputs: readonly [{
|
|
101615
|
+
readonly components: readonly [{
|
|
101616
|
+
readonly internalType: "uint256";
|
|
101617
|
+
readonly name: "chainId";
|
|
101618
|
+
readonly type: "uint256";
|
|
101619
|
+
}, {
|
|
101620
|
+
readonly internalType: "address";
|
|
101621
|
+
readonly name: "midnight";
|
|
101622
|
+
readonly type: "address";
|
|
101623
|
+
}, {
|
|
101624
|
+
readonly internalType: "address";
|
|
101625
|
+
readonly name: "loanToken";
|
|
101626
|
+
readonly type: "address";
|
|
101627
|
+
}, {
|
|
101628
|
+
readonly components: readonly [{
|
|
101629
|
+
readonly internalType: "address";
|
|
101630
|
+
readonly name: "token";
|
|
101631
|
+
readonly type: "address";
|
|
101632
|
+
}, {
|
|
101633
|
+
readonly internalType: "uint256";
|
|
101634
|
+
readonly name: "lltv";
|
|
101635
|
+
readonly type: "uint256";
|
|
101636
|
+
}, {
|
|
101637
|
+
readonly internalType: "uint256";
|
|
101638
|
+
readonly name: "liquidationCursor";
|
|
101639
|
+
readonly type: "uint256";
|
|
101640
|
+
}, {
|
|
101641
|
+
readonly internalType: "address";
|
|
101642
|
+
readonly name: "oracle";
|
|
101643
|
+
readonly type: "address";
|
|
101644
|
+
}];
|
|
101645
|
+
readonly internalType: "struct CollateralParams[]";
|
|
101646
|
+
readonly name: "collateralParams";
|
|
101647
|
+
readonly type: "tuple[]";
|
|
101648
|
+
}, {
|
|
101649
|
+
readonly internalType: "uint256";
|
|
101650
|
+
readonly name: "maturity";
|
|
101651
|
+
readonly type: "uint256";
|
|
101652
|
+
}, {
|
|
101653
|
+
readonly internalType: "uint256";
|
|
101654
|
+
readonly name: "rcfThreshold";
|
|
101655
|
+
readonly type: "uint256";
|
|
101656
|
+
}, {
|
|
101657
|
+
readonly internalType: "address";
|
|
101658
|
+
readonly name: "enterGate";
|
|
101659
|
+
readonly type: "address";
|
|
101660
|
+
}, {
|
|
101661
|
+
readonly internalType: "address";
|
|
101662
|
+
readonly name: "liquidatorGate";
|
|
101663
|
+
readonly type: "address";
|
|
101664
|
+
}];
|
|
101665
|
+
readonly internalType: "struct Market";
|
|
101666
|
+
readonly name: "_market";
|
|
101667
|
+
readonly type: "tuple";
|
|
101668
|
+
}];
|
|
101669
|
+
readonly name: "toId";
|
|
101670
|
+
readonly outputs: readonly [{
|
|
101671
|
+
readonly internalType: "bytes32";
|
|
101672
|
+
readonly name: "id";
|
|
101673
|
+
readonly type: "bytes32";
|
|
101674
|
+
}];
|
|
101675
|
+
readonly stateMutability: "pure";
|
|
101676
|
+
readonly type: "function";
|
|
101677
|
+
}, {
|
|
101678
|
+
readonly inputs: readonly [{
|
|
101679
|
+
readonly internalType: "bytes32";
|
|
101680
|
+
readonly name: "_id";
|
|
101681
|
+
readonly type: "bytes32";
|
|
101682
|
+
}];
|
|
101683
|
+
readonly name: "toMarket";
|
|
101684
|
+
readonly outputs: readonly [{
|
|
101685
|
+
readonly components: readonly [{
|
|
101686
|
+
readonly internalType: "uint256";
|
|
101687
|
+
readonly name: "chainId";
|
|
101688
|
+
readonly type: "uint256";
|
|
101689
|
+
}, {
|
|
101690
|
+
readonly internalType: "address";
|
|
101691
|
+
readonly name: "midnight";
|
|
101692
|
+
readonly type: "address";
|
|
101693
|
+
}, {
|
|
101694
|
+
readonly internalType: "address";
|
|
101695
|
+
readonly name: "loanToken";
|
|
101696
|
+
readonly type: "address";
|
|
101697
|
+
}, {
|
|
101698
|
+
readonly components: readonly [{
|
|
101699
|
+
readonly internalType: "address";
|
|
101700
|
+
readonly name: "token";
|
|
101701
|
+
readonly type: "address";
|
|
101702
|
+
}, {
|
|
101703
|
+
readonly internalType: "uint256";
|
|
101704
|
+
readonly name: "lltv";
|
|
101705
|
+
readonly type: "uint256";
|
|
101706
|
+
}, {
|
|
101707
|
+
readonly internalType: "uint256";
|
|
101708
|
+
readonly name: "liquidationCursor";
|
|
101709
|
+
readonly type: "uint256";
|
|
101710
|
+
}, {
|
|
101711
|
+
readonly internalType: "address";
|
|
101712
|
+
readonly name: "oracle";
|
|
101713
|
+
readonly type: "address";
|
|
101714
|
+
}];
|
|
101715
|
+
readonly internalType: "struct CollateralParams[]";
|
|
101716
|
+
readonly name: "collateralParams";
|
|
101717
|
+
readonly type: "tuple[]";
|
|
101718
|
+
}, {
|
|
101719
|
+
readonly internalType: "uint256";
|
|
101720
|
+
readonly name: "maturity";
|
|
101721
|
+
readonly type: "uint256";
|
|
101722
|
+
}, {
|
|
101723
|
+
readonly internalType: "uint256";
|
|
101724
|
+
readonly name: "rcfThreshold";
|
|
101725
|
+
readonly type: "uint256";
|
|
101726
|
+
}, {
|
|
101727
|
+
readonly internalType: "address";
|
|
101728
|
+
readonly name: "enterGate";
|
|
101729
|
+
readonly type: "address";
|
|
101730
|
+
}, {
|
|
101731
|
+
readonly internalType: "address";
|
|
101732
|
+
readonly name: "liquidatorGate";
|
|
101733
|
+
readonly type: "address";
|
|
101734
|
+
}];
|
|
101735
|
+
readonly internalType: "struct Market";
|
|
101736
|
+
readonly name: "market";
|
|
101737
|
+
readonly type: "tuple";
|
|
101738
|
+
}];
|
|
101739
|
+
readonly stateMutability: "view";
|
|
101740
|
+
readonly type: "function";
|
|
101741
|
+
}], "toId", readonly [{
|
|
101742
|
+
chainId: bigint;
|
|
101743
|
+
midnight: `0x${string}`;
|
|
101744
|
+
loanToken: `0x${string}`;
|
|
101745
|
+
collateralParams: readonly {
|
|
101746
|
+
token: `0x${string}`;
|
|
101747
|
+
lltv: bigint;
|
|
101748
|
+
liquidationCursor: bigint;
|
|
101749
|
+
oracle: `0x${string}`;
|
|
101750
|
+
}[];
|
|
101751
|
+
maturity: bigint;
|
|
101752
|
+
rcfThreshold: bigint;
|
|
101753
|
+
enterGate: `0x${string}`;
|
|
101754
|
+
liquidatorGate: `0x${string}`;
|
|
101755
|
+
}]>, "address" | "args" | "abi" | "functionName">> | undefined) => Promise<`0x${string}`>;
|
|
101756
|
+
toMarket: (args: readonly [`0x${string}`], options?: import("viem").Prettify<import("viem").UnionOmit<import("viem").ReadContractParameters<readonly [{
|
|
101757
|
+
readonly inputs: readonly [{
|
|
101758
|
+
readonly internalType: "bytes32";
|
|
101759
|
+
readonly name: "_id";
|
|
101760
|
+
readonly type: "bytes32";
|
|
101761
|
+
}];
|
|
101762
|
+
readonly name: "getMarketInfo";
|
|
101763
|
+
readonly outputs: readonly [{
|
|
101764
|
+
readonly components: readonly [{
|
|
101765
|
+
readonly internalType: "bytes32";
|
|
101766
|
+
readonly name: "id";
|
|
101767
|
+
readonly type: "bytes32";
|
|
101768
|
+
}, {
|
|
101769
|
+
readonly internalType: "uint128";
|
|
101770
|
+
readonly name: "totalUnits";
|
|
101771
|
+
readonly type: "uint128";
|
|
101772
|
+
}, {
|
|
101773
|
+
readonly internalType: "uint128";
|
|
101774
|
+
readonly name: "lossFactor";
|
|
101775
|
+
readonly type: "uint128";
|
|
101776
|
+
}, {
|
|
101777
|
+
readonly internalType: "uint128";
|
|
101778
|
+
readonly name: "withdrawable";
|
|
101779
|
+
readonly type: "uint128";
|
|
101780
|
+
}, {
|
|
101781
|
+
readonly internalType: "uint128";
|
|
101782
|
+
readonly name: "continuousFeeCredit";
|
|
101783
|
+
readonly type: "uint128";
|
|
101784
|
+
}, {
|
|
101785
|
+
readonly internalType: "uint16[7]";
|
|
101786
|
+
readonly name: "settlementFees";
|
|
101787
|
+
readonly type: "uint16[7]";
|
|
101788
|
+
}, {
|
|
101789
|
+
readonly internalType: "uint32";
|
|
101790
|
+
readonly name: "continuousFee";
|
|
101791
|
+
readonly type: "uint32";
|
|
101792
|
+
}, {
|
|
101793
|
+
readonly internalType: "uint8";
|
|
101794
|
+
readonly name: "tickSpacing";
|
|
101795
|
+
readonly type: "uint8";
|
|
101796
|
+
}, {
|
|
101797
|
+
readonly internalType: "uint256[]";
|
|
101798
|
+
readonly name: "prices";
|
|
101799
|
+
readonly type: "uint256[]";
|
|
101800
|
+
}];
|
|
101801
|
+
readonly internalType: "struct MidnightView.MarketInfo";
|
|
101802
|
+
readonly name: "info";
|
|
101803
|
+
readonly type: "tuple";
|
|
101804
|
+
}];
|
|
101805
|
+
readonly stateMutability: "view";
|
|
101806
|
+
readonly type: "function";
|
|
101807
|
+
}, {
|
|
101808
|
+
readonly inputs: readonly [{
|
|
101809
|
+
readonly internalType: "bytes32";
|
|
101810
|
+
readonly name: "_id";
|
|
101811
|
+
readonly type: "bytes32";
|
|
101812
|
+
}, {
|
|
101813
|
+
readonly internalType: "address";
|
|
101814
|
+
readonly name: "_user";
|
|
101815
|
+
readonly type: "address";
|
|
101816
|
+
}];
|
|
101817
|
+
readonly name: "getPositionInfo";
|
|
101818
|
+
readonly outputs: readonly [{
|
|
101819
|
+
readonly components: readonly [{
|
|
101820
|
+
readonly internalType: "uint128";
|
|
101821
|
+
readonly name: "credit";
|
|
101822
|
+
readonly type: "uint128";
|
|
101823
|
+
}, {
|
|
101824
|
+
readonly internalType: "uint128";
|
|
101825
|
+
readonly name: "pendingFee";
|
|
101826
|
+
readonly type: "uint128";
|
|
101827
|
+
}, {
|
|
101828
|
+
readonly internalType: "uint128";
|
|
101829
|
+
readonly name: "debt";
|
|
101830
|
+
readonly type: "uint128";
|
|
101831
|
+
}, {
|
|
101832
|
+
readonly internalType: "uint128";
|
|
101833
|
+
readonly name: "collateralBitmap";
|
|
101834
|
+
readonly type: "uint128";
|
|
101835
|
+
}, {
|
|
101836
|
+
readonly internalType: "uint128[]";
|
|
101837
|
+
readonly name: "collateral";
|
|
101838
|
+
readonly type: "uint128[]";
|
|
101839
|
+
}, {
|
|
101840
|
+
readonly internalType: "uint256";
|
|
101841
|
+
readonly name: "ratio";
|
|
101842
|
+
readonly type: "uint256";
|
|
101843
|
+
}];
|
|
101844
|
+
readonly internalType: "struct MidnightView.PositionInfo";
|
|
101845
|
+
readonly name: "pos";
|
|
101846
|
+
readonly type: "tuple";
|
|
101847
|
+
}];
|
|
101848
|
+
readonly stateMutability: "view";
|
|
101849
|
+
readonly type: "function";
|
|
101850
|
+
}, {
|
|
101851
|
+
readonly inputs: readonly [{
|
|
101852
|
+
readonly internalType: "bytes32";
|
|
101853
|
+
readonly name: "_id";
|
|
101854
|
+
readonly type: "bytes32";
|
|
101855
|
+
}, {
|
|
101856
|
+
readonly internalType: "address";
|
|
101857
|
+
readonly name: "_user";
|
|
101858
|
+
readonly type: "address";
|
|
101859
|
+
}];
|
|
101860
|
+
readonly name: "getRatio";
|
|
101861
|
+
readonly outputs: readonly [{
|
|
101862
|
+
readonly internalType: "uint256";
|
|
101863
|
+
readonly name: "ratio";
|
|
101864
|
+
readonly type: "uint256";
|
|
101865
|
+
}];
|
|
101866
|
+
readonly stateMutability: "view";
|
|
101867
|
+
readonly type: "function";
|
|
101868
|
+
}, {
|
|
101869
|
+
readonly inputs: readonly [{
|
|
101870
|
+
readonly components: readonly [{
|
|
101871
|
+
readonly internalType: "uint256";
|
|
101872
|
+
readonly name: "chainId";
|
|
101873
|
+
readonly type: "uint256";
|
|
101874
|
+
}, {
|
|
101875
|
+
readonly internalType: "address";
|
|
101876
|
+
readonly name: "midnight";
|
|
101877
|
+
readonly type: "address";
|
|
101878
|
+
}, {
|
|
101879
|
+
readonly internalType: "address";
|
|
101880
|
+
readonly name: "loanToken";
|
|
101881
|
+
readonly type: "address";
|
|
101882
|
+
}, {
|
|
101883
|
+
readonly components: readonly [{
|
|
101884
|
+
readonly internalType: "address";
|
|
101885
|
+
readonly name: "token";
|
|
101886
|
+
readonly type: "address";
|
|
101887
|
+
}, {
|
|
101888
|
+
readonly internalType: "uint256";
|
|
101889
|
+
readonly name: "lltv";
|
|
101890
|
+
readonly type: "uint256";
|
|
101891
|
+
}, {
|
|
101892
|
+
readonly internalType: "uint256";
|
|
101893
|
+
readonly name: "liquidationCursor";
|
|
101894
|
+
readonly type: "uint256";
|
|
101895
|
+
}, {
|
|
101896
|
+
readonly internalType: "address";
|
|
101897
|
+
readonly name: "oracle";
|
|
101898
|
+
readonly type: "address";
|
|
101899
|
+
}];
|
|
101900
|
+
readonly internalType: "struct CollateralParams[]";
|
|
101901
|
+
readonly name: "collateralParams";
|
|
101902
|
+
readonly type: "tuple[]";
|
|
101903
|
+
}, {
|
|
101904
|
+
readonly internalType: "uint256";
|
|
101905
|
+
readonly name: "maturity";
|
|
101906
|
+
readonly type: "uint256";
|
|
101907
|
+
}, {
|
|
101908
|
+
readonly internalType: "uint256";
|
|
101909
|
+
readonly name: "rcfThreshold";
|
|
101910
|
+
readonly type: "uint256";
|
|
101911
|
+
}, {
|
|
101912
|
+
readonly internalType: "address";
|
|
101913
|
+
readonly name: "enterGate";
|
|
101914
|
+
readonly type: "address";
|
|
101915
|
+
}, {
|
|
101916
|
+
readonly internalType: "address";
|
|
101917
|
+
readonly name: "liquidatorGate";
|
|
101918
|
+
readonly type: "address";
|
|
101919
|
+
}];
|
|
101920
|
+
readonly internalType: "struct Market";
|
|
101921
|
+
readonly name: "_market";
|
|
101922
|
+
readonly type: "tuple";
|
|
101923
|
+
}];
|
|
101924
|
+
readonly name: "toId";
|
|
101925
|
+
readonly outputs: readonly [{
|
|
101926
|
+
readonly internalType: "bytes32";
|
|
101927
|
+
readonly name: "id";
|
|
101928
|
+
readonly type: "bytes32";
|
|
101929
|
+
}];
|
|
101930
|
+
readonly stateMutability: "pure";
|
|
101931
|
+
readonly type: "function";
|
|
101932
|
+
}, {
|
|
101933
|
+
readonly inputs: readonly [{
|
|
101934
|
+
readonly internalType: "bytes32";
|
|
101935
|
+
readonly name: "_id";
|
|
101936
|
+
readonly type: "bytes32";
|
|
101937
|
+
}];
|
|
101938
|
+
readonly name: "toMarket";
|
|
101939
|
+
readonly outputs: readonly [{
|
|
101940
|
+
readonly components: readonly [{
|
|
101941
|
+
readonly internalType: "uint256";
|
|
101942
|
+
readonly name: "chainId";
|
|
101943
|
+
readonly type: "uint256";
|
|
101944
|
+
}, {
|
|
101945
|
+
readonly internalType: "address";
|
|
101946
|
+
readonly name: "midnight";
|
|
101947
|
+
readonly type: "address";
|
|
101948
|
+
}, {
|
|
101949
|
+
readonly internalType: "address";
|
|
101950
|
+
readonly name: "loanToken";
|
|
101951
|
+
readonly type: "address";
|
|
101952
|
+
}, {
|
|
101953
|
+
readonly components: readonly [{
|
|
101954
|
+
readonly internalType: "address";
|
|
101955
|
+
readonly name: "token";
|
|
101956
|
+
readonly type: "address";
|
|
101957
|
+
}, {
|
|
101958
|
+
readonly internalType: "uint256";
|
|
101959
|
+
readonly name: "lltv";
|
|
101960
|
+
readonly type: "uint256";
|
|
101961
|
+
}, {
|
|
101962
|
+
readonly internalType: "uint256";
|
|
101963
|
+
readonly name: "liquidationCursor";
|
|
101964
|
+
readonly type: "uint256";
|
|
101965
|
+
}, {
|
|
101966
|
+
readonly internalType: "address";
|
|
101967
|
+
readonly name: "oracle";
|
|
101968
|
+
readonly type: "address";
|
|
101969
|
+
}];
|
|
101970
|
+
readonly internalType: "struct CollateralParams[]";
|
|
101971
|
+
readonly name: "collateralParams";
|
|
101972
|
+
readonly type: "tuple[]";
|
|
101973
|
+
}, {
|
|
101974
|
+
readonly internalType: "uint256";
|
|
101975
|
+
readonly name: "maturity";
|
|
101976
|
+
readonly type: "uint256";
|
|
101977
|
+
}, {
|
|
101978
|
+
readonly internalType: "uint256";
|
|
101979
|
+
readonly name: "rcfThreshold";
|
|
101980
|
+
readonly type: "uint256";
|
|
101981
|
+
}, {
|
|
101982
|
+
readonly internalType: "address";
|
|
101983
|
+
readonly name: "enterGate";
|
|
101984
|
+
readonly type: "address";
|
|
101985
|
+
}, {
|
|
101986
|
+
readonly internalType: "address";
|
|
101987
|
+
readonly name: "liquidatorGate";
|
|
101988
|
+
readonly type: "address";
|
|
101989
|
+
}];
|
|
101990
|
+
readonly internalType: "struct Market";
|
|
101991
|
+
readonly name: "market";
|
|
101992
|
+
readonly type: "tuple";
|
|
101993
|
+
}];
|
|
101994
|
+
readonly stateMutability: "view";
|
|
101995
|
+
readonly type: "function";
|
|
101996
|
+
}], "toMarket", readonly [`0x${string}`]>, "address" | "args" | "abi" | "functionName">> | undefined) => Promise<{
|
|
101997
|
+
chainId: bigint;
|
|
101998
|
+
midnight: `0x${string}`;
|
|
101999
|
+
loanToken: `0x${string}`;
|
|
102000
|
+
collateralParams: readonly {
|
|
102001
|
+
token: `0x${string}`;
|
|
102002
|
+
lltv: bigint;
|
|
102003
|
+
liquidationCursor: bigint;
|
|
102004
|
+
oracle: `0x${string}`;
|
|
102005
|
+
}[];
|
|
102006
|
+
maturity: bigint;
|
|
102007
|
+
rcfThreshold: bigint;
|
|
102008
|
+
enterGate: `0x${string}`;
|
|
102009
|
+
liquidatorGate: `0x${string}`;
|
|
102010
|
+
}>;
|
|
102011
|
+
};
|
|
102012
|
+
address: `0x${string}`;
|
|
102013
|
+
abi: readonly [{
|
|
102014
|
+
readonly inputs: readonly [{
|
|
102015
|
+
readonly internalType: "bytes32";
|
|
102016
|
+
readonly name: "_id";
|
|
102017
|
+
readonly type: "bytes32";
|
|
102018
|
+
}];
|
|
102019
|
+
readonly name: "getMarketInfo";
|
|
102020
|
+
readonly outputs: readonly [{
|
|
102021
|
+
readonly components: readonly [{
|
|
102022
|
+
readonly internalType: "bytes32";
|
|
102023
|
+
readonly name: "id";
|
|
102024
|
+
readonly type: "bytes32";
|
|
102025
|
+
}, {
|
|
102026
|
+
readonly internalType: "uint128";
|
|
102027
|
+
readonly name: "totalUnits";
|
|
102028
|
+
readonly type: "uint128";
|
|
102029
|
+
}, {
|
|
102030
|
+
readonly internalType: "uint128";
|
|
102031
|
+
readonly name: "lossFactor";
|
|
102032
|
+
readonly type: "uint128";
|
|
102033
|
+
}, {
|
|
102034
|
+
readonly internalType: "uint128";
|
|
102035
|
+
readonly name: "withdrawable";
|
|
102036
|
+
readonly type: "uint128";
|
|
102037
|
+
}, {
|
|
102038
|
+
readonly internalType: "uint128";
|
|
102039
|
+
readonly name: "continuousFeeCredit";
|
|
102040
|
+
readonly type: "uint128";
|
|
102041
|
+
}, {
|
|
102042
|
+
readonly internalType: "uint16[7]";
|
|
102043
|
+
readonly name: "settlementFees";
|
|
102044
|
+
readonly type: "uint16[7]";
|
|
102045
|
+
}, {
|
|
102046
|
+
readonly internalType: "uint32";
|
|
102047
|
+
readonly name: "continuousFee";
|
|
102048
|
+
readonly type: "uint32";
|
|
102049
|
+
}, {
|
|
102050
|
+
readonly internalType: "uint8";
|
|
102051
|
+
readonly name: "tickSpacing";
|
|
102052
|
+
readonly type: "uint8";
|
|
102053
|
+
}, {
|
|
102054
|
+
readonly internalType: "uint256[]";
|
|
102055
|
+
readonly name: "prices";
|
|
102056
|
+
readonly type: "uint256[]";
|
|
102057
|
+
}];
|
|
102058
|
+
readonly internalType: "struct MidnightView.MarketInfo";
|
|
102059
|
+
readonly name: "info";
|
|
102060
|
+
readonly type: "tuple";
|
|
102061
|
+
}];
|
|
102062
|
+
readonly stateMutability: "view";
|
|
102063
|
+
readonly type: "function";
|
|
102064
|
+
}, {
|
|
102065
|
+
readonly inputs: readonly [{
|
|
102066
|
+
readonly internalType: "bytes32";
|
|
102067
|
+
readonly name: "_id";
|
|
102068
|
+
readonly type: "bytes32";
|
|
102069
|
+
}, {
|
|
102070
|
+
readonly internalType: "address";
|
|
102071
|
+
readonly name: "_user";
|
|
102072
|
+
readonly type: "address";
|
|
102073
|
+
}];
|
|
102074
|
+
readonly name: "getPositionInfo";
|
|
102075
|
+
readonly outputs: readonly [{
|
|
102076
|
+
readonly components: readonly [{
|
|
102077
|
+
readonly internalType: "uint128";
|
|
102078
|
+
readonly name: "credit";
|
|
102079
|
+
readonly type: "uint128";
|
|
102080
|
+
}, {
|
|
102081
|
+
readonly internalType: "uint128";
|
|
102082
|
+
readonly name: "pendingFee";
|
|
102083
|
+
readonly type: "uint128";
|
|
102084
|
+
}, {
|
|
102085
|
+
readonly internalType: "uint128";
|
|
102086
|
+
readonly name: "debt";
|
|
102087
|
+
readonly type: "uint128";
|
|
102088
|
+
}, {
|
|
102089
|
+
readonly internalType: "uint128";
|
|
102090
|
+
readonly name: "collateralBitmap";
|
|
102091
|
+
readonly type: "uint128";
|
|
102092
|
+
}, {
|
|
102093
|
+
readonly internalType: "uint128[]";
|
|
102094
|
+
readonly name: "collateral";
|
|
102095
|
+
readonly type: "uint128[]";
|
|
102096
|
+
}, {
|
|
102097
|
+
readonly internalType: "uint256";
|
|
102098
|
+
readonly name: "ratio";
|
|
102099
|
+
readonly type: "uint256";
|
|
102100
|
+
}];
|
|
102101
|
+
readonly internalType: "struct MidnightView.PositionInfo";
|
|
102102
|
+
readonly name: "pos";
|
|
102103
|
+
readonly type: "tuple";
|
|
102104
|
+
}];
|
|
102105
|
+
readonly stateMutability: "view";
|
|
102106
|
+
readonly type: "function";
|
|
102107
|
+
}, {
|
|
102108
|
+
readonly inputs: readonly [{
|
|
102109
|
+
readonly internalType: "bytes32";
|
|
102110
|
+
readonly name: "_id";
|
|
102111
|
+
readonly type: "bytes32";
|
|
102112
|
+
}, {
|
|
102113
|
+
readonly internalType: "address";
|
|
102114
|
+
readonly name: "_user";
|
|
102115
|
+
readonly type: "address";
|
|
102116
|
+
}];
|
|
102117
|
+
readonly name: "getRatio";
|
|
102118
|
+
readonly outputs: readonly [{
|
|
102119
|
+
readonly internalType: "uint256";
|
|
102120
|
+
readonly name: "ratio";
|
|
102121
|
+
readonly type: "uint256";
|
|
102122
|
+
}];
|
|
102123
|
+
readonly stateMutability: "view";
|
|
102124
|
+
readonly type: "function";
|
|
102125
|
+
}, {
|
|
102126
|
+
readonly inputs: readonly [{
|
|
102127
|
+
readonly components: readonly [{
|
|
102128
|
+
readonly internalType: "uint256";
|
|
102129
|
+
readonly name: "chainId";
|
|
102130
|
+
readonly type: "uint256";
|
|
102131
|
+
}, {
|
|
102132
|
+
readonly internalType: "address";
|
|
102133
|
+
readonly name: "midnight";
|
|
102134
|
+
readonly type: "address";
|
|
102135
|
+
}, {
|
|
102136
|
+
readonly internalType: "address";
|
|
102137
|
+
readonly name: "loanToken";
|
|
102138
|
+
readonly type: "address";
|
|
102139
|
+
}, {
|
|
102140
|
+
readonly components: readonly [{
|
|
102141
|
+
readonly internalType: "address";
|
|
102142
|
+
readonly name: "token";
|
|
102143
|
+
readonly type: "address";
|
|
102144
|
+
}, {
|
|
102145
|
+
readonly internalType: "uint256";
|
|
102146
|
+
readonly name: "lltv";
|
|
102147
|
+
readonly type: "uint256";
|
|
102148
|
+
}, {
|
|
102149
|
+
readonly internalType: "uint256";
|
|
102150
|
+
readonly name: "liquidationCursor";
|
|
102151
|
+
readonly type: "uint256";
|
|
102152
|
+
}, {
|
|
102153
|
+
readonly internalType: "address";
|
|
102154
|
+
readonly name: "oracle";
|
|
102155
|
+
readonly type: "address";
|
|
102156
|
+
}];
|
|
102157
|
+
readonly internalType: "struct CollateralParams[]";
|
|
102158
|
+
readonly name: "collateralParams";
|
|
102159
|
+
readonly type: "tuple[]";
|
|
102160
|
+
}, {
|
|
102161
|
+
readonly internalType: "uint256";
|
|
102162
|
+
readonly name: "maturity";
|
|
102163
|
+
readonly type: "uint256";
|
|
102164
|
+
}, {
|
|
102165
|
+
readonly internalType: "uint256";
|
|
102166
|
+
readonly name: "rcfThreshold";
|
|
102167
|
+
readonly type: "uint256";
|
|
102168
|
+
}, {
|
|
102169
|
+
readonly internalType: "address";
|
|
102170
|
+
readonly name: "enterGate";
|
|
102171
|
+
readonly type: "address";
|
|
102172
|
+
}, {
|
|
102173
|
+
readonly internalType: "address";
|
|
102174
|
+
readonly name: "liquidatorGate";
|
|
102175
|
+
readonly type: "address";
|
|
102176
|
+
}];
|
|
102177
|
+
readonly internalType: "struct Market";
|
|
102178
|
+
readonly name: "_market";
|
|
102179
|
+
readonly type: "tuple";
|
|
102180
|
+
}];
|
|
102181
|
+
readonly name: "toId";
|
|
102182
|
+
readonly outputs: readonly [{
|
|
102183
|
+
readonly internalType: "bytes32";
|
|
102184
|
+
readonly name: "id";
|
|
102185
|
+
readonly type: "bytes32";
|
|
102186
|
+
}];
|
|
102187
|
+
readonly stateMutability: "pure";
|
|
102188
|
+
readonly type: "function";
|
|
102189
|
+
}, {
|
|
102190
|
+
readonly inputs: readonly [{
|
|
102191
|
+
readonly internalType: "bytes32";
|
|
102192
|
+
readonly name: "_id";
|
|
102193
|
+
readonly type: "bytes32";
|
|
102194
|
+
}];
|
|
102195
|
+
readonly name: "toMarket";
|
|
102196
|
+
readonly outputs: readonly [{
|
|
102197
|
+
readonly components: readonly [{
|
|
102198
|
+
readonly internalType: "uint256";
|
|
102199
|
+
readonly name: "chainId";
|
|
102200
|
+
readonly type: "uint256";
|
|
102201
|
+
}, {
|
|
102202
|
+
readonly internalType: "address";
|
|
102203
|
+
readonly name: "midnight";
|
|
102204
|
+
readonly type: "address";
|
|
102205
|
+
}, {
|
|
102206
|
+
readonly internalType: "address";
|
|
102207
|
+
readonly name: "loanToken";
|
|
102208
|
+
readonly type: "address";
|
|
102209
|
+
}, {
|
|
102210
|
+
readonly components: readonly [{
|
|
102211
|
+
readonly internalType: "address";
|
|
102212
|
+
readonly name: "token";
|
|
102213
|
+
readonly type: "address";
|
|
102214
|
+
}, {
|
|
102215
|
+
readonly internalType: "uint256";
|
|
102216
|
+
readonly name: "lltv";
|
|
102217
|
+
readonly type: "uint256";
|
|
102218
|
+
}, {
|
|
102219
|
+
readonly internalType: "uint256";
|
|
102220
|
+
readonly name: "liquidationCursor";
|
|
102221
|
+
readonly type: "uint256";
|
|
102222
|
+
}, {
|
|
102223
|
+
readonly internalType: "address";
|
|
102224
|
+
readonly name: "oracle";
|
|
102225
|
+
readonly type: "address";
|
|
102226
|
+
}];
|
|
102227
|
+
readonly internalType: "struct CollateralParams[]";
|
|
102228
|
+
readonly name: "collateralParams";
|
|
102229
|
+
readonly type: "tuple[]";
|
|
102230
|
+
}, {
|
|
102231
|
+
readonly internalType: "uint256";
|
|
102232
|
+
readonly name: "maturity";
|
|
102233
|
+
readonly type: "uint256";
|
|
102234
|
+
}, {
|
|
102235
|
+
readonly internalType: "uint256";
|
|
102236
|
+
readonly name: "rcfThreshold";
|
|
102237
|
+
readonly type: "uint256";
|
|
102238
|
+
}, {
|
|
102239
|
+
readonly internalType: "address";
|
|
102240
|
+
readonly name: "enterGate";
|
|
102241
|
+
readonly type: "address";
|
|
102242
|
+
}, {
|
|
102243
|
+
readonly internalType: "address";
|
|
102244
|
+
readonly name: "liquidatorGate";
|
|
102245
|
+
readonly type: "address";
|
|
102246
|
+
}];
|
|
102247
|
+
readonly internalType: "struct Market";
|
|
102248
|
+
readonly name: "market";
|
|
102249
|
+
readonly type: "tuple";
|
|
102250
|
+
}];
|
|
102251
|
+
readonly stateMutability: "view";
|
|
102252
|
+
readonly type: "function";
|
|
102253
|
+
}];
|
|
102254
|
+
};
|
|
100745
102255
|
export declare const AaveLoanInfoV2ContractViem: (client: Client, network: NetworkNumber, block?: Blockish) => {
|
|
100746
102256
|
read: {
|
|
100747
102257
|
AAVE_REFERRAL_CODE: (options?: import("viem").Prettify<import("viem").UnionOmit<import("viem").ReadContractParameters<readonly [{
|