ENS best practices

Contract naming

Display named smart contracts on Ethereum mainnet

Display ENS names instead of addresses when users interact with named smart contracts on Ethereum mainnet.

Category

Contract naming

Applies to

Apps

App support

100%

ENS best practice details

If a contract has an ENS name, you can use its ENS profile to power additional UX improvements such as avatars, metadata, audit information, and more. More information can be found at the ENSIP Proposal.

Desired outcome

Users can easily identify and interact with named smart contracts on Ethereum mainnet, improving security and user experience.

Acceptance tests

Display ENS names for smart contracts on mainnet

When users interact with named smart contracts on Ethereum mainnet the app should display the contract's name as its primary identifier.

mainnet-interactions-display-named-smart-contracts acceptance test

Acceptance Test 2

When users interact with named smart contracts on Ethereum mainnet the app should display the contract's name as its primary identifier. TEST DESCRIPTION WITHOUT IMAGE

Implementation recommendations

Looking up the name of a smart contract on Ethereum mainnet uses the same process as looking up the name of any other account. There are a variety of libraries capable of looking up the primary name of a contract address according to all ENS best practices:



Libraries and tools for additional languages or frameworks can be found in the ENS documentation.

Contributors

All ENS best practices on ENSAwards are open for public contribution.

Submit a contribution

Founded in 2022, Namehash Labs is dedicated to developing open source infrastructure that helps the Ethereum Name Service (ENS) Protocol grow.

© NameHash Labs. All Rights Reserved

Made with❤️byNameHash Labs