ProviderExtension extension
Properties
-
ready
→ Future<Network>
-
Returns a Future which will stall until the
Network
has heen established, ignoring errors due to the target node not being active yet.
no setter
Methods
-
call<T>(String method, [List args = const []])
→ Future<T>
-
Direct Ethers provider call to access Blockchain data.
-
getBalance(String address, [String? blockTag])
→ Future<BigInt>
-
Returns the balance of
address
as of the blockTag
block height.
-
getBlock(int blockNumber)
→ Future<Block>
-
Get the block from the network by
blockNumber
, where the Block.transactions is a list of transaction hashes.
-
getBlockNumber()
→ Future<int>
-
Returns the block number (or height) of the most recently mined block.
-
getBlockWithTransaction(int blockNumber)
→ Future<BlockWithTransaction>
-
Get the block from the network, where the BlockWithTransaction.transactions is an Array of TransactionResponse.
-
getGasPrice()
→ Future<BigInt>
-
Returns the current gas price.
-
getLogs(EventFilter filter)
→ Future<List<Log>>
-
Returns the
List
of Log matching the filter.
-
getNetwork()
→ Future<Network>
-
Returns the Network this Provider is connected to.
-
getTransaction(String hash)
→ Future<TransactionResponse?>
-
Returns the
TransactionResponse
with hash
or null if the transaction is unknown.
-
getTransactionCount(String address, [String? blockTag])
→ Future<int>
-
Returns the number of transactions
address
has ever sent, as of blockTag
.
-
getTransactionReceipt(String hash)
→ Future<TransactionReceipt?>
-
Returns the
TransactionReceipt
for hash
or null if the transaction has not been mined.
-
rawCall<T>(String to, String data, [String? blockTag])
→ Future<T>
-
Returns the result of executing the transaction, using call.
-
sendTransaction(String data)
→ Future<TransactionResponse>
-
Submits transaction to the network to be mined.
-
waitForTransaction(String transactionHash, [int confirms = 1, Duration? timeout])
→ Future<TransactionReceipt>
-
Returns a Future of
TransactionReceipt
which will not resolve until transactionHash
is mined.