Get Token Metadata
Introduction
Get Token Metadata (getTokenMetadata): Retrieve the basic information of a specified token.
Parameters
Request Parameters:
| Parameter Name | Type | Description |
|---|---|---|
| jsonrpc | string | Fixed value:2.0 |
| method | string | Method name. Fixed value: getTokenMetadata |
| token | string | Token address |
| nonce | int | Nonce |
| recentCheckpoint | int | Block height |
| signature | object | Signature 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 Name | Type | Description |
|---|---|---|
| blackList | array | Array of blacklisted addresses |
| blackRoleAuthoritiesList | array | Array of blacklisted role addresses |
| burnRoleAuthoritiesList | array | Array of burn authority addresses |
| metadataRoleAuthoritiesList | array | Array of metadata modification authority addresses |
| mintRoleAuthoritiesList | array | Array of mint authority addresses |
| pauseRoleAuthoritiesList | array | Array of pause authority addresses |
| decimals | int | Decimal precision |
| isPaused | boolean | Whether the token is paused |
| supply | string | Total supply |
| symbol | string | Token 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
}Updated 3 months ago
