runMethodWithError method

Future<({int exitCode, int gasUsed, TupleReader stack})> runMethodWithError(
  1. InternalAddress address,
  2. String methodName,
  3. List<TupleItem> stack
)
inherited

Returns the gas used, stack and the exit code after the get method invocation as a record, wrapped in a Future:

Future<({
  int gasUsed,
  TupleReader stack,
  int exitCode
})>

Implementation

Future<({int gasUsed, TupleReader stack, int exitCode})> runMethodWithError(
  InternalAddress address,
  String methodName,
  List<TupleItem> stack,
) async {
  var res = await _callGetMethod(address, methodName, stack);

  return (
    gasUsed: res.gasUsed,
    stack: _deserializeStack(res.stack),
    exitCode: res.exitCode,
  );
}