Skip to content

register names from the registrar allowance, also while sales are closed - #27

Merged
epoberezkin merged 9 commits into
simplex-chat:simplexfrom
brenzi-agent:ab/allowance-registration
Nov 26, 2026
Merged

epoberezkin merged 9 commits into
simplex-chat:simplexfrom
brenzi-agent:ab/allowance-registration

Conversation

@brenzi-agent

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

Copy link
Copy Markdown

SimpleX registers names for partners who have no wallet yet. While public sales are closed, the dApp offers no registration, and the admin Safe's registerReserved needs two of four owners. This lets a Ledger account with a registrar allowance on SimplexSponsor (W0, set by the guardian Safe) register a name through the sponsored path, and hand it over later with the existing Send and Claim. No contract changes (ens-contracts 6e035ada, on mainnet).

Pricing (steps/Pricing)

  • An account whose registrarAllowance on the sponsor is above zero sees the allowance path in place of the ETH path, also while public sales are closed (setPublicSalesOpen gates only the payable path).
  • The operator chooses the duration, up to the sponsored horizon (4015 days, or 1095 for a community name).
  • The invoice shows the charge in USD (controller.rentPriceUSD(label, duration), base and premium, as the sponsor deducts it), the network fee, and the allowance left after the charge. "Register with allowance"; "Allowance too low" when the allowance does not cover the charge, also on Info and Transactions.

Transactions, all sent by the connected account W0:

  1. commitUnderGeneralTerms / commitUnderCommunityTerms: W0 accepts the terms, and the commitment is made in the same call.
  2. The wait of minCommitmentAge.
  3. SimplexSponsor.registerWithCredit(registration, 14, 0, 0, 0x) with W0 as owner, so the sponsor checks no signature; 14 dispute days, the contract minimum.

Complete shows the charge in USD from RegistrarAllowanceSpent. errors.ts names InsufficientAllowance, DisputeDaysOutOfRange, DisputePeriodOver and DisputeUntilMismatch (DisputePeriodNotOver comes with #19).

Texts (approved): "Register with allowance", "Allowance too low", "Allowance left".

States: while the allowance is read, the pricing step shows a loading button to every connected account; a failed read shows "Error syncing data" with "Try Again"; the form is chosen once the read settles. A duration chosen for an allowance registration is kept on Back. A registration whose allowance no longer covers the charge stops before its commit with "Allowance too low", unless the register's simulation succeeds.

Tests and CI: each test commit failed in CI before its code (runs 45612023918, 45621162828, 45623501124, 45639708768). Head run 45640303303: the three builds pass; the Test workflow fails only on the two AvatarUpload tests that fail on simplex too, fixed by #21 (1997 passed).

Review: two blind review rounds, their findings fixed or answered; declined: a connect button on the closed-sales card (kept as it is).

The temporary-owner option is stacked on this change in a separate PR.

Screenshots

Base simplex 8ae4e66, PR 858b402. 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.

Account #1 (W0) has a registrar allowance of $1,000 on SimplexSponsor, set by account #0, the local guardian. The price of partnername.simplex for 2 years is $100.

  • Pricing for W0: duration up to the sponsored horizon (+ enabled), the invoice in USD with “Est. network fee” and “Allowance left” $900.00, and “Register with allowance”; on the base, 2 years fixed, the ETH invoice and Next. Flip diff.
    pricing
  • Pricing with public sales closed: the same allowance form; on the base, “Public sales are not open yet”. Flip diff.
    pricing-sales-closed
  • Pricing with a $10 allowance: “Allowance too low”, disabled, and “Allowance left” −$90.00; on the base, the ETH form. Flip diff.
    pricing-allowance-too-low
  • Pricing while the allowance is read: the heading and a loading Next.
    pricing-allowance-loading
  • Pricing after the allowance read failed: “Error syncing data” with “Try Again”.
    pricing-allowance-read-failed
  • Info: the allowance invoice; on the base, the ETH invoice. Flip diff.
    info
  • Info after the allowance was lowered to $10: “Allowance too low” in place of Begin; on the base, Begin. Flip diff.
    info-allowance-too-low
  • Transactions after the allowance was lowered to $10, before the commit: “Allowance too low” and Back; on the base, Start timer. Flip diff.
    transactions-allowance-too-low
  • Complete: “2 years registration” $100.00 charged to the allowance; on the base, 100.0000 ETH paid. The same name is registered on each build from the same chain snapshot. Flip diff.
    complete

The loading and failed reads are made by request interception in the browser: the registrarAllowance call inside the Multicall3 batch is answered as failed; the loading frame is taken during the query's retries, the failed frame after them.

@epoberezkin
epoberezkin merged commit 447574f into simplex-chat:simplex Nov 26, 2026
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