customMethod static method

Future<String> customMethod(
  1. String contractAddress,
  2. String customMethod,
  3. List<Object> parameters,
  4. String? abiJsonString,
)

Request contact method.

contractAddress your contract address.

customMethod your contract method name.

parameters your method's parameters.

abiJsonString your contract abi json string

Implementation

static Future<String> customMethod(
    String contractAddress,
    String customMethod,
    List<Object> parameters,
    String? abiJsonString) async {
  var list2 = parameters;
  var list1 = [contractAddress, "custom_$customMethod", list2, abiJsonString];

  const method = "particle_abi_encodeFunctionCall";
  final params = list1;
  return await EvmService.rpc(method, params);
}