@ardier16/q-js-sdk
Version:
Typescript Library to interact with Q System Contracts
131 lines (115 loc) • 3.11 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 AuctionStarted = ContractEventLog<{
_user: string;
_vaultId: string;
_bidder: string;
_bid: string;
0: string;
1: string;
2: string;
3: string;
}>;
export type Bid = ContractEventLog<{
_user: string;
_vaultId: string;
_bidder: string;
_bid: string;
0: string;
1: string;
2: string;
3: string;
}>;
export type Executed = ContractEventLog<{
_user: string;
_vaultId: string;
_info: [string, string, string, string];
0: string;
1: string;
2: [string, string, string, string];
}>;
export interface LiquidationAuction extends BaseContract {
constructor(
jsonInterface: any[],
address?: string,
options?: ContractOptions
): LiquidationAuction;
clone(): LiquidationAuction;
methods: {
auctions(
arg0: string,
arg1: number | string | BN
): NonPayableTransactionObject<{
status: string;
bidder: string;
highestBid: string;
endTime: string;
0: string;
1: string;
2: string;
3: string;
}>;
initialize(
_registry: string,
_stc: string
): NonPayableTransactionObject<void>;
startAuction(
_user: string,
_vaultId: number | string | BN,
_bid: number | string | BN
): NonPayableTransactionObject<boolean>;
bid(
_user: string,
_vaultId: number | string | BN,
_bid: number | string | BN
): NonPayableTransactionObject<boolean>;
execute(
_user: string,
_vaultId: number | string | BN
): NonPayableTransactionObject<boolean>;
getRaisingBid(
_user: string,
_vaultId: number | string | BN
): NonPayableTransactionObject<string>;
};
events: {
AuctionStarted(cb?: Callback<AuctionStarted>): EventEmitter;
AuctionStarted(
options?: EventOptions,
cb?: Callback<AuctionStarted>
): EventEmitter;
Bid(cb?: Callback<Bid>): EventEmitter;
Bid(options?: EventOptions, cb?: Callback<Bid>): EventEmitter;
Executed(cb?: Callback<Executed>): EventEmitter;
Executed(options?: EventOptions, cb?: Callback<Executed>): EventEmitter;
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
};
once(event: "AuctionStarted", cb: Callback<AuctionStarted>): void;
once(
event: "AuctionStarted",
options: EventOptions,
cb: Callback<AuctionStarted>
): void;
once(event: "Bid", cb: Callback<Bid>): void;
once(event: "Bid", options: EventOptions, cb: Callback<Bid>): void;
once(event: "Executed", cb: Callback<Executed>): void;
once(event: "Executed", options: EventOptions, cb: Callback<Executed>): void;
}