/* 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 { EventOptions } from "./types"; export interface ISwap extends Contract { clone(): ISwap; methods: { paused(): CeloTxObject; getToken(index: number | string): CeloTxObject; getBalances(): CeloTxObject; getSwapFee(): CeloTxObject; getAPrecise(): CeloTxObject; swap( tokenIndexFrom: number | string, tokenIndexTo: number | string, dx: number | string, minDy: number | string, deadline: number | string ): CeloTxObject; calculateSwap( tokenIndexFrom: number | string, tokenIndexTo: number | string, dx: number | string ): CeloTxObject; }; events: { allEvents: ( options?: EventOptions, cb?: Callback ) => EventEmitter; }; } export const ABI: AbiItem[] = [ { inputs: [], name: "paused", outputs: [{ internalType: "bool", name: "", type: "bool" }], stateMutability: "view", type: "function", }, { inputs: [{ internalType: "uint8", name: "index", type: "uint8" }], name: "getToken", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function", }, { inputs: [], name: "getBalances", outputs: [{ internalType: "uint256[]", name: "", type: "uint256[]" }], stateMutability: "view", type: "function", }, { inputs: [], name: "getSwapFee", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function", }, { inputs: [], name: "getAPrecise", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint8", name: "tokenIndexFrom", type: "uint8" }, { internalType: "uint8", name: "tokenIndexTo", type: "uint8" }, { internalType: "uint256", name: "dx", type: "uint256" }, { internalType: "uint256", name: "minDy", type: "uint256" }, { internalType: "uint256", name: "deadline", type: "uint256" }, ], name: "swap", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint8", name: "tokenIndexFrom", type: "uint8" }, { internalType: "uint8", name: "tokenIndexTo", type: "uint8" }, { internalType: "uint256", name: "dx", type: "uint256" }, ], name: "calculateSwap", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function", }, ]; export function newISwap(web3: Web3, address: string): ISwap { return new web3.eth.Contract(ABI, address) as any; }