@steerprotocol/sdk 4.0.0-next.3 → 4.0.0-next.5
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/README.md +29 -0
- package/dist/index.cjs +72 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -13
- package/dist/index.d.mts +22 -13
- package/dist/index.mjs +72 -35
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -390,6 +390,8 @@ export interface ResolvedVaultContext extends VaultReadContext {
|
|
|
390
390
|
}
|
|
391
391
|
/** Exact implementation-specific readers and constructors, supplied by SDK integration code. */
|
|
392
392
|
export interface VaultImplementationBinding {
|
|
393
|
+
/** Exact indexed names associated with this implementation; omitted means unknown support. */
|
|
394
|
+
readonly beaconNames?: readonly string[];
|
|
393
395
|
readonly beaconAddress: Address;
|
|
394
396
|
readonly implementationAddress: Address;
|
|
395
397
|
readonly kind: VaultKind;
|
|
@@ -422,9 +424,9 @@ export declare class VaultResolver {
|
|
|
422
424
|
readonly amms: DeploymentRegistry<AmmAdapter>;
|
|
423
425
|
readonly lending: DeploymentRegistry<LendingAdapter>;
|
|
424
426
|
constructor(definition: VaultResolverDefinition, amms: DeploymentRegistry<AmmAdapter>, lending: DeploymentRegistry<LendingAdapter>);
|
|
425
|
-
resolve(steer: SteerNetwork, address: Address, options?:
|
|
427
|
+
resolve(steer: SteerNetwork, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
426
428
|
/** Bounded bulk identity pages at one block; compatibility uses four active loads. */
|
|
427
|
-
resolveMany(steer: SteerNetwork, addresses: readonly Address[], options?:
|
|
429
|
+
resolveMany(steer: SteerNetwork, addresses: readonly Address[], options?: VaultLoadOptions): Promise<readonly KnownSteerVault[]>;
|
|
428
430
|
/** Identity and accounting share a pinned block; dispatch custom constructors and methods. */
|
|
429
431
|
snapshots(steer: SteerNetwork, addresses: readonly Address[], options?: ReadOptions): Promise<readonly LiquidityVaultSnapshot[]>;
|
|
430
432
|
}
|
|
@@ -450,13 +452,15 @@ export declare class SteerNetwork {
|
|
|
450
452
|
get subgraphUrl(): string | undefined;
|
|
451
453
|
listUserVaults(request: UserVaultListRequest, options?: DataAdapterRequestOptions): Promise<UserVaultPage>;
|
|
452
454
|
listVaults(request?: VaultListRequest, options?: DataAdapterRequestOptions): Promise<Page<VaultMetadata>>;
|
|
453
|
-
|
|
454
|
-
|
|
455
|
+
/** Synchronous registration check with no RPC or HTTP; does not verify a particular vault. */
|
|
456
|
+
supportsVaultSnapshots(beaconName: string): boolean;
|
|
457
|
+
getVault(address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
458
|
+
getVaults(addresses: readonly Address[], options?: VaultLoadOptions): Promise<readonly KnownSteerVault[]>;
|
|
455
459
|
getVaultSnapshots(addresses: readonly Address[], options?: ReadOptions): Promise<readonly LiquidityVaultSnapshot<LiquidityPool>[]>;
|
|
456
460
|
getVaultUserPositions(addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
|
|
457
|
-
getLiquidityVault(address: Address, options?:
|
|
458
|
-
getLendingVault(address: Address, options?:
|
|
459
|
-
getCompositeVault(address: Address, options?:
|
|
461
|
+
getLiquidityVault(address: Address, options?: VaultLoadOptions): Promise<LiquidityVault>;
|
|
462
|
+
getLendingVault(address: Address, options?: VaultLoadOptions): Promise<LendingVault>;
|
|
463
|
+
getCompositeVault(address: Address, options?: VaultLoadOptions): Promise<CompositeVault>;
|
|
460
464
|
}
|
|
461
465
|
//#endregion
|
|
462
466
|
//#region src/vault/vault.d.ts
|
|
@@ -520,6 +524,11 @@ interface VaultMetadata {
|
|
|
520
524
|
readonly id: string;
|
|
521
525
|
} | null;
|
|
522
526
|
}
|
|
527
|
+
/** Loading options. Supplied indexed metadata never replaces onchain identity checks. */
|
|
528
|
+
interface VaultLoadOptions extends ReadOptions {
|
|
529
|
+
/** Complete records for the requested addresses; omit to fetch from the subgraph. */
|
|
530
|
+
readonly metadata?: readonly VaultMetadata[];
|
|
531
|
+
}
|
|
523
532
|
interface VaultListRequest extends PageRequest {
|
|
524
533
|
/** Select a configured AMM using the same protocol/version rules as getAmm(). */
|
|
525
534
|
readonly amm?: VaultAmmFilter;
|
|
@@ -3545,15 +3554,15 @@ export declare class SteerClient {
|
|
|
3545
3554
|
readonly amm: InfinityCLAdapter;
|
|
3546
3555
|
})[]>;
|
|
3547
3556
|
getPools(request: PoolsLookupRequest): Promise<readonly DiscoveredPool[]>;
|
|
3548
|
-
getVault(chainId: number, address: Address, options?:
|
|
3549
|
-
getVaults(chainId: number, addresses: readonly Address[], options?:
|
|
3557
|
+
getVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
3558
|
+
getVaults(chainId: number, addresses: readonly Address[], options?: VaultLoadOptions): Promise<readonly KnownSteerVault[]>;
|
|
3550
3559
|
getVaultSnapshots(chainId: number, addresses: readonly Address[], options?: ReadOptions): Promise<readonly LiquidityVaultSnapshot<LiquidityPool>[]>;
|
|
3551
3560
|
getVaultUserPositions(chainId: number, addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
|
|
3552
3561
|
listUserVaults(request: UserVaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<UserVaultPage>;
|
|
3553
3562
|
listVaults(request: VaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<Page<VaultMetadata>>;
|
|
3554
|
-
getLiquidityVault(chainId: number, address: Address, options?:
|
|
3555
|
-
getLendingVault(chainId: number, address: Address, options?:
|
|
3556
|
-
getCompositeVault(chainId: number, address: Address, options?:
|
|
3563
|
+
getLiquidityVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<LiquidityVault<AmmAdapter<unknown, unknown, Readonly<Record<string, ContractDeployment>>, unknown>, LiquidityPool>>;
|
|
3564
|
+
getLendingVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<LendingVault<LendingAdapter<unknown, unknown, Readonly<Record<string, ContractDeployment>>>>>;
|
|
3565
|
+
getCompositeVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<CompositeVault>;
|
|
3557
3566
|
}
|
|
3558
3567
|
//#endregion
|
|
3559
3568
|
//#region src/data/uniswap-v3.d.ts
|
|
@@ -3670,5 +3679,5 @@ export declare class UniswapV4Vault extends LiquidityVault<UniswapV4Adapter, V4V
|
|
|
3670
3679
|
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3671
3680
|
}
|
|
3672
3681
|
//#endregion
|
|
3673
|
-
export { type AerodromeDepositPlan, type AerodromeDepositPreview, type AerodromeVaultSnapshot, type AerodromeWithdrawPlan, type AerodromeWithdrawPreview, type AlgebraContracts, type AlgebraIntegralContracts, type AlgebraIntegralPoolState, type AlgebraLegacyContracts, type AlgebraLegacyPoolLookupRequest, type AlgebraLegacyPoolState, type AlgebraLegacyPoolsLookupRequest, type AlgebraPoolLookupRequest, type AlgebraPoolReference, type AlgebraPoolState, type AlgebraPoolsLookupRequest, type AlgebraSwapFee, type AmmLookupRequest, type AmmProtocolAdapter, type AmmProtocolAdapters, type AmmProtocolVersion, type AmmVersion, type AssetAmount, type ConcentratedPoolState, type DepositPlan, type DepositPreview, type DepositQuote, type DepositRequest, type DiscoveredPool, type IndexerConfig, type InfinityCLContracts, type InfinityCLDirectionalFees, type InfinityCLPoolFees, type InfinityCLPoolIdReference, type InfinityCLPoolKey, type InfinityCLPoolKeyInput, type InfinityCLPoolLookupRequest, type InfinityCLPoolReference, type InfinityCLPoolState, type InfinityCLPoolsLookupRequest, type InfinityCLSwapQuoteRequest, type KnownSteerVault, type LiquidityDepositPreview, type LiquidityDepth, type LiquidityDepthRequest, type LiquidityDistribution, type LiquidityFees, type LiquidityInterval, type LiquidityPool, type LiquidityPosition, type LiquidityPositionRange, type LiquidityVaultRewards, type LiquidityVaultSnapshot, type LiquidityVaultUserPosition, type LogEvent, type Logger, type PoolLookupRequest, type PoolPrice, type PoolReadOptions, type PoolState, type PoolTicks, type PoolTokenBalance, type PoolsLookupRequest, type PrepareDepositRequest, type PrepareWithdrawRequest, type SlipstreamContracts, type SlipstreamPoolFees, type SlipstreamPoolLookupRequest, type SlipstreamPoolState, type SlipstreamPoolsLookupRequest, type SlipstreamQuoteOptions, type StrategyPosition, type SurroundingTicks, type SwapQuote, type SwapQuoteRequest, type TheGraphIndexerConfig, type TickLiquidity, type TickPoolState, type TickRange, type TokenPairAmounts, type UserVaultDiscoveryRequest, type UserVaultListRequest, type UserVaultPage, type V3Contracts, type V3PoolFees, type V3PoolLookupRequest, type V3PoolState, type V3PoolsLookupRequest, type V4Contracts, type V4DirectionalFees, type V4PoolFees, type V4PoolKey, type V4PoolLookupRequest, type V4PoolReference, type V4PoolState, type V4PoolsLookupRequest, type V4ReadOptions, type V4SwapQuoteRequest, type V4VaultPool, type VaultAmmFilter, type VaultDiscoveryRequest, type VaultListRequest, type VaultMetadata, type VaultRewardPayout, type VaultUnderlying, type VaultUserPosition, type WithdrawPlan, type WithdrawPreview, type WithdrawRequest, type WithdrawRewards, ethereumContracts as mainnetContracts };
|
|
3682
|
+
export { type AerodromeDepositPlan, type AerodromeDepositPreview, type AerodromeVaultSnapshot, type AerodromeWithdrawPlan, type AerodromeWithdrawPreview, type AlgebraContracts, type AlgebraIntegralContracts, type AlgebraIntegralPoolState, type AlgebraLegacyContracts, type AlgebraLegacyPoolLookupRequest, type AlgebraLegacyPoolState, type AlgebraLegacyPoolsLookupRequest, type AlgebraPoolLookupRequest, type AlgebraPoolReference, type AlgebraPoolState, type AlgebraPoolsLookupRequest, type AlgebraSwapFee, type AmmLookupRequest, type AmmProtocolAdapter, type AmmProtocolAdapters, type AmmProtocolVersion, type AmmVersion, type AssetAmount, type ConcentratedPoolState, type DepositPlan, type DepositPreview, type DepositQuote, type DepositRequest, type DiscoveredPool, type IndexerConfig, type InfinityCLContracts, type InfinityCLDirectionalFees, type InfinityCLPoolFees, type InfinityCLPoolIdReference, type InfinityCLPoolKey, type InfinityCLPoolKeyInput, type InfinityCLPoolLookupRequest, type InfinityCLPoolReference, type InfinityCLPoolState, type InfinityCLPoolsLookupRequest, type InfinityCLSwapQuoteRequest, type KnownSteerVault, type LiquidityDepositPreview, type LiquidityDepth, type LiquidityDepthRequest, type LiquidityDistribution, type LiquidityFees, type LiquidityInterval, type LiquidityPool, type LiquidityPosition, type LiquidityPositionRange, type LiquidityVaultRewards, type LiquidityVaultSnapshot, type LiquidityVaultUserPosition, type LogEvent, type Logger, type PoolLookupRequest, type PoolPrice, type PoolReadOptions, type PoolState, type PoolTicks, type PoolTokenBalance, type PoolsLookupRequest, type PrepareDepositRequest, type PrepareWithdrawRequest, type SlipstreamContracts, type SlipstreamPoolFees, type SlipstreamPoolLookupRequest, type SlipstreamPoolState, type SlipstreamPoolsLookupRequest, type SlipstreamQuoteOptions, type StrategyPosition, type SurroundingTicks, type SwapQuote, type SwapQuoteRequest, type TheGraphIndexerConfig, type TickLiquidity, type TickPoolState, type TickRange, type TokenPairAmounts, type UserVaultDiscoveryRequest, type UserVaultListRequest, type UserVaultPage, type V3Contracts, type V3PoolFees, type V3PoolLookupRequest, type V3PoolState, type V3PoolsLookupRequest, type V4Contracts, type V4DirectionalFees, type V4PoolFees, type V4PoolKey, type V4PoolLookupRequest, type V4PoolReference, type V4PoolState, type V4PoolsLookupRequest, type V4ReadOptions, type V4SwapQuoteRequest, type V4VaultPool, type VaultAmmFilter, type VaultDiscoveryRequest, type VaultListRequest, type VaultLoadOptions, type VaultMetadata, type VaultRewardPayout, type VaultUnderlying, type VaultUserPosition, type WithdrawPlan, type WithdrawPreview, type WithdrawRequest, type WithdrawRewards, ethereumContracts as mainnetContracts };
|
|
3674
3683
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -390,6 +390,8 @@ export interface ResolvedVaultContext extends VaultReadContext {
|
|
|
390
390
|
}
|
|
391
391
|
/** Exact implementation-specific readers and constructors, supplied by SDK integration code. */
|
|
392
392
|
export interface VaultImplementationBinding {
|
|
393
|
+
/** Exact indexed names associated with this implementation; omitted means unknown support. */
|
|
394
|
+
readonly beaconNames?: readonly string[];
|
|
393
395
|
readonly beaconAddress: Address;
|
|
394
396
|
readonly implementationAddress: Address;
|
|
395
397
|
readonly kind: VaultKind;
|
|
@@ -422,9 +424,9 @@ export declare class VaultResolver {
|
|
|
422
424
|
readonly amms: DeploymentRegistry<AmmAdapter>;
|
|
423
425
|
readonly lending: DeploymentRegistry<LendingAdapter>;
|
|
424
426
|
constructor(definition: VaultResolverDefinition, amms: DeploymentRegistry<AmmAdapter>, lending: DeploymentRegistry<LendingAdapter>);
|
|
425
|
-
resolve(steer: SteerNetwork, address: Address, options?:
|
|
427
|
+
resolve(steer: SteerNetwork, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
426
428
|
/** Bounded bulk identity pages at one block; compatibility uses four active loads. */
|
|
427
|
-
resolveMany(steer: SteerNetwork, addresses: readonly Address[], options?:
|
|
429
|
+
resolveMany(steer: SteerNetwork, addresses: readonly Address[], options?: VaultLoadOptions): Promise<readonly KnownSteerVault[]>;
|
|
428
430
|
/** Identity and accounting share a pinned block; dispatch custom constructors and methods. */
|
|
429
431
|
snapshots(steer: SteerNetwork, addresses: readonly Address[], options?: ReadOptions): Promise<readonly LiquidityVaultSnapshot[]>;
|
|
430
432
|
}
|
|
@@ -450,13 +452,15 @@ export declare class SteerNetwork {
|
|
|
450
452
|
get subgraphUrl(): string | undefined;
|
|
451
453
|
listUserVaults(request: UserVaultListRequest, options?: DataAdapterRequestOptions): Promise<UserVaultPage>;
|
|
452
454
|
listVaults(request?: VaultListRequest, options?: DataAdapterRequestOptions): Promise<Page<VaultMetadata>>;
|
|
453
|
-
|
|
454
|
-
|
|
455
|
+
/** Synchronous registration check with no RPC or HTTP; does not verify a particular vault. */
|
|
456
|
+
supportsVaultSnapshots(beaconName: string): boolean;
|
|
457
|
+
getVault(address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
458
|
+
getVaults(addresses: readonly Address[], options?: VaultLoadOptions): Promise<readonly KnownSteerVault[]>;
|
|
455
459
|
getVaultSnapshots(addresses: readonly Address[], options?: ReadOptions): Promise<readonly LiquidityVaultSnapshot<LiquidityPool>[]>;
|
|
456
460
|
getVaultUserPositions(addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
|
|
457
|
-
getLiquidityVault(address: Address, options?:
|
|
458
|
-
getLendingVault(address: Address, options?:
|
|
459
|
-
getCompositeVault(address: Address, options?:
|
|
461
|
+
getLiquidityVault(address: Address, options?: VaultLoadOptions): Promise<LiquidityVault>;
|
|
462
|
+
getLendingVault(address: Address, options?: VaultLoadOptions): Promise<LendingVault>;
|
|
463
|
+
getCompositeVault(address: Address, options?: VaultLoadOptions): Promise<CompositeVault>;
|
|
460
464
|
}
|
|
461
465
|
//#endregion
|
|
462
466
|
//#region src/vault/vault.d.ts
|
|
@@ -520,6 +524,11 @@ interface VaultMetadata {
|
|
|
520
524
|
readonly id: string;
|
|
521
525
|
} | null;
|
|
522
526
|
}
|
|
527
|
+
/** Loading options. Supplied indexed metadata never replaces onchain identity checks. */
|
|
528
|
+
interface VaultLoadOptions extends ReadOptions {
|
|
529
|
+
/** Complete records for the requested addresses; omit to fetch from the subgraph. */
|
|
530
|
+
readonly metadata?: readonly VaultMetadata[];
|
|
531
|
+
}
|
|
523
532
|
interface VaultListRequest extends PageRequest {
|
|
524
533
|
/** Select a configured AMM using the same protocol/version rules as getAmm(). */
|
|
525
534
|
readonly amm?: VaultAmmFilter;
|
|
@@ -3545,15 +3554,15 @@ export declare class SteerClient {
|
|
|
3545
3554
|
readonly amm: InfinityCLAdapter;
|
|
3546
3555
|
})[]>;
|
|
3547
3556
|
getPools(request: PoolsLookupRequest): Promise<readonly DiscoveredPool[]>;
|
|
3548
|
-
getVault(chainId: number, address: Address, options?:
|
|
3549
|
-
getVaults(chainId: number, addresses: readonly Address[], options?:
|
|
3557
|
+
getVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
3558
|
+
getVaults(chainId: number, addresses: readonly Address[], options?: VaultLoadOptions): Promise<readonly KnownSteerVault[]>;
|
|
3550
3559
|
getVaultSnapshots(chainId: number, addresses: readonly Address[], options?: ReadOptions): Promise<readonly LiquidityVaultSnapshot<LiquidityPool>[]>;
|
|
3551
3560
|
getVaultUserPositions(chainId: number, addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
|
|
3552
3561
|
listUserVaults(request: UserVaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<UserVaultPage>;
|
|
3553
3562
|
listVaults(request: VaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<Page<VaultMetadata>>;
|
|
3554
|
-
getLiquidityVault(chainId: number, address: Address, options?:
|
|
3555
|
-
getLendingVault(chainId: number, address: Address, options?:
|
|
3556
|
-
getCompositeVault(chainId: number, address: Address, options?:
|
|
3563
|
+
getLiquidityVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<LiquidityVault<AmmAdapter<unknown, unknown, Readonly<Record<string, ContractDeployment>>, unknown>, LiquidityPool>>;
|
|
3564
|
+
getLendingVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<LendingVault<LendingAdapter<unknown, unknown, Readonly<Record<string, ContractDeployment>>>>>;
|
|
3565
|
+
getCompositeVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<CompositeVault>;
|
|
3557
3566
|
}
|
|
3558
3567
|
//#endregion
|
|
3559
3568
|
//#region src/data/uniswap-v3.d.ts
|
|
@@ -3670,5 +3679,5 @@ export declare class UniswapV4Vault extends LiquidityVault<UniswapV4Adapter, V4V
|
|
|
3670
3679
|
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3671
3680
|
}
|
|
3672
3681
|
//#endregion
|
|
3673
|
-
export { type AerodromeDepositPlan, type AerodromeDepositPreview, type AerodromeVaultSnapshot, type AerodromeWithdrawPlan, type AerodromeWithdrawPreview, type AlgebraContracts, type AlgebraIntegralContracts, type AlgebraIntegralPoolState, type AlgebraLegacyContracts, type AlgebraLegacyPoolLookupRequest, type AlgebraLegacyPoolState, type AlgebraLegacyPoolsLookupRequest, type AlgebraPoolLookupRequest, type AlgebraPoolReference, type AlgebraPoolState, type AlgebraPoolsLookupRequest, type AlgebraSwapFee, type AmmLookupRequest, type AmmProtocolAdapter, type AmmProtocolAdapters, type AmmProtocolVersion, type AmmVersion, type AssetAmount, type ConcentratedPoolState, type DepositPlan, type DepositPreview, type DepositQuote, type DepositRequest, type DiscoveredPool, type IndexerConfig, type InfinityCLContracts, type InfinityCLDirectionalFees, type InfinityCLPoolFees, type InfinityCLPoolIdReference, type InfinityCLPoolKey, type InfinityCLPoolKeyInput, type InfinityCLPoolLookupRequest, type InfinityCLPoolReference, type InfinityCLPoolState, type InfinityCLPoolsLookupRequest, type InfinityCLSwapQuoteRequest, type KnownSteerVault, type LiquidityDepositPreview, type LiquidityDepth, type LiquidityDepthRequest, type LiquidityDistribution, type LiquidityFees, type LiquidityInterval, type LiquidityPool, type LiquidityPosition, type LiquidityPositionRange, type LiquidityVaultRewards, type LiquidityVaultSnapshot, type LiquidityVaultUserPosition, type LogEvent, type Logger, type PoolLookupRequest, type PoolPrice, type PoolReadOptions, type PoolState, type PoolTicks, type PoolTokenBalance, type PoolsLookupRequest, type PrepareDepositRequest, type PrepareWithdrawRequest, type SlipstreamContracts, type SlipstreamPoolFees, type SlipstreamPoolLookupRequest, type SlipstreamPoolState, type SlipstreamPoolsLookupRequest, type SlipstreamQuoteOptions, type StrategyPosition, type SurroundingTicks, type SwapQuote, type SwapQuoteRequest, type TheGraphIndexerConfig, type TickLiquidity, type TickPoolState, type TickRange, type TokenPairAmounts, type UserVaultDiscoveryRequest, type UserVaultListRequest, type UserVaultPage, type V3Contracts, type V3PoolFees, type V3PoolLookupRequest, type V3PoolState, type V3PoolsLookupRequest, type V4Contracts, type V4DirectionalFees, type V4PoolFees, type V4PoolKey, type V4PoolLookupRequest, type V4PoolReference, type V4PoolState, type V4PoolsLookupRequest, type V4ReadOptions, type V4SwapQuoteRequest, type V4VaultPool, type VaultAmmFilter, type VaultDiscoveryRequest, type VaultListRequest, type VaultMetadata, type VaultRewardPayout, type VaultUnderlying, type VaultUserPosition, type WithdrawPlan, type WithdrawPreview, type WithdrawRequest, type WithdrawRewards, ethereumContracts as mainnetContracts };
|
|
3682
|
+
export { type AerodromeDepositPlan, type AerodromeDepositPreview, type AerodromeVaultSnapshot, type AerodromeWithdrawPlan, type AerodromeWithdrawPreview, type AlgebraContracts, type AlgebraIntegralContracts, type AlgebraIntegralPoolState, type AlgebraLegacyContracts, type AlgebraLegacyPoolLookupRequest, type AlgebraLegacyPoolState, type AlgebraLegacyPoolsLookupRequest, type AlgebraPoolLookupRequest, type AlgebraPoolReference, type AlgebraPoolState, type AlgebraPoolsLookupRequest, type AlgebraSwapFee, type AmmLookupRequest, type AmmProtocolAdapter, type AmmProtocolAdapters, type AmmProtocolVersion, type AmmVersion, type AssetAmount, type ConcentratedPoolState, type DepositPlan, type DepositPreview, type DepositQuote, type DepositRequest, type DiscoveredPool, type IndexerConfig, type InfinityCLContracts, type InfinityCLDirectionalFees, type InfinityCLPoolFees, type InfinityCLPoolIdReference, type InfinityCLPoolKey, type InfinityCLPoolKeyInput, type InfinityCLPoolLookupRequest, type InfinityCLPoolReference, type InfinityCLPoolState, type InfinityCLPoolsLookupRequest, type InfinityCLSwapQuoteRequest, type KnownSteerVault, type LiquidityDepositPreview, type LiquidityDepth, type LiquidityDepthRequest, type LiquidityDistribution, type LiquidityFees, type LiquidityInterval, type LiquidityPool, type LiquidityPosition, type LiquidityPositionRange, type LiquidityVaultRewards, type LiquidityVaultSnapshot, type LiquidityVaultUserPosition, type LogEvent, type Logger, type PoolLookupRequest, type PoolPrice, type PoolReadOptions, type PoolState, type PoolTicks, type PoolTokenBalance, type PoolsLookupRequest, type PrepareDepositRequest, type PrepareWithdrawRequest, type SlipstreamContracts, type SlipstreamPoolFees, type SlipstreamPoolLookupRequest, type SlipstreamPoolState, type SlipstreamPoolsLookupRequest, type SlipstreamQuoteOptions, type StrategyPosition, type SurroundingTicks, type SwapQuote, type SwapQuoteRequest, type TheGraphIndexerConfig, type TickLiquidity, type TickPoolState, type TickRange, type TokenPairAmounts, type UserVaultDiscoveryRequest, type UserVaultListRequest, type UserVaultPage, type V3Contracts, type V3PoolFees, type V3PoolLookupRequest, type V3PoolState, type V3PoolsLookupRequest, type V4Contracts, type V4DirectionalFees, type V4PoolFees, type V4PoolKey, type V4PoolLookupRequest, type V4PoolReference, type V4PoolState, type V4PoolsLookupRequest, type V4ReadOptions, type V4SwapQuoteRequest, type V4VaultPool, type VaultAmmFilter, type VaultDiscoveryRequest, type VaultListRequest, type VaultLoadOptions, type VaultMetadata, type VaultRewardPayout, type VaultUnderlying, type VaultUserPosition, type WithdrawPlan, type WithdrawPreview, type WithdrawRequest, type WithdrawRewards, ethereumContracts as mainnetContracts };
|
|
3674
3683
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -11432,6 +11432,20 @@ function vaultMetadata(value) {
|
|
|
11432
11432
|
strategyToken: strategy === null ? null : Object.freeze({ id: String(strategy.id) })
|
|
11433
11433
|
});
|
|
11434
11434
|
}
|
|
11435
|
+
/** Validate and detach caller-owned metadata before any asynchronous resolution. */
|
|
11436
|
+
function captureVaultMetadata(addresses, values) {
|
|
11437
|
+
if (!Array.isArray(values)) throw new Error("Supplied vault metadata must be an array");
|
|
11438
|
+
const requested = new Set(addresses.map((address) => address.toLowerCase()));
|
|
11439
|
+
const records = /* @__PURE__ */ new Map();
|
|
11440
|
+
for (const value of values) {
|
|
11441
|
+
const metadata = vaultMetadata(value);
|
|
11442
|
+
if (!requested.has(metadata.id)) throw new Error(`Supplied vault metadata contains an unrequested address: ${metadata.id}`);
|
|
11443
|
+
if (records.has(metadata.id)) throw new Error(`Supplied vault metadata contains a duplicate address: ${metadata.id}`);
|
|
11444
|
+
records.set(metadata.id, metadata);
|
|
11445
|
+
}
|
|
11446
|
+
for (const address of requested) if (!records.has(address)) throw new Error(`Supplied vault metadata is missing address: ${address}`);
|
|
11447
|
+
return records;
|
|
11448
|
+
}
|
|
11435
11449
|
//#endregion
|
|
11436
11450
|
//#region src/vault/resolver-types.ts
|
|
11437
11451
|
let ProtocolContractRole = /* @__PURE__ */ function(ProtocolContractRole) {
|
|
@@ -14620,6 +14634,7 @@ async function readAerodromeBulkSnapshot(vault, data, rpc, beacon) {
|
|
|
14620
14634
|
//#region src/vault/adapters/aerodrome/deployment.ts
|
|
14621
14635
|
const baseAerodromeVaultMappings = /* @__PURE__ */ (() => Object.freeze(aerodromeVaultIdentities.map((identity) => {
|
|
14622
14636
|
const binding = Object.freeze({
|
|
14637
|
+
beaconNames: Object.freeze([identity.name]),
|
|
14623
14638
|
beaconAddress: identity.beacon,
|
|
14624
14639
|
implementationAddress: identity.implementation,
|
|
14625
14640
|
kind: "liquidity",
|
|
@@ -14666,22 +14681,14 @@ const baseAerodromeVaultProtocols = /* @__PURE__ */ (() => Object.freeze([
|
|
|
14666
14681
|
deployment
|
|
14667
14682
|
}))))();
|
|
14668
14683
|
const baseAerodromeVaultDiscovery = /* @__PURE__ */ (() => Object.freeze([
|
|
14669
|
-
|
|
14670
|
-
|
|
14671
|
-
|
|
14672
|
-
|
|
14673
|
-
|
|
14674
|
-
|
|
14675
|
-
|
|
14676
|
-
|
|
14677
|
-
poolFactory: true
|
|
14678
|
-
},
|
|
14679
|
-
{
|
|
14680
|
-
amm: aerodromeSlipstreamV3Base,
|
|
14681
|
-
beaconNames: Object.freeze(["AerodromeStakedPositionManagerV3"]),
|
|
14682
|
-
poolFactory: true
|
|
14683
|
-
}
|
|
14684
|
-
]))();
|
|
14684
|
+
aerodromeSlipstreamBase,
|
|
14685
|
+
aerodromeSlipstreamV2Base,
|
|
14686
|
+
aerodromeSlipstreamV3Base
|
|
14687
|
+
].map((amm) => Object.freeze({
|
|
14688
|
+
amm,
|
|
14689
|
+
beaconNames: Object.freeze(aerodromeVaultIdentities.filter((identity) => identity.deployments.includes(amm)).map((identity) => identity.name)),
|
|
14690
|
+
poolFactory: true
|
|
14691
|
+
}))))();
|
|
14685
14692
|
//#endregion
|
|
14686
14693
|
//#region src/amm/deployments/quickswap-integral-polygon.ts
|
|
14687
14694
|
/** Published deployment: https://docs.quickswap.exchange/overview/contracts-and-addresses */
|
|
@@ -15825,6 +15832,7 @@ const baseIntegralVaultDiscovery = /* @__PURE__ */ (() => Object.freeze({
|
|
|
15825
15832
|
beaconNames: Object.freeze(["MultiPositionQuickSwapIntegral"])
|
|
15826
15833
|
}))();
|
|
15827
15834
|
const baseIntegralVaultBinding = /* @__PURE__ */ (() => Object.freeze({
|
|
15835
|
+
beaconNames: baseIntegralVaultDiscovery.beaconNames,
|
|
15828
15836
|
beaconAddress: baseIntegralVaultIdentity.beacon,
|
|
15829
15837
|
implementationAddress: baseIntegralVaultIdentity.implementation,
|
|
15830
15838
|
kind: "liquidity",
|
|
@@ -15846,8 +15854,13 @@ const baseIntegralVaultProtocol = /* @__PURE__ */ (() => Object.freeze({
|
|
|
15846
15854
|
protocolAddress: quickSwapIntegralBase.definition.contracts.factory.address,
|
|
15847
15855
|
deployment: quickSwapIntegralBase
|
|
15848
15856
|
}))();
|
|
15857
|
+
const polygonIntegralVaultDiscovery = /* @__PURE__ */ (() => Object.freeze({
|
|
15858
|
+
amm: quickSwapIntegralPolygon,
|
|
15859
|
+
beaconNames: Object.freeze(["MultiPositionQuickSwapIntegral"])
|
|
15860
|
+
}))();
|
|
15849
15861
|
const polygonIntegralVaultBinding = /* @__PURE__ */ (() => Object.freeze({
|
|
15850
15862
|
...baseIntegralVaultBinding,
|
|
15863
|
+
beaconNames: polygonIntegralVaultDiscovery.beaconNames,
|
|
15851
15864
|
beaconAddress: polygonIntegralVaultIdentity.beacon,
|
|
15852
15865
|
implementationAddress: polygonIntegralVaultIdentity.implementation
|
|
15853
15866
|
}))();
|
|
@@ -15857,10 +15870,6 @@ const polygonIntegralVaultProtocol = /* @__PURE__ */ (() => Object.freeze({
|
|
|
15857
15870
|
protocolAddress: quickSwapIntegralPolygon.definition.contracts.factory.address,
|
|
15858
15871
|
deployment: quickSwapIntegralPolygon
|
|
15859
15872
|
}))();
|
|
15860
|
-
const polygonIntegralVaultDiscovery = /* @__PURE__ */ (() => Object.freeze({
|
|
15861
|
-
amm: quickSwapIntegralPolygon,
|
|
15862
|
-
beaconNames: Object.freeze(["MultiPositionQuickSwapIntegral"])
|
|
15863
|
-
}))();
|
|
15864
15873
|
//#endregion
|
|
15865
15874
|
//#region src/vault/adapters/algebra-integral/reader/batch-artifact.ts
|
|
15866
15875
|
const integralVaultBatchReaderRuntime = "0x6080604052600436101561001a575b341561230f575b600080fd5b60003560e01c806307dd8bd51461007a5780630d9737731461007557806314e4396b14610070578063663da5fd1461006b5780636e7436201461006657638092844f0361000e57610ad0565b610a5e565b6105ee565b610534565b6102c2565b346100155760c0366003190112610015576100f36101076100e46004356100a081610115565b6024356100ac81610115565b6044356100b881610115565b606435906100c582610115565b608435926100d284610126565b60a435946100df86610126565b610ebe565b919290604051948580956101ec565b6101e06101a08501526101e0840190610214565b9060020b6101c08301520390f35b6001600160a01b0381160361001557565b8060020b0361001557565b80516001600160a01b031682526101ea91906101409081906020818101516001600160a01b0316908501526040818101516001600160a01b0316908501526060818101516001600160a01b03169085015260808181015160020b9085015260a08181015161ffff169085015260c08181015160ff169085015260e08181015161ffff1690850152610100818101516001600160801b0316908501526101208181015160020b9085015201516001600160a01b0316910152565b565b60ff6040610180926101ff858251610131565b82602082015116610160860152015116910152565b906020808351928381520192019060005b8181106102325750505090565b9091926020608060019260608751805160020b835284810151858401526040810151600f0b60408401520151151560608201520194019101919091610225565b60806101c091610283848251610131565b60ff60208201511661016085015260ff60408201511661018085015260608101516101a08501520151910152565b6101e0810192916101ea9190610272565b34610015576080366003190112610015576004356102df81610115565b6024356102eb81610115565b600460206103416103356103358361032460443561030881610115565b6064359061031582610115565b61031d611030565b998b61295e565b80885201516001600160a01b031690565b6001600160a01b031690565b60405163313ce56760e01b815292839182905afa80156104c45761037291600091610515575b5060ff166020830152565b80516040015160049060209061039290610335906001600160a01b031681565b60405163313ce56760e01b815292839182905afa80156104c4576103c3916000916104e6575b5060ff166040830152565b8051602001516103dd90610335906001600160a01b031681565b6040516370a0823160e01b81526001600160a01b038416600482015290602090829060249082905afa9283156104c457610469936020926000916104c9575b50606084015282516040015161043c90610335906001600160a01b031681565b6040516370a0823160e01b81526001600160a01b0390921660048301529093849190829081906024820190565b03915afa80156104c45761049192600091610495575b506080820152604051918291826102b1565b0390f35b6104b7915060203d6020116104bd575b6104af8183610ba5565b810190610dab565b3861047f565b503d6104a5565b610dba565b6104e09150833d85116104bd576104af8183610ba5565b3861041c565b610508915060203d60201161050e575b6105008183610ba5565b810190611070565b386103b8565b503d6104f6565b61052e915060203d60201161050e576105008183610ba5565b38610367565b346100155760403660031901126100155761055c60243560043561055782610115565b612f29565b600080516020613136833981519152546040516001600160a01b039091168152602090f35b60005b8381106105945750506000910152565b8181015183820152602001610584565b906020916105bd81518092818552858086019101610581565b601f01601f1916010190565b6001600160a01b0390911681526040602082018190526105eb929101906105a4565b90565b34610015576101603660031901126100155760243560043561060f82610115565b6044359161061c83610115565b60e0366063190112610015576106328183612f29565b600080516020613136833981519152546001600160a01b0316610656610335611084565b6001600160a01b03909116148015906108eb575b8015610878575b8015610864575b610853576040516316f0115b60e01b8152906020826004816001600160a01b0385165afa9182156104c457600092610821575b50600091926107b56106bb611084565b6107306106c6611090565b61072060a4356106d461109c565b9061070b6106e06110a8565b946106fb6106ec610bc6565b6001600160a01b039099168952565b6001600160a01b03166020880152565b60408601526001600160a01b03166060850152565b6001600160a01b03166080830152565b6001600160a01b0386811660a0830190815260408051630373a1b160e51b81526004810196909652958216602486015297811660448501528151811660648501526020820151811660848501529381015160a48401526060810151841660c484015260800151831660e483015294519091166101048201529283908190610124820190565b0381305afa9182156104c4576107e1926107ef916000916107fe575b50604051938491602083016109e4565b03601f198101845283610ba5565b610491604051928392836105c9565b61081b91503d806000833e6108138183610ba5565b810190611346565b386107d1565b600092506108469060203d60201161084c575b61083e8183610ba5565b8101906110c9565b916106ab565b503d610834565b63b2f0dc1f60e01b60005260046000fd5b5061086d611090565b3f60a4351415610678565b506004602061088b610335610335611084565b604051635c60da1b60e01b815292839182905afa9081156104c4576000916108cc575b506108ba610335611090565b6001600160a01b039091161415610671565b6108e5915060203d60201161084c5761083e8183610ba5565b386108ae565b5060fb546001600160a01b038481169116141561066a565b906020808351928381520192019060005b8181106109215750505090565b9091926020610180600192610160875161093e83825160020b9052565b8085015160020b8386015260408181015161ffff16908401526060818101516001600160801b0316908401526080810151608084015260a081015160a084015261099860c082015160c08501906001600160801b03169052565b60e0818101516001600160801b03169084015261010081015161010084015261012081015161012084015261014081015161014084015201516101608201520194019101919091610914565b6103006101006105eb9360208452610a00602085018251610272565b602081015161020085015260408101516102208501526060810151610240850152608081015161026085015260a081015161028085015260c08101516102a085015260e08101516102c08501520151916102e0808201520190610903565b346100155761012036600319011261001557602435600435610a7f82610115565b604435610a8b81610115565b60c03660631901126100155761049192610aa4926117d7565b604051918291826109e4565b80610ac26101c0926105eb95946101ec565b816101a08201520190610214565b346100155760a036600319011261001557600435610aed81610115565b602435610af981610115565b60443591610b0683610115565b606435610b1281610115565b608435936001600160401b0385116100155736602386011215610015578460040135936001600160401b038511610015573660248660051b88010111610015576024610b5f960193612239565b9061049160405192839283610ab0565b634e487b7160e01b600052604160045260246000fd5b60a081019081106001600160401b03821117610ba057604052565b610b6f565b90601f801991011681019081106001600160401b03821117610ba057604052565b604051906101ea60c083610ba5565b604051906101ea61016083610ba5565b604051906101ea61018083610ba5565b604051906101ea61012083610ba5565b6040519061016082018281106001600160401b03821117610ba0576040526000610140838281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e082015282610100820152826101208201520152565b60405190606082018281106001600160401b03821117610ba0576040526000604083610c92610c05565b81528260208201520152565b6001600160401b038111610ba05760051b60200190565b60405190608082018281106001600160401b03821117610ba05760405260006060838281528260208201528260408201520152565b6040516110209190610cfc8382610ba5565b6080815291601f19018260005b828110610d1557505050565b602090610d20610cb5565b82828501015201610d09565b90610d3682610c9e565b610d436040519182610ba5565b8281528092610d54601f1991610c9e565b019060005b828110610d6557505050565b602090610d70610cb5565b82828501015201610d59565b634e487b7160e01b600052601160045260246000fd5b6001600160ff1b038114610da65760010190565b610d7c565b90816020910312610015575190565b6040513d6000823e3d90fd5b600019810191908211610da657565b908160081b918083056101001490151715610da657565b818102929160008212600160ff1b821416610da6578184051490151715610da657565b9060048201916000600484129112908015821691151617610da657565b9060018201916000600184129112908015821691151617610da657565b91909160008382019384129112908015821691151617610da657565b6000198114610da65760010190565b634e487b7160e01b600052603260045260246000fd5b8051821015610e9e5760209160051b010190565b610e74565b60020b60010190627fffff8213627fffff19831217610da657565b94959392610ee092610ed992610ed2610c68565b5087612392565b9482612512565b9290610eea610cea565b9560009360029390930b926001600160a01b0382169060010b5b8360010b811315610f20575050505050906105eb918452610ea3565b604051630633bf1f60e51b8152600182900b6004820152602081602481865afa9081156104c457600091611012575b50805b610f655750610f6090610d92565b610f04565b909192939495610f96610f77836126f8565b92610f8181610dc6565b169260ff610f8e86610dd5565b911690610e49565b8781128015611006575b610ff95760808214610fe85791610fe2610fd58293610fdb610fcb8f9c9b9a99989760020b8a61282e565b9180938491610e65565b9c610e8a565b528c610e8a565b50610f52565b908a5260020b979650505050505050565b5095949392919080610f52565b508860020b8113610fa0565b61102a915060203d81116104bd576104af8183610ba5565b38610f4f565b6040519061103d82610b85565b600060808361104a610c05565b81528260208201528260408201528260608201520152565b519060ff8216820361001557565b90816020910312610015576105eb90611062565b6064356105eb81610115565b6084356105eb81610115565b60c4356105eb81610115565b60e4356105eb81610115565b356105eb81610115565b51906101ea82610115565b9081602091031261001557516105eb81610115565b51906101ea82610126565b519061ffff8216820361001557565b51906001600160801b038216820361001557565b80929103916101e08312610015576040519061112782610b85565b610160829412610015576101c060809161113f610bd5565b611148826110be565b8152611156602083016110be565b6020820152611167604083016110be565b6040820152611178606083016110be565b60608201526111888483016110de565b8482015261119860a083016110e9565b60a08201526111a960c08301611062565b60c08201526111ba60e083016110e9565b60e08201526111cc61010083016110f8565b6101008201526111df61012083016110de565b6101208201526111f261014083016110be565b61014082015284526112076101608201611062565b60208501526112196101808201611062565b60408501526101a081015160608501520151910152565b81601f820112156100155780519061124782610c9e565b926112556040519485610ba5565b828452602061018081860194028301019181831161001557602001925b828410611280575050505090565b6101808483031261001557602061018091611299610be5565b6112a2876110de565b81526112af8388016110de565b838201526112bf604088016110e9565b60408201526112d0606088016110f8565b60608201526080870151608082015260a087015160a08201526112f560c088016110f8565b60c082015261130660e088016110f8565b60e0820152610100870151610100820152610120870151610120820152610140870151610140820152610160870151610160820152815201930192611272565b602081830312610015578051906001600160401b03821161001557016102e08183031261001557611375610bf5565b91611380818361110c565b83526101e0820151602084015261020082015160408401526102208201516060840152610240820151608084015261026082015160a084015261028082015160c08401526102a082015160e08401526102c08201516001600160401b038111610015576113ed9201611230565b61010082015290565b6040519061012082018281106001600160401b03821117610ba057604052606061010083611422611030565b8152600060208201526000604082015260008382015260006080820152600060a0820152600060c0820152600060e08201520152565b81601f820112156100155780516001600160401b038111610ba0576040519261148b601f8301601f191660200185610ba5565b81845260208284010111610015576105eb9160208085019101610581565b602081830312610015578051906001600160401b038211610015570160c081830312610015576114d7610bc6565b916114e182611062565b8352602082015160208401526040820151604084015260608201516001600160401b0381116100155781611516918401611458565b6060840152611527608083016110be565b608084015260a08201516001600160401b038111610015576115499201611458565b60a082015290565b9060206105eb9281815201906105a4565b906101e082820312610015576105eb9161110c565b9080601f8301121561001557815161158e81610c9e565b9261159c6040519485610ba5565b81845260208085019260051b82010192831161001557602001905b8282106115c45750505090565b6020809183516115d381610126565b8152019101906115b7565b90916060828403126100155781516001600160401b0381116100155783611606918401611577565b9260208301516001600160401b0381116100155781611626918501611577565b926040810151906001600160401b03821161001557019080601f8301121561001557815161165381610c9e565b926116616040519485610ba5565b81845260208085019260051b82010192831161001557602001905b8282106116895750505090565b60208091611696846110e9565b81520191019061167c565b6040519061018082018281106001600160401b03821117610ba0576040526000610160838281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e08201528261010082015282610120820152826101408201520152565b9061171582610c9e565b6117226040519182610ba5565b8281528092611733601f1991610c9e565b019060005b82811061174457505050565b60209061174f6116a1565b82828501015201611738565b600281901b91906001600160fe1b03811603610da657565b9061177d82610c9e565b61178a6040519182610ba5565b828152809261179b601f1991610c9e565b0190602036910137565b908160a0910312610015578051916020820151916040810151916105eb60806117d0606085016110f8565b93016110f8565b92916117eb826117e56113f6565b95612f29565b6040516367a44ca360e01b81526001600160a01b038381166004830152919091169190600081602481865afa9081156104c4576000916121fc575b506080810180516001600160a01b0316156121eb57602060a061185f9301516040518094819263f3b881a360e01b835260048301611551565b0381875afa9182156104c4576000926121c6575b50516001600160a01b03165b6001600160a01b0383811694911684148015919061218f575b8115612179575b5061085357604051635c60da1b60e01b8152906001600160a01b0316602082600481845afa9182156104c457600092612158575b506118e161033560646110b4565b14801590612139575b612128573f60a43503610853576040516316f0115b60e01b8152602081600481865afa9081156104c457600091612109575b5061192b6103356101046110b4565b6001600160a01b03821692908303610853576119966101e061194d60c46110b4565b61195760e46110b4565b604051630d97377360e01b81526001600160a01b0380881660048301529283166024820152911660448201526000606482015291829081906084820190565b0381305afa9081156104c4576000916120da575b508652604051630dfe168160e01b8152602081600481885afa9081156104c4576000916120bb575b50865151602001516119ec906001600160a01b0316610335565b6001600160a01b039091161480159061204a575b610853576040516380814ffb60e01b815290602082600481885afa9182156104c457600092612029575b50602087810192835260405163ef095f8d60e01b81529081600481895afa9081156104c45760009161200a575b506040880190815287515160200151611a7a90610335906001600160a01b031681565b6040516370a0823160e01b81526001600160a01b038416600482015290602090829060249082905afa9081156104c457600091611feb575b506060890190815288515160400151611ad590610335906001600160a01b031681565b6040516370a0823160e01b81526001600160a01b03851660048201529390602090859060249082905afa9384156104c457600094611fca575b5060808a01938452610101546001600160a01b0316801561085357604051634867e20360e11b81526001600160a01b03929092166004830152602090829060249082905afa80156104c45761271091600091611fab575b508060a08c015211938415611f9e575b50508215611f91575b5050611e77576040516304013ac360e51b815294600086600481875afa9081156104c45760009283978493611f64575b5083518851811490811591611f58575b50611e7757611bcd845161170b565b610100830152835115611f4f576040516318de2b9160e21b8152602081600481895afa9081156104c457600091611f30575b5060c083015260405163766f67a160e11b8152602081600481895afa9081156104c457600091611f11575b5060e083015260015b611c3d855161175b565b811015611c4c5760011b611c33565b92939495611c62611c5c85611773565b94610d2c565b9360009160301b915b8751811015611f05578a611c9f611c99611c8c84611c93611c8c828f610e8a565b5160020b90565b94610e8a565b60020b90565b9060020b12801590611ee9575b818c8215611ecb575b5050611e7757611cc58189610e8a565b5160020b611cd3828d610e8a565b5160020b611ce19184612f6e565b611ce96116a1565b90611cf4818a610e8a565b5160020b8252611d04818d610e8a565b5160020b6020830152611d178189610e8a565b5161ffff166040830152808c611d2d828c610e8a565b5160181b65ffffff00000016861791611d4591610e8a565b5160405163514ea4bf60e01b815262ffffff909116919091176004820152918a836024815a9360a094fa9283156104c4576000938491859186918791611e88575b506001600160801b031660e0850152611daa905b6001600160801b031660c0850152565b60a083015260808201526001600160801b038311611e7757818160608f81611e328f611e2c8f91888f84611e269160019f611c8c611e709f611c8c97611e0988928e6001600160801b03611e2097169101906001600160801b03169052565b611e11610cb5565b50611e1a610cb5565b50610e8a565b90612fe4565b96610e8a565b8d612fe4565b91604081015161010086015201516101208401526040810151610140840152015161016082015261010089015190611e6a8383610e8a565b52610e8a565b5001611c6b565b63234eceb960e01b60005260046000fd5b915050611d9a9550611daa9250611eb6915060a03d8111611ec4575b611eae8183610ba5565b8101906117a5565b939792945090929091611d86565b503d611ea4565b620d89e89250611ede91611c8c91610e8a565b60020b13818c611cb5565b50620d89e719611efc611c8c838b610e8a565b60020b12611cac565b50505050955050505050565b611f2a915060203d6020116104bd576104af8183610ba5565b38611c2a565b611f49915060203d6020116104bd576104af8183610ba5565b38611bff565b50955050505050565b90508351141538611bbe565b9193909750611f8592503d8091833e611f7d8183610ba5565b8101906115de565b96919290969138611bae565b5190511090503880611b7e565b5190511092503880611b75565b611fc4915060203d6020116104bd576104af8183610ba5565b38611b65565b611fe491945060203d6020116104bd576104af8183610ba5565b9238611b0e565b612004915060203d6020116104bd576104af8183610ba5565b38611ab2565b612023915060203d6020116104bd576104af8183610ba5565b38611a57565b61204391925060203d6020116104bd576104af8183610ba5565b9038611a2a565b5060405163d21220a760e01b8152602081600481885afa9081156104c45760009161209c575b508651516040015161208a906001600160a01b0316610335565b6001600160a01b039091161415611a00565b6120b5915060203d60201161084c5761083e8183610ba5565b38612070565b6120d4915060203d60201161084c5761083e8183610ba5565b386119d2565b6120fc91506101e03d8111612102575b6120f48183610ba5565b810190611562565b386119aa565b503d6120ea565b612122915060203d60201161084c5761083e8183610ba5565b3861191c565b633b35273960e01b60005260046000fd5b5061214761033560846110b4565b6001600160a01b03821614156118ea565b61217291925060203d60201161084c5761083e8183610ba5565b90386118d3565b60fb546001600160a01b0316141590503861189f565b600080516020613136833981519152549091506121b4906001600160a01b0316610335565b6001600160a01b038316141590611898565b61187f9192506121e49060203d60201161084c5761083e8183610ba5565b9190611873565b63aba4733960e01b60005260046000fd5b61221991503d806000833e6122118183610ba5565b8101906114a9565b38611826565b9190811015610e9e5760051b0190565b356105eb81610126565b94929091959395612248610c68565b5083158015612305575b6122d8576122609286612392565b9361226a82610d2c565b9360005b83811061227b5750505050565b620d89e719612296611c9961229184888861221f565b61222f565b1280156122e9575b6122d857806122bc6122b6612291600194888861221f565b8461282e565b6122c68289610e8a565b526122d18188610e8a565b500161226e565b633840ee2560e21b60005260046000fd5b50620d89e86122fc61229183878761221f565b60020b1361229e565b5060808411612252565b600080516020613136833981519152546004906020906001600160a01b0316604051635c60da1b60e01b815292839182905afa9081156104c45760009182918291612373575b50368280378136915af43d6000803e1561236e573d6000f35b3d6000fd5b61238c915060203d60201161084c5761083e8183610ba5565b38612355565b939261033561033560206123b66123c79460049783976123b0610c68565b9b61295e565b80895201516001600160a01b031690565b60405163313ce56760e01b815292839182905afa80156104c4576123f891600091612468575b5060ff166020840152565b81516040015160049060209061241890610335906001600160a01b031681565b60405163313ce56760e01b815292839182905afa80156104c4576101ea91600091612449575b5060ff166040840152565b612462915060203d60201161050e576105008183610ba5565b3861243e565b612481915060203d60201161050e576105008183610ba5565b386123ed565b634e487b7160e01b600052601260045260246000fd5b81156124b857600160ff1b8114600019831416610da6570590565b612487565b9060020b9081156124b85760020b0790565b600160ff1b8114610da6576000190190565b60081d90565b906000198201918213600116610da657565b81810392916000138015828513169184121617610da657565b9190918060020b620d89e7198112801561266c575b8015612660575b8015612658575b6125f85761255e91600061254a60018461249d565b92129081612640575b506126375760081d90565b908260020b6125716124e160018361249d565b926000821280612621575b612608575b604061258d82866124f9565b12156125f8576125a461259f82610e0f565b6124e7565b84136125e4575b60010b936125d061259f60016125cb6125c688830b98610e2c565b610dd5565b610dec565b918212156125df575060020b90565b905090565b92506125f261259f84610e0f565b926125ab565b6264847d60e41b60005260046000fd5b925061261b6124e161259f60018461249d565b92612581565b50612630611c996001876124bd565b151561257c565b6124e1906124cf565b61265091506001611c99916124bd565b151538612553565b506000612535565b508360020b811361252e565b50620d89e88460020b13612527565b60ff60409116019060ff8211610da657565b60ff60209116019060ff8211610da657565b60ff60109116019060ff8211610da657565b60ff60089116019060ff8211610da657565b60ff60049116019060ff8211610da657565b60ff60029116019060ff8211610da657565b60ff1660ff8114610da65760010190565b906000916001600160801b038116156127d9575b806001600160401b0360019216156127c6575b63ffffffff8116156127b3575b61ffff8116156127a0575b60ff81161561278d575b600f81161561277a575b6003811615612767575b161561275d57565b906105eb906126e7565b6127749060021c936126d5565b92612755565b6127879060041c936126c3565b9261274b565b61279a9060081c936126b1565b92612741565b6127ad9060101c9361269f565b92612737565b6127c09060201c9361268d565b9261272c565b6127d39060401c9361267b565b9261271f565b60809250821c61270c565b91908260c091031261001557815191602081015180600f0b81036100155791604082015161281181610126565b91606081015161282081610126565b9160a0608083015192015190565b91909160c061283b610cb5565b60029490940b80855260405163f30dba9360e01b8152600481019190915291829060249082906001600160a01b03165afa9081156104c4576101ea9160009160009161289c575b50600f0b60408501525b6020840181905215156060840152565b61288c92506128c3915060c03d60c0116128d0575b6128bb8183610ba5565b8101906127e4565b5050505091909190612882565b503d6128b1565b91908260c09103126100155781516128ee81610115565b9160208101516128fd81610126565b9161290a604083016110e9565b9161291760608201611062565b9160a0612926608084016110e9565b92015180151581036100155790565b9081602091031261001557516105eb81610126565b90816020910312610015576105eb906110f8565b9392612968610c05565b60405163c45a015560e01b815290956001600160a01b03169390602081600481885afa80156104c4576129ab91600091612f0a575b506001600160a01b03168752565b85516001600160a01b039384169316831480159190612eac575b50612d7e57604051630dfe168160e01b815291602083600481875afa9283156104c457600093612e8b575b506001600160a01b03909216602086019081529160405163d21220a760e01b815291602083600481885afa9283156104c457600093612e6a575b506001600160a01b039283166040880190815284519093168015908115612e4b575b50612d7e576001600160a01b038116612dae57509151905160405163d9a641e160e01b81526001600160a01b0392831660048201529116602482015290602090829060449082905afa80156104c4578291600091612d8f575b505b6001600160a01b031603612d7e576040516339db007960e21b815260c081600481855afa9081156104c45784600092838094819582958394612d37575b50612b389291612b21612b2b92612b16606089019a612b0f60e060c08c019b019b8c9061ffff169052565b60ff168952565b61ffff1660a08d0152565b60020b60808b0152565b6001600160a01b03168552565b60405163ef01df4f60e01b815292602084600481895afa9384156104c457600094612d16575b506001600160a01b039093166101408801908152926040516334324e9f60e21b8152916020836004818a5afa9283156104c457600093612ce5575b50612bac6101208a0193849060020b9052565b15948515612cd2575b508415612cb4575b508315612c9a575b8315612c87575b508215612c56575b5050612c4557602060049160405192838092630d34328160e11b82525afa80156104c4576101ea91600091612c16575b506001600160801b0316610100840152565b612c38915060203d602011612c3e575b612c308183610ba5565b81019061294a565b38612c04565b503d612c26565b63baf3f0f760e01b60005260046000fd5b516080161515915081612c6c575b503880612bd4565b51612c8091506001600160a01b0316610335565b1538612c64565b51617fff60029190910b13925038612bcc565b92506000612ca9845160020b90565b60020b131592612bc5565b6103e8919450612cc961ffff915161ffff1690565b16119238612bbd565b516001600160a01b031615945038612bb5565b612d0891935060203d602011612d0f575b612d008183610ba5565b810190612935565b9138612b99565b503d612cf6565b612d3091945060203d60201161084c5761083e8183610ba5565b9238612b5e565b915050612b2b9550612b389450612b219250612d6b915060c03d60c011612d77575b612d638183610ba5565b8101906128d7565b91985096909450612ae4565b503d612d59565b63178423dd60e01b60005260046000fd5b612da8915060203d60201161084c5761083e8183610ba5565b38612aa5565b9251612e1293602093909291612dd5906001600160a01b031691516001600160a01b031690565b6040516308f68db360e21b81526001600160a01b039485166004820152918416602483015290921660448301529092839190829081906064820190565b03915afa80156104c4578291600091612e2c575b50612aa7565b612e45915060203d60201161084c5761083e8183610ba5565b38612e26565b8451909150612e62906001600160a01b0316610335565b111538612a4c565b612e8491935060203d60201161084c5761083e8183610ba5565b9138612a2a565b612ea591935060203d60201161084c5761083e8183610ba5565b91386129f0565b60405163188c824d60e11b81529150602082600481875afa9182156104c457600092612ee9575b506001600160a01b0391821691161415386129c5565b612f0391925060203d60201161084c5761083e8183610ba5565b9038612ed3565b612f23915060203d60201161084c5761083e8183610ba5565b3861299d565b461490811591612f4c575b50612f3b57565b63f2f1096160e01b60005260046000fd5b6001600160a01b0316301415905038612f34565b9060018201809211610da657565b929162ffffff65ffffff00000091169160181b161760018101809111610da657612f988351610dc6565b92612fa38483613115565b612fad8183610e8a565b5115612fd45782612fbe8284610e8a565b5114611e7757612fce8591612f60565b16612fa3565b90612fe192939450610e8a565b52565b9091612fee610cb5565b92612ff98251610dc6565b938160020b9161300e8662ffffff8316613115565b613025602061301d8388610e8a565b510151151590565b1561306b5783613043611c9961303b8489610e8a565b515160020b90565b14613058576130528791612f60565b1661300e565b94505050506130679250610e8a565b5190565b93925060c0919695506130b19461308582899060020b9052565b60016020890152604051808097819463f30dba9360e01b835260048301919091602081019260020b9052565b03916001600160a01b03165afa9283156104c4576130ea936000916000916130ed575b506060870152604086015284611e6a8383610e8a565b50565b9050613108915060c03d60c0116128d0576128bb8183610ba5565b94509250505090386130d4565b604051602081019182526020815261312e604082610ba5565b519020169056fea3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50";
|
|
@@ -17536,6 +17545,7 @@ async function readUnderlyingForFactory(context, expectedFactory) {
|
|
|
17536
17545
|
const baseV3VaultResolver = /* @__PURE__ */ (() => Object.freeze({
|
|
17537
17546
|
reader: baseV3IdentityReader,
|
|
17538
17547
|
implementations: Object.freeze([Object.freeze({
|
|
17548
|
+
beaconNames: baseV3VaultDiscovery.beaconNames,
|
|
17539
17549
|
beaconAddress: baseV3VaultIdentity.beacon,
|
|
17540
17550
|
implementationAddress: baseV3VaultIdentity.implementation,
|
|
17541
17551
|
kind: "liquidity",
|
|
@@ -17550,7 +17560,12 @@ const baseV3VaultResolver = /* @__PURE__ */ (() => Object.freeze({
|
|
|
17550
17560
|
deployment: uniswapV3Base
|
|
17551
17561
|
})])
|
|
17552
17562
|
}))();
|
|
17563
|
+
const polygonV3VaultDiscovery = /* @__PURE__ */ (() => Object.freeze({
|
|
17564
|
+
amm: uniswapV3Polygon,
|
|
17565
|
+
beaconNames: Object.freeze(["MultiPositionUniswapV3"])
|
|
17566
|
+
}))();
|
|
17553
17567
|
const polygonV3VaultBinding = /* @__PURE__ */ (() => Object.freeze({
|
|
17568
|
+
beaconNames: polygonV3VaultDiscovery.beaconNames,
|
|
17554
17569
|
beaconAddress: polygonV3VaultIdentity.beacon,
|
|
17555
17570
|
implementationAddress: polygonV3VaultIdentity.implementation,
|
|
17556
17571
|
kind: "liquidity",
|
|
@@ -17564,19 +17579,25 @@ const polygonV3VaultProtocol = /* @__PURE__ */ (() => Object.freeze({
|
|
|
17564
17579
|
protocolAddress: uniswapV3Polygon.definition.contracts.factory.address,
|
|
17565
17580
|
deployment: uniswapV3Polygon
|
|
17566
17581
|
}))();
|
|
17567
|
-
const
|
|
17568
|
-
amm:
|
|
17569
|
-
beaconNames: Object.freeze(["
|
|
17582
|
+
const polygonSushiVaultDiscovery = /* @__PURE__ */ (() => Object.freeze({
|
|
17583
|
+
amm: sushiswapV3Polygon,
|
|
17584
|
+
beaconNames: Object.freeze(["MultiPositionSushi"])
|
|
17570
17585
|
}))();
|
|
17571
17586
|
const polygonSushiVaultBinding = /* @__PURE__ */ (() => Object.freeze({
|
|
17572
17587
|
...polygonV3VaultBinding,
|
|
17573
17588
|
readUnderlying: (context) => readUnderlyingForFactory(context, sushiswapV3Polygon.definition.contracts.factory.address),
|
|
17589
|
+
beaconNames: polygonSushiVaultDiscovery.beaconNames,
|
|
17574
17590
|
beaconAddress: polygonSushiVaultIdentity.beacon,
|
|
17575
17591
|
implementationAddress: polygonSushiVaultIdentity.implementation
|
|
17576
17592
|
}))();
|
|
17593
|
+
const polygonRetroVaultDiscovery = /* @__PURE__ */ (() => Object.freeze({
|
|
17594
|
+
amm: retroV3Polygon,
|
|
17595
|
+
beaconNames: Object.freeze(["MultiPositionRetro"])
|
|
17596
|
+
}))();
|
|
17577
17597
|
const polygonRetroVaultBinding = /* @__PURE__ */ (() => Object.freeze({
|
|
17578
17598
|
...polygonV3VaultBinding,
|
|
17579
17599
|
readUnderlying: (context) => readUnderlyingForFactory(context, retroV3Polygon.definition.contracts.factory.address),
|
|
17600
|
+
beaconNames: polygonRetroVaultDiscovery.beaconNames,
|
|
17580
17601
|
beaconAddress: polygonRetroVaultIdentity.beacon,
|
|
17581
17602
|
implementationAddress: polygonRetroVaultIdentity.implementation
|
|
17582
17603
|
}))();
|
|
@@ -17590,14 +17611,6 @@ const polygonRetroVaultProtocol = /* @__PURE__ */ (() => Object.freeze({
|
|
|
17590
17611
|
protocolAddress: retroV3Polygon.definition.contracts.factory.address,
|
|
17591
17612
|
deployment: retroV3Polygon
|
|
17592
17613
|
}))();
|
|
17593
|
-
const polygonSushiVaultDiscovery = /* @__PURE__ */ (() => Object.freeze({
|
|
17594
|
-
amm: sushiswapV3Polygon,
|
|
17595
|
-
beaconNames: Object.freeze(["MultiPositionSushi"])
|
|
17596
|
-
}))();
|
|
17597
|
-
const polygonRetroVaultDiscovery = /* @__PURE__ */ (() => Object.freeze({
|
|
17598
|
-
amm: retroV3Polygon,
|
|
17599
|
-
beaconNames: Object.freeze(["MultiPositionRetro"])
|
|
17600
|
-
}))();
|
|
17601
17614
|
//#endregion
|
|
17602
17615
|
//#region src/vault/adapters/uniswap-v3/reader/batch-artifact.ts
|
|
17603
17616
|
const v3VaultBatchReaderRuntime = "0x6080604052600436101561001a575b3415610e4c575b600080fd5b60003560e01c806314e4396b1461006a57806335347ed9146100655780633dfbc4fc14610060578063663da5fd1461005b5763832986680361000e576107ea565b6104b5565b6103d3565b610303565b346100155760403660031901126100155761009260243560043561008d826100ae565b610ee1565b602061009c610f4b565b6040516001600160a01b039091168152f35b6001600160a01b0381160361001557565b35906100ca826100ae565b565b60e09060c31901126100155760c490565b60e090606319011261001557606490565b80516001600160a01b031682526101609081906020818101516001600160a01b0316908501526040818101516001600160a01b03169085015260608181015162ffffff169085015260808181015160020b9085015260a0818101516001600160a01b03169085015260c08181015160020b9085015260e0818101516001600160801b0316908501526101008181015160ff16908501526101208181015160ff16908501526101408101516101408501520151910152565b906020808351928381520192019060005b8181106101c35750505090565b909192602061018060019261016087516101e083825160020b9052565b8085015160020b8386015260408181015161ffff16908401526060818101516001600160801b0316908401526080810151608084015260a081015160a084015261023a60c082015160c08501906001600160801b03169052565b60e0818101516001600160801b031690840152610100810151610100840152610120810151610120840152610140810151610140840152015161016082015201940191019190916101b6565b6102a061010061030093602084526102a26020850182516100ee565b60208101516101a085015260408101516101c085015260608101516101e0850152608081015161020085015260a081015161022085015260c081015161024085015260e08101516102608501520151916102808082015201906101a5565b90565b34610015576101a036600319011261001557600435610321816100ae565b60243561032d816100ae565b6080366043190112610015576103be916103b29161034a366100cc565b906103536109cf565b506103ac60405192610364846108bc565b604435610370816100ae565b845260643561037e816100ae565b602085015260843561038f816100ae565b604085015260a4356103a0816100ae565b60608501523690610a31565b92611348565b60405191829182610286565b0390f35b610180810192916100ca91906100ee565b34610015576040366003190112610015576004356103f0816100ae565b6024356001600160401b03811161001557366023820112156100155780600401356001600160401b038111610015573660248260051b84010111610015576103be92602461043f930190610ac2565b604051918291826103c2565b60005b83811061045e5750506000910152565b818101518382015260200161044e565b906020916104878151809281855285808601910161044b565b601f01601f1916010190565b6001600160a01b0390911681526040602082018190526103009291019061046e565b3461001557610160366003190112610015576004356024356104d6816100ae565b604435916104e3836100ae565b6104ec366100dd565b9161014435916104fc8282610ee1565b610504610f4b565b61051c61051086610b2a565b6001600160a01b031690565b6001600160a01b03909116148015906107d2575b801561075a575b8015610740575b61072f576040516316f0115b60e01b8152926020846004816001600160a01b0387165afa9384156106ee576000946106f3575b50610682906105f48661058660009798610b2a565b9261059360208301610b2a565b916105d36105a8606060408401359301610b2a565b936105c36105b4610918565b6001600160a01b039098168852565b6001600160a01b03166020870152565b60408501899052606085015260808401526001600160a01b031660a0830152565b6001600160a01b0386811660c083019081526040805163106530cd60e31b81526004810196909652958216602486015297811660448501528151811660648501526020820151811660848501529381015160a4840152606081015160c4840152608081015160e484015260a00151831661010483015294519091166101248201529283908190610144820190565b0381305afa9182156106ee576106ae926106bc916000916106cb575b5060405193849160208301610286565b03601f1981018452836108f7565b6103be60405192839283610493565b6106e891503d806000833e6106e081836108f7565b810190610d9c565b3861069e565b610b54565b60009450906105f461071f6106829360203d602011610728575b61071781836108f7565b810190610b3f565b95505090610571565b503d61070d565b63b2f0dc1f60e01b60005260046000fd5b5061074d60208501610b2a565b3f6040850135141561053e565b506004602061076e61051061051088610b2a565b604051635c60da1b60e01b815292839182905afa9081156106ee576000916107b3575b506107a161051060208701610b2a565b6001600160a01b039091161415610537565b6107cc915060203d6020116107285761071781836108f7565b38610791565b5060c9546001600160a01b0386811691161415610530565b3461001557610140366003190112610015576103be6103b2602435600435610811826100ae565b60443561081d816100ae565b6108398361082a366100dd565b936108336109cf565b50610ee1565b6103ac610844610f4b565b60c9549093906001600160a01b031660d3546001600160a01b031660d65460081c6001600160a01b0316916040519661087c886108bc565b6001600160a01b039081168852908116602088015290811660408701521660608501523690610a31565b634e487b7160e01b600052604160045260246000fd5b608081019081106001600160401b038211176108d757604052565b6108a6565b60e081019081106001600160401b038211176108d757604052565b90601f801991011681019081106001600160401b038211176108d757604052565b604051906100ca60e0836108f7565b604051906100ca610180836108f7565b604051906100ca610120836108f7565b604051906100ca60c0836108f7565b604051906100ca6040836108f7565b6040519061018082018281106001600160401b038211176108d7576040526000610160838281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e08201528261010082015282610120820152826101408201520152565b6040519061012082018281106001600160401b038211176108d7576040526060610100836109fb610965565b8152600060208201526000604082015260008382015260006080820152600060a0820152600060c0820152600060e08201520152565b91908260e091031261001557604051610a49816108dc565b60c0610aa68183958035610a5c816100ae565b85526020810135610a6c816100ae565b6020860152604081013560408601526060810135606086015260808101356080860152610a9b60a082016100bf565b60a0860152016100bf565b910152565b6001600160401b0381116108d75760051b60200190565b929192610acd610965565b50610ad784610aab565b91610ae560405193846108f7565b848352602083019460051b81019036821161001557945b818610610b10575050610300929350611db1565b602080918735610b1f816100ae565b815201950194610afc565b35610300816100ae565b51906100ca826100ae565b908160209103126100155751610300816100ae565b6040513d6000823e3d90fd5b519062ffffff8216820361001557565b51908160020b820361001557565b51906001600160801b038216820361001557565b519060ff8216820361001557565b91908261018091031261001557610160610bb8610927565b92610bc281610b34565b8452610bd060208201610b34565b6020850152610be160408201610b34565b6040850152610bf260608201610b60565b6060850152610c0360808201610b70565b6080850152610c1460a08201610b34565b60a0850152610c2560c08201610b70565b60c0850152610c3660e08201610b7e565b60e0850152610c486101008201610b92565b610100850152610c5b6101208201610b92565b6101208501526101408101516101408501520151610160830152565b519061ffff8216820361001557565b81601f8201121561001557805190610c9d82610aab565b92610cab60405194856108f7565b828452602061018081860194028301019181831161001557602001925b828410610cd6575050505090565b6101808483031261001557602061018091610cef610927565b610cf887610b70565b8152610d05838801610b70565b83820152610d1560408801610c77565b6040820152610d2660608801610b7e565b60608201526080870151608082015260a087015160a0820152610d4b60c08801610b7e565b60c0820152610d5c60e08801610b7e565b60e0820152610100870151610100820152610120870151610120820152610140870151610140820152610160870151610160820152815201930192610cc8565b602081830312610015578051906001600160401b03821161001557016102808183031261001557610dcb610937565b91610dd68183610ba0565b835261018082015160208401526101a082015160408401526101c082015160608401526101e0820151608084015261020082015160a084015261022082015160c084015261024082015160e08401526102608201516001600160401b03811161001557610e439201610c86565b61010082015290565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546004906020906001600160a01b0316604051635c60da1b60e01b815292839182905afa9081156106ee5760009182918291610ec2575b50368280378136915af43d6000803e15610ebd573d6000f35b3d6000fd5b610edb915060203d6020116107285761071781836108f7565b38610ea4565b461490811591610f04575b50610ef357565b63f2f1096160e01b60005260046000fd5b6001600160a01b0316301415905038610eec565b634e487b7160e01b600052601160045260246000fd5b600181901b91906001600160ff1b03811603610f4657565b610f18565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b81601f820112156100155780516001600160401b0381116108d75760405192610fac601f8301601f1916602001856108f7565b8184526020828401011161001557610300916020808501910161044b565b602081830312610015578051906001600160401b038211610015570160c08183031261001557610ff8610947565b9161100282610b92565b8352602082015160208401526040820151604084015260608201516001600160401b0381116100155781611037918401610f79565b606084015261104860808301610b34565b608084015260a08201516001600160401b0381116100155761106a9201610f79565b60a082015290565b90602061030092818152019061046e565b6040805190919061109483826108f7565b6001815291601f1901366020840137565b634e487b7160e01b600052603260045260246000fd5b8051156110c85760200190565b6110a5565b80518210156110c85760209160051b010190565b90816020910312610015575190565b9080601f8301121561001557815161110781610aab565b9261111560405194856108f7565b81845260208085019260051b82010192831161001557602001905b82821061113d5750505090565b6020809161114a84610b70565b815201910190611130565b90916060828403126100155781516001600160401b038111610015578361117d9184016110f0565b9260208301516001600160401b038111610015578161119d9185016110f0565b926040810151906001600160401b03821161001557019080601f830112156100155781516111ca81610aab565b926111d860405194856108f7565b81845260208085019260051b82010192831161001557602001905b8282106112005750505090565b6020809161120d84610c77565b8152019101906111f3565b9061122282610aab565b61122f60405191826108f7565b8281528092611240601f1991610aab565b019060005b82811061125157505050565b60209061125c610965565b82828501015201611245565b60405190606082018281106001600160401b038211176108d75760405260006040838281528260208201520152565b906112a182610aab565b6112ae60405191826108f7565b82815280926112bf601f1991610aab565b019060005b8281106112d057505050565b6020906112db611268565b828285010152016112c4565b9060020b9081156112f95760020b0790565b634e487b7160e01b600052601260045260246000fd5b908160a09103126100155761132381610b7e565b91602082015191604081015191610300608061134160608501610b7e565b9301610b7e565b909193926113546109cf565b6040516367a44ca360e01b81526001600160a01b0384811660048301529096919416600087602481845afa9687156106ee57600097611ccf575b506080870180516001600160a01b031615611cbe57602060a06113c7990151604051809a819263f3b881a360e01b835260048301611072565b0381855afa9788156106ee57600098611c99575b50516001600160a01b03165b6001600160a01b038581169891168814801590611c73575b61072f57604051635c60da1b60e01b815291906001600160a01b0316602083600481845afa9283156106ee57600093611c52575b508451611448906001600160a01b0316610510565b14801590611c29575b611c185761145e8561210e565b60208301516001600160a01b03161480159190611c08575b5061072f576114858282612121565b6040516316f0115b60e01b81526020816004818a5afa9081156106ee57600091611be9575b5060c08301516114c2906001600160a01b0316610510565b6001600160a01b0382169390840361072f576115149161150f6114f760a06114e8611083565b9401516001600160a01b031690565b611500846110bb565b6001600160a01b039091169052565b611db1565b8452604051630dfe168160e01b81526020816004818a5afa9081156106ee57600091611bca575b50845160200151611554906001600160a01b0316610510565b6001600160a01b0390911614801590611b5a575b61072f57611576908361213c565b60a08601908152604086019182526020868101938452865101519091906115a790610510906001600160a01b031681565b6040516370a0823160e01b81526001600160a01b038716600482015290602090829060249082905afa9081156106ee57600091611b3b575b506060870190815286516040015161160190610510906001600160a01b031681565b6040516370a0823160e01b81526001600160a01b03881660048201529390602090859060249082905afa9384156106ee57600094611b16575b50612710908460808a01525111938415611b09575b50508215611afe575b50506119af576000600495604051968780926304013ac360e51b82525afa9081156106ee5760009384968593611ad1575b5084518751811490811591611ac5575b506119af576116a88551611218565b610100820152845115611abd5760405163f305839960e01b8152602081600481865afa9081156106ee57600091611a9e575b5060c0820152604051634614131960e01b8152602081600481865afa9081156106ee57600091611a6f575b5060e082015261171d6117188651610f2e565b611297565b93611726610956565b9460008652602086015260005b8651811015611a655761175061174982896110cd565b5160020b90565b611766611760611749848d6110cd565b60020b90565b9060020b12801590611a49575b8015611a2e575b8015611a13575b80156119e9575b6119af5760005b81811061197b575061179f610965565b906117aa81896110cd565b5160020b82526117ba818b6110cd565b5160020b60208301526117cd81876110cd565b5161ffff1660408301526117e181896110cd565b5160020b6117ef828c6110cd565b516040516bffffffffffffffffffffffff19606087901b166020820190815260e893841b60348301529190921b6037830152601a825290611831603a826108f7565b51902060405163514ea4bf60e01b8152600481019190915285816024815a9360a094fa9081156106ee578360408d816118f28d8f6117498a8f846118e69160019f6117496119309f869f986118db6118ec9a89936118e0966000918290839084908590611937575b6001600160801b031660e08501529394506060936118c2905b6001600160801b031660c0850152565b60a0830152608082015201906001600160801b03169052565b6110cd565b906122e9565b966110cd565b8d6122e9565b9160208101516101008601520151610120840152602081015161014084015201516101608201526101008701519061192a83836110cd565b526110cd565b5001611733565b50505050606091506118c26119656118b29460a03d8111611974575b61195d81836108f7565b81019061130f565b93975087965091935091611899565b503d611953565b611988611749828a6110cd565b611998611760611749858c6110cd565b9060020b14806119c0575b6119af5760010161178f565b63234eceb960e01b60005260046000fd5b50896119df611760611749856119d961174987876110cd565b946110cd565b9060020b146119a3565b50611a096119fa611749838c6110cd565b84516080015160020b906112e7565b60020b1515611788565b50611a246119fa611749838a6110cd565b60020b1515611781565b50620d89e8611a40611749838c6110cd565b60020b1361177a565b50620d89e719611a5c611749838a6110cd565b60020b12611773565b5050955050505050565b611a91915060203d602011611a97575b611a8981836108f7565b8101906110e1565b38611705565b503d611a7f565b611ab7915060203d602011611a9757611a8981836108f7565b386116da565b955050505050565b90508351141538611699565b9194909650611af292503d8091833e611aea81836108f7565b810190611155565b95919390959138611689565b511190503880611658565b519051109250388061164f565b612710919450611b349060203d602011611a9757611a8981836108f7565b939061163a565b611b54915060203d602011611a9757611a8981836108f7565b386115df565b5060405163d21220a760e01b81526020816004818a5afa9081156106ee57600091611bab575b50845160400151611b99906001600160a01b0316610510565b6001600160a01b039091161415611568565b611bc4915060203d6020116107285761071781836108f7565b38611b80565b611be3915060203d6020116107285761071781836108f7565b3861153b565b611c02915060203d6020116107285761071781836108f7565b386114aa565b90503f6060830151141538611476565b633b35273960e01b60005260046000fd5b506020840151611c41906001600160a01b0316610510565b6001600160a01b0383161415611451565b611c6c91935060203d6020116107285761071781836108f7565b9138611433565b508251611c88906001600160a01b0316610510565b6001600160a01b03821614156113ff565b6113e7919850611cb79060203d6020116107285761071781836108f7565b97906113db565b63aba4733960e01b60005260046000fd5b611ced9197503d806000833e611ce581836108f7565b810190610fca565b953861138e565b908160209103126100155761030090610b70565b519063ffffffff8216820361001557565b5190811515820361001557565b908160e0910312610015578051611d3c816100ae565b91611d4960208301610b70565b91611d5660408201610c77565b91611d6360608301610c77565b91611d7060808201610c77565b9161030060c0611d8260a08501611d08565b9301611d19565b908160209103126100155761030090610b7e565b908160209103126100155761030090610b92565b9190611dc690611dbf610965565b508361241e565b6040516334324e9f60e21b81529092906001600160a01b03821690602081600481855afa80156106ee57611e07916000916120df575b5060020b6080860152565b604051633850c7bd60e01b815260e081600481855afa9182156106ee57611e526020926004946000916000916120a3575b5060020b60c08901525b6001600160a01b031660a0880152565b604051630d34328160e11b815292839182905afa80156106ee57611e8991600091612074575b506001600160801b031660e0850152565b602083019060046020611ea8610510610510865160018060a01b031690565b60405163313ce56760e01b815292839182905afa80156106ee57611eda91600091612055575b5060ff16610100860152565b604084019160046020611ef9610510610510875160018060a01b031690565b60405163313ce56760e01b815292839182905afa80156106ee57611f4392611f366105109261051094600091612026575b5060ff166101208a0152565b516001600160a01b031690565b6040516370a0823160e01b81526001600160a01b03831660048201529190602090839060249082905afa9283156106ee57610510610510611fa192611fce96602096600091612009575b506101408a0152516001600160a01b031690565b6040516370a0823160e01b81526001600160a01b0390921660048301529092839190829081906024820190565b03915afa9081156106ee57600091611fea575b50610160830152565b612003915060203d602011611a9757611a8981836108f7565b38611fe1565b6120209150873d8911611a9757611a8981836108f7565b38611f8d565b612048915060203d60201161204e575b61204081836108f7565b810190611d9d565b38611f2a565b503d612036565b61206e915060203d60201161204e5761204081836108f7565b38611ece565b612096915060203d60201161209c575b61208e81836108f7565b810190611d89565b38611e78565b503d612084565b611e4292506120ca915060e03d60e0116120d8575b6120c281836108f7565b810190611d26565b505050505091909190611e38565b503d6120b8565b612101915060203d602011612107575b6120f981836108f7565b810190611cf4565b38611dfc565b503d6120ef565b306001600160a01b039091160361072f57565b608090606060018060a01b03910151163f9101510361072f57565b6040516380814ffb60e01b81529192906001600160a01b03811690602084600481855afa9182156106ee57600494600093612255575b506020906040519586809263ef095f8d60e01b82525afa9384156106ee57600094612220575b506020906121b961051061051060406121e69899015160018060a01b031690565b604051634867e20360e11b81526001600160a01b0390921660048301529094859190829081906024820190565b03915afa9283156106ee576000936121ff575b50929190565b61221991935060203d602011611a9757611a8981836108f7565b91386121f9565b6121e69450906121b96105106105106040612249602096873d8911611a9757611a8981836108f7565b98505050505090612198565b602091935061227090823d8411611a9757611a8981836108f7565b9290612172565b9190826101009103126100155761228d82610b7e565b91602081015180600f0b8103610015579160408201519160608101519160808201518060060b8103610015579160a08101516122c8816100ae565b9161030060e0611d8260c08501611d08565b6000198114610f465760010190565b916122f2611268565b60009160208101938060020b935b8251811015612345578461232361176061231b848a516110cd565b515160020b90565b1461233057600101612300565b9493505050506123419250516110cd565b5190565b506101009193506123859492969561236082899060020b9052565b604051808097819463f30dba9360e01b835260048301919091602081019260020b9052565b03916001600160a01b03165afa9283156106ee576123cd936000916000916123d0575b5060408701526020860152518151916123c0836122da565b90528461192a83836110cd565b50565b90506123f491506101003d8111612403575b6123ec81836108f7565b810190612277565b505050509250905090386123a8565b503d6123e2565b908160209103126100155761030090610b60565b91612427610965565b60405163c45a015560e01b815290936001600160a01b031690602081600481855afa80156106ee57612469916000916126ae575b506001600160a01b03168552565b60009260005b81518110156126a55785516001600160a01b0316612493610510611f3684866110cd565b6001600160a01b03909116146124ab5760010161246f565b505090915060015b1561269457604051630dfe168160e01b8152602081600481855afa9081156106ee57600091612675575b506001600160a01b03166020840190815260405163d21220a760e01b8152602081600481865afa9081156106ee57600091612656575b506001600160a01b03166040850190815260405163ddca3f4360e01b815290602082600481875afa9283156106ee576125d593602093600091612629575b5062ffffff166060880190815261259561258b61257d61257d6105106105108d5160018060a01b031690565b94516001600160a01b031690565b915162ffffff1690565b604051630b4c774160e11b81526001600160a01b03948516600482015293909116602484015262ffffff1660448301529092839190829081906064820190565b03915afa9081156106ee5760009161260a575b506001600160a01b0316036125f957565b630282c45560e31b60005260046000fd5b612623915060203d6020116107285761071781836108f7565b386125e8565b6126499150843d861161264f575b61264181836108f7565b81019061240a565b38612551565b503d612637565b61266f915060203d6020116107285761071781836108f7565b38612513565b61268e915060203d6020116107285761071781836108f7565b386124dd565b63747e52b360e11b60005260046000fd5b505090916124b3565b6126c7915060203d6020116107285761071781836108f7565b3861245b56";
|
|
@@ -19032,6 +19045,7 @@ const bscV4VaultDiscovery = /* @__PURE__ */ (() => Object.freeze({
|
|
|
19032
19045
|
beaconNames: Object.freeze(["MultiPositionReserveV4"])
|
|
19033
19046
|
}))();
|
|
19034
19047
|
const bscV4VaultBinding = /* @__PURE__ */ (() => Object.freeze({
|
|
19048
|
+
beaconNames: bscV4VaultDiscovery.beaconNames,
|
|
19035
19049
|
beaconAddress: bscV4VaultIdentity.beacon,
|
|
19036
19050
|
implementationAddress: bscV4VaultIdentity.implementation,
|
|
19037
19051
|
kind: "liquidity",
|
|
@@ -20447,6 +20461,7 @@ const polygonLegacyVaultDiscovery = /* @__PURE__ */ (() => Object.freeze({
|
|
|
20447
20461
|
beaconNames: Object.freeze(["MultiPositionQuickSwap"])
|
|
20448
20462
|
}))();
|
|
20449
20463
|
const polygonLegacyVaultBinding = /* @__PURE__ */ (() => Object.freeze({
|
|
20464
|
+
beaconNames: polygonLegacyVaultDiscovery.beaconNames,
|
|
20450
20465
|
beaconAddress: polygonLegacyVaultIdentity.beacon,
|
|
20451
20466
|
implementationAddress: polygonLegacyVaultIdentity.implementation,
|
|
20452
20467
|
kind: "liquidity",
|
|
@@ -20901,10 +20916,18 @@ var VaultResolver = class {
|
|
|
20901
20916
|
for (const binding of definition.implementations) {
|
|
20902
20917
|
const key = implementationKey(binding.beaconAddress, binding.implementationAddress);
|
|
20903
20918
|
if (this.#implementations.has(key)) throw new VaultResolutionError("invalid-mapping", "Duplicate vault implementation mapping");
|
|
20904
|
-
this.#implementations.set(key, Object.freeze({
|
|
20919
|
+
this.#implementations.set(key, Object.freeze({
|
|
20920
|
+
...binding,
|
|
20921
|
+
...binding.beaconNames ? { beaconNames: Object.freeze([...binding.beaconNames]) } : {}
|
|
20922
|
+
}));
|
|
20905
20923
|
}
|
|
20906
20924
|
for (const binding of definition.protocols) this.#registerProtocol(binding);
|
|
20907
20925
|
}
|
|
20926
|
+
/** @internal Expected registered support only; actual reads still verify onchain identity. */
|
|
20927
|
+
supportsVaultSnapshots(beaconName) {
|
|
20928
|
+
for (const binding of this.#implementations.values()) if (binding.kind === "liquidity" && binding.readSnapshot && binding.beaconNames?.includes(beaconName)) return true;
|
|
20929
|
+
return false;
|
|
20930
|
+
}
|
|
20908
20931
|
async resolve(steer, address, options) {
|
|
20909
20932
|
const [vault] = await this.resolveMany(steer, [address], options);
|
|
20910
20933
|
if (!vault) throw new Error("Missing resolved vault");
|
|
@@ -20953,9 +20976,14 @@ var VaultResolver = class {
|
|
|
20953
20976
|
if (snapshot.blockNumber !== blockNumber || !vault.underlying.some((position) => position.kind === "liquidity" && sameLiquidityPool(position.pool, snapshot.pool))) throw new Error("Vault returned another accounting snapshot");
|
|
20954
20977
|
return readValidatedVaultSnapshot(vault, snapshot, vault.steer.context);
|
|
20955
20978
|
}
|
|
20956
|
-
#metadata(steer, addresses) {
|
|
20979
|
+
#metadata(steer, addresses, supplied) {
|
|
20957
20980
|
let pending;
|
|
20958
20981
|
return async (address) => {
|
|
20982
|
+
if (supplied) {
|
|
20983
|
+
const metadata = supplied.get(address.toLowerCase());
|
|
20984
|
+
if (!metadata) throw new Error(`Supplied vault metadata is missing address: ${address}`);
|
|
20985
|
+
return metadata;
|
|
20986
|
+
}
|
|
20959
20987
|
pending ??= steer.dataAdapter.getVaultMetadata(addresses);
|
|
20960
20988
|
const metadata = (await pending).find((record) => record.id.toLowerCase() === address.toLowerCase());
|
|
20961
20989
|
if (!metadata) throw new Error("Vault metadata is not indexed");
|
|
@@ -20966,13 +20994,15 @@ var VaultResolver = class {
|
|
|
20966
20994
|
async resolveMany(steer, addresses, options) {
|
|
20967
20995
|
const inputs = [...addresses];
|
|
20968
20996
|
for (const address of inputs) addressKey(address);
|
|
20997
|
+
const supplied = options?.metadata;
|
|
20998
|
+
const metadata = supplied === void 0 ? void 0 : captureVaultMetadata(inputs, supplied);
|
|
20969
20999
|
if (!inputs.length) return Object.freeze([]);
|
|
20970
21000
|
const blockNumber = await this.#blockNumber(steer, options);
|
|
20971
21001
|
const result = [];
|
|
20972
21002
|
let bulkSupported = !!this.#reader.readMany;
|
|
20973
21003
|
for (let start = 0; start < inputs.length; start += 64) {
|
|
20974
21004
|
const batch = inputs.slice(start, start + 64);
|
|
20975
|
-
const loadMetadata = this.#metadata(steer, batch);
|
|
21005
|
+
const loadMetadata = this.#metadata(steer, batch, metadata);
|
|
20976
21006
|
const contexts = batch.map((address) => Object.freeze({
|
|
20977
21007
|
steer,
|
|
20978
21008
|
address,
|
|
@@ -21125,11 +21155,18 @@ var SteerNetwork = class {
|
|
|
21125
21155
|
listVaults(request, options) {
|
|
21126
21156
|
return this.dataAdapter.listVaults(request, options);
|
|
21127
21157
|
}
|
|
21158
|
+
/** Synchronous registration check with no RPC or HTTP; does not verify a particular vault. */
|
|
21159
|
+
supportsVaultSnapshots(beaconName) {
|
|
21160
|
+
return this.#resolver?.supportsVaultSnapshots(beaconName) ?? false;
|
|
21161
|
+
}
|
|
21128
21162
|
async getVault(address, options) {
|
|
21129
21163
|
return this.#vaultResolver().resolve(this, address, options);
|
|
21130
21164
|
}
|
|
21131
21165
|
async getVaults(addresses, options) {
|
|
21132
|
-
if (!addresses.length)
|
|
21166
|
+
if (!addresses.length) {
|
|
21167
|
+
if (options?.metadata !== void 0) captureVaultMetadata(addresses, options.metadata);
|
|
21168
|
+
return Object.freeze([]);
|
|
21169
|
+
}
|
|
21133
21170
|
return this.#vaultResolver().resolveMany(this, addresses, options);
|
|
21134
21171
|
}
|
|
21135
21172
|
getVaultSnapshots(addresses, options) {
|