@ardier16/q-js-sdk
Version:
Typescript Library to interact with Q System Contracts
120 lines (103 loc) • 2.96 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<{
_auctionId: string;
_bidder: string;
_bid: string;
0: string;
1: string;
2: string;
}>;
export type Bid = ContractEventLog<{
_auctionId: string;
_bidder: string;
_bid: string;
0: string;
1: string;
2: string;
}>;
export type Executed = ContractEventLog<{
_auctionId: string;
_bidder: string;
_info: [boolean, string, string, string, string];
0: string;
1: string;
2: [boolean, string, string, string, string];
}>;
export interface SystemSurplusAuction extends BaseContract {
constructor(
jsonInterface: any[],
address?: string,
options?: ContractOptions
): SystemSurplusAuction;
clone(): SystemSurplusAuction;
methods: {
auctions(
arg0: number | string | BN
): NonPayableTransactionObject<{
isExecuted: boolean;
bidder: string;
highestBid: string;
lot: string;
endTime: string;
0: boolean;
1: string;
2: string;
3: string;
4: string;
}>;
auctionsCount(): NonPayableTransactionObject<string>;
initialize(
_registry: string,
_stc: string
): NonPayableTransactionObject<void>;
startAuction(): PayableTransactionObject<string>;
bid(_auctionId: number | string | BN): PayableTransactionObject<boolean>;
execute(
_auctionId: number | string | BN
): NonPayableTransactionObject<boolean>;
getRaisingBid(
_auctionId: 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;
}