Hi zim from ENS.Vision here,
noticed that the metadata service doenst return metadata if a wrapped name is in grace period.
Checking the code @ GitHub - ensdomains/ens-metadata-service
async function checkV2Contract(
contract: ethers.Contract,
identifier: string
): Promise<CheckContractResult> {
if (contract.address !== ADDRESS_NAME_WRAPPER) {
try {
const isInterfaceSupported = await contract.supportsInterface(
INAMEWRAPPER
);
assert(isInterfaceSupported);
} catch (error) {
throw new ContractMismatchError(
`${contract.address} does not match with any ENS related contract`,
400
);
}
}
const namehash = getNamehash(identifier);
const isWrapped = await contract.isWrapped(namehash);
assert(isWrapped);
return { tokenId: namehash, version: Version.v2 };
}
the await contract.isWrapped check fails because the name is in grace period. which leads to NO metadata being returned.
example:
fronks.eth (wrapped and in grace)
https://metadata.ens.domains/mainnet/0xd4416b13d2b3a9abae7acd5d6c2bbdbe25686401/98713744746339227670368351514268198168012462641478723214189705470563552710347
returns:
I didnt dig too much just checked it out real quick. not sure what the implications would be if the contract.isWrapped check would just be removed. based on my testing it would return the metadata for wrapped grace items - and it would also fail (as it should) if a expired wrapped name was queried for.
Would be nice if that would be discussed - or maybe given clarification that this is how it should work because then Ill have to look for a workaround.
thank you
edit:
Wanted to add that if you query for 0x57/labelhash you get the metadata but without NW data ofc
https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/100632001120167971744927208185368144103914942082097032773484893410052256285374