AdvancedBulkRenewal: A stateless contract for flexible duration bulk renewals (Live on ENSBook)

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.

:light_bulb: 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.

:sparkles: Key Features & Architecture

  1. Independent Durations: You can renew ["nameA", "nameB"] for [1 year, 5 years] in one go.
  2. 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).balance to the official ENS Controller and relies on the Controller’s automatic refund mechanism to return excess ETH to the user immediately.
  3. Referrer Support: It exposes the referrer field (bytes32) from the ETHRegistrarController, making it integration-friendly for other frontends.
  4. Gas Optimized: We used custom errors and unchecked loops (where safe) to keep overhead low.
  5. Clean & Verified: The code is verified on Etherscan (Compiler v0.8.32) with zero warnings.

:rocket: 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.

:link: Links & Info

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

3 Likes

Update: A small “localization” fix :sweat_smile:

I realized I might have accidentally signed everyone up for a Mandarin crash course yesterday. The app’s default language was set to Chinese—my apologies!

I’ve just pushed a hotfix. New visitors will now see English by default.

For those who already visited:
Since ENSBook is strictly a Local-First app (as promised!), your browser likely cached the previous config in localStorage. If you are still seeing Chinese characters:

  1. Click the Gear icon (Settings) in the top right.

  2. Look for the Globe icon (:globe_showing_europe_africa:) in the sidebar.

  3. Switch to English.

Thanks for bearing with me while I polish the edges! :hammer_and_wrench:


While I’m at it… Meet ENSBook v3.0 :books:

Since I’ve already “fixed the language barrier” :joy:, I thought it would be a good time to properly introduce the platform that powers this bulk renewal contract.

We’ve just completed a major refactor of ENSBook, transforming it from a simple tool into a comprehensive ENS portfolio manager.

If you are tired of heavy, centralized dashboards, you might like our Local-First philosophy:

  • :rocket: Advanced Bulk Renewal: As mentioned in the OP, this is the only UI (that I know of) where you can “Renew Until…” a specific date, aligning all your names’ expiries in one tx.

  • :yin_yang: Dual-Mode Workflow:

    • Home: A scratchpad for quick, messy work (paste text, check availability, bulk renew).

    • Mine: A persistent portfolio tracker defined by rules (e.g., your wallet address).

  • :high_voltage:High-Performance Search …

  • :magnifying_glass_tilted_left: Intelligent Table Views …

  • :shield: Data Sovereignty & Backup …

  • :locked: Zero Backend: Your watchlists, memos, and settings live entirely in your browser’s localStorage. We don’t have a database, so we can’t track you even if we wanted to.

  • ……

It’s open-source, fast, and respects your privacy.

:backhand_index_pointing_right: Full Release Notes & Docs: GitHub README

Give it a spin and let me know what you think!

1 Like