UNPKG

@gnosis.pm/dex-contracts

Version:

Contracts for dFusion multi-token batch auction exchange

29 lines (28 loc) 1.64 kB
import BN from "bn.js"; import { BatchExchangeInstance } from "../types/truffle-typings"; export interface TokenInfo { id: number; address: string; symbol?: string; decimals?: number; } /** * Used to recover relevant {@link TokenInfo | TokenInfo} by ID from the exchange such as number of decimals or name. * @param exchange - An instance of deployed Batch Exchange Contract * @param tokenIds - An array of token ids as listed on the Batch Exchange. * @param artifacts - A context-like object providing a gateway to Truffle contract ABIs. * @returns A mapping of TokenInfo objects fetched from the exchange. * Note that nullish TokenInfo objects are returned in places where the requested token ID failed to fetch. */ export declare function fetchTokenInfoFromExchange(exchange: BatchExchangeInstance, tokenIds: number[], artifacts: Truffle.Artifacts): Promise<Map<number, TokenInfo>>; /** * A handy function providing fee token liquidity by placing orders selling the fee token * at the specified provision price for each specified token. * @param exchange - BatchExchange Smart Contract * @param tokenIds - An array of token indices as represented on the exchange * @param provisionPrice - Price at which liquidity is to be provided * @param sellAmountOwl - Amount of feeToken to be sold * @param artifacts - A context-like object providing a gateway to Truffle contract ABIs. * @returns Void Promise */ export declare function placeFeeTokenLiquidityOrders(exchange: BatchExchangeInstance, tokenIds: number[], provisionPrice: BN, sellAmountOwl: BN, artifacts: Truffle.Artifacts): Promise<number[]>;