estimateGas method

Future<BigInt> estimateGas({
  1. EthereumAddress? sender,
  2. EthereumAddress? to,
  3. EtherAmount? value,
  4. EtherAmount? gasPrice,
  5. EtherAmount? maxPriorityFeePerGas,
  6. EtherAmount? maxFeePerGas,
  7. Uint8List? data,
})

Implementation

Future<BigInt> estimateGas({
  EthereumAddress? sender,
  EthereumAddress? to,
  EtherAmount? value,
  EtherAmount? gasPrice,
  EtherAmount? maxPriorityFeePerGas,
  EtherAmount? maxFeePerGas,
  Uint8List? data,
}) async {
  return _client.estimateGas(
    CallRequest(
      from: sender?.hex,
      to: to?.hex,
      value: value?.inWei,
      gasPrice: gasPrice?.inWei,
      maxPriorityFeePerGas: maxPriorityFeePerGas?.inWei,
      maxFeePerGas: maxFeePerGas?.inWei,
      data: data,
    ),
  );
}