@gearbox-protocol/sdk 18.4.0 → 18.4.1-aave.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.
- package/dist/cjs/model/index.js +1 -4
- package/dist/cjs/offchain/GearboxAPI.js +0 -7
- package/dist/cjs/offchain/index.js +0 -3
- package/dist/cjs/onchain/accounts/bots/AccountBotsService.js +29 -0
- package/dist/cjs/onchain/accounts/bots/PeripheryCompressorV310Contract.js +2 -1
- package/dist/cjs/onchain/accounts/intents/index.js +1 -0
- package/dist/cjs/onchain/accounts/intents/operations.js +21 -0
- package/dist/cjs/onchain/accounts/intents/plan.js +33 -0
- package/dist/cjs/onchain/accounts/intents/realize.js +44 -0
- package/dist/cjs/onchain/accounts/intents/testing/market.js +1 -0
- package/dist/cjs/onchain/accounts/intents/testing/sdk-mock.js +2 -1
- package/dist/cjs/onchain/accounts/intents/utils/ledger.js +8 -0
- package/dist/cjs/onchain/chain/chains.js +4 -0
- package/dist/cjs/onchain/index.js +16 -0
- package/dist/cjs/onchain/market/ZapperRegister.js +1 -1
- package/dist/cjs/onchain/market/adapters/abi/aave/iAaveHorizonBridge.js +94 -0
- package/dist/cjs/onchain/market/adapters/abi/aave/iAaveOracle.js +20 -0
- package/dist/cjs/onchain/market/adapters/abi/aave/iAaveV3Pool.js +278 -0
- package/dist/cjs/onchain/market/adapters/abi/aave/iPoolAddressesProvider.js +11 -0
- package/dist/cjs/onchain/market/adapters/abi/aave/index.js +9 -0
- package/dist/cjs/onchain/market/adapters/abi/actionAbi.js +1 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/iAaveHorizonBridgeAdapter.js +224 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/iAaveV3PoolAdapter.js +177 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/index.js +4 -0
- package/dist/cjs/onchain/market/adapters/abi/conctructorAbi.js +2 -0
- package/dist/cjs/onchain/market/adapters/abi/index.js +13 -0
- package/dist/cjs/onchain/market/adapters/contracts/AaveHorizonBridgeAdapterContract.js +171 -0
- package/dist/cjs/onchain/market/adapters/contracts/AaveV3PoolAdapterContract.js +199 -0
- package/dist/cjs/onchain/market/adapters/contracts/AbstractAdapter.js +8 -0
- package/dist/cjs/onchain/market/adapters/contracts/index.js +4 -0
- package/dist/cjs/onchain/market/adapters/createAdapter.js +4 -0
- package/dist/cjs/onchain/market/adapters/index.js +16 -0
- package/dist/cjs/onchain/market/adapters/types.js +2 -0
- package/dist/cjs/onchain/market/index.js +16 -0
- package/dist/cjs/onchain/positions/projectAavePosition.js +175 -0
- package/dist/cjs/onchain/preview/preview/loadAdapterReplayState.js +17 -0
- package/dist/cjs/onchain/preview/preview/previewOperation.js +2 -0
- package/dist/cjs/sdk/GearboxSDK.js +0 -9
- package/dist/cjs/sdk/prepare/PrepareApi.js +56 -0
- package/dist/cjs/sdk/preview/PreviewNamespace.js +42 -0
- package/dist/esm/model/index.js +2 -3
- package/dist/esm/offchain/GearboxAPI.js +0 -7
- package/dist/esm/offchain/index.js +1 -3
- package/dist/esm/onchain/accounts/bots/AccountBotsService.js +29 -0
- package/dist/esm/onchain/accounts/bots/PeripheryCompressorV310Contract.js +1 -1
- package/dist/esm/onchain/accounts/intents/index.js +2 -1
- package/dist/esm/onchain/accounts/intents/operations.js +20 -1
- package/dist/esm/onchain/accounts/intents/plan.js +33 -1
- package/dist/esm/onchain/accounts/intents/realize.js +46 -2
- package/dist/esm/onchain/accounts/intents/testing/market.js +1 -0
- package/dist/esm/onchain/accounts/intents/testing/sdk-mock.js +2 -1
- package/dist/esm/onchain/accounts/intents/utils/ledger.js +8 -0
- package/dist/esm/onchain/chain/chains.js +4 -0
- package/dist/esm/onchain/index.js +9 -1
- package/dist/esm/onchain/market/ZapperRegister.js +1 -1
- package/dist/esm/onchain/market/adapters/abi/aave/iAaveHorizonBridge.js +93 -0
- package/dist/esm/onchain/market/adapters/abi/aave/iAaveOracle.js +19 -0
- package/dist/esm/onchain/market/adapters/abi/aave/iAaveV3Pool.js +277 -0
- package/dist/esm/onchain/market/adapters/abi/aave/iPoolAddressesProvider.js +10 -0
- package/dist/esm/onchain/market/adapters/abi/aave/index.js +5 -0
- package/dist/esm/onchain/market/adapters/abi/actionAbi.js +1 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/iAaveHorizonBridgeAdapter.js +223 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/iAaveV3PoolAdapter.js +176 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/index.js +3 -1
- package/dist/esm/onchain/market/adapters/abi/conctructorAbi.js +2 -0
- package/dist/esm/onchain/market/adapters/abi/index.js +8 -1
- package/dist/esm/onchain/market/adapters/contracts/AaveHorizonBridgeAdapterContract.js +170 -0
- package/dist/esm/onchain/market/adapters/contracts/AaveV3PoolAdapterContract.js +198 -0
- package/dist/esm/onchain/market/adapters/contracts/AbstractAdapter.js +8 -0
- package/dist/esm/onchain/market/adapters/contracts/index.js +3 -1
- package/dist/esm/onchain/market/adapters/createAdapter.js +4 -0
- package/dist/esm/onchain/market/adapters/index.js +9 -1
- package/dist/esm/onchain/market/adapters/types.js +2 -0
- package/dist/esm/onchain/market/index.js +9 -1
- package/dist/esm/onchain/positions/projectAavePosition.js +174 -0
- package/dist/esm/onchain/preview/preview/loadAdapterReplayState.js +16 -0
- package/dist/esm/onchain/preview/preview/previewOperation.js +2 -0
- package/dist/esm/sdk/GearboxSDK.js +0 -9
- package/dist/esm/sdk/prepare/PrepareApi.js +57 -1
- package/dist/esm/sdk/preview/PreviewNamespace.js +42 -0
- package/dist/types/model/aave.d.ts +34 -0
- package/dist/types/model/analytics.d.ts +2 -2
- package/dist/types/model/index.d.ts +6 -7
- package/dist/types/model/opportunities.d.ts +1 -1
- package/dist/types/model/positions.d.ts +1 -1
- package/dist/types/model/previews.d.ts +15 -0
- package/dist/types/offchain/AbstractOffchainNamespace.d.ts +1 -1
- package/dist/types/offchain/GearboxAPI.d.ts +0 -6
- package/dist/types/offchain/analytics/OffchainAnalytics.d.ts +1 -1
- package/dist/types/offchain/analytics/types.d.ts +1 -1
- package/dist/types/offchain/index.d.ts +1 -3
- package/dist/types/offchain/opportunities/OffchainOpportunities.d.ts +1 -1
- package/dist/types/offchain/opportunities/types.d.ts +1 -1
- package/dist/types/offchain/positions/OffchainPositions.d.ts +1 -1
- package/dist/types/offchain/positions/types.d.ts +1 -1
- package/dist/types/onchain/accounts/bots/AccountBotsService.d.ts +11 -1
- package/dist/types/onchain/accounts/bots/index.d.ts +2 -2
- package/dist/types/onchain/accounts/bots/types.d.ts +7 -1
- package/dist/types/onchain/accounts/index.d.ts +2 -2
- package/dist/types/onchain/accounts/intents/operations.d.ts +43 -1
- package/dist/types/onchain/accounts/intents/plan.d.ts +26 -1
- package/dist/types/onchain/accounts/intents/testing/market.d.ts +4 -0
- package/dist/types/onchain/accounts/intents/testing/sdk-mock.d.ts +4 -0
- package/dist/types/onchain/accounts/intents/types.d.ts +20 -1
- package/dist/types/onchain/index.d.ts +10 -2
- package/dist/types/onchain/market/adapters/abi/aave/iAaveHorizonBridge.d.ts +83 -0
- package/dist/types/onchain/market/adapters/abi/aave/iAaveOracle.d.ts +22 -0
- package/dist/types/onchain/market/adapters/abi/aave/iAaveV3Pool.d.ts +229 -0
- package/dist/types/onchain/market/adapters/abi/aave/iPoolAddressesProvider.d.ts +11 -0
- package/dist/types/onchain/market/adapters/abi/aave/index.d.ts +5 -0
- package/dist/types/onchain/market/adapters/abi/adapters/iAaveHorizonBridgeAdapter.d.ts +207 -0
- package/dist/types/onchain/market/adapters/abi/adapters/iAaveV3PoolAdapter.d.ts +172 -0
- package/dist/types/onchain/market/adapters/abi/adapters/index.d.ts +3 -1
- package/dist/types/onchain/market/adapters/abi/index.d.ts +8 -1
- package/dist/types/onchain/market/adapters/contracts/AaveHorizonBridgeAdapterContract.d.ts +341 -0
- package/dist/types/onchain/market/adapters/contracts/AaveV3PoolAdapterContract.d.ts +450 -0
- package/dist/types/onchain/market/adapters/contracts/AbstractAdapter.d.ts +8 -0
- package/dist/types/onchain/market/adapters/contracts/index.d.ts +3 -1
- package/dist/types/onchain/market/adapters/index.d.ts +9 -1
- package/dist/types/onchain/market/adapters/types.d.ts +3 -1
- package/dist/types/onchain/market/index.d.ts +9 -1
- package/dist/types/onchain/positions/projectAavePosition.d.ts +45 -0
- package/dist/types/onchain/preview/preview/loadAdapterReplayState.d.ts +13 -0
- package/dist/types/sdk/GearboxSDK.d.ts +1 -8
- package/dist/types/sdk/analytics/AnalyticsNamespace.d.ts +1 -1
- package/dist/types/sdk/analytics/types.d.ts +1 -1
- package/dist/types/sdk/index.d.ts +3 -3
- package/dist/types/sdk/opportunities/OpportunitiesNamespace.d.ts +1 -1
- package/dist/types/sdk/opportunities/types.d.ts +1 -1
- package/dist/types/sdk/positions/PositionsNamespace.d.ts +1 -1
- package/dist/types/sdk/positions/types.d.ts +1 -1
- package/dist/types/sdk/prepare/PrepareApi.d.ts +11 -3
- package/dist/types/sdk/prepare/index.d.ts +2 -2
- package/dist/types/sdk/prepare/types.d.ts +83 -1
- package/dist/types/sdk/preview/PreviewNamespace.d.ts +5 -1
- package/dist/types/sdk/preview/types.d.ts +12 -1
- package/dist/types/sdk/types.d.ts +0 -20
- package/package.json +1 -1
- package/dist/cjs/model/notices.schema.js +0 -25
- package/dist/cjs/offchain/notices/OffchainNotices.js +0 -27
- package/dist/cjs/offchain/notices/index.js +0 -3
- package/dist/esm/model/notices.schema.js +0 -23
- package/dist/esm/offchain/notices/OffchainNotices.js +0 -26
- package/dist/esm/offchain/notices/index.js +0 -1
- package/dist/types/model/notices.d.ts +0 -28
- package/dist/types/model/notices.schema.d.ts +0 -22
- package/dist/types/offchain/notices/OffchainNotices.d.ts +0 -18
- package/dist/types/offchain/notices/index.d.ts +0 -2
- /package/dist/cjs/model/{notices.js → aave.js} +0 -0
- /package/dist/esm/model/{notices.js → aave.js} +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { getDirectTransferToken } from "../../chain/chains.js";
|
|
2
2
|
import { PERCENTAGE_FACTOR_1KK } from "../../constants/math.js";
|
|
3
|
+
import { AaveHorizonBridgeAdapterContract } from "../../market/adapters/contracts/AaveHorizonBridgeAdapterContract.js";
|
|
4
|
+
import { AaveV3PoolAdapterContract } from "../../market/adapters/contracts/AaveV3PoolAdapterContract.js";
|
|
3
5
|
import { insufficientBalance } from "../../../model/errors/operation-errors.js";
|
|
4
|
-
import { multipleDelayedWithdrawals, noDelayedRoute, withdrawalInProgress } from "../../../model/errors/prepare-errors.js";
|
|
6
|
+
import { multipleDelayedWithdrawals, noDelayedRoute, unsupportedCollateralToken, withdrawalInProgress } from "../../../model/errors/prepare-errors.js";
|
|
5
7
|
import "../../../model/index.js";
|
|
6
8
|
import { toToken, toTokenAmount } from "../../validation/helpers/token.js";
|
|
7
9
|
import { IntentPreviewError } from "../../validation/raise.js";
|
|
@@ -12,7 +14,7 @@ import { OperationLedger } from "./utils/ledger.js";
|
|
|
12
14
|
import { collectPriceImpact } from "./utils/price-impact.js";
|
|
13
15
|
import { clearedQuotas, getQuotasForUpdate, quotasAfterUpdate, withDirectTransferQuota } from "./utils/quotas-for-update.js";
|
|
14
16
|
import { createRouterPaths } from "./utils/router-path.js";
|
|
15
|
-
import { buildAddCollateralOperation, buildClaimDelayedWithdrawalOperation, buildCloseSwapOperation, buildDecreaseDebtOperation, buildIncreaseDebtOperation, buildQuotaUpdateOperation, buildStartDelayedWithdrawalOperation, buildSwapOperation, buildUnwrapRwaCollateralOperation, buildWithdrawCollateralOperation, buildWrapRwaCollateralOperation, instantOutput } from "./operations.js";
|
|
17
|
+
import { buildAaveOpenPositionOperation, buildAaveSupplyOperation, buildAddCollateralOperation, buildClaimDelayedWithdrawalOperation, buildCloseSwapOperation, buildDecreaseDebtOperation, buildIncreaseDebtOperation, buildQuotaUpdateOperation, buildStartDelayedWithdrawalOperation, buildSwapOperation, buildUnwrapRwaCollateralOperation, buildWithdrawCollateralOperation, buildWrapRwaCollateralOperation, instantOutput } from "./operations.js";
|
|
16
18
|
import { resolveQuotaUpdate } from "./resolveQuotaUpdate.js";
|
|
17
19
|
import { withdrawLimits } from "./withdraw-limits.js";
|
|
18
20
|
//#region src/onchain/accounts/intents/realize.ts
|
|
@@ -353,6 +355,33 @@ async function realize(steps, props) {
|
|
|
353
355
|
}
|
|
354
356
|
break;
|
|
355
357
|
}
|
|
358
|
+
case "aaveSupply": {
|
|
359
|
+
assertHolds(step.token, step.amount, "aaveSupply");
|
|
360
|
+
const adapter = aavePoolAdapter(sdk, suite, step.token);
|
|
361
|
+
push(buildAaveSupplyOperation({
|
|
362
|
+
adapter,
|
|
363
|
+
token: step.token,
|
|
364
|
+
aToken: await adapter.aToken(step.token),
|
|
365
|
+
amount: step.amount
|
|
366
|
+
}));
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
case "aaveOpenPosition": {
|
|
370
|
+
const aToken = await aavePoolAdapter(sdk, suite, step.token).aToken(step.token);
|
|
371
|
+
const aTokenAmount = ledger.balanceOf(aToken);
|
|
372
|
+
assertHolds(aToken, aTokenAmount, "aaveOpenPosition");
|
|
373
|
+
push(buildAaveOpenPositionOperation({
|
|
374
|
+
adapter: aaveBridgeAdapter(sdk, suite, step.token, {
|
|
375
|
+
aToken,
|
|
376
|
+
debtToken: underlying
|
|
377
|
+
}),
|
|
378
|
+
aToken,
|
|
379
|
+
aTokenAmount,
|
|
380
|
+
debtToken: underlying,
|
|
381
|
+
borrowAmount: step.borrow
|
|
382
|
+
}));
|
|
383
|
+
break;
|
|
384
|
+
}
|
|
356
385
|
}
|
|
357
386
|
const floor = ledger.snapshot();
|
|
358
387
|
const { assets, debt } = floor;
|
|
@@ -475,6 +504,21 @@ async function delayedConfig(sdk, creditAccount, token) {
|
|
|
475
504
|
if (assets.length > 1) throw new IntentPreviewError(multipleDelayedWithdrawals(toToken(sdk, token), assets.length), `request: ${token} has ${assets.length} delayed withdrawal configs`);
|
|
476
505
|
return assets[0];
|
|
477
506
|
}
|
|
507
|
+
/** The credit manager's Aave pool adapter that lists `token`. */
|
|
508
|
+
function aavePoolAdapter(sdk, suite, token) {
|
|
509
|
+
const adapter = suite.creditManager.adapters.values().find((a) => a instanceof AaveV3PoolAdapterContract && a.isAssetAllowed(token));
|
|
510
|
+
if (!adapter) throw new IntentPreviewError(unsupportedCollateralToken(toToken(sdk, token)), `aaveSupply: no Aave pool adapter lists ${token}`);
|
|
511
|
+
return adapter;
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* The credit manager's Horizon bridge adapter that takes `aToken` and lends
|
|
515
|
+
* `debtToken`. Refused on `token`, the collateral the aToken stands for.
|
|
516
|
+
*/
|
|
517
|
+
function aaveBridgeAdapter(sdk, suite, token, pair) {
|
|
518
|
+
const adapter = suite.creditManager.adapters.values().find((a) => a instanceof AaveHorizonBridgeAdapterContract && a.isATokenAllowed(pair.aToken) && a.isDebtTokenAllowed(pair.debtToken));
|
|
519
|
+
if (!adapter) throw new IntentPreviewError(unsupportedCollateralToken(toToken(sdk, token)), `aaveOpenPosition: no Horizon bridge adapter takes ${pair.aToken} against ${pair.debtToken}`);
|
|
520
|
+
return adapter;
|
|
521
|
+
}
|
|
478
522
|
const callsOf = (operations) => operations.flatMap((op) => op.calls);
|
|
479
523
|
const min = (a, b) => a < b ? a : b;
|
|
480
524
|
/** Balance the router's close path refuses to route, and leaves in place. */
|
|
@@ -114,6 +114,7 @@ function buildMarketSdk(extras) {
|
|
|
114
114
|
debtLimitAvailable: extras?.debtLimitAvailable,
|
|
115
115
|
maxDebtPerBlockMultiplier: extras?.maxDebtPerBlockMultiplier,
|
|
116
116
|
forbiddenTokens: extras?.forbiddenTokens,
|
|
117
|
+
adapters: extras?.adapters,
|
|
117
118
|
strategyTargetCollateral: POS
|
|
118
119
|
});
|
|
119
120
|
}
|
|
@@ -211,7 +211,8 @@ function buildMockSdk(args) {
|
|
|
211
211
|
collateralTokens,
|
|
212
212
|
feeInterest: args.feeInterest ?? 0,
|
|
213
213
|
maxEnabledTokens: args.maxEnabledTokens ?? 4,
|
|
214
|
-
maxLeverage: (collateral, targetHF) => calcMaxLeverage(liquidationThresholds.get(collateral) ?? 0, targetHF)
|
|
214
|
+
maxLeverage: (collateral, targetHF) => calcMaxLeverage(liquidationThresholds.get(collateral) ?? 0, targetHF),
|
|
215
|
+
adapters: { values: () => args.adapters ?? [] }
|
|
215
216
|
},
|
|
216
217
|
creditFacade: {
|
|
217
218
|
address: args.creditFacade,
|
|
@@ -79,6 +79,14 @@ var OperationLedger = class {
|
|
|
79
79
|
case "claimDelayedWithdrawal":
|
|
80
80
|
this.#add(op.withdrawalPhantomToken, -op.withdrawalTokenSpent);
|
|
81
81
|
for (const out of op.outputs) this.#add(out.token, out.amount);
|
|
82
|
+
break;
|
|
83
|
+
case "aaveSupply":
|
|
84
|
+
this.#add(op.token, -op.amount);
|
|
85
|
+
this.#add(op.aToken, op.amount);
|
|
86
|
+
break;
|
|
87
|
+
case "aaveOpenPosition":
|
|
88
|
+
this.#add(op.aToken, -op.aTokenAmount);
|
|
89
|
+
this.#add(op.debtToken, op.borrowAmount);
|
|
82
90
|
}
|
|
83
91
|
return this;
|
|
84
92
|
}
|
|
@@ -354,6 +354,10 @@ const chains = {
|
|
|
354
354
|
}),
|
|
355
355
|
Lisk: defineChain({
|
|
356
356
|
...lisk,
|
|
357
|
+
rpcUrls: {
|
|
358
|
+
...lisk.rpcUrls,
|
|
359
|
+
tenderly: { http: ["https://lisk.gateway.tenderly.co"] }
|
|
360
|
+
},
|
|
357
361
|
network: "Lisk",
|
|
358
362
|
defaultMarketConfigurators: AddressMap.fromRecord({ "0x25778dbf0e56b7feb8358c4aa2f6f9e19a1c145a": "Re7" }),
|
|
359
363
|
rwaFactories: [],
|
|
@@ -45,9 +45,15 @@ import { VotingContractStatus } from "./base/types.js";
|
|
|
45
45
|
import "./base/index.js";
|
|
46
46
|
import { PeripheryCompressorV310Contract } from "./accounts/bots/PeripheryCompressorV310Contract.js";
|
|
47
47
|
import { AccountBotsService } from "./accounts/bots/AccountBotsService.js";
|
|
48
|
+
import { iAaveHorizonBridgeAbi } from "./market/adapters/abi/aave/iAaveHorizonBridge.js";
|
|
49
|
+
import { iAaveOracleAbi } from "./market/adapters/abi/aave/iAaveOracle.js";
|
|
50
|
+
import { iAaveV3PoolAbi } from "./market/adapters/abi/aave/iAaveV3Pool.js";
|
|
51
|
+
import { iPoolAddressesProviderAbi } from "./market/adapters/abi/aave/iPoolAddressesProvider.js";
|
|
48
52
|
import { AdapterType } from "./market/adapters/types.js";
|
|
49
53
|
import { adapterActionAbi, adapterActionSelectors, adapterActionSignatures } from "./market/adapters/abi/actionAbi.js";
|
|
50
54
|
import { erc4626ReferralAdapterAbi } from "./market/adapters/abi/adapters/erc4626ReferralAdapter.js";
|
|
55
|
+
import { iAaveHorizonBridgeAdapterAbi } from "./market/adapters/abi/adapters/iAaveHorizonBridgeAdapter.js";
|
|
56
|
+
import { iAaveV3PoolAdapterAbi } from "./market/adapters/abi/adapters/iAaveV3PoolAdapter.js";
|
|
51
57
|
import { iBalancerV3RouterAdapterAbi } from "./market/adapters/abi/adapters/iBalancerV3RouterAdapter.js";
|
|
52
58
|
import { iBalancerV3WrapperAdapterAbi } from "./market/adapters/abi/adapters/iBalancerV3WrapperAdapter.js";
|
|
53
59
|
import { iCamelotV3AdapterAbi } from "./market/adapters/abi/adapters/iCamelotV3Adapter.js";
|
|
@@ -97,6 +103,8 @@ import { iTreehouseRouterAbi } from "./market/adapters/abi/treehouse/iTreehouseR
|
|
|
97
103
|
import { getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, hasAdapterDeployParamsAbi, parseAdapterAction, parseAdapterDeployParams } from "./market/adapters/abi/utils.js";
|
|
98
104
|
import { allTransfersAsTokenAmounts, classifyCurveOperation, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, fnSigToName, parsePosNegAmount, rewardsFromTransfers, swapFromTransfers, toNetTransfers } from "./market/adapters/transferHelpers.js";
|
|
99
105
|
import { AbstractAdapterContract } from "./market/adapters/contracts/AbstractAdapter.js";
|
|
106
|
+
import { AaveHorizonBridgeAdapterContract } from "./market/adapters/contracts/AaveHorizonBridgeAdapterContract.js";
|
|
107
|
+
import { AaveV3PoolAdapterContract } from "./market/adapters/contracts/AaveV3PoolAdapterContract.js";
|
|
100
108
|
import { AccountMigratorAdapterContract } from "./market/adapters/contracts/AccountMigratorAdapterContract.js";
|
|
101
109
|
import { BalancerV3PoolStatus, BalancerV3RouterAdapterContract } from "./market/adapters/contracts/BalancerV3RouterAdapterContract.js";
|
|
102
110
|
import { BalancerV3WrapperAdapterContract } from "./market/adapters/contracts/BalancerV3WrapperAdapterContract.js";
|
|
@@ -320,4 +328,4 @@ import { replayMulticall } from "./preview/preview/replayMulticall.js";
|
|
|
320
328
|
import { previewOperation } from "./preview/preview/previewOperation.js";
|
|
321
329
|
import "./preview/index.js";
|
|
322
330
|
import "./types/index.js";
|
|
323
|
-
export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractAdapterContract, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, AccountMigratorAdapterContract, AdapterType, AddressMap, AddressProviderV310Contract, AddressSet, AssetsMap, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, BaseContract, BasePlugin, BigIntMath, BotPermissions, BoundedPriceFeedContract, CamelotV3AdapterContract, ChainContractsRegister, ChainNotConfiguredError, CompositePriceFeedContract, ConstantPriceFeedContract, Construct, ContractParseError, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountOperationsService, CreditAccountState, CreditAccountsServiceV310, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CreditSuiteStrategy, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, DEFAULT_QUOTA_BUFFER_BPS, DEGEN_NFT_MIDAS, DEGEN_NFT_SECURITIZE, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DIRECT_TRANSFERS_QUOTA, DUST_THRESHOLD, DaiUsdsAdapterContract, ERC4626AdapterContract, ERC4626ReferralAdapterContract, EXECUTE_BYTES_SELECTOR, Erc4626PriceFeedContract, ExternalPriceFeedContract, FluidDexAdapterContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LidoV1AdapterContract, LinearInterestRateModelContract, LiquidationsService, MAX_INT, MAX_LEVERAGE_BUFFER_BPS, MAX_QUOTA_MULTIPLIER, MAX_UINT16, MAX_UINT256, MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_INT96, MIN_SAFE_HEALTH_FACTOR_FORM, MULTICALL_ADDRESS, MarketRegister, MarketSuite, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, MidasDegenNFT, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, MissingSerializedParamsError, MultichainConstruct, MultichainLiquidationsService, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, NATIVE_ADDRESS, NON_STRATEGY_PHANTOM_TOKEN_TYPES, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainSDK, OpportunitiesService, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, PartialPriceFeedInitError, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PeripheryCompressorV310Contract, PluginStateVersionError, PoolService, PoolSuite, PoolV310Contract, PositionsService, PriceFeedRef, PriceFeedRegistry, PriceOracleV310Contract, PriceUpdatesCache, PythPriceFeed, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWARegistry, RWA_COMPRESSOR_ADDRESS, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RedemptionLoggerV310Contract, RedstonePriceFeedContract, RouterV310Contract, SDKConstruct, SECONDS_PER_YEAR, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkRWADataNotLoadedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeDegenNFT, SecuritizeLiquidatorContract, SecuritizeOnRampAdapterContract, SecuritizeRWAFactory, SecuritizeRedemptionGatewayAdapterContract, SimulateWithPriceUpdatesError, SimulationError, StakingRewardsAdapterContract, TokensMeta, TraderJoePoolVersion, TraderJoeRouterAdapterContract, TreehouseFastlaneAdapterContract, TreehouseRedemptionGatewayAdapterContract, TreehouseRouterAdapterContract, TypedObjectUtils, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpdatablePriceFeedRegistry, UpshiftVaultAdapterContract, VERSION_RANGE_310, VelodromeV2RouterAdapterContract, VotingContractStatus, WAD, WAD_DECIMALS_POW, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WstETHPriceFeedContract, WstETHV1AdapterContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, ZodAddress, ZodBigInt, ZodHex, accountSnapshotFromCreditAccountData, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, amountOf, assetsMap, attachOptionsSchema, botPermissionsToString, bpsToRay, buildDelayedStrategyPositionOperationPreview, bytes32ToString, calcBorrowApy, calcBorrowRate, calcDefaultQuota, calcEffectiveBorrowApy, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcQuotaUpdate, calcRecommendedQuota, calcTimeToLiquidationMs, calcUtilization, calcUtilizationRaw, chains, checkAccountQuotas, checkBorrowLimit, checkCollateralFunding, checkCollateralised, checkCreditAccountFrozen, checkCreditManagerPaused, checkCreditOperation, checkDebtLimits, checkEmergencyLiquidator, checkForbiddenToken, checkHealthFactors, checkIncreaseDebt, checkIncreaseQuota, checkLeverage, checkLiquidation, checkLiquidationEligibility, checkLiquidationFunding, checkLiquidatorEligible, checkMarket, checkMarketExpired, checkMaxQuota, checkMidasAccountGreenlist, checkObtained, checkOperation, checkPartiallyLiquidatable, checkPoolFunding, checkPoolLiquidity, checkPoolOperation, checkPoolPaused, checkPoolSunset, checkQuotaActive, checkQuotaChange, checkQuotaCount, checkQuotaLimit, checkQuotaUpdates, checkRWAOpenRequirements, checkRWAOpening, checkReservePriceLimited, checkSimulation, checkWallet, checkWalletAllowance, checkWalletBalance, childLogger, classifyCloseOrRepay, classifyCurveOperation, classifyInnerOperations, collateralPriceInUnderlying, collectTraces, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, abi as creditFacadeV310Abi, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, decodeDelayedIntent, detectDelayedClaim, detectDelayedOperation, detectNetwork, dominantCollateral, encodeDelayedIntent, erc4626ReferralAdapterAbi, estimateClaimableAt, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchCreditAccountSlice, filterDust, filterDustUSD, findCallTo, findCallWithInput, findCuratorMarketConfigurator, findExecuteBytes, fmtBinaryMask, fnSigToName, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAccountTargetCollateral, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getAssetType, getCastTraceArgs, getChain, getCuratorName, getDirectTransferToken, getFunctionSignature, getLegacyStrategyTarget, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, hasAdapterDeployParamsAbi, healthFactorBps, hexEq, hydrateAddressProvider, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCreditAccountAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iTreehouseFastlaneAbi, iTreehouseFastlaneAdapterAbi, iTreehouseRedemptionGatewayAbi, iTreehouseRedemptionGatewayAdapterAbi, iTreehouseRouterAbi, iTreehouseRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isCloseOrRepay, isDust, isLPPriceFeed, isPhantomToken, isPoolOperation, isPublicNetwork, isRWAFactory, isRWAOperation, isRWAToken, isStrategyCollateral, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, isZeroBalance, iwstETHAbi, iwstEthv1AdapterAbi, json_parse, json_stringify, lidoV1_WETHGatewayAbi, makeReplayState, maxAmountForQuota, mellowDvvAdapterAbi, midasGreenlistsAccount, minSeizedAmount, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalPartialLiquidation, optimalPartialLiquidationAmounts, parseAdapterAction, parseAdapterDeployParams, parseFacadeOperationCalldata, parseOperationCalldata, parsePoolOperationCalldata, parsePosNegAmount, parseRWAFactoryOperationCalldata, partialLiquidationParams, percentFmt, pickStrategyTargetCollateral, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, raise, rayToBps, rayToNumber, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent, resolveProtocolCall, retry, rewardsFromTransfers, roundUpQuota, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, soleNonUnderlyingCollateral, strategyName, swapFromTransfers, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toCreditAccountSlice, toNetTransfers, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toToken, toTokenAmount, toWithdrawalStatus, updatableDependencies, usdToNumber, watchBlocksAsync };
|
|
331
|
+
export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AaveHorizonBridgeAdapterContract, AaveV3PoolAdapterContract, AbstractAdapterContract, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, AccountMigratorAdapterContract, AdapterType, AddressMap, AddressProviderV310Contract, AddressSet, AssetsMap, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, BaseContract, BasePlugin, BigIntMath, BotPermissions, BoundedPriceFeedContract, CamelotV3AdapterContract, ChainContractsRegister, ChainNotConfiguredError, CompositePriceFeedContract, ConstantPriceFeedContract, Construct, ContractParseError, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountOperationsService, CreditAccountState, CreditAccountsServiceV310, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CreditSuiteStrategy, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, DEFAULT_QUOTA_BUFFER_BPS, DEGEN_NFT_MIDAS, DEGEN_NFT_SECURITIZE, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DIRECT_TRANSFERS_QUOTA, DUST_THRESHOLD, DaiUsdsAdapterContract, ERC4626AdapterContract, ERC4626ReferralAdapterContract, EXECUTE_BYTES_SELECTOR, Erc4626PriceFeedContract, ExternalPriceFeedContract, FluidDexAdapterContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LidoV1AdapterContract, LinearInterestRateModelContract, LiquidationsService, MAX_INT, MAX_LEVERAGE_BUFFER_BPS, MAX_QUOTA_MULTIPLIER, MAX_UINT16, MAX_UINT256, MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_INT96, MIN_SAFE_HEALTH_FACTOR_FORM, MULTICALL_ADDRESS, MarketRegister, MarketSuite, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, MidasDegenNFT, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, MissingSerializedParamsError, MultichainConstruct, MultichainLiquidationsService, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, NATIVE_ADDRESS, NON_STRATEGY_PHANTOM_TOKEN_TYPES, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainSDK, OpportunitiesService, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, PartialPriceFeedInitError, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PeripheryCompressorV310Contract, PluginStateVersionError, PoolService, PoolSuite, PoolV310Contract, PositionsService, PriceFeedRef, PriceFeedRegistry, PriceOracleV310Contract, PriceUpdatesCache, PythPriceFeed, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWARegistry, RWA_COMPRESSOR_ADDRESS, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RedemptionLoggerV310Contract, RedstonePriceFeedContract, RouterV310Contract, SDKConstruct, SECONDS_PER_YEAR, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkRWADataNotLoadedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeDegenNFT, SecuritizeLiquidatorContract, SecuritizeOnRampAdapterContract, SecuritizeRWAFactory, SecuritizeRedemptionGatewayAdapterContract, SimulateWithPriceUpdatesError, SimulationError, StakingRewardsAdapterContract, TokensMeta, TraderJoePoolVersion, TraderJoeRouterAdapterContract, TreehouseFastlaneAdapterContract, TreehouseRedemptionGatewayAdapterContract, TreehouseRouterAdapterContract, TypedObjectUtils, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpdatablePriceFeedRegistry, UpshiftVaultAdapterContract, VERSION_RANGE_310, VelodromeV2RouterAdapterContract, VotingContractStatus, WAD, WAD_DECIMALS_POW, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WstETHPriceFeedContract, WstETHV1AdapterContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, ZodAddress, ZodBigInt, ZodHex, accountSnapshotFromCreditAccountData, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, amountOf, assetsMap, attachOptionsSchema, botPermissionsToString, bpsToRay, buildDelayedStrategyPositionOperationPreview, bytes32ToString, calcBorrowApy, calcBorrowRate, calcDefaultQuota, calcEffectiveBorrowApy, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcQuotaUpdate, calcRecommendedQuota, calcTimeToLiquidationMs, calcUtilization, calcUtilizationRaw, chains, checkAccountQuotas, checkBorrowLimit, checkCollateralFunding, checkCollateralised, checkCreditAccountFrozen, checkCreditManagerPaused, checkCreditOperation, checkDebtLimits, checkEmergencyLiquidator, checkForbiddenToken, checkHealthFactors, checkIncreaseDebt, checkIncreaseQuota, checkLeverage, checkLiquidation, checkLiquidationEligibility, checkLiquidationFunding, checkLiquidatorEligible, checkMarket, checkMarketExpired, checkMaxQuota, checkMidasAccountGreenlist, checkObtained, checkOperation, checkPartiallyLiquidatable, checkPoolFunding, checkPoolLiquidity, checkPoolOperation, checkPoolPaused, checkPoolSunset, checkQuotaActive, checkQuotaChange, checkQuotaCount, checkQuotaLimit, checkQuotaUpdates, checkRWAOpenRequirements, checkRWAOpening, checkReservePriceLimited, checkSimulation, checkWallet, checkWalletAllowance, checkWalletBalance, childLogger, classifyCloseOrRepay, classifyCurveOperation, classifyInnerOperations, collateralPriceInUnderlying, collectTraces, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, abi as creditFacadeV310Abi, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, decodeDelayedIntent, detectDelayedClaim, detectDelayedOperation, detectNetwork, dominantCollateral, encodeDelayedIntent, erc4626ReferralAdapterAbi, estimateClaimableAt, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchCreditAccountSlice, filterDust, filterDustUSD, findCallTo, findCallWithInput, findCuratorMarketConfigurator, findExecuteBytes, fmtBinaryMask, fnSigToName, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAccountTargetCollateral, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getAssetType, getCastTraceArgs, getChain, getCuratorName, getDirectTransferToken, getFunctionSignature, getLegacyStrategyTarget, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, hasAdapterDeployParamsAbi, healthFactorBps, hexEq, hydrateAddressProvider, iAaveHorizonBridgeAbi, iAaveHorizonBridgeAdapterAbi, iAaveOracleAbi, iAaveV3PoolAbi, iAaveV3PoolAdapterAbi, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCreditAccountAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iPoolAddressesProviderAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iTreehouseFastlaneAbi, iTreehouseFastlaneAdapterAbi, iTreehouseRedemptionGatewayAbi, iTreehouseRedemptionGatewayAdapterAbi, iTreehouseRouterAbi, iTreehouseRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isCloseOrRepay, isDust, isLPPriceFeed, isPhantomToken, isPoolOperation, isPublicNetwork, isRWAFactory, isRWAOperation, isRWAToken, isStrategyCollateral, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, isZeroBalance, iwstETHAbi, iwstEthv1AdapterAbi, json_parse, json_stringify, lidoV1_WETHGatewayAbi, makeReplayState, maxAmountForQuota, mellowDvvAdapterAbi, midasGreenlistsAccount, minSeizedAmount, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalPartialLiquidation, optimalPartialLiquidationAmounts, parseAdapterAction, parseAdapterDeployParams, parseFacadeOperationCalldata, parseOperationCalldata, parsePoolOperationCalldata, parsePosNegAmount, parseRWAFactoryOperationCalldata, partialLiquidationParams, percentFmt, pickStrategyTargetCollateral, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, raise, rayToBps, rayToNumber, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent, resolveProtocolCall, retry, rewardsFromTransfers, roundUpQuota, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, soleNonUnderlyingCollateral, strategyName, swapFromTransfers, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toCreditAccountSlice, toNetTransfers, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toToken, toTokenAmount, toWithdrawalStatus, updatableDependencies, usdToNumber, watchBlocksAsync };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { peripheryCompressorAbi } from "../../abi/compressors/peripheryCompressor.js";
|
|
1
2
|
import { AddressMap } from "../utils/AddressMap.js";
|
|
2
3
|
import { AP_PERIPHERY_COMPRESSOR } from "../constants/address-provider.js";
|
|
3
4
|
import { VERSION_RANGE_310 } from "../constants/versions.js";
|
|
@@ -7,7 +8,6 @@ import "../utils/index.js";
|
|
|
7
8
|
import { executeMulticallBatches } from "../utils/viem/executeMulticallBatches.js";
|
|
8
9
|
import { SDKConstruct } from "../base/SDKConstruct.js";
|
|
9
10
|
import "../base/index.js";
|
|
10
|
-
import { peripheryCompressorAbi } from "../../abi/compressors/peripheryCompressor.js";
|
|
11
11
|
import "../utils/viem/index.js";
|
|
12
12
|
import { createZapper } from "./zapper/createZapper.js";
|
|
13
13
|
import "./zapper/index.js";
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
//#region src/onchain/market/adapters/abi/aave/iAaveHorizonBridge.ts
|
|
2
|
+
const iAaveHorizonBridgeAbi = [
|
|
3
|
+
{
|
|
4
|
+
name: "contractType",
|
|
5
|
+
type: "function",
|
|
6
|
+
stateMutability: "view",
|
|
7
|
+
inputs: [],
|
|
8
|
+
outputs: [{ type: "bytes32" }]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: "version",
|
|
12
|
+
type: "function",
|
|
13
|
+
stateMutability: "view",
|
|
14
|
+
inputs: [],
|
|
15
|
+
outputs: [{ type: "uint256" }]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "pool",
|
|
19
|
+
type: "function",
|
|
20
|
+
stateMutability: "view",
|
|
21
|
+
inputs: [],
|
|
22
|
+
outputs: [{ type: "address" }]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "rwaATokenManager",
|
|
26
|
+
type: "function",
|
|
27
|
+
stateMutability: "view",
|
|
28
|
+
inputs: [],
|
|
29
|
+
outputs: [{ type: "address" }]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "referralCode",
|
|
33
|
+
type: "function",
|
|
34
|
+
stateMutability: "view",
|
|
35
|
+
inputs: [],
|
|
36
|
+
outputs: [{ type: "uint16" }]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "openPosition",
|
|
40
|
+
type: "function",
|
|
41
|
+
stateMutability: "nonpayable",
|
|
42
|
+
inputs: [
|
|
43
|
+
{
|
|
44
|
+
type: "address",
|
|
45
|
+
name: "aToken"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: "address",
|
|
49
|
+
name: "debtToken"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
type: "uint256",
|
|
53
|
+
name: "aTokenAmount"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
type: "uint256",
|
|
57
|
+
name: "borrowAmount"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
outputs: []
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "closePosition",
|
|
64
|
+
type: "function",
|
|
65
|
+
stateMutability: "nonpayable",
|
|
66
|
+
inputs: [
|
|
67
|
+
{
|
|
68
|
+
type: "address",
|
|
69
|
+
name: "aToken"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: "address",
|
|
73
|
+
name: "debtToken"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
type: "uint256",
|
|
77
|
+
name: "repayAmount"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: "uint256",
|
|
81
|
+
name: "aTokenAmount"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
outputs: []
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "CreditAccountOwnerIsCreditAccountException",
|
|
88
|
+
type: "error",
|
|
89
|
+
inputs: []
|
|
90
|
+
}
|
|
91
|
+
];
|
|
92
|
+
//#endregion
|
|
93
|
+
export { iAaveHorizonBridgeAbi };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/onchain/market/adapters/abi/aave/iAaveOracle.ts
|
|
2
|
+
const iAaveOracleAbi = [{
|
|
3
|
+
name: "BASE_CURRENCY_UNIT",
|
|
4
|
+
type: "function",
|
|
5
|
+
stateMutability: "view",
|
|
6
|
+
inputs: [],
|
|
7
|
+
outputs: [{ type: "uint256" }]
|
|
8
|
+
}, {
|
|
9
|
+
name: "getAssetsPrices",
|
|
10
|
+
type: "function",
|
|
11
|
+
stateMutability: "view",
|
|
12
|
+
inputs: [{
|
|
13
|
+
type: "address[]",
|
|
14
|
+
name: "assets"
|
|
15
|
+
}],
|
|
16
|
+
outputs: [{ type: "uint256[]" }]
|
|
17
|
+
}];
|
|
18
|
+
//#endregion
|
|
19
|
+
export { iAaveOracleAbi };
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
//#region src/onchain/market/adapters/abi/aave/iAaveV3Pool.ts
|
|
2
|
+
const iAaveV3PoolAbi = [
|
|
3
|
+
{
|
|
4
|
+
name: "supply",
|
|
5
|
+
type: "function",
|
|
6
|
+
stateMutability: "nonpayable",
|
|
7
|
+
inputs: [
|
|
8
|
+
{
|
|
9
|
+
type: "address",
|
|
10
|
+
name: "asset"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
type: "uint256",
|
|
14
|
+
name: "amount"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
type: "address",
|
|
18
|
+
name: "onBehalfOf"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
type: "uint16",
|
|
22
|
+
name: "referralCode"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
outputs: []
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "withdraw",
|
|
29
|
+
type: "function",
|
|
30
|
+
stateMutability: "nonpayable",
|
|
31
|
+
inputs: [
|
|
32
|
+
{
|
|
33
|
+
type: "address",
|
|
34
|
+
name: "asset"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: "uint256",
|
|
38
|
+
name: "amount"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: "address",
|
|
42
|
+
name: "to"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
outputs: [{ type: "uint256" }]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "borrow",
|
|
49
|
+
type: "function",
|
|
50
|
+
stateMutability: "nonpayable",
|
|
51
|
+
inputs: [
|
|
52
|
+
{
|
|
53
|
+
type: "address",
|
|
54
|
+
name: "asset"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: "uint256",
|
|
58
|
+
name: "amount"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: "uint256",
|
|
62
|
+
name: "interestRateMode"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
type: "uint16",
|
|
66
|
+
name: "referralCode"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
type: "address",
|
|
70
|
+
name: "onBehalfOf"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
outputs: []
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "repay",
|
|
77
|
+
type: "function",
|
|
78
|
+
stateMutability: "nonpayable",
|
|
79
|
+
inputs: [
|
|
80
|
+
{
|
|
81
|
+
type: "address",
|
|
82
|
+
name: "asset"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: "uint256",
|
|
86
|
+
name: "amount"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: "uint256",
|
|
90
|
+
name: "interestRateMode"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: "address",
|
|
94
|
+
name: "onBehalfOf"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
outputs: [{ type: "uint256" }]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: "getReserveAToken",
|
|
101
|
+
type: "function",
|
|
102
|
+
stateMutability: "view",
|
|
103
|
+
inputs: [{
|
|
104
|
+
type: "address",
|
|
105
|
+
name: "asset"
|
|
106
|
+
}],
|
|
107
|
+
outputs: [{ type: "address" }]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: "ADDRESSES_PROVIDER",
|
|
111
|
+
type: "function",
|
|
112
|
+
stateMutability: "view",
|
|
113
|
+
inputs: [],
|
|
114
|
+
outputs: [{ type: "address" }]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "getReserveData",
|
|
118
|
+
type: "function",
|
|
119
|
+
stateMutability: "view",
|
|
120
|
+
inputs: [{
|
|
121
|
+
type: "address",
|
|
122
|
+
name: "asset"
|
|
123
|
+
}],
|
|
124
|
+
outputs: [{
|
|
125
|
+
type: "tuple",
|
|
126
|
+
components: [
|
|
127
|
+
{
|
|
128
|
+
type: "tuple",
|
|
129
|
+
name: "configuration",
|
|
130
|
+
components: [{
|
|
131
|
+
type: "uint256",
|
|
132
|
+
name: "data"
|
|
133
|
+
}]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
type: "uint128",
|
|
137
|
+
name: "liquidityIndex"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: "uint128",
|
|
141
|
+
name: "currentLiquidityRate"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
type: "uint128",
|
|
145
|
+
name: "variableBorrowIndex"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
type: "uint128",
|
|
149
|
+
name: "currentVariableBorrowRate"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: "uint128",
|
|
153
|
+
name: "currentStableBorrowRate"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
type: "uint40",
|
|
157
|
+
name: "lastUpdateTimestamp"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
type: "uint16",
|
|
161
|
+
name: "id"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: "address",
|
|
165
|
+
name: "aTokenAddress"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
type: "address",
|
|
169
|
+
name: "stableDebtTokenAddress"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
type: "address",
|
|
173
|
+
name: "variableDebtTokenAddress"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
type: "address",
|
|
177
|
+
name: "interestRateStrategyAddress"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
type: "uint128",
|
|
181
|
+
name: "accruedToTreasury"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
type: "uint128",
|
|
185
|
+
name: "unbacked"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
type: "uint128",
|
|
189
|
+
name: "isolationModeTotalDebt"
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}]
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: "getUserAccountData",
|
|
196
|
+
type: "function",
|
|
197
|
+
stateMutability: "view",
|
|
198
|
+
inputs: [{
|
|
199
|
+
type: "address",
|
|
200
|
+
name: "user"
|
|
201
|
+
}],
|
|
202
|
+
outputs: [
|
|
203
|
+
{
|
|
204
|
+
type: "uint256",
|
|
205
|
+
name: "totalCollateralBase"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
type: "uint256",
|
|
209
|
+
name: "totalDebtBase"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
type: "uint256",
|
|
213
|
+
name: "availableBorrowsBase"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
type: "uint256",
|
|
217
|
+
name: "currentLiquidationThreshold"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
type: "uint256",
|
|
221
|
+
name: "ltv"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
type: "uint256",
|
|
225
|
+
name: "healthFactor"
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: "getUserEMode",
|
|
231
|
+
type: "function",
|
|
232
|
+
stateMutability: "view",
|
|
233
|
+
inputs: [{
|
|
234
|
+
type: "address",
|
|
235
|
+
name: "user"
|
|
236
|
+
}],
|
|
237
|
+
outputs: [{ type: "uint256" }]
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: "getEModeCategoryCollateralConfig",
|
|
241
|
+
type: "function",
|
|
242
|
+
stateMutability: "view",
|
|
243
|
+
inputs: [{
|
|
244
|
+
type: "uint8",
|
|
245
|
+
name: "id"
|
|
246
|
+
}],
|
|
247
|
+
outputs: [{
|
|
248
|
+
type: "tuple",
|
|
249
|
+
components: [
|
|
250
|
+
{
|
|
251
|
+
type: "uint16",
|
|
252
|
+
name: "ltv"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
type: "uint16",
|
|
256
|
+
name: "liquidationThreshold"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
type: "uint16",
|
|
260
|
+
name: "liquidationBonus"
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
}]
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: "getEModeCategoryCollateralBitmap",
|
|
267
|
+
type: "function",
|
|
268
|
+
stateMutability: "view",
|
|
269
|
+
inputs: [{
|
|
270
|
+
type: "uint8",
|
|
271
|
+
name: "id"
|
|
272
|
+
}],
|
|
273
|
+
outputs: [{ type: "uint128" }]
|
|
274
|
+
}
|
|
275
|
+
];
|
|
276
|
+
//#endregion
|
|
277
|
+
export { iAaveV3PoolAbi };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/onchain/market/adapters/abi/aave/iPoolAddressesProvider.ts
|
|
2
|
+
const iPoolAddressesProviderAbi = [{
|
|
3
|
+
name: "getPriceOracle",
|
|
4
|
+
type: "function",
|
|
5
|
+
stateMutability: "view",
|
|
6
|
+
inputs: [],
|
|
7
|
+
outputs: [{ type: "address" }]
|
|
8
|
+
}];
|
|
9
|
+
//#endregion
|
|
10
|
+
export { iPoolAddressesProviderAbi };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { iAaveHorizonBridgeAbi } from "./iAaveHorizonBridge.js";
|
|
2
|
+
import { iAaveOracleAbi } from "./iAaveOracle.js";
|
|
3
|
+
import { iAaveV3PoolAbi } from "./iAaveV3Pool.js";
|
|
4
|
+
import { iPoolAddressesProviderAbi } from "./iPoolAddressesProvider.js";
|
|
5
|
+
export { iAaveHorizonBridgeAbi, iAaveOracleAbi, iAaveV3PoolAbi, iPoolAddressesProviderAbi };
|
|
@@ -7,6 +7,7 @@ import { parseAbi, toFunctionSelector } from "viem";
|
|
|
7
7
|
* Based on the actual encodeAbiParameters calls in the adapter implementations
|
|
8
8
|
*/
|
|
9
9
|
const adapterActionSignatures = {
|
|
10
|
+
["AAVE_V3_POOL"]: { 311: "function setAssetStatusBatch((address,bool)[])" },
|
|
10
11
|
["BALANCER_V3_ROUTER"]: {
|
|
11
12
|
310: "function setPoolStatusBatch(address[],bool[])",
|
|
12
13
|
311: "function setPoolStatusBatch((address,uint8)[])"
|