EvmRpcInterface class final

Constructors

EvmRpcInterface.new({bool useQueuedManager = true, bool awaitRefresh = true, Duration? refreshIntervall, bool eagerError = false, RefreshType refreshType = RefreshType.onTask, required List<EvmRpcClient> clients, required EVMNetworkType type})
clients - A list of clients to use for the manager useQueuedManager - If true, the manager will use a QueuedRpcManager and requests will be queued awaitRefresh - If true, the manager will wait for the clients to be refreshed before performing a task refreshIntervall - The rate at which the clients are refreshed if null the clients will only be refreshed once eagerError - If true a task will throw the first error it encounters, if false it will try all clients before throwing an error

Properties

blockTimestampCache → Map<int, int>
final
hashCode → int
The hash code for this object.
no setterinherited
refreshFuture → Future<void>
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
txStatusCache → Map<String, ConfirmationStatus>
final
type → EVMNetworkType
final

Methods

buildAndBroadcastTransaction({required String sender, required String recipient, required Uint8List privateKey, required EvmFeeInformation<EvmGasPrice>? feeInfo, required Uint8List? data, required BigInt? value, List<AccessListItem>? accessList}) → Future<String>
buildTransaction({required String sender, required String recipient, required Uint8List privateKey, required EvmFeeInformation<EvmGasPrice>? feeInfo, required Uint8List? data, required BigInt? value, List<AccessListItem>? accessList}) → Future<RawEvmTransaction>
Used to create a raw Transactions Fetches the gasPrice and gasLimit from the network Fetches the nonce from the network Signs the transaction
buildUnsignedTransaction({required String sender, required String recipient, required EvmFeeInformation<EvmGasPrice>? feeInfo, required Uint8List? data, required BigInt? value, List<AccessListItem>? accessList}) → Future<RawEvmTransaction>
Used to create a raw Transactions Fetches the gasPrice and gasLimit from the network Fetches the nonce from the network If Transaction Type is not provided, it will use Legacy
call({String? sender, required String contractAddress, required Uint8List data, BlockNum? atBlock}) → Future<String>
eth_call
estimateGasLimit({required String sender, required String recipient, Uint8List? data, BigInt? value, BigInt? gasPrice}) → Future<int>
estimateNetworkFees({required String recipient, required String sender, required Uint8List? data, required BigInt? value}) → Future<(Amount, int)>
fetchBalance({required String address}) → Future<Amount>
Fetch Balance
fetchERC1155BalanceOfToken({required String address, required BigInt tokenID, required String contractAddress}) → Future<Amount>
Fetch Balance of ERC1155 Token
fetchERC1155BatchBalanceOfTokens({required List<String> accounts, required List<BigInt> tokenIDs, required String contractAddress}) → Future<List<BigInt>>
Fetch Batch Balance of ERC1155 Tokens
fetchERC1155UriOfToken({required BigInt tokenID, required String contractAddress}) → Future<String>
Fetch Uri of ERC115 Token
fetchNetworkFees({EvmFeeInformation<EvmGasPrice>? existing, required String recipient, required String sender, required Uint8List? data, required BigInt? value}) → Future<(int, EvmGasPrice)>
fetchTokenBalance(String address, ERC20Entity token) → Future<Amount>
Fetch Token Balance
getBlockNumber() → Future<int>
Get Block Number
getConfirmationStatus(String hash) → Future<ConfirmationStatus>
getCurrentBlock() → Future<Json>
Get Current Block
getGasPrice() → Future<BigInt>
Get Gas Price
getGasPriceAmount() → Future<Amount>
Get Gas Price
getPriorityFee() → Future<Amount>
getTransactionByHash(String hash) → Future<RawEvmTransaction>
Get Transaction By Hash
getTransactionCount(String address) → Future<BigInt>
Get Transaction Count (Nonce)
getType2GasPrice() → Future<EvmType2GasPrice>
interactWithContract({required String contractAddress, required LocalContractFunctionWithValues function, required String sender, required Uint8List privateKey, required EvmFeeInformation<EvmGasPrice>? feeInfo, BigInt? value}) → Future<String>
Interact with Contract
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performTask<T>(Future<T> task(EvmRpcClient client), {Duration timeout = const Duration(seconds: 30), int? maxTries}) → Future<T>
performTaskForClients<T, R>(Future<T> task(EvmRpcClient), {required R consilidate(List<ValueOrError<T, EvmRpcClient>> results), Duration timeout = const Duration(seconds: 30), int maxTriesPerClient = 2, int minClients = 2, int? maxClients, bool enforceParallel = false}) → Future<R>
readContract({required String contractAddress, required LocalContractFunctionWithValues function}) → Future<String>
resolveENS({required String name, required String contractAddress}) → Future<String?>
sendCoin({required TransferIntent<EvmFeeInformation<EvmGasPrice>> intent, required String from, required Uint8List privateKey}) → Future<String>
Send Currency
sendERC1155Token({required TransferIntent<EvmFeeInformation<EvmGasPrice>> intent, required String contractAddress, required BigInt tokenID, required String from, required Uint8List privateKey}) → Future<String>
Send ERC1155 Token
sendERC20Token({required TransferIntent<EvmFeeInformation<EvmGasPrice>> intent, required String from, required Uint8List privateKey}) → Future<String>
Send ERC20 Token
sendERC721Nft({required String recipient, required String from, required int tokenId, required String contractAddress, required Uint8List privateKey}) → Future<String>
Send ERC721
sendRawTransaction(String serializedTransactionHex) → Future<String>
toString() → String
A string representation of this object.
inherited
waitForTxConfirmation(String hash, {Duration interval = const Duration(seconds: 5)}) → Future<bool>

Operators

operator ==(Object other) → bool
The equality operator.
inherited