Get Token Metadata

Introduction

Get Token Metadata (getTokenMetadata): Retrieve the basic information of a specified token.

Parameters

Request Parameters:

Parameter NameTypeDescription
jsonrpcstringFixed value:2.0
methodstringMethod name. Fixed value: getTokenMetadata
tokenstringToken address
nonceintNonce
recentCheckpointintBlock height
signatureobjectSignature result

Request Example:

{
    "jsonrpc": "2.0",
    "method": "getTokenMetadata",
    "params": {
        "nonce": 0,
        "token": "0x...",
        "recentCheckpoint": 12345,
        "signature": {
            "r": "string",
            "s": "string",
            "v": "string"
        }
    },
    "id": 1
}

Response Parameters:

Parameter NameTypeDescription
blackListarrayArray of blacklisted addresses
blackRoleAuthoritiesListarrayArray of blacklisted role addresses
burnRoleAuthoritiesListarrayArray of burn authority addresses
metadataRoleAuthoritiesListarrayArray of metadata modification authority addresses
mintRoleAuthoritiesListarrayArray of mint authority addresses
pauseRoleAuthoritiesListarrayArray of pause authority addresses
decimalsintDecimal precision
isPausedbooleanWhether the token is paused
supplystringTotal supply
symbolstringToken symbol

Response Example:

{
    "jsonrpc": "2.0",
    "result": {
        "blackList": [],
        "blackRoleAuthoritiesList": [
            "0xa6459EF31C68DCF46cC603C526526DB1C6eE4fD1"
        ],
        "burnRoleAuthoritiesList": [
            "0xa6459EF31C68DCF46cC603C526526DB1C6eE4fD1"
        ],
        "decimals": 8,
        "isPaused": false,
        "masterAuthority": "0xa6459EF31C68DCF46cC603C526526DB1C6eE4fD1",
        "metadataRoleAuthoritiesList": [
            "0xa6459EF31C68DCF46cC603C526526DB1C6eE4fD1"
        ],
        "mintRoleAuthoritiesList": [
            "0xa6459EF31C68DCF46cC603C526526DB1C6eE4fD1"
        ],
        "name": "MiaoMiaoToken",
        "pauseRoleAuthoritiesList": [
            "0xa6459EF31C68DCF46cC603C526526DB1C6eE4fD1"
        ],
        "supply": "0",
        "symbol": "MMT"
    },
    "id": 1
}