UNPKG

@q-dev/q-js-sdk

Version:

Typescript Library to interact with Q System Contracts

44 lines (43 loc) 2.24 kB
import type { ContractTransaction } from 'ethers'; import { SystemSurplusAuction } from '../../ethers-contracts/SystemSurplusAuction'; import { SystemContractInstance } from '../SystemContractInstance'; import { QNonPayableTx, QPayableTx, SystemSurplusAuctionInfo, SignerOrProvider } from '../../types'; /** * System surplus auction instance to interact with System surplus auction contract. * See [onchain documentation](@system-contracts-repo/@network/SystemSurplusAuction/) for more details. * An instance of this class for a deployed network can be obtained via {@link ContractRegistryInstance.systemSurplusAuction} */ export declare class SystemSurplusAuctionInstance extends SystemContractInstance<SystemSurplusAuction> { constructor(signerOrProvider: SignerOrProvider, address: string); /** * Get all auctions from block diapason * @param fromBlock first block from which we get all auctions * @param toBlock last block from which we get all auctions * @returns auctions */ getAuctions(fromBlock?: string | number, toBlock?: string | number): Promise<string[]>; /** * [External documentation](@system-contracts-repo/@network/SystemSurplusAuction/#auctions) */ getAuctionInfo(auctionId: string | number): Promise<SystemSurplusAuctionInfo>; /** * [External documentation](@system-contracts-repo/@network/SystemSurplusAuction/#startauction) */ startAuction(txOptions?: QPayableTx): Promise<ContractTransaction>; /** * [External documentation](@system-contracts-repo/@network/SystemSurplusAuction/#bid) */ bid(auctionId: string | number, txOptions?: QPayableTx): Promise<ContractTransaction>; /** * [External documentation](@system-contracts-repo/@network/SystemSurplusAuction/#execute) */ execute(auctionId: string | number, txOptions?: QNonPayableTx): Promise<ContractTransaction>; /** * [External documentation](@system-contracts-repo/@network/SystemSurplusAuction/#getraisingbid) */ getRaisingBid(auctionId: string | number): Promise<string>; /** * [External documentation](@system-contracts-repo/@network/SystemSurplusAuction/#auctionscount) */ auctionsCount(): Promise<string>; }