import { BufferState, GyroECLPImmutable } from '@balancer-labs/balancer-maths'; import { Address } from '../../types'; import { HookConfig } from './hooks/balancer-hook-event-subscriber'; import { QauntAMMPoolState } from './quantAMMPool'; import { ReClammPoolState } from './reClammPool'; export interface callData { target: string; callData: string; } export type CommonImmutablePoolState = { poolAddress: string; poolType: string; tokens: string[]; tokensUnderlying: (string | null)[]; weights: bigint[]; hookAddress: string | undefined; hookType: string | undefined; supportsUnbalancedLiquidity: boolean; version: number; } & GyroECLPImmutable; export interface CommonMutableState { tokenRates: bigint[]; erc4626Rates: (bigint | null)[]; erc4626MaxDeposit: (bigint | null)[]; erc4626MaxMint: (bigint | null)[]; erc4626MaxWithdraw: (bigint | null)[]; erc4626MaxRedeem: (bigint | null)[]; balancesLiveScaled18: bigint[]; swapFee: bigint; aggregateSwapFee: bigint; totalSupply: bigint; isPoolPaused: boolean; scalingFactors: bigint[]; } export type CommonPoolState = CommonImmutablePoolState & CommonMutableState; export type PoolState = CommonPoolState | (CommonPoolState & StableMutableState) | QauntAMMPoolState | ReClammPoolState; export interface StableMutableState { amp: bigint; ampIsUpdating: boolean; ampStartValue: bigint; ampEndValue: bigint; ampStartTime: bigint; ampStopTime: bigint; } export type PoolStateMap = { [address: string]: PoolState; }; export type ImmutablePoolStateMap = { [address: string]: CommonImmutablePoolState; }; export type BufferStateExt = BufferState & { maxWithdraw: bigint; maxRedeem: bigint; }; export type Step = { pool: Address; isBuffer: boolean; swapInput: { tokenIn: Address; tokenOut: Address; }; poolState: PoolState | BufferStateExt; }; export type BalancerV3Data = { steps: Step[]; }; export type DexParams = { apiNetworkName: string; vaultAddress: string; balancerRouterAddress: string; balancerBatchRouterAddress: string; hooks?: HookConfig[]; quantAmmUpdateWeightRunnerAddress?: string; }; export type TokenInfo = { isBoosted: boolean; underlyingToken: string | null; mainToken: string; index: number; rate: bigint; maxDeposit: bigint; maxMint: bigint; maxWithdraw: bigint; maxRedeem: bigint; };