@defisaver/positions-sdk 2.1.158 → 2.1.159
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 +516 -4
- package/cjs/config/contracts.js +17 -5
- package/cjs/contracts.d.ts +120 -0
- package/cjs/morphoMidnight/index.js +3 -0
- package/cjs/portfolio/index.js +4 -0
- package/cjs/savings/index.js +6 -6
- package/cjs/savings/morphoVaults/index.d.ts +15 -3
- package/cjs/savings/morphoVaults/index.js +97 -26
- package/cjs/types/morphoMidnight.d.ts +1 -0
- package/esm/config/contracts.d.ts +516 -4
- package/esm/config/contracts.js +17 -5
- package/esm/contracts.d.ts +120 -0
- package/esm/morphoMidnight/index.js +4 -1
- package/esm/portfolio/index.js +4 -0
- package/esm/savings/index.js +6 -6
- package/esm/savings/morphoVaults/index.d.ts +15 -3
- package/esm/savings/morphoVaults/index.js +93 -24
- package/esm/types/morphoMidnight.d.ts +1 -0
- package/package.json +1 -1
- package/src/config/contracts.ts +17 -5
- package/src/morphoMidnight/index.ts +4 -1
- package/src/portfolio/index.ts +2 -0
- package/src/savings/index.ts +6 -6
- package/src/savings/morphoVaults/index.ts +108 -27
- package/src/types/morphoMidnight.ts +1 -0
|
@@ -89505,6 +89505,26 @@ export declare const MorphoBlueView: {
|
|
|
89505
89505
|
};
|
|
89506
89506
|
export declare const MidnightView: {
|
|
89507
89507
|
readonly abi: readonly [{
|
|
89508
|
+
readonly inputs: readonly [];
|
|
89509
|
+
readonly name: "InvalidCollateralIndex";
|
|
89510
|
+
readonly type: "error";
|
|
89511
|
+
}, {
|
|
89512
|
+
readonly inputs: readonly [];
|
|
89513
|
+
readonly name: "InvalidOfferMarketId";
|
|
89514
|
+
readonly type: "error";
|
|
89515
|
+
}, {
|
|
89516
|
+
readonly inputs: readonly [];
|
|
89517
|
+
readonly name: "InvalidOfferType";
|
|
89518
|
+
readonly type: "error";
|
|
89519
|
+
}, {
|
|
89520
|
+
readonly inputs: readonly [];
|
|
89521
|
+
readonly name: "NoOrdersProvided";
|
|
89522
|
+
readonly type: "error";
|
|
89523
|
+
}, {
|
|
89524
|
+
readonly inputs: readonly [];
|
|
89525
|
+
readonly name: "ZeroAmountRequested";
|
|
89526
|
+
readonly type: "error";
|
|
89527
|
+
}, {
|
|
89508
89528
|
readonly inputs: readonly [{
|
|
89509
89529
|
readonly internalType: "bytes32";
|
|
89510
89530
|
readonly name: "_id";
|
|
@@ -89747,12 +89767,504 @@ export declare const MidnightView: {
|
|
|
89747
89767
|
}];
|
|
89748
89768
|
readonly networks: {
|
|
89749
89769
|
readonly "1": {
|
|
89750
|
-
readonly address: "
|
|
89751
|
-
readonly createdBlock:
|
|
89770
|
+
readonly address: "0xb8e1dAAd42e18203cfCED7193FE0e2E19d713A56";
|
|
89771
|
+
readonly createdBlock: 25983494;
|
|
89772
|
+
readonly oldVersions: {
|
|
89773
|
+
readonly "25938908": {
|
|
89774
|
+
readonly abi: readonly [{
|
|
89775
|
+
readonly inputs: readonly [{
|
|
89776
|
+
readonly internalType: "bytes32";
|
|
89777
|
+
readonly name: "_id";
|
|
89778
|
+
readonly type: "bytes32";
|
|
89779
|
+
}];
|
|
89780
|
+
readonly name: "getMarketInfo";
|
|
89781
|
+
readonly outputs: readonly [{
|
|
89782
|
+
readonly components: readonly [{
|
|
89783
|
+
readonly internalType: "bytes32";
|
|
89784
|
+
readonly name: "id";
|
|
89785
|
+
readonly type: "bytes32";
|
|
89786
|
+
}, {
|
|
89787
|
+
readonly internalType: "uint128";
|
|
89788
|
+
readonly name: "totalUnits";
|
|
89789
|
+
readonly type: "uint128";
|
|
89790
|
+
}, {
|
|
89791
|
+
readonly internalType: "uint128";
|
|
89792
|
+
readonly name: "lossFactor";
|
|
89793
|
+
readonly type: "uint128";
|
|
89794
|
+
}, {
|
|
89795
|
+
readonly internalType: "uint128";
|
|
89796
|
+
readonly name: "withdrawable";
|
|
89797
|
+
readonly type: "uint128";
|
|
89798
|
+
}, {
|
|
89799
|
+
readonly internalType: "uint128";
|
|
89800
|
+
readonly name: "continuousFeeCredit";
|
|
89801
|
+
readonly type: "uint128";
|
|
89802
|
+
}, {
|
|
89803
|
+
readonly internalType: "uint16[7]";
|
|
89804
|
+
readonly name: "settlementFees";
|
|
89805
|
+
readonly type: "uint16[7]";
|
|
89806
|
+
}, {
|
|
89807
|
+
readonly internalType: "uint32";
|
|
89808
|
+
readonly name: "continuousFee";
|
|
89809
|
+
readonly type: "uint32";
|
|
89810
|
+
}, {
|
|
89811
|
+
readonly internalType: "uint8";
|
|
89812
|
+
readonly name: "tickSpacing";
|
|
89813
|
+
readonly type: "uint8";
|
|
89814
|
+
}, {
|
|
89815
|
+
readonly internalType: "uint256[]";
|
|
89816
|
+
readonly name: "prices";
|
|
89817
|
+
readonly type: "uint256[]";
|
|
89818
|
+
}];
|
|
89819
|
+
readonly internalType: "struct MidnightView.MarketInfo";
|
|
89820
|
+
readonly name: "info";
|
|
89821
|
+
readonly type: "tuple";
|
|
89822
|
+
}];
|
|
89823
|
+
readonly stateMutability: "view";
|
|
89824
|
+
readonly type: "function";
|
|
89825
|
+
}, {
|
|
89826
|
+
readonly inputs: readonly [{
|
|
89827
|
+
readonly internalType: "bytes32";
|
|
89828
|
+
readonly name: "_id";
|
|
89829
|
+
readonly type: "bytes32";
|
|
89830
|
+
}, {
|
|
89831
|
+
readonly internalType: "address";
|
|
89832
|
+
readonly name: "_user";
|
|
89833
|
+
readonly type: "address";
|
|
89834
|
+
}];
|
|
89835
|
+
readonly name: "getPositionInfo";
|
|
89836
|
+
readonly outputs: readonly [{
|
|
89837
|
+
readonly components: readonly [{
|
|
89838
|
+
readonly internalType: "uint128";
|
|
89839
|
+
readonly name: "credit";
|
|
89840
|
+
readonly type: "uint128";
|
|
89841
|
+
}, {
|
|
89842
|
+
readonly internalType: "uint128";
|
|
89843
|
+
readonly name: "pendingFee";
|
|
89844
|
+
readonly type: "uint128";
|
|
89845
|
+
}, {
|
|
89846
|
+
readonly internalType: "uint128";
|
|
89847
|
+
readonly name: "debt";
|
|
89848
|
+
readonly type: "uint128";
|
|
89849
|
+
}, {
|
|
89850
|
+
readonly internalType: "uint128";
|
|
89851
|
+
readonly name: "collateralBitmap";
|
|
89852
|
+
readonly type: "uint128";
|
|
89853
|
+
}, {
|
|
89854
|
+
readonly internalType: "uint128[]";
|
|
89855
|
+
readonly name: "collateral";
|
|
89856
|
+
readonly type: "uint128[]";
|
|
89857
|
+
}, {
|
|
89858
|
+
readonly internalType: "uint256";
|
|
89859
|
+
readonly name: "ratio";
|
|
89860
|
+
readonly type: "uint256";
|
|
89861
|
+
}];
|
|
89862
|
+
readonly internalType: "struct MidnightView.PositionInfo";
|
|
89863
|
+
readonly name: "pos";
|
|
89864
|
+
readonly type: "tuple";
|
|
89865
|
+
}];
|
|
89866
|
+
readonly stateMutability: "view";
|
|
89867
|
+
readonly type: "function";
|
|
89868
|
+
}, {
|
|
89869
|
+
readonly inputs: readonly [{
|
|
89870
|
+
readonly internalType: "bytes32";
|
|
89871
|
+
readonly name: "_id";
|
|
89872
|
+
readonly type: "bytes32";
|
|
89873
|
+
}, {
|
|
89874
|
+
readonly internalType: "address";
|
|
89875
|
+
readonly name: "_user";
|
|
89876
|
+
readonly type: "address";
|
|
89877
|
+
}];
|
|
89878
|
+
readonly name: "getRatio";
|
|
89879
|
+
readonly outputs: readonly [{
|
|
89880
|
+
readonly internalType: "uint256";
|
|
89881
|
+
readonly name: "ratio";
|
|
89882
|
+
readonly type: "uint256";
|
|
89883
|
+
}];
|
|
89884
|
+
readonly stateMutability: "view";
|
|
89885
|
+
readonly type: "function";
|
|
89886
|
+
}, {
|
|
89887
|
+
readonly inputs: readonly [{
|
|
89888
|
+
readonly components: readonly [{
|
|
89889
|
+
readonly internalType: "uint256";
|
|
89890
|
+
readonly name: "chainId";
|
|
89891
|
+
readonly type: "uint256";
|
|
89892
|
+
}, {
|
|
89893
|
+
readonly internalType: "address";
|
|
89894
|
+
readonly name: "midnight";
|
|
89895
|
+
readonly type: "address";
|
|
89896
|
+
}, {
|
|
89897
|
+
readonly internalType: "address";
|
|
89898
|
+
readonly name: "loanToken";
|
|
89899
|
+
readonly type: "address";
|
|
89900
|
+
}, {
|
|
89901
|
+
readonly components: readonly [{
|
|
89902
|
+
readonly internalType: "address";
|
|
89903
|
+
readonly name: "token";
|
|
89904
|
+
readonly type: "address";
|
|
89905
|
+
}, {
|
|
89906
|
+
readonly internalType: "uint256";
|
|
89907
|
+
readonly name: "lltv";
|
|
89908
|
+
readonly type: "uint256";
|
|
89909
|
+
}, {
|
|
89910
|
+
readonly internalType: "uint256";
|
|
89911
|
+
readonly name: "liquidationCursor";
|
|
89912
|
+
readonly type: "uint256";
|
|
89913
|
+
}, {
|
|
89914
|
+
readonly internalType: "address";
|
|
89915
|
+
readonly name: "oracle";
|
|
89916
|
+
readonly type: "address";
|
|
89917
|
+
}];
|
|
89918
|
+
readonly internalType: "struct CollateralParams[]";
|
|
89919
|
+
readonly name: "collateralParams";
|
|
89920
|
+
readonly type: "tuple[]";
|
|
89921
|
+
}, {
|
|
89922
|
+
readonly internalType: "uint256";
|
|
89923
|
+
readonly name: "maturity";
|
|
89924
|
+
readonly type: "uint256";
|
|
89925
|
+
}, {
|
|
89926
|
+
readonly internalType: "uint256";
|
|
89927
|
+
readonly name: "rcfThreshold";
|
|
89928
|
+
readonly type: "uint256";
|
|
89929
|
+
}, {
|
|
89930
|
+
readonly internalType: "address";
|
|
89931
|
+
readonly name: "enterGate";
|
|
89932
|
+
readonly type: "address";
|
|
89933
|
+
}, {
|
|
89934
|
+
readonly internalType: "address";
|
|
89935
|
+
readonly name: "liquidatorGate";
|
|
89936
|
+
readonly type: "address";
|
|
89937
|
+
}];
|
|
89938
|
+
readonly internalType: "struct Market";
|
|
89939
|
+
readonly name: "_market";
|
|
89940
|
+
readonly type: "tuple";
|
|
89941
|
+
}];
|
|
89942
|
+
readonly name: "toId";
|
|
89943
|
+
readonly outputs: readonly [{
|
|
89944
|
+
readonly internalType: "bytes32";
|
|
89945
|
+
readonly name: "id";
|
|
89946
|
+
readonly type: "bytes32";
|
|
89947
|
+
}];
|
|
89948
|
+
readonly stateMutability: "pure";
|
|
89949
|
+
readonly type: "function";
|
|
89950
|
+
}, {
|
|
89951
|
+
readonly inputs: readonly [{
|
|
89952
|
+
readonly internalType: "bytes32";
|
|
89953
|
+
readonly name: "_id";
|
|
89954
|
+
readonly type: "bytes32";
|
|
89955
|
+
}];
|
|
89956
|
+
readonly name: "toMarket";
|
|
89957
|
+
readonly outputs: readonly [{
|
|
89958
|
+
readonly components: readonly [{
|
|
89959
|
+
readonly internalType: "uint256";
|
|
89960
|
+
readonly name: "chainId";
|
|
89961
|
+
readonly type: "uint256";
|
|
89962
|
+
}, {
|
|
89963
|
+
readonly internalType: "address";
|
|
89964
|
+
readonly name: "midnight";
|
|
89965
|
+
readonly type: "address";
|
|
89966
|
+
}, {
|
|
89967
|
+
readonly internalType: "address";
|
|
89968
|
+
readonly name: "loanToken";
|
|
89969
|
+
readonly type: "address";
|
|
89970
|
+
}, {
|
|
89971
|
+
readonly components: readonly [{
|
|
89972
|
+
readonly internalType: "address";
|
|
89973
|
+
readonly name: "token";
|
|
89974
|
+
readonly type: "address";
|
|
89975
|
+
}, {
|
|
89976
|
+
readonly internalType: "uint256";
|
|
89977
|
+
readonly name: "lltv";
|
|
89978
|
+
readonly type: "uint256";
|
|
89979
|
+
}, {
|
|
89980
|
+
readonly internalType: "uint256";
|
|
89981
|
+
readonly name: "liquidationCursor";
|
|
89982
|
+
readonly type: "uint256";
|
|
89983
|
+
}, {
|
|
89984
|
+
readonly internalType: "address";
|
|
89985
|
+
readonly name: "oracle";
|
|
89986
|
+
readonly type: "address";
|
|
89987
|
+
}];
|
|
89988
|
+
readonly internalType: "struct CollateralParams[]";
|
|
89989
|
+
readonly name: "collateralParams";
|
|
89990
|
+
readonly type: "tuple[]";
|
|
89991
|
+
}, {
|
|
89992
|
+
readonly internalType: "uint256";
|
|
89993
|
+
readonly name: "maturity";
|
|
89994
|
+
readonly type: "uint256";
|
|
89995
|
+
}, {
|
|
89996
|
+
readonly internalType: "uint256";
|
|
89997
|
+
readonly name: "rcfThreshold";
|
|
89998
|
+
readonly type: "uint256";
|
|
89999
|
+
}, {
|
|
90000
|
+
readonly internalType: "address";
|
|
90001
|
+
readonly name: "enterGate";
|
|
90002
|
+
readonly type: "address";
|
|
90003
|
+
}, {
|
|
90004
|
+
readonly internalType: "address";
|
|
90005
|
+
readonly name: "liquidatorGate";
|
|
90006
|
+
readonly type: "address";
|
|
90007
|
+
}];
|
|
90008
|
+
readonly internalType: "struct Market";
|
|
90009
|
+
readonly name: "market";
|
|
90010
|
+
readonly type: "tuple";
|
|
90011
|
+
}];
|
|
90012
|
+
readonly stateMutability: "view";
|
|
90013
|
+
readonly type: "function";
|
|
90014
|
+
}];
|
|
90015
|
+
readonly address: "0xB64FBf011343961D9AC4A04b714414E35ebE6BE0";
|
|
90016
|
+
};
|
|
90017
|
+
};
|
|
89752
90018
|
};
|
|
89753
90019
|
readonly "8453": {
|
|
89754
|
-
readonly address: "
|
|
89755
|
-
readonly createdBlock:
|
|
90020
|
+
readonly address: "0xdEab43eb1519bD4314bc99c4019866734103D3Ae";
|
|
90021
|
+
readonly createdBlock: 51346932;
|
|
90022
|
+
readonly oldVersions: {
|
|
90023
|
+
readonly "48932293": {
|
|
90024
|
+
readonly abi: readonly [{
|
|
90025
|
+
readonly inputs: readonly [{
|
|
90026
|
+
readonly internalType: "bytes32";
|
|
90027
|
+
readonly name: "_id";
|
|
90028
|
+
readonly type: "bytes32";
|
|
90029
|
+
}];
|
|
90030
|
+
readonly name: "getMarketInfo";
|
|
90031
|
+
readonly outputs: readonly [{
|
|
90032
|
+
readonly components: readonly [{
|
|
90033
|
+
readonly internalType: "bytes32";
|
|
90034
|
+
readonly name: "id";
|
|
90035
|
+
readonly type: "bytes32";
|
|
90036
|
+
}, {
|
|
90037
|
+
readonly internalType: "uint128";
|
|
90038
|
+
readonly name: "totalUnits";
|
|
90039
|
+
readonly type: "uint128";
|
|
90040
|
+
}, {
|
|
90041
|
+
readonly internalType: "uint128";
|
|
90042
|
+
readonly name: "lossFactor";
|
|
90043
|
+
readonly type: "uint128";
|
|
90044
|
+
}, {
|
|
90045
|
+
readonly internalType: "uint128";
|
|
90046
|
+
readonly name: "withdrawable";
|
|
90047
|
+
readonly type: "uint128";
|
|
90048
|
+
}, {
|
|
90049
|
+
readonly internalType: "uint128";
|
|
90050
|
+
readonly name: "continuousFeeCredit";
|
|
90051
|
+
readonly type: "uint128";
|
|
90052
|
+
}, {
|
|
90053
|
+
readonly internalType: "uint16[7]";
|
|
90054
|
+
readonly name: "settlementFees";
|
|
90055
|
+
readonly type: "uint16[7]";
|
|
90056
|
+
}, {
|
|
90057
|
+
readonly internalType: "uint32";
|
|
90058
|
+
readonly name: "continuousFee";
|
|
90059
|
+
readonly type: "uint32";
|
|
90060
|
+
}, {
|
|
90061
|
+
readonly internalType: "uint8";
|
|
90062
|
+
readonly name: "tickSpacing";
|
|
90063
|
+
readonly type: "uint8";
|
|
90064
|
+
}, {
|
|
90065
|
+
readonly internalType: "uint256[]";
|
|
90066
|
+
readonly name: "prices";
|
|
90067
|
+
readonly type: "uint256[]";
|
|
90068
|
+
}];
|
|
90069
|
+
readonly internalType: "struct MidnightView.MarketInfo";
|
|
90070
|
+
readonly name: "info";
|
|
90071
|
+
readonly type: "tuple";
|
|
90072
|
+
}];
|
|
90073
|
+
readonly stateMutability: "view";
|
|
90074
|
+
readonly type: "function";
|
|
90075
|
+
}, {
|
|
90076
|
+
readonly inputs: readonly [{
|
|
90077
|
+
readonly internalType: "bytes32";
|
|
90078
|
+
readonly name: "_id";
|
|
90079
|
+
readonly type: "bytes32";
|
|
90080
|
+
}, {
|
|
90081
|
+
readonly internalType: "address";
|
|
90082
|
+
readonly name: "_user";
|
|
90083
|
+
readonly type: "address";
|
|
90084
|
+
}];
|
|
90085
|
+
readonly name: "getPositionInfo";
|
|
90086
|
+
readonly outputs: readonly [{
|
|
90087
|
+
readonly components: readonly [{
|
|
90088
|
+
readonly internalType: "uint128";
|
|
90089
|
+
readonly name: "credit";
|
|
90090
|
+
readonly type: "uint128";
|
|
90091
|
+
}, {
|
|
90092
|
+
readonly internalType: "uint128";
|
|
90093
|
+
readonly name: "pendingFee";
|
|
90094
|
+
readonly type: "uint128";
|
|
90095
|
+
}, {
|
|
90096
|
+
readonly internalType: "uint128";
|
|
90097
|
+
readonly name: "debt";
|
|
90098
|
+
readonly type: "uint128";
|
|
90099
|
+
}, {
|
|
90100
|
+
readonly internalType: "uint128";
|
|
90101
|
+
readonly name: "collateralBitmap";
|
|
90102
|
+
readonly type: "uint128";
|
|
90103
|
+
}, {
|
|
90104
|
+
readonly internalType: "uint128[]";
|
|
90105
|
+
readonly name: "collateral";
|
|
90106
|
+
readonly type: "uint128[]";
|
|
90107
|
+
}, {
|
|
90108
|
+
readonly internalType: "uint256";
|
|
90109
|
+
readonly name: "ratio";
|
|
90110
|
+
readonly type: "uint256";
|
|
90111
|
+
}];
|
|
90112
|
+
readonly internalType: "struct MidnightView.PositionInfo";
|
|
90113
|
+
readonly name: "pos";
|
|
90114
|
+
readonly type: "tuple";
|
|
90115
|
+
}];
|
|
90116
|
+
readonly stateMutability: "view";
|
|
90117
|
+
readonly type: "function";
|
|
90118
|
+
}, {
|
|
90119
|
+
readonly inputs: readonly [{
|
|
90120
|
+
readonly internalType: "bytes32";
|
|
90121
|
+
readonly name: "_id";
|
|
90122
|
+
readonly type: "bytes32";
|
|
90123
|
+
}, {
|
|
90124
|
+
readonly internalType: "address";
|
|
90125
|
+
readonly name: "_user";
|
|
90126
|
+
readonly type: "address";
|
|
90127
|
+
}];
|
|
90128
|
+
readonly name: "getRatio";
|
|
90129
|
+
readonly outputs: readonly [{
|
|
90130
|
+
readonly internalType: "uint256";
|
|
90131
|
+
readonly name: "ratio";
|
|
90132
|
+
readonly type: "uint256";
|
|
90133
|
+
}];
|
|
90134
|
+
readonly stateMutability: "view";
|
|
90135
|
+
readonly type: "function";
|
|
90136
|
+
}, {
|
|
90137
|
+
readonly inputs: readonly [{
|
|
90138
|
+
readonly components: readonly [{
|
|
90139
|
+
readonly internalType: "uint256";
|
|
90140
|
+
readonly name: "chainId";
|
|
90141
|
+
readonly type: "uint256";
|
|
90142
|
+
}, {
|
|
90143
|
+
readonly internalType: "address";
|
|
90144
|
+
readonly name: "midnight";
|
|
90145
|
+
readonly type: "address";
|
|
90146
|
+
}, {
|
|
90147
|
+
readonly internalType: "address";
|
|
90148
|
+
readonly name: "loanToken";
|
|
90149
|
+
readonly type: "address";
|
|
90150
|
+
}, {
|
|
90151
|
+
readonly components: readonly [{
|
|
90152
|
+
readonly internalType: "address";
|
|
90153
|
+
readonly name: "token";
|
|
90154
|
+
readonly type: "address";
|
|
90155
|
+
}, {
|
|
90156
|
+
readonly internalType: "uint256";
|
|
90157
|
+
readonly name: "lltv";
|
|
90158
|
+
readonly type: "uint256";
|
|
90159
|
+
}, {
|
|
90160
|
+
readonly internalType: "uint256";
|
|
90161
|
+
readonly name: "liquidationCursor";
|
|
90162
|
+
readonly type: "uint256";
|
|
90163
|
+
}, {
|
|
90164
|
+
readonly internalType: "address";
|
|
90165
|
+
readonly name: "oracle";
|
|
90166
|
+
readonly type: "address";
|
|
90167
|
+
}];
|
|
90168
|
+
readonly internalType: "struct CollateralParams[]";
|
|
90169
|
+
readonly name: "collateralParams";
|
|
90170
|
+
readonly type: "tuple[]";
|
|
90171
|
+
}, {
|
|
90172
|
+
readonly internalType: "uint256";
|
|
90173
|
+
readonly name: "maturity";
|
|
90174
|
+
readonly type: "uint256";
|
|
90175
|
+
}, {
|
|
90176
|
+
readonly internalType: "uint256";
|
|
90177
|
+
readonly name: "rcfThreshold";
|
|
90178
|
+
readonly type: "uint256";
|
|
90179
|
+
}, {
|
|
90180
|
+
readonly internalType: "address";
|
|
90181
|
+
readonly name: "enterGate";
|
|
90182
|
+
readonly type: "address";
|
|
90183
|
+
}, {
|
|
90184
|
+
readonly internalType: "address";
|
|
90185
|
+
readonly name: "liquidatorGate";
|
|
90186
|
+
readonly type: "address";
|
|
90187
|
+
}];
|
|
90188
|
+
readonly internalType: "struct Market";
|
|
90189
|
+
readonly name: "_market";
|
|
90190
|
+
readonly type: "tuple";
|
|
90191
|
+
}];
|
|
90192
|
+
readonly name: "toId";
|
|
90193
|
+
readonly outputs: readonly [{
|
|
90194
|
+
readonly internalType: "bytes32";
|
|
90195
|
+
readonly name: "id";
|
|
90196
|
+
readonly type: "bytes32";
|
|
90197
|
+
}];
|
|
90198
|
+
readonly stateMutability: "pure";
|
|
90199
|
+
readonly type: "function";
|
|
90200
|
+
}, {
|
|
90201
|
+
readonly inputs: readonly [{
|
|
90202
|
+
readonly internalType: "bytes32";
|
|
90203
|
+
readonly name: "_id";
|
|
90204
|
+
readonly type: "bytes32";
|
|
90205
|
+
}];
|
|
90206
|
+
readonly name: "toMarket";
|
|
90207
|
+
readonly outputs: readonly [{
|
|
90208
|
+
readonly components: readonly [{
|
|
90209
|
+
readonly internalType: "uint256";
|
|
90210
|
+
readonly name: "chainId";
|
|
90211
|
+
readonly type: "uint256";
|
|
90212
|
+
}, {
|
|
90213
|
+
readonly internalType: "address";
|
|
90214
|
+
readonly name: "midnight";
|
|
90215
|
+
readonly type: "address";
|
|
90216
|
+
}, {
|
|
90217
|
+
readonly internalType: "address";
|
|
90218
|
+
readonly name: "loanToken";
|
|
90219
|
+
readonly type: "address";
|
|
90220
|
+
}, {
|
|
90221
|
+
readonly components: readonly [{
|
|
90222
|
+
readonly internalType: "address";
|
|
90223
|
+
readonly name: "token";
|
|
90224
|
+
readonly type: "address";
|
|
90225
|
+
}, {
|
|
90226
|
+
readonly internalType: "uint256";
|
|
90227
|
+
readonly name: "lltv";
|
|
90228
|
+
readonly type: "uint256";
|
|
90229
|
+
}, {
|
|
90230
|
+
readonly internalType: "uint256";
|
|
90231
|
+
readonly name: "liquidationCursor";
|
|
90232
|
+
readonly type: "uint256";
|
|
90233
|
+
}, {
|
|
90234
|
+
readonly internalType: "address";
|
|
90235
|
+
readonly name: "oracle";
|
|
90236
|
+
readonly type: "address";
|
|
90237
|
+
}];
|
|
90238
|
+
readonly internalType: "struct CollateralParams[]";
|
|
90239
|
+
readonly name: "collateralParams";
|
|
90240
|
+
readonly type: "tuple[]";
|
|
90241
|
+
}, {
|
|
90242
|
+
readonly internalType: "uint256";
|
|
90243
|
+
readonly name: "maturity";
|
|
90244
|
+
readonly type: "uint256";
|
|
90245
|
+
}, {
|
|
90246
|
+
readonly internalType: "uint256";
|
|
90247
|
+
readonly name: "rcfThreshold";
|
|
90248
|
+
readonly type: "uint256";
|
|
90249
|
+
}, {
|
|
90250
|
+
readonly internalType: "address";
|
|
90251
|
+
readonly name: "enterGate";
|
|
90252
|
+
readonly type: "address";
|
|
90253
|
+
}, {
|
|
90254
|
+
readonly internalType: "address";
|
|
90255
|
+
readonly name: "liquidatorGate";
|
|
90256
|
+
readonly type: "address";
|
|
90257
|
+
}];
|
|
90258
|
+
readonly internalType: "struct Market";
|
|
90259
|
+
readonly name: "market";
|
|
90260
|
+
readonly type: "tuple";
|
|
90261
|
+
}];
|
|
90262
|
+
readonly stateMutability: "view";
|
|
90263
|
+
readonly type: "function";
|
|
90264
|
+
}];
|
|
90265
|
+
readonly address: "0x3aa272f329E8B562A3bA56Bb6979a44D23A28839";
|
|
90266
|
+
};
|
|
90267
|
+
};
|
|
89756
90268
|
};
|
|
89757
90269
|
};
|
|
89758
90270
|
};
|
package/esm/config/contracts.js
CHANGED
|
@@ -1124,15 +1124,27 @@ export const MorphoBlueView = {
|
|
|
1124
1124
|
},
|
|
1125
1125
|
};
|
|
1126
1126
|
export const MidnightView = {
|
|
1127
|
-
"abi": [{ "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }], "name": "getMarketInfo", "outputs": [{ "components": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }, { "internalType": "uint128", "name": "totalUnits", "type": "uint128" }, { "internalType": "uint128", "name": "lossFactor", "type": "uint128" }, { "internalType": "uint128", "name": "withdrawable", "type": "uint128" }, { "internalType": "uint128", "name": "continuousFeeCredit", "type": "uint128" }, { "internalType": "uint16[7]", "name": "settlementFees", "type": "uint16[7]" }, { "internalType": "uint32", "name": "continuousFee", "type": "uint32" }, { "internalType": "uint8", "name": "tickSpacing", "type": "uint8" }, { "internalType": "uint256[]", "name": "prices", "type": "uint256[]" }], "internalType": "struct MidnightView.MarketInfo", "name": "info", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getPositionInfo", "outputs": [{ "components": [{ "internalType": "uint128", "name": "credit", "type": "uint128" }, { "internalType": "uint128", "name": "pendingFee", "type": "uint128" }, { "internalType": "uint128", "name": "debt", "type": "uint128" }, { "internalType": "uint128", "name": "collateralBitmap", "type": "uint128" }, { "internalType": "uint128[]", "name": "collateral", "type": "uint128[]" }, { "internalType": "uint256", "name": "ratio", "type": "uint256" }], "internalType": "struct MidnightView.PositionInfo", "name": "pos", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getRatio", "outputs": [{ "internalType": "uint256", "name": "ratio", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "midnight", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationCursor", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }], "internalType": "struct CollateralParams[]", "name": "collateralParams", "type": "tuple[]" }, { "internalType": "uint256", "name": "maturity", "type": "uint256" }, { "internalType": "uint256", "name": "rcfThreshold", "type": "uint256" }, { "internalType": "address", "name": "enterGate", "type": "address" }, { "internalType": "address", "name": "liquidatorGate", "type": "address" }], "internalType": "struct Market", "name": "_market", "type": "tuple" }], "name": "toId", "outputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }], "name": "toMarket", "outputs": [{ "components": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "midnight", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationCursor", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }], "internalType": "struct CollateralParams[]", "name": "collateralParams", "type": "tuple[]" }, { "internalType": "uint256", "name": "maturity", "type": "uint256" }, { "internalType": "uint256", "name": "rcfThreshold", "type": "uint256" }, { "internalType": "address", "name": "enterGate", "type": "address" }, { "internalType": "address", "name": "liquidatorGate", "type": "address" }], "internalType": "struct Market", "name": "market", "type": "tuple" }], "stateMutability": "view", "type": "function" }],
|
|
1127
|
+
"abi": [{ "inputs": [], "name": "InvalidCollateralIndex", "type": "error" }, { "inputs": [], "name": "InvalidOfferMarketId", "type": "error" }, { "inputs": [], "name": "InvalidOfferType", "type": "error" }, { "inputs": [], "name": "NoOrdersProvided", "type": "error" }, { "inputs": [], "name": "ZeroAmountRequested", "type": "error" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }], "name": "getMarketInfo", "outputs": [{ "components": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }, { "internalType": "uint128", "name": "totalUnits", "type": "uint128" }, { "internalType": "uint128", "name": "lossFactor", "type": "uint128" }, { "internalType": "uint128", "name": "withdrawable", "type": "uint128" }, { "internalType": "uint128", "name": "continuousFeeCredit", "type": "uint128" }, { "internalType": "uint16[7]", "name": "settlementFees", "type": "uint16[7]" }, { "internalType": "uint32", "name": "continuousFee", "type": "uint32" }, { "internalType": "uint8", "name": "tickSpacing", "type": "uint8" }, { "internalType": "uint256[]", "name": "prices", "type": "uint256[]" }], "internalType": "struct MidnightView.MarketInfo", "name": "info", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getPositionInfo", "outputs": [{ "components": [{ "internalType": "uint128", "name": "credit", "type": "uint128" }, { "internalType": "uint128", "name": "pendingFee", "type": "uint128" }, { "internalType": "uint128", "name": "debt", "type": "uint128" }, { "internalType": "uint128", "name": "collateralBitmap", "type": "uint128" }, { "internalType": "uint128[]", "name": "collateral", "type": "uint128[]" }, { "internalType": "uint256", "name": "ratio", "type": "uint256" }], "internalType": "struct MidnightView.PositionInfo", "name": "pos", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getRatio", "outputs": [{ "internalType": "uint256", "name": "ratio", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "midnight", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationCursor", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }], "internalType": "struct CollateralParams[]", "name": "collateralParams", "type": "tuple[]" }, { "internalType": "uint256", "name": "maturity", "type": "uint256" }, { "internalType": "uint256", "name": "rcfThreshold", "type": "uint256" }, { "internalType": "address", "name": "enterGate", "type": "address" }, { "internalType": "address", "name": "liquidatorGate", "type": "address" }], "internalType": "struct Market", "name": "_market", "type": "tuple" }], "name": "toId", "outputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }], "name": "toMarket", "outputs": [{ "components": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "midnight", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationCursor", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }], "internalType": "struct CollateralParams[]", "name": "collateralParams", "type": "tuple[]" }, { "internalType": "uint256", "name": "maturity", "type": "uint256" }, { "internalType": "uint256", "name": "rcfThreshold", "type": "uint256" }, { "internalType": "address", "name": "enterGate", "type": "address" }, { "internalType": "address", "name": "liquidatorGate", "type": "address" }], "internalType": "struct Market", "name": "market", "type": "tuple" }], "stateMutability": "view", "type": "function" }],
|
|
1128
1128
|
"networks": {
|
|
1129
1129
|
"1": {
|
|
1130
|
-
"address": "
|
|
1131
|
-
"createdBlock":
|
|
1130
|
+
"address": "0xb8e1dAAd42e18203cfCED7193FE0e2E19d713A56",
|
|
1131
|
+
"createdBlock": 25983494,
|
|
1132
|
+
"oldVersions": {
|
|
1133
|
+
"25938908": {
|
|
1134
|
+
"abi": [{ "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }], "name": "getMarketInfo", "outputs": [{ "components": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }, { "internalType": "uint128", "name": "totalUnits", "type": "uint128" }, { "internalType": "uint128", "name": "lossFactor", "type": "uint128" }, { "internalType": "uint128", "name": "withdrawable", "type": "uint128" }, { "internalType": "uint128", "name": "continuousFeeCredit", "type": "uint128" }, { "internalType": "uint16[7]", "name": "settlementFees", "type": "uint16[7]" }, { "internalType": "uint32", "name": "continuousFee", "type": "uint32" }, { "internalType": "uint8", "name": "tickSpacing", "type": "uint8" }, { "internalType": "uint256[]", "name": "prices", "type": "uint256[]" }], "internalType": "struct MidnightView.MarketInfo", "name": "info", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getPositionInfo", "outputs": [{ "components": [{ "internalType": "uint128", "name": "credit", "type": "uint128" }, { "internalType": "uint128", "name": "pendingFee", "type": "uint128" }, { "internalType": "uint128", "name": "debt", "type": "uint128" }, { "internalType": "uint128", "name": "collateralBitmap", "type": "uint128" }, { "internalType": "uint128[]", "name": "collateral", "type": "uint128[]" }, { "internalType": "uint256", "name": "ratio", "type": "uint256" }], "internalType": "struct MidnightView.PositionInfo", "name": "pos", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getRatio", "outputs": [{ "internalType": "uint256", "name": "ratio", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "midnight", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationCursor", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }], "internalType": "struct CollateralParams[]", "name": "collateralParams", "type": "tuple[]" }, { "internalType": "uint256", "name": "maturity", "type": "uint256" }, { "internalType": "uint256", "name": "rcfThreshold", "type": "uint256" }, { "internalType": "address", "name": "enterGate", "type": "address" }, { "internalType": "address", "name": "liquidatorGate", "type": "address" }], "internalType": "struct Market", "name": "_market", "type": "tuple" }], "name": "toId", "outputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }], "name": "toMarket", "outputs": [{ "components": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "midnight", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationCursor", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }], "internalType": "struct CollateralParams[]", "name": "collateralParams", "type": "tuple[]" }, { "internalType": "uint256", "name": "maturity", "type": "uint256" }, { "internalType": "uint256", "name": "rcfThreshold", "type": "uint256" }, { "internalType": "address", "name": "enterGate", "type": "address" }, { "internalType": "address", "name": "liquidatorGate", "type": "address" }], "internalType": "struct Market", "name": "market", "type": "tuple" }], "stateMutability": "view", "type": "function" }],
|
|
1135
|
+
"address": "0xB64FBf011343961D9AC4A04b714414E35ebE6BE0",
|
|
1136
|
+
}
|
|
1137
|
+
},
|
|
1132
1138
|
},
|
|
1133
1139
|
"8453": {
|
|
1134
|
-
"address": "
|
|
1135
|
-
"createdBlock":
|
|
1140
|
+
"address": "0xdEab43eb1519bD4314bc99c4019866734103D3Ae",
|
|
1141
|
+
"createdBlock": 51346932,
|
|
1142
|
+
"oldVersions": {
|
|
1143
|
+
"48932293": {
|
|
1144
|
+
"abi": [{ "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }], "name": "getMarketInfo", "outputs": [{ "components": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }, { "internalType": "uint128", "name": "totalUnits", "type": "uint128" }, { "internalType": "uint128", "name": "lossFactor", "type": "uint128" }, { "internalType": "uint128", "name": "withdrawable", "type": "uint128" }, { "internalType": "uint128", "name": "continuousFeeCredit", "type": "uint128" }, { "internalType": "uint16[7]", "name": "settlementFees", "type": "uint16[7]" }, { "internalType": "uint32", "name": "continuousFee", "type": "uint32" }, { "internalType": "uint8", "name": "tickSpacing", "type": "uint8" }, { "internalType": "uint256[]", "name": "prices", "type": "uint256[]" }], "internalType": "struct MidnightView.MarketInfo", "name": "info", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getPositionInfo", "outputs": [{ "components": [{ "internalType": "uint128", "name": "credit", "type": "uint128" }, { "internalType": "uint128", "name": "pendingFee", "type": "uint128" }, { "internalType": "uint128", "name": "debt", "type": "uint128" }, { "internalType": "uint128", "name": "collateralBitmap", "type": "uint128" }, { "internalType": "uint128[]", "name": "collateral", "type": "uint128[]" }, { "internalType": "uint256", "name": "ratio", "type": "uint256" }], "internalType": "struct MidnightView.PositionInfo", "name": "pos", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getRatio", "outputs": [{ "internalType": "uint256", "name": "ratio", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "midnight", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationCursor", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }], "internalType": "struct CollateralParams[]", "name": "collateralParams", "type": "tuple[]" }, { "internalType": "uint256", "name": "maturity", "type": "uint256" }, { "internalType": "uint256", "name": "rcfThreshold", "type": "uint256" }, { "internalType": "address", "name": "enterGate", "type": "address" }, { "internalType": "address", "name": "liquidatorGate", "type": "address" }], "internalType": "struct Market", "name": "_market", "type": "tuple" }], "name": "toId", "outputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }], "name": "toMarket", "outputs": [{ "components": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "midnight", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationCursor", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }], "internalType": "struct CollateralParams[]", "name": "collateralParams", "type": "tuple[]" }, { "internalType": "uint256", "name": "maturity", "type": "uint256" }, { "internalType": "uint256", "name": "rcfThreshold", "type": "uint256" }, { "internalType": "address", "name": "enterGate", "type": "address" }, { "internalType": "address", "name": "liquidatorGate", "type": "address" }], "internalType": "struct Market", "name": "market", "type": "tuple" }], "stateMutability": "view", "type": "function" }],
|
|
1145
|
+
"address": "0x3aa272f329E8B562A3bA56Bb6979a44D23A28839",
|
|
1146
|
+
}
|
|
1147
|
+
},
|
|
1136
1148
|
}
|
|
1137
1149
|
},
|
|
1138
1150
|
};
|