///
import type BN from "bn.js";
import type { EventEmitter } from "events";
import type { EventLog, PromiEvent, TransactionReceipt } from "web3-core/types";
import type { Contract } from "web3-eth-contract";
export interface EstimateGasOptions {
from?: string;
gas?: number;
value?: number | string | BN;
}
export interface EventOptions {
filter?: object;
fromBlock?: BlockType;
topics?: string[];
}
export type Callback = (error: Error, result: T) => void;
export interface ContractEventLog extends EventLog {
returnValues: T;
}
export interface ContractEventEmitter extends EventEmitter {
on(event: "connected", listener: (subscriptionId: string) => void): this;
on(event: "data" | "changed", listener: (event: ContractEventLog) => void): this;
on(event: "error", listener: (error: Error) => void): this;
}
export interface NonPayableTx {
nonce?: string | number | BN;
chainId?: string | number | BN;
from?: string;
to?: string;
data?: string;
gas?: string | number | BN;
maxPriorityFeePerGas?: string | number | BN;
maxFeePerGas?: string | number | BN;
gasPrice?: string | number | BN;
}
export interface PayableTx extends NonPayableTx {
value?: string | number | BN;
}
export interface NonPayableTransactionObject {
arguments: any[];
call(tx?: NonPayableTx, block?: BlockType): Promise;
send(tx?: NonPayableTx): PromiEvent;
estimateGas(tx?: NonPayableTx): Promise;
encodeABI(): string;
}
export interface PayableTransactionObject {
arguments: any[];
call(tx?: PayableTx, block?: BlockType): Promise;
send(tx?: PayableTx): PromiEvent;
estimateGas(tx?: PayableTx): Promise;
encodeABI(): string;
}
export type BlockType = "latest" | "pending" | "genesis" | "earliest" | number | BN;
export type BaseContract = Omit;