import { ChainId } from './constants'; import { Pair, Percent } from './entities'; /** * Options for producing the arguments to send call to the router. */ export interface ZapMigratorOptions { /** * How much the execution price is allowed to move unfavorably from the trade execution price. */ allowedSlippage: Percent; /** * How long the swap is valid until it expires, in seconds. * This will be used to produce a `deadline` parameter which is computed from when the swap call parameters * are generated. */ ttl: number; /** * The account that should receive the output of the swap. */ recipient: string; } export interface ZapMigratorOptionsDeadline extends Omit { /** * When the transaction expires. * This is an atlernate to specifying the ttl, for when you do not want to use local time. */ deadline: number; } /** * The parameters to use in the call to the Uniswap V2 Router to execute a trade. */ export interface ZapMigratorParameters { /** * The method to call on the Uniswap V2 Router. */ methodName: string; /** * The arguments to pass to the method, all hex encoded. */ args: (string | string[] | number[])[]; /** * The amount of wei to send in hex. */ value: string; } declare type MigratorZap = { chainId: ChainId; zapLp: Pair; amount: string; amountAMinRemove: string; amountBMinRemove: string; amountAMinAdd: string; amountBMinAdd: string; }; export declare abstract class ZapMigratorV1 { /** * Cannot be constructed. */ private constructor(); /** * Produces the on-chain method name to call and the hex encoded parameters to pass as arguments for a given trade. * @param zap get zap values * @param options options for the call parameters */ static zapCallParameters(zap: MigratorZap, options: ZapMigratorOptions | ZapMigratorOptionsDeadline): ZapMigratorParameters; } export {};