@defisaver/positions-sdk 2.1.158 → 2.1.159-shifter-v2-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/aaveV2/index.js +2 -0
- package/cjs/config/contracts.d.ts +516 -4
- package/cjs/config/contracts.js +17 -5
- package/cjs/contracts.d.ts +120 -0
- package/cjs/fluid/index.d.ts +5 -0
- package/cjs/fluid/index.js +36 -1
- package/cjs/helpers/aaveHelpers/index.js +3 -0
- package/cjs/helpers/aaveV4Helpers/index.js +1 -0
- package/cjs/helpers/compoundHelpers/index.js +2 -0
- package/cjs/helpers/curveUsdHelpers/index.js +2 -0
- package/cjs/helpers/fluidHelpers/index.js +1 -0
- package/cjs/helpers/liquityV2Helpers/index.js +1 -0
- package/cjs/helpers/llamaLendHelpers/index.js +2 -0
- package/cjs/helpers/makerHelpers/index.d.ts +1 -1
- package/cjs/helpers/makerHelpers/index.js +2 -2
- package/cjs/helpers/morphoBlueHelpers/index.js +2 -0
- package/cjs/helpers/morphoMidnightHelpers/index.js +2 -0
- package/cjs/helpers/sparkHelpers/index.js +1 -0
- package/cjs/liquity/index.js +8 -1
- package/cjs/maker/index.d.ts +7 -2
- package/cjs/maker/index.js +32 -12
- package/cjs/markets/index.d.ts +1 -0
- package/cjs/markets/index.js +3 -1
- package/cjs/markets/maker/index.d.ts +1 -0
- package/cjs/markets/maker/index.js +13 -0
- package/cjs/morphoMidnight/index.js +3 -0
- package/cjs/portfolio/index.d.ts +5 -1
- package/cjs/portfolio/index.js +276 -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/aave.d.ts +2 -0
- package/cjs/types/aaveV4.d.ts +1 -0
- package/cjs/types/compound.d.ts +2 -0
- package/cjs/types/fluid.d.ts +1 -0
- package/cjs/types/liquity.d.ts +1 -0
- package/cjs/types/liquityV2.d.ts +2 -0
- package/cjs/types/maker.d.ts +1 -0
- package/cjs/types/morphoBlue.d.ts +2 -0
- package/cjs/types/morphoMidnight.d.ts +2 -0
- package/cjs/types/portfolio.d.ts +26 -10
- package/cjs/types/spark.d.ts +2 -0
- package/esm/aaveV2/index.js +2 -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/fluid/index.d.ts +5 -0
- package/esm/fluid/index.js +33 -0
- package/esm/helpers/aaveHelpers/index.js +3 -0
- package/esm/helpers/aaveV4Helpers/index.js +1 -0
- package/esm/helpers/compoundHelpers/index.js +2 -0
- package/esm/helpers/curveUsdHelpers/index.js +2 -0
- package/esm/helpers/fluidHelpers/index.js +1 -0
- package/esm/helpers/liquityV2Helpers/index.js +1 -0
- package/esm/helpers/llamaLendHelpers/index.js +2 -0
- package/esm/helpers/makerHelpers/index.d.ts +1 -1
- package/esm/helpers/makerHelpers/index.js +2 -2
- package/esm/helpers/morphoBlueHelpers/index.js +2 -0
- package/esm/helpers/morphoMidnightHelpers/index.js +2 -0
- package/esm/helpers/sparkHelpers/index.js +1 -0
- package/esm/liquity/index.js +8 -1
- package/esm/maker/index.d.ts +7 -2
- package/esm/maker/index.js +31 -13
- package/esm/markets/index.d.ts +1 -0
- package/esm/markets/index.js +1 -0
- package/esm/markets/maker/index.d.ts +1 -0
- package/esm/markets/maker/index.js +10 -0
- package/esm/morphoMidnight/index.js +4 -1
- package/esm/portfolio/index.d.ts +5 -1
- package/esm/portfolio/index.js +278 -3
- 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/aave.d.ts +2 -0
- package/esm/types/aaveV4.d.ts +1 -0
- package/esm/types/compound.d.ts +2 -0
- package/esm/types/fluid.d.ts +1 -0
- package/esm/types/liquity.d.ts +1 -0
- package/esm/types/liquityV2.d.ts +2 -0
- package/esm/types/maker.d.ts +1 -0
- package/esm/types/morphoBlue.d.ts +2 -0
- package/esm/types/morphoMidnight.d.ts +2 -0
- package/esm/types/portfolio.d.ts +26 -10
- package/esm/types/spark.d.ts +2 -0
- package/package.json +1 -1
- package/src/aaveV2/index.ts +2 -0
- package/src/config/contracts.ts +17 -5
- package/src/fluid/index.ts +40 -0
- package/src/helpers/aaveHelpers/index.ts +3 -0
- package/src/helpers/aaveV4Helpers/index.ts +1 -0
- package/src/helpers/compoundHelpers/index.ts +2 -0
- package/src/helpers/curveUsdHelpers/index.ts +2 -0
- package/src/helpers/fluidHelpers/index.ts +1 -0
- package/src/helpers/liquityV2Helpers/index.ts +1 -0
- package/src/helpers/llamaLendHelpers/index.ts +2 -0
- package/src/helpers/makerHelpers/index.ts +2 -1
- package/src/helpers/morphoBlueHelpers/index.ts +2 -0
- package/src/helpers/morphoMidnightHelpers/index.ts +2 -0
- package/src/helpers/sparkHelpers/index.ts +1 -0
- package/src/liquity/index.ts +8 -1
- package/src/maker/index.ts +62 -29
- package/src/markets/index.ts +2 -1
- package/src/markets/maker/index.ts +10 -0
- package/src/morphoMidnight/index.ts +4 -1
- package/src/portfolio/index.ts +259 -2
- package/src/savings/index.ts +6 -6
- package/src/savings/morphoVaults/index.ts +108 -27
- package/src/types/aave.ts +3 -0
- package/src/types/aaveV4.ts +1 -0
- package/src/types/compound.ts +2 -0
- package/src/types/fluid.ts +1 -0
- package/src/types/liquity.ts +2 -0
- package/src/types/liquityV2.ts +2 -0
- package/src/types/maker.ts +2 -0
- package/src/types/morphoBlue.ts +2 -0
- package/src/types/morphoMidnight.ts +2 -0
- package/src/types/portfolio.ts +31 -12
- package/src/types/spark.ts +2 -0
package/cjs/types/portfolio.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { AaveV2PositionData, AaveV3PositionData, AaveVersions } from './aave';
|
|
2
|
-
import { AaveV4AccountData, AaveV4SpokesType } from './aaveV4';
|
|
1
|
+
import { AaveV2MarketData, AaveV2PositionData, AaveV3MarketData, AaveV3PositionData, AaveVersions } from './aave';
|
|
2
|
+
import { AaveV4AccountData, AaveV4SpokeData, AaveV4SpokesType } from './aaveV4';
|
|
3
3
|
import { EthAddress } from './common';
|
|
4
|
-
import { CompoundV2PositionData, CompoundV3PositionData, CompoundVersions } from './compound';
|
|
5
|
-
import { CrvUSDUserData, CrvUSDVersions } from './curveUsd';
|
|
6
|
-
import { FluidVaultData } from './fluid';
|
|
4
|
+
import { CompoundV2MarketsData, CompoundV2PositionData, CompoundV3MarketsData, CompoundV3PositionData, CompoundVersions } from './compound';
|
|
5
|
+
import { CrvUSDGlobalMarketData, CrvUSDUserData, CrvUSDVersions } from './curveUsd';
|
|
6
|
+
import { FluidMarketData, FluidVaultData } from './fluid';
|
|
7
7
|
import { LiquityTroveInfo } from './liquity';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
8
|
+
import { LiquityV2MarketData } from './liquityV2';
|
|
9
|
+
import { LlamaLendGlobalMarketData, LlamaLendUserData, LlamaLendVersionsType } from './llamaLend';
|
|
10
|
+
import { CdpData, IlkInfo } from './maker';
|
|
11
|
+
import { MorphoBlueMarketInfo, MorphoBluePositionData, MorphoBlueVersions } from './morphoBlue';
|
|
12
|
+
import { MorphoMidnightMarketInfo, MorphoMidnightPositionData, MorphoMidnightVersions } from './morphoMidnight';
|
|
13
|
+
import { SparkMarketsData, SparkPositionData, SparkVersions } from './spark';
|
|
13
14
|
export interface PortfolioProtocolData<T> {
|
|
14
15
|
error: string;
|
|
15
16
|
data: T | null;
|
|
@@ -59,3 +60,18 @@ export interface PortfolioPositionsDataForAddress {
|
|
|
59
60
|
export interface PortfolioPositionsData {
|
|
60
61
|
[key: EthAddress]: PortfolioPositionsDataForAddress;
|
|
61
62
|
}
|
|
63
|
+
export interface PortfolioMarketsData {
|
|
64
|
+
morphoMarketsData: Record<string, MorphoBlueMarketInfo>;
|
|
65
|
+
morphoMidnightMarketsData: Record<string, MorphoMidnightMarketInfo>;
|
|
66
|
+
compoundV3MarketsData: Record<string, CompoundV3MarketsData>;
|
|
67
|
+
sparkMarketsData: Record<string, SparkMarketsData>;
|
|
68
|
+
aaveV3MarketsData: Record<string, AaveV3MarketData>;
|
|
69
|
+
aaveV2MarketsData: Record<string, AaveV2MarketData>;
|
|
70
|
+
compoundV2MarketsData: Record<string, CompoundV2MarketsData>;
|
|
71
|
+
crvUsdMarketsData: Record<string, CrvUSDGlobalMarketData>;
|
|
72
|
+
llamaLendMarketsData: Record<string, LlamaLendGlobalMarketData>;
|
|
73
|
+
liquityV2MarketsData: Record<string, LiquityV2MarketData>;
|
|
74
|
+
aaveV4SpokesData: Record<string, AaveV4SpokeData>;
|
|
75
|
+
fluidMarketsData: Record<string, FluidMarketData>;
|
|
76
|
+
makerMarketsData: Record<string, IlkInfo>;
|
|
77
|
+
}
|
package/cjs/types/spark.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ export interface SparkAggregatedPositionData {
|
|
|
85
85
|
leftToBorrowUsd: string;
|
|
86
86
|
ratio: string;
|
|
87
87
|
collRatio: string;
|
|
88
|
+
safetyRatio: string;
|
|
88
89
|
netApy: string;
|
|
89
90
|
incentiveUsd: string;
|
|
90
91
|
totalInterestUsd: string;
|
|
@@ -104,6 +105,7 @@ export interface SparkPositionData extends MMPositionData {
|
|
|
104
105
|
ratio: string;
|
|
105
106
|
minRatio: string;
|
|
106
107
|
collRatio: string;
|
|
108
|
+
safetyRatio?: string;
|
|
107
109
|
suppliedUsd: string;
|
|
108
110
|
borrowedUsd: string;
|
|
109
111
|
borrowLimitUsd: string;
|
package/esm/aaveV2/index.js
CHANGED
|
@@ -167,6 +167,8 @@ export const _getAaveV2AccountData = (provider, network, address, assetsData, ma
|
|
|
167
167
|
payload.collRatio = payload.borrowedUsd && payload.borrowedUsd !== '0'
|
|
168
168
|
? new Dec(payload.suppliedCollateralUsd).div(payload.borrowedUsd).mul(100).toString()
|
|
169
169
|
: '0';
|
|
170
|
+
// Aave v2 has no LTV-0 fallback (AaveV3View only), so its safety ratio is the plain ratio.
|
|
171
|
+
payload.safetyRatio = payload.ratio;
|
|
170
172
|
// Calculate borrow limits per asset
|
|
171
173
|
Object.values(payload.usedAssets).forEach((item) => {
|
|
172
174
|
if (item.isBorrowed) {
|
|
@@ -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
|
};
|