ManagedBlockchainQuery / Client / get_asset_contract

get_asset_contract#

ManagedBlockchainQuery.Client.get_asset_contract(**kwargs)#

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

Note

  • 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.

See also: AWS API Documentation

Request Syntax

response = client.get_asset_contract(
    contractIdentifier={
        'network': 'ETHEREUM_MAINNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET'|'ETHEREUM_SEPOLIA_TESTNET',
        'contractAddress': 'string'
    }
)
Parameters:

contractIdentifier (dict) –

[REQUIRED]

Contains the blockchain address and network information about the contract.

  • network (string) – [REQUIRED]

    The blockchain network of the contract.

  • contractAddress (string) – [REQUIRED]

    Container for the blockchain address about a contract.

Return type:

dict

Returns:

Response Syntax

{
    'contractIdentifier': {
        'network': 'ETHEREUM_MAINNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET'|'ETHEREUM_SEPOLIA_TESTNET',
        'contractAddress': 'string'
    },
    'tokenStandard': 'ERC20'|'ERC721'|'ERC1155',
    'deployerAddress': 'string',
    'metadata': {
        'name': 'string',
        'symbol': 'string',
        'decimals': 123
    }
}

Response Structure

  • (dict) –

    • contractIdentifier (dict) –

      Contains the blockchain address and network information about the contract.

      • network (string) –

        The blockchain network of the contract.

      • contractAddress (string) –

        Container for the blockchain address about a contract.

    • tokenStandard (string) –

      The token standard of the contract requested.

    • deployerAddress (string) –

      The address of the deployer of contract.

    • metadata (dict) –

      The metadata of the contract.

      • name (string) –

        The name of the token contract.

      • symbol (string) –

        The symbol of the token contract.

      • decimals (integer) –

        The decimals used by the token contract.

Exceptions

  • ManagedBlockchainQuery.Client.exceptions.ThrottlingException

  • ManagedBlockchainQuery.Client.exceptions.ValidationException

  • ManagedBlockchainQuery.Client.exceptions.ResourceNotFoundException

  • ManagedBlockchainQuery.Client.exceptions.AccessDeniedException

  • ManagedBlockchainQuery.Client.exceptions.InternalServerException

  • ManagedBlockchainQuery.Client.exceptions.ServiceQuotaExceededException