request<T> method
Sends a JSON-RPC request to the EVM node and returns the result after processing the response.
request: The JSON-RPC request to be sent.
timeout
: The maximum duration for waiting for the response.
Implementation
Future<T> request<T>(ETHRPCRequest<T> request, [Duration? timeout]) async {
final id = ++_id;
final params = request.toRequest(id);
final data = await rpc.call(params, timeout);
return request.onResonse(_findResult(data, params));
}