contactAddress: accepts contractAddress of the NFT which represented by the tokenId NFT v1 - tokenId: accepts labelhash of ENS name in both hex and int format NFT v2 - tokenId: accepts namehash of ENS name in both hex and int format
/{contractAddress}/{tokenId}
Examples
{
"name":"nftest1.eth",
"description":"nftest1.eth, an ENS name.",
"attributes":[
{
"trait_type":"Created Date",
"display_type":"date",
"value":1626897331000
},
{
"trait_type":"Registration Date",
"display_type":"date",
"value":1626897331000
},
{
"trait_type":"Expiration Date",
"display_type":"date",
"value":1658454283000
}
],
"name_length":11,
"length":0,
"url":"https://app.ens.domains/name/nftest1.eth",
"version":1,
"image_url":"data:image/svg+xml;base64,CiAgICA8c3ZnIHdpZHRoPSI..."
}
Attributes include
- Created Date
- Registration Date (only .eth secondary domain)
- Expiration Date (only .eth secondary domain)
git clone https://github.com/ensdomains/ens-metadata-service.git
cd ens-metadata-service
cp .env.org .env // Fill in Vars
yarn
yarn dev
yarn deploy
Regular unit test;
yarn test
Unit test + coverage;
yarn test:cov
Name | Description | Default value | Options |
---|---|---|---|
INFURA_API_KEY | API Key provided by Infura. See here (Required) | - | - |
HOST | Host (ip/domain) address of the running service | localhost | - |
NETWORK | Ethereum network name, the service will run on | rinkeby | local/rinkeby/ropsten/goerli/mainnet |
ENV | Project scope | local | local/prod |
INAMEWRAPPER | InterfaceId of NameWrapper Contract | 0x1aa28a1e | - |
ADDRESS_ETH_REGISTRAR | Ethereum address of ENSBaseRegistrar Contract | 0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85 | - |
ADDRESS_NAME_WRAPPER | Ethereum address of NameWrapper Contract | 0x4D83cea620E3864F912046b73bB3a6c04Da75990 | - |
- Configure for different networks (localhost/rinkeby/ropsten/goerli/mainnet)