Class RoninJsonRpcProvider

A wrapper to workaround gasPrice issue in etherjs v5 after London hardfork when sending transactions for Ronin.

Hierarchy

  • JsonRpcProvider
    • RoninJsonRpcProvider

Constructors

Properties

_bootstrapPoll: Timer
_emitted: {
    [eventName: string]: number | "pending";
}
_eventLoopCache: Record<string, Promise<any>>
_events: Event[]
_fastBlockNumber: number
_fastBlockNumberPromise: Promise<number>
_fastQueryDate: number
_internalBlockNumber: Promise<{
    blockNumber: number;
    reqTime: number;
    respTime: number;
}>
_isProvider: boolean
_lastBlockNumber: number
_maxFilterBlockRange: number
_maxInternalBlockNumber: number
_network: Network
_networkPromise: Promise<Network>
_nextId: number
_pendingFilter: Promise<number>
_poller: Timer
_pollingInterval: number
anyNetwork: boolean
connection: ConnectionInfo
disableCcipRead: boolean
formatter: Formatter

Accessors

  • get _cache(): Record<string, Promise<any>>
  • Returns Record<string, Promise<any>>

  • get blockNumber(): number
  • Returns number

  • get network(): Network
  • Returns Network

  • get polling(): boolean
  • Returns boolean

  • set polling(value): void
  • Parameters

    • value: boolean

    Returns void

  • get pollingInterval(): number
  • Returns number

  • set pollingInterval(value): void
  • Parameters

    • value: number

    Returns void

  • get ready(): Promise<Network>
  • Returns Promise<Network>

Methods

  • Parameters

    • eventName: EventType
    • listener: Listener
    • once: boolean

    Returns this

  • Parameters

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

    Returns Promise<string>

  • Parameters

    • addressOrName: string | Promise<string>

    Returns Promise<string>

  • Parameters

    • blockHashOrBlockTag: BlockTag | Promise<BlockTag>
    • OptionalincludeTransactions: boolean

    Returns Promise<Block | BlockWithTransactions>

  • Parameters

    • blockTag: BlockTag | Promise<BlockTag>

    Returns Promise<BlockTag>

  • Returns Promise<number>

  • Parameters

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

    Returns Promise<Filter | FilterByBlockHash>

  • Parameters

    • maxAge: number

    Returns Promise<number>

  • Parameters

    • name: string
    • Optionaloperation: string

    Returns Promise<string>

  • Parameters

    • transaction: Deferrable<TransactionRequest>

    Returns Promise<Transaction>

  • Returns Promise<Network>

  • Parameters

    • blockNumber: number

    Returns void

  • Parameters

    • event: Event

    Returns void

  • Returns void

  • Parameters

    • event: Event

    Returns void

  • Returns Promise<Network>

  • 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>

  • Parameters

    • tx: Transaction
    • Optionalhash: string
    • OptionalstartBlock: number

    Returns TransactionResponse

  • Parameters

    • eventName: EventType
    • listener: Listener

    Returns Provider

  • Parameters

    • transaction: Deferrable<TransactionRequest>
    • OptionalblockTag: BlockTag | Promise<BlockTag>

    Returns Promise<string>

  • Parameters

    • tx: Transaction
    • calldata: string
    • urls: string[]

    Returns Promise<null | string>

  • Returns Promise<Network>

  • Parameters

    • eventName: EventType
    • Rest...args: any[]

    Returns boolean

  • Parameters

    • transaction: Deferrable<TransactionRequest>

    Returns Promise<BigNumber>

  • Parameters

    • result: HistoricalFee
    • historicalBlocks: number = 4
    • includePending: boolean = false

    Returns ({
        baseFeePerGas: number;
        gasUsedRatio: number;
        number: number;
        priorityFeePerGas: number[];
    } | {
        baseFeePerGas: number;
        gasUsedRatio: number;
        number: string;
        priorityFeePerGas: number[];
    })[]

  • Parameters

    • nameOrAddress: string

    Returns Promise<null | string>

  • Parameters

    • addressOrName: string | Promise<string>
    • OptionalblockTag: BlockTag | Promise<BlockTag>

    Returns Promise<BigNumber>

  • Parameters

    • blockHashOrBlockTag: BlockTag | Promise<BlockTag>

    Returns Promise<Block>

  • Returns Promise<number>

  • Parameters

    • blockHashOrBlockTag: BlockTag | Promise<BlockTag>

    Returns Promise<BlockWithTransactions>

  • Parameters

    • addressOrName: string | Promise<string>
    • OptionalblockTag: BlockTag | Promise<BlockTag>

    Returns Promise<string>

  • Returns Promise<number>

  • Returns Promise<{
        gasPrice: null | BigNumber;
        lastBaseFeePerGas: null | BigNumber;
        maxFeePerGas: null | BigNumber;
        maxPriorityFeePerGas: null | BigNumber;
    }>

  • getFeeHistory gets the history for blocks from the pending block to the past historicalBlocks. By default, this would be the past 4 blocks, if historicalBlocks is left at the default. This is an implementation of EIP 1559.

    Parameters

    • OptionalhistoricalBlocks: number = 4

    Returns Promise<FormattedFeeHistory[]>

  • Returns Promise<BigNumber>

  • Parameters

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

    Returns Promise<Log[]>

  • Returns Promise<Network>

  • Parameters

    • name: string

    Returns Promise<null | Resolver>

  • Parameters

    • OptionaladdressOrIndex: string | number

    Returns JsonRpcSigner

  • Parameters

    • addressOrName: string | Promise<string>
    • position: BigNumberish | Promise<BigNumberish>
    • OptionalblockTag: BlockTag | Promise<BlockTag>

    Returns Promise<string>

  • Parameters

    • transactionHash: string | Promise<string>

    Returns Promise<TransactionResponse>

  • Parameters

    • addressOrName: string | Promise<string>
    • OptionalblockTag: BlockTag | Promise<BlockTag>

    Returns Promise<number>

  • Parameters

    • transactionHash: string | Promise<string>

    Returns Promise<TransactionReceipt>

  • Parameters

    • OptionaladdressOrIndex: string | number

    Returns UncheckedJsonRpcSigner

  • Returns Promise<string[]>

  • Parameters

    • OptionaleventName: EventType

    Returns number

  • Parameters

    • OptionaleventName: EventType

    Returns Listener[]

  • Parameters

    • address: string | Promise<string>

    Returns Promise<null | string>

  • Parameters

    • eventName: EventType
    • Optionallistener: Listener

    Returns this

  • Parameters

    • eventName: EventType
    • listener: Listener

    Returns this

  • Parameters

    • eventName: EventType
    • listener: Listener

    Returns this

  • Parameters

    • method: string
    • params: any

    Returns Promise<any>

  • Returns Promise<void>

  • Parameters

    • method: string
    • params: any

    Returns [string, any[]]

  • Parameters

    • OptionaleventName: EventType

    Returns this

  • Parameters

    • eventName: EventType
    • listener: Listener

    Returns Provider

  • Parameters

    • blockNumber: number

    Returns void

  • Parameters

    • name: string | Promise<string>

    Returns Promise<null | string>

  • Parameters

    • method: string
    • params: any[]

    Returns Promise<any>

  • Parameters

    • signedTransaction: string | Promise<string>

    Returns Promise<TransactionResponse>

  • Parameters

    • transactionHash: string
    • Optionalconfirmations: number
    • Optionaltimeout: number

    Returns Promise<TransactionReceipt>

  • Returns string

  • Returns Formatter

  • Parameters

    • network: Networkish

    Returns Network

  • Parameters

    • transaction: TransactionRequest
    • OptionalallowExtra: {
          [key: string]: boolean;
      }
      • [key: string]: boolean

    Returns {
        [key: string]: string | AccessList;
    }

    • [key: string]: string | AccessList
  • Parameters

    • value: any

    Returns value is Provider