@gearbox-protocol/sdk 3.0.0-vfour.136 → 3.0.0-vfour.138
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/sdk/index.cjs +23 -5
- package/dist/cjs/sdk/index.d.ts +5 -2
- package/dist/esm/sdk/index.d.mts +5 -2
- package/dist/esm/sdk/index.mjs +23 -5
- package/package.json +1 -1
package/dist/cjs/sdk/index.cjs
CHANGED
|
@@ -59569,10 +59569,16 @@ var MarketFactory = class extends SDKConstruct {
|
|
|
59569
59569
|
constructor(sdk, marketData) {
|
|
59570
59570
|
super(sdk);
|
|
59571
59571
|
this.state = marketData;
|
|
59572
|
-
|
|
59573
|
-
sdk,
|
|
59572
|
+
let configurator = sdk.contracts.get(
|
|
59574
59573
|
marketData.configurator
|
|
59575
59574
|
);
|
|
59575
|
+
if (!configurator) {
|
|
59576
|
+
configurator = new MarketConfiguratorContract(
|
|
59577
|
+
sdk,
|
|
59578
|
+
marketData.configurator
|
|
59579
|
+
);
|
|
59580
|
+
}
|
|
59581
|
+
this.configurator = configurator;
|
|
59576
59582
|
this.acl = marketData.acl;
|
|
59577
59583
|
const allTokens = [
|
|
59578
59584
|
...marketData.tokens,
|
|
@@ -59975,7 +59981,11 @@ var MarketRegister = class extends SDKConstruct {
|
|
|
59975
59981
|
return this.markets.flatMap((market) => market.creditManagers);
|
|
59976
59982
|
}
|
|
59977
59983
|
get marketConfigurators() {
|
|
59978
|
-
|
|
59984
|
+
const result = /* @__PURE__ */ new Set();
|
|
59985
|
+
for (const m of this.markets) {
|
|
59986
|
+
result.add(m.configurator);
|
|
59987
|
+
}
|
|
59988
|
+
return Array.from(result);
|
|
59979
59989
|
}
|
|
59980
59990
|
findCreditManager(creditManager) {
|
|
59981
59991
|
const addr = creditManager.toLowerCase();
|
|
@@ -60402,11 +60412,13 @@ function assetsMap(assets) {
|
|
|
60402
60412
|
// src/sdk/accounts/CreditAccountsService.ts
|
|
60403
60413
|
var CreditAccountsService = class extends SDKConstruct {
|
|
60404
60414
|
#compressor;
|
|
60405
|
-
|
|
60415
|
+
#batchSize;
|
|
60416
|
+
constructor(sdk, options) {
|
|
60406
60417
|
super(sdk);
|
|
60407
60418
|
this.#compressor = sdk.addressProvider.getLatestVersion(
|
|
60408
60419
|
AP_CREDIT_ACCOUNT_COMPRESSOR
|
|
60409
60420
|
);
|
|
60421
|
+
this.#batchSize = options?.batchSize;
|
|
60410
60422
|
}
|
|
60411
60423
|
/**
|
|
60412
60424
|
* Returns single credit account data, or undefined if it's not found
|
|
@@ -60491,7 +60503,13 @@ var CreditAccountsService = class extends SDKConstruct {
|
|
|
60491
60503
|
let offset = 0n;
|
|
60492
60504
|
do {
|
|
60493
60505
|
const [accounts, newOffset] = await this.#getCreditAccounts(
|
|
60494
|
-
|
|
60506
|
+
this.#batchSize ? [
|
|
60507
|
+
arg0,
|
|
60508
|
+
{ ...caFilter, reverting },
|
|
60509
|
+
offset,
|
|
60510
|
+
BigInt(this.#batchSize)
|
|
60511
|
+
// limit
|
|
60512
|
+
] : [arg0, { ...caFilter, reverting }, offset],
|
|
60495
60513
|
priceUpdateTxs,
|
|
60496
60514
|
options
|
|
60497
60515
|
);
|
package/dist/cjs/sdk/index.d.ts
CHANGED
|
@@ -91806,6 +91806,9 @@ declare class TokensMeta extends AddressMap<TokenMetaData> {
|
|
|
91806
91806
|
mustFindBySymbol(symbol: string): TokenMetaData;
|
|
91807
91807
|
}
|
|
91808
91808
|
|
|
91809
|
+
interface CreditAccountServiceOptions {
|
|
91810
|
+
batchSize?: number;
|
|
91811
|
+
}
|
|
91809
91812
|
interface ReadContractOptions {
|
|
91810
91813
|
blockNumber?: bigint;
|
|
91811
91814
|
}
|
|
@@ -91898,7 +91901,7 @@ interface PermitResult {
|
|
|
91898
91901
|
}
|
|
91899
91902
|
declare class CreditAccountsService extends SDKConstruct {
|
|
91900
91903
|
#private;
|
|
91901
|
-
constructor(sdk: GearboxSDK);
|
|
91904
|
+
constructor(sdk: GearboxSDK, options?: CreditAccountServiceOptions);
|
|
91902
91905
|
/**
|
|
91903
91906
|
* Returns single credit account data, or undefined if it's not found
|
|
91904
91907
|
* Performs all necessary price feed updates under the hood
|
|
@@ -92164,4 +92167,4 @@ type MulticallErrorType = GetChainContractAddressErrorType | ReadContractErrorTy
|
|
|
92164
92167
|
*/
|
|
92165
92168
|
declare function simulateMulticall<const contracts extends readonly unknown[], chain extends Chain | undefined, allowFailure extends boolean = true>(client: Client<Transport, chain>, parameters: MulticallParameters<contracts, allowFailure>): Promise<MulticallReturnType<contracts, allowFailure>>;
|
|
92166
92169
|
|
|
92167
|
-
export { ADDRESS_0X0, ADDRESS_PROVIDER, ADDRESS_PROVIDER_BLOCK, AP_ACCOUNT_FACTORY, AP_ACL, AP_ADAPTER_COMPRESSOR, AP_BOT_LIST, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DEGEN_DISTRIBUTOR, AP_DEGEN_NFT, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_MULTI_PAUSE, AP_PARTIAL_LIQUIDATION_BOT, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_ORACLE, AP_ROUTER, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractPriceFeedContract, type AdapterContractType, type AdapterData, AddressLabeller, AddressMap, AddressProviderContractV3, AddressProviderContractV3_1, type AddressProviderV3StateHuman, type Asset, type AssetPriceFeedStateHuman, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerV2VaultAdapterContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, type BaseContractOptions, type BaseContractStateHuman, type BaseParams, type BasePriceFeedStateHuman, type BotAddresses, type BotBaseType, type BotDataPayload, type BotDetailedType, BotListContract, type BotListStateHuman, BotPermissions, BotsService, type BoundedOracleStateHuman, BoundedPriceFeedContract, CamelotV3AdapterContract, ChainlinkPriceFeedContract, type ClaimFarmRewardsProps, type CloseCreditAccountResult, type ClosePathBalances, type CommonResult, CompositePriceFeedContract, type ConnectionOptions, type ContractMethod, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, type CoreStateHuman, type CreditAccountData, type CreditAccountDataSlice, type CreditAccountFilter, CreditAccountsService, type CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV300Contract, CreditConfiguratorV310Contract, type CreditFacadeState, type CreditFacadeStateHuman, CreditFacadeV300Contract, CreditFacadeV310Contract, CreditFactory, type CreditFactoryStateHuman, type CreditManagerData, type CreditManagerDebtParams, type CreditManagerDebtParamsHuman, type CreditManagerState, type CreditManagerStateHuman, CreditManagerV300Contract, CreditManagerV310Contract, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveCryptoPriceFeedContract, type CurvePoolStruct, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1AdapterStableNGContract, DaiUsdsAdapterContract, ERC4626AdapterContract, Erc4626PriceFeedContract, type EtherscanURLParam, type FindClosePathInput, GEARBOX_RISK_CURATORS, GaugeContract, type GaugeParams, type GaugeParamsHuman, type GaugeStakingDataPayload, GaugeStakingService, type GaugeStateHuman, GearStakingContract, type GearStakingV3StateHuman, GearboxSDK, type GearboxStateHuman, type IAdapterContract, type IAddressProviderContract, type IBaseContract, type ILPPriceFeedContract, type ILogger, type IPriceFeedContract, type IPriceOracleContract, type LPPriceFeedStateHuman, LinearModelContract, type LinearModelStateHuman, type LiquidationBotType, type LogFn, MAX_UINT16, MAX_UINT256, MIN_INT96, type MarketData, MarketFactory, MarketRegister, type MarketStateHuman, MellowLRTPriceFeedContract, MellowVaultAdapterContract, type MultiCall, type MultiVote, type MulticallErrorType, type MulticallParameters, type MulticallReturnType, NOT_DEPLOYED, NO_VERSION, type NetworkOptions, type NetworkType, type OnDemandPriceUpdate, type OpenStrategyResult, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PRICE_DECIMALS, PRICE_DECIMALS_POW, type PartialPriceFeedTreeNode, type PathOption, type PathOptionSerie, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, type PermitResult, PoolContract, type PoolData, PoolFactory, type PoolFactoryStateHuman, PoolQuotaKeeperContract, type PoolQuotaKeeperData, type PoolQuotaKeeperStateHuman, type PoolStateHuman, type PriceFeedConstructorArgs, type PriceFeedContractType, type PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, type PriceFeedRegisterHooks, type PriceFeedStateHuman, type PriceFeedTreeNode, type PriceFeedUsageType, type PriceOracleData, PriceOracleV300Contract, PriceOracleV310Contract, type PriceOracleV3StateHuman, Provider, type QuotaParamsHuman, type QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, type RampEvent, type RateKeeperData, type RawTx, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, type RouterCloseResult, type RouterHooks, type RouterResult, RouterV3Contract, SDKConstruct, type SDKHooks, type SDKOptions, SUPPORTED_CHAINS, type SendRawTxParameters, StakingRewardsAdapterContract, type SwapOperation, type SwapTask, type SyncStateOptions, TIMELOCK, type TVL, type TokenMetaData, TokensMeta, type TransportOptions, USDC, UniswapV2AdapterContract, UniswapV3AdapterContract, type UpdatePriceFeedsResult, VelodromeV2RouterAdapterContract, VotingContractStatus, WAD, WAD_DECIMALS_POW, WstETHPriceFeedContract, WstETHV1AdapterContract, YearnPriceFeedContract, YearnV2RouterAdapterContract, type ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, aaveV2WrapperAbi, accountFactoryV3Abi, aclAbi, aclNonReentrantTraitAbi, assetsMap, auraDepositorAbi, auraPathResolverAbi, auraWithdrawerAbi, balancerLpDepositorAbi, balancerLpPathResolverAbi, balancerLpWithdrawerAbi, balancerSwapperAbi, balancerV2VaultAdapterAbi, balancesMap, batchLiquidationEstimatorAbi, batchesChainAbi, botListV3Abi, botPermissionsToString, boundedPriceFeedAbi, bptStablePriceFeedAbi, bptWeightedPriceFeedAbi, bytes32ToString, camelotV3AdapterAbi, camelotV3SwapperAbi, chainlinkReadableAggregatorAbi, chains, childLogger, closePathResolverAbi, compositePriceFeedAbi, compoundV2WrapperAbi, contractsRegisterAbi, controllerTimelockV3Abi, convexDepositorAbi, convexPathResolverAbi, convexV1BaseRewardPoolAdapterAbi, convexV1BoosterAdapterAbi, convexWithdrawerAbi, createAdapter, createRawTx, createTransport, creditConfiguratorV3Abi, creditFacadeV3Abi, creditManagerV3Abi, creditManagerV3UsdtAbi, curveCryptoLpPriceFeedAbi, curveLpDepositorAbi, curveLpPathResolverAbi, curveLpWithdrawerAbi, curveStableLpPriceFeedAbi, curveSwapperAbi, curveUsdPriceFeedAbi, curveV1Adapter2AssetsAbi, curveV1Adapter3AssetsAbi, curveV1Adapter4AssetsAbi, curveV1AdapterDepositAbi, curveV1AdapterStEthAbi, curveV1AdapterStableNgAbi, dataCompressorV3Abi, degenDistributorV3Abi, degenNftv2Abi, detectChain, detectNetwork, erc20Abi, erc4626AdapterAbi, erc4626DepositorAbi, erc4626PathResolverAbi, erc4626PriceFeedAbi, erc4626WithdrawerAbi, errorAbis, etherscanUrl, faucetAbi, filterDust, fmtBinaryMask, formatBN, formatBNvalue, formatBn4dig, formatDuration, formatNumberToString_, gaugeV3Abi, gearStakingV3Abi, getAddressProvider, halfRAY, iAdapterAbi, iAddressProviderV3Abi, iAddressProviderV3_1Abi, iArbTokenAbi, iBalancerStablePoolAbi, iBalancerWeightedPoolAbi, iCamelotV3QuoterAbi, iCreditAccountCompressorAbi, iCreditConfiguratorV310Abi, iCreditFacadeV2Abi, iCreditFacadeV2EventsAbi, iCreditFacadeV2ExceptionsAbi, iCreditFacadeV2ExtendedAbi, iCreditFacadeV2V2Abi, iCreditFacadeV310Abi, iCreditFacadeV310MulticallAbi, iCreditFacadeV3Abi, iCreditFacadeV3EventsAbi, iCreditFacadeV3MulticallAbi, iCreditManagerV310Abi, iCurvePoolAbi, iDaiUsdsAdapterAbi, iDegenNftv2Abi, iDegenNftv2EventsAbi, iDegenNftv2ExceptionsAbi, iExceptionsAbi, iLegacyMintableErc20Abi, iMarketCompressorAbi, iMarketConfiguratorV310Abi, iMellowVaultAbi, iMellowVaultAdapterAbi, iOptimismMintableErc20Abi, iPendleRouterAdapterAbi, iPoolV3Abi, iPoolV3EventsAbi, iPriceFeedAbi, iPriceFeedCompressorAbi, iPriceOracleV310Abi, iPriceOracleV3Abi, iPriceOracleV3EventsAbi, iRedstoneErrorsAbi, iRedstonePriceFeedEventsAbi, iRedstonePriceFeedExceptionsAbi, iRouterV3ErrorsAbi, iStakingRewardsAdapterAbi, iUpdatablePriceFeedAbi, iVersionAbi, iZapperAbi, ierc20Abi, ierc20MetadataAbi, ilpPriceFeedAbi, ilpPriceFeedEventsAbi, ilpPriceFeedExceptionsAbi, inflationAttackBlockerAbi, insolvencyCheckerAbi, iwstEthAbi, iyVaultAbi, json_parse, json_stringify, lidoSwapperAbi, lidoV1AdapterAbi, linearInterestRateModelV3Abi, mellowLrtPriceFeedAbi, multiPauseAbi, numberWithCommas, overrideAggregatorAbi, partialLiquidationBotV3Abi, pendleTWAPPTPriceFeedAbi, percentFmt, poolQuotaKeeperV3Abi, poolV3Abi, poolV3UsdtAbi, priceFeedMultiplierAbi, priceOracleV3Abi, rawTxToMulticallPriceUpdate, redstonePriceFeedAbi, routerV3Abi, sendRawTx, simulateMulticall, susdeOverriderAbi, swapAggregatorAbi, toHumanFormat, tokenStealerAbi, tokenToTicker, underlyingDepositZapperAbi, underlyingFarmingZapperAbi, uniswapV2AdapterAbi, uniswapV2SwapperAbi, uniswapV3AdapterAbi, uniswapV3SwapperAbi, velodromeV2RouterAdapterAbi, velodromeV2SwapperAbi, wethDepositZapperAbi, wethFarmingZapperAbi, wrapAggregatorAbi, wstEthPriceFeedAbi, wstEthSwapperAbi, wstEthv1AdapterAbi, yearnDepositorAbi, yearnPathResolverAbi, yearnPriceFeedAbi, yearnV2AdapterAbi, yearnWithdrawerAbi, zapperRegisterAbi, zeroPriceFeedAbi };
|
|
92170
|
+
export { ADDRESS_0X0, ADDRESS_PROVIDER, ADDRESS_PROVIDER_BLOCK, AP_ACCOUNT_FACTORY, AP_ACL, AP_ADAPTER_COMPRESSOR, AP_BOT_LIST, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DEGEN_DISTRIBUTOR, AP_DEGEN_NFT, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_MULTI_PAUSE, AP_PARTIAL_LIQUIDATION_BOT, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_ORACLE, AP_ROUTER, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractPriceFeedContract, type AdapterContractType, type AdapterData, AddressLabeller, AddressMap, AddressProviderContractV3, AddressProviderContractV3_1, type AddressProviderV3StateHuman, type Asset, type AssetPriceFeedStateHuman, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerV2VaultAdapterContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, type BaseContractOptions, type BaseContractStateHuman, type BaseParams, type BasePriceFeedStateHuman, type BotAddresses, type BotBaseType, type BotDataPayload, type BotDetailedType, BotListContract, type BotListStateHuman, BotPermissions, BotsService, type BoundedOracleStateHuman, BoundedPriceFeedContract, CamelotV3AdapterContract, ChainlinkPriceFeedContract, type ClaimFarmRewardsProps, type CloseCreditAccountResult, type ClosePathBalances, type CommonResult, CompositePriceFeedContract, type ConnectionOptions, type ContractMethod, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, type CoreStateHuman, type CreditAccountData, type CreditAccountDataSlice, type CreditAccountFilter, type CreditAccountServiceOptions, CreditAccountsService, type CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV300Contract, CreditConfiguratorV310Contract, type CreditFacadeState, type CreditFacadeStateHuman, CreditFacadeV300Contract, CreditFacadeV310Contract, CreditFactory, type CreditFactoryStateHuman, type CreditManagerData, type CreditManagerDebtParams, type CreditManagerDebtParamsHuman, type CreditManagerState, type CreditManagerStateHuman, CreditManagerV300Contract, CreditManagerV310Contract, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveCryptoPriceFeedContract, type CurvePoolStruct, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1AdapterStableNGContract, DaiUsdsAdapterContract, ERC4626AdapterContract, Erc4626PriceFeedContract, type EtherscanURLParam, type FindClosePathInput, GEARBOX_RISK_CURATORS, GaugeContract, type GaugeParams, type GaugeParamsHuman, type GaugeStakingDataPayload, GaugeStakingService, type GaugeStateHuman, GearStakingContract, type GearStakingV3StateHuman, GearboxSDK, type GearboxStateHuman, type IAdapterContract, type IAddressProviderContract, type IBaseContract, type ILPPriceFeedContract, type ILogger, type IPriceFeedContract, type IPriceOracleContract, type LPPriceFeedStateHuman, LinearModelContract, type LinearModelStateHuman, type LiquidationBotType, type LogFn, MAX_UINT16, MAX_UINT256, MIN_INT96, type MarketData, MarketFactory, MarketRegister, type MarketStateHuman, MellowLRTPriceFeedContract, MellowVaultAdapterContract, type MultiCall, type MultiVote, type MulticallErrorType, type MulticallParameters, type MulticallReturnType, NOT_DEPLOYED, NO_VERSION, type NetworkOptions, type NetworkType, type OnDemandPriceUpdate, type OpenStrategyResult, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PRICE_DECIMALS, PRICE_DECIMALS_POW, type PartialPriceFeedTreeNode, type PathOption, type PathOptionSerie, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, type PermitResult, PoolContract, type PoolData, PoolFactory, type PoolFactoryStateHuman, PoolQuotaKeeperContract, type PoolQuotaKeeperData, type PoolQuotaKeeperStateHuman, type PoolStateHuman, type PriceFeedConstructorArgs, type PriceFeedContractType, type PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, type PriceFeedRegisterHooks, type PriceFeedStateHuman, type PriceFeedTreeNode, type PriceFeedUsageType, type PriceOracleData, PriceOracleV300Contract, PriceOracleV310Contract, type PriceOracleV3StateHuman, Provider, type QuotaParamsHuman, type QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, type RampEvent, type RateKeeperData, type RawTx, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, type RouterCloseResult, type RouterHooks, type RouterResult, RouterV3Contract, SDKConstruct, type SDKHooks, type SDKOptions, SUPPORTED_CHAINS, type SendRawTxParameters, StakingRewardsAdapterContract, type SwapOperation, type SwapTask, type SyncStateOptions, TIMELOCK, type TVL, type TokenMetaData, TokensMeta, type TransportOptions, USDC, UniswapV2AdapterContract, UniswapV3AdapterContract, type UpdatePriceFeedsResult, VelodromeV2RouterAdapterContract, VotingContractStatus, WAD, WAD_DECIMALS_POW, WstETHPriceFeedContract, WstETHV1AdapterContract, YearnPriceFeedContract, YearnV2RouterAdapterContract, type ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, aaveV2WrapperAbi, accountFactoryV3Abi, aclAbi, aclNonReentrantTraitAbi, assetsMap, auraDepositorAbi, auraPathResolverAbi, auraWithdrawerAbi, balancerLpDepositorAbi, balancerLpPathResolverAbi, balancerLpWithdrawerAbi, balancerSwapperAbi, balancerV2VaultAdapterAbi, balancesMap, batchLiquidationEstimatorAbi, batchesChainAbi, botListV3Abi, botPermissionsToString, boundedPriceFeedAbi, bptStablePriceFeedAbi, bptWeightedPriceFeedAbi, bytes32ToString, camelotV3AdapterAbi, camelotV3SwapperAbi, chainlinkReadableAggregatorAbi, chains, childLogger, closePathResolverAbi, compositePriceFeedAbi, compoundV2WrapperAbi, contractsRegisterAbi, controllerTimelockV3Abi, convexDepositorAbi, convexPathResolverAbi, convexV1BaseRewardPoolAdapterAbi, convexV1BoosterAdapterAbi, convexWithdrawerAbi, createAdapter, createRawTx, createTransport, creditConfiguratorV3Abi, creditFacadeV3Abi, creditManagerV3Abi, creditManagerV3UsdtAbi, curveCryptoLpPriceFeedAbi, curveLpDepositorAbi, curveLpPathResolverAbi, curveLpWithdrawerAbi, curveStableLpPriceFeedAbi, curveSwapperAbi, curveUsdPriceFeedAbi, curveV1Adapter2AssetsAbi, curveV1Adapter3AssetsAbi, curveV1Adapter4AssetsAbi, curveV1AdapterDepositAbi, curveV1AdapterStEthAbi, curveV1AdapterStableNgAbi, dataCompressorV3Abi, degenDistributorV3Abi, degenNftv2Abi, detectChain, detectNetwork, erc20Abi, erc4626AdapterAbi, erc4626DepositorAbi, erc4626PathResolverAbi, erc4626PriceFeedAbi, erc4626WithdrawerAbi, errorAbis, etherscanUrl, faucetAbi, filterDust, fmtBinaryMask, formatBN, formatBNvalue, formatBn4dig, formatDuration, formatNumberToString_, gaugeV3Abi, gearStakingV3Abi, getAddressProvider, halfRAY, iAdapterAbi, iAddressProviderV3Abi, iAddressProviderV3_1Abi, iArbTokenAbi, iBalancerStablePoolAbi, iBalancerWeightedPoolAbi, iCamelotV3QuoterAbi, iCreditAccountCompressorAbi, iCreditConfiguratorV310Abi, iCreditFacadeV2Abi, iCreditFacadeV2EventsAbi, iCreditFacadeV2ExceptionsAbi, iCreditFacadeV2ExtendedAbi, iCreditFacadeV2V2Abi, iCreditFacadeV310Abi, iCreditFacadeV310MulticallAbi, iCreditFacadeV3Abi, iCreditFacadeV3EventsAbi, iCreditFacadeV3MulticallAbi, iCreditManagerV310Abi, iCurvePoolAbi, iDaiUsdsAdapterAbi, iDegenNftv2Abi, iDegenNftv2EventsAbi, iDegenNftv2ExceptionsAbi, iExceptionsAbi, iLegacyMintableErc20Abi, iMarketCompressorAbi, iMarketConfiguratorV310Abi, iMellowVaultAbi, iMellowVaultAdapterAbi, iOptimismMintableErc20Abi, iPendleRouterAdapterAbi, iPoolV3Abi, iPoolV3EventsAbi, iPriceFeedAbi, iPriceFeedCompressorAbi, iPriceOracleV310Abi, iPriceOracleV3Abi, iPriceOracleV3EventsAbi, iRedstoneErrorsAbi, iRedstonePriceFeedEventsAbi, iRedstonePriceFeedExceptionsAbi, iRouterV3ErrorsAbi, iStakingRewardsAdapterAbi, iUpdatablePriceFeedAbi, iVersionAbi, iZapperAbi, ierc20Abi, ierc20MetadataAbi, ilpPriceFeedAbi, ilpPriceFeedEventsAbi, ilpPriceFeedExceptionsAbi, inflationAttackBlockerAbi, insolvencyCheckerAbi, iwstEthAbi, iyVaultAbi, json_parse, json_stringify, lidoSwapperAbi, lidoV1AdapterAbi, linearInterestRateModelV3Abi, mellowLrtPriceFeedAbi, multiPauseAbi, numberWithCommas, overrideAggregatorAbi, partialLiquidationBotV3Abi, pendleTWAPPTPriceFeedAbi, percentFmt, poolQuotaKeeperV3Abi, poolV3Abi, poolV3UsdtAbi, priceFeedMultiplierAbi, priceOracleV3Abi, rawTxToMulticallPriceUpdate, redstonePriceFeedAbi, routerV3Abi, sendRawTx, simulateMulticall, susdeOverriderAbi, swapAggregatorAbi, toHumanFormat, tokenStealerAbi, tokenToTicker, underlyingDepositZapperAbi, underlyingFarmingZapperAbi, uniswapV2AdapterAbi, uniswapV2SwapperAbi, uniswapV3AdapterAbi, uniswapV3SwapperAbi, velodromeV2RouterAdapterAbi, velodromeV2SwapperAbi, wethDepositZapperAbi, wethFarmingZapperAbi, wrapAggregatorAbi, wstEthPriceFeedAbi, wstEthSwapperAbi, wstEthv1AdapterAbi, yearnDepositorAbi, yearnPathResolverAbi, yearnPriceFeedAbi, yearnV2AdapterAbi, yearnWithdrawerAbi, zapperRegisterAbi, zeroPriceFeedAbi };
|
package/dist/esm/sdk/index.d.mts
CHANGED
|
@@ -91806,6 +91806,9 @@ declare class TokensMeta extends AddressMap<TokenMetaData> {
|
|
|
91806
91806
|
mustFindBySymbol(symbol: string): TokenMetaData;
|
|
91807
91807
|
}
|
|
91808
91808
|
|
|
91809
|
+
interface CreditAccountServiceOptions {
|
|
91810
|
+
batchSize?: number;
|
|
91811
|
+
}
|
|
91809
91812
|
interface ReadContractOptions {
|
|
91810
91813
|
blockNumber?: bigint;
|
|
91811
91814
|
}
|
|
@@ -91898,7 +91901,7 @@ interface PermitResult {
|
|
|
91898
91901
|
}
|
|
91899
91902
|
declare class CreditAccountsService extends SDKConstruct {
|
|
91900
91903
|
#private;
|
|
91901
|
-
constructor(sdk: GearboxSDK);
|
|
91904
|
+
constructor(sdk: GearboxSDK, options?: CreditAccountServiceOptions);
|
|
91902
91905
|
/**
|
|
91903
91906
|
* Returns single credit account data, or undefined if it's not found
|
|
91904
91907
|
* Performs all necessary price feed updates under the hood
|
|
@@ -92164,4 +92167,4 @@ type MulticallErrorType = GetChainContractAddressErrorType | ReadContractErrorTy
|
|
|
92164
92167
|
*/
|
|
92165
92168
|
declare function simulateMulticall<const contracts extends readonly unknown[], chain extends Chain | undefined, allowFailure extends boolean = true>(client: Client<Transport, chain>, parameters: MulticallParameters<contracts, allowFailure>): Promise<MulticallReturnType<contracts, allowFailure>>;
|
|
92166
92169
|
|
|
92167
|
-
export { ADDRESS_0X0, ADDRESS_PROVIDER, ADDRESS_PROVIDER_BLOCK, AP_ACCOUNT_FACTORY, AP_ACL, AP_ADAPTER_COMPRESSOR, AP_BOT_LIST, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DEGEN_DISTRIBUTOR, AP_DEGEN_NFT, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_MULTI_PAUSE, AP_PARTIAL_LIQUIDATION_BOT, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_ORACLE, AP_ROUTER, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractPriceFeedContract, type AdapterContractType, type AdapterData, AddressLabeller, AddressMap, AddressProviderContractV3, AddressProviderContractV3_1, type AddressProviderV3StateHuman, type Asset, type AssetPriceFeedStateHuman, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerV2VaultAdapterContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, type BaseContractOptions, type BaseContractStateHuman, type BaseParams, type BasePriceFeedStateHuman, type BotAddresses, type BotBaseType, type BotDataPayload, type BotDetailedType, BotListContract, type BotListStateHuman, BotPermissions, BotsService, type BoundedOracleStateHuman, BoundedPriceFeedContract, CamelotV3AdapterContract, ChainlinkPriceFeedContract, type ClaimFarmRewardsProps, type CloseCreditAccountResult, type ClosePathBalances, type CommonResult, CompositePriceFeedContract, type ConnectionOptions, type ContractMethod, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, type CoreStateHuman, type CreditAccountData, type CreditAccountDataSlice, type CreditAccountFilter, CreditAccountsService, type CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV300Contract, CreditConfiguratorV310Contract, type CreditFacadeState, type CreditFacadeStateHuman, CreditFacadeV300Contract, CreditFacadeV310Contract, CreditFactory, type CreditFactoryStateHuman, type CreditManagerData, type CreditManagerDebtParams, type CreditManagerDebtParamsHuman, type CreditManagerState, type CreditManagerStateHuman, CreditManagerV300Contract, CreditManagerV310Contract, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveCryptoPriceFeedContract, type CurvePoolStruct, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1AdapterStableNGContract, DaiUsdsAdapterContract, ERC4626AdapterContract, Erc4626PriceFeedContract, type EtherscanURLParam, type FindClosePathInput, GEARBOX_RISK_CURATORS, GaugeContract, type GaugeParams, type GaugeParamsHuman, type GaugeStakingDataPayload, GaugeStakingService, type GaugeStateHuman, GearStakingContract, type GearStakingV3StateHuman, GearboxSDK, type GearboxStateHuman, type IAdapterContract, type IAddressProviderContract, type IBaseContract, type ILPPriceFeedContract, type ILogger, type IPriceFeedContract, type IPriceOracleContract, type LPPriceFeedStateHuman, LinearModelContract, type LinearModelStateHuman, type LiquidationBotType, type LogFn, MAX_UINT16, MAX_UINT256, MIN_INT96, type MarketData, MarketFactory, MarketRegister, type MarketStateHuman, MellowLRTPriceFeedContract, MellowVaultAdapterContract, type MultiCall, type MultiVote, type MulticallErrorType, type MulticallParameters, type MulticallReturnType, NOT_DEPLOYED, NO_VERSION, type NetworkOptions, type NetworkType, type OnDemandPriceUpdate, type OpenStrategyResult, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PRICE_DECIMALS, PRICE_DECIMALS_POW, type PartialPriceFeedTreeNode, type PathOption, type PathOptionSerie, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, type PermitResult, PoolContract, type PoolData, PoolFactory, type PoolFactoryStateHuman, PoolQuotaKeeperContract, type PoolQuotaKeeperData, type PoolQuotaKeeperStateHuman, type PoolStateHuman, type PriceFeedConstructorArgs, type PriceFeedContractType, type PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, type PriceFeedRegisterHooks, type PriceFeedStateHuman, type PriceFeedTreeNode, type PriceFeedUsageType, type PriceOracleData, PriceOracleV300Contract, PriceOracleV310Contract, type PriceOracleV3StateHuman, Provider, type QuotaParamsHuman, type QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, type RampEvent, type RateKeeperData, type RawTx, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, type RouterCloseResult, type RouterHooks, type RouterResult, RouterV3Contract, SDKConstruct, type SDKHooks, type SDKOptions, SUPPORTED_CHAINS, type SendRawTxParameters, StakingRewardsAdapterContract, type SwapOperation, type SwapTask, type SyncStateOptions, TIMELOCK, type TVL, type TokenMetaData, TokensMeta, type TransportOptions, USDC, UniswapV2AdapterContract, UniswapV3AdapterContract, type UpdatePriceFeedsResult, VelodromeV2RouterAdapterContract, VotingContractStatus, WAD, WAD_DECIMALS_POW, WstETHPriceFeedContract, WstETHV1AdapterContract, YearnPriceFeedContract, YearnV2RouterAdapterContract, type ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, aaveV2WrapperAbi, accountFactoryV3Abi, aclAbi, aclNonReentrantTraitAbi, assetsMap, auraDepositorAbi, auraPathResolverAbi, auraWithdrawerAbi, balancerLpDepositorAbi, balancerLpPathResolverAbi, balancerLpWithdrawerAbi, balancerSwapperAbi, balancerV2VaultAdapterAbi, balancesMap, batchLiquidationEstimatorAbi, batchesChainAbi, botListV3Abi, botPermissionsToString, boundedPriceFeedAbi, bptStablePriceFeedAbi, bptWeightedPriceFeedAbi, bytes32ToString, camelotV3AdapterAbi, camelotV3SwapperAbi, chainlinkReadableAggregatorAbi, chains, childLogger, closePathResolverAbi, compositePriceFeedAbi, compoundV2WrapperAbi, contractsRegisterAbi, controllerTimelockV3Abi, convexDepositorAbi, convexPathResolverAbi, convexV1BaseRewardPoolAdapterAbi, convexV1BoosterAdapterAbi, convexWithdrawerAbi, createAdapter, createRawTx, createTransport, creditConfiguratorV3Abi, creditFacadeV3Abi, creditManagerV3Abi, creditManagerV3UsdtAbi, curveCryptoLpPriceFeedAbi, curveLpDepositorAbi, curveLpPathResolverAbi, curveLpWithdrawerAbi, curveStableLpPriceFeedAbi, curveSwapperAbi, curveUsdPriceFeedAbi, curveV1Adapter2AssetsAbi, curveV1Adapter3AssetsAbi, curveV1Adapter4AssetsAbi, curveV1AdapterDepositAbi, curveV1AdapterStEthAbi, curveV1AdapterStableNgAbi, dataCompressorV3Abi, degenDistributorV3Abi, degenNftv2Abi, detectChain, detectNetwork, erc20Abi, erc4626AdapterAbi, erc4626DepositorAbi, erc4626PathResolverAbi, erc4626PriceFeedAbi, erc4626WithdrawerAbi, errorAbis, etherscanUrl, faucetAbi, filterDust, fmtBinaryMask, formatBN, formatBNvalue, formatBn4dig, formatDuration, formatNumberToString_, gaugeV3Abi, gearStakingV3Abi, getAddressProvider, halfRAY, iAdapterAbi, iAddressProviderV3Abi, iAddressProviderV3_1Abi, iArbTokenAbi, iBalancerStablePoolAbi, iBalancerWeightedPoolAbi, iCamelotV3QuoterAbi, iCreditAccountCompressorAbi, iCreditConfiguratorV310Abi, iCreditFacadeV2Abi, iCreditFacadeV2EventsAbi, iCreditFacadeV2ExceptionsAbi, iCreditFacadeV2ExtendedAbi, iCreditFacadeV2V2Abi, iCreditFacadeV310Abi, iCreditFacadeV310MulticallAbi, iCreditFacadeV3Abi, iCreditFacadeV3EventsAbi, iCreditFacadeV3MulticallAbi, iCreditManagerV310Abi, iCurvePoolAbi, iDaiUsdsAdapterAbi, iDegenNftv2Abi, iDegenNftv2EventsAbi, iDegenNftv2ExceptionsAbi, iExceptionsAbi, iLegacyMintableErc20Abi, iMarketCompressorAbi, iMarketConfiguratorV310Abi, iMellowVaultAbi, iMellowVaultAdapterAbi, iOptimismMintableErc20Abi, iPendleRouterAdapterAbi, iPoolV3Abi, iPoolV3EventsAbi, iPriceFeedAbi, iPriceFeedCompressorAbi, iPriceOracleV310Abi, iPriceOracleV3Abi, iPriceOracleV3EventsAbi, iRedstoneErrorsAbi, iRedstonePriceFeedEventsAbi, iRedstonePriceFeedExceptionsAbi, iRouterV3ErrorsAbi, iStakingRewardsAdapterAbi, iUpdatablePriceFeedAbi, iVersionAbi, iZapperAbi, ierc20Abi, ierc20MetadataAbi, ilpPriceFeedAbi, ilpPriceFeedEventsAbi, ilpPriceFeedExceptionsAbi, inflationAttackBlockerAbi, insolvencyCheckerAbi, iwstEthAbi, iyVaultAbi, json_parse, json_stringify, lidoSwapperAbi, lidoV1AdapterAbi, linearInterestRateModelV3Abi, mellowLrtPriceFeedAbi, multiPauseAbi, numberWithCommas, overrideAggregatorAbi, partialLiquidationBotV3Abi, pendleTWAPPTPriceFeedAbi, percentFmt, poolQuotaKeeperV3Abi, poolV3Abi, poolV3UsdtAbi, priceFeedMultiplierAbi, priceOracleV3Abi, rawTxToMulticallPriceUpdate, redstonePriceFeedAbi, routerV3Abi, sendRawTx, simulateMulticall, susdeOverriderAbi, swapAggregatorAbi, toHumanFormat, tokenStealerAbi, tokenToTicker, underlyingDepositZapperAbi, underlyingFarmingZapperAbi, uniswapV2AdapterAbi, uniswapV2SwapperAbi, uniswapV3AdapterAbi, uniswapV3SwapperAbi, velodromeV2RouterAdapterAbi, velodromeV2SwapperAbi, wethDepositZapperAbi, wethFarmingZapperAbi, wrapAggregatorAbi, wstEthPriceFeedAbi, wstEthSwapperAbi, wstEthv1AdapterAbi, yearnDepositorAbi, yearnPathResolverAbi, yearnPriceFeedAbi, yearnV2AdapterAbi, yearnWithdrawerAbi, zapperRegisterAbi, zeroPriceFeedAbi };
|
|
92170
|
+
export { ADDRESS_0X0, ADDRESS_PROVIDER, ADDRESS_PROVIDER_BLOCK, AP_ACCOUNT_FACTORY, AP_ACL, AP_ADAPTER_COMPRESSOR, AP_BOT_LIST, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DEGEN_DISTRIBUTOR, AP_DEGEN_NFT, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_MULTI_PAUSE, AP_PARTIAL_LIQUIDATION_BOT, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_ORACLE, AP_ROUTER, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractPriceFeedContract, type AdapterContractType, type AdapterData, AddressLabeller, AddressMap, AddressProviderContractV3, AddressProviderContractV3_1, type AddressProviderV3StateHuman, type Asset, type AssetPriceFeedStateHuman, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerV2VaultAdapterContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, type BaseContractOptions, type BaseContractStateHuman, type BaseParams, type BasePriceFeedStateHuman, type BotAddresses, type BotBaseType, type BotDataPayload, type BotDetailedType, BotListContract, type BotListStateHuman, BotPermissions, BotsService, type BoundedOracleStateHuman, BoundedPriceFeedContract, CamelotV3AdapterContract, ChainlinkPriceFeedContract, type ClaimFarmRewardsProps, type CloseCreditAccountResult, type ClosePathBalances, type CommonResult, CompositePriceFeedContract, type ConnectionOptions, type ContractMethod, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, type CoreStateHuman, type CreditAccountData, type CreditAccountDataSlice, type CreditAccountFilter, type CreditAccountServiceOptions, CreditAccountsService, type CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV300Contract, CreditConfiguratorV310Contract, type CreditFacadeState, type CreditFacadeStateHuman, CreditFacadeV300Contract, CreditFacadeV310Contract, CreditFactory, type CreditFactoryStateHuman, type CreditManagerData, type CreditManagerDebtParams, type CreditManagerDebtParamsHuman, type CreditManagerState, type CreditManagerStateHuman, CreditManagerV300Contract, CreditManagerV310Contract, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveCryptoPriceFeedContract, type CurvePoolStruct, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1AdapterStableNGContract, DaiUsdsAdapterContract, ERC4626AdapterContract, Erc4626PriceFeedContract, type EtherscanURLParam, type FindClosePathInput, GEARBOX_RISK_CURATORS, GaugeContract, type GaugeParams, type GaugeParamsHuman, type GaugeStakingDataPayload, GaugeStakingService, type GaugeStateHuman, GearStakingContract, type GearStakingV3StateHuman, GearboxSDK, type GearboxStateHuman, type IAdapterContract, type IAddressProviderContract, type IBaseContract, type ILPPriceFeedContract, type ILogger, type IPriceFeedContract, type IPriceOracleContract, type LPPriceFeedStateHuman, LinearModelContract, type LinearModelStateHuman, type LiquidationBotType, type LogFn, MAX_UINT16, MAX_UINT256, MIN_INT96, type MarketData, MarketFactory, MarketRegister, type MarketStateHuman, MellowLRTPriceFeedContract, MellowVaultAdapterContract, type MultiCall, type MultiVote, type MulticallErrorType, type MulticallParameters, type MulticallReturnType, NOT_DEPLOYED, NO_VERSION, type NetworkOptions, type NetworkType, type OnDemandPriceUpdate, type OpenStrategyResult, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PRICE_DECIMALS, PRICE_DECIMALS_POW, type PartialPriceFeedTreeNode, type PathOption, type PathOptionSerie, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, type PermitResult, PoolContract, type PoolData, PoolFactory, type PoolFactoryStateHuman, PoolQuotaKeeperContract, type PoolQuotaKeeperData, type PoolQuotaKeeperStateHuman, type PoolStateHuman, type PriceFeedConstructorArgs, type PriceFeedContractType, type PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, type PriceFeedRegisterHooks, type PriceFeedStateHuman, type PriceFeedTreeNode, type PriceFeedUsageType, type PriceOracleData, PriceOracleV300Contract, PriceOracleV310Contract, type PriceOracleV3StateHuman, Provider, type QuotaParamsHuman, type QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, type RampEvent, type RateKeeperData, type RawTx, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, type RouterCloseResult, type RouterHooks, type RouterResult, RouterV3Contract, SDKConstruct, type SDKHooks, type SDKOptions, SUPPORTED_CHAINS, type SendRawTxParameters, StakingRewardsAdapterContract, type SwapOperation, type SwapTask, type SyncStateOptions, TIMELOCK, type TVL, type TokenMetaData, TokensMeta, type TransportOptions, USDC, UniswapV2AdapterContract, UniswapV3AdapterContract, type UpdatePriceFeedsResult, VelodromeV2RouterAdapterContract, VotingContractStatus, WAD, WAD_DECIMALS_POW, WstETHPriceFeedContract, WstETHV1AdapterContract, YearnPriceFeedContract, YearnV2RouterAdapterContract, type ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, aaveV2WrapperAbi, accountFactoryV3Abi, aclAbi, aclNonReentrantTraitAbi, assetsMap, auraDepositorAbi, auraPathResolverAbi, auraWithdrawerAbi, balancerLpDepositorAbi, balancerLpPathResolverAbi, balancerLpWithdrawerAbi, balancerSwapperAbi, balancerV2VaultAdapterAbi, balancesMap, batchLiquidationEstimatorAbi, batchesChainAbi, botListV3Abi, botPermissionsToString, boundedPriceFeedAbi, bptStablePriceFeedAbi, bptWeightedPriceFeedAbi, bytes32ToString, camelotV3AdapterAbi, camelotV3SwapperAbi, chainlinkReadableAggregatorAbi, chains, childLogger, closePathResolverAbi, compositePriceFeedAbi, compoundV2WrapperAbi, contractsRegisterAbi, controllerTimelockV3Abi, convexDepositorAbi, convexPathResolverAbi, convexV1BaseRewardPoolAdapterAbi, convexV1BoosterAdapterAbi, convexWithdrawerAbi, createAdapter, createRawTx, createTransport, creditConfiguratorV3Abi, creditFacadeV3Abi, creditManagerV3Abi, creditManagerV3UsdtAbi, curveCryptoLpPriceFeedAbi, curveLpDepositorAbi, curveLpPathResolverAbi, curveLpWithdrawerAbi, curveStableLpPriceFeedAbi, curveSwapperAbi, curveUsdPriceFeedAbi, curveV1Adapter2AssetsAbi, curveV1Adapter3AssetsAbi, curveV1Adapter4AssetsAbi, curveV1AdapterDepositAbi, curveV1AdapterStEthAbi, curveV1AdapterStableNgAbi, dataCompressorV3Abi, degenDistributorV3Abi, degenNftv2Abi, detectChain, detectNetwork, erc20Abi, erc4626AdapterAbi, erc4626DepositorAbi, erc4626PathResolverAbi, erc4626PriceFeedAbi, erc4626WithdrawerAbi, errorAbis, etherscanUrl, faucetAbi, filterDust, fmtBinaryMask, formatBN, formatBNvalue, formatBn4dig, formatDuration, formatNumberToString_, gaugeV3Abi, gearStakingV3Abi, getAddressProvider, halfRAY, iAdapterAbi, iAddressProviderV3Abi, iAddressProviderV3_1Abi, iArbTokenAbi, iBalancerStablePoolAbi, iBalancerWeightedPoolAbi, iCamelotV3QuoterAbi, iCreditAccountCompressorAbi, iCreditConfiguratorV310Abi, iCreditFacadeV2Abi, iCreditFacadeV2EventsAbi, iCreditFacadeV2ExceptionsAbi, iCreditFacadeV2ExtendedAbi, iCreditFacadeV2V2Abi, iCreditFacadeV310Abi, iCreditFacadeV310MulticallAbi, iCreditFacadeV3Abi, iCreditFacadeV3EventsAbi, iCreditFacadeV3MulticallAbi, iCreditManagerV310Abi, iCurvePoolAbi, iDaiUsdsAdapterAbi, iDegenNftv2Abi, iDegenNftv2EventsAbi, iDegenNftv2ExceptionsAbi, iExceptionsAbi, iLegacyMintableErc20Abi, iMarketCompressorAbi, iMarketConfiguratorV310Abi, iMellowVaultAbi, iMellowVaultAdapterAbi, iOptimismMintableErc20Abi, iPendleRouterAdapterAbi, iPoolV3Abi, iPoolV3EventsAbi, iPriceFeedAbi, iPriceFeedCompressorAbi, iPriceOracleV310Abi, iPriceOracleV3Abi, iPriceOracleV3EventsAbi, iRedstoneErrorsAbi, iRedstonePriceFeedEventsAbi, iRedstonePriceFeedExceptionsAbi, iRouterV3ErrorsAbi, iStakingRewardsAdapterAbi, iUpdatablePriceFeedAbi, iVersionAbi, iZapperAbi, ierc20Abi, ierc20MetadataAbi, ilpPriceFeedAbi, ilpPriceFeedEventsAbi, ilpPriceFeedExceptionsAbi, inflationAttackBlockerAbi, insolvencyCheckerAbi, iwstEthAbi, iyVaultAbi, json_parse, json_stringify, lidoSwapperAbi, lidoV1AdapterAbi, linearInterestRateModelV3Abi, mellowLrtPriceFeedAbi, multiPauseAbi, numberWithCommas, overrideAggregatorAbi, partialLiquidationBotV3Abi, pendleTWAPPTPriceFeedAbi, percentFmt, poolQuotaKeeperV3Abi, poolV3Abi, poolV3UsdtAbi, priceFeedMultiplierAbi, priceOracleV3Abi, rawTxToMulticallPriceUpdate, redstonePriceFeedAbi, routerV3Abi, sendRawTx, simulateMulticall, susdeOverriderAbi, swapAggregatorAbi, toHumanFormat, tokenStealerAbi, tokenToTicker, underlyingDepositZapperAbi, underlyingFarmingZapperAbi, uniswapV2AdapterAbi, uniswapV2SwapperAbi, uniswapV3AdapterAbi, uniswapV3SwapperAbi, velodromeV2RouterAdapterAbi, velodromeV2SwapperAbi, wethDepositZapperAbi, wethFarmingZapperAbi, wrapAggregatorAbi, wstEthPriceFeedAbi, wstEthSwapperAbi, wstEthv1AdapterAbi, yearnDepositorAbi, yearnPathResolverAbi, yearnPriceFeedAbi, yearnV2AdapterAbi, yearnWithdrawerAbi, zapperRegisterAbi, zeroPriceFeedAbi };
|
package/dist/esm/sdk/index.mjs
CHANGED
|
@@ -59567,10 +59567,16 @@ var MarketFactory = class extends SDKConstruct {
|
|
|
59567
59567
|
constructor(sdk, marketData) {
|
|
59568
59568
|
super(sdk);
|
|
59569
59569
|
this.state = marketData;
|
|
59570
|
-
|
|
59571
|
-
sdk,
|
|
59570
|
+
let configurator = sdk.contracts.get(
|
|
59572
59571
|
marketData.configurator
|
|
59573
59572
|
);
|
|
59573
|
+
if (!configurator) {
|
|
59574
|
+
configurator = new MarketConfiguratorContract(
|
|
59575
|
+
sdk,
|
|
59576
|
+
marketData.configurator
|
|
59577
|
+
);
|
|
59578
|
+
}
|
|
59579
|
+
this.configurator = configurator;
|
|
59574
59580
|
this.acl = marketData.acl;
|
|
59575
59581
|
const allTokens = [
|
|
59576
59582
|
...marketData.tokens,
|
|
@@ -59973,7 +59979,11 @@ var MarketRegister = class extends SDKConstruct {
|
|
|
59973
59979
|
return this.markets.flatMap((market) => market.creditManagers);
|
|
59974
59980
|
}
|
|
59975
59981
|
get marketConfigurators() {
|
|
59976
|
-
|
|
59982
|
+
const result = /* @__PURE__ */ new Set();
|
|
59983
|
+
for (const m of this.markets) {
|
|
59984
|
+
result.add(m.configurator);
|
|
59985
|
+
}
|
|
59986
|
+
return Array.from(result);
|
|
59977
59987
|
}
|
|
59978
59988
|
findCreditManager(creditManager) {
|
|
59979
59989
|
const addr = creditManager.toLowerCase();
|
|
@@ -60400,11 +60410,13 @@ function assetsMap(assets) {
|
|
|
60400
60410
|
// src/sdk/accounts/CreditAccountsService.ts
|
|
60401
60411
|
var CreditAccountsService = class extends SDKConstruct {
|
|
60402
60412
|
#compressor;
|
|
60403
|
-
|
|
60413
|
+
#batchSize;
|
|
60414
|
+
constructor(sdk, options) {
|
|
60404
60415
|
super(sdk);
|
|
60405
60416
|
this.#compressor = sdk.addressProvider.getLatestVersion(
|
|
60406
60417
|
AP_CREDIT_ACCOUNT_COMPRESSOR
|
|
60407
60418
|
);
|
|
60419
|
+
this.#batchSize = options?.batchSize;
|
|
60408
60420
|
}
|
|
60409
60421
|
/**
|
|
60410
60422
|
* Returns single credit account data, or undefined if it's not found
|
|
@@ -60489,7 +60501,13 @@ var CreditAccountsService = class extends SDKConstruct {
|
|
|
60489
60501
|
let offset = 0n;
|
|
60490
60502
|
do {
|
|
60491
60503
|
const [accounts, newOffset] = await this.#getCreditAccounts(
|
|
60492
|
-
|
|
60504
|
+
this.#batchSize ? [
|
|
60505
|
+
arg0,
|
|
60506
|
+
{ ...caFilter, reverting },
|
|
60507
|
+
offset,
|
|
60508
|
+
BigInt(this.#batchSize)
|
|
60509
|
+
// limit
|
|
60510
|
+
] : [arg0, { ...caFilter, reverting }, offset],
|
|
60493
60511
|
priceUpdateTxs,
|
|
60494
60512
|
options
|
|
60495
60513
|
);
|