requestReadContract method
Future<List>
requestReadContract({
- required DeployedContract deployedContract,
- required String functionName,
- required String rpcUrl,
- EthereumAddress? sender,
- List parameters = const [],
override
Implementation
@override
Future<List<dynamic>> requestReadContract({
required DeployedContract deployedContract,
required String functionName,
required String rpcUrl,
EthereumAddress? sender,
List<dynamic> parameters = const [],
}) async {
try {
final results = await Web3Client(rpcUrl, http.Client()).call(
sender: sender,
contract: deployedContract,
function: deployedContract.function(functionName),
params: parameters,
);
return results;
} catch (e) {
rethrow;
}
}