get https://{network}.unifra.io/v1//nft-api/getContractMetadata
Queries NFT high-level collection/contract level information
This endpoint is supported only on the following chains and networks:
- Conflux Core: cfx-core
- Conflux eSpace: cfx-espace
Parameters
contractAddress
: [string hexadecimal] - contract address for the NFT collection
Returns
address
: [string hexadecimal] contract address for the queried NFT collectioncontractMetadata:
[object]name:
[string] NFT contract namesymbol:
[string] NFT contract symbol abbreviationtotalSupply:
[string] total number of NFTs in a given NFT collectiontokenType:
[string]"CRC-721" or "ERC-721"
NFT token type
NOTE:
Thename
,symbol
, andtotalSupply
fields will only be set in the response if the contract implements functions to return each field.
Example
Conflux Core
Request
curl 'https://cfx-core.unifra.io/v1/4bd2d1249e644ae288dbfd4e076f0141/nft-api/getContractMetadata?contractAddress=0x8659e2ac138b83c60f3e555fa8f7cc8b25826927'
Response
{
"Address":"cfx:acdfx2zpcsf2hvuth3mz9mh13wfwnaxke6yzdme24e",
"contractMetadata":{
"name":"无限“荟”聚 金卡",
"symbol":"WXHJJK"
}
}
Conflux eSpace
Request
curl 'https://cfx-espace.unifra.io/v1/4bd2d1249e644ae288dbfd4e076f0141/nft-api/getContractMetadata?contractAddress=0x324021590bbdd427f104953bb06999d55f230c64'
Response
{
"Address": "0x324021590bbdd427f104953bb06999d55f230c64",
"contractMetadata": {
"name": "HONG KONG DIRL PASS",
"symbol": "HKDIRL"
}
}