Repository navigation
extend a name only as its holder, accepting its terms again - #19
Merged
epoberezkin merged 57 commits intoNov 26, 2026
Merged
Conversation
brenzi-agent
force-pushed
the
ab/renewal-terms
branch
3 times, most recently
from
November 20, 2026 11:23
69e9067 to
09ae727
Compare
brenzi-agent
marked this pull request as draft
November 20, 2026 12:11
brenzi-agent
force-pushed
the
ab/renewal-terms
branch
from
November 20, 2026 12:53
09ae727 to
efad563
Compare
brenzi-agent
force-pushed
the
ab/renewal-terms
branch
from
November 24, 2026 15:32
4f1f9b7 to
3a295f3
Compare
brenzi-agent
marked this pull request as ready for review
November 24, 2026 15:40
# 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
approved these changes
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
.simplexname 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 ofsimplexandproduction,renewis sent alone, and it reverts withTermsNotAccepted, so no extension in the dApp succeeds. With this change, the dApp follows the new rule.What users see
?renew=link opens the Extend dialog only for the holder; any other wallet sees "Connect the wallet that holds this name to extend it."renew. The fee covers both.renewalone.Holder —
src/hooks/useIsNameHolder.ts_holds):ownerOfwhile the name is live. Once the name expires,ownerOfreverts 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).useExpiryActionsoffers Extend only to the holder and opens the dialog without the "You do not own" step.useRenewopens the dialog only for the holder, and reads the holding only for a?renew=link.Acceptance —
src/transaction-flow/transaction/acceptRenewalTerms.tsacceptGeneralTermsForRenewaloracceptCommunityTermsForRenewal(tokenId, expires, duration, termsHash)on the name policy, withexpiresfrom the registrar'snameExpiresand the duration of the extension. Like therenewstep, it has no Back step, which would reset the chosen duration.ExtendNames-flow.tsx:useAcceptedRenewalTerms, besideuseAcceptedClaimTerms);extendNameswhen none is stored;renewwith the acceptance stored in slot 8 of the policy (ACCEPTED_RENEWAL_TERMS_SLOT, beside the registration's slots incalculateTransactions.ts);NotHolderandExpiryMismatchare 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, andDisputePeriodNotOverof 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
.simplexnever shows them:checkETH2LDFromNameandisNameExtendablerequire.eth;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
productionwith #26 as soon as both merge.Checks
simplexat b003795, its current head..simplexsuite with seven Extend tests added, run in the agents' private fork of the parent. The Extend tests: Extend only for the holder, also by a?renew=link; the holder accepts the general, or the community, terms and the name's expiry moves by a year; with an acceptance already on chain, one transaction; the dispute period refuses Extend until its end; Extend after it; Extend in the grace period, whereownerOfreverts.simplex6 of 7, each where this change's behaviour is missing: Extend shown to another wallet, no terms in the dialog, no dispute end. On both, the test with the acceptance already on chain passes, sincerenewalone then succeeds; before that acceptance, the samerenewreverts withTermsNotAccepted(in the node log). At show a name's dispute period, and extend it only after its end #26, its own dispute test passes too.https://github.com/brenzi-agent/simplex-namespace-contract/actions/runs/45571854005
https://github.com/brenzi-agent/simplex-namespace-contract/actions/runs/45571853622
renewwith the acceptance in effect is not covered by the e2e: the local Hardhat node does not take the state override ofeth_estimateGas. On mainnet, read-onlyeth_estimateGasofrenewfrom a holder, with the slot 8 override of this change: without the override it reverts withTermsNotAccepted, and with it the policy's check passes (the call then reverts withDisputePeriodNotOver, as that name is in its dispute period), on publicnode and on the Tenderly gateway, the dApp's last fallback RPC.ExtendNames-flow.test.tsxall 29, and the three builds and Knip pass: https://github.com/brenzi-agent/simplex-domains-app-v3/actions/runs/45584431725, https://github.com/brenzi-agent/simplex-domains-app-v3/actions/runs/45584431712. The two rows of "should name any other decoded revert of the renewal" fail at their test commit 80ca567, on thedisabledassertion: https://github.com/brenzi-agent/simplex-domains-app-v3/actions/runs/45583595684AvatarUpload.test.tsxfail the same way onsimplex(https://github.com/simplex-chat/simplex-domains-app-v3/actions/runs/45180157118) and are fixed by test: fix avatar upload tests for the timeout signal and status check #21.Screenshots
Base #26 f409c6b, PR c1485b4. Local chain: anvil 1.5.1, chain ID 1337, ens-contracts 6e035ada deployed by
scripts/deploy-local.mjsof 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.
?renew=31536000opened 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.TermsNotAccepted(string)). Flip diff.disputeUntilread 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.