@defisaver/positions-sdk 0.0.201-fluid-dev → 0.0.201-fluid-dev-2

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.
Files changed (42) hide show
  1. package/cjs/config/contracts.d.ts +11 -5
  2. package/cjs/config/contracts.js +4 -2
  3. package/cjs/fluid/index.d.ts +1 -0
  4. package/cjs/fluid/index.js +65 -12
  5. package/cjs/markets/fluid/index.d.ts +8 -10
  6. package/cjs/markets/fluid/index.js +466 -77
  7. package/cjs/markets/index.d.ts +1 -1
  8. package/cjs/markets/index.js +3 -1
  9. package/cjs/morphoBlue/index.js +1 -2
  10. package/cjs/multicall/index.d.ts +1 -0
  11. package/cjs/multicall/index.js +8 -1
  12. package/cjs/services/utils.d.ts +1 -0
  13. package/cjs/services/utils.js +3 -1
  14. package/cjs/types/contracts/generated/FluidView.d.ts +125 -41
  15. package/cjs/types/fluid.d.ts +16 -1
  16. package/cjs/types/fluid.js +3 -0
  17. package/esm/config/contracts.d.ts +11 -5
  18. package/esm/config/contracts.js +4 -2
  19. package/esm/fluid/index.d.ts +1 -0
  20. package/esm/fluid/index.js +65 -13
  21. package/esm/markets/fluid/index.d.ts +8 -10
  22. package/esm/markets/fluid/index.js +460 -71
  23. package/esm/markets/index.d.ts +1 -1
  24. package/esm/markets/index.js +1 -1
  25. package/esm/morphoBlue/index.js +1 -2
  26. package/esm/multicall/index.d.ts +1 -0
  27. package/esm/multicall/index.js +6 -0
  28. package/esm/services/utils.d.ts +1 -0
  29. package/esm/services/utils.js +1 -0
  30. package/esm/types/contracts/generated/FluidView.d.ts +125 -41
  31. package/esm/types/fluid.d.ts +16 -1
  32. package/esm/types/fluid.js +3 -0
  33. package/package.json +5 -3
  34. package/src/config/contracts.js +4 -2
  35. package/src/fluid/index.ts +69 -12
  36. package/src/markets/fluid/index.ts +467 -74
  37. package/src/markets/index.ts +1 -1
  38. package/src/morphoBlue/index.ts +1 -3
  39. package/src/multicall/index.ts +10 -1
  40. package/src/services/utils.ts +3 -1
  41. package/src/types/contracts/generated/FluidView.ts +159 -79
  42. package/src/types/fluid.ts +15 -0
@@ -6,4 +6,4 @@ export { MorphoBlueMarkets, findMorphoBlueMarket } from './morphoBlue';
6
6
  export { LlamaLendMarkets } from './llamaLend';
7
7
  export { LiquityV2Markets } from './liquityV2';
8
8
  export { EulerV2Markets } from './euler';
9
- export { FluidMarkets } from './fluid';
9
+ export { FluidMarkets, getFluidVersionsDataForNetwork, getFluidMarketInfoById } from './fluid';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FluidMarkets = exports.EulerV2Markets = exports.LiquityV2Markets = exports.LlamaLendMarkets = exports.findMorphoBlueMarket = exports.MorphoBlueMarkets = exports.CrvUsdMarkets = exports.SparkMarkets = exports.v3USDTCollAssets = exports.v3USDCeCollAssets = exports.v3USDCCollAssets = exports.v3USDbCCollAssets = exports.v3ETHCollAssets = exports.compoundV2CollateralAssets = exports.CompoundMarkets = exports.getAaveV3MarketByMarketAddress = exports.morphoAaveV3AssetEthMarket = exports.morphoAaveV2AssetDefaultMarket = exports.aaveV3AssetsDefaultMarket = exports.aaveV2AssetsDefaultMarket = exports.aaveV1AssetsDefaultMarket = exports.AaveMarkets = void 0;
3
+ exports.getFluidMarketInfoById = exports.getFluidVersionsDataForNetwork = exports.FluidMarkets = exports.EulerV2Markets = exports.LiquityV2Markets = exports.LlamaLendMarkets = exports.findMorphoBlueMarket = exports.MorphoBlueMarkets = exports.CrvUsdMarkets = exports.SparkMarkets = exports.v3USDTCollAssets = exports.v3USDCeCollAssets = exports.v3USDCCollAssets = exports.v3USDbCCollAssets = exports.v3ETHCollAssets = exports.compoundV2CollateralAssets = exports.CompoundMarkets = exports.getAaveV3MarketByMarketAddress = exports.morphoAaveV3AssetEthMarket = exports.morphoAaveV2AssetDefaultMarket = exports.aaveV3AssetsDefaultMarket = exports.aaveV2AssetsDefaultMarket = exports.aaveV1AssetsDefaultMarket = exports.AaveMarkets = void 0;
4
4
  var aave_1 = require("./aave");
5
5
  Object.defineProperty(exports, "AaveMarkets", { enumerable: true, get: function () { return aave_1.AaveMarkets; } });
6
6
  Object.defineProperty(exports, "aaveV1AssetsDefaultMarket", { enumerable: true, get: function () { return aave_1.aaveV1AssetsDefaultMarket; } });
@@ -32,3 +32,5 @@ var euler_1 = require("./euler");
32
32
  Object.defineProperty(exports, "EulerV2Markets", { enumerable: true, get: function () { return euler_1.EulerV2Markets; } });
33
33
  var fluid_1 = require("./fluid");
34
34
  Object.defineProperty(exports, "FluidMarkets", { enumerable: true, get: function () { return fluid_1.FluidMarkets; } });
35
+ Object.defineProperty(exports, "getFluidVersionsDataForNetwork", { enumerable: true, get: function () { return fluid_1.getFluidVersionsDataForNetwork; } });
36
+ Object.defineProperty(exports, "getFluidMarketInfoById", { enumerable: true, get: function () { return fluid_1.getFluidMarketInfoById; } });
@@ -22,7 +22,6 @@ const staking_1 = require("../staking");
22
22
  const utils_1 = require("../services/utils");
23
23
  const morphoBlueHelpers_1 = require("../helpers/morphoBlueHelpers");
24
24
  const priceService_1 = require("../services/priceService");
25
- const isMainnetNetwork = (network) => network === common_1.NetworkNumber.Eth;
26
25
  function getMorphoBlueMarketData(web3, network, selectedMarket, mainnetWeb3) {
27
26
  return __awaiter(this, void 0, void 0, function* () {
28
27
  const { loanToken, collateralToken, oracle, irm, lltv, oracleType, } = selectedMarket;
@@ -34,7 +33,7 @@ function getMorphoBlueMarketData(web3, network, selectedMarket, mainnetWeb3) {
34
33
  let marketInfo;
35
34
  let loanTokenPrice;
36
35
  const isTokenUSDA = loanTokenInfo.symbol === 'USDA';
37
- const isMainnet = isMainnetNetwork(network);
36
+ const isMainnet = (0, utils_1.isMainnetNetwork)(network);
38
37
  if (isMainnet) {
39
38
  const feedRegistryContract = (0, contracts_1.FeedRegistryContract)(mainnetWeb3, common_1.NetworkNumber.Eth);
40
39
  const [_loanTokenPrice, _marketInfo] = yield Promise.all([
@@ -1,3 +1,4 @@
1
1
  import Web3 from 'web3';
2
2
  import { NetworkNumber } from '../types/common';
3
3
  export declare const multicall: (calls: any[], web3: Web3, network?: NetworkNumber, blockNumber?: 'latest' | number) => Promise<any[]>;
4
+ export declare const chunkAndMulticall: (calls: any[], chunkSize: number, blockNumber: number | "latest" | undefined, web3: Web3, network?: NetworkNumber) => Promise<any[]>;
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.multicall = void 0;
12
+ exports.chunkAndMulticall = exports.multicall = void 0;
13
+ const lodash_1 = require("lodash");
13
14
  const contracts_1 = require("../contracts");
14
15
  const common_1 = require("../types/common");
15
16
  const multicall = (calls, web3, network = common_1.NetworkNumber.Eth, blockNumber = 'latest') => __awaiter(void 0, void 0, void 0, function* () {
@@ -29,3 +30,9 @@ const multicall = (calls, web3, network = common_1.NetworkNumber.Eth, blockNumbe
29
30
  return formattedResult;
30
31
  });
31
32
  exports.multicall = multicall;
33
+ const chunkAndMulticall = (calls, chunkSize, blockNumber = 'latest', web3, network = common_1.NetworkNumber.Eth) => __awaiter(void 0, void 0, void 0, function* () {
34
+ const chunkedCalls = (0, lodash_1.chunk)(calls, chunkSize);
35
+ const results = yield Promise.all(chunkedCalls.map((cnk) => (0, exports.multicall)(cnk, web3, network, blockNumber)));
36
+ return results.flat(1);
37
+ });
38
+ exports.chunkAndMulticall = chunkAndMulticall;
@@ -22,3 +22,4 @@ export declare const mapRange: (input: number | string, minInput: number | strin
22
22
  export declare const isEnabledOnBitmap: (bitmap: number, assetId: number) => bigint;
23
23
  export declare const MAXUINT: string;
24
24
  export declare const isMaxuint: (amount: string) => boolean;
25
+ export declare const isMainnetNetwork: (network: NetworkNumber) => boolean;
@@ -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.isMaxuint = exports.MAXUINT = exports.isEnabledOnBitmap = exports.mapRange = exports.bytesToString = exports.ethToWethByAddress = exports.wethToEthByAddress = exports.handleWbtcLegacy = exports.getEthAmountForDecimals = exports.getWeiAmountForDecimals = exports.compareAddresses = exports.isAddress = exports.ADDRESS_REGEX = exports.getAbiItem = exports.wstEthToStEth = exports.stEthToWstEth = exports.wethToEth = exports.ethToWeth = exports.addToObjectIf = exports.isLayer2Network = void 0;
6
+ exports.isMainnetNetwork = exports.isMaxuint = exports.MAXUINT = exports.isEnabledOnBitmap = exports.mapRange = exports.bytesToString = exports.ethToWethByAddress = exports.wethToEthByAddress = exports.handleWbtcLegacy = exports.getEthAmountForDecimals = exports.getWeiAmountForDecimals = exports.compareAddresses = exports.isAddress = exports.ADDRESS_REGEX = exports.getAbiItem = exports.wstEthToStEth = exports.stEthToWstEth = exports.wethToEth = exports.ethToWeth = exports.addToObjectIf = exports.isLayer2Network = void 0;
7
7
  const decimal_js_1 = __importDefault(require("decimal.js"));
8
8
  const tokens_1 = require("@defisaver/tokens");
9
9
  const common_1 = require("../types/common");
@@ -59,3 +59,5 @@ exports.isEnabledOnBitmap = isEnabledOnBitmap;
59
59
  exports.MAXUINT = '115792089237316195423570985008687907853269984665640564039457584007913129639935';
60
60
  const isMaxuint = (amount) => (0, exports.compareAddresses)(exports.MAXUINT, amount);
61
61
  exports.isMaxuint = isMaxuint;
62
+ const isMainnetNetwork = (network) => network === common_1.NetworkNumber.Eth;
63
+ exports.isMainnetNetwork = isMainnetNetwork;
@@ -10,6 +10,102 @@ export interface EventOptions {
10
10
  topics?: string[];
11
11
  }
12
12
  export declare namespace FluidView {
13
+ type FTokenDataStruct = [
14
+ string,
15
+ boolean,
16
+ string,
17
+ string,
18
+ number | string | BN,
19
+ string,
20
+ number | string | BN,
21
+ number | string | BN,
22
+ number | string | BN,
23
+ number | string | BN,
24
+ number | string | BN,
25
+ number | string | BN,
26
+ number | string | BN,
27
+ boolean,
28
+ number | string | BN,
29
+ number | string | BN
30
+ ] | {
31
+ tokenAddress: string;
32
+ isNativeUnderlying: boolean;
33
+ name: string;
34
+ symbol: string;
35
+ decimals: number | string | BN;
36
+ asset: string;
37
+ totalAssets: number | string | BN;
38
+ totalSupply: number | string | BN;
39
+ convertToShares: number | string | BN;
40
+ convertToAssets: number | string | BN;
41
+ rewardsRate: number | string | BN;
42
+ supplyRate: number | string | BN;
43
+ withdrawable: number | string | BN;
44
+ modeWithInterest: boolean;
45
+ expandPercent: number | string | BN;
46
+ expandDuration: number | string | BN;
47
+ };
48
+ type FTokenDataStructOutputArray = [
49
+ string,
50
+ boolean,
51
+ string,
52
+ string,
53
+ string,
54
+ string,
55
+ string,
56
+ string,
57
+ string,
58
+ string,
59
+ string,
60
+ string,
61
+ string,
62
+ boolean,
63
+ string,
64
+ string
65
+ ];
66
+ type FTokenDataStructOutputStruct = {
67
+ tokenAddress: string;
68
+ isNativeUnderlying: boolean;
69
+ name: string;
70
+ symbol: string;
71
+ decimals: string;
72
+ asset: string;
73
+ totalAssets: string;
74
+ totalSupply: string;
75
+ convertToShares: string;
76
+ convertToAssets: string;
77
+ rewardsRate: string;
78
+ supplyRate: string;
79
+ withdrawable: string;
80
+ modeWithInterest: boolean;
81
+ expandPercent: string;
82
+ expandDuration: string;
83
+ };
84
+ type FTokenDataStructOutput = FTokenDataStructOutputArray & FTokenDataStructOutputStruct;
85
+ type UserEarnPositionStruct = [
86
+ number | string | BN,
87
+ number | string | BN,
88
+ number | string | BN,
89
+ number | string | BN
90
+ ] | {
91
+ fTokenShares: number | string | BN;
92
+ underlyingAssets: number | string | BN;
93
+ underlyingBalance: number | string | BN;
94
+ allowance: number | string | BN;
95
+ };
96
+ type UserEarnPositionStructOutputArray = [
97
+ string,
98
+ string,
99
+ string,
100
+ string
101
+ ];
102
+ type UserEarnPositionStructOutputStruct = {
103
+ fTokenShares: string;
104
+ underlyingAssets: string;
105
+ underlyingBalance: string;
106
+ allowance: string;
107
+ };
108
+ type UserEarnPositionStructOutput = UserEarnPositionStructOutputArray & UserEarnPositionStructOutputStruct;
13
109
  type UserPositionStruct = [
14
110
  number | string | BN,
15
111
  string,
@@ -100,10 +196,6 @@ export declare namespace FluidView {
100
196
  number | string | BN,
101
197
  number | string | BN,
102
198
  number | string | BN,
103
- number | string | BN,
104
- number | string | BN,
105
- number | string | BN,
106
- number | string | BN,
107
199
  number | string | BN
108
200
  ] | {
109
201
  vault: string;
@@ -128,10 +220,6 @@ export declare namespace FluidView {
128
220
  oracle: string;
129
221
  oraclePriceOperate: number | string | BN;
130
222
  oraclePriceLiquidate: number | string | BN;
131
- priceOfSupplyToken0InUSD: number | string | BN;
132
- priceOfSupplyToken1InUSD: number | string | BN;
133
- priceOfBorrowToken0InUSD: number | string | BN;
134
- priceOfBorrowToken1InUSD: number | string | BN;
135
223
  vaultSupplyExchangePrice: number | string | BN;
136
224
  vaultBorrowExchangePrice: number | string | BN;
137
225
  supplyRateVault: number | string | BN;
@@ -203,10 +291,6 @@ export declare namespace FluidView {
203
291
  string,
204
292
  string,
205
293
  string,
206
- string,
207
- string,
208
- string,
209
- string,
210
294
  string
211
295
  ];
212
296
  type VaultDataStructOutputStruct = {
@@ -232,10 +316,6 @@ export declare namespace FluidView {
232
316
  oracle: string;
233
317
  oraclePriceOperate: string;
234
318
  oraclePriceLiquidate: string;
235
- priceOfSupplyToken0InUSD: string;
236
- priceOfSupplyToken1InUSD: string;
237
- priceOfBorrowToken0InUSD: string;
238
- priceOfBorrowToken1InUSD: string;
239
319
  vaultSupplyExchangePrice: string;
240
320
  vaultBorrowExchangePrice: string;
241
321
  supplyRateVault: string;
@@ -262,19 +342,33 @@ export declare namespace FluidView {
262
342
  minimumBorrowing: string;
263
343
  };
264
344
  type VaultDataStructOutput = VaultDataStructOutputArray & VaultDataStructOutputStruct;
345
+ type NftWithVaultStruct = [number | string | BN, number | string | BN, string] | {
346
+ nftId: number | string | BN;
347
+ vaultId: number | string | BN;
348
+ vaultAddr: string;
349
+ };
350
+ type NftWithVaultStructOutputArray = [string, string, string];
351
+ type NftWithVaultStructOutputStruct = {
352
+ nftId: string;
353
+ vaultId: string;
354
+ vaultAddr: string;
355
+ };
356
+ type NftWithVaultStructOutput = NftWithVaultStructOutputArray & NftWithVaultStructOutputStruct;
265
357
  }
266
358
  export interface FluidView extends BaseContract {
267
359
  constructor(jsonInterface: any[], address?: string, options?: ContractOptions): FluidView;
268
360
  clone(): FluidView;
269
361
  methods: {
270
- feedRegistry(): NonPayableTransactionObject<string>;
271
- getAaveTokenPriceInETH(_tokenAddr: string): NonPayableTransactionObject<string>;
272
- getAaveTokenPriceInUSD(_tokenAddr: string): NonPayableTransactionObject<string>;
273
- getAaveV3TokenPriceInETH(_tokenAddr: string): NonPayableTransactionObject<string>;
274
- getAaveV3TokenPriceInUSD(_tokenAddr: string): NonPayableTransactionObject<string>;
275
- getAddrForChainlinkOracle(_inputTokenAddr: string): NonPayableTransactionObject<string>;
276
- getChainlinkPriceInETH(_inputTokenAddr: string): NonPayableTransactionObject<string>;
277
- getChainlinkPriceInUSD(_inputTokenAddr: string, _useFallback: boolean): NonPayableTransactionObject<string>;
362
+ getAllFTokens(): NonPayableTransactionObject<string[]>;
363
+ getAllFTokensData(): NonPayableTransactionObject<FluidView.FTokenDataStructOutput[]>;
364
+ getAllUserEarnPositionsWithFTokens(_user: string): NonPayableTransactionObject<[
365
+ FluidView.UserEarnPositionStructOutput[],
366
+ FluidView.FTokenDataStructOutput[]
367
+ ] & {
368
+ userPositions: FluidView.UserEarnPositionStructOutput[];
369
+ fTokensData: FluidView.FTokenDataStructOutput[];
370
+ }>;
371
+ getFTokenData(_fToken: string): NonPayableTransactionObject<FluidView.FTokenDataStructOutput>;
278
372
  getPositionByNftId(_nftId: number | string | BN): NonPayableTransactionObject<[
279
373
  FluidView.UserPositionStructOutput,
280
374
  FluidView.VaultDataStructOutput
@@ -282,24 +376,17 @@ export interface FluidView extends BaseContract {
282
376
  position: FluidView.UserPositionStructOutput;
283
377
  vault: FluidView.VaultDataStructOutput;
284
378
  }>;
285
- getPriceInETH(_inputTokenAddr: string): NonPayableTransactionObject<string>;
286
- getPriceInUSD(_inputTokenAddr: string): NonPayableTransactionObject<string>;
287
379
  getRatio(_nftId: number | string | BN): NonPayableTransactionObject<string>;
288
- "getRoundInfo(address,uint80,address)"(_inputTokenAddr: string, _roundId: number | string | BN, aggregator: string): NonPayableTransactionObject<[
289
- string,
290
- string
291
- ] & {
292
- updateTimestamp: string;
293
- }>;
294
- "getRoundInfo(address,uint80)"(_inputTokenAddr: string, _roundId: number | string | BN): NonPayableTransactionObject<[
295
- string,
296
- string
380
+ getUserEarnPosition(_fToken: string, _user: string): NonPayableTransactionObject<FluidView.UserEarnPositionStructOutput>;
381
+ getUserEarnPositionWithFToken(_fToken: string, _user: string): NonPayableTransactionObject<[
382
+ FluidView.UserEarnPositionStructOutput,
383
+ FluidView.FTokenDataStructOutput
297
384
  ] & {
298
- updateTimestamp: string;
385
+ userPosition: FluidView.UserEarnPositionStructOutput;
386
+ fTokenData: FluidView.FTokenDataStructOutput;
299
387
  }>;
300
- getSparkTokenPriceInETH(_tokenAddr: string): NonPayableTransactionObject<string>;
301
- getSparkTokenPriceInUSD(_tokenAddr: string): NonPayableTransactionObject<string>;
302
388
  getUserNftIds(_user: string): NonPayableTransactionObject<string[]>;
389
+ getUserNftIdsWithVaultIds(_user: string): NonPayableTransactionObject<FluidView.NftWithVaultStructOutput[]>;
303
390
  getUserPositions(_user: string): NonPayableTransactionObject<[
304
391
  FluidView.UserPositionStructOutput[],
305
392
  FluidView.VaultDataStructOutput[]
@@ -307,10 +394,7 @@ export interface FluidView extends BaseContract {
307
394
  positions: FluidView.UserPositionStructOutput[];
308
395
  vaults: FluidView.VaultDataStructOutput[];
309
396
  }>;
310
- getVaultAddresses(_ids: number | string | BN[], _fetchAll: boolean): NonPayableTransactionObject<string[]>;
311
397
  getVaultData(_vault: string): NonPayableTransactionObject<FluidView.VaultDataStructOutput>;
312
- getWBtcPrice(_btcPrice: number | string | BN): NonPayableTransactionObject<string>;
313
- getWStEthPrice(_stEthPrice: number | string | BN): NonPayableTransactionObject<string>;
314
398
  };
315
399
  events: {
316
400
  allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
@@ -11,6 +11,11 @@ export interface FluidMarketInfo {
11
11
  hasSmartDebt: boolean;
12
12
  collateralAsset: string;
13
13
  debtAsset: string;
14
+ ethBased?: boolean;
15
+ btcBased?: boolean;
16
+ wstETHBased?: boolean;
17
+ stableBased?: boolean;
18
+ type: FluidVaultType;
14
19
  }
15
20
  export declare enum FluidMainnetVersion {
16
21
  ETH_USDC_1 = "ETH_USDC_1",
@@ -68,7 +73,10 @@ export declare enum FluidMainnetVersion {
68
73
  USDC_ETH_USDC_ETH_77 = "USDC_ETH_USDC_ETH_77",
69
74
  RSETH_ETH_WSTETH_78 = "RSETH_ETH_WSTETH_78",
70
75
  RSETH_WSTETH_79 = "RSETH_WSTETH_79",
71
- WEETHS_ETH_WSTETH_80 = "WEETHS_ETH_WSTETH_80"
76
+ WEETHS_ETH_WSTETH_80 = "WEETHS_ETH_WSTETH_80",
77
+ SUSDE_USDT_USDT_92 = "SUSDE_USDT_USDT_92",
78
+ USDE_USDT_USDT_93 = "USDE_USDT_USDT_93",
79
+ LBTC_CBBTC_WBTC_97 = "LBTC_CBBTC_WBTC_97"
72
80
  }
73
81
  export declare enum FluidArbitrumVersion {
74
82
  ETH_USDC_1_ARB = "ETH_USDC_1_ARB",
@@ -158,17 +166,22 @@ export interface InnerFluidMarketData {
158
166
  isSmartDebt: boolean;
159
167
  marketAddress: string;
160
168
  vaultType: FluidVaultType;
169
+ vaultValue?: FluidVersions;
161
170
  oracle: string;
162
171
  liquidationPenaltyPercent: string;
163
172
  collFactor: string;
164
173
  liquidationRatio: string;
174
+ liqFactor: string;
175
+ minRatio: string;
165
176
  collAsset0: string;
166
177
  collAsset1?: string;
167
178
  debtAsset0: string;
168
179
  debtAsset1?: string;
169
180
  totalPositions: string;
170
181
  totalSupplyVault: string;
182
+ totalSupplyVaultUsd: string;
171
183
  totalBorrowVault: string;
184
+ totalBorrowVaultUsd: string;
172
185
  withdrawalLimit: string;
173
186
  withdrawableUntilLimit: string;
174
187
  withdrawable: string;
@@ -179,6 +192,8 @@ export interface InnerFluidMarketData {
179
192
  maxBorrowLimit: string;
180
193
  baseBorrowLimit: string;
181
194
  minimumBorrowing: string;
195
+ supplyRate: string;
196
+ borrowRate: string;
182
197
  }
183
198
  export interface FluidMarketData {
184
199
  assetsData: FluidAssetsData;
@@ -60,6 +60,9 @@ var FluidMainnetVersion;
60
60
  FluidMainnetVersion["RSETH_ETH_WSTETH_78"] = "RSETH_ETH_WSTETH_78";
61
61
  FluidMainnetVersion["RSETH_WSTETH_79"] = "RSETH_WSTETH_79";
62
62
  FluidMainnetVersion["WEETHS_ETH_WSTETH_80"] = "WEETHS_ETH_WSTETH_80";
63
+ FluidMainnetVersion["SUSDE_USDT_USDT_92"] = "SUSDE_USDT_USDT_92";
64
+ FluidMainnetVersion["USDE_USDT_USDT_93"] = "USDE_USDT_USDT_93";
65
+ FluidMainnetVersion["LBTC_CBBTC_WBTC_97"] = "LBTC_CBBTC_WBTC_97";
63
66
  })(FluidMainnetVersion || (exports.FluidMainnetVersion = FluidMainnetVersion = {}));
64
67
  var FluidArbitrumVersion;
65
68
  (function (FluidArbitrumVersion) {
@@ -7608,6 +7608,11 @@ export namespace FluidView {
7608
7608
  }[];
7609
7609
  name: string;
7610
7610
  outputs: {
7611
+ components: {
7612
+ internalType: string;
7613
+ name: string;
7614
+ type: string;
7615
+ }[];
7611
7616
  internalType: string;
7612
7617
  name: string;
7613
7618
  type: string;
@@ -7622,11 +7627,6 @@ export namespace FluidView {
7622
7627
  }[];
7623
7628
  name: string;
7624
7629
  outputs: {
7625
- components: {
7626
- internalType: string;
7627
- name: string;
7628
- type: string;
7629
- }[];
7630
7630
  internalType: string;
7631
7631
  name: string;
7632
7632
  type: string;
@@ -7639,6 +7639,12 @@ export namespace FluidView {
7639
7639
  "1": {
7640
7640
  address: string;
7641
7641
  };
7642
+ "8453": {
7643
+ address: string;
7644
+ };
7645
+ "42161": {
7646
+ address: string;
7647
+ };
7642
7648
  };
7643
7649
  export { networks_85 as networks };
7644
7650
  }
@@ -1106,9 +1106,11 @@ module.exports = {
1106
1106
  }
1107
1107
  },
1108
1108
  "FluidView": {
1109
- "abi": [{ "inputs": [], "name": "feedRegistry", "outputs": [{ "internalType": "contract IFeedRegistry", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveTokenPriceInETH", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveTokenPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveV3TokenPriceInETH", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveV3TokenPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getAddrForChainlinkOracle", "outputs": [{ "internalType": "address", "name": "tokenAddrForChainlinkUsage", "type": "address" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getChainlinkPriceInETH", "outputs": [{ "internalType": "int256", "name": "chainlinkPriceInETH", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }, { "internalType": "bool", "name": "_useFallback", "type": "bool" }], "name": "getChainlinkPriceInUSD", "outputs": [{ "internalType": "int256", "name": "chainlinkPriceInUSD", "type": "int256" }], "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": "priceOfSupplyToken0InUSD", "type": "uint256" }, { "internalType": "uint256", "name": "priceOfSupplyToken1InUSD", "type": "uint256" }, { "internalType": "uint256", "name": "priceOfBorrowToken0InUSD", "type": "uint256" }, { "internalType": "uint256", "name": "priceOfBorrowToken1InUSD", "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": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getPriceInETH", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "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": "_inputTokenAddr", "type": "address" }, { "internalType": "uint80", "name": "_roundId", "type": "uint80" }, { "internalType": "contract IAggregatorV3", "name": "aggregator", "type": "address" }], "name": "getRoundInfo", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "updateTimestamp", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }, { "internalType": "uint80", "name": "_roundId", "type": "uint80" }], "name": "getRoundInfo", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "updateTimestamp", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getSparkTokenPriceInETH", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getSparkTokenPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "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": "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": "priceOfSupplyToken0InUSD", "type": "uint256" }, { "internalType": "uint256", "name": "priceOfSupplyToken1InUSD", "type": "uint256" }, { "internalType": "uint256", "name": "priceOfBorrowToken0InUSD", "type": "uint256" }, { "internalType": "uint256", "name": "priceOfBorrowToken1InUSD", "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": "uint256[]", "name": "_ids", "type": "uint256[]" }, { "internalType": "bool", "name": "_fetchAll", "type": "bool" }], "name": "getVaultAddresses", "outputs": [{ "internalType": "address[]", "name": "", "type": "address[]" }], "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": "priceOfSupplyToken0InUSD", "type": "uint256" }, { "internalType": "uint256", "name": "priceOfSupplyToken1InUSD", "type": "uint256" }, { "internalType": "uint256", "name": "priceOfBorrowToken0InUSD", "type": "uint256" }, { "internalType": "uint256", "name": "priceOfBorrowToken1InUSD", "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" }, { "inputs": [{ "internalType": "int256", "name": "_btcPrice", "type": "int256" }], "name": "getWBtcPrice", "outputs": [{ "internalType": "int256", "name": "wBtcPrice", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "int256", "name": "_stEthPrice", "type": "int256" }], "name": "getWStEthPrice", "outputs": [{ "internalType": "int256", "name": "wStEthPrice", "type": "int256" }], "stateMutability": "view", "type": "function" }],
1109
+ "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" }],
1110
1110
  "networks": {
1111
- "1": { "address": "0xBAc6dc3edB72Bc705Ab4e31F2a2151Fe06550D9B" }
1111
+ "1": { "address": "0xf8e3bbf7c95057be1fD5E741a9ADb73E956dC724" },
1112
+ "8453": { "address": "0x5835CaDbA8843CD6d6d55782908351E9c74221aD" },
1113
+ "42161": { "address": "0x2d51BB6Ac5c1eC8DD6432e1FF980fC864B626e01" }
1112
1114
  }
1113
1115
  }
1114
1116
  };
@@ -36,3 +36,4 @@ export declare const getFluidPositionWithMarket: (web3: Web3, network: NetworkNu
36
36
  userData: FluidVaultData;
37
37
  marketData: FluidMarketData;
38
38
  }>;
39
+ export declare const getAllFluidMarketDataChunked: (network: NetworkNumber, web3: Web3) => Promise<FluidMarketData[]>;