getAssetContract method

Future<GetAssetContractOutput> getAssetContract({
  1. required ContractIdentifier contractIdentifier,
})

Gets the information about a specific contract deployed on the blockchain.

  • The Bitcoin blockchain networks do not support this operation.
  • Metadata is currently only available for some ERC-20 contracts. Metadata will be available for additional contracts in the future.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter contractIdentifier : Contains the blockchain address and network information about the contract.

Implementation

Future<GetAssetContractOutput> getAssetContract({
  required ContractIdentifier contractIdentifier,
}) async {
  final $payload = <String, dynamic>{
    'contractIdentifier': contractIdentifier,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/get-asset-contract',
    exceptionFnMap: _exceptionFns,
  );
  return GetAssetContractOutput.fromJson(response);
}