RPCCall.fromMethod constructor
RPCCall.fromMethod({
- required String contractAddress,
- required AbiFunctionFragment function,
- required List params,
- String? from,
- BlockTagOrNumber? blockNumber = BlockTagOrNumber.latest,
Implementation
factory RPCCall.fromMethod(
{required String contractAddress,
required AbiFunctionFragment function,
required List<dynamic> params,
String? from,
BlockTagOrNumber? blockNumber = BlockTagOrNumber.latest}) {
final rawBytes = function.encode(params);
return RPCCall._(
contractAddress,
BytesUtils.toHexString(rawBytes, prefix: "0x"),
from,
function,
blockNumber,
);
}