@q-dev/qdex-js-sdk
Version:
Typescript Library to interact with Q DEX Contracts
125 lines (108 loc) • 3.07 kB
TypeScript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import BN from "bn.js";
import { ContractOptions } from "web3-eth-contract";
import { EventLog } from "web3-core";
import { EventEmitter } from "events";
import {
Callback,
PayableTransactionObject,
NonPayableTransactionObject,
BlockType,
ContractEventLog,
BaseContract,
} from "./types";
interface EventOptions {
filter?: object;
fromBlock?: BlockType;
topics?: string[];
}
export type Initialized = ContractEventLog<{
version: string;
0: string;
}>;
export type LPSwappedForToken = ContractEventLog<{
pair: string;
token0: string;
token1: string;
0: string;
1: string;
2: string;
}>;
export type TokenSwappedForQ = ContractEventLog<{
token: string;
tokenAmount: string;
0: string;
1: string;
}>;
export type TransferQ = ContractEventLog<{
amount: string;
0: string;
}>;
export interface DEXRevenuePool extends BaseContract {
constructor(
jsonInterface: any[],
address?: string,
options?: ContractOptions
): DEXRevenuePool;
clone(): DEXRevenuePool;
methods: {
flatFee(): NonPayableTransactionObject<string>;
initialize(_registry: string): NonPayableTransactionObject<void>;
swapLPTokenForIndividualTokens(
_pair: string,
_amountAMin: number | string | BN,
_amountBMin: number | string | BN
): NonPayableTransactionObject<void>;
swapTokenForQ(
_token: string,
_amountWQMin: number | string | BN
): NonPayableTransactionObject<void>;
transferQ(): NonPayableTransactionObject<void>;
};
events: {
Initialized(cb?: Callback<Initialized>): EventEmitter;
Initialized(
options?: EventOptions,
cb?: Callback<Initialized>
): EventEmitter;
LPSwappedForToken(cb?: Callback<LPSwappedForToken>): EventEmitter;
LPSwappedForToken(
options?: EventOptions,
cb?: Callback<LPSwappedForToken>
): EventEmitter;
TokenSwappedForQ(cb?: Callback<TokenSwappedForQ>): EventEmitter;
TokenSwappedForQ(
options?: EventOptions,
cb?: Callback<TokenSwappedForQ>
): EventEmitter;
TransferQ(cb?: Callback<TransferQ>): EventEmitter;
TransferQ(options?: EventOptions, cb?: Callback<TransferQ>): EventEmitter;
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
};
once(event: "Initialized", cb: Callback<Initialized>): void;
once(
event: "Initialized",
options: EventOptions,
cb: Callback<Initialized>
): void;
once(event: "LPSwappedForToken", cb: Callback<LPSwappedForToken>): void;
once(
event: "LPSwappedForToken",
options: EventOptions,
cb: Callback<LPSwappedForToken>
): void;
once(event: "TokenSwappedForQ", cb: Callback<TokenSwappedForQ>): void;
once(
event: "TokenSwappedForQ",
options: EventOptions,
cb: Callback<TokenSwappedForQ>
): void;
once(event: "TransferQ", cb: Callback<TransferQ>): void;
once(
event: "TransferQ",
options: EventOptions,
cb: Callback<TransferQ>
): void;
}