import { ethers } from 'ethers'; import { ChainConfig, EstimateAmountOutParams, INativeToken, TokenAccount } from '../types'; import { AbstractChain } from './abstract'; export declare enum FeeAmount { LOW = 500, MEDIUM = 3000, HIGH = 10000 } export declare class BASE extends AbstractChain { static readonly WETH_ADDRESS = "0x4200000000000000000000000000000000000006"; static readonly USDC_ADDRESS = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"; static readonly UNISWAP_V3_FACTORY = "0x33128a8fc17869897dce68ed026d694621f6fdfd"; static readonly UNISWAP_V3_QUOTER_V2 = "0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a"; static readonly AERODROME_CL_QUOTER_V2 = "0x254cF9E1E6e233aa1AC962CB9B05b2cfeAaE15b0"; static readonly MIXED_ROUTE_QUOTER_V1 = "0x0A5aA5D3a4d28014f967Bf0f29EAA3FF9807D5c6"; static readonly MULTICALL3_CONTRACT_ADDRESS = "0x8297279820F625eFf806319F2ea7B8c4a0F43d2E"; static readonly UNISWAP_V2_ROUTER = "0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24"; static readonly UNISWAP_V2_ROUTER_ABI: string[]; static readonly AERODROME_ROUTER = "0x6df1c91424f79e40e33b1a48f0687b666be71075"; static readonly AERODROME_FACTORY = "0x420DD381b31aEf6683db6B902084cB0FFECe40Da"; static readonly AERODROME_CL_FACTORY = "0x5e7BB104d84c7CB9B682AaC2F3d509f5F406809A"; static readonly UNISWAP_V4_QUOTER = "0x0d5e0f971ed27fbff6c2837bf31316121532048d"; static readonly UNISWAP_V4_POSITION_MANAGER = "0x7c5f5a4bbd8fd63184577525326123b519429bdc"; static readonly UNISWAP_V3_POOL_INIT_CODE_HASH = "0xe34f199b19b2b4f47a6849716980c314cd0e774ebc14cd0538ecb0b0777cc01d"; static readonly AERODROME_V2_POOL_INIT_CODE_HASH = "0x6f178972b07752b522a4da1c5b71af6524e8b0bd6027ccb29e5312b0e5bcdc3c"; static readonly AERODROME_CL_POOL_INIT_CODE_HASH = "0xffb9af9ea6d9e39da47392ecc7055277b9915b8bfc9f83f105821b7791a6ae30"; static readonly AERODROME_ROUTER_ABI: string[]; static readonly AERODROME_FACTORY_ABI: string[]; static readonly AERODROME_CL_FACTORY_ABI: string[]; static readonly AERODROME_POOL_ABI: string[]; static readonly AERODROME_CL_POOL_ABI: string[]; static readonly QUOTER_V4_ABI: { inputs: { components: ({ components: { internalType: string; name: string; type: string; }[]; internalType: string; name: string; type: string; } | { internalType: string; name: string; type: string; components?: undefined; })[]; internalType: string; name: string; type: string; }[]; name: string; outputs: { internalType: string; name: string; type: string; }[]; stateMutability: string; type: string; }[]; static readonly POSITION_MANAGER_ABI: string[]; static readonly ETH: INativeToken; static readonly POOL_ABI: string[]; static readonly FACTORY_ABI: string[]; static readonly DEFAULT_SQRT_PRICE_LIMIT = 0; static readonly TICK_SPACINGS: Record; static readonly ALL_TICK_SPACINGS: readonly [1, 50, 100, 200, 2000, 10]; /** * Computes Aerodrome V2 pool address off-chain using CREATE2 * Uses Velodrome V2 pattern with constant init code hash */ private static computeAerodromeV2PoolAddress; private readonly rpc; private readonly provider; private readonly programConfig; evmChainId: number; constructor({ rpcConfig, gasFeeConfig, programConfig }: ChainConfig); /** * Gets balances for multiple addresses * @param addresses Array of addresses to check balances for * @returns Promise Array of balance strings */ getBalances(addresses: string[]): Promise; /** * Gets token accounts for multiple addresses * @param addresses Array of addresses to check token balances for * @returns Promise>> Array of token accounts */ getAccountOwnedTokens(addresses: string[]): Promise>>; estimateAmountOut(params: EstimateAmountOutParams): Promise; /** * Normalizes token addresses by converting zero address to WETH */ private normalizeTokens; /** * Calculates amount out for Uniswap V3 pool trades */ calculateUniswapV3Amount(tokenA: string, tokenB: string, amountInWei: bigint, fee: number): Promise; /** * Calculates amount out for Uniswap V2 pool trades * Uses the V2 router to get amounts out directly */ calculateUniswapV2Amount(tokenA: string, tokenB: string, amountInWei: bigint): Promise; /** * Gets Aerodrome CL pool address from factory */ private getAerodromeCLPoolAddress; /** * Calculates amount out for Aerodrome pool trades * Uses computed pool address off-chain */ calculateAerodromeAmount(tokenA: string, tokenB: string, amountInWei: bigint, fee: number): Promise; /** * Calculates amount out for Aerodrome CL (Concentrated Liquidity) pool trades * Uses MixedRouteQuoterV1 contract */ calculateAerodromeCLAmount(tokenA: string, tokenB: string, amountInWei: bigint, poolAddress: string): Promise; /** * Gets pool key from pool ID for Uniswap V4 */ private getPoolKeyFromPoolId; /** * Calculates amount out for Uniswap V4 pool trades */ calculateUniswapV4Amount(tokenA: string, tokenB: string, amountInWei: bigint, poolId: string): Promise; /** * Gets metadata for a token * @param tokenAddress Address of the token * @returns Promise Token metadata or null if not found */ getTokenMetadata(tokenAddress: string): Promise<{ tokenAddress: string; name: any; symbol: any; decimals: number; iconUrl: string; chainId: string; } | null>; deposit(receiver: string, amount: string, senderAddress: string): Promise; }