Skip to content

extend a name only as its holder, accepting its terms again - #19

Merged
epoberezkin merged 57 commits into
simplex-chat:simplexfrom
brenzi-agent:ab/renewal-terms
Nov 26, 2026
Merged

epoberezkin merged 57 commits into
simplex-chat:simplexfrom
brenzi-agent:ab/renewal-terms

Conversation

@brenzi-agent

@brenzi-agent brenzi-agent commented Nov 14, 2026 •

Copy link
Copy Markdown

Stacked on #26, the dispute period: until it merges, this diff includes its commits.

The contracts change: simplex-network/ens-contracts#49, part of ens-contracts 6e035ada (tag simplex-mainnet-v2.1), the commit that brenzi/simplex-namespace-contract pins. Since 24 Nov, the .simplex name policy, controller and sponsor proxies run its implementations (0xf0f7f776…7b50, 0x7e33b4ac…38cf, 0x2f3c5421…30e0).

Since then, only the holder renews a name, and each renewal consumes the holder's acceptance of the current terms of the name's kind; the acceptance names the name's current expiry and the renewal's duration (SimplexNamePolicy.consumeRenewal). In the Extend dialog of simplex and production, renew is sent alone, and it reverts with TermsNotAccepted, so no extension in the dApp succeeds. With this change, the dApp follows the new rule.

What users see

  • The Ownership tab offers Extend only to the wallet that holds the name, in the grace period too; any other wallet sees only "Set reminder".
  • A ?renew= link opens the Extend dialog only for the holder; any other wallet sees "Connect the wallet that holds this name to extend it."
  • The Extend dialog shows the name's general or community terms, as registration and claim do. Next is enabled once they are accepted, and queues two transactions: the acceptance, then renew. The fee covers both.
  • An acceptance already given for the same expiry and duration is not asked for again: after a renewal left unfinished, Extend sends renew alone.
  • Next stays disabled, with "Not enough ETH in wallet", until the wallet holds the renewal's price and the network fees estimated at the current gas price.
  • Next stays disabled while the acceptance or the renewal reverts in the fee estimate with an error decoded by name: a sentence is shown for the five refusals below, and the error's name for any other. When the estimate fails without revert data, as on a failed request, Next stays enabled beside the error.
  • The terms panel and the admin page say that renewing also requires accepting the terms.

Holder — src/hooks/useIsNameHolder.ts

  • The holder is read as the name policy reads it (_holds): ownerOf while the name is live. Once the name expires, ownerOf reverts and ensjs reports no registrant, while the contract still lets the holder renew in the grace period; the name is then looked up among the wallet's tokens (balanceOf, tokenOfOwnerByIndex).
  • useExpiryActions offers Extend only to the holder and opens the dialog without the "You do not own" step. useRenew opens the dialog only for the holder, and reads the holding only for a ?renew= link.

Acceptance — src/transaction-flow/transaction/acceptRenewalTerms.ts

  • acceptGeneralTermsForRenewal or acceptCommunityTermsForRenewal(tokenId, expires, duration, termsHash) on the name policy, with expires from the registrar's nameExpires and the duration of the extension. Like the renew step, it has no Back step, which would reset the chosen duration.
  • ExtendNames-flow.tsx:
    • reads the stored acceptance (useAcceptedRenewalTerms, beside useAcceptedClaimTerms);
    • shows the terms and queues the acceptance before extendNames when none is stored;
    • estimates renew with the acceptance stored in slot 8 of the policy (ACCEPTED_RENEWAL_TERMS_SLOT, beside the registration's slots in calculateTransactions.ts);
    • disables Next while the expiry, the terms or the stored acceptance is refetched, while the balance is short, and while the estimate reverts with a decoded error. The balance warning compared a wei balance with a gas count and is replaced.
  • NotHolder and ExpiryMismatch are decoded by name. The five errors that refuse a renewal under these rules have a sentence in Extend in place of the error name: NotHolder, TermsMismatch, ExpiryMismatch, TermsNotAccepted, and DisputePeriodNotOver of show a name's dispute period, and extend it only after its end #26 ("The dispute period of this name has not ended yet. Try again later.").

Unchanged, because .simplex never shows them:

  • the profile header's Extend button and My Names' bulk Extend: checkETH2LDFromName and isNameExtendable require .eth;
  • the desynced-name banner: it needs a NameWrapper.

Merge order with #20: its /namepolicy page says registering or receiving a community name requires the community terms. Whichever of the two PRs merges second adds "or renewing" there.

Deploy order: the contracts this change needs run on mainnet since 24 Nov, so it can be deployed to production with #26 as soon as both merge.

Checks

Screenshots

Base #26 f409c6b, PR c1485b4. Local chain: anvil 1.5.1, chain ID 1337, ens-contracts 6e035ada deployed by scripts/deploy-local.mjs of simplex-namespace-contract main 24e530642; accounts of the test mnemonic only; Chromium at 1280 px (390 px for the phone menu), light theme, UTC. A flip diff is a GIF in which the base frame and the PR frame are shown in turn for 1.5 s each, labelled in a corner.

renewname.simplex is registered by account #0 on the payable path, without a dispute period; account #1 is a non-holder.

  • Ownership tab viewed by a connected non-holder: no Extend; on the base, Extend is offered. Flip diff.
    expiry-non-holder
  • Renewal link ?renew=31536000 opened by a connected non-holder: the banner “Connect the wallet that holds this name to extend it.”; on the base, the Extend flow opens with “You do not own renewname.simplex”. Flip diff.
    renew-link-non-holder
  • Extend by the holder: the general terms, “Registering, receiving or renewing this name requires accepting the SimpleX general terms.” and their checkbox, above the duration; on the base, the duration and the invoice. Flip diff.
    extend-terms
  • Extend after the terms are accepted, scrolled down: fee estimated (0.0002 ETH), Next enabled; on the base, the renewal estimate reverts and “Not enough ETH in wallet” is shown. Flip diff.
    extend-estimate
  • After Next: the first of two transactions, “Accept terms”; on the base, the single “Extend registration” transaction with “execution reverted: custom error 0xbcdf753d” (TermsNotAccepted(string)). Flip diff.
    extend-transactions
  • Extend of disputedname.simplex in its dispute period, with the browser's disputeUntil read answered as 0 by request interception, so that a renewal that the registrar refuses is estimated: “The dispute period of this name has not ended yet. Try again later.” with Next disabled; on the base, “Not enough ETH in wallet” with Next enabled. Flip diff.
    extend-dispute-not-over
  • Registration, terms block: “Registering, receiving or renewing this name requires accepting the SimpleX general terms.”; on the base, “Registering or receiving …”. Flip diff.
    pricing-terms
  • Registration with an invalid general terms link on the policy: “The general terms are not available, so names can't be registered, received or renewed now.”; on the base, “… registered or received now.” Flip diff.
    pricing-terms-unset
  • /admin, General Terms: “A name that is not listed can be registered, received or renewed only by someone who accepts the current general terms.”; on the base, “registered or received”. Flip diff.
    admin-general-terms
  • /admin, Community Names: “A listed name can be registered, received or renewed only by someone who accepts the current community terms. Names that are registered or in grace are skipped.”; on the base, “registered or received”. Flip diff.
    admin-community-names

brenzi-agent and others added 23 commits November 24, 2026 15:31
# Conflicts:
#	public/locales/en/transactionFlow.json
#	src/transaction-flow/input/ExtendNames/ExtendNames-flow.test.tsx
#	src/transaction-flow/input/ExtendNames/ExtendNames-flow.tsx
#	src/utils/errors.test.ts
#	src/utils/errors.ts
@epoberezkin
epoberezkin merged commit b57198c into simplex-chat:simplex Nov 26, 2026
@brenzi-agent
brenzi-agent deleted the ab/renewal-terms branch November 26, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants