read method

Future read({
  1. required String functionName,
  2. required List args,
})

Implementation

Future<dynamic> read(
    // String privateKey,
    {
  required String functionName,
  required List<dynamic> args,
  // required Credentials credentials,
}) async {
  try {
    print("read function called");
    print(functionName);
    final function = this.contract.function(functionName);
    final response = await this.client.call(
          contract: this.contract,
          function: function,
          params: args,
          // sender: credentials.address,
        );
    print(response);
    return response;
  } catch (e) {
    print(args);
    print("error");
    print(e);
    return null;
  }
}