Hi, I’m the developer behind ENSBook. While building our ENS management tool, we encountered a specific friction point with existing bulk renewal contracts: they often require renewing all names for the exact same duration.
As an ENS user, I often find myself wanting to renew my “forever name” for 5 years but my “experimental names” for just 1 year—or more importantly, aligning the expiration dates of multiple names to a specific day—all in a single transaction to save gas.
To solve this, I developed AdvancedBulkRenewal. After deploying it on Mainnet and verifying its stability in production on ENSBook, I thought I’d share it here as an open-source primitive for anyone who might need it.
Why I built this
The primary goal was flexibility. I wanted a lightweight tool that allows users to pass an array of names and a corresponding array of independent durations.
Key Features & Architecture
- Independent Durations: You can renew
["nameA", "nameB"]for[1 year, 5 years]in one go. - Stateless & Trustless:
- The contract has no owner, no admin, and no pausing mechanism. It is immutable.
- It uses a “Full Balance Pass-Through” strategy. It holds no funds. It simply forwards
address(this).balanceto the official ENS Controller and relies on the Controller’s automatic refund mechanism to return excess ETH to the user immediately.
- Referrer Support: It exposes the
referrerfield (bytes32) from the ETHRegistrarController, making it integration-friendly for other frontends. - Gas Optimized: We used custom errors and unchecked loops (where safe) to keep overhead low.
- Clean & Verified: The code is verified on Etherscan (Compiler v0.8.32) with zero warnings.
Live Implementation
This contract is currently powering the bulk renewal feature on ENSBook. By the way, I recently completely redesigned the ENSBook, and it’s now brand new!
It enables features like “Renew Until…”, where users can select a target date, and the frontend calculates the specific duration required for each name to align their expiry dates perfectly.
Links & Info
- Primary ENS Name:
bulk.ensbook.eth(You can interact with it directly using this name) - Contract Address (Mainnet): 0x0735086b17D590c19907E88B6915ecDf47Fe8D88
- Etherscan: https://etherscan.io/address/bulk.ensbook.eth
- Repo / Gist: https://github.com/hibbb/advanced-bulk-renewal
This is a small contribution, but I hope it helps other builders or power users who need more granular control over bulk renewals.
Best,
liubenben.eth
