Skip to main content

7 posts tagged with "enscribe"

View All Tags

Name Your Contracts with the Enscribe Library

· 3 min read
Abhijeet Bhagat
Enscribe Senior Engineer

Last week, we announced the hardhat-enscribe plugin for smart contract developers to name their contracts. We showed how smart contract developers can name their contracts with hardhat:

  • Using a CLI command, powered by the hardhat-enscribe plugin, that can be executed after the deployment command
  • Using the enscribe library in the hardhat deployment script

Under the hood, the hardhat-enscribe plugin uses the same @enscribe/enscribe library. It is a small TypeScript library you can use in any app or tool.

In this post, we will take a look at how to use the library to name your smart contracts in your apps.

It is very simple to use. From its public API, a single abstraction function creates the subname, sets forward and reverse records, and returns useful metadata (tx hashes, detected contract type, explorer link).

Using the Library

Start by installing the library:

pnpm install @enscribe/enscribe  

Once installed, import the nameContract function:

import { nameContract } from "@enscribe/enscribe";

The nameContract function itself has a simple interface. It accepts the following parameters:

  • Contract name
  • Contract address
  • Wallet client (from viem or wagmi)
  • Name of the chain on which the contract address is
  • Optional flag for logging naming metrics

We now create a wallet client object with wagmi:

import useWalletClient from ‘wagmi’

const { data: walletClient } = useWalletClient()

Once we have the wallet client created, we are ready to name our contract with nameContract:

const res = await nameContract({
name: "vault.myapp.eth",
contractAddress: "0x…",
walletClient,
chainName: "sepolia",
enableMetrics: true
});

That’s it! With this single function, developers can easily set a name to their contracts without having to worry about sending individual transactions like creation of subname and setting resolutions.

However, the library is also flexible in leaking this abstraction (which isn’t a bad thing always 🙂) by exposing the following functions and use them however you want:

  • createSubname
  • setForwardResolution
  • setReverseResolution

We want to make it easier for developers to name their contracts during contract deployment time and this is where the library comes in – they can integrate it in their Hardhat scripts. But they can also name their contracts after the contract is deployed with the hardhat-enscribe plugin. You can head over to the library documentation to explore the API.

Get started

  • Hardhat plugin: install, configure, and run npm hardhat enscribe name ... to label new or existing deployments. (GitHub)
  • Core library: import @enscribe/enscribe and call nameContract() wherever you manage contracts (GitHub)
  • Docs & guides: quick starts, concepts, and best practices for contract naming and multi-chain resolution. (enscribe.xyz)

Happy naming! 🚀

Smart Contract Naming With Hardhat

· 4 min read
Abhijeet Bhagat
Enscribe Senior Engineer

Adding support for contract naming into dev workflows has always been our top priority. Hardhat is a leading Ethereum developer environment. It’s TypeScript-first, fast, and built around a clean plugin architecture. Hence, it’s the perfect tool for contract management like deployment, testing, etc. We are excited to announce a plugin for the popular Hardhat ecosystem that adds contract naming to it.

Naming your contract from the CLI

hardhat-enscribe is a Hardhat v3 plugin that assigns ENS names to contracts, handling the full flow for you:

  • subname creation
  • forward resolution and
  • reverse resolution

It auto-detects common patterns like Ownable and ReverseClaimer, waits for confirmations, and plugs neatly into a viem-powered stack. It can be installed using the following command:

pnpm install @enscribe/hardhat-enscribe  

Let’s create new Hardhat project to deploy a contract on Sepolia:

mkdir hardhat-example
cd hardhat-example
pnpm dlx hardhat --init

This will generate a skeletal Hardhat project with a sample contract with the following project structure –

hardhat.config.ts
contracts
├── Counter.sol
└── Counter.t.sol
test
└── Counter.ts
ignition
└── modules
└── Counter.ts
scripts
└── send-op-tx.ts

We can build our project with the following command:

npx hardhat build

Let’s now deploy our contract on Sepolia. For this, we’ll need to add configuration to interact with Sepolia. First, let’s export some env variables for the RPC URL and the private key of the account that we want to use to deploy the contract:

export SEPOLIA_RPC_URL=<sepolia rpc url>
export SEPOLIA_PRIVATE_KEY=<your sepolia account private key>
npx hardhat keystore set SEPOLIA_RPC_URL
npx hardhat keystore set SEPOLIA_PRIVATE_KEY

Now open the hardhat.config.ts file and add configuration for sepolia –

const config: HardhatUserConfig = {

networks: {
sepolia: {
type: "http",
chainType: "l1",
url: configVariable("SEPOLIA_RPC_URL"),
accounts: [configVariable("SEPOLIA_PRIVATE_KEY")],
},
},
}

Our sample contract Counter.sol can now be deployed on sepolia with:

npx hardhat ignition --network sepolia deploy ignition/modules/Counter.ts

Once deployed, we are now ready to name our deployed contract. We need to add the hardhat-enscribe plugin to the list of plugins first. Open the hardhat.config.ts file and add the plugin:

import hardhatEnscribePlugin from "@enscribe/hardhat-enscribe";

const config: HardhatUserConfig = {
plugins: [hardhatToolboxViemPlugin, hardhatEnscribePlugin],

}

Then, invoke the plugin by passing the name and contract address in the command:

pnpm hardhat enscribe name mycontract.app.eth --contract 0x1234...abcd

This is what you’ll see in the output –

normalized name is mycontract.app.eth

Naming completed successfully!
Contract Type: ReverseClaimer
Transactions: {
subname: '0xb5a4131bb0bf3c2708a8181349998f57c76226559042cf68423aeefc74e8cd55',
forwardResolution: '0xa6aa6ac9a0857aaeaff1ef3d69b2962ab01650230bc5c9d8d3108dcfb63cebfa',
reverseResolution: '0xb1f260a587f793251804b6f809b4d1546d81dd98c1605c5eb7d812d1afc190b9'
}

Naming your contract from a Hardhat deployment script

You aren’t limited to setting a name for a contract from the CLI though. Scripting is a very powerful feature of Hardhat that allows you to do more than just contract development. You can call APIs, interact with contracts and even interact with the blockchain. You can now name your contract from a script too and we shall now see how you can do that.

First, connect to the network and deploy the CounterModule:

import hre from "hardhat";
import CounterModule from "../ignition/modules/Counter.js";


const connection = await hre.network.connect();
const { counter } = await connection.ignition.deploy(CounterModule);

Next, get the walletClient –

 const [walletClient] = await connection.viem.getWalletClients();
console.log(`Using account: ${walletClient.account?.address}`);

Now create a normalized name –

 const ensName = `wpsqhsld.abhi.eth`;
const normalizedName = normalize(ensName);

We are now ready to set the name by using the enscribe library (more about this in the next blog) –

import { nameContract } from "@enscribe/enscribe";


try {
const result = await nameContract({
name: normalizedName,
contractAddress: counter.address,
walletClient: walletClient,
chainName: networkName,
opType: "ignition-deploy-and-name",
enableMetrics: true,
});

} catch (error) {

}

That’s it! Your contract can be deployed and named with a Hardhat script easily. You can see the full example here.

Parting Thoughts

Our focus will always be on improving developer workflows for contract naming and the hardhat-enscribe is an important integration for us.

We are continuing to focus on different ways to make contract naming better for developers. So go ahead and integrate contract naming today in your workflows!

Happy naming! 🚀

Low-Risk DeFi Needs Human-Readable Smart Contracts

· 3 min read
Conor Svensson
Founder of Enscribe and Web3 Labs

Vitalik Buterin recently published an essay on low-risk DeFi, arguing that Ethereum’s long-term strength won’t come from chasing the highest yields or the flashiest innovations. Instead, it will come from protocols that are boring, safe, and dependable, akin to how Google’s simple search box became the foundation of the modern web.

The core idea is straightforward: the future of DeFi depends not on yield farming and perps trading, but on building resilient, accessible financial tools that normal people can actually trust.

At Enscribe, we couldn’t agree more.

Why Low-Risk DeFi Matters

Most of DeFi today is still intimidating and opaque. Users are faced with hex contract addresses, complex front-ends, and endless warnings about scams or unaudited code. The reality is that even experienced developers struggle to keep track of what’s safe and what isn’t.

This is precisely the problem Vitalik is highlighting. Just as search unlocked the web by making it human-navigable, we need infrastructure that makes DeFi human-readable and transparent. Without it, only degens and developers will ever feel confident participating.

Names Over Hex

This is why we created Enscribe.

Instead of interacting with 0x5c63…ef7a or some random string of characters, users should see names like the following when they use Uniswap or Aave:

  • router.uniswap.eth
  • eth-staking.aave.eth

Names build trust. They create clarity that hex addresses cannot. A simple ENS-based naming layer makes it obvious what you’re interacting with, reducing the cognitive load and risk of mistakes for users.

When contracts are named, the experience of DeFi starts, users begin to feel they have greater agency over what they’re doing and

Aligning With Vitalik’s Vision

In response to our post on this very idea, Vitalik added an important companion point:

tweet

https://x.com/VitalikButerin/status/1970820664853741959

“This, and use fixed html page UIs on IPFS with onchain version control.”

That’s the other half of the equation. If contracts have an identity and aren’t simply hex addresses, we start building a DeFi ecosystem where trust can be earned through simplicity and durability.

Low-risk DeFi is about eliminating uncertainty at every layer:

  • Names instead of hex addresses.
  • Fixed, verifiable front-ends instead of mutable websites.
  • Contracts with clear provenance and open verification.

Put together, this isn’t just “lower risk.” It’s a pathway to mainstream adoption.

The Road Ahead

Enscribe isn’t about creating yet another shiny DeFi product. It’s about providing the naming and verification layer that lets the entire ecosystem evolve into something usable and trustworthy.

Imagine a future where:

  • Every DeFi protocol publishes named, verified contracts.
  • UIs are simple, consistent, and immutable.
  • Audits and provenance records are tied to contract names.

That’s the infrastructure Ethereum needs to onboard not just the next million, but the next hundred million users.

Vitalik’s essay was a reminder that chasing complexity isn’t the winning strategy. The winners will be the builders who make DeFi boring, reliable, and safe.

At Enscribe, we’re betting that naming is a critical step in that journey.

Happy naming! 🚀

Introducing the Guides Section

· 2 min read
Nischal Sharma
Enscribe Lead Engineer

As part of our mission to fix Ethereum UX, educating users on everything to do with naming smart contracts and ENS is a key part of this.

While we have a lot of technical documentation on our site, what's been missing is guides that tie together the content in an easy to follow manner. We're launching a new Guides section to help developers deploy and name smart contracts with Enscribe on L1 and L2 networks. Think of it as a hands-on companion to our technical documentation.

What's New

The Guides section focuses on practical tutorials you can follow along. While our documentation covers technical details, these guides walk you through real workflows step by step.

Guides Section Overview The new Guides section

What You'll Find

Quick Start Guides

We organized the most common use cases:

Conceptual Guides

For developers who want to understand the underlying concepts:

We will be expanding the guides and add more real world examples and use cases shortly.

Share Your Feedback

What guides would help your development workflow? Join our Discord, Telegram, or X to share ideas and connect with other developers using Enscribe.

Visit the Guides section to start naming your smart contracts.

Happy naming! 🚀

Simplifying Naming

· 3 min read
Abhijeet Bhagat
Enscribe Senior Engineer

Historically the Enscribe App only supported creating subnames for naming smart contracts. This has changed with our latest release!

We recognise that some people may want to name their contracts directly with a 2LD such as mymultisig.eth or use a subname they have already created such as treasury.mytoken.eth.

We’re excited to introduce a revamped naming UX, where we’ve not only simplified the naming experience further for users, but now provide a second option when naming your contract via the Use Existing Name button.

This required us to think over the current naming flow and so we redesigned our Name Contract page all the while still keeping everything simple.

landing

Creating a New Subname

We now have a button called Create Subname that lets you create a new subname. We show the same UI elements as before but with a few changes. We’ve simplified selecting a parent domain by replacing the Parent Name drop-down with a text field instead.

create_new_name

We’ve added a Select Domain button that lets you select either one of your existing domains or the one provided by Enscribe –

choose_domain

You can also create a new domain using the ENS app by clicking on the Purchase New Domain button. Clicking on this button will show a dialog that will confirm if you want to go to the ENS app.

register

Using an Existing Name

When you click on the Use Existing Name button, we show a Contract Name text field alongside the Select Name button to select one of the several names you already own.

use_existing

Clicking on this button will show a dialog showing your names that can be selected.

choose_parent

When you select one of these names, it will be chosen as the name you want to set to your contract.

use_existing_2

You can also enter an existing name in the text field.

This way, you don’t have to mint a new subname (and save gas!) and simply pick whichever name you would love to set for your contract

Simplifying Naming

With the ability to use an existing name, we’ve cut down the effort it takes to name a contract when you already own a primary ENS name.

Our goal is for every contract on Ethereum to be named. Adding an option to use an existing name simplifies the naming process, giving users the choice to either create a new subname or simply use an existing name

It’s one more step in our broader mission to retire hex addresses for good from the Ethereum UX.

Head to Enscribe App and try to name your contract with an existing name.

Happy Naming! 🚀

Understanding ENS & Contract Naming Trends: Insights from Our Dune Dashboard

· 2 min read
Abhijeet Bhagat
Enscribe Senior Engineer

The Enscribe team believes in the importance of having metrics to track our progress against our mission — eliminating hex contract addresses for users and making Ethereum safer. Ethereum Name Service (ENS) is central to this vision, but despite ENS adoption growing steadily, the gap between deployed contracts and named contracts remains significant.

That’s why we built a Dune Analytics dashboard to understand where ENS naming adoption for contracts stands today.

Unpacking the Dashboard

Our dashboard provides a number of key charts, these are outlined below.

  • Total Number of Named Contracts shows a count of how many contracts have primary ENS names

total_named_contracts

  • Total Number of Contracts That Can Be Named (ERC-173/ERC-5133) shows how many contracts deployed on Ethereum can be set a primary name. These include ERC-173 and ERC-5133 contracts

total_contracts_that_can_be_named

  • Monthly Contract Naming Activity shows contract naming activity since the last 4 years

monthly_contracts_named

  • Contract Names Set in Past 12 Months reveals how many contracts have been assigned a primary ENS name in the past 12 months

contracts_named_12_months

  • Most Recently Named Contracts shows the latest 1000 contracts with their primary ENS names sorted by date

most_recently_named

Making Hex a Relic of the Past

By tracking these metrics, we directly measure the impact of our efforts at Enscribe. We want to see the number of named contracts on Ethereum increase, with a view to ultimately eliminating hex contract addresses for users.

Millions of contracts are still unnamed, and each one represents an opportunity to make Ethereum more user-friendly and safer.

Join us in shaping a more human-readable Ethereum. Head over to Enscribe and start naming your contracts today, then check the impact of your activity in our Dune dashboard.

Happy naming! 🚀

ENSIP: Contract Metadata Standard and Text Records

· 4 min read
Nischal Sharma
Enscribe Lead Engineer

Smart contracts power the onchain economy, but they lack proper identity infrastructure. When users encounter a contract address like 0x742d35cc567890c000c000c07c81c25d7df34793, they can't easily verify what it does, who built it, or whether it's safe to use.

Enscribe has been working to solve this through contract naming. Now we're taking the next step by proposing a new ENS Improvement Proposal that establishes a comprehensive metadata standard for smart contracts.

The Problem with Contract Identity

Smart contracts face several identity challenges:

  • Trust Issues: Users can't easily verify if a contract is legitimate or malicious
  • Missing Documentation: No standard way to find a contract's docs, source code, or audit reports
  • Inconsistent Information: Wallets and dApps show different (or no) contract details
  • Poor Developer Experience: No standard API for contract discovery and metadata

While ENS enables human-readable contract names, the ecosystem lacks standardized metadata storage. Projects create custom solutions, users rely on centralized services, and critical information gets scattered across different platforms.

Our Proposed Solution

We've submitted an ENSIP that extends ENSIP-5 (Text Records) with standardized metadata fields for smart contracts. This creates one source of truth for contract information, stored directly in ENS records.

Imagine if instead of simply seeing a hex contract address you had a rich view of the contract such as this:

Enscribe contract profile showing organized technical details

Our proposed standard would serve as a foundation to make such information available for smart contracts across Ethereum.

New Text Record Fields

Contract Classification:

  • category: Contract type (defi, dao, utility, gaming)
  • license: Software license (MIT, Apache-2.0)
  • docs: Official documentation links

Security Information:

  • audits: Structured audit report data with auditor names and report links
  • proxy: Proxy contract details and implementation addresses

Compiled Metadata Resolver

The proposal introduces a new resolver profile for complete compiler-generated metadata. Building on ENSIP-4's (Support for contract ABIs) multi-encoding approach, it supports:

  • JSON formats: Uncompressed and compressed
  • CBOR encoding: For onchain parsing
  • URI storage: IPFS, Arweave for large files

This metadata contains everything needed for contract verification: ABI definitions, compiler settings, source code hashes, and NatSpec documentation.

Real Impact

This standard solves concrete problems:

  • Users can verify contract authenticity before signing transactions
  • Developers get standard APIs for contract metadata across all applications
  • Projects build professional contract identity that increases user trust
  • Ecosystem reduces dependence on centralized services

Contract Metadata in Action

We've implemented this metadata standard for our own contract as a demonstration. You can see v0.enscribe.named.eth on ENS Manager with all the proposed metadata fields populated (some values are placeholder for now).

Since the ENS manager app doesn't yet render contract metadata optimally (it's designed for user profiles), here's how we envision displaying contract metadata in applications built for contracts:

ENS Manager showing basic contract metadata fields Current ENS Manager view - shows metadata but not optimized for contracts

Enscribe contract profile view Enscribe's contract-focused interface - Technical details, security audits, and expanded metadata view

The difference is clear: contract-specific interfaces can organize and display metadata in ways that help developers and users understand what they're interacting with.

We Need Your Input

The proposal draws from our experience building contract naming tools, but community feedback shapes the final standard.

Help us refine:

  • Technical implementation approach
  • Additional metadata fields
  • Wallet and dApp integration needs
  • Use cases we should address

Review and Feedback

Enscribe makes smart contracts easier to trust by giving them human-readable names. This ENSIP extends that mission — moving from basic naming to complete contract identity infrastructure.

Read the full proposal: ENSIP: Contract Metadata Standard and Text Records

The proposal includes technical specifications, implementation examples, and design rationale. Whether you build protocols, develop wallets, or use onchain applications, your input helps create better infrastructure.

Join the discussion and help us build standardized, discoverable contract identity for the onchain world. You can also share your thoughts, suggestions, and any issues you encounter through our Discord community, Telegram, or X.

Happy naming! 🚀