/* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ import { AbiItem, Callback, CeloTxObject, Contract, EventLog, } from "@celo/connect"; import { EventEmitter } from "events"; import Web3 from "web3"; import { ContractEvent, EventOptions } from "./types"; export interface SwappaRouterV1 extends Contract { clone(): SwappaRouterV1; methods: { getOutputAmount( path: string[], pairs: string[], extras: (string | number[])[], inputAmount: number | string ): CeloTxObject; swapExactInputForOutput( path: string[], pairs: string[], extras: (string | number[])[], inputAmount: number | string, minOutputAmount: number | string, to: string, deadline: number | string ): CeloTxObject; swapExactInputForOutputWithPrecheck( path: string[], pairs: string[], extras: (string | number[])[], inputAmount: number | string, minOutputAmount: number | string, to: string, deadline: number | string ): CeloTxObject; }; events: { Swap: ContractEvent<{ sender: string; to: string; input: string; output: string; inputAmount: string; outputAmount: string; 0: string; 1: string; 2: string; 3: string; 4: string; 5: string; }>; allEvents: ( options?: EventOptions, cb?: Callback ) => EventEmitter; }; } export const ABI: AbiItem[] = [ { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "sender", type: "address", }, { indexed: false, internalType: "address", name: "to", type: "address" }, { indexed: true, internalType: "address", name: "input", type: "address", }, { indexed: true, internalType: "address", name: "output", type: "address", }, { indexed: false, internalType: "uint256", name: "inputAmount", type: "uint256", }, { indexed: false, internalType: "uint256", name: "outputAmount", type: "uint256", }, ], name: "Swap", type: "event", }, { inputs: [ { internalType: "address[]", name: "path", type: "address[]" }, { internalType: "address[]", name: "pairs", type: "address[]" }, { internalType: "bytes[]", name: "extras", type: "bytes[]" }, { internalType: "uint256", name: "inputAmount", type: "uint256" }, ], name: "getOutputAmount", outputs: [ { internalType: "uint256", name: "outputAmount", type: "uint256" }, ], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address[]", name: "path", type: "address[]" }, { internalType: "address[]", name: "pairs", type: "address[]" }, { internalType: "bytes[]", name: "extras", type: "bytes[]" }, { internalType: "uint256", name: "inputAmount", type: "uint256" }, { internalType: "uint256", name: "minOutputAmount", type: "uint256" }, { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "deadline", type: "uint256" }, ], name: "swapExactInputForOutput", outputs: [ { internalType: "uint256", name: "outputAmount", type: "uint256" }, ], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address[]", name: "path", type: "address[]" }, { internalType: "address[]", name: "pairs", type: "address[]" }, { internalType: "bytes[]", name: "extras", type: "bytes[]" }, { internalType: "uint256", name: "inputAmount", type: "uint256" }, { internalType: "uint256", name: "minOutputAmount", type: "uint256" }, { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "deadline", type: "uint256" }, ], name: "swapExactInputForOutputWithPrecheck", outputs: [ { internalType: "uint256", name: "outputAmount", type: "uint256" }, ], stateMutability: "nonpayable", type: "function", }, ]; export function newSwappaRouterV1(web3: Web3, address: string): SwappaRouterV1 { return new web3.eth.Contract(ABI, address) as any; }