Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

BaseProvider

class BaseProvider extends Provider implements EnsProvider {
constructor(network: Networkish | Promise<Network>);
_bootstrapPoll: NodeJS.Timer;
_emitted: {
[eventName: string]: number | "pending";
}
;
_events: Array<Event>;
_fastBlockNumber: number;
_fastBlockNumberPromise: Promise<number>;
_fastQueryDate: number;
_internalBlockNumber: Promise<{
blockNumber: number;
reqTime: number;
respTime: number;
}
>
;
_lastBlockNumber: number;
_maxFilterBlockRange: number;
_maxInternalBlockNumber: number;
_network: Network;
_networkPromise: Promise<Network>;
_poller: NodeJS.Timer;
_pollingInterval: number;
readonly anyNetwork: boolean;
disableCcipRead: boolean;
formatter: Formatter;
get ready(): Promise<Network>;
get network(): Network;
get blockNumber(): number;
get polling(): boolean;
set polling(value: boolean);
get pollingInterval(): number;
set pollingInterval(value: number);
 
_addEventListener(
eventName: EventType,
listener: Listener,
once: boolean,
): this;
_call(
transaction: TransactionRequest,
blockTag: BlockTag,
attempt: number,
): Promise<string>;
_getAddress(addressOrName: string | Promise<string>): Promise<string>;
_getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>, includeTransactions?: boolean): Promise<Block | BlockWithTransactions>;
_getBlockTag(blockTag: BlockTag | Promise<BlockTag>): Promise<BlockTag>;
_getFastBlockNumber(): Promise<number>;
_getFilter(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Filter | FilterByBlockHash>;
_getInternalBlockNumber(maxAge: number): Promise<number>;
_getResolver(name: string, operation?: string): Promise<string>;
_getTransactionRequest(transaction: Deferrable<TransactionRequest>): Promise<Transaction>;
_ready(): Promise<Network>;
_setFastBlockNumber(blockNumber: number): void;
_startEvent(event: Event): void;
_stopEvent(event: Event): void;
_waitForTransaction(
transactionHash: string,
confirmations: number,
timeout: number,
replaceable: {
data: string;
from: string;
nonce: number;
to: string;
value: BigNumber;
startBlock: number;
}
,
): Promise<TransactionReceipt>;
_wrapTransaction(
tx: Transaction,
hash?: string,
startBlock?: number,
): TransactionResponse;
call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
ccipReadFetch(
tx: Transaction,
calldata: string,
urls: Array<string>,
): Promise<null | string>;
detectNetwork(): Promise<Network>;
emit(eventName: EventType, ...args: Array<any>): boolean;
estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
getAvatar(nameOrAddress: string): Promise<null | string>;
getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
getBlockNumber(): Promise<number>;
getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
getEtherPrice(): Promise<number>;
getGasPrice(): Promise<BigNumber>;
getLogs(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Array<Log>>;
getNetwork(): Promise<Network>;
getResolver(name: string): Promise<null | Resolver>;
getStorageAt(
addressOrName: string | Promise<string>,
position: BigNumberish | Promise<BigNumberish>,
blockTag?: BlockTag | Promise<BlockTag>,
): Promise<string>;
getTransaction(transactionHash: string | Promise<string>): Promise<TransactionResponse>;
getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
getTransactionReceipt(transactionHash: string | Promise<string>): Promise<TransactionReceipt>;
listenerCount(eventName?: EventType): number;
listeners(eventName?: EventType): Array<Listener>;
lookupAddress(address: string | Promise<string>): Promise<null | string>;
off(eventName: EventType, listener?: Listener): this;
on(eventName: EventType, listener: Listener): this;
once(eventName: EventType, listener: Listener): this;
perform(method: string, params: any): Promise<any>;
poll(): Promise<void>;
removeAllListeners(eventName?: EventType): this;
resetEventsBlock(blockNumber: number): void;
resolveName(name: string | Promise<string>): Promise<null | string>;
sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
waitForTransaction(
transactionHash: string,
confirmations?: number,
timeout?: number,
): Promise<TransactionReceipt>;
 
static getFormatter(): Formatter;
static getNetwork(network: Networkish): Network;
}

§Extends

§
Provider
[src]

§Implements

§Constructors

§
new BaseProvider(network: Networkish | Promise<Network>)
[src]

ready

A Promise that resolves only once the provider is ready.

Sub-classes that call the super with a network without a chainId MUST set this. Standard named networks have a known chainId.

§Properties

§
_bootstrapPoll: NodeJS.Timer
[src]
§
_emitted: {
[eventName: string]: number | "pending";
}
[src]
§
_events: Array<Event>
[src]
§
_fastBlockNumber: number
[src]
§
_fastBlockNumberPromise: Promise<number>
[src]
§
_fastQueryDate: number
[src]
§
_internalBlockNumber: Promise<{
blockNumber: number;
reqTime: number;
respTime: number;
}
>
[src]
§
_lastBlockNumber: number
[src]
§
_maxFilterBlockRange: number
[src]
§
_maxInternalBlockNumber: number
[src]
§
_network: Network
[src]
§
_networkPromise: Promise<Network>
[src]
§
_poller: NodeJS.Timer
[src]
§
_pollingInterval: number
[src]
§
anyNetwork: boolean
[src]
§
disableCcipRead: boolean
[src]
§
formatter: Formatter
[src]
§
ready: Promise<Network> readonly
[src]
§
network: Network readonly
[src]
§
blockNumber: number readonly
[src]
§
polling: boolean
[src]
§
pollingInterval: number
[src]

§Methods

§
_addEventListener(eventName: EventType, listener: Listener, once: boolean): this
[src]
§
_call(transaction: TransactionRequest, blockTag: BlockTag, attempt: number): Promise<string>
[src]
§
_getAddress(addressOrName: string | Promise<string>): Promise<string>
[src]
§
_getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>, includeTransactions?: boolean): Promise<Block | BlockWithTransactions>
[src]
§
_getBlockTag(blockTag: BlockTag | Promise<BlockTag>): Promise<BlockTag>
[src]
§
_getFastBlockNumber(): Promise<number>
[src]
§
_getFilter(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Filter | FilterByBlockHash>
[src]
§
_getInternalBlockNumber(maxAge: number): Promise<number>
[src]
§
_getResolver(name: string, operation?: string): Promise<string>
[src]
§
_getTransactionRequest(transaction: Deferrable<TransactionRequest>): Promise<Transaction>
[src]
§
_ready(): Promise<Network>
[src]
§
_setFastBlockNumber(blockNumber: number): void
[src]
§
_startEvent(event: Event): void
[src]
§
_stopEvent(event: Event): void
[src]
§
_waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
data: string;
from: string;
nonce: number;
to: string;
value: BigNumber;
startBlock: number;
}
): Promise<TransactionReceipt>
[src]
§
_wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse
[src]
§
call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>
[src]
§
ccipReadFetch(tx: Transaction, calldata: string, urls: Array<string>): Promise<null | string>
[src]
§
detectNetwork(): Promise<Network>
[src]
§
emit(eventName: EventType, ...args: Array<any>): boolean
[src]
§
estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>
[src]
§
getAvatar(nameOrAddress: string): Promise<null | string>
[src]
§
getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>
[src]
§
getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>
[src]
§
getBlockNumber(): Promise<number>
[src]
§
getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>
[src]
§
getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>
[src]
§
getEtherPrice(): Promise<number>
[src]
§
getGasPrice(): Promise<BigNumber>
[src]
§
getLogs(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Array<Log>>
[src]
§
getNetwork(): Promise<Network>
[src]
§
getResolver(name: string): Promise<null | Resolver>
[src]
§
getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>
[src]
§
getTransaction(transactionHash: string | Promise<string>): Promise<TransactionResponse>
[src]
§
getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>
[src]
§
getTransactionReceipt(transactionHash: string | Promise<string>): Promise<TransactionReceipt>
[src]
§
listenerCount(eventName?: EventType): number
[src]
§
listeners(eventName?: EventType): Array<Listener>
[src]
§
lookupAddress(address: string | Promise<string>): Promise<null | string>
[src]
§
off(eventName: EventType, listener?: Listener): this
[src]
§
on(eventName: EventType, listener: Listener): this
[src]
§
once(eventName: EventType, listener: Listener): this
[src]
§
perform(method: string, params: any): Promise<any>
[src]
§
poll(): Promise<void>
[src]
§
removeAllListeners(eventName?: EventType): this
[src]
§
resetEventsBlock(blockNumber: number): void
[src]
§
resolveName(name: string | Promise<string>): Promise<null | string>
[src]
§
sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>
[src]
§
waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>
[src]

§Static Methods

§
getFormatter(): Formatter
[src]
§
getNetwork(network: Networkish): Network
[src]