@whetstone-research/doppler-sdk 1.0.32 → 1.0.33
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/evm/index.cjs +173 -60
- package/dist/evm/index.cjs.map +1 -1
- package/dist/evm/index.d.cts +25 -6
- package/dist/evm/index.d.ts +25 -6
- package/dist/evm/index.js +173 -60
- package/dist/evm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/evm/index.d.cts
CHANGED
|
@@ -731,10 +731,6 @@ type RehypeBuybackDestinationConfig = {
|
|
|
731
731
|
};
|
|
732
732
|
type RehypeFeeBeneficiariesConfig = {
|
|
733
733
|
buybackDestination?: never;
|
|
734
|
-
/**
|
|
735
|
-
* TODO(PR #170): TEMPORARY Base Sepolia-only deployment support. Remove this
|
|
736
|
-
* notice by reverting the dedicated compatibility commit after rollout.
|
|
737
|
-
*/
|
|
738
734
|
feeBeneficiaries: [BeneficiaryData, ...BeneficiaryData[]];
|
|
739
735
|
feeRoutingMode?: RehypeFeeRoutingMode.RouteToBeneficiaryFees | 'routeToBeneficiaryFees';
|
|
740
736
|
};
|
|
@@ -1361,6 +1357,25 @@ declare class MulticurvePool {
|
|
|
1361
1357
|
getFeeSchedule(): Promise<MulticurveDecayFeeSchedule | null>;
|
|
1362
1358
|
}
|
|
1363
1359
|
|
|
1360
|
+
type RehypePendingFees = {
|
|
1361
|
+
readonly mode: 'feesManager';
|
|
1362
|
+
readonly fees0: bigint;
|
|
1363
|
+
readonly fees1: bigint;
|
|
1364
|
+
} | {
|
|
1365
|
+
readonly mode: 'unsupported';
|
|
1366
|
+
readonly fees0: 0n;
|
|
1367
|
+
readonly fees1: 0n;
|
|
1368
|
+
} | {
|
|
1369
|
+
readonly mode: 'notConfigured';
|
|
1370
|
+
readonly fees0: 0n;
|
|
1371
|
+
readonly fees1: 0n;
|
|
1372
|
+
};
|
|
1373
|
+
interface MulticurveTokenPendingFeeBreakdown {
|
|
1374
|
+
readonly tokenAddress: Address;
|
|
1375
|
+
readonly poolInitializerFees: MulticurvePendingFees;
|
|
1376
|
+
readonly rehypeFees: RehypePendingFees;
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1364
1379
|
interface MulticurveFeesOptions {
|
|
1365
1380
|
readonly tokenBatchSize?: number;
|
|
1366
1381
|
}
|
|
@@ -1373,6 +1388,10 @@ declare class MulticurveFees {
|
|
|
1373
1388
|
getPendingFees(beneficiary: Address, options: MulticurveFeesOptions): Promise<readonly MulticurveTokenPendingFees[]>;
|
|
1374
1389
|
getPendingFees(beneficiary: Address, tokenAddresses: readonly Address[]): Promise<readonly MulticurveTokenPendingFees[]>;
|
|
1375
1390
|
getPendingFees(beneficiary: Address, tokenAddresses: readonly Address[], options: MulticurveFeesOptions): Promise<readonly MulticurveTokenPendingFees[]>;
|
|
1391
|
+
getPendingFeeBreakdown(beneficiary: Address): Promise<readonly MulticurveTokenPendingFeeBreakdown[]>;
|
|
1392
|
+
getPendingFeeBreakdown(beneficiary: Address, options: MulticurveFeesOptions): Promise<readonly MulticurveTokenPendingFeeBreakdown[]>;
|
|
1393
|
+
getPendingFeeBreakdown(beneficiary: Address, tokenAddresses: readonly Address[]): Promise<readonly MulticurveTokenPendingFeeBreakdown[]>;
|
|
1394
|
+
getPendingFeeBreakdown(beneficiary: Address, tokenAddresses: readonly Address[], options: MulticurveFeesOptions): Promise<readonly MulticurveTokenPendingFeeBreakdown[]>;
|
|
1376
1395
|
}
|
|
1377
1396
|
|
|
1378
1397
|
interface RehypeFeeSchedule {
|
|
@@ -3822,7 +3841,7 @@ type NormalizedBeneficiaryConfig = NormalizedCommonConfig & {
|
|
|
3822
3841
|
type NormalizedRehypeDopplerHookInitializerConfig = NormalizedBuybackConfig | NormalizedBeneficiaryConfig;
|
|
3823
3842
|
declare function normalizeRehypeDopplerHookInitializerConfig(config: RehypeDopplerHookInitializerConfig): NormalizedRehypeDopplerHookInitializerConfig;
|
|
3824
3843
|
|
|
3825
|
-
declare function encodeRehypeDopplerHookInitializerData(numeraire: Address, config: NormalizedRehypeDopplerHookInitializerConfig
|
|
3844
|
+
declare function encodeRehypeDopplerHookInitializerData(numeraire: Address, config: NormalizedRehypeDopplerHookInitializerConfig): Hex;
|
|
3826
3845
|
|
|
3827
3846
|
declare function encodeRehypeDopplerHookMigratorCalldata(params: {
|
|
3828
3847
|
numeraire: Address;
|
|
@@ -12191,4 +12210,4 @@ declare const rehypeDopplerHookMigratorAbi: readonly [{
|
|
|
12191
12210
|
|
|
12192
12211
|
declare const VERSION = "1.0.0";
|
|
12193
12212
|
|
|
12194
|
-
export { ADDRESSES, BASIS_POINTS, type BaseAuctionBuilder, type BeneficiaryData, CHAIN_IDS, type ChainAddresses, type CreateDynamicAuctionParams, type CreateMulticurveParams, type CreateOpeningAuctionParams, type CreateParams, type CreateStaticAuctionParams, DAY_SECONDS, DEAD_ADDRESS, DECAY_MAX_START_FEE, DEFAULT_AIRLOCK_BENEFICIARY_SHARES, DEFAULT_AUCTION_DURATION, DEFAULT_EPOCH_LENGTH, DEFAULT_LOCK_DURATION, DEFAULT_MULTICURVE_LOWER_TICKS, DEFAULT_MULTICURVE_MAX_SUPPLY_SHARES, DEFAULT_MULTICURVE_NUM_POSITIONS, DEFAULT_MULTICURVE_UPPER_TICKS, DEFAULT_OPENING_AUCTION_DURATION, DEFAULT_OPENING_AUCTION_FEE, DEFAULT_OPENING_AUCTION_INCENTIVE_SHARE_BPS, DEFAULT_OPENING_AUCTION_MIN_ACCEPTABLE_TICK_TOKEN0, DEFAULT_OPENING_AUCTION_MIN_ACCEPTABLE_TICK_TOKEN1, DEFAULT_OPENING_AUCTION_MIN_LIQUIDITY, DEFAULT_OPENING_AUCTION_SHARE_TO_AUCTION_BPS, DEFAULT_OPENING_DOPPLER_DURATION, DEFAULT_OPENING_DOPPLER_EPOCH_LENGTH, DEFAULT_OPENING_DOPPLER_FEE, DEFAULT_OPENING_DOPPLER_NUM_PD_SLUGS, DEFAULT_OPENING_DOPPLER_TICK_SPACING, DEFAULT_PD_SLUGS, DEFAULT_V3_END_TICK, DEFAULT_V3_FEE, DEFAULT_V3_INITIAL_PROPOSAL_THRESHOLD, DEFAULT_V3_INITIAL_SUPPLY, DEFAULT_V3_INITIAL_VOTING_DELAY, DEFAULT_V3_INITIAL_VOTING_PERIOD, DEFAULT_V3_MAX_SHARE_TO_BE_SOLD, DEFAULT_V3_NUM_POSITIONS, DEFAULT_V3_NUM_TOKENS_TO_SELL, DEFAULT_V3_PRE_MINT, DEFAULT_V3_START_TICK, DEFAULT_V3_VESTING_DURATION, DEFAULT_V3_YEARLY_MINT_RATE, DEFAULT_V4_INITIAL_PROPOSAL_THRESHOLD, DEFAULT_V4_INITIAL_VOTING_DELAY, DEFAULT_V4_INITIAL_VOTING_PERIOD, DEFAULT_V4_YEARLY_MINT_RATE, _default$1 as DERC2080Bytecode, _default$2 as DERC20Bytecode, DOPPLER_FLAGS, DOPPLER_MAX_TICK_SPACING, DYNAMIC_FEE_FLAG, Derc20, Derc20V2, _default$5 as DopplerBytecode, _default$4 as DopplerDN404Bytecode, DopplerERC20V1, type DopplerERC20V1TokenConfig, DopplerFactory, type DopplerHookMigrationConfig, DopplerSDK, type DopplerSDKConfig, DynamicAuction, DynamicAuctionBuilder, type DynamicAuctionConfig, type DynamicAuctionMarketCapConfig, type DynamicMarketCapRange, Eth, FEE_AMOUNT_MASK, FEE_TIERS, FLAG_MASK, type FeeTier, type GovernanceLaunchpad, type GovernanceOption, type HookInfo, INT24_MAX, INT24_MIN, LAUNCHPAD_ENABLED_CHAIN_IDS, type LaunchpadEnabledChainId, type LockablePoolState, LockablePoolStatus, type LockableV3InitializerParams, MAX_SQRT_RATIO, MAX_TICK, MIN_SQRT_RATIO, MIN_TICK, type MarketCapConfig, type MarketCapRange, type MarketCapValidationResult, type MigrationConfig, type MigrationEncoder, type ModuleAddressOverrides, MulticurveBuilder, type MulticurveBundleExactInResult, type MulticurveBundleExactOutResult, type MulticurveDecayFeeSchedule, MulticurveFees, type MulticurveFeesOptions, type MulticurveInitializerConfig, type MulticurveMarketCapCurvesConfig, type MulticurveMarketCapPreset, type MulticurveMarketCapRangeCurve, type MulticurveMaxTickLiquidityParams, type MulticurvePendingFees, type MulticurveFeesOptions as MulticurvePendingFeesOptions, MulticurvePool, type MulticurvePoolState, type MulticurveTokenPendingFees, NO_OP_ENABLED_CHAIN_IDS, type NoOpEnabledChainId, type NormalizedRehypeDopplerHookInitializerConfig, OPENING_AUCTION_FLAGS, OPENING_AUCTION_PHASE_ACTIVE, OPENING_AUCTION_PHASE_CLOSED, OPENING_AUCTION_PHASE_NOT_STARTED, OPENING_AUCTION_PHASE_SETTLED, OPENING_AUCTION_STATUS_ACTIVE, OPENING_AUCTION_STATUS_DOPPLER_ACTIVE, OPENING_AUCTION_STATUS_EXITED, OPENING_AUCTION_STATUS_UNINITIALIZED, OpeningAuction, type OpeningAuctionAuctionSettledEvent, type OpeningAuctionBidArgs, type OpeningAuctionBidConstraints, type OpeningAuctionBidLookupArgs, OpeningAuctionBidManager, type OpeningAuctionBidManagerConfig, type OpeningAuctionBidPlacedEvent, type OpeningAuctionBidPositionInfo, type OpeningAuctionBidQuote, type OpeningAuctionBidSimulationResult, type OpeningAuctionBidStatus, type OpeningAuctionBidValidationResult, type OpeningAuctionBidWithdrawnEvent, OpeningAuctionBuilder, _default$3 as OpeningAuctionBytecode, type OpeningAuctionClaimAllIncentivesPreview, type OpeningAuctionClaimAllIncentivesResult, type OpeningAuctionClaimIncentivesSimulationResult, type OpeningAuctionCompleteResult, type OpeningAuctionConfig, type OpeningAuctionCreateResult, type OpeningAuctionDopplerConfig, type OpeningAuctionEstimatedClearingTickUpdatedEvent, type OpeningAuctionIncentiveData, type OpeningAuctionIncentivesClaimedEvent, OpeningAuctionLifecycle, type OpeningAuctionModifyLiquidityParams, type OpeningAuctionModifyLiquiditySimulationResult, type OpeningAuctionModuleAddressOverrides, type OpeningAuctionMoveBidArgs, type OpeningAuctionMoveBidResult, type OpeningAuctionMoveBidSimulationResult, type OpeningAuctionOwnerBidInfo, type OpeningAuctionOwnerBidStatus, OpeningAuctionPhase, type OpeningAuctionPhaseChangedEvent, type OpeningAuctionPosition, OpeningAuctionPositionManager, type OpeningAuctionQuoteFromTokenAmountArgs, type OpeningAuctionQuoteFromTokenAmountResult, type OpeningAuctionSettlementData, type OpeningAuctionState, OpeningAuctionStatus, type OpeningAuctionWatchBidPlacedOptions, type OpeningAuctionWatchBidStatusOptions, type OpeningAuctionWatchBidWithdrawnOptions, type OpeningAuctionWatchEstimatedClearingTickOptions, type OpeningAuctionWatchIncentivesClaimedOptions, type OpeningAuctionWatchPhaseChangeOptions, type OpeningAuctionWatchSettlementOptions, type OpeningAuctionWithdrawFullBidArgs, type OpeningAuctionWithdrawFullBidResult, type OpeningAuctionWithdrawFullBidSimulationResult, type PoolInfo, type ProceedsSplitConfig, Q96, type QuoteResult, Quoter, RehypeDopplerHook, type RehypeDopplerHookConfig, RehypeDopplerHookInitializer, type RehypeDopplerHookInitializerConfig, RehypeDopplerHookMigrator, type RehypeDopplerHookMigratorConfig, type RehypeFeeDistributionInfo, RehypeFeeRoutingMode, type ResolvedOpeningAuctionDopplerConfig, SECONDS_PER_DAY, SECONDS_PER_YEAR, SUPPORTED_CHAIN_IDS, type SaleConfig, _default as StateViewBytecode, StaticAuction, StaticAuctionBuilder, type StaticAuctionMarketCapConfig, type StaticPoolConfig, type StreamableFeesConfig, type SupportedChain, type SupportedChainId, type SupportedChainKey, type SupportedPublicClient, TICK_SPACINGS, type TokenAddressHookConfig, type TokenAddressMiningParams, type TokenAddressMiningResult, type TokenConfig, type TokenVariant, TopUpDistributor, type TopUpParams, type TopUpSimulationResult, type TopUpTransaction, type UniswapV2MigrationConfig, type UniswapV2SplitMigrationConfig, type UniswapV4MigrationConfig, type UniswapV4SplitMigrationConfig, V3_FEE_TIERS, type V4PoolKey, V4_MAX_FEE, VALID_FEE_TIERS, VERSION, type VestingAllocationConfig, type VestingConfig, type VestingScheduleConfig, WAD, ZERO_ADDRESS, airlockAbi, applyTickOffsets, bundlerAbi, calculateFDV, calculateGamma, calculateMarketCap, calculateTickRange, calculateTokensToSell, computeOptimalGamma, computePoolId, createAirlockBeneficiary, decayMulticurveInitializerHookAbi, decodeBalanceDelta, derc20Abi, derc20V2Abi, dopplerERC20V1Abi, dopplerHookAbi, dopplerHookInitializerAbi, dopplerLensAbi, encodeRehypeDopplerHookInitializerData, encodeRehypeDopplerHookMigratorCalldata, estimatePriceAtEpoch, estimateSlippage, feeClaimsInitializerAbi, feesManagerAbi, formatTickAsPrice, getAddresses, getAirlockBeneficiary, getAirlockOwner, getAmount0ForLiquidity, getAmount1ForLiquidity, getLiquidityForAmount0, getLiquidityForAmount1, getMaxLiquiditySafeMulticurveTickUpper, getMaxTickRounded, getNearestUsableTick, getSqrtRatioAtTick, getTickAtSqrtRatio, isLaunchpadEnabledChain, isNoOpEnabledChain, isSupportedChainId, isToken0Expected, isToken1, lockableUniswapV3InitializerAbi, marketCapToTickForMulticurve, marketCapToTicksForDynamicAuction, marketCapToTicksForMulticurve, marketCapToTicksForStaticAuction, marketCapToTokenPrice, mineTokenAddress, normalizeBeneficiaries, normalizePoolKey, normalizeRehypeDopplerHookInitializerConfig, openingAuctionAbi, openingAuctionInitializerAbi, openingAuctionPositionManagerAbi, poolManagerAbi, priceToSqrtPriceX96, priceToTick, quoterV2Abi, ratioToTick, rehypeDopplerHookAbi, rehypeDopplerHookInitializerAbi, rehypeDopplerHookMigratorAbi, resolveGasEstimate, sortBeneficiaries, sqrtPriceX96ToPrice, streamableFeesLockerAbi, streamableFeesLockerV2Abi, tickToMarketCap, tickToPrice, tokenPriceToRatio, topUpDistributorAbi, uniswapV2Router02Abi, uniswapV3InitializerAbi, uniswapV3PoolAbi, uniswapV4InitializerAbi, v2MigratorAbi, v3MigratorAbi, v4MigratorAbi, v4MulticurveInitializerAbi, v4MulticurveMigratorAbi, v4QuoterAbi, validateMarketCapParameters, weth9Abi };
|
|
12213
|
+
export { ADDRESSES, BASIS_POINTS, type BaseAuctionBuilder, type BeneficiaryData, CHAIN_IDS, type ChainAddresses, type CreateDynamicAuctionParams, type CreateMulticurveParams, type CreateOpeningAuctionParams, type CreateParams, type CreateStaticAuctionParams, DAY_SECONDS, DEAD_ADDRESS, DECAY_MAX_START_FEE, DEFAULT_AIRLOCK_BENEFICIARY_SHARES, DEFAULT_AUCTION_DURATION, DEFAULT_EPOCH_LENGTH, DEFAULT_LOCK_DURATION, DEFAULT_MULTICURVE_LOWER_TICKS, DEFAULT_MULTICURVE_MAX_SUPPLY_SHARES, DEFAULT_MULTICURVE_NUM_POSITIONS, DEFAULT_MULTICURVE_UPPER_TICKS, DEFAULT_OPENING_AUCTION_DURATION, DEFAULT_OPENING_AUCTION_FEE, DEFAULT_OPENING_AUCTION_INCENTIVE_SHARE_BPS, DEFAULT_OPENING_AUCTION_MIN_ACCEPTABLE_TICK_TOKEN0, DEFAULT_OPENING_AUCTION_MIN_ACCEPTABLE_TICK_TOKEN1, DEFAULT_OPENING_AUCTION_MIN_LIQUIDITY, DEFAULT_OPENING_AUCTION_SHARE_TO_AUCTION_BPS, DEFAULT_OPENING_DOPPLER_DURATION, DEFAULT_OPENING_DOPPLER_EPOCH_LENGTH, DEFAULT_OPENING_DOPPLER_FEE, DEFAULT_OPENING_DOPPLER_NUM_PD_SLUGS, DEFAULT_OPENING_DOPPLER_TICK_SPACING, DEFAULT_PD_SLUGS, DEFAULT_V3_END_TICK, DEFAULT_V3_FEE, DEFAULT_V3_INITIAL_PROPOSAL_THRESHOLD, DEFAULT_V3_INITIAL_SUPPLY, DEFAULT_V3_INITIAL_VOTING_DELAY, DEFAULT_V3_INITIAL_VOTING_PERIOD, DEFAULT_V3_MAX_SHARE_TO_BE_SOLD, DEFAULT_V3_NUM_POSITIONS, DEFAULT_V3_NUM_TOKENS_TO_SELL, DEFAULT_V3_PRE_MINT, DEFAULT_V3_START_TICK, DEFAULT_V3_VESTING_DURATION, DEFAULT_V3_YEARLY_MINT_RATE, DEFAULT_V4_INITIAL_PROPOSAL_THRESHOLD, DEFAULT_V4_INITIAL_VOTING_DELAY, DEFAULT_V4_INITIAL_VOTING_PERIOD, DEFAULT_V4_YEARLY_MINT_RATE, _default$1 as DERC2080Bytecode, _default$2 as DERC20Bytecode, DOPPLER_FLAGS, DOPPLER_MAX_TICK_SPACING, DYNAMIC_FEE_FLAG, Derc20, Derc20V2, _default$5 as DopplerBytecode, _default$4 as DopplerDN404Bytecode, DopplerERC20V1, type DopplerERC20V1TokenConfig, DopplerFactory, type DopplerHookMigrationConfig, DopplerSDK, type DopplerSDKConfig, DynamicAuction, DynamicAuctionBuilder, type DynamicAuctionConfig, type DynamicAuctionMarketCapConfig, type DynamicMarketCapRange, Eth, FEE_AMOUNT_MASK, FEE_TIERS, FLAG_MASK, type FeeTier, type GovernanceLaunchpad, type GovernanceOption, type HookInfo, INT24_MAX, INT24_MIN, LAUNCHPAD_ENABLED_CHAIN_IDS, type LaunchpadEnabledChainId, type LockablePoolState, LockablePoolStatus, type LockableV3InitializerParams, MAX_SQRT_RATIO, MAX_TICK, MIN_SQRT_RATIO, MIN_TICK, type MarketCapConfig, type MarketCapRange, type MarketCapValidationResult, type MigrationConfig, type MigrationEncoder, type ModuleAddressOverrides, MulticurveBuilder, type MulticurveBundleExactInResult, type MulticurveBundleExactOutResult, type MulticurveDecayFeeSchedule, MulticurveFees, type MulticurveFeesOptions, type MulticurveInitializerConfig, type MulticurveMarketCapCurvesConfig, type MulticurveMarketCapPreset, type MulticurveMarketCapRangeCurve, type MulticurveMaxTickLiquidityParams, type MulticurvePendingFees, type MulticurveFeesOptions as MulticurvePendingFeesOptions, MulticurvePool, type MulticurvePoolState, type MulticurveTokenPendingFeeBreakdown, type MulticurveTokenPendingFees, NO_OP_ENABLED_CHAIN_IDS, type NoOpEnabledChainId, type NormalizedRehypeDopplerHookInitializerConfig, OPENING_AUCTION_FLAGS, OPENING_AUCTION_PHASE_ACTIVE, OPENING_AUCTION_PHASE_CLOSED, OPENING_AUCTION_PHASE_NOT_STARTED, OPENING_AUCTION_PHASE_SETTLED, OPENING_AUCTION_STATUS_ACTIVE, OPENING_AUCTION_STATUS_DOPPLER_ACTIVE, OPENING_AUCTION_STATUS_EXITED, OPENING_AUCTION_STATUS_UNINITIALIZED, OpeningAuction, type OpeningAuctionAuctionSettledEvent, type OpeningAuctionBidArgs, type OpeningAuctionBidConstraints, type OpeningAuctionBidLookupArgs, OpeningAuctionBidManager, type OpeningAuctionBidManagerConfig, type OpeningAuctionBidPlacedEvent, type OpeningAuctionBidPositionInfo, type OpeningAuctionBidQuote, type OpeningAuctionBidSimulationResult, type OpeningAuctionBidStatus, type OpeningAuctionBidValidationResult, type OpeningAuctionBidWithdrawnEvent, OpeningAuctionBuilder, _default$3 as OpeningAuctionBytecode, type OpeningAuctionClaimAllIncentivesPreview, type OpeningAuctionClaimAllIncentivesResult, type OpeningAuctionClaimIncentivesSimulationResult, type OpeningAuctionCompleteResult, type OpeningAuctionConfig, type OpeningAuctionCreateResult, type OpeningAuctionDopplerConfig, type OpeningAuctionEstimatedClearingTickUpdatedEvent, type OpeningAuctionIncentiveData, type OpeningAuctionIncentivesClaimedEvent, OpeningAuctionLifecycle, type OpeningAuctionModifyLiquidityParams, type OpeningAuctionModifyLiquiditySimulationResult, type OpeningAuctionModuleAddressOverrides, type OpeningAuctionMoveBidArgs, type OpeningAuctionMoveBidResult, type OpeningAuctionMoveBidSimulationResult, type OpeningAuctionOwnerBidInfo, type OpeningAuctionOwnerBidStatus, OpeningAuctionPhase, type OpeningAuctionPhaseChangedEvent, type OpeningAuctionPosition, OpeningAuctionPositionManager, type OpeningAuctionQuoteFromTokenAmountArgs, type OpeningAuctionQuoteFromTokenAmountResult, type OpeningAuctionSettlementData, type OpeningAuctionState, OpeningAuctionStatus, type OpeningAuctionWatchBidPlacedOptions, type OpeningAuctionWatchBidStatusOptions, type OpeningAuctionWatchBidWithdrawnOptions, type OpeningAuctionWatchEstimatedClearingTickOptions, type OpeningAuctionWatchIncentivesClaimedOptions, type OpeningAuctionWatchPhaseChangeOptions, type OpeningAuctionWatchSettlementOptions, type OpeningAuctionWithdrawFullBidArgs, type OpeningAuctionWithdrawFullBidResult, type OpeningAuctionWithdrawFullBidSimulationResult, type PoolInfo, type ProceedsSplitConfig, Q96, type QuoteResult, Quoter, RehypeDopplerHook, type RehypeDopplerHookConfig, RehypeDopplerHookInitializer, type RehypeDopplerHookInitializerConfig, RehypeDopplerHookMigrator, type RehypeDopplerHookMigratorConfig, type RehypeFeeDistributionInfo, RehypeFeeRoutingMode, type RehypePendingFees, type ResolvedOpeningAuctionDopplerConfig, SECONDS_PER_DAY, SECONDS_PER_YEAR, SUPPORTED_CHAIN_IDS, type SaleConfig, _default as StateViewBytecode, StaticAuction, StaticAuctionBuilder, type StaticAuctionMarketCapConfig, type StaticPoolConfig, type StreamableFeesConfig, type SupportedChain, type SupportedChainId, type SupportedChainKey, type SupportedPublicClient, TICK_SPACINGS, type TokenAddressHookConfig, type TokenAddressMiningParams, type TokenAddressMiningResult, type TokenConfig, type TokenVariant, TopUpDistributor, type TopUpParams, type TopUpSimulationResult, type TopUpTransaction, type UniswapV2MigrationConfig, type UniswapV2SplitMigrationConfig, type UniswapV4MigrationConfig, type UniswapV4SplitMigrationConfig, V3_FEE_TIERS, type V4PoolKey, V4_MAX_FEE, VALID_FEE_TIERS, VERSION, type VestingAllocationConfig, type VestingConfig, type VestingScheduleConfig, WAD, ZERO_ADDRESS, airlockAbi, applyTickOffsets, bundlerAbi, calculateFDV, calculateGamma, calculateMarketCap, calculateTickRange, calculateTokensToSell, computeOptimalGamma, computePoolId, createAirlockBeneficiary, decayMulticurveInitializerHookAbi, decodeBalanceDelta, derc20Abi, derc20V2Abi, dopplerERC20V1Abi, dopplerHookAbi, dopplerHookInitializerAbi, dopplerLensAbi, encodeRehypeDopplerHookInitializerData, encodeRehypeDopplerHookMigratorCalldata, estimatePriceAtEpoch, estimateSlippage, feeClaimsInitializerAbi, feesManagerAbi, formatTickAsPrice, getAddresses, getAirlockBeneficiary, getAirlockOwner, getAmount0ForLiquidity, getAmount1ForLiquidity, getLiquidityForAmount0, getLiquidityForAmount1, getMaxLiquiditySafeMulticurveTickUpper, getMaxTickRounded, getNearestUsableTick, getSqrtRatioAtTick, getTickAtSqrtRatio, isLaunchpadEnabledChain, isNoOpEnabledChain, isSupportedChainId, isToken0Expected, isToken1, lockableUniswapV3InitializerAbi, marketCapToTickForMulticurve, marketCapToTicksForDynamicAuction, marketCapToTicksForMulticurve, marketCapToTicksForStaticAuction, marketCapToTokenPrice, mineTokenAddress, normalizeBeneficiaries, normalizePoolKey, normalizeRehypeDopplerHookInitializerConfig, openingAuctionAbi, openingAuctionInitializerAbi, openingAuctionPositionManagerAbi, poolManagerAbi, priceToSqrtPriceX96, priceToTick, quoterV2Abi, ratioToTick, rehypeDopplerHookAbi, rehypeDopplerHookInitializerAbi, rehypeDopplerHookMigratorAbi, resolveGasEstimate, sortBeneficiaries, sqrtPriceX96ToPrice, streamableFeesLockerAbi, streamableFeesLockerV2Abi, tickToMarketCap, tickToPrice, tokenPriceToRatio, topUpDistributorAbi, uniswapV2Router02Abi, uniswapV3InitializerAbi, uniswapV3PoolAbi, uniswapV4InitializerAbi, v2MigratorAbi, v3MigratorAbi, v4MigratorAbi, v4MulticurveInitializerAbi, v4MulticurveMigratorAbi, v4QuoterAbi, validateMarketCapParameters, weth9Abi };
|
package/dist/evm/index.d.ts
CHANGED
|
@@ -731,10 +731,6 @@ type RehypeBuybackDestinationConfig = {
|
|
|
731
731
|
};
|
|
732
732
|
type RehypeFeeBeneficiariesConfig = {
|
|
733
733
|
buybackDestination?: never;
|
|
734
|
-
/**
|
|
735
|
-
* TODO(PR #170): TEMPORARY Base Sepolia-only deployment support. Remove this
|
|
736
|
-
* notice by reverting the dedicated compatibility commit after rollout.
|
|
737
|
-
*/
|
|
738
734
|
feeBeneficiaries: [BeneficiaryData, ...BeneficiaryData[]];
|
|
739
735
|
feeRoutingMode?: RehypeFeeRoutingMode.RouteToBeneficiaryFees | 'routeToBeneficiaryFees';
|
|
740
736
|
};
|
|
@@ -1361,6 +1357,25 @@ declare class MulticurvePool {
|
|
|
1361
1357
|
getFeeSchedule(): Promise<MulticurveDecayFeeSchedule | null>;
|
|
1362
1358
|
}
|
|
1363
1359
|
|
|
1360
|
+
type RehypePendingFees = {
|
|
1361
|
+
readonly mode: 'feesManager';
|
|
1362
|
+
readonly fees0: bigint;
|
|
1363
|
+
readonly fees1: bigint;
|
|
1364
|
+
} | {
|
|
1365
|
+
readonly mode: 'unsupported';
|
|
1366
|
+
readonly fees0: 0n;
|
|
1367
|
+
readonly fees1: 0n;
|
|
1368
|
+
} | {
|
|
1369
|
+
readonly mode: 'notConfigured';
|
|
1370
|
+
readonly fees0: 0n;
|
|
1371
|
+
readonly fees1: 0n;
|
|
1372
|
+
};
|
|
1373
|
+
interface MulticurveTokenPendingFeeBreakdown {
|
|
1374
|
+
readonly tokenAddress: Address;
|
|
1375
|
+
readonly poolInitializerFees: MulticurvePendingFees;
|
|
1376
|
+
readonly rehypeFees: RehypePendingFees;
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1364
1379
|
interface MulticurveFeesOptions {
|
|
1365
1380
|
readonly tokenBatchSize?: number;
|
|
1366
1381
|
}
|
|
@@ -1373,6 +1388,10 @@ declare class MulticurveFees {
|
|
|
1373
1388
|
getPendingFees(beneficiary: Address, options: MulticurveFeesOptions): Promise<readonly MulticurveTokenPendingFees[]>;
|
|
1374
1389
|
getPendingFees(beneficiary: Address, tokenAddresses: readonly Address[]): Promise<readonly MulticurveTokenPendingFees[]>;
|
|
1375
1390
|
getPendingFees(beneficiary: Address, tokenAddresses: readonly Address[], options: MulticurveFeesOptions): Promise<readonly MulticurveTokenPendingFees[]>;
|
|
1391
|
+
getPendingFeeBreakdown(beneficiary: Address): Promise<readonly MulticurveTokenPendingFeeBreakdown[]>;
|
|
1392
|
+
getPendingFeeBreakdown(beneficiary: Address, options: MulticurveFeesOptions): Promise<readonly MulticurveTokenPendingFeeBreakdown[]>;
|
|
1393
|
+
getPendingFeeBreakdown(beneficiary: Address, tokenAddresses: readonly Address[]): Promise<readonly MulticurveTokenPendingFeeBreakdown[]>;
|
|
1394
|
+
getPendingFeeBreakdown(beneficiary: Address, tokenAddresses: readonly Address[], options: MulticurveFeesOptions): Promise<readonly MulticurveTokenPendingFeeBreakdown[]>;
|
|
1376
1395
|
}
|
|
1377
1396
|
|
|
1378
1397
|
interface RehypeFeeSchedule {
|
|
@@ -3822,7 +3841,7 @@ type NormalizedBeneficiaryConfig = NormalizedCommonConfig & {
|
|
|
3822
3841
|
type NormalizedRehypeDopplerHookInitializerConfig = NormalizedBuybackConfig | NormalizedBeneficiaryConfig;
|
|
3823
3842
|
declare function normalizeRehypeDopplerHookInitializerConfig(config: RehypeDopplerHookInitializerConfig): NormalizedRehypeDopplerHookInitializerConfig;
|
|
3824
3843
|
|
|
3825
|
-
declare function encodeRehypeDopplerHookInitializerData(numeraire: Address, config: NormalizedRehypeDopplerHookInitializerConfig
|
|
3844
|
+
declare function encodeRehypeDopplerHookInitializerData(numeraire: Address, config: NormalizedRehypeDopplerHookInitializerConfig): Hex;
|
|
3826
3845
|
|
|
3827
3846
|
declare function encodeRehypeDopplerHookMigratorCalldata(params: {
|
|
3828
3847
|
numeraire: Address;
|
|
@@ -12191,4 +12210,4 @@ declare const rehypeDopplerHookMigratorAbi: readonly [{
|
|
|
12191
12210
|
|
|
12192
12211
|
declare const VERSION = "1.0.0";
|
|
12193
12212
|
|
|
12194
|
-
export { ADDRESSES, BASIS_POINTS, type BaseAuctionBuilder, type BeneficiaryData, CHAIN_IDS, type ChainAddresses, type CreateDynamicAuctionParams, type CreateMulticurveParams, type CreateOpeningAuctionParams, type CreateParams, type CreateStaticAuctionParams, DAY_SECONDS, DEAD_ADDRESS, DECAY_MAX_START_FEE, DEFAULT_AIRLOCK_BENEFICIARY_SHARES, DEFAULT_AUCTION_DURATION, DEFAULT_EPOCH_LENGTH, DEFAULT_LOCK_DURATION, DEFAULT_MULTICURVE_LOWER_TICKS, DEFAULT_MULTICURVE_MAX_SUPPLY_SHARES, DEFAULT_MULTICURVE_NUM_POSITIONS, DEFAULT_MULTICURVE_UPPER_TICKS, DEFAULT_OPENING_AUCTION_DURATION, DEFAULT_OPENING_AUCTION_FEE, DEFAULT_OPENING_AUCTION_INCENTIVE_SHARE_BPS, DEFAULT_OPENING_AUCTION_MIN_ACCEPTABLE_TICK_TOKEN0, DEFAULT_OPENING_AUCTION_MIN_ACCEPTABLE_TICK_TOKEN1, DEFAULT_OPENING_AUCTION_MIN_LIQUIDITY, DEFAULT_OPENING_AUCTION_SHARE_TO_AUCTION_BPS, DEFAULT_OPENING_DOPPLER_DURATION, DEFAULT_OPENING_DOPPLER_EPOCH_LENGTH, DEFAULT_OPENING_DOPPLER_FEE, DEFAULT_OPENING_DOPPLER_NUM_PD_SLUGS, DEFAULT_OPENING_DOPPLER_TICK_SPACING, DEFAULT_PD_SLUGS, DEFAULT_V3_END_TICK, DEFAULT_V3_FEE, DEFAULT_V3_INITIAL_PROPOSAL_THRESHOLD, DEFAULT_V3_INITIAL_SUPPLY, DEFAULT_V3_INITIAL_VOTING_DELAY, DEFAULT_V3_INITIAL_VOTING_PERIOD, DEFAULT_V3_MAX_SHARE_TO_BE_SOLD, DEFAULT_V3_NUM_POSITIONS, DEFAULT_V3_NUM_TOKENS_TO_SELL, DEFAULT_V3_PRE_MINT, DEFAULT_V3_START_TICK, DEFAULT_V3_VESTING_DURATION, DEFAULT_V3_YEARLY_MINT_RATE, DEFAULT_V4_INITIAL_PROPOSAL_THRESHOLD, DEFAULT_V4_INITIAL_VOTING_DELAY, DEFAULT_V4_INITIAL_VOTING_PERIOD, DEFAULT_V4_YEARLY_MINT_RATE, _default$1 as DERC2080Bytecode, _default$2 as DERC20Bytecode, DOPPLER_FLAGS, DOPPLER_MAX_TICK_SPACING, DYNAMIC_FEE_FLAG, Derc20, Derc20V2, _default$5 as DopplerBytecode, _default$4 as DopplerDN404Bytecode, DopplerERC20V1, type DopplerERC20V1TokenConfig, DopplerFactory, type DopplerHookMigrationConfig, DopplerSDK, type DopplerSDKConfig, DynamicAuction, DynamicAuctionBuilder, type DynamicAuctionConfig, type DynamicAuctionMarketCapConfig, type DynamicMarketCapRange, Eth, FEE_AMOUNT_MASK, FEE_TIERS, FLAG_MASK, type FeeTier, type GovernanceLaunchpad, type GovernanceOption, type HookInfo, INT24_MAX, INT24_MIN, LAUNCHPAD_ENABLED_CHAIN_IDS, type LaunchpadEnabledChainId, type LockablePoolState, LockablePoolStatus, type LockableV3InitializerParams, MAX_SQRT_RATIO, MAX_TICK, MIN_SQRT_RATIO, MIN_TICK, type MarketCapConfig, type MarketCapRange, type MarketCapValidationResult, type MigrationConfig, type MigrationEncoder, type ModuleAddressOverrides, MulticurveBuilder, type MulticurveBundleExactInResult, type MulticurveBundleExactOutResult, type MulticurveDecayFeeSchedule, MulticurveFees, type MulticurveFeesOptions, type MulticurveInitializerConfig, type MulticurveMarketCapCurvesConfig, type MulticurveMarketCapPreset, type MulticurveMarketCapRangeCurve, type MulticurveMaxTickLiquidityParams, type MulticurvePendingFees, type MulticurveFeesOptions as MulticurvePendingFeesOptions, MulticurvePool, type MulticurvePoolState, type MulticurveTokenPendingFees, NO_OP_ENABLED_CHAIN_IDS, type NoOpEnabledChainId, type NormalizedRehypeDopplerHookInitializerConfig, OPENING_AUCTION_FLAGS, OPENING_AUCTION_PHASE_ACTIVE, OPENING_AUCTION_PHASE_CLOSED, OPENING_AUCTION_PHASE_NOT_STARTED, OPENING_AUCTION_PHASE_SETTLED, OPENING_AUCTION_STATUS_ACTIVE, OPENING_AUCTION_STATUS_DOPPLER_ACTIVE, OPENING_AUCTION_STATUS_EXITED, OPENING_AUCTION_STATUS_UNINITIALIZED, OpeningAuction, type OpeningAuctionAuctionSettledEvent, type OpeningAuctionBidArgs, type OpeningAuctionBidConstraints, type OpeningAuctionBidLookupArgs, OpeningAuctionBidManager, type OpeningAuctionBidManagerConfig, type OpeningAuctionBidPlacedEvent, type OpeningAuctionBidPositionInfo, type OpeningAuctionBidQuote, type OpeningAuctionBidSimulationResult, type OpeningAuctionBidStatus, type OpeningAuctionBidValidationResult, type OpeningAuctionBidWithdrawnEvent, OpeningAuctionBuilder, _default$3 as OpeningAuctionBytecode, type OpeningAuctionClaimAllIncentivesPreview, type OpeningAuctionClaimAllIncentivesResult, type OpeningAuctionClaimIncentivesSimulationResult, type OpeningAuctionCompleteResult, type OpeningAuctionConfig, type OpeningAuctionCreateResult, type OpeningAuctionDopplerConfig, type OpeningAuctionEstimatedClearingTickUpdatedEvent, type OpeningAuctionIncentiveData, type OpeningAuctionIncentivesClaimedEvent, OpeningAuctionLifecycle, type OpeningAuctionModifyLiquidityParams, type OpeningAuctionModifyLiquiditySimulationResult, type OpeningAuctionModuleAddressOverrides, type OpeningAuctionMoveBidArgs, type OpeningAuctionMoveBidResult, type OpeningAuctionMoveBidSimulationResult, type OpeningAuctionOwnerBidInfo, type OpeningAuctionOwnerBidStatus, OpeningAuctionPhase, type OpeningAuctionPhaseChangedEvent, type OpeningAuctionPosition, OpeningAuctionPositionManager, type OpeningAuctionQuoteFromTokenAmountArgs, type OpeningAuctionQuoteFromTokenAmountResult, type OpeningAuctionSettlementData, type OpeningAuctionState, OpeningAuctionStatus, type OpeningAuctionWatchBidPlacedOptions, type OpeningAuctionWatchBidStatusOptions, type OpeningAuctionWatchBidWithdrawnOptions, type OpeningAuctionWatchEstimatedClearingTickOptions, type OpeningAuctionWatchIncentivesClaimedOptions, type OpeningAuctionWatchPhaseChangeOptions, type OpeningAuctionWatchSettlementOptions, type OpeningAuctionWithdrawFullBidArgs, type OpeningAuctionWithdrawFullBidResult, type OpeningAuctionWithdrawFullBidSimulationResult, type PoolInfo, type ProceedsSplitConfig, Q96, type QuoteResult, Quoter, RehypeDopplerHook, type RehypeDopplerHookConfig, RehypeDopplerHookInitializer, type RehypeDopplerHookInitializerConfig, RehypeDopplerHookMigrator, type RehypeDopplerHookMigratorConfig, type RehypeFeeDistributionInfo, RehypeFeeRoutingMode, type ResolvedOpeningAuctionDopplerConfig, SECONDS_PER_DAY, SECONDS_PER_YEAR, SUPPORTED_CHAIN_IDS, type SaleConfig, _default as StateViewBytecode, StaticAuction, StaticAuctionBuilder, type StaticAuctionMarketCapConfig, type StaticPoolConfig, type StreamableFeesConfig, type SupportedChain, type SupportedChainId, type SupportedChainKey, type SupportedPublicClient, TICK_SPACINGS, type TokenAddressHookConfig, type TokenAddressMiningParams, type TokenAddressMiningResult, type TokenConfig, type TokenVariant, TopUpDistributor, type TopUpParams, type TopUpSimulationResult, type TopUpTransaction, type UniswapV2MigrationConfig, type UniswapV2SplitMigrationConfig, type UniswapV4MigrationConfig, type UniswapV4SplitMigrationConfig, V3_FEE_TIERS, type V4PoolKey, V4_MAX_FEE, VALID_FEE_TIERS, VERSION, type VestingAllocationConfig, type VestingConfig, type VestingScheduleConfig, WAD, ZERO_ADDRESS, airlockAbi, applyTickOffsets, bundlerAbi, calculateFDV, calculateGamma, calculateMarketCap, calculateTickRange, calculateTokensToSell, computeOptimalGamma, computePoolId, createAirlockBeneficiary, decayMulticurveInitializerHookAbi, decodeBalanceDelta, derc20Abi, derc20V2Abi, dopplerERC20V1Abi, dopplerHookAbi, dopplerHookInitializerAbi, dopplerLensAbi, encodeRehypeDopplerHookInitializerData, encodeRehypeDopplerHookMigratorCalldata, estimatePriceAtEpoch, estimateSlippage, feeClaimsInitializerAbi, feesManagerAbi, formatTickAsPrice, getAddresses, getAirlockBeneficiary, getAirlockOwner, getAmount0ForLiquidity, getAmount1ForLiquidity, getLiquidityForAmount0, getLiquidityForAmount1, getMaxLiquiditySafeMulticurveTickUpper, getMaxTickRounded, getNearestUsableTick, getSqrtRatioAtTick, getTickAtSqrtRatio, isLaunchpadEnabledChain, isNoOpEnabledChain, isSupportedChainId, isToken0Expected, isToken1, lockableUniswapV3InitializerAbi, marketCapToTickForMulticurve, marketCapToTicksForDynamicAuction, marketCapToTicksForMulticurve, marketCapToTicksForStaticAuction, marketCapToTokenPrice, mineTokenAddress, normalizeBeneficiaries, normalizePoolKey, normalizeRehypeDopplerHookInitializerConfig, openingAuctionAbi, openingAuctionInitializerAbi, openingAuctionPositionManagerAbi, poolManagerAbi, priceToSqrtPriceX96, priceToTick, quoterV2Abi, ratioToTick, rehypeDopplerHookAbi, rehypeDopplerHookInitializerAbi, rehypeDopplerHookMigratorAbi, resolveGasEstimate, sortBeneficiaries, sqrtPriceX96ToPrice, streamableFeesLockerAbi, streamableFeesLockerV2Abi, tickToMarketCap, tickToPrice, tokenPriceToRatio, topUpDistributorAbi, uniswapV2Router02Abi, uniswapV3InitializerAbi, uniswapV3PoolAbi, uniswapV4InitializerAbi, v2MigratorAbi, v3MigratorAbi, v4MigratorAbi, v4MulticurveInitializerAbi, v4MulticurveMigratorAbi, v4QuoterAbi, validateMarketCapParameters, weth9Abi };
|
|
12213
|
+
export { ADDRESSES, BASIS_POINTS, type BaseAuctionBuilder, type BeneficiaryData, CHAIN_IDS, type ChainAddresses, type CreateDynamicAuctionParams, type CreateMulticurveParams, type CreateOpeningAuctionParams, type CreateParams, type CreateStaticAuctionParams, DAY_SECONDS, DEAD_ADDRESS, DECAY_MAX_START_FEE, DEFAULT_AIRLOCK_BENEFICIARY_SHARES, DEFAULT_AUCTION_DURATION, DEFAULT_EPOCH_LENGTH, DEFAULT_LOCK_DURATION, DEFAULT_MULTICURVE_LOWER_TICKS, DEFAULT_MULTICURVE_MAX_SUPPLY_SHARES, DEFAULT_MULTICURVE_NUM_POSITIONS, DEFAULT_MULTICURVE_UPPER_TICKS, DEFAULT_OPENING_AUCTION_DURATION, DEFAULT_OPENING_AUCTION_FEE, DEFAULT_OPENING_AUCTION_INCENTIVE_SHARE_BPS, DEFAULT_OPENING_AUCTION_MIN_ACCEPTABLE_TICK_TOKEN0, DEFAULT_OPENING_AUCTION_MIN_ACCEPTABLE_TICK_TOKEN1, DEFAULT_OPENING_AUCTION_MIN_LIQUIDITY, DEFAULT_OPENING_AUCTION_SHARE_TO_AUCTION_BPS, DEFAULT_OPENING_DOPPLER_DURATION, DEFAULT_OPENING_DOPPLER_EPOCH_LENGTH, DEFAULT_OPENING_DOPPLER_FEE, DEFAULT_OPENING_DOPPLER_NUM_PD_SLUGS, DEFAULT_OPENING_DOPPLER_TICK_SPACING, DEFAULT_PD_SLUGS, DEFAULT_V3_END_TICK, DEFAULT_V3_FEE, DEFAULT_V3_INITIAL_PROPOSAL_THRESHOLD, DEFAULT_V3_INITIAL_SUPPLY, DEFAULT_V3_INITIAL_VOTING_DELAY, DEFAULT_V3_INITIAL_VOTING_PERIOD, DEFAULT_V3_MAX_SHARE_TO_BE_SOLD, DEFAULT_V3_NUM_POSITIONS, DEFAULT_V3_NUM_TOKENS_TO_SELL, DEFAULT_V3_PRE_MINT, DEFAULT_V3_START_TICK, DEFAULT_V3_VESTING_DURATION, DEFAULT_V3_YEARLY_MINT_RATE, DEFAULT_V4_INITIAL_PROPOSAL_THRESHOLD, DEFAULT_V4_INITIAL_VOTING_DELAY, DEFAULT_V4_INITIAL_VOTING_PERIOD, DEFAULT_V4_YEARLY_MINT_RATE, _default$1 as DERC2080Bytecode, _default$2 as DERC20Bytecode, DOPPLER_FLAGS, DOPPLER_MAX_TICK_SPACING, DYNAMIC_FEE_FLAG, Derc20, Derc20V2, _default$5 as DopplerBytecode, _default$4 as DopplerDN404Bytecode, DopplerERC20V1, type DopplerERC20V1TokenConfig, DopplerFactory, type DopplerHookMigrationConfig, DopplerSDK, type DopplerSDKConfig, DynamicAuction, DynamicAuctionBuilder, type DynamicAuctionConfig, type DynamicAuctionMarketCapConfig, type DynamicMarketCapRange, Eth, FEE_AMOUNT_MASK, FEE_TIERS, FLAG_MASK, type FeeTier, type GovernanceLaunchpad, type GovernanceOption, type HookInfo, INT24_MAX, INT24_MIN, LAUNCHPAD_ENABLED_CHAIN_IDS, type LaunchpadEnabledChainId, type LockablePoolState, LockablePoolStatus, type LockableV3InitializerParams, MAX_SQRT_RATIO, MAX_TICK, MIN_SQRT_RATIO, MIN_TICK, type MarketCapConfig, type MarketCapRange, type MarketCapValidationResult, type MigrationConfig, type MigrationEncoder, type ModuleAddressOverrides, MulticurveBuilder, type MulticurveBundleExactInResult, type MulticurveBundleExactOutResult, type MulticurveDecayFeeSchedule, MulticurveFees, type MulticurveFeesOptions, type MulticurveInitializerConfig, type MulticurveMarketCapCurvesConfig, type MulticurveMarketCapPreset, type MulticurveMarketCapRangeCurve, type MulticurveMaxTickLiquidityParams, type MulticurvePendingFees, type MulticurveFeesOptions as MulticurvePendingFeesOptions, MulticurvePool, type MulticurvePoolState, type MulticurveTokenPendingFeeBreakdown, type MulticurveTokenPendingFees, NO_OP_ENABLED_CHAIN_IDS, type NoOpEnabledChainId, type NormalizedRehypeDopplerHookInitializerConfig, OPENING_AUCTION_FLAGS, OPENING_AUCTION_PHASE_ACTIVE, OPENING_AUCTION_PHASE_CLOSED, OPENING_AUCTION_PHASE_NOT_STARTED, OPENING_AUCTION_PHASE_SETTLED, OPENING_AUCTION_STATUS_ACTIVE, OPENING_AUCTION_STATUS_DOPPLER_ACTIVE, OPENING_AUCTION_STATUS_EXITED, OPENING_AUCTION_STATUS_UNINITIALIZED, OpeningAuction, type OpeningAuctionAuctionSettledEvent, type OpeningAuctionBidArgs, type OpeningAuctionBidConstraints, type OpeningAuctionBidLookupArgs, OpeningAuctionBidManager, type OpeningAuctionBidManagerConfig, type OpeningAuctionBidPlacedEvent, type OpeningAuctionBidPositionInfo, type OpeningAuctionBidQuote, type OpeningAuctionBidSimulationResult, type OpeningAuctionBidStatus, type OpeningAuctionBidValidationResult, type OpeningAuctionBidWithdrawnEvent, OpeningAuctionBuilder, _default$3 as OpeningAuctionBytecode, type OpeningAuctionClaimAllIncentivesPreview, type OpeningAuctionClaimAllIncentivesResult, type OpeningAuctionClaimIncentivesSimulationResult, type OpeningAuctionCompleteResult, type OpeningAuctionConfig, type OpeningAuctionCreateResult, type OpeningAuctionDopplerConfig, type OpeningAuctionEstimatedClearingTickUpdatedEvent, type OpeningAuctionIncentiveData, type OpeningAuctionIncentivesClaimedEvent, OpeningAuctionLifecycle, type OpeningAuctionModifyLiquidityParams, type OpeningAuctionModifyLiquiditySimulationResult, type OpeningAuctionModuleAddressOverrides, type OpeningAuctionMoveBidArgs, type OpeningAuctionMoveBidResult, type OpeningAuctionMoveBidSimulationResult, type OpeningAuctionOwnerBidInfo, type OpeningAuctionOwnerBidStatus, OpeningAuctionPhase, type OpeningAuctionPhaseChangedEvent, type OpeningAuctionPosition, OpeningAuctionPositionManager, type OpeningAuctionQuoteFromTokenAmountArgs, type OpeningAuctionQuoteFromTokenAmountResult, type OpeningAuctionSettlementData, type OpeningAuctionState, OpeningAuctionStatus, type OpeningAuctionWatchBidPlacedOptions, type OpeningAuctionWatchBidStatusOptions, type OpeningAuctionWatchBidWithdrawnOptions, type OpeningAuctionWatchEstimatedClearingTickOptions, type OpeningAuctionWatchIncentivesClaimedOptions, type OpeningAuctionWatchPhaseChangeOptions, type OpeningAuctionWatchSettlementOptions, type OpeningAuctionWithdrawFullBidArgs, type OpeningAuctionWithdrawFullBidResult, type OpeningAuctionWithdrawFullBidSimulationResult, type PoolInfo, type ProceedsSplitConfig, Q96, type QuoteResult, Quoter, RehypeDopplerHook, type RehypeDopplerHookConfig, RehypeDopplerHookInitializer, type RehypeDopplerHookInitializerConfig, RehypeDopplerHookMigrator, type RehypeDopplerHookMigratorConfig, type RehypeFeeDistributionInfo, RehypeFeeRoutingMode, type RehypePendingFees, type ResolvedOpeningAuctionDopplerConfig, SECONDS_PER_DAY, SECONDS_PER_YEAR, SUPPORTED_CHAIN_IDS, type SaleConfig, _default as StateViewBytecode, StaticAuction, StaticAuctionBuilder, type StaticAuctionMarketCapConfig, type StaticPoolConfig, type StreamableFeesConfig, type SupportedChain, type SupportedChainId, type SupportedChainKey, type SupportedPublicClient, TICK_SPACINGS, type TokenAddressHookConfig, type TokenAddressMiningParams, type TokenAddressMiningResult, type TokenConfig, type TokenVariant, TopUpDistributor, type TopUpParams, type TopUpSimulationResult, type TopUpTransaction, type UniswapV2MigrationConfig, type UniswapV2SplitMigrationConfig, type UniswapV4MigrationConfig, type UniswapV4SplitMigrationConfig, V3_FEE_TIERS, type V4PoolKey, V4_MAX_FEE, VALID_FEE_TIERS, VERSION, type VestingAllocationConfig, type VestingConfig, type VestingScheduleConfig, WAD, ZERO_ADDRESS, airlockAbi, applyTickOffsets, bundlerAbi, calculateFDV, calculateGamma, calculateMarketCap, calculateTickRange, calculateTokensToSell, computeOptimalGamma, computePoolId, createAirlockBeneficiary, decayMulticurveInitializerHookAbi, decodeBalanceDelta, derc20Abi, derc20V2Abi, dopplerERC20V1Abi, dopplerHookAbi, dopplerHookInitializerAbi, dopplerLensAbi, encodeRehypeDopplerHookInitializerData, encodeRehypeDopplerHookMigratorCalldata, estimatePriceAtEpoch, estimateSlippage, feeClaimsInitializerAbi, feesManagerAbi, formatTickAsPrice, getAddresses, getAirlockBeneficiary, getAirlockOwner, getAmount0ForLiquidity, getAmount1ForLiquidity, getLiquidityForAmount0, getLiquidityForAmount1, getMaxLiquiditySafeMulticurveTickUpper, getMaxTickRounded, getNearestUsableTick, getSqrtRatioAtTick, getTickAtSqrtRatio, isLaunchpadEnabledChain, isNoOpEnabledChain, isSupportedChainId, isToken0Expected, isToken1, lockableUniswapV3InitializerAbi, marketCapToTickForMulticurve, marketCapToTicksForDynamicAuction, marketCapToTicksForMulticurve, marketCapToTicksForStaticAuction, marketCapToTokenPrice, mineTokenAddress, normalizeBeneficiaries, normalizePoolKey, normalizeRehypeDopplerHookInitializerConfig, openingAuctionAbi, openingAuctionInitializerAbi, openingAuctionPositionManagerAbi, poolManagerAbi, priceToSqrtPriceX96, priceToTick, quoterV2Abi, ratioToTick, rehypeDopplerHookAbi, rehypeDopplerHookInitializerAbi, rehypeDopplerHookMigratorAbi, resolveGasEstimate, sortBeneficiaries, sqrtPriceX96ToPrice, streamableFeesLockerAbi, streamableFeesLockerV2Abi, tickToMarketCap, tickToPrice, tokenPriceToRatio, topUpDistributorAbi, uniswapV2Router02Abi, uniswapV3InitializerAbi, uniswapV3PoolAbi, uniswapV4InitializerAbi, v2MigratorAbi, v3MigratorAbi, v4MigratorAbi, v4MulticurveInitializerAbi, v4MulticurveMigratorAbi, v4QuoterAbi, validateMarketCapParameters, weth9Abi };
|
package/dist/evm/index.js
CHANGED
|
@@ -22,10 +22,10 @@ var GENERATED_DOPPLER_DEPLOYMENTS = {
|
|
|
22
22
|
LockableUniswapV3Initializer: "0xA2E0435225D52a8B950122752978007D758056d7",
|
|
23
23
|
NoOpGovernanceFactory: "0xddAE8B3eD08184682f7Bc32B74d943cEEfEab638",
|
|
24
24
|
NoOpMigrator: "0x233A71A7bB928b1357A1Ebf454298320989Ca5B5",
|
|
25
|
-
Quoter: "
|
|
25
|
+
Quoter: "0x076838736F90Cd1d30dED756A3B89E576BE972F8",
|
|
26
26
|
RehypeDopplerHook: "0x3Ec4798A9B11e8243A8Db99687f7A23597B96623",
|
|
27
|
-
RehypeDopplerHookInitializer: "
|
|
28
|
-
RehypeDopplerHookMigrator: "
|
|
27
|
+
RehypeDopplerHookInitializer: "0x9982538F41f2ae29ddb9d3D9307010052984FDbB",
|
|
28
|
+
RehypeDopplerHookMigrator: "0x975f9d1939cf6e4A3c9D99f9d41e6411CF4dA23b",
|
|
29
29
|
StreamableFeesLocker: "0xe24FC2F7191e850e2D4514aBb4d39305b1871eC6",
|
|
30
30
|
StreamableFeesLockerV2: "0xcE3212e6536F33cD6fbFEE265224131353Ca3D47",
|
|
31
31
|
TimelockFactory: "0x9fd40af2baAfAF03513f091444e821c0d5b06ea0",
|
|
@@ -75,10 +75,10 @@ var GENERATED_DOPPLER_DEPLOYMENTS = {
|
|
|
75
75
|
LockableUniswapV3Initializer: "0x8b4C7DB9121FC885689C0A50D5a1429F15AEc2a0",
|
|
76
76
|
NoOpGovernanceFactory: "0xb4deE32EB70A5E55f3D2d861F49Fb3D79f7a14d9",
|
|
77
77
|
NoOpMigrator: "0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731",
|
|
78
|
-
Quoter: "
|
|
78
|
+
Quoter: "0x076838736F90Cd1d30dED756A3B89E576BE972F8",
|
|
79
79
|
RehypeDopplerHook: "0x97cAD5684FB7Cc2bEd9a9b5eBfba67138F4f2503",
|
|
80
|
-
RehypeDopplerHookInitializer: "
|
|
81
|
-
RehypeDopplerHookMigrator: "
|
|
80
|
+
RehypeDopplerHookInitializer: "0x9982538F41f2ae29ddb9d3D9307010052984FDbB",
|
|
81
|
+
RehypeDopplerHookMigrator: "0x975f9d1939cf6e4A3c9D99f9d41e6411CF4dA23b",
|
|
82
82
|
StreamableFeesLocker: "0x63f8C8F9beFaab2FaCD7Ece0b0242f78B920Ee90",
|
|
83
83
|
StreamableFeesLockerV2: "0xcE3212e6536F33cD6fbFEE265224131353Ca3D47",
|
|
84
84
|
TimelockFactory: "0x44610355465c1F5914C8B8ea0E7c887CC67459b2",
|
|
@@ -140,9 +140,9 @@ var GENERATED_DOPPLER_DEPLOYMENTS = {
|
|
|
140
140
|
LockableUniswapV3Initializer: "0xde8886A0019Ea060B8378Ee37b8A23b8117F29A3",
|
|
141
141
|
NoOpGovernanceFactory: "0x85f37f74Ef2478A770318bc810177a9835911aD7",
|
|
142
142
|
NoOpMigrator: "0xba2F330EDb16cD8056f5988d8CE19BbC63475A0e",
|
|
143
|
-
Quoter: "
|
|
144
|
-
RehypeDopplerHookInitializer: "
|
|
145
|
-
RehypeDopplerHookMigrator: "
|
|
143
|
+
Quoter: "0x076838736F90Cd1d30dED756A3B89E576BE972F8",
|
|
144
|
+
RehypeDopplerHookInitializer: "0x9982538F41f2ae29ddb9d3D9307010052984FDbB",
|
|
145
|
+
RehypeDopplerHookMigrator: "0x975f9d1939cf6e4A3c9D99f9d41e6411CF4dA23b",
|
|
146
146
|
StreamableFeesLockerV2: "0x7B6147AC3F615bdb764e7EbD5f517dac1AD163B8",
|
|
147
147
|
SwapRestrictorDopplerHook: "0xC16c826F75338A5Ea626f94f8992191B4ce5abA2",
|
|
148
148
|
TimelockFactory: "0x6076fdDFCaC0dD980e0350dfF5239feC3f86C578",
|
|
@@ -183,10 +183,10 @@ var GENERATED_DOPPLER_DEPLOYMENTS = {
|
|
|
183
183
|
LockableUniswapV3Initializer: "0xE0dC4012AC9C868F09c6e4b20d66ED46D6F258d0",
|
|
184
184
|
NoOpGovernanceFactory: "0xe7dfbd5b0A2C3B4464653A9beCdc489229eF090E",
|
|
185
185
|
NoOpMigrator: "0x6ddfED58D238Ca3195E49d8ac3d4cEa6386E5C33",
|
|
186
|
-
Quoter: "
|
|
186
|
+
Quoter: "0x076838736F90Cd1d30dED756A3B89E576BE972F8",
|
|
187
187
|
RehypeDopplerHook: "0x3Ec4798A9B11e8243A8Db99687f7A23597B96623",
|
|
188
|
-
RehypeDopplerHookInitializer: "
|
|
189
|
-
RehypeDopplerHookMigrator: "
|
|
188
|
+
RehypeDopplerHookInitializer: "0x9982538F41f2ae29ddb9d3D9307010052984FDbB",
|
|
189
|
+
RehypeDopplerHookMigrator: "0x975f9d1939cf6e4A3c9D99f9d41e6411CF4dA23b",
|
|
190
190
|
StreamableFeesLocker: "0x0A00775D71a42cd33D62780003035e7F5b47bD3A",
|
|
191
191
|
StreamableFeesLockerV2: "0xcE3212e6536F33cD6fbFEE265224131353Ca3D47",
|
|
192
192
|
TimelockFactory: "0xa636bD5F9179E80e9EdB371Ed90956fA5ebdCB33",
|
|
@@ -7358,37 +7358,18 @@ function normalizeUint32(value, label) {
|
|
|
7358
7358
|
}
|
|
7359
7359
|
return normalized;
|
|
7360
7360
|
}
|
|
7361
|
-
function encodeRehypeDopplerHookInitializerData(numeraire, config
|
|
7362
|
-
|
|
7363
|
-
return encodeAbiParameters(rehypeInitializerDataAbi, [
|
|
7364
|
-
{
|
|
7365
|
-
numeraire,
|
|
7366
|
-
buybackDst: config.buybackDestination ?? ZERO_ADDRESS,
|
|
7367
|
-
startFee: config.startFee,
|
|
7368
|
-
endFee: config.endFee,
|
|
7369
|
-
durationSeconds: config.durationSeconds,
|
|
7370
|
-
startingTime: config.startingTime,
|
|
7371
|
-
feeRoutingMode: config.feeRoutingMode,
|
|
7372
|
-
feeDistributionInfo: config.feeDistributionInfo,
|
|
7373
|
-
feeBeneficiaries: config.feeBeneficiaries ?? []
|
|
7374
|
-
}
|
|
7375
|
-
]);
|
|
7376
|
-
}
|
|
7377
|
-
if (config.feeBeneficiaries !== void 0) {
|
|
7378
|
-
throw new Error(
|
|
7379
|
-
"Rehype fee beneficiaries are temporarily supported only on Base Sepolia until the remaining initializer deployments are upgraded"
|
|
7380
|
-
);
|
|
7381
|
-
}
|
|
7382
|
-
return encodeAbiParameters(legacyRehypeInitializerDataAbi, [
|
|
7361
|
+
function encodeRehypeDopplerHookInitializerData(numeraire, config) {
|
|
7362
|
+
return encodeAbiParameters(rehypeInitializerDataAbi, [
|
|
7383
7363
|
{
|
|
7384
7364
|
numeraire,
|
|
7385
|
-
buybackDst: config.buybackDestination,
|
|
7365
|
+
buybackDst: config.buybackDestination ?? ZERO_ADDRESS,
|
|
7386
7366
|
startFee: config.startFee,
|
|
7387
7367
|
endFee: config.endFee,
|
|
7388
7368
|
durationSeconds: config.durationSeconds,
|
|
7389
7369
|
startingTime: config.startingTime,
|
|
7390
7370
|
feeRoutingMode: config.feeRoutingMode,
|
|
7391
|
-
feeDistributionInfo: config.feeDistributionInfo
|
|
7371
|
+
feeDistributionInfo: config.feeDistributionInfo,
|
|
7372
|
+
feeBeneficiaries: config.feeBeneficiaries ?? []
|
|
7392
7373
|
}
|
|
7393
7374
|
]);
|
|
7394
7375
|
}
|
|
@@ -7406,25 +7387,6 @@ var feeDistributionComponents = [
|
|
|
7406
7387
|
{ name: "numeraireFeesToBeneficiaryWad", type: "uint256" },
|
|
7407
7388
|
{ name: "numeraireFeesToLpWad", type: "uint256" }
|
|
7408
7389
|
];
|
|
7409
|
-
var legacyRehypeInitializerDataAbi = [
|
|
7410
|
-
{
|
|
7411
|
-
type: "tuple",
|
|
7412
|
-
components: [
|
|
7413
|
-
{ name: "numeraire", type: "address" },
|
|
7414
|
-
{ name: "buybackDst", type: "address" },
|
|
7415
|
-
{ name: "startFee", type: "uint24" },
|
|
7416
|
-
{ name: "endFee", type: "uint24" },
|
|
7417
|
-
{ name: "durationSeconds", type: "uint32" },
|
|
7418
|
-
{ name: "startingTime", type: "uint32" },
|
|
7419
|
-
{ name: "feeRoutingMode", type: "uint8" },
|
|
7420
|
-
{
|
|
7421
|
-
name: "feeDistributionInfo",
|
|
7422
|
-
type: "tuple",
|
|
7423
|
-
components: feeDistributionComponents
|
|
7424
|
-
}
|
|
7425
|
-
]
|
|
7426
|
-
}
|
|
7427
|
-
];
|
|
7428
7390
|
var rehypeInitializerDataAbi = [
|
|
7429
7391
|
{
|
|
7430
7392
|
type: "tuple",
|
|
@@ -10935,8 +10897,7 @@ var DopplerFactory = class {
|
|
|
10935
10897
|
dopplerHookAddress = hookConfig.hookAddress;
|
|
10936
10898
|
onInitializationDopplerHookCalldata = encodeRehypeDopplerHookInitializerData(
|
|
10937
10899
|
params.sale.numeraire,
|
|
10938
|
-
hookConfig
|
|
10939
|
-
this.chainId
|
|
10900
|
+
hookConfig
|
|
10940
10901
|
);
|
|
10941
10902
|
graduationDopplerHookCalldata = hookConfig.graduationCalldata ?? "0x";
|
|
10942
10903
|
}
|
|
@@ -13228,9 +13189,11 @@ function parseMulticurveInitializerDiscoveryResult({
|
|
|
13228
13189
|
stateData
|
|
13229
13190
|
}) {
|
|
13230
13191
|
const parsedState = kind === "dopplerHook" ? parseDopplerHookInitializerState(stateData) : parseStandardInitializerState(stateData);
|
|
13231
|
-
const { numeraire, status, poolKey, farTick } = parsedState;
|
|
13192
|
+
const { numeraire, status, poolKey, farTick, dopplerHookAddress } = parsedState;
|
|
13232
13193
|
return {
|
|
13233
13194
|
initializerAddress,
|
|
13195
|
+
initializerKind: kind,
|
|
13196
|
+
dopplerHookAddress,
|
|
13234
13197
|
state: {
|
|
13235
13198
|
asset: tokenAddress,
|
|
13236
13199
|
numeraire,
|
|
@@ -13268,7 +13231,8 @@ function parseStandardInitializerState(stateData) {
|
|
|
13268
13231
|
numeraire: state.numeraire ?? state[0],
|
|
13269
13232
|
status: Number(state.status ?? state[1]),
|
|
13270
13233
|
poolKey: parseMulticurvePoolKey(state.poolKey ?? state[2]),
|
|
13271
|
-
farTick: Number(state.farTick ?? state[3])
|
|
13234
|
+
farTick: Number(state.farTick ?? state[3]),
|
|
13235
|
+
dopplerHookAddress: zeroAddress
|
|
13272
13236
|
};
|
|
13273
13237
|
}
|
|
13274
13238
|
function parseDopplerHookInitializerState(stateData) {
|
|
@@ -13277,7 +13241,8 @@ function parseDopplerHookInitializerState(stateData) {
|
|
|
13277
13241
|
numeraire: state.numeraire ?? state[0],
|
|
13278
13242
|
status: Number(state.status ?? state[4]),
|
|
13279
13243
|
poolKey: parseMulticurvePoolKey(state.poolKey ?? state[5]),
|
|
13280
|
-
farTick: Number(state.farTick ?? state[6])
|
|
13244
|
+
farTick: Number(state.farTick ?? state[6]),
|
|
13245
|
+
dopplerHookAddress: state.dopplerHook ?? state[2]
|
|
13281
13246
|
};
|
|
13282
13247
|
}
|
|
13283
13248
|
function isAbsentPoolReadFailure(error) {
|
|
@@ -13770,6 +13735,129 @@ var MulticurvePool = class {
|
|
|
13770
13735
|
return getMulticurveFeeSchedule(this.rpc, state);
|
|
13771
13736
|
}
|
|
13772
13737
|
};
|
|
13738
|
+
var REHYPE_NOT_CONFIGURED = {
|
|
13739
|
+
mode: "notConfigured",
|
|
13740
|
+
fees0: 0n,
|
|
13741
|
+
fees1: 0n
|
|
13742
|
+
};
|
|
13743
|
+
var REHYPE_UNSUPPORTED = {
|
|
13744
|
+
mode: "unsupported",
|
|
13745
|
+
fees0: 0n,
|
|
13746
|
+
fees1: 0n
|
|
13747
|
+
};
|
|
13748
|
+
async function getPendingFeeBreakdownForMulticurveTokens({
|
|
13749
|
+
client,
|
|
13750
|
+
beneficiary,
|
|
13751
|
+
tokenAddresses
|
|
13752
|
+
}) {
|
|
13753
|
+
if (tokenAddresses.length === 0) {
|
|
13754
|
+
return [];
|
|
13755
|
+
}
|
|
13756
|
+
const feeClient = client;
|
|
13757
|
+
const poolContexts = await discoverMulticurveFeePoolContexts(
|
|
13758
|
+
feeClient,
|
|
13759
|
+
tokenAddresses
|
|
13760
|
+
);
|
|
13761
|
+
const plans = poolContexts.map(
|
|
13762
|
+
(poolContext) => createPendingFeeBreakdownPreviewPlan(poolContext, beneficiary)
|
|
13763
|
+
);
|
|
13764
|
+
const calls = plans.flatMap(({ calls: planCalls }) => planCalls);
|
|
13765
|
+
const results = await callAggregate3(feeClient, calls);
|
|
13766
|
+
if (results.length !== calls.length) {
|
|
13767
|
+
throw new Error(
|
|
13768
|
+
"Multicall3 aggregate3 returned an incomplete pending fee breakdown result"
|
|
13769
|
+
);
|
|
13770
|
+
}
|
|
13771
|
+
let resultOffset = 0;
|
|
13772
|
+
return plans.map((plan) => {
|
|
13773
|
+
const planResults = results.slice(
|
|
13774
|
+
resultOffset,
|
|
13775
|
+
resultOffset + plan.calls.length
|
|
13776
|
+
);
|
|
13777
|
+
resultOffset += plan.calls.length;
|
|
13778
|
+
return decodePendingFeeBreakdownPreview(plan, planResults);
|
|
13779
|
+
});
|
|
13780
|
+
}
|
|
13781
|
+
function createPendingFeeBreakdownPreviewPlan(poolContext, beneficiary) {
|
|
13782
|
+
const poolId = computePoolId(poolContext.state.poolKey);
|
|
13783
|
+
const poolCalls = createPendingFeePreviewCalls(
|
|
13784
|
+
poolContext.initializerAddress,
|
|
13785
|
+
poolId,
|
|
13786
|
+
beneficiary
|
|
13787
|
+
);
|
|
13788
|
+
if (poolContext.initializerKind !== "dopplerHook" || poolContext.dopplerHookAddress === zeroAddress) {
|
|
13789
|
+
return {
|
|
13790
|
+
kind: "poolOnly",
|
|
13791
|
+
poolContext,
|
|
13792
|
+
calls: poolCalls
|
|
13793
|
+
};
|
|
13794
|
+
}
|
|
13795
|
+
return {
|
|
13796
|
+
kind: "rehype",
|
|
13797
|
+
poolContext,
|
|
13798
|
+
poolId,
|
|
13799
|
+
calls: [
|
|
13800
|
+
...poolCalls,
|
|
13801
|
+
createRehypeCapabilityProbe(poolContext.dopplerHookAddress, poolId),
|
|
13802
|
+
...createPendingFeePreviewCalls(
|
|
13803
|
+
poolContext.dopplerHookAddress,
|
|
13804
|
+
poolId,
|
|
13805
|
+
beneficiary
|
|
13806
|
+
)
|
|
13807
|
+
]
|
|
13808
|
+
};
|
|
13809
|
+
}
|
|
13810
|
+
function createRehypeCapabilityProbe(target, poolId) {
|
|
13811
|
+
return {
|
|
13812
|
+
target,
|
|
13813
|
+
allowFailure: true,
|
|
13814
|
+
callData: encodeFunctionData({
|
|
13815
|
+
abi: feesManagerAbi,
|
|
13816
|
+
functionName: "getPoolKey",
|
|
13817
|
+
args: [poolId]
|
|
13818
|
+
})
|
|
13819
|
+
};
|
|
13820
|
+
}
|
|
13821
|
+
function decodePendingFeeBreakdownPreview(plan, results) {
|
|
13822
|
+
const poolInitializerFees = calculatePendingFees(
|
|
13823
|
+
results.slice(0, PENDING_FEE_PREVIEW_CALL_COUNT)
|
|
13824
|
+
);
|
|
13825
|
+
return {
|
|
13826
|
+
tokenAddress: plan.poolContext.state.asset,
|
|
13827
|
+
poolInitializerFees,
|
|
13828
|
+
rehypeFees: plan.kind === "poolOnly" ? REHYPE_NOT_CONFIGURED : decodeRehypePendingFees(plan, results)
|
|
13829
|
+
};
|
|
13830
|
+
}
|
|
13831
|
+
function decodeRehypePendingFees(plan, results) {
|
|
13832
|
+
const capabilityResult = results[PENDING_FEE_PREVIEW_CALL_COUNT];
|
|
13833
|
+
if (!capabilityResult?.success || !capabilityResult.returnData || capabilityResult.returnData === "0x") {
|
|
13834
|
+
return REHYPE_UNSUPPORTED;
|
|
13835
|
+
}
|
|
13836
|
+
const poolKey = parseMulticurvePoolKey(
|
|
13837
|
+
decodeFunctionResult({
|
|
13838
|
+
abi: feesManagerAbi,
|
|
13839
|
+
functionName: "getPoolKey",
|
|
13840
|
+
data: capabilityResult.returnData
|
|
13841
|
+
})
|
|
13842
|
+
);
|
|
13843
|
+
if (poolKey.hooks === zeroAddress) {
|
|
13844
|
+
return REHYPE_UNSUPPORTED;
|
|
13845
|
+
}
|
|
13846
|
+
if (computePoolId(poolKey) !== plan.poolId) {
|
|
13847
|
+
throw new Error(
|
|
13848
|
+
"Rehype FeesManager pool key does not match the discovered pool"
|
|
13849
|
+
);
|
|
13850
|
+
}
|
|
13851
|
+
return {
|
|
13852
|
+
mode: "feesManager",
|
|
13853
|
+
...calculatePendingFees(
|
|
13854
|
+
results.slice(
|
|
13855
|
+
PENDING_FEE_PREVIEW_CALL_COUNT + 1,
|
|
13856
|
+
PENDING_FEE_PREVIEW_CALL_COUNT * 2 + 1
|
|
13857
|
+
)
|
|
13858
|
+
)
|
|
13859
|
+
};
|
|
13860
|
+
}
|
|
13773
13861
|
|
|
13774
13862
|
// src/evm/entities/auction/MulticurveFees.ts
|
|
13775
13863
|
var MulticurveFees = class {
|
|
@@ -13806,6 +13894,31 @@ var MulticurveFees = class {
|
|
|
13806
13894
|
}
|
|
13807
13895
|
return pendingFees;
|
|
13808
13896
|
}
|
|
13897
|
+
async getPendingFeeBreakdown(beneficiary, tokenAddressesOrOptions, options) {
|
|
13898
|
+
const hasTokenAddressOverride = isTokenAddressList(tokenAddressesOrOptions);
|
|
13899
|
+
const tokenAddresses = hasTokenAddressOverride ? tokenAddressesOrOptions : this.tokenAddresses;
|
|
13900
|
+
const callOptions = hasTokenAddressOverride ? options : tokenAddressesOrOptions;
|
|
13901
|
+
const tokenBatchSize = getTokenBatchSize(
|
|
13902
|
+
callOptions?.tokenBatchSize ?? this.options.tokenBatchSize
|
|
13903
|
+
);
|
|
13904
|
+
if (!tokenBatchSize || tokenAddresses.length <= tokenBatchSize) {
|
|
13905
|
+
return getPendingFeeBreakdownForMulticurveTokens({
|
|
13906
|
+
client: this.client,
|
|
13907
|
+
beneficiary,
|
|
13908
|
+
tokenAddresses
|
|
13909
|
+
});
|
|
13910
|
+
}
|
|
13911
|
+
let pendingFees = [];
|
|
13912
|
+
for (let index = 0; index < tokenAddresses.length; index += tokenBatchSize) {
|
|
13913
|
+
const batchPendingFees = await getPendingFeeBreakdownForMulticurveTokens({
|
|
13914
|
+
client: this.client,
|
|
13915
|
+
beneficiary,
|
|
13916
|
+
tokenAddresses: tokenAddresses.slice(index, index + tokenBatchSize)
|
|
13917
|
+
});
|
|
13918
|
+
pendingFees = [...pendingFees, ...batchPendingFees];
|
|
13919
|
+
}
|
|
13920
|
+
return pendingFees;
|
|
13921
|
+
}
|
|
13809
13922
|
};
|
|
13810
13923
|
function isTokenAddressList(value) {
|
|
13811
13924
|
return Array.isArray(value);
|