Class: Provider
Implements
OnceBlockable
Constructors
constructor
• new Provider()
Properties
_isProvider
• Readonly
_isProvider: boolean
Methods
addListener
▸ addListener(eventName
, listener
): Provider
Parameters
Name | Type |
---|---|
eventName | EventType |
listener | Listener |
Returns
call
▸ Abstract
call(transaction
, blockTag?
): Promise
\<string
>
Parameters
Name | Type |
---|---|
transaction | Deferrable \<TransactionRequest > |
blockTag? | BlockTag | Promise \<BlockTag > |
Returns
Promise
\<string
>
emit
▸ Abstract
emit(eventName
, ...args
): boolean
Parameters
Name | Type |
---|---|
eventName | EventType |
...args | any [] |
Returns
boolean
estimateGas
▸ Abstract
estimateGas(transaction
): Promise
\<BigNumber
>
Parameters
Name | Type |
---|---|
transaction | Deferrable \<TransactionRequest > |
Returns
Promise
\<BigNumber
>
getBalance
▸ Abstract
getBalance(addressOrName
, blockTag?
): Promise
\<BigNumber
>
Parameters
Name | Type |
---|---|
addressOrName | string | Promise \<string > |
blockTag? | BlockTag | Promise \<BlockTag > |
Returns
Promise
\<BigNumber
>
getBlock
▸ Abstract
getBlock(blockHashOrBlockTag
): Promise
\<Block
>
Parameters
Name | Type |
---|---|
blockHashOrBlockTag | BlockTag | Promise \<BlockTag > |
Returns
Promise
\<Block
>
getBlockNumber
▸ Abstract
getBlockNumber(): Promise
\<number
>
Returns
Promise
\<number
>
getBlockWithTransactions
▸ Abstract
getBlockWithTransactions(blockHashOrBlockTag
): Promise
\<BlockWithTransactions
>
Parameters
Name | Type |
---|---|
blockHashOrBlockTag | BlockTag | Promise \<BlockTag > |
Returns
Promise
\<BlockWithTransactions
>
getCode
▸ Abstract
getCode(addressOrName
, blockTag?
): Promise
\<string
>
Parameters
Name | Type |
---|---|
addressOrName | string | Promise \<string > |
blockTag? | BlockTag | Promise \<BlockTag > |
Returns
Promise
\<string
>
getFeeData
▸ getFeeData(): Promise
\<FeeData
>
Returns
Promise
\<FeeData
>
getGasPrice
▸ Abstract
getGasPrice(): Promise
\<BigNumber
>
Returns
Promise
\<BigNumber
>
getLogs
▸ Abstract
getLogs(filter
): Promise
\<Log
[]>
Parameters
Name | Type |
---|---|
filter | Filter |
Returns
Promise
\<Log
[]>
getNetwork
▸ Abstract
getNetwork(): Promise
\<Network
>
Returns
Promise
\<Network
>
getStorageAt
▸ Abstract
getStorageAt(addressOrName
, position
, blockTag?
): Promise
\<string
>
Parameters
Name | Type |
---|---|
addressOrName | string | Promise \<string > |
position | BigNumberish | Promise \<BigNumberish > |
blockTag? | BlockTag | Promise \<BlockTag > |
Returns
Promise
\<string
>
getTransaction
▸ Abstract
getTransaction(transactionHash
): Promise
\<TransactionResponse
>
Parameters
Name | Type |
---|---|
transactionHash | string |
Returns
Promise
\<TransactionResponse
>
getTransactionCount
▸ Abstract
getTransactionCount(addressOrName
, blockTag?
): Promise
\<number
>
Parameters
Name | Type |
---|---|
addressOrName | string | Promise \<string > |
blockTag? | BlockTag | Promise \<BlockTag > |
Returns
Promise
\<number
>
getTransactionReceipt
▸ Abstract
getTransactionReceipt(transactionHash
): Promise
\<TransactionReceipt
>
Parameters
Name | Type |
---|---|
transactionHash | string |
Returns
Promise
\<TransactionReceipt
>
listenerCount
▸ Abstract
listenerCount(eventName?
): number
Parameters
Name | Type |
---|---|
eventName? | EventType |
Returns
number
listeners
▸ Abstract
listeners(eventName?
): Listener
[]
Parameters
Name | Type |
---|---|
eventName? | EventType |
Returns
Listener
[]
lookupAddress
▸ Abstract
lookupAddress(address
): Promise
\<null
| string
>
Parameters
Name | Type |
---|---|
address | string | Promise \<string > |
Returns
Promise
\<null
| string
>
off
▸ Abstract
off(eventName
, listener?
): Provider
Parameters
Name | Type |
---|---|
eventName | EventType |
listener? | Listener |
Returns
on
▸ Abstract
on(eventName
, listener
): Provider
Parameters
Name | Type |
---|---|
eventName | EventType |
listener | Listener |
Returns
once
▸ Abstract
once(eventName
, listener
): Provider
Parameters
Name | Type |
---|---|
eventName | EventType |
listener | Listener |
Returns
Implementation of
OnceBlockable.once
removeAllListeners
▸ Abstract
removeAllListeners(eventName?
): Provider
Parameters
Name | Type |
---|---|
eventName? | EventType |
Returns
removeListener
▸ removeListener(eventName
, listener
): Provider
Parameters
Name | Type |
---|---|
eventName | EventType |
listener | Listener |
Returns
resolveName
▸ Abstract
resolveName(name
): Promise
\<null
| string
>
Parameters
Name | Type |
---|---|
name | string | Promise \<string > |
Returns
Promise
\<null
| string
>
sendTransaction
▸ Abstract
sendTransaction(signedTransaction
): Promise
\<TransactionResponse
>
Parameters
Name | Type |
---|---|
signedTransaction | string | Promise \<string > |
Returns
Promise
\<TransactionResponse
>
waitForTransaction
▸ Abstract
waitForTransaction(transactionHash
, confirmations?
, timeout?
): Promise
\<TransactionReceipt
>
Parameters
Name | Type |
---|---|
transactionHash | string |
confirmations? | number |
timeout? | number |
Returns
Promise
\<TransactionReceipt
>
isProvider
▸ Static
isProvider(value
): value is Provider
Parameters
Name | Type |
---|---|
value | any |
Returns
value is Provider