EthereumRequestCall.fromMethod constructor

  1. @Deprecated("Use EthereumRequestFunctionCall instead.")
EthereumRequestCall.fromMethod({
  1. required String contractAddress,
  2. required AbiFunctionFragment function,
  3. required List params,
  4. String? from,
  5. BlockTagOrNumber? blockNumber = BlockTagOrNumber.latest,
})

Implementation

@Deprecated("Use EthereumRequestFunctionCall instead.")
factory EthereumRequestCall.fromMethod(
    {required String contractAddress,
    required AbiFunctionFragment function,
    required List<dynamic> params,
    String? from,
    BlockTagOrNumber? blockNumber = BlockTagOrNumber.latest}) {
  final rawBytes = function.encode(params);

  return EthereumRequestCall._(
      contractAddress,
      BytesUtils.toHexString(rawBytes, prefix: '0x'),
      from,
      function,
      blockNumber);
}