Skip to content

ens avatar resolution fails for nft in different chain #3086

@cruzdanilo

Description

@cruzdanilo

Check existing issues

Viem Version

2.21.53

Current Behavior

example: cruzdanilo.base.eth is issued on base, and its avatar record value is eip155:8453/erc721:0x9d42b2a07f7c6a0b0b91daecc61cadb33086dd59/3196, which is an nft on the same chain (chain id 8453), owned by the same account.
when calling getEnsAvatar, the ens text record must be resolved on mainnet, but then viem will try to get tokenURI for the specified address, but using the same client (mainnet), so it fails and returns null.

Expected Behavior

there should be a way to resolve ens nft avatars in other chains

Steps To Reproduce

mainnetClient.getEnsAvatar({ name: "cruzdanilo.base.eth" })

Link to Minimal Reproducible Example

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions