@gearbox-protocol/sdk 3.0.0-vfour.115 → 3.0.0-vfour.116

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.
@@ -26835,6 +26835,15 @@ var AbstractLPPriceFeedContract = class _AbstractLPPriceFeedContract extends Abs
26835
26835
  static toLowerBound(value) {
26836
26836
  return value * LOWER_BOUND_FACTOR / 100n;
26837
26837
  }
26838
+ stateHuman(raw) {
26839
+ return {
26840
+ ...super.stateHuman(raw),
26841
+ lpContract: this.lpContract,
26842
+ lpToken: this.lpToken,
26843
+ lowerBound: this.lowerBound,
26844
+ upperBound: this.upperBound
26845
+ };
26846
+ }
26838
26847
  };
26839
26848
 
26840
26849
  // src/sdk/market/pricefeeds/BalancerStablePriceFeed.ts
@@ -26854,15 +26863,32 @@ var BalancerStablePriceFeedContract = class extends AbstractLPPriceFeedContract
26854
26863
  });
26855
26864
  }
26856
26865
  };
26857
-
26858
- // src/sdk/market/pricefeeds/BalancerWeightedPriceFeed.ts
26859
26866
  var BalancerWeightedPriceFeedContract = class extends AbstractLPPriceFeedContract {
26867
+ vault;
26868
+ poolId;
26869
+ weights;
26860
26870
  constructor(sdk, args) {
26871
+ const decoded = viem.decodeAbiParameters(
26872
+ [
26873
+ { type: "bytes", name: "superParams" },
26874
+ { type: "address", name: "vault" },
26875
+ { type: "address", name: "poolId" },
26876
+ { type: "uint256[8]", name: "weights" }
26877
+ ],
26878
+ viem.hexToBytes(args.baseParams.serializedParams)
26879
+ );
26861
26880
  super(sdk, {
26862
26881
  ...args,
26882
+ baseParams: {
26883
+ ...args.baseParams,
26884
+ serializedParams: decoded[0]
26885
+ },
26863
26886
  name: "BalancerWeighedPriceFeed",
26864
26887
  abi: bptWeightedPriceFeedAbi
26865
26888
  });
26889
+ this.vault = decoded[1];
26890
+ this.poolId = decoded[2];
26891
+ this.weights = decoded[3];
26866
26892
  }
26867
26893
  async getValue() {
26868
26894
  return await this.sdk.provider.publicClient.readContract({
@@ -26871,6 +26897,15 @@ var BalancerWeightedPriceFeedContract = class extends AbstractLPPriceFeedContrac
26871
26897
  functionName: "getRate"
26872
26898
  });
26873
26899
  }
26900
+ stateHuman(raw) {
26901
+ return {
26902
+ ...super.stateHuman(raw),
26903
+ contractType: "PF_BALANCER_WEIGHTED_LP_ORACLE",
26904
+ vault: this.vault,
26905
+ poolId: this.poolId,
26906
+ weights: [...this.weights]
26907
+ };
26908
+ }
26874
26909
  };
26875
26910
  var BoundedPriceFeedContract = class extends AbstractPriceFeedContract {
26876
26911
  upperBound;
@@ -25030,6 +25030,7 @@ declare abstract class AbstractLPPriceFeedContract<const abi extends Abi | reado
25030
25030
  abstract getValue(): Promise<bigint>;
25031
25031
  getLowerBound(): Promise<bigint>;
25032
25032
  static toLowerBound(value: bigint): bigint;
25033
+ stateHuman(raw?: boolean): UnionOmit<LPPriceFeedStateHuman, "stalenessPeriod">;
25033
25034
  }
25034
25035
 
25035
25036
  type abi$t = typeof bptStablePriceFeedAbi;
@@ -25040,8 +25041,21 @@ declare class BalancerStablePriceFeedContract extends AbstractLPPriceFeedContrac
25040
25041
 
25041
25042
  type abi$s = typeof bptWeightedPriceFeedAbi;
25042
25043
  declare class BalancerWeightedPriceFeedContract extends AbstractLPPriceFeedContract<abi$s> {
25044
+ readonly vault: Address;
25045
+ readonly poolId: Address;
25046
+ readonly weights: readonly [
25047
+ bigint,
25048
+ bigint,
25049
+ bigint,
25050
+ bigint,
25051
+ bigint,
25052
+ bigint,
25053
+ bigint,
25054
+ bigint
25055
+ ];
25043
25056
  constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
25044
25057
  getValue(): Promise<bigint>;
25058
+ stateHuman(raw?: boolean): UnionOmit<BalancerWeightedPriceFeedStateHuman, "stalenessPeriod">;
25045
25059
  }
25046
25060
 
25047
25061
  type abi$r = typeof boundedPriceFeedAbi;
@@ -31540,7 +31554,7 @@ interface CoreStateHuman {
31540
31554
  botList: BotListStateHuman;
31541
31555
  gearStakingV3: GearStakingV3StateHuman;
31542
31556
  }
31543
- type PriceFeedStateHuman = BoundedOracleStateHuman | AssetPriceFeedStateHuman | RedstonePriceFeedStateHuman;
31557
+ type PriceFeedStateHuman = BoundedOracleStateHuman | AssetPriceFeedStateHuman | RedstonePriceFeedStateHuman | LPPriceFeedStateHuman | BalancerWeightedPriceFeedStateHuman;
31544
31558
  interface BasePriceFeedStateHuman extends BaseContractStateHuman {
31545
31559
  stalenessPeriod: string;
31546
31560
  skipCheck: boolean;
@@ -31554,6 +31568,19 @@ interface BoundedOracleStateHuman extends BasePriceFeedStateHuman {
31554
31568
  interface AssetPriceFeedStateHuman extends BasePriceFeedStateHuman {
31555
31569
  contractType: PriceFeedContractType;
31556
31570
  }
31571
+ interface LPPriceFeedStateHuman extends BasePriceFeedStateHuman {
31572
+ contractType: PriceFeedContractType;
31573
+ lpContract: Address;
31574
+ lpToken: Address;
31575
+ lowerBound: bigint;
31576
+ upperBound: bigint;
31577
+ }
31578
+ interface BalancerWeightedPriceFeedStateHuman extends LPPriceFeedStateHuman {
31579
+ contractType: "PF_BALANCER_WEIGHTED_LP_ORACLE";
31580
+ vault: Address;
31581
+ poolId: Address;
31582
+ weights: [bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint];
31583
+ }
31557
31584
  interface RedstonePriceFeedStateHuman extends BasePriceFeedStateHuman {
31558
31585
  contractType: "PF_REDSTONE_ORACLE";
31559
31586
  dataId: string;
@@ -32497,4 +32524,4 @@ type MulticallErrorType = GetChainContractAddressErrorType | ReadContractErrorTy
32497
32524
  */
32498
32525
  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>>;
32499
32526
 
32500
- 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_1, type AddressProviderV3StateHuman, type Asset, type AssetPriceFeedStateHuman, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerV2VaultAdapterContract, BalancerWeightedPriceFeedContract, 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 IBaseContract, type ILPPriceFeedContract, type ILogger, type IPriceFeedContract, type IPriceOracleContract, 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, assetsMap, balancesMap, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createRawTx, createTransport, detectNetwork, etherscanUrl, filterDust, fmtBinaryMask, formatBN, formatBNvalue, formatBn4dig, formatDuration, formatNumberToString_, halfRAY, json_parse, json_stringify, numberWithCommas, percentFmt, rawTxToMulticallPriceUpdate, sendRawTx, simulateMulticall, toHumanFormat, tokenToTicker };
32527
+ 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_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 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, assetsMap, balancesMap, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createRawTx, createTransport, detectNetwork, etherscanUrl, filterDust, fmtBinaryMask, formatBN, formatBNvalue, formatBn4dig, formatDuration, formatNumberToString_, halfRAY, json_parse, json_stringify, numberWithCommas, percentFmt, rawTxToMulticallPriceUpdate, sendRawTx, simulateMulticall, toHumanFormat, tokenToTicker };
@@ -25030,6 +25030,7 @@ declare abstract class AbstractLPPriceFeedContract<const abi extends Abi | reado
25030
25030
  abstract getValue(): Promise<bigint>;
25031
25031
  getLowerBound(): Promise<bigint>;
25032
25032
  static toLowerBound(value: bigint): bigint;
25033
+ stateHuman(raw?: boolean): UnionOmit<LPPriceFeedStateHuman, "stalenessPeriod">;
25033
25034
  }
25034
25035
 
25035
25036
  type abi$t = typeof bptStablePriceFeedAbi;
@@ -25040,8 +25041,21 @@ declare class BalancerStablePriceFeedContract extends AbstractLPPriceFeedContrac
25040
25041
 
25041
25042
  type abi$s = typeof bptWeightedPriceFeedAbi;
25042
25043
  declare class BalancerWeightedPriceFeedContract extends AbstractLPPriceFeedContract<abi$s> {
25044
+ readonly vault: Address;
25045
+ readonly poolId: Address;
25046
+ readonly weights: readonly [
25047
+ bigint,
25048
+ bigint,
25049
+ bigint,
25050
+ bigint,
25051
+ bigint,
25052
+ bigint,
25053
+ bigint,
25054
+ bigint
25055
+ ];
25043
25056
  constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
25044
25057
  getValue(): Promise<bigint>;
25058
+ stateHuman(raw?: boolean): UnionOmit<BalancerWeightedPriceFeedStateHuman, "stalenessPeriod">;
25045
25059
  }
25046
25060
 
25047
25061
  type abi$r = typeof boundedPriceFeedAbi;
@@ -31540,7 +31554,7 @@ interface CoreStateHuman {
31540
31554
  botList: BotListStateHuman;
31541
31555
  gearStakingV3: GearStakingV3StateHuman;
31542
31556
  }
31543
- type PriceFeedStateHuman = BoundedOracleStateHuman | AssetPriceFeedStateHuman | RedstonePriceFeedStateHuman;
31557
+ type PriceFeedStateHuman = BoundedOracleStateHuman | AssetPriceFeedStateHuman | RedstonePriceFeedStateHuman | LPPriceFeedStateHuman | BalancerWeightedPriceFeedStateHuman;
31544
31558
  interface BasePriceFeedStateHuman extends BaseContractStateHuman {
31545
31559
  stalenessPeriod: string;
31546
31560
  skipCheck: boolean;
@@ -31554,6 +31568,19 @@ interface BoundedOracleStateHuman extends BasePriceFeedStateHuman {
31554
31568
  interface AssetPriceFeedStateHuman extends BasePriceFeedStateHuman {
31555
31569
  contractType: PriceFeedContractType;
31556
31570
  }
31571
+ interface LPPriceFeedStateHuman extends BasePriceFeedStateHuman {
31572
+ contractType: PriceFeedContractType;
31573
+ lpContract: Address;
31574
+ lpToken: Address;
31575
+ lowerBound: bigint;
31576
+ upperBound: bigint;
31577
+ }
31578
+ interface BalancerWeightedPriceFeedStateHuman extends LPPriceFeedStateHuman {
31579
+ contractType: "PF_BALANCER_WEIGHTED_LP_ORACLE";
31580
+ vault: Address;
31581
+ poolId: Address;
31582
+ weights: [bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint];
31583
+ }
31557
31584
  interface RedstonePriceFeedStateHuman extends BasePriceFeedStateHuman {
31558
31585
  contractType: "PF_REDSTONE_ORACLE";
31559
31586
  dataId: string;
@@ -32497,4 +32524,4 @@ type MulticallErrorType = GetChainContractAddressErrorType | ReadContractErrorTy
32497
32524
  */
32498
32525
  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>>;
32499
32526
 
32500
- 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_1, type AddressProviderV3StateHuman, type Asset, type AssetPriceFeedStateHuman, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerV2VaultAdapterContract, BalancerWeightedPriceFeedContract, 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 IBaseContract, type ILPPriceFeedContract, type ILogger, type IPriceFeedContract, type IPriceOracleContract, 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, assetsMap, balancesMap, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createRawTx, createTransport, detectNetwork, etherscanUrl, filterDust, fmtBinaryMask, formatBN, formatBNvalue, formatBn4dig, formatDuration, formatNumberToString_, halfRAY, json_parse, json_stringify, numberWithCommas, percentFmt, rawTxToMulticallPriceUpdate, sendRawTx, simulateMulticall, toHumanFormat, tokenToTicker };
32527
+ 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_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 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, assetsMap, balancesMap, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createRawTx, createTransport, detectNetwork, etherscanUrl, filterDust, fmtBinaryMask, formatBN, formatBNvalue, formatBn4dig, formatDuration, formatNumberToString_, halfRAY, json_parse, json_stringify, numberWithCommas, percentFmt, rawTxToMulticallPriceUpdate, sendRawTx, simulateMulticall, toHumanFormat, tokenToTicker };
@@ -1,4 +1,4 @@
1
- import { getAddress, bytesToString, toBytes, prepareEncodeFunctionData, encodeAbiParameters, concatHex, getContract, isHex, decodeFunctionData, encodeFunctionData, decodeAbiParameters, erc4626Abi, multicall3Abi, getChainContractAddress, http, fallback, defineChain, createPublicClient, getContractError, AbiDecodingZeroDataError, RawContractError, decodeFunctionResult, BaseError, parseEventLogs, hexToBytes } from 'viem';
1
+ import { getAddress, bytesToString, toBytes, prepareEncodeFunctionData, encodeAbiParameters, concatHex, getContract, isHex, decodeFunctionData, encodeFunctionData, decodeAbiParameters, hexToBytes, erc4626Abi, multicall3Abi, getChainContractAddress, http, fallback, defineChain, createPublicClient, getContractError, AbiDecodingZeroDataError, RawContractError, decodeFunctionResult, BaseError, parseEventLogs } from 'viem';
2
2
  import { formatAbiItem, getAction } from 'viem/utils';
3
3
  import { intervalToDuration, formatDuration as formatDuration$1 } from 'date-fns';
4
4
  import { DataServiceWrapper } from '@redstone-finance/evm-connector';
@@ -26833,6 +26833,15 @@ var AbstractLPPriceFeedContract = class _AbstractLPPriceFeedContract extends Abs
26833
26833
  static toLowerBound(value) {
26834
26834
  return value * LOWER_BOUND_FACTOR / 100n;
26835
26835
  }
26836
+ stateHuman(raw) {
26837
+ return {
26838
+ ...super.stateHuman(raw),
26839
+ lpContract: this.lpContract,
26840
+ lpToken: this.lpToken,
26841
+ lowerBound: this.lowerBound,
26842
+ upperBound: this.upperBound
26843
+ };
26844
+ }
26836
26845
  };
26837
26846
 
26838
26847
  // src/sdk/market/pricefeeds/BalancerStablePriceFeed.ts
@@ -26852,15 +26861,32 @@ var BalancerStablePriceFeedContract = class extends AbstractLPPriceFeedContract
26852
26861
  });
26853
26862
  }
26854
26863
  };
26855
-
26856
- // src/sdk/market/pricefeeds/BalancerWeightedPriceFeed.ts
26857
26864
  var BalancerWeightedPriceFeedContract = class extends AbstractLPPriceFeedContract {
26865
+ vault;
26866
+ poolId;
26867
+ weights;
26858
26868
  constructor(sdk, args) {
26869
+ const decoded = decodeAbiParameters(
26870
+ [
26871
+ { type: "bytes", name: "superParams" },
26872
+ { type: "address", name: "vault" },
26873
+ { type: "address", name: "poolId" },
26874
+ { type: "uint256[8]", name: "weights" }
26875
+ ],
26876
+ hexToBytes(args.baseParams.serializedParams)
26877
+ );
26859
26878
  super(sdk, {
26860
26879
  ...args,
26880
+ baseParams: {
26881
+ ...args.baseParams,
26882
+ serializedParams: decoded[0]
26883
+ },
26861
26884
  name: "BalancerWeighedPriceFeed",
26862
26885
  abi: bptWeightedPriceFeedAbi
26863
26886
  });
26887
+ this.vault = decoded[1];
26888
+ this.poolId = decoded[2];
26889
+ this.weights = decoded[3];
26864
26890
  }
26865
26891
  async getValue() {
26866
26892
  return await this.sdk.provider.publicClient.readContract({
@@ -26869,6 +26895,15 @@ var BalancerWeightedPriceFeedContract = class extends AbstractLPPriceFeedContrac
26869
26895
  functionName: "getRate"
26870
26896
  });
26871
26897
  }
26898
+ stateHuman(raw) {
26899
+ return {
26900
+ ...super.stateHuman(raw),
26901
+ contractType: "PF_BALANCER_WEIGHTED_LP_ORACLE",
26902
+ vault: this.vault,
26903
+ poolId: this.poolId,
26904
+ weights: [...this.weights]
26905
+ };
26906
+ }
26872
26907
  };
26873
26908
  var BoundedPriceFeedContract = class extends AbstractPriceFeedContract {
26874
26909
  upperBound;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "3.0.0-vfour.115",
3
+ "version": "3.0.0-vfour.116",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.cjs",
@@ -47,9 +47,9 @@
47
47
  "typecheck:ci": "tsc --noEmit"
48
48
  },
49
49
  "dependencies": {
50
- "@gearbox-protocol/sdk-gov": "^2.28.0",
50
+ "@gearbox-protocol/sdk-gov": "^2.32.0",
51
51
  "@redstone-finance/evm-connector": "^0.6.2",
52
- "abitype": "^1.0.6",
52
+ "abitype": "^1.0.7",
53
53
  "date-fns": "^4.1.0",
54
54
  "redstone-protocol": "^1.0.5",
55
55
  "viem": ">=2.21.0 <3.0.0"
@@ -64,7 +64,7 @@
64
64
  "lint-staged": "^15.2.10",
65
65
  "pino": "^9.5.0",
66
66
  "pino-pretty": "^13.0.0",
67
- "prettier": "^3.3.3",
67
+ "prettier": "^3.4.2",
68
68
  "tsup": "^8.3.5",
69
69
  "tsx": "^4.19.2",
70
70
  "typescript": "^5.7.2"