UNPKG

cic-client

Version:

Typescript libraries for building CIC client applications

38 lines (37 loc) 1.35 kB
import { Log, Tx } from '../common/tx'; import { Registry } from '../registry'; /** * Instance represents a single conversion event on network. * * @class Conversion */ declare class Conversion { sourceToken: string; destinationToken: string; trader: string; fromValue: BigInt; toValue: BigInt; tx: Tx; /** * * @param tx Ethereum transaction * @param sourceToken ERC20 token sent in conversion * @param destinationToken ERC20 token received from conversion * @param trader Ethereum address performing the conversion (sender and recipient) * @param fromValue Source token value of conversion * @param toValue Destination token value of conversion */ constructor(tx: Tx, sourceToken: string, destinationToken: string, trader: string, fromValue: BigInt, toValue: BigInt); /** * Scans a transaction log for transfer event. * * @static * @param w3 A connected Web3 object * @param registry Registry context of conversion * @param success State of transaction * @param log A Web3 transaction receipt logs array * @return conversion Instance of Conversion if conversion is found, undefined if not. */ static processLog(w3: any, registry: Registry, success: boolean, log: Log): Promise<Conversion>; } export { Conversion, };