@defisaver/positions-sdk 0.0.210 → 0.0.212
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 +1 -1
- package/cjs/config/contracts.d.ts +64 -0
- package/cjs/config/contracts.js +15 -2
- package/cjs/contracts.d.ts +1 -0
- package/cjs/contracts.js +2 -1
- package/cjs/fluid/index.d.ts +88 -0
- package/cjs/fluid/index.js +279 -0
- package/cjs/helpers/fluidHelpers/index.d.ts +6 -0
- package/cjs/helpers/fluidHelpers/index.js +40 -0
- package/cjs/helpers/index.d.ts +1 -0
- package/cjs/helpers/index.js +2 -1
- package/cjs/helpers/liquityV2Helpers/index.js +2 -2
- package/cjs/index.d.ts +2 -1
- package/cjs/index.js +3 -1
- package/cjs/liquityV2/index.js +2 -1
- package/cjs/markets/fluid/index.d.ts +215 -0
- package/cjs/markets/fluid/index.js +1997 -0
- package/cjs/markets/index.d.ts +1 -0
- package/cjs/markets/index.js +6 -1
- package/cjs/morphoAaveV2/index.js +1 -1
- package/cjs/morphoAaveV3/index.js +1 -2
- package/cjs/morphoBlue/index.js +1 -2
- package/cjs/multicall/index.d.ts +1 -0
- package/cjs/multicall/index.js +9 -1
- package/cjs/services/priceService.d.ts +1 -0
- package/cjs/services/priceService.js +29 -1
- package/cjs/services/utils.d.ts +1 -0
- package/cjs/services/utils.js +3 -1
- package/cjs/spark/index.js +1 -2
- package/cjs/staking/staking.d.ts +1 -6
- package/cjs/staking/staking.js +20 -23
- package/cjs/types/contracts/generated/FluidView.d.ts +402 -0
- package/cjs/types/contracts/generated/FluidView.js +5 -0
- package/cjs/types/contracts/generated/index.d.ts +1 -0
- package/cjs/types/fluid.d.ts +250 -0
- package/cjs/types/fluid.js +140 -0
- package/cjs/types/index.d.ts +1 -0
- package/cjs/types/index.js +1 -0
- package/esm/aaveV2/index.js +2 -2
- package/esm/config/contracts.d.ts +64 -0
- package/esm/config/contracts.js +15 -2
- package/esm/contracts.d.ts +1 -0
- package/esm/contracts.js +1 -0
- package/esm/fluid/index.d.ts +88 -0
- package/esm/fluid/index.js +265 -0
- package/esm/helpers/fluidHelpers/index.d.ts +6 -0
- package/esm/helpers/fluidHelpers/index.js +33 -0
- package/esm/helpers/index.d.ts +1 -0
- package/esm/helpers/index.js +1 -0
- package/esm/helpers/liquityV2Helpers/index.js +2 -2
- package/esm/index.d.ts +2 -1
- package/esm/index.js +2 -1
- package/esm/liquityV2/index.js +3 -2
- package/esm/markets/fluid/index.d.ts +215 -0
- package/esm/markets/fluid/index.js +1894 -0
- package/esm/markets/index.d.ts +1 -0
- package/esm/markets/index.js +1 -0
- package/esm/morphoAaveV2/index.js +2 -2
- package/esm/morphoAaveV3/index.js +1 -2
- package/esm/morphoBlue/index.js +1 -2
- package/esm/multicall/index.d.ts +1 -0
- package/esm/multicall/index.js +7 -0
- package/esm/services/priceService.d.ts +1 -0
- package/esm/services/priceService.js +27 -0
- package/esm/services/utils.d.ts +1 -0
- package/esm/services/utils.js +1 -0
- package/esm/spark/index.js +1 -2
- package/esm/staking/staking.d.ts +1 -6
- package/esm/staking/staking.js +24 -22
- package/esm/types/contracts/generated/FluidView.d.ts +402 -0
- package/esm/types/contracts/generated/FluidView.js +4 -0
- package/esm/types/contracts/generated/index.d.ts +1 -0
- package/esm/types/fluid.d.ts +250 -0
- package/esm/types/fluid.js +137 -0
- package/esm/types/index.d.ts +1 -0
- package/esm/types/index.js +1 -0
- package/package.json +6 -3
- package/src/aaveV2/index.ts +2 -2
- package/src/config/contracts.js +15 -2
- package/src/contracts.ts +1 -0
- package/src/fluid/index.ts +350 -0
- package/src/helpers/fluidHelpers/index.ts +54 -0
- package/src/helpers/index.ts +1 -0
- package/src/helpers/liquityV2Helpers/index.ts +3 -3
- package/src/index.ts +2 -0
- package/src/liquityV2/index.ts +7 -3
- package/src/markets/fluid/index.ts +2010 -0
- package/src/markets/index.ts +3 -0
- package/src/morphoAaveV2/index.ts +2 -2
- package/src/morphoAaveV3/index.ts +1 -2
- package/src/morphoBlue/index.ts +1 -3
- package/src/multicall/index.ts +11 -1
- package/src/services/priceService.ts +29 -0
- package/src/services/utils.ts +3 -1
- package/src/spark/index.ts +1 -2
- package/src/staking/staking.ts +22 -22
- package/src/types/contracts/generated/FluidView.ts +479 -0
- package/src/types/contracts/generated/index.ts +1 -0
- package/src/types/fluid.ts +265 -0
- package/src/types/index.ts +2 -1
- package/cjs/services/dsrService.d.ts +0 -3
- package/cjs/services/dsrService.js +0 -28
- package/esm/services/dsrService.d.ts +0 -3
- package/esm/services/dsrService.js +0 -21
- package/src/services/dsrService.ts +0 -16
package/cjs/aaveV2/index.js
CHANGED
|
@@ -66,7 +66,7 @@ const getAaveV2MarketsData = (web3, network, selectedMarket, mainnetWeb3) => __a
|
|
|
66
66
|
}));
|
|
67
67
|
const stEthMarket = markets.find(({ symbol }) => symbol === 'stETH');
|
|
68
68
|
if (stEthMarket) {
|
|
69
|
-
stEthMarket.incentiveSupplyApy = yield (0, staking_1.
|
|
69
|
+
stEthMarket.incentiveSupplyApy = yield (0, staking_1.getStakingApy)('stETH', mainnetWeb3);
|
|
70
70
|
stEthMarket.incentiveSupplyToken = 'stETH';
|
|
71
71
|
}
|
|
72
72
|
const payload = {};
|
|
@@ -6715,6 +6715,12 @@ export namespace ETHPriceFeed {
|
|
|
6715
6715
|
"1": {
|
|
6716
6716
|
address: string;
|
|
6717
6717
|
};
|
|
6718
|
+
"8453": {
|
|
6719
|
+
address: string;
|
|
6720
|
+
};
|
|
6721
|
+
"42161": {
|
|
6722
|
+
address: string;
|
|
6723
|
+
};
|
|
6718
6724
|
};
|
|
6719
6725
|
export { networks_73 as networks };
|
|
6720
6726
|
}
|
|
@@ -6799,6 +6805,12 @@ export namespace WstETHPriceFeed {
|
|
|
6799
6805
|
"1": {
|
|
6800
6806
|
address: string;
|
|
6801
6807
|
};
|
|
6808
|
+
"8453": {
|
|
6809
|
+
address: string;
|
|
6810
|
+
};
|
|
6811
|
+
"42161": {
|
|
6812
|
+
address: string;
|
|
6813
|
+
};
|
|
6802
6814
|
};
|
|
6803
6815
|
export { networks_75 as networks };
|
|
6804
6816
|
}
|
|
@@ -7283,6 +7295,9 @@ export namespace DFSFeedRegistry {
|
|
|
7283
7295
|
"8453": {
|
|
7284
7296
|
address: string;
|
|
7285
7297
|
};
|
|
7298
|
+
"42161": {
|
|
7299
|
+
address: string;
|
|
7300
|
+
};
|
|
7286
7301
|
};
|
|
7287
7302
|
export { networks_78 as networks };
|
|
7288
7303
|
}
|
|
@@ -7680,3 +7695,52 @@ export namespace LiquityV2StabilityPool {
|
|
|
7680
7695
|
let networks_85: {};
|
|
7681
7696
|
export { networks_85 as networks };
|
|
7682
7697
|
}
|
|
7698
|
+
export namespace FluidView {
|
|
7699
|
+
let abi_86: ({
|
|
7700
|
+
inputs: {
|
|
7701
|
+
internalType: string;
|
|
7702
|
+
name: string;
|
|
7703
|
+
type: string;
|
|
7704
|
+
}[];
|
|
7705
|
+
name: string;
|
|
7706
|
+
outputs: {
|
|
7707
|
+
components: {
|
|
7708
|
+
internalType: string;
|
|
7709
|
+
name: string;
|
|
7710
|
+
type: string;
|
|
7711
|
+
}[];
|
|
7712
|
+
internalType: string;
|
|
7713
|
+
name: string;
|
|
7714
|
+
type: string;
|
|
7715
|
+
}[];
|
|
7716
|
+
stateMutability: string;
|
|
7717
|
+
type: string;
|
|
7718
|
+
} | {
|
|
7719
|
+
inputs: {
|
|
7720
|
+
internalType: string;
|
|
7721
|
+
name: string;
|
|
7722
|
+
type: string;
|
|
7723
|
+
}[];
|
|
7724
|
+
name: string;
|
|
7725
|
+
outputs: {
|
|
7726
|
+
internalType: string;
|
|
7727
|
+
name: string;
|
|
7728
|
+
type: string;
|
|
7729
|
+
}[];
|
|
7730
|
+
stateMutability: string;
|
|
7731
|
+
type: string;
|
|
7732
|
+
})[];
|
|
7733
|
+
export { abi_86 as abi };
|
|
7734
|
+
let networks_86: {
|
|
7735
|
+
"1": {
|
|
7736
|
+
address: string;
|
|
7737
|
+
};
|
|
7738
|
+
"8453": {
|
|
7739
|
+
address: string;
|
|
7740
|
+
};
|
|
7741
|
+
"42161": {
|
|
7742
|
+
address: string;
|
|
7743
|
+
};
|
|
7744
|
+
};
|
|
7745
|
+
export { networks_86 as networks };
|
|
7746
|
+
}
|
package/cjs/config/contracts.js
CHANGED
|
@@ -1015,7 +1015,9 @@ module.exports = {
|
|
|
1015
1015
|
"ETHPriceFeed": {
|
|
1016
1016
|
"abi": [{ "inputs": [{ "internalType": "address", "name": "_aggregator", "type": "address" }, { "internalType": "address", "name": "_accessController", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "int256", "name": "current", "type": "int256" }, { "indexed": true, "internalType": "uint256", "name": "roundId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "updatedAt", "type": "uint256" }], "name": "AnswerUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint256", "name": "roundId", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "startedBy", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "startedAt", "type": "uint256" }], "name": "NewRound", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }], "name": "OwnershipTransferRequested", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }], "name": "OwnershipTransferred", "type": "event" }, { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "accessController", "outputs": [{ "internalType": "contract AccessControllerInterface", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "aggregator", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_aggregator", "type": "address" }], "name": "confirmAggregator", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "decimals", "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "description", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_roundId", "type": "uint256" }], "name": "getAnswer", "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint80", "name": "_roundId", "type": "uint80" }], "name": "getRoundData", "outputs": [{ "internalType": "uint80", "name": "roundId", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_roundId", "type": "uint256" }], "name": "getTimestamp", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "latestAnswer", "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "latestRound", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "latestRoundData", "outputs": [{ "internalType": "uint80", "name": "roundId", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "latestTimestamp", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address payable", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "name": "phaseAggregators", "outputs": [{ "internalType": "contract AggregatorV2V3Interface", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "phaseId", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_aggregator", "type": "address" }], "name": "proposeAggregator", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "proposedAggregator", "outputs": [{ "internalType": "contract AggregatorV2V3Interface", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint80", "name": "_roundId", "type": "uint80" }], "name": "proposedGetRoundData", "outputs": [{ "internalType": "uint80", "name": "roundId", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "proposedLatestRoundData", "outputs": [{ "internalType": "uint80", "name": "roundId", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_accessController", "type": "address" }], "name": "setController", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_to", "type": "address" }], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "version", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }],
|
|
1017
1017
|
"networks": {
|
|
1018
|
-
"1": { "address": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419" }
|
|
1018
|
+
"1": { "address": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419" },
|
|
1019
|
+
"8453": { "address": "0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70" },
|
|
1020
|
+
"42161": { "address": "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612" }
|
|
1019
1021
|
},
|
|
1020
1022
|
},
|
|
1021
1023
|
"USDCPriceFeed": {
|
|
@@ -1027,7 +1029,9 @@ module.exports = {
|
|
|
1027
1029
|
"WstETHPriceFeed": {
|
|
1028
1030
|
"abi": [{ "inputs": [{ "internalType": "address", "name": "stETHtoETHPriceFeed_", "type": "address" }, { "internalType": "address", "name": "wstETH_", "type": "address" }, { "internalType": "uint8", "name": "decimals_", "type": "uint8" }], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "BadDecimals", "type": "error" }, { "inputs": [], "name": "InvalidInt256", "type": "error" }, { "inputs": [], "name": "decimals", "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "description", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "latestRoundData", "outputs": [{ "internalType": "uint80", "name": "roundId", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "stETHToETHPriceFeedDecimals", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "stETHtoETHPriceFeed", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "version", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "wstETH", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "wstETHScale", "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], "stateMutability": "view", "type": "function" }],
|
|
1029
1031
|
"networks": {
|
|
1030
|
-
"1": { "address": "0x4F67e4d9BD67eFa28236013288737D39AeF48e79" }
|
|
1032
|
+
"1": { "address": "0x4F67e4d9BD67eFa28236013288737D39AeF48e79" },
|
|
1033
|
+
"8453": { "address": "0x43a5C292A453A3bF3606fa856197f09D7B74251a" },
|
|
1034
|
+
"42161": { "address": "0xb523AE262D20A936BC152e6023996e46FDC2A95D" }
|
|
1031
1035
|
}
|
|
1032
1036
|
},
|
|
1033
1037
|
"MorphoBlueView": {
|
|
@@ -1073,6 +1077,7 @@ module.exports = {
|
|
|
1073
1077
|
"abi": [{ "inputs": [], "name": "NonContractCall", "type": "error" }, { "inputs": [], "name": "SenderNotAdmin", "type": "error" }, { "inputs": [], "name": "SenderNotOwner", "type": "error" }, { "inputs": [], "name": "adminVault", "outputs": [{ "internalType": "contract AdminVault", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }], "name": "aggregators", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "getFeed", "outputs": [{ "internalType": "address", "name": "aggregator", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "kill", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "latestRoundData", "outputs": [{ "internalType": "uint80", "name": "roundId", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "address", "name": "aggregator", "type": "address" }], "name": "setFeed", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address[]", "name": "bases", "type": "address[]" }, { "internalType": "address[]", "name": "quotes", "type": "address[]" }, { "internalType": "address[]", "name": "aggregator", "type": "address[]" }], "name": "setFeeds", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_token", "type": "address" }, { "internalType": "address", "name": "_receiver", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }], "name": "withdrawStuckFunds", "outputs": [], "stateMutability": "nonpayable", "type": "function" }],
|
|
1074
1078
|
"networks": {
|
|
1075
1079
|
"8453": { "address": "0x7dFF34190d0307fC234fc7E8C152C9715083eB02" },
|
|
1080
|
+
"42161": { "address": "0x158E27De8B5E5bC3FA1C6D5b365a291c54f6b0Fd" }
|
|
1076
1081
|
}
|
|
1077
1082
|
},
|
|
1078
1083
|
"LlamaLendView": {
|
|
@@ -1118,5 +1123,13 @@ module.exports = {
|
|
|
1118
1123
|
"LiquityV2StabilityPool": {
|
|
1119
1124
|
"abi": [{ "inputs": [{ "internalType": "contract IAddressesRegistry", "name": "_addressesRegistry", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "_newActivePoolAddress", "type": "address" }], "name": "ActivePoolAddressChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "_B", "type": "uint256" }, { "indexed": false, "internalType": "uint128", "name": "_epoch", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "_scale", "type": "uint128" }], "name": "B_Updated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "_newBoldTokenAddress", "type": "address" }], "name": "BoldTokenAddressChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "_newDefaultPoolAddress", "type": "address" }], "name": "DefaultPoolAddressChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "_depositor", "type": "address" }, { "indexed": false, "internalType": "enum IStabilityPoolEvents.Operation", "name": "_operation", "type": "uint8" }, { "indexed": false, "internalType": "uint256", "name": "_depositLossSinceLastOperation", "type": "uint256" }, { "indexed": false, "internalType": "int256", "name": "_depositChange", "type": "int256" }, { "indexed": false, "internalType": "uint256", "name": "_yieldGainSinceLastOperation", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_yieldGainClaimed", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_ethGainSinceLastOperation", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_ethGainClaimed", "type": "uint256" }], "name": "DepositOperation", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "_depositor", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "_newDeposit", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_stashedColl", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_snapshotP", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_snapshotS", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_snapshotB", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_snapshotScale", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_snapshotEpoch", "type": "uint256" }], "name": "DepositUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint128", "name": "_currentEpoch", "type": "uint128" }], "name": "EpochUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "_to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "_amount", "type": "uint256" }], "name": "EtherSent", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "_P", "type": "uint256" }], "name": "P_Updated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "_newPriceFeedAddress", "type": "address" }], "name": "PriceFeedAddressChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "_S", "type": "uint256" }, { "indexed": false, "internalType": "uint128", "name": "_epoch", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "_scale", "type": "uint128" }], "name": "S_Updated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint128", "name": "_currentScale", "type": "uint128" }], "name": "ScaleUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "_newBalance", "type": "uint256" }], "name": "StabilityPoolBoldBalanceUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "_newBalance", "type": "uint256" }], "name": "StabilityPoolCollBalanceUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "_newTroveManagerAddress", "type": "address" }], "name": "TroveManagerAddressChanged", "type": "event" }, { "inputs": [], "name": "NAME", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "P", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "SCALE_FACTOR", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "activePool", "outputs": [{ "internalType": "contract IActivePool", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "boldToken", "outputs": [{ "internalType": "contract IBoldToken", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "claimAllCollGains", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "collToken", "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "currentEpoch", "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "currentScale", "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "depositSnapshots", "outputs": [{ "internalType": "uint256", "name": "S", "type": "uint256" }, { "internalType": "uint256", "name": "P", "type": "uint256" }, { "internalType": "uint256", "name": "B", "type": "uint256" }, { "internalType": "uint128", "name": "scale", "type": "uint128" }, { "internalType": "uint128", "name": "epoch", "type": "uint128" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "deposits", "outputs": [{ "internalType": "uint256", "name": "initialValue", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }, { "internalType": "uint128", "name": "", "type": "uint128" }], "name": "epochToScaleToB", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }, { "internalType": "uint128", "name": "", "type": "uint128" }], "name": "epochToScaleToS", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getCollBalance", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_depositor", "type": "address" }], "name": "getCompoundedBoldDeposit", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_depositor", "type": "address" }], "name": "getDepositorCollGain", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_depositor", "type": "address" }], "name": "getDepositorYieldGain", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_depositor", "type": "address" }], "name": "getDepositorYieldGainWithPending", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getEntireSystemColl", "outputs": [{ "internalType": "uint256", "name": "entireSystemColl", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getEntireSystemDebt", "outputs": [{ "internalType": "uint256", "name": "entireSystemDebt", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getTotalBoldDeposits", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getYieldGainsOwed", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getYieldGainsPending", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastBoldLossError_Offset", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastBoldLossError_TotalDeposits", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastCollError_Offset", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastYieldError", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_debtToOffset", "type": "uint256" }, { "internalType": "uint256", "name": "_collToAdd", "type": "uint256" }], "name": "offset", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_topUp", "type": "uint256" }, { "internalType": "bool", "name": "_doClaim", "type": "bool" }], "name": "provideToSP", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "stashedColl", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_boldYield", "type": "uint256" }], "name": "triggerBoldRewards", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "troveManager", "outputs": [{ "internalType": "contract ITroveManager", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "bool", "name": "_doClaim", "type": "bool" }], "name": "withdrawFromSP", "outputs": [], "stateMutability": "nonpayable", "type": "function" }],
|
|
1120
1125
|
"networks": {}
|
|
1126
|
+
},
|
|
1127
|
+
"FluidView": {
|
|
1128
|
+
"abi": [{ "inputs": [], "name": "getAllFTokens", "outputs": [{ "internalType": "address[]", "name": "", "type": "address[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getAllFTokensData", "outputs": [{ "components": [{ "internalType": "address", "name": "tokenAddress", "type": "address" }, { "internalType": "bool", "name": "isNativeUnderlying", "type": "bool" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "address", "name": "asset", "type": "address" }, { "internalType": "uint256", "name": "totalAssets", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "convertToShares", "type": "uint256" }, { "internalType": "uint256", "name": "convertToAssets", "type": "uint256" }, { "internalType": "uint256", "name": "rewardsRate", "type": "uint256" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawable", "type": "uint256" }, { "internalType": "bool", "name": "modeWithInterest", "type": "bool" }, { "internalType": "uint256", "name": "expandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "expandDuration", "type": "uint256" }], "internalType": "struct FluidView.FTokenData[]", "name": "", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "getAllUserEarnPositionsWithFTokens", "outputs": [{ "components": [{ "internalType": "uint256", "name": "fTokenShares", "type": "uint256" }, { "internalType": "uint256", "name": "underlyingAssets", "type": "uint256" }, { "internalType": "uint256", "name": "underlyingBalance", "type": "uint256" }, { "internalType": "uint256", "name": "allowance", "type": "uint256" }], "internalType": "struct FluidView.UserEarnPosition[]", "name": "userPositions", "type": "tuple[]" }, { "components": [{ "internalType": "address", "name": "tokenAddress", "type": "address" }, { "internalType": "bool", "name": "isNativeUnderlying", "type": "bool" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "address", "name": "asset", "type": "address" }, { "internalType": "uint256", "name": "totalAssets", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "convertToShares", "type": "uint256" }, { "internalType": "uint256", "name": "convertToAssets", "type": "uint256" }, { "internalType": "uint256", "name": "rewardsRate", "type": "uint256" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawable", "type": "uint256" }, { "internalType": "bool", "name": "modeWithInterest", "type": "bool" }, { "internalType": "uint256", "name": "expandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "expandDuration", "type": "uint256" }], "internalType": "struct FluidView.FTokenData[]", "name": "fTokensData", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_fToken", "type": "address" }], "name": "getFTokenData", "outputs": [{ "components": [{ "internalType": "address", "name": "tokenAddress", "type": "address" }, { "internalType": "bool", "name": "isNativeUnderlying", "type": "bool" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "address", "name": "asset", "type": "address" }, { "internalType": "uint256", "name": "totalAssets", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "convertToShares", "type": "uint256" }, { "internalType": "uint256", "name": "convertToAssets", "type": "uint256" }, { "internalType": "uint256", "name": "rewardsRate", "type": "uint256" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawable", "type": "uint256" }, { "internalType": "bool", "name": "modeWithInterest", "type": "bool" }, { "internalType": "uint256", "name": "expandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "expandDuration", "type": "uint256" }], "internalType": "struct FluidView.FTokenData", "name": "fTokenData", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_nftId", "type": "uint256" }], "name": "getPositionByNftId", "outputs": [{ "components": [{ "internalType": "uint256", "name": "nftId", "type": "uint256" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "bool", "name": "isLiquidated", "type": "bool" }, { "internalType": "bool", "name": "isSupplyPosition", "type": "bool" }, { "internalType": "uint256", "name": "supply", "type": "uint256" }, { "internalType": "uint256", "name": "borrow", "type": "uint256" }, { "internalType": "uint256", "name": "ratio", "type": "uint256" }, { "internalType": "int256", "name": "tick", "type": "int256" }, { "internalType": "uint256", "name": "tickId", "type": "uint256" }], "internalType": "struct FluidView.UserPosition", "name": "position", "type": "tuple" }, { "components": [{ "internalType": "address", "name": "vault", "type": "address" }, { "internalType": "uint256", "name": "vaultId", "type": "uint256" }, { "internalType": "uint256", "name": "vaultType", "type": "uint256" }, { "internalType": "bool", "name": "isSmartColl", "type": "bool" }, { "internalType": "bool", "name": "isSmartDebt", "type": "bool" }, { "internalType": "address", "name": "supplyToken0", "type": "address" }, { "internalType": "address", "name": "supplyToken1", "type": "address" }, { "internalType": "address", "name": "borrowToken0", "type": "address" }, { "internalType": "address", "name": "borrowToken1", "type": "address" }, { "internalType": "uint256", "name": "supplyToken0Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "supplyToken1Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken0Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken1Decimals", "type": "uint256" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationMaxLimit", "type": "uint16" }, { "internalType": "uint16", "name": "withdrawalGap", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationPenalty", "type": "uint16" }, { "internalType": "uint16", "name": "borrowFee", "type": "uint16" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "oraclePriceOperate", "type": "uint256" }, { "internalType": "uint256", "name": "oraclePriceLiquidate", "type": "uint256" }, { "internalType": "uint256", "name": "vaultSupplyExchangePrice", "type": "uint256" }, { "internalType": "uint256", "name": "vaultBorrowExchangePrice", "type": "uint256" }, { "internalType": "int256", "name": "supplyRateVault", "type": "int256" }, { "internalType": "int256", "name": "borrowRateVault", "type": "int256" }, { "internalType": "int256", "name": "rewardsOrFeeRateSupply", "type": "int256" }, { "internalType": "int256", "name": "rewardsOrFeeRateBorrow", "type": "int256" }, { "internalType": "uint256", "name": "totalPositions", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyVault", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowVault", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawalLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawableUntilLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "baseWithdrawalLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawExpandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawExpandDuration", "type": "uint256" }, { "internalType": "uint256", "name": "borrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowableUntilLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowLimitUtilization", "type": "uint256" }, { "internalType": "uint256", "name": "maxBorrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowExpandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "borrowExpandDuration", "type": "uint256" }, { "internalType": "uint256", "name": "baseBorrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "minimumBorrowing", "type": "uint256" }], "internalType": "struct FluidView.VaultData", "name": "vault", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_nftId", "type": "uint256" }], "name": "getRatio", "outputs": [{ "internalType": "uint256", "name": "ratio", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_fToken", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getUserEarnPosition", "outputs": [{ "components": [{ "internalType": "uint256", "name": "fTokenShares", "type": "uint256" }, { "internalType": "uint256", "name": "underlyingAssets", "type": "uint256" }, { "internalType": "uint256", "name": "underlyingBalance", "type": "uint256" }, { "internalType": "uint256", "name": "allowance", "type": "uint256" }], "internalType": "struct FluidView.UserEarnPosition", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_fToken", "type": "address" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getUserEarnPositionWithFToken", "outputs": [{ "components": [{ "internalType": "uint256", "name": "fTokenShares", "type": "uint256" }, { "internalType": "uint256", "name": "underlyingAssets", "type": "uint256" }, { "internalType": "uint256", "name": "underlyingBalance", "type": "uint256" }, { "internalType": "uint256", "name": "allowance", "type": "uint256" }], "internalType": "struct FluidView.UserEarnPosition", "name": "userPosition", "type": "tuple" }, { "components": [{ "internalType": "address", "name": "tokenAddress", "type": "address" }, { "internalType": "bool", "name": "isNativeUnderlying", "type": "bool" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "address", "name": "asset", "type": "address" }, { "internalType": "uint256", "name": "totalAssets", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, { "internalType": "uint256", "name": "convertToShares", "type": "uint256" }, { "internalType": "uint256", "name": "convertToAssets", "type": "uint256" }, { "internalType": "uint256", "name": "rewardsRate", "type": "uint256" }, { "internalType": "uint256", "name": "supplyRate", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawable", "type": "uint256" }, { "internalType": "bool", "name": "modeWithInterest", "type": "bool" }, { "internalType": "uint256", "name": "expandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "expandDuration", "type": "uint256" }], "internalType": "struct FluidView.FTokenData", "name": "fTokenData", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "getUserNftIds", "outputs": [{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "getUserNftIdsWithVaultIds", "outputs": [{ "components": [{ "internalType": "uint256", "name": "nftId", "type": "uint256" }, { "internalType": "uint256", "name": "vaultId", "type": "uint256" }, { "internalType": "address", "name": "vaultAddr", "type": "address" }], "internalType": "struct FluidView.NftWithVault[]", "name": "retVal", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "getUserPositions", "outputs": [{ "components": [{ "internalType": "uint256", "name": "nftId", "type": "uint256" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "bool", "name": "isLiquidated", "type": "bool" }, { "internalType": "bool", "name": "isSupplyPosition", "type": "bool" }, { "internalType": "uint256", "name": "supply", "type": "uint256" }, { "internalType": "uint256", "name": "borrow", "type": "uint256" }, { "internalType": "uint256", "name": "ratio", "type": "uint256" }, { "internalType": "int256", "name": "tick", "type": "int256" }, { "internalType": "uint256", "name": "tickId", "type": "uint256" }], "internalType": "struct FluidView.UserPosition[]", "name": "positions", "type": "tuple[]" }, { "components": [{ "internalType": "address", "name": "vault", "type": "address" }, { "internalType": "uint256", "name": "vaultId", "type": "uint256" }, { "internalType": "uint256", "name": "vaultType", "type": "uint256" }, { "internalType": "bool", "name": "isSmartColl", "type": "bool" }, { "internalType": "bool", "name": "isSmartDebt", "type": "bool" }, { "internalType": "address", "name": "supplyToken0", "type": "address" }, { "internalType": "address", "name": "supplyToken1", "type": "address" }, { "internalType": "address", "name": "borrowToken0", "type": "address" }, { "internalType": "address", "name": "borrowToken1", "type": "address" }, { "internalType": "uint256", "name": "supplyToken0Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "supplyToken1Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken0Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken1Decimals", "type": "uint256" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationMaxLimit", "type": "uint16" }, { "internalType": "uint16", "name": "withdrawalGap", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationPenalty", "type": "uint16" }, { "internalType": "uint16", "name": "borrowFee", "type": "uint16" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "oraclePriceOperate", "type": "uint256" }, { "internalType": "uint256", "name": "oraclePriceLiquidate", "type": "uint256" }, { "internalType": "uint256", "name": "vaultSupplyExchangePrice", "type": "uint256" }, { "internalType": "uint256", "name": "vaultBorrowExchangePrice", "type": "uint256" }, { "internalType": "int256", "name": "supplyRateVault", "type": "int256" }, { "internalType": "int256", "name": "borrowRateVault", "type": "int256" }, { "internalType": "int256", "name": "rewardsOrFeeRateSupply", "type": "int256" }, { "internalType": "int256", "name": "rewardsOrFeeRateBorrow", "type": "int256" }, { "internalType": "uint256", "name": "totalPositions", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyVault", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowVault", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawalLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawableUntilLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "baseWithdrawalLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawExpandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawExpandDuration", "type": "uint256" }, { "internalType": "uint256", "name": "borrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowableUntilLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowLimitUtilization", "type": "uint256" }, { "internalType": "uint256", "name": "maxBorrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowExpandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "borrowExpandDuration", "type": "uint256" }, { "internalType": "uint256", "name": "baseBorrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "minimumBorrowing", "type": "uint256" }], "internalType": "struct FluidView.VaultData[]", "name": "vaults", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_vault", "type": "address" }], "name": "getVaultData", "outputs": [{ "components": [{ "internalType": "address", "name": "vault", "type": "address" }, { "internalType": "uint256", "name": "vaultId", "type": "uint256" }, { "internalType": "uint256", "name": "vaultType", "type": "uint256" }, { "internalType": "bool", "name": "isSmartColl", "type": "bool" }, { "internalType": "bool", "name": "isSmartDebt", "type": "bool" }, { "internalType": "address", "name": "supplyToken0", "type": "address" }, { "internalType": "address", "name": "supplyToken1", "type": "address" }, { "internalType": "address", "name": "borrowToken0", "type": "address" }, { "internalType": "address", "name": "borrowToken1", "type": "address" }, { "internalType": "uint256", "name": "supplyToken0Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "supplyToken1Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken0Decimals", "type": "uint256" }, { "internalType": "uint256", "name": "borrowToken1Decimals", "type": "uint256" }, { "internalType": "uint16", "name": "collateralFactor", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationThreshold", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationMaxLimit", "type": "uint16" }, { "internalType": "uint16", "name": "withdrawalGap", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationPenalty", "type": "uint16" }, { "internalType": "uint16", "name": "borrowFee", "type": "uint16" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "oraclePriceOperate", "type": "uint256" }, { "internalType": "uint256", "name": "oraclePriceLiquidate", "type": "uint256" }, { "internalType": "uint256", "name": "vaultSupplyExchangePrice", "type": "uint256" }, { "internalType": "uint256", "name": "vaultBorrowExchangePrice", "type": "uint256" }, { "internalType": "int256", "name": "supplyRateVault", "type": "int256" }, { "internalType": "int256", "name": "borrowRateVault", "type": "int256" }, { "internalType": "int256", "name": "rewardsOrFeeRateSupply", "type": "int256" }, { "internalType": "int256", "name": "rewardsOrFeeRateBorrow", "type": "int256" }, { "internalType": "uint256", "name": "totalPositions", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyVault", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrowVault", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawalLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawableUntilLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawable", "type": "uint256" }, { "internalType": "uint256", "name": "baseWithdrawalLimit", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawExpandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawExpandDuration", "type": "uint256" }, { "internalType": "uint256", "name": "borrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowableUntilLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowable", "type": "uint256" }, { "internalType": "uint256", "name": "borrowLimitUtilization", "type": "uint256" }, { "internalType": "uint256", "name": "maxBorrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowExpandPercent", "type": "uint256" }, { "internalType": "uint256", "name": "borrowExpandDuration", "type": "uint256" }, { "internalType": "uint256", "name": "baseBorrowLimit", "type": "uint256" }, { "internalType": "uint256", "name": "minimumBorrowing", "type": "uint256" }], "internalType": "struct FluidView.VaultData", "name": "vaultData", "type": "tuple" }], "stateMutability": "view", "type": "function" }],
|
|
1129
|
+
"networks": {
|
|
1130
|
+
"1": { "address": "0xf8e3bbf7c95057be1fD5E741a9ADb73E956dC724" },
|
|
1131
|
+
"8453": { "address": "0x5835CaDbA8843CD6d6d55782908351E9c74221aD" },
|
|
1132
|
+
"42161": { "address": "0x2d51BB6Ac5c1eC8DD6432e1FF980fC864B626e01" }
|
|
1133
|
+
}
|
|
1121
1134
|
}
|
|
1122
1135
|
};
|
package/cjs/contracts.d.ts
CHANGED
|
@@ -49,3 +49,4 @@ export declare const MorphoBlueViewContract: (web3: Web3, network: NetworkNumber
|
|
|
49
49
|
export declare const LlamaLendViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.LlamaLendView;
|
|
50
50
|
export declare const LiquityV2ViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.LiquityV2View;
|
|
51
51
|
export declare const EulerV2ViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.EulerV2View;
|
|
52
|
+
export declare const FluidViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.FluidView;
|
package/cjs/contracts.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.EulerV2ViewContract = exports.LiquityV2ViewContract = exports.LlamaLendViewContract = exports.MorphoBlueViewContract = exports.DFSFeedRegistryContract = exports.FeedRegistryContract = exports.WstETHPriceFeedContract = exports.USDCPriceFeedContract = exports.COMPPriceFeedContract = exports.ETHPriceFeedContract = exports.ChickenBondsManagerContract = exports.ChickenBondsViewContract = exports.McdVatContract = exports.McdJugContract = exports.McdDogContract = exports.McdSpotterContract = exports.McdViewContract = exports.LiquityActivePoolContract = exports.LiquityPriceFeedContract = exports.LiquityTroveManagerContract = exports.LiquityCollSurplusPoolContract = exports.LiquityViewContract = exports.CrvUSDFactoryContract = exports.CrvUSDViewContract = exports.SparkViewContract = exports.SparkIncentiveDataProviderContract = exports.MorphoAaveV2ViewContract = exports.PotContract = exports.ComptrollerContract = exports.CompoundLoanInfoContract = exports.AaveLoanInfoV2Contract = exports.wstETHContract = exports.CompV3ViewContract = exports.BalanceScannerContract = exports.REthContract = exports.CbEthContract = exports.LidoContract = exports.GhoTokenContract = exports.AaveIncentiveDataProviderV3Contract = exports.AaveV3ViewContract = exports.UniMulticallContract = exports.createContractWrapper = exports.getErc20Contract = exports.getConfigContractAbi = exports.getConfigContractAddress = void 0;
|
|
6
|
+
exports.FluidViewContract = exports.EulerV2ViewContract = exports.LiquityV2ViewContract = exports.LlamaLendViewContract = exports.MorphoBlueViewContract = exports.DFSFeedRegistryContract = exports.FeedRegistryContract = exports.WstETHPriceFeedContract = exports.USDCPriceFeedContract = exports.COMPPriceFeedContract = exports.ETHPriceFeedContract = exports.ChickenBondsManagerContract = exports.ChickenBondsViewContract = exports.McdVatContract = exports.McdJugContract = exports.McdDogContract = exports.McdSpotterContract = exports.McdViewContract = exports.LiquityActivePoolContract = exports.LiquityPriceFeedContract = exports.LiquityTroveManagerContract = exports.LiquityCollSurplusPoolContract = exports.LiquityViewContract = exports.CrvUSDFactoryContract = exports.CrvUSDViewContract = exports.SparkViewContract = exports.SparkIncentiveDataProviderContract = exports.MorphoAaveV2ViewContract = exports.PotContract = exports.ComptrollerContract = exports.CompoundLoanInfoContract = exports.AaveLoanInfoV2Contract = exports.wstETHContract = exports.CompV3ViewContract = exports.BalanceScannerContract = exports.REthContract = exports.CbEthContract = exports.LidoContract = exports.GhoTokenContract = exports.AaveIncentiveDataProviderV3Contract = exports.AaveV3ViewContract = exports.UniMulticallContract = exports.createContractWrapper = exports.getErc20Contract = exports.getConfigContractAbi = exports.getConfigContractAddress = void 0;
|
|
7
7
|
const contracts_1 = __importDefault(require("./config/contracts"));
|
|
8
8
|
const contractConfig = contracts_1.default;
|
|
9
9
|
const getConfigContractAddress = (name, network, block) => {
|
|
@@ -91,3 +91,4 @@ exports.MorphoBlueViewContract = createContractFromConfigFunc('MorphoBlueView');
|
|
|
91
91
|
exports.LlamaLendViewContract = createContractFromConfigFunc('LlamaLendView');
|
|
92
92
|
exports.LiquityV2ViewContract = createContractFromConfigFunc('LiquityV2View');
|
|
93
93
|
exports.EulerV2ViewContract = createContractFromConfigFunc('EulerV2View');
|
|
94
|
+
exports.FluidViewContract = createContractFromConfigFunc('FluidView');
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import Web3 from 'web3';
|
|
2
|
+
import { EthAddress, NetworkNumber } from '../types/common';
|
|
3
|
+
import { FluidAssetsData, FluidMarketData, FluidMarketInfo, FluidUsedAssets, FluidVaultData, InnerFluidMarketData } from '../types';
|
|
4
|
+
export declare const EMPTY_USED_ASSET: {
|
|
5
|
+
isSupplied: boolean;
|
|
6
|
+
isBorrowed: boolean;
|
|
7
|
+
supplied: string;
|
|
8
|
+
suppliedUsd: string;
|
|
9
|
+
borrowed: string;
|
|
10
|
+
borrowedUsd: string;
|
|
11
|
+
symbol: string;
|
|
12
|
+
collateral: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const EMPTY_FLUID_DATA: {
|
|
15
|
+
usedAssets: {};
|
|
16
|
+
suppliedUsd: string;
|
|
17
|
+
borrowedUsd: string;
|
|
18
|
+
borrowLimitUsd: string;
|
|
19
|
+
leftToBorrowUsd: string;
|
|
20
|
+
ratio: string;
|
|
21
|
+
minRatio: string;
|
|
22
|
+
netApy: string;
|
|
23
|
+
incentiveUsd: string;
|
|
24
|
+
totalInterestUsd: string;
|
|
25
|
+
isSubscribedToAutomation: boolean;
|
|
26
|
+
automationResubscribeRequired: boolean;
|
|
27
|
+
lastUpdated: number;
|
|
28
|
+
};
|
|
29
|
+
export declare const getFluidMarketData: (web3: Web3, network: NetworkNumber, market: FluidMarketInfo, mainnetWeb3: Web3) => Promise<FluidMarketData>;
|
|
30
|
+
export declare const getFluidVaultIdsForUser: (web3: Web3, network: NetworkNumber, user: EthAddress) => Promise<string[]>;
|
|
31
|
+
export declare const getFluidPosition: (web3: Web3, network: NetworkNumber, vaultId: string, extractedState: {
|
|
32
|
+
assetsData: FluidAssetsData;
|
|
33
|
+
marketData: InnerFluidMarketData;
|
|
34
|
+
}) => Promise<FluidVaultData>;
|
|
35
|
+
export declare const getFluidPositionWithMarket: (web3: Web3, network: NetworkNumber, vaultId: string, mainnetWeb3: Web3) => Promise<{
|
|
36
|
+
userData: FluidVaultData;
|
|
37
|
+
marketData: FluidMarketData;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const getAllFluidMarketDataChunked: (network: NetworkNumber, web3: Web3, mainnetWeb3: Web3) => Promise<FluidMarketData[]>;
|
|
40
|
+
export declare const getFluidTokenData: (web3: Web3, network: NetworkNumber, token: string) => Promise<{
|
|
41
|
+
fTokenAddress: any;
|
|
42
|
+
fTokenSymbol: string;
|
|
43
|
+
decimals: string;
|
|
44
|
+
totalDeposited: string;
|
|
45
|
+
withdrawable: string;
|
|
46
|
+
apy: string;
|
|
47
|
+
depositRate: string;
|
|
48
|
+
withdrawRate: string;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const getFluidDepositData: (web3: Web3, network: NetworkNumber, token: string, address: EthAddress) => Promise<{
|
|
51
|
+
fTokenAddress: any;
|
|
52
|
+
fTokenSymbol: string;
|
|
53
|
+
decimals: string;
|
|
54
|
+
totalDeposited: string;
|
|
55
|
+
withdrawable: string;
|
|
56
|
+
apy: string;
|
|
57
|
+
depositRate: string;
|
|
58
|
+
withdrawRate: string;
|
|
59
|
+
deposited: string;
|
|
60
|
+
depositedShares: string;
|
|
61
|
+
}>;
|
|
62
|
+
export declare const getUserPositions: (web3: Web3, network: NetworkNumber, user: EthAddress, mainnetWeb3: Web3) => Promise<{
|
|
63
|
+
marketData: FluidMarketData;
|
|
64
|
+
userData: {
|
|
65
|
+
nftId: string;
|
|
66
|
+
suppliedUsd: string;
|
|
67
|
+
borrowedUsd: string;
|
|
68
|
+
borrowLimitUsd: string;
|
|
69
|
+
liquidationLimitUsd: string;
|
|
70
|
+
leftToBorrowUsd: string;
|
|
71
|
+
netApy: string;
|
|
72
|
+
incentiveUsd: string;
|
|
73
|
+
ratio: string;
|
|
74
|
+
collRatio: string;
|
|
75
|
+
minRatio: string;
|
|
76
|
+
totalInterestUsd: string;
|
|
77
|
+
leveragedType?: string | undefined;
|
|
78
|
+
leveragedAsset?: string | undefined;
|
|
79
|
+
liquidationPrice?: string | undefined;
|
|
80
|
+
leveragedLsdAssetRatio?: string | undefined;
|
|
81
|
+
owner: string;
|
|
82
|
+
vaultId: number;
|
|
83
|
+
usedAssets: FluidUsedAssets;
|
|
84
|
+
isSubscribedToAutomation: boolean;
|
|
85
|
+
automationResubscribeRequired: boolean;
|
|
86
|
+
lastUpdated: number;
|
|
87
|
+
};
|
|
88
|
+
}[]>;
|