simulate method

CallBuilder simulate(
  1. String functionName, [
  2. List args = const []
])

Dry-run a write function via eth_call (no transaction submitted).

Implementation

CallBuilder simulate(String functionName, [List<dynamic> args = const []]) {
  final func = abi.function(functionName);
  if (func == null) {
    throw ArgumentError('Function "$functionName" not found in ABI');
  }
  return CallBuilder(
    contract: this,
    function_: func,
    args: args,
  );
}