web3-ronin-provider • Docs
web3-ronin-provider / RoninJsonRpcProvider
A wrapper to workaround gasPrice issue in etherjs v5 after London hardfork when sending transactions for Ronin.
JsonRpcProvider
new RoninJsonRpcProvider(
url
?,network
?):RoninJsonRpcProvider
Creates an instance of RoninJsonRpcProvider.
• url?: string
| ConnectionInfo
The URL to use, headers, etc
• network?: Networkish
EEmptyHeaders when headers are present, but empty
EEmptyUrl when URL is empty
ENoApiKey when X-API-KEY is absent
ENoHeaders when headers are absent
JsonRpcProvider.constructor
src/web3-RoninJsonRpcProvider.ts:38
_bootstrapPoll:
Timer
JsonRpcProvider._bootstrapPoll
node_modules/@ethersproject/providers/lib/base-provider.d.ts:66
_emitted:
object
[eventName
: string
]: number
| "pending"
JsonRpcProvider._emitted
node_modules/@ethersproject/providers/lib/base-provider.d.ts:61
_eventLoopCache:
Record
<string
,Promise
<any
>>
JsonRpcProvider._eventLoopCache
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:32
_events:
Event
[]
JsonRpcProvider._events
node_modules/@ethersproject/providers/lib/base-provider.d.ts:59
_fastBlockNumber:
number
JsonRpcProvider._fastBlockNumber
node_modules/@ethersproject/providers/lib/base-provider.d.ts:69
_fastBlockNumberPromise:
Promise
<number
>
JsonRpcProvider._fastBlockNumberPromise
node_modules/@ethersproject/providers/lib/base-provider.d.ts:70
_fastQueryDate:
number
JsonRpcProvider._fastQueryDate
node_modules/@ethersproject/providers/lib/base-provider.d.ts:71
_internalBlockNumber:
Promise
<object
>
blockNumber:
number
reqTime:
number
respTime:
number
JsonRpcProvider._internalBlockNumber
node_modules/@ethersproject/providers/lib/base-provider.d.ts:73
readonly
_isProvider:boolean
JsonRpcProvider._isProvider
node_modules/@ethersproject/abstract-provider/lib/index.d.ts:152
_lastBlockNumber:
number
JsonRpcProvider._lastBlockNumber
node_modules/@ethersproject/providers/lib/base-provider.d.ts:67
_maxFilterBlockRange:
number
JsonRpcProvider._maxFilterBlockRange
node_modules/@ethersproject/providers/lib/base-provider.d.ts:68
_maxInternalBlockNumber:
number
JsonRpcProvider._maxInternalBlockNumber
node_modules/@ethersproject/providers/lib/base-provider.d.ts:72
_network:
Network
JsonRpcProvider._network
node_modules/@ethersproject/providers/lib/base-provider.d.ts:58
_networkPromise:
Promise
<Network
>
JsonRpcProvider._networkPromise
node_modules/@ethersproject/providers/lib/base-provider.d.ts:57
_nextId:
number
JsonRpcProvider._nextId
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:31
_pendingFilter:
Promise
<number
>
JsonRpcProvider._pendingFilter
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:30
_poller:
Timer
JsonRpcProvider._poller
node_modules/@ethersproject/providers/lib/base-provider.d.ts:65
_pollingInterval:
number
JsonRpcProvider._pollingInterval
node_modules/@ethersproject/providers/lib/base-provider.d.ts:64
readonly
anyNetwork:boolean
JsonRpcProvider.anyNetwork
node_modules/@ethersproject/providers/lib/base-provider.d.ts:78
readonly
connection:ConnectionInfo
JsonRpcProvider.connection
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:29
disableCcipRead:
boolean
JsonRpcProvider.disableCcipRead
node_modules/@ethersproject/providers/lib/base-provider.d.ts:79
formatter:
Formatter
JsonRpcProvider.formatter
node_modules/@ethersproject/providers/lib/base-provider.d.ts:60
get _cache():
Record
<string
,Promise
<any
>>
Record
<string
, Promise
<any
>>
JsonRpcProvider._cache
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:33
get blockNumber():
number
number
JsonRpcProvider.blockNumber
node_modules/@ethersproject/providers/lib/base-provider.d.ts:101
get network():
Network
Network
JsonRpcProvider.network
node_modules/@ethersproject/providers/lib/base-provider.d.ts:98
get polling():
boolean
boolean
set polling(
value
):void
• value: boolean
void
JsonRpcProvider.polling
node_modules/@ethersproject/providers/lib/base-provider.d.ts:102
get pollingInterval():
number
number
set pollingInterval(
value
):void
• value: number
void
JsonRpcProvider.pollingInterval
node_modules/@ethersproject/providers/lib/base-provider.d.ts:104
get ready():
Promise
<Network
>
Promise
<Network
>
JsonRpcProvider.ready
node_modules/@ethersproject/providers/lib/base-provider.d.ts:91
_addEventListener(
eventName
,listener
,once
):this
• eventName: EventType
• listener: Listener
• once: boolean
this
JsonRpcProvider._addEventListener
node_modules/@ethersproject/providers/lib/base-provider.d.ts:147
_call(
transaction
,blockTag
,attempt
):Promise
<string
>
• transaction: TransactionRequest
• blockTag: BlockTag
• attempt: number
Promise
<string
>
JsonRpcProvider._call
node_modules/@ethersproject/providers/lib/base-provider.d.ts:127
_getAddress(
addressOrName
):Promise
<string
>
• addressOrName: string
| Promise
<string
>
Promise
<string
>
JsonRpcProvider._getAddress
node_modules/@ethersproject/providers/lib/base-provider.d.ts:130
_getBlock(
blockHashOrBlockTag
,includeTransactions
?):Promise
<Block
|BlockWithTransactions
>
• blockHashOrBlockTag: BlockTag
| Promise
<BlockTag
>
• includeTransactions?: boolean
Promise
<Block
| BlockWithTransactions
>
JsonRpcProvider._getBlock
node_modules/@ethersproject/providers/lib/base-provider.d.ts:131
_getBlockTag(
blockTag
):Promise
<BlockTag
>
• blockTag: BlockTag
| Promise
<BlockTag
>
Promise
<BlockTag
>
JsonRpcProvider._getBlockTag
node_modules/@ethersproject/providers/lib/base-provider.d.ts:138
_getFastBlockNumber():
Promise
<number
>
Promise
<number
>
JsonRpcProvider._getFastBlockNumber
node_modules/@ethersproject/providers/lib/base-provider.d.ts:106
_getFilter(
filter
):Promise
<Filter
|FilterByBlockHash
>
• filter: Filter
| FilterByBlockHash
| Promise
<Filter
| FilterByBlockHash
>
Promise
<Filter
| FilterByBlockHash
>
JsonRpcProvider._getFilter
node_modules/@ethersproject/providers/lib/base-provider.d.ts:126
_getInternalBlockNumber(
maxAge
):Promise
<number
>
• maxAge: number
Promise
<number
>
JsonRpcProvider._getInternalBlockNumber
node_modules/@ethersproject/providers/lib/base-provider.d.ts:95
_getResolver(
name
,operation
?):Promise
<string
>
• name: string
• operation?: string
Promise
<string
>
JsonRpcProvider._getResolver
node_modules/@ethersproject/providers/lib/base-provider.d.ts:140
_getTransactionRequest(
transaction
):Promise
<Transaction
>
• transaction: Deferrable
<TransactionRequest
>
Promise
<Transaction
>
JsonRpcProvider._getTransactionRequest
node_modules/@ethersproject/providers/lib/base-provider.d.ts:125
_ready():
Promise
<Network
>
Promise
<Network
>
JsonRpcProvider._ready
node_modules/@ethersproject/providers/lib/base-provider.d.ts:90
_setFastBlockNumber(
blockNumber
):void
• blockNumber: number
void
JsonRpcProvider._setFastBlockNumber
node_modules/@ethersproject/providers/lib/base-provider.d.ts:107
_startEvent(
event
):void
• event: Event
void
JsonRpcProvider._startEvent
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:44
_startPending():
void
void
JsonRpcProvider._startPending
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:45
_stopEvent(
event
):void
• event: Event
void
JsonRpcProvider._stopEvent
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:46
_uncachedDetectNetwork():
Promise
<Network
>
Promise
<Network
>
JsonRpcProvider._uncachedDetectNetwork
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:37
_waitForTransaction(
transactionHash
,confirmations
,timeout
,replaceable
):Promise
<TransactionReceipt
>
• transactionHash: string
• confirmations: number
• timeout: number
• replaceable
• replaceable.data: string
• replaceable.from: string
• replaceable.nonce: number
• replaceable.startBlock: number
• replaceable.to: string
• replaceable.value: BigNumber
Promise
<TransactionReceipt
>
JsonRpcProvider._waitForTransaction
node_modules/@ethersproject/providers/lib/base-provider.d.ts:109
_wrapTransaction(
tx
,hash
?,startBlock
?):TransactionResponse
• tx: Transaction
• hash?: string
• startBlock?: number
TransactionResponse
JsonRpcProvider._wrapTransaction
node_modules/@ethersproject/providers/lib/base-provider.d.ts:123
addListener(
eventName
,listener
):Provider
• eventName: EventType
• listener: Listener
Provider
JsonRpcProvider.addListener
node_modules/@ethersproject/abstract-provider/lib/index.d.ts:149
call(
transaction
,blockTag
?):Promise
<string
>
• transaction: Deferrable
<TransactionRequest
>
• blockTag?: BlockTag
| Promise
<BlockTag
>
Promise
<string
>
JsonRpcProvider.call
node_modules/@ethersproject/providers/lib/base-provider.d.ts:128
ccipReadFetch(
tx
,calldata
,urls
):Promise
<null
|string
>
• tx: Transaction
• calldata: string
• urls: string
[]
Promise
<null
| string
>
JsonRpcProvider.ccipReadFetch
node_modules/@ethersproject/providers/lib/base-provider.d.ts:94
detectNetwork():
Promise
<Network
>
Promise
<Network
>
JsonRpcProvider.detectNetwork
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:36
emit(
eventName
, …args
):boolean
• eventName: EventType
• …args: any
[]
boolean
JsonRpcProvider.emit
node_modules/@ethersproject/providers/lib/base-provider.d.ts:150
estimateGas(
transaction
):Promise
<BigNumber
>
• transaction: Deferrable
<TransactionRequest
>
Promise
<BigNumber
>
JsonRpcProvider.estimateGas
node_modules/@ethersproject/providers/lib/base-provider.d.ts:129
formatFeeHistory(
result
,historicalBlocks
,includePending
): (object
|object
)[]
• result: HistoricalFee
• historicalBlocks: number
= 4
• includePending: boolean
= false
(object
| object
)[]
src/web3-RoninJsonRpcProvider.ts:63
getAvatar(
nameOrAddress
):Promise
<null
|string
>
• nameOrAddress: string
Promise
<null
| string
>
JsonRpcProvider.getAvatar
node_modules/@ethersproject/providers/lib/base-provider.d.ts:143
getBalance(
addressOrName
,blockTag
?):Promise
<BigNumber
>
• addressOrName: string
| Promise
<string
>
• blockTag?: BlockTag
| Promise
<BlockTag
>
Promise
<BigNumber
>
JsonRpcProvider.getBalance
node_modules/@ethersproject/providers/lib/base-provider.d.ts:119
getBlock(
blockHashOrBlockTag
):Promise
<Block
>
• blockHashOrBlockTag: BlockTag
| Promise
<BlockTag
>
Promise
<Block
>
JsonRpcProvider.getBlock
node_modules/@ethersproject/providers/lib/base-provider.d.ts:132
getBlockNumber():
Promise
<number
>
Promise
<number
>
JsonRpcProvider.getBlockNumber
node_modules/@ethersproject/providers/lib/base-provider.d.ts:117
getBlockWithTransactions(
blockHashOrBlockTag
):Promise
<BlockWithTransactions
>
• blockHashOrBlockTag: BlockTag
| Promise
<BlockTag
>
Promise
<BlockWithTransactions
>
JsonRpcProvider.getBlockWithTransactions
node_modules/@ethersproject/providers/lib/base-provider.d.ts:133
getCode(
addressOrName
,blockTag
?):Promise
<string
>
• addressOrName: string
| Promise
<string
>
• blockTag?: BlockTag
| Promise
<BlockTag
>
Promise
<string
>
JsonRpcProvider.getCode
node_modules/@ethersproject/providers/lib/base-provider.d.ts:121
getEtherPrice():
Promise
<number
>
Promise
<number
>
JsonRpcProvider.getEtherPrice
node_modules/@ethersproject/providers/lib/base-provider.d.ts:137
getFeeData():
Promise
<object
>
Promise
<object
>
gasPrice:
null
|BigNumber
lastBaseFeePerGas:
null
|BigNumber
maxFeePerGas:
null
|BigNumber
maxPriorityFeePerGas:
null
|BigNumber
JsonRpcProvider.getFeeData
src/web3-RoninJsonRpcProvider.ts:43
getFeeEstimate():
Promise
<number
>
getFeeEstimate estimates the fee for the next transaction
Promise
<number
>
src/web3-RoninJsonRpcProvider.ts:109
getFeeHistory(
historicalBlocks
?):Promise
<FormattedFeeHistory
[]>
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.
• historicalBlocks?: number
= 4
Promise
<FormattedFeeHistory
[]>
src/web3-RoninJsonRpcProvider.ts:97
getGasPrice():
Promise
<BigNumber
>
Promise
<BigNumber
>
JsonRpcProvider.getGasPrice
node_modules/@ethersproject/providers/lib/base-provider.d.ts:118
getLogs(
filter
):Promise
<Log
[]>
• filter: Filter
| FilterByBlockHash
| Promise
<Filter
| FilterByBlockHash
>
Promise
<Log
[]>
JsonRpcProvider.getLogs
node_modules/@ethersproject/providers/lib/base-provider.d.ts:136
getNetwork():
Promise
<Network
>
Promise
<Network
>
JsonRpcProvider.getNetwork
node_modules/@ethersproject/providers/lib/base-provider.d.ts:100
getResolver(
name
):Promise
<null
|Resolver
>
• name: string
Promise
<null
| Resolver
>
JsonRpcProvider.getResolver
node_modules/@ethersproject/providers/lib/base-provider.d.ts:139
getSigner(
addressOrIndex
?):JsonRpcSigner
• addressOrIndex?: string
| number
JsonRpcSigner
JsonRpcProvider.getSigner
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:38
getStorageAt(
addressOrName
,position
,blockTag
?):Promise
<string
>
• addressOrName: string
| Promise
<string
>
• position: BigNumberish
| Promise
<BigNumberish
>
• blockTag?: BlockTag
| Promise
<BlockTag
>
Promise
<string
>
JsonRpcProvider.getStorageAt
node_modules/@ethersproject/providers/lib/base-provider.d.ts:122
getTransaction(
transactionHash
):Promise
<TransactionResponse
>
• transactionHash: string
| Promise
<string
>
Promise
<TransactionResponse
>
JsonRpcProvider.getTransaction
node_modules/@ethersproject/providers/lib/base-provider.d.ts:134
getTransactionCount(
addressOrName
,blockTag
?):Promise
<number
>
• addressOrName: string
| Promise
<string
>
• blockTag?: BlockTag
| Promise
<BlockTag
>
Promise
<number
>
JsonRpcProvider.getTransactionCount
node_modules/@ethersproject/providers/lib/base-provider.d.ts:120
getTransactionReceipt(
transactionHash
):Promise
<TransactionReceipt
>
• transactionHash: string
| Promise
<string
>
Promise
<TransactionReceipt
>
JsonRpcProvider.getTransactionReceipt
node_modules/@ethersproject/providers/lib/base-provider.d.ts:135
getUncheckedSigner(
addressOrIndex
?):UncheckedJsonRpcSigner
• addressOrIndex?: string
| number
UncheckedJsonRpcSigner
JsonRpcProvider.getUncheckedSigner
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:39
listAccounts():
Promise
<string
[]>
Promise
<string
[]>
JsonRpcProvider.listAccounts
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:40
listenerCount(
eventName
?):number
• eventName?: EventType
number
JsonRpcProvider.listenerCount
node_modules/@ethersproject/providers/lib/base-provider.d.ts:151
listeners(
eventName
?):Listener
[]
• eventName?: EventType
Listener
[]
JsonRpcProvider.listeners
node_modules/@ethersproject/providers/lib/base-provider.d.ts:152
lookupAddress(
address
):Promise
<null
|string
>
• address: string
| Promise
<string
>
Promise
<null
| string
>
JsonRpcProvider.lookupAddress
node_modules/@ethersproject/providers/lib/base-provider.d.ts:142
off(
eventName
,listener
?):this
• eventName: EventType
• listener?: Listener
this
JsonRpcProvider.off
node_modules/@ethersproject/providers/lib/base-provider.d.ts:153
on(
eventName
,listener
):this
• eventName: EventType
• listener: Listener
this
JsonRpcProvider.on
node_modules/@ethersproject/providers/lib/base-provider.d.ts:148
once(
eventName
,listener
):this
• eventName: EventType
• listener: Listener
this
JsonRpcProvider.once
node_modules/@ethersproject/providers/lib/base-provider.d.ts:149
perform(
method
,params
):Promise
<any
>
• method: string
• params: any
Promise
<any
>
JsonRpcProvider.perform
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:43
poll():
Promise
<void
>
Promise
<void
>
JsonRpcProvider.poll
node_modules/@ethersproject/providers/lib/base-provider.d.ts:96
prepareRequest(
method
,params
): [string
,any
[]]
• method: string
• params: any
[string
, any
[]]
JsonRpcProvider.prepareRequest
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:42
removeAllListeners(
eventName
?):this
• eventName?: EventType
this
JsonRpcProvider.removeAllListeners
node_modules/@ethersproject/providers/lib/base-provider.d.ts:154
removeListener(
eventName
,listener
):Provider
• eventName: EventType
• listener: Listener
Provider
JsonRpcProvider.removeListener
node_modules/@ethersproject/abstract-provider/lib/index.d.ts:150
resetEventsBlock(
blockNumber
):void
• blockNumber: number
void
JsonRpcProvider.resetEventsBlock
node_modules/@ethersproject/providers/lib/base-provider.d.ts:97
resolveName(
name
):Promise
<null
|string
>
• name: string
| Promise
<string
>
Promise
<null
| string
>
JsonRpcProvider.resolveName
node_modules/@ethersproject/providers/lib/base-provider.d.ts:141
send(
method
,params
):Promise
<any
>
• method: string
• params: any
[]
Promise
<any
>
JsonRpcProvider.send
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:41
sendTransaction(
signedTransaction
):Promise
<TransactionResponse
>
• signedTransaction: string
| Promise
<string
>
Promise
<TransactionResponse
>
JsonRpcProvider.sendTransaction
node_modules/@ethersproject/providers/lib/base-provider.d.ts:124
waitForTransaction(
transactionHash
,confirmations
?,timeout
?):Promise
<TransactionReceipt
>
• transactionHash: string
• confirmations?: number
• timeout?: number
Promise
<TransactionReceipt
>
JsonRpcProvider.waitForTransaction
node_modules/@ethersproject/providers/lib/base-provider.d.ts:108
static
defaultUrl():string
string
JsonRpcProvider.defaultUrl
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:35
static
getFormatter():Formatter
Formatter
JsonRpcProvider.getFormatter
node_modules/@ethersproject/providers/lib/base-provider.d.ts:92
static
getNetwork(network
):Network
• network: Networkish
Network
JsonRpcProvider.getNetwork
node_modules/@ethersproject/providers/lib/base-provider.d.ts:93
static
hexlifyTransaction(transaction
,allowExtra
?):object
• transaction: TransactionRequest
• allowExtra?
object
JsonRpcProvider.hexlifyTransaction
node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts:47
static
isProvider(value
):value is Provider
• value: any
value is Provider
JsonRpcProvider.isProvider
node_modules/@ethersproject/abstract-provider/lib/index.d.ts:154