/* 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 IBPool extends Contract { clone(): IBPool; methods: { getNumTokens(): CeloTxObject; getCurrentTokens(): CeloTxObject; swapExactAmountIn( tokenIn: string, tokenAmountIn: number | string, tokenOut: string, minAmountOut: number | string, maxPrice: number | string ): CeloTxObject<{ tokenAmountOut: string; spotPriceAfter: string; 0: string; 1: string; }>; swapExactAmountOut( tokenIn: string, maxAmountIn: number | string, tokenOut: string, tokenAmountOut: number | string, maxPrice: number | string ): CeloTxObject<{ tokenAmountIn: string; spotPriceAfter: string; 0: string; 1: string; }>; calcInGivenOut( tokenBalanceIn: number | string, tokenWeightIn: number | string, tokenBalanceOut: number | string, tokenWeightOut: number | string, tokenAmountOut: number | string, swapFee: number | string ): CeloTxObject; calcOutGivenIn( tokenBalanceIn: number | string, tokenWeightIn: number | string, tokenBalanceOut: number | string, tokenWeightOut: number | string, tokenAmountIn: number | string, swapFee: number | string ): CeloTxObject; getNormalizedWeight(token: string): CeloTxObject; getDenormalizedWeight(token: string): CeloTxObject; getTotalDenormalizedWeight(): CeloTxObject; isFinalized(): CeloTxObject; getBalance(token: string): CeloTxObject; getSwapFee(): CeloTxObject; }; events: { allEvents: ( options?: EventOptions, cb?: Callback ) => EventEmitter; }; } export const ABI: AbiItem[] = [ { inputs: [], name: "getNumTokens", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function", }, { inputs: [], name: "getCurrentTokens", outputs: [{ internalType: "address[]", name: "tokens", type: "address[]" }], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "tokenIn", type: "address" }, { internalType: "uint256", name: "tokenAmountIn", type: "uint256" }, { internalType: "address", name: "tokenOut", type: "address" }, { internalType: "uint256", name: "minAmountOut", type: "uint256" }, { internalType: "uint256", name: "maxPrice", type: "uint256" }, ], name: "swapExactAmountIn", outputs: [ { internalType: "uint256", name: "tokenAmountOut", type: "uint256" }, { internalType: "uint256", name: "spotPriceAfter", type: "uint256" }, ], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "tokenIn", type: "address" }, { internalType: "uint256", name: "maxAmountIn", type: "uint256" }, { internalType: "address", name: "tokenOut", type: "address" }, { internalType: "uint256", name: "tokenAmountOut", type: "uint256" }, { internalType: "uint256", name: "maxPrice", type: "uint256" }, ], name: "swapExactAmountOut", outputs: [ { internalType: "uint256", name: "tokenAmountIn", type: "uint256" }, { internalType: "uint256", name: "spotPriceAfter", type: "uint256" }, ], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "tokenBalanceIn", type: "uint256" }, { internalType: "uint256", name: "tokenWeightIn", type: "uint256" }, { internalType: "uint256", name: "tokenBalanceOut", type: "uint256" }, { internalType: "uint256", name: "tokenWeightOut", type: "uint256" }, { internalType: "uint256", name: "tokenAmountOut", type: "uint256" }, { internalType: "uint256", name: "swapFee", type: "uint256" }, ], name: "calcInGivenOut", outputs: [ { internalType: "uint256", name: "tokenAmountIn", type: "uint256" }, ], stateMutability: "pure", type: "function", }, { inputs: [ { internalType: "uint256", name: "tokenBalanceIn", type: "uint256" }, { internalType: "uint256", name: "tokenWeightIn", type: "uint256" }, { internalType: "uint256", name: "tokenBalanceOut", type: "uint256" }, { internalType: "uint256", name: "tokenWeightOut", type: "uint256" }, { internalType: "uint256", name: "tokenAmountIn", type: "uint256" }, { internalType: "uint256", name: "swapFee", type: "uint256" }, ], name: "calcOutGivenIn", outputs: [ { internalType: "uint256", name: "tokenAmountOut", type: "uint256" }, ], stateMutability: "pure", type: "function", }, { inputs: [{ internalType: "address", name: "token", type: "address" }], name: "getNormalizedWeight", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function", }, { inputs: [{ internalType: "address", name: "token", type: "address" }], name: "getDenormalizedWeight", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function", }, { inputs: [], name: "getTotalDenormalizedWeight", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function", }, { inputs: [], name: "isFinalized", outputs: [{ internalType: "bool", name: "", type: "bool" }], stateMutability: "view", type: "function", }, { inputs: [{ internalType: "address", name: "token", type: "address" }], name: "getBalance", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function", }, { inputs: [], name: "getSwapFee", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function", }, ]; export function newIBPool(web3: Web3, address: string): IBPool { return new web3.eth.Contract(ABI, address) as any; }