@q-dev/q-js-sdk
Version:
Typescript Library to interact with Q System Contracts
48 lines (47 loc) • 2.34 kB
TypeScript
import type { ContractTransaction } from 'ethers';
import { SystemDebtAuction } from '../../ethers-contracts/SystemDebtAuction';
import { SystemContractInstance } from '../SystemContractInstance';
import { QNonPayableTx, SystemDebtAuctionInfo, SignerOrProvider } from '../../types';
/**
* System debt auction instance to interact with System debt auction contract.
* See [onchain documentation](@system-contracts-repo/@network/SystemDebtAuction/) for more details.
* An instance of this class for a deployed network can be obtained via {@link ContractRegistryInstance.systemDebtAuction}
*/
export declare class SystemDebtAuctionInstance extends SystemContractInstance<SystemDebtAuction> {
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/SystemDebtAuction/#auctions)
*/
getAuctionInfo(auctionId: string | number): Promise<SystemDebtAuctionInfo>;
/**
* [External documentation](@system-contracts-repo/@network/SystemDebtAuction/#startauction)
*/
startAuction(bid: string | number, txOptions?: QNonPayableTx): Promise<ContractTransaction>;
/**
* [External documentation](@system-contracts-repo/@network/SystemDebtAuction/#bid)
*/
bid(bid: string | number, txOptions?: QNonPayableTx): Promise<ContractTransaction>;
/**
* [External documentation](@system-contracts-repo/@network/SystemDebtAuction/#execute)
*/
execute(txOptions?: QNonPayableTx): Promise<ContractTransaction>;
/**
* [External documentation](@system-contracts-repo/@network/SystemDebtAuction/#getraisingbid)
*/
getRaisingBid(auctionId?: string | number): Promise<string>;
/**
* [External documentation](@system-contracts-repo/@network/SystemDebtAuction/#currentauctionid)
*/
currentAuctionId(): Promise<string>;
/**
* [External documentation](@system-contracts-repo/@network/SystemDebtAuction/#hasactiveauction)
*/
hasActiveAuction(): Promise<boolean>;
}