Class ERC4337EthersProvider

Hierarchy

  • BaseProvider
    • ERC4337EthersProvider

Implements

  • OnceBlockable
  • EnsProvider

Index

Constructors

constructor

Properties

_bootstrapPoll

_bootstrapPoll: Timer

_emitted

_emitted: {}

Type declaration

  • [eventName: string]: number | "pending"

_events

_events: Array<Event>

_fastBlockNumber

_fastBlockNumber: number

_fastBlockNumberPromise

_fastBlockNumberPromise: Promise<number>

_fastQueryDate

_fastQueryDate: number

_internalBlockNumber

_internalBlockNumber: Promise<{ blockNumber: number; reqTime: number; respTime: number }>

Readonly _isProvider

_isProvider: boolean

_lastBlockNumber

_lastBlockNumber: number

_maxFilterBlockRange

_maxFilterBlockRange: number

_maxInternalBlockNumber

_maxInternalBlockNumber: number

_network

_network: Network

_networkPromise

_networkPromise: Promise<Network>

_poller

_poller: Timer

_pollingInterval

_pollingInterval: number

Readonly anyNetwork

anyNetwork: boolean

Readonly chainId

chainId: number

Readonly config

config: ClientConfig

disableCcipRead

disableCcipRead: boolean

Readonly entryPoint

entryPoint: EntryPoint

formatter

formatter: Formatter

Readonly httpRpcClient

httpRpcClient: HttpRpcClient

initializedBlockNumber

initializedBlockNumber: number

Readonly originalProvider

originalProvider: BaseProvider

Readonly originalSigner

originalSigner: Signer

Readonly signer

Readonly smartAccountAPI

smartAccountAPI: BaseAccountAPI

Accessors

blockNumber

  • get blockNumber(): number

network

polling

  • get polling(): boolean
  • set polling(value: boolean): any

pollingInterval

  • get pollingInterval(): number
  • set pollingInterval(value: number): any

ready

Methods

_addEventListener

  • _addEventListener(eventName: EventType, listener: Listener, once: boolean): this

_call

  • _call(transaction: TransactionRequest, blockTag: BlockTag, attempt: number): Promise<string>
  • Parameters

    • transaction: TransactionRequest
    • blockTag: BlockTag
    • attempt: number

    Returns Promise<string>

_getAddress

  • _getAddress(addressOrName: string | Promise<string>): Promise<string>

_getBlock

  • _getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>, includeTransactions?: boolean): Promise<Block | BlockWithTransactions>
  • Parameters

    • blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>
    • Optional includeTransactions: boolean

    Returns Promise<Block | BlockWithTransactions>

_getBlockTag

  • _getBlockTag(blockTag: BlockTag | Promise<BlockTag>): Promise<BlockTag>

_getFastBlockNumber

  • _getFastBlockNumber(): Promise<number>

_getFilter

  • _getFilter(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Filter | FilterByBlockHash>
  • Parameters

    • filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>

    Returns Promise<Filter | FilterByBlockHash>

_getInternalBlockNumber

  • _getInternalBlockNumber(maxAge: number): Promise<number>

_getResolver

  • _getResolver(name: string, operation?: string): Promise<string>

_getTransactionRequest

  • _getTransactionRequest(transaction: Deferrable<TransactionRequest>): Promise<Transaction>

_ready

_setFastBlockNumber

  • _setFastBlockNumber(blockNumber: number): void

_startEvent

  • _startEvent(event: Event): void

_stopEvent

  • _stopEvent(event: Event): void

_waitForTransaction

  • _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: { data: string; from: string; nonce: number; startBlock: number; to: string; value: BigNumber }): Promise<TransactionReceipt>
  • Parameters

    • transactionHash: string
    • confirmations: number
    • timeout: number
    • replaceable: { data: string; from: string; nonce: number; startBlock: number; to: string; value: BigNumber }
      • data: string
      • from: string
      • nonce: number
      • startBlock: number
      • to: string
      • value: BigNumber

    Returns Promise<TransactionReceipt>

_wrapTransaction

  • _wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse

addListener

  • addListener(eventName: EventType, listener: Listener): Provider

call

  • call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>
  • Parameters

    • transaction: Deferrable<TransactionRequest>
    • Optional blockTag: BlockTag | Promise<BlockTag>

    Returns Promise<string>

ccipReadFetch

  • ccipReadFetch(tx: Transaction, calldata: string, urls: Array<string>): Promise<null | string>

constructUserOpTransactionResponse

  • constructUserOpTransactionResponse(userOp1: UserOperationStruct): Promise<TransactionResponse>

detectNetwork

  • detectNetwork(): Promise<Network>
  • Returns Promise<Network>

emit

  • emit(eventName: EventType, ...args: Array<any>): boolean
  • Parameters

    • eventName: EventType
    • Rest ...args: Array<any>

    Returns boolean

estimateGas

  • estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>
  • Parameters

    • transaction: Deferrable<TransactionRequest>

    Returns Promise<BigNumber>

getAvatar

  • getAvatar(nameOrAddress: string): Promise<null | string>

getBalance

  • getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>
  • Parameters

    • addressOrName: string | Promise<string>
    • Optional blockTag: BlockTag | Promise<BlockTag>

    Returns Promise<BigNumber>

getBlock

  • getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>
  • Parameters

    • blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>

    Returns Promise<Block>

getBlockNumber

  • getBlockNumber(): Promise<number>

getBlockWithTransactions

  • getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>
  • Parameters

    • blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>

    Returns Promise<BlockWithTransactions>

getCode

  • getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>
  • Parameters

    • addressOrName: string | Promise<string>
    • Optional blockTag: BlockTag | Promise<BlockTag>

    Returns Promise<string>

getEtherPrice

  • getEtherPrice(): Promise<number>

getFeeData

  • getFeeData(): Promise<FeeData>

getGasPrice

  • getGasPrice(): Promise<BigNumber>

getLogs

  • getLogs(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Array<Log>>
  • Parameters

    • filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>

    Returns Promise<Array<Log>>

getNetwork

getResolver

  • getResolver(name: string): Promise<null | Resolver>

getSenderAccountAddress

  • getSenderAccountAddress(): Promise<string>
  • Returns Promise<string>

getSigner

getStorageAt

  • getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>
  • Parameters

    • addressOrName: string | Promise<string>
    • position: BigNumberish | Promise<BigNumberish>
    • Optional blockTag: BlockTag | Promise<BlockTag>

    Returns Promise<string>

getTransaction

  • getTransaction(transactionHash: string | Promise<string>): Promise<TransactionResponse>
  • Parameters

    • transactionHash: string | Promise<string>

    Returns Promise<TransactionResponse>

getTransactionCount

  • getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>
  • Parameters

    • addressOrName: string | Promise<string>
    • Optional blockTag: BlockTag | Promise<BlockTag>

    Returns Promise<number>

getTransactionReceipt

  • getTransactionReceipt(transactionHash: string | Promise<string>): Promise<TransactionReceipt>
  • Parameters

    • transactionHash: string | Promise<string>

    Returns Promise<TransactionReceipt>

init

  • init(): Promise<this>
  • finish intializing the provider. MUST be called after construction, before using the provider.

    Returns Promise<this>

listenerCount

  • listenerCount(eventName?: EventType): number

listeners

  • listeners(eventName?: EventType): Array<Listener>

lookupAddress

  • lookupAddress(address: string | Promise<string>): Promise<null | string>

off

  • off(eventName: EventType, listener?: Listener): this
  • Parameters

    • eventName: EventType
    • Optional listener: Listener

    Returns this

on

  • on(eventName: EventType, listener: Listener): this
  • Parameters

    • eventName: EventType
    • listener: Listener

    Returns this

once

  • once(eventName: EventType, listener: Listener): this
  • Parameters

    • eventName: EventType
    • listener: Listener

    Returns this

perform

  • perform(method: string, params: any): Promise<any>
  • Parameters

    • method: string
    • params: any

    Returns Promise<any>

poll

  • poll(): Promise<void>

removeAllListeners

  • removeAllListeners(eventName?: EventType): this

removeListener

  • removeListener(eventName: EventType, listener: Listener): Provider

resetEventsBlock

  • resetEventsBlock(blockNumber: number): void

resolveName

  • resolveName(name: string | Promise<string>): Promise<null | string>

sendTransaction

  • sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>
  • Parameters

    • signedTransaction: string | Promise<string>

    Returns Promise<TransactionResponse>

waitForTransaction

  • waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>
  • Parameters

    • transactionHash: string
    • Optional confirmations: number
    • Optional timeout: number

    Returns Promise<TransactionReceipt>

Static getFormatter

  • getFormatter(): Formatter

Static getNetwork

  • getNetwork(network: Networkish): Network

Static isProvider

  • isProvider(value: any): value is Provider