@gearbox-protocol/sdk 3.0.0-vfour.107 → 3.0.0-vfour.108
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 +0 -81
- package/dist/cjs/sdk/index.d.ts +1 -55
- package/dist/esm/sdk/index.d.mts +1 -55
- package/dist/esm/sdk/index.mjs +1 -80
- package/package.json +1 -1
package/dist/cjs/sdk/index.cjs
CHANGED
|
@@ -27638,85 +27638,6 @@ var GaugeStakingService = class extends SDKConstruct {
|
|
|
27638
27638
|
};
|
|
27639
27639
|
}
|
|
27640
27640
|
};
|
|
27641
|
-
|
|
27642
|
-
// src/sdk/gauges/utils.ts
|
|
27643
|
-
var GaugeStakingData = class {
|
|
27644
|
-
availableBalance;
|
|
27645
|
-
totalBalance;
|
|
27646
|
-
epoch;
|
|
27647
|
-
withdrawableNow;
|
|
27648
|
-
withdrawableInEpochsTotal;
|
|
27649
|
-
withdrawableInEpochs;
|
|
27650
|
-
voteParams;
|
|
27651
|
-
constructor(payload) {
|
|
27652
|
-
this.availableBalance = payload.availableBalance;
|
|
27653
|
-
this.totalBalance = payload.totalBalance;
|
|
27654
|
-
this.epoch = BigInt(payload.epoch);
|
|
27655
|
-
this.withdrawableNow = payload.withdrawableAmounts.withdrawableNow;
|
|
27656
|
-
const { total, list } = payload.withdrawableAmounts.withdrawableInEpochs.reduce(
|
|
27657
|
-
({ total: total2, list: list2 }, a, i) => {
|
|
27658
|
-
const bn = a;
|
|
27659
|
-
list2.push({ amount: bn, epochsLeft: i + 1 });
|
|
27660
|
-
return { total: total2 + bn, list: list2 };
|
|
27661
|
-
},
|
|
27662
|
-
{ total: 0n, list: [] }
|
|
27663
|
-
);
|
|
27664
|
-
this.withdrawableInEpochsTotal = total;
|
|
27665
|
-
this.withdrawableInEpochs = list;
|
|
27666
|
-
this.voteParams = Object.values(payload.voteParams).reduce((acc, v) => {
|
|
27667
|
-
const gaugeLc = v.gauge.toLowerCase();
|
|
27668
|
-
acc[gaugeLc] = {
|
|
27669
|
-
gauge: gaugeLc,
|
|
27670
|
-
pool: v.pool.toLowerCase(),
|
|
27671
|
-
quotaParams: Object.values(v.quotaParams).reduce((acc2, q) => {
|
|
27672
|
-
const tokenLc = q.token.toLowerCase();
|
|
27673
|
-
acc2[tokenLc] = {
|
|
27674
|
-
token: tokenLc,
|
|
27675
|
-
stakerVotesLpSide: q.stakerVotesLpSide,
|
|
27676
|
-
stakerVotesCaSide: q.stakerVotesCaSide
|
|
27677
|
-
};
|
|
27678
|
-
return acc2;
|
|
27679
|
-
}, {})
|
|
27680
|
-
};
|
|
27681
|
-
return acc;
|
|
27682
|
-
}, {});
|
|
27683
|
-
}
|
|
27684
|
-
};
|
|
27685
|
-
var GaugeData = class {
|
|
27686
|
-
address;
|
|
27687
|
-
pool;
|
|
27688
|
-
poolUnderlying;
|
|
27689
|
-
name;
|
|
27690
|
-
currentEpoch;
|
|
27691
|
-
epochFrozen;
|
|
27692
|
-
quotaParams;
|
|
27693
|
-
constructor(payload) {
|
|
27694
|
-
this.address = payload.addr.toLowerCase();
|
|
27695
|
-
this.pool = payload.pool.toLowerCase();
|
|
27696
|
-
this.poolUnderlying = payload.underlying.toLowerCase();
|
|
27697
|
-
this.name = payload.name;
|
|
27698
|
-
this.currentEpoch = BigInt(payload.currentEpoch);
|
|
27699
|
-
this.epochFrozen = payload.epochFrozen;
|
|
27700
|
-
this.quotaParams = payload.quotaParams.reduce(
|
|
27701
|
-
(acc, q) => {
|
|
27702
|
-
const tokenLc = q.token.toLowerCase();
|
|
27703
|
-
acc[tokenLc] = {
|
|
27704
|
-
token: tokenLc,
|
|
27705
|
-
isActive: q.isActive,
|
|
27706
|
-
rate: BigInt(q.rate) * PERCENTAGE_DECIMALS,
|
|
27707
|
-
minRate: BigInt(q.minRate) * PERCENTAGE_DECIMALS,
|
|
27708
|
-
maxRate: BigInt(q.maxRate) * PERCENTAGE_DECIMALS,
|
|
27709
|
-
totalQuoted: q.totalQuoted,
|
|
27710
|
-
limit: q.limit,
|
|
27711
|
-
totalVotesLpSide: q.totalVotesLpSide,
|
|
27712
|
-
totalVotesCaSide: q.totalVotesCaSide
|
|
27713
|
-
};
|
|
27714
|
-
return acc;
|
|
27715
|
-
},
|
|
27716
|
-
{}
|
|
27717
|
-
);
|
|
27718
|
-
}
|
|
27719
|
-
};
|
|
27720
27641
|
var GearboxSDK = class _GearboxSDK {
|
|
27721
27642
|
#hooks = new Hooks();
|
|
27722
27643
|
// Represents chain object
|
|
@@ -28085,8 +28006,6 @@ exports.CurveV1AdapterStableNGContract = CurveV1AdapterStableNGContract;
|
|
|
28085
28006
|
exports.ERC4626AdapterContract = ERC4626AdapterContract;
|
|
28086
28007
|
exports.Erc4626PriceFeedContract = Erc4626PriceFeedContract;
|
|
28087
28008
|
exports.GaugeContract = GaugeContract;
|
|
28088
|
-
exports.GaugeData = GaugeData;
|
|
28089
|
-
exports.GaugeStakingData = GaugeStakingData;
|
|
28090
28009
|
exports.GaugeStakingService = GaugeStakingService;
|
|
28091
28010
|
exports.GearStakingContract = GearStakingContract;
|
|
28092
28011
|
exports.GearboxSDK = GearboxSDK;
|
package/dist/cjs/sdk/index.d.ts
CHANGED
|
@@ -30785,60 +30785,6 @@ interface GaugeStakingDataPayload {
|
|
|
30785
30785
|
};
|
|
30786
30786
|
voteParams: Record<Address, GaugeVoteInfo>;
|
|
30787
30787
|
}
|
|
30788
|
-
interface WithDrawableGaugeItem {
|
|
30789
|
-
amount: bigint;
|
|
30790
|
-
epochsLeft: number;
|
|
30791
|
-
}
|
|
30792
|
-
declare class GaugeStakingData {
|
|
30793
|
-
readonly availableBalance: bigint;
|
|
30794
|
-
readonly totalBalance: bigint;
|
|
30795
|
-
readonly epoch: bigint;
|
|
30796
|
-
readonly withdrawableNow: bigint;
|
|
30797
|
-
readonly withdrawableInEpochsTotal: bigint;
|
|
30798
|
-
readonly withdrawableInEpochs: Array<WithDrawableGaugeItem>;
|
|
30799
|
-
readonly voteParams: Record<Address, GaugeVoteInfo>;
|
|
30800
|
-
constructor(payload: GaugeStakingDataPayload);
|
|
30801
|
-
}
|
|
30802
|
-
interface GaugeQuotaParams {
|
|
30803
|
-
token: Address;
|
|
30804
|
-
minRate: number;
|
|
30805
|
-
maxRate: number;
|
|
30806
|
-
totalVotesLpSide: bigint;
|
|
30807
|
-
totalVotesCaSide: bigint;
|
|
30808
|
-
rate: number;
|
|
30809
|
-
totalQuoted: bigint;
|
|
30810
|
-
limit: bigint;
|
|
30811
|
-
isActive: boolean;
|
|
30812
|
-
}
|
|
30813
|
-
interface GaugeDataPayload {
|
|
30814
|
-
addr: Address;
|
|
30815
|
-
pool: Address;
|
|
30816
|
-
name: string;
|
|
30817
|
-
underlying: Address;
|
|
30818
|
-
currentEpoch: bigint;
|
|
30819
|
-
epochFrozen: boolean;
|
|
30820
|
-
quotaParams: readonly GaugeQuotaParams[];
|
|
30821
|
-
}
|
|
30822
|
-
declare class GaugeData {
|
|
30823
|
-
readonly address: Address;
|
|
30824
|
-
readonly pool: Address;
|
|
30825
|
-
readonly poolUnderlying: Address;
|
|
30826
|
-
readonly name: string;
|
|
30827
|
-
readonly currentEpoch: bigint;
|
|
30828
|
-
readonly epochFrozen: boolean;
|
|
30829
|
-
readonly quotaParams: Record<Address, {
|
|
30830
|
-
token: Address;
|
|
30831
|
-
minRate: bigint;
|
|
30832
|
-
maxRate: bigint;
|
|
30833
|
-
totalVotesLpSide: bigint;
|
|
30834
|
-
totalVotesCaSide: bigint;
|
|
30835
|
-
rate: bigint;
|
|
30836
|
-
totalQuoted: bigint;
|
|
30837
|
-
limit: bigint;
|
|
30838
|
-
isActive: boolean;
|
|
30839
|
-
}>;
|
|
30840
|
-
constructor(payload: GaugeDataPayload);
|
|
30841
|
-
}
|
|
30842
30788
|
|
|
30843
30789
|
declare class GaugeStakingService extends SDKConstruct {
|
|
30844
30790
|
#private;
|
|
@@ -30880,4 +30826,4 @@ type MulticallErrorType = GetChainContractAddressErrorType | ReadContractErrorTy
|
|
|
30880
30826
|
*/
|
|
30881
30827
|
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>>;
|
|
30882
30828
|
|
|
30883
|
-
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, BotListContract, type BotListStateHuman, BotPermissions, 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, ERC4626AdapterContract, Erc4626PriceFeedContract, type EtherscanURLParam, type FindClosePathInput, GaugeContract,
|
|
30829
|
+
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, BotListContract, type BotListStateHuman, BotPermissions, 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, ERC4626AdapterContract, Erc4626PriceFeedContract, type EtherscanURLParam, type FindClosePathInput, 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 LogFn, MAX_UINT16, MAX_UINT256, MIN_INT96, type MarketData, MarketFactory, MarketRegister, type MarketStateHuman, MellowLRTPriceFeedContract, 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, 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 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, simulateMulticall, toHumanFormat, tokenToTicker };
|
package/dist/esm/sdk/index.d.mts
CHANGED
|
@@ -30785,60 +30785,6 @@ interface GaugeStakingDataPayload {
|
|
|
30785
30785
|
};
|
|
30786
30786
|
voteParams: Record<Address, GaugeVoteInfo>;
|
|
30787
30787
|
}
|
|
30788
|
-
interface WithDrawableGaugeItem {
|
|
30789
|
-
amount: bigint;
|
|
30790
|
-
epochsLeft: number;
|
|
30791
|
-
}
|
|
30792
|
-
declare class GaugeStakingData {
|
|
30793
|
-
readonly availableBalance: bigint;
|
|
30794
|
-
readonly totalBalance: bigint;
|
|
30795
|
-
readonly epoch: bigint;
|
|
30796
|
-
readonly withdrawableNow: bigint;
|
|
30797
|
-
readonly withdrawableInEpochsTotal: bigint;
|
|
30798
|
-
readonly withdrawableInEpochs: Array<WithDrawableGaugeItem>;
|
|
30799
|
-
readonly voteParams: Record<Address, GaugeVoteInfo>;
|
|
30800
|
-
constructor(payload: GaugeStakingDataPayload);
|
|
30801
|
-
}
|
|
30802
|
-
interface GaugeQuotaParams {
|
|
30803
|
-
token: Address;
|
|
30804
|
-
minRate: number;
|
|
30805
|
-
maxRate: number;
|
|
30806
|
-
totalVotesLpSide: bigint;
|
|
30807
|
-
totalVotesCaSide: bigint;
|
|
30808
|
-
rate: number;
|
|
30809
|
-
totalQuoted: bigint;
|
|
30810
|
-
limit: bigint;
|
|
30811
|
-
isActive: boolean;
|
|
30812
|
-
}
|
|
30813
|
-
interface GaugeDataPayload {
|
|
30814
|
-
addr: Address;
|
|
30815
|
-
pool: Address;
|
|
30816
|
-
name: string;
|
|
30817
|
-
underlying: Address;
|
|
30818
|
-
currentEpoch: bigint;
|
|
30819
|
-
epochFrozen: boolean;
|
|
30820
|
-
quotaParams: readonly GaugeQuotaParams[];
|
|
30821
|
-
}
|
|
30822
|
-
declare class GaugeData {
|
|
30823
|
-
readonly address: Address;
|
|
30824
|
-
readonly pool: Address;
|
|
30825
|
-
readonly poolUnderlying: Address;
|
|
30826
|
-
readonly name: string;
|
|
30827
|
-
readonly currentEpoch: bigint;
|
|
30828
|
-
readonly epochFrozen: boolean;
|
|
30829
|
-
readonly quotaParams: Record<Address, {
|
|
30830
|
-
token: Address;
|
|
30831
|
-
minRate: bigint;
|
|
30832
|
-
maxRate: bigint;
|
|
30833
|
-
totalVotesLpSide: bigint;
|
|
30834
|
-
totalVotesCaSide: bigint;
|
|
30835
|
-
rate: bigint;
|
|
30836
|
-
totalQuoted: bigint;
|
|
30837
|
-
limit: bigint;
|
|
30838
|
-
isActive: boolean;
|
|
30839
|
-
}>;
|
|
30840
|
-
constructor(payload: GaugeDataPayload);
|
|
30841
|
-
}
|
|
30842
30788
|
|
|
30843
30789
|
declare class GaugeStakingService extends SDKConstruct {
|
|
30844
30790
|
#private;
|
|
@@ -30880,4 +30826,4 @@ type MulticallErrorType = GetChainContractAddressErrorType | ReadContractErrorTy
|
|
|
30880
30826
|
*/
|
|
30881
30827
|
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>>;
|
|
30882
30828
|
|
|
30883
|
-
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, BotListContract, type BotListStateHuman, BotPermissions, 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, ERC4626AdapterContract, Erc4626PriceFeedContract, type EtherscanURLParam, type FindClosePathInput, GaugeContract,
|
|
30829
|
+
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, BotListContract, type BotListStateHuman, BotPermissions, 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, ERC4626AdapterContract, Erc4626PriceFeedContract, type EtherscanURLParam, type FindClosePathInput, 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 LogFn, MAX_UINT16, MAX_UINT256, MIN_INT96, type MarketData, MarketFactory, MarketRegister, type MarketStateHuman, MellowLRTPriceFeedContract, 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, 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 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, simulateMulticall, toHumanFormat, tokenToTicker };
|
package/dist/esm/sdk/index.mjs
CHANGED
|
@@ -27636,85 +27636,6 @@ var GaugeStakingService = class extends SDKConstruct {
|
|
|
27636
27636
|
};
|
|
27637
27637
|
}
|
|
27638
27638
|
};
|
|
27639
|
-
|
|
27640
|
-
// src/sdk/gauges/utils.ts
|
|
27641
|
-
var GaugeStakingData = class {
|
|
27642
|
-
availableBalance;
|
|
27643
|
-
totalBalance;
|
|
27644
|
-
epoch;
|
|
27645
|
-
withdrawableNow;
|
|
27646
|
-
withdrawableInEpochsTotal;
|
|
27647
|
-
withdrawableInEpochs;
|
|
27648
|
-
voteParams;
|
|
27649
|
-
constructor(payload) {
|
|
27650
|
-
this.availableBalance = payload.availableBalance;
|
|
27651
|
-
this.totalBalance = payload.totalBalance;
|
|
27652
|
-
this.epoch = BigInt(payload.epoch);
|
|
27653
|
-
this.withdrawableNow = payload.withdrawableAmounts.withdrawableNow;
|
|
27654
|
-
const { total, list } = payload.withdrawableAmounts.withdrawableInEpochs.reduce(
|
|
27655
|
-
({ total: total2, list: list2 }, a, i) => {
|
|
27656
|
-
const bn = a;
|
|
27657
|
-
list2.push({ amount: bn, epochsLeft: i + 1 });
|
|
27658
|
-
return { total: total2 + bn, list: list2 };
|
|
27659
|
-
},
|
|
27660
|
-
{ total: 0n, list: [] }
|
|
27661
|
-
);
|
|
27662
|
-
this.withdrawableInEpochsTotal = total;
|
|
27663
|
-
this.withdrawableInEpochs = list;
|
|
27664
|
-
this.voteParams = Object.values(payload.voteParams).reduce((acc, v) => {
|
|
27665
|
-
const gaugeLc = v.gauge.toLowerCase();
|
|
27666
|
-
acc[gaugeLc] = {
|
|
27667
|
-
gauge: gaugeLc,
|
|
27668
|
-
pool: v.pool.toLowerCase(),
|
|
27669
|
-
quotaParams: Object.values(v.quotaParams).reduce((acc2, q) => {
|
|
27670
|
-
const tokenLc = q.token.toLowerCase();
|
|
27671
|
-
acc2[tokenLc] = {
|
|
27672
|
-
token: tokenLc,
|
|
27673
|
-
stakerVotesLpSide: q.stakerVotesLpSide,
|
|
27674
|
-
stakerVotesCaSide: q.stakerVotesCaSide
|
|
27675
|
-
};
|
|
27676
|
-
return acc2;
|
|
27677
|
-
}, {})
|
|
27678
|
-
};
|
|
27679
|
-
return acc;
|
|
27680
|
-
}, {});
|
|
27681
|
-
}
|
|
27682
|
-
};
|
|
27683
|
-
var GaugeData = class {
|
|
27684
|
-
address;
|
|
27685
|
-
pool;
|
|
27686
|
-
poolUnderlying;
|
|
27687
|
-
name;
|
|
27688
|
-
currentEpoch;
|
|
27689
|
-
epochFrozen;
|
|
27690
|
-
quotaParams;
|
|
27691
|
-
constructor(payload) {
|
|
27692
|
-
this.address = payload.addr.toLowerCase();
|
|
27693
|
-
this.pool = payload.pool.toLowerCase();
|
|
27694
|
-
this.poolUnderlying = payload.underlying.toLowerCase();
|
|
27695
|
-
this.name = payload.name;
|
|
27696
|
-
this.currentEpoch = BigInt(payload.currentEpoch);
|
|
27697
|
-
this.epochFrozen = payload.epochFrozen;
|
|
27698
|
-
this.quotaParams = payload.quotaParams.reduce(
|
|
27699
|
-
(acc, q) => {
|
|
27700
|
-
const tokenLc = q.token.toLowerCase();
|
|
27701
|
-
acc[tokenLc] = {
|
|
27702
|
-
token: tokenLc,
|
|
27703
|
-
isActive: q.isActive,
|
|
27704
|
-
rate: BigInt(q.rate) * PERCENTAGE_DECIMALS,
|
|
27705
|
-
minRate: BigInt(q.minRate) * PERCENTAGE_DECIMALS,
|
|
27706
|
-
maxRate: BigInt(q.maxRate) * PERCENTAGE_DECIMALS,
|
|
27707
|
-
totalQuoted: q.totalQuoted,
|
|
27708
|
-
limit: q.limit,
|
|
27709
|
-
totalVotesLpSide: q.totalVotesLpSide,
|
|
27710
|
-
totalVotesCaSide: q.totalVotesCaSide
|
|
27711
|
-
};
|
|
27712
|
-
return acc;
|
|
27713
|
-
},
|
|
27714
|
-
{}
|
|
27715
|
-
);
|
|
27716
|
-
}
|
|
27717
|
-
};
|
|
27718
27639
|
var GearboxSDK = class _GearboxSDK {
|
|
27719
27640
|
#hooks = new Hooks();
|
|
27720
27641
|
// Represents chain object
|
|
@@ -28015,4 +27936,4 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
28015
27936
|
}
|
|
28016
27937
|
};
|
|
28017
27938
|
|
|
28018
|
-
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, AddressLabeller, AddressMap, AddressProviderContractV3_1, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerV2VaultAdapterContract, BalancerWeightedPriceFeedContract, BaseContract, BotListContract, BotPermissions, BoundedPriceFeedContract, CamelotV3AdapterContract, ChainlinkPriceFeedContract, CompositePriceFeedContract, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, CreditAccountsService, CreditConfiguratorV300Contract, CreditConfiguratorV310Contract, CreditFacadeV300Contract, CreditFacadeV310Contract, CreditFactory, CreditManagerV300Contract, CreditManagerV310Contract, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1AdapterStableNGContract, ERC4626AdapterContract, Erc4626PriceFeedContract, GaugeContract,
|
|
27939
|
+
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, AddressLabeller, AddressMap, AddressProviderContractV3_1, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerV2VaultAdapterContract, BalancerWeightedPriceFeedContract, BaseContract, BotListContract, BotPermissions, BoundedPriceFeedContract, CamelotV3AdapterContract, ChainlinkPriceFeedContract, CompositePriceFeedContract, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, CreditAccountsService, CreditConfiguratorV300Contract, CreditConfiguratorV310Contract, CreditFacadeV300Contract, CreditFacadeV310Contract, CreditFactory, CreditManagerV300Contract, CreditManagerV310Contract, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1AdapterStableNGContract, ERC4626AdapterContract, Erc4626PriceFeedContract, GaugeContract, GaugeStakingService, GearStakingContract, GearboxSDK, LinearModelContract, MAX_UINT16, MAX_UINT256, MIN_INT96, MarketFactory, MarketRegister, MellowLRTPriceFeedContract, NOT_DEPLOYED, NO_VERSION, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PRICE_DECIMALS, PRICE_DECIMALS_POW, PoolContract, PoolFactory, PoolQuotaKeeperContract, PriceFeedRef, PriceFeedRegister, PriceOracleV300Contract, PriceOracleV310Contract, Provider, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RedstonePriceFeedContract, RouterV3Contract, SDKConstruct, SUPPORTED_CHAINS, TIMELOCK, TokensMeta, USDC, UniswapV2AdapterContract, UniswapV3AdapterContract, VelodromeV2RouterAdapterContract, VotingContractStatus, WAD, WAD_DECIMALS_POW, WstETHPriceFeedContract, WstETHV1AdapterContract, YearnPriceFeedContract, YearnV2RouterAdapterContract, 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, simulateMulticall, toHumanFormat, tokenToTicker };
|