createSmartContractInterface method

Future<TCreateSmartContractInterfaceResponse> createSmartContractInterface({
  1. required TCreateSmartContractInterfaceBody input,
})

Create an ABI/IDL in JSON.

Sign the provided TCreateSmartContractInterfaceBody with the client's stamp function and submit the request (POST /public/v1/submit/create_smart_contract_interface).

See also: stampCreateSmartContractInterface.

Implementation

Future<TCreateSmartContractInterfaceResponse> createSmartContractInterface({
  required TCreateSmartContractInterfaceBody input,
}) async {
  final body = packActivityBody(
    bodyJson: input.toJson(),
    fallbackOrganizationId: input.organizationId ??
        config.organizationId ??
        (throw Exception(
            "Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
    activityType: 'ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE',
  );
  return await request<Map<String, dynamic>,
          TCreateSmartContractInterfaceResponse>(
      "/public/v1/submit/create_smart_contract_interface",
      body,
      (json) => TCreateSmartContractInterfaceResponse.fromJson(
          transformActivityResponse(json, 'CreateSmartContractInterface')));
}