import { DexExchangeBuildParam } from '../types'; import { OptimalRate, OptimalSwap, OptimalSwapExchange } from '@paraswap/core'; import { DepositWithdrawReturn } from '../dex/weth/types'; import { Executors, Flag } from './types'; import { DexCallDataParams, ExecutorBytecodeBuilder, SingleSwapCallDataParams } from './ExecutorBytecodeBuilder'; export type Executor03SingleSwapCallDataParams = { swap: OptimalSwap; swapExchangeIndex: number; }; export type Executor03DexCallDataParams = { swapExchange?: OptimalSwapExchange; maybeWethCallData?: DepositWithdrawReturn; }; /** * Class to build bytecode for Executor03 - simpleSwap (SINGLE_STEP) with 100% on a path and multiSwap with 100% amounts on each path (HORIZONTAL_SEQUENCE) */ export declare class Executor03BytecodeBuilder extends ExecutorBytecodeBuilder { type: Executors; /** * Executor03 Flags: * switch (flag % 4): * case 0: don't instert fromAmount * case 1: sendEth equal to fromAmount * case 2: sendEth equal to fromAmount + insert fromAmount * case 3: insert fromAmount * switch (flag % 3): * case 0: don't check balance after swap * case 1: check eth balance after swap * case 2: check destToken balance after swap */ protected buildSimpleSwapFlags(priceRoute: OptimalRate, exchangeParams: DexExchangeBuildParam[], routeIndex: number, swapIndex: number, swapExchangeIndex: number, exchangeParamIndex: number, maybeWethCallData?: DepositWithdrawReturn): { dexFlag: Flag; approveFlag: Flag; }; protected buildMultiMegaSwapFlags(priceRoute: OptimalRate, exchangeParams: DexExchangeBuildParam[], routeIndex: number, swapIndex: number, swapExchangeIndex: number, exchangeParamIndex: number, maybeWethCallData?: DepositWithdrawReturn): { dexFlag: Flag; approveFlag: Flag; }; protected buildSingleSwapCallData(params: SingleSwapCallDataParams): string; protected buildDexCallData(params: DexCallDataParams): string; getAddress(): string; buildByteCode(priceRoute: OptimalRate, exchangeParams: DexExchangeBuildParam[], sender: string, maybeWethCallData?: DepositWithdrawReturn): string; private addMetadata; }