Skip to content

estimate registration fees at the v2 contracts storage slots - #24

Merged
epoberezkin merged 9 commits into
simplex-chat:simplexfrom
brenzi-agent:ab/v2-storage-slots
Nov 23, 2026
Merged

epoberezkin merged 9 commits into
simplex-chat:simplexfrom
brenzi-agent:ab/v2-storage-slots

Conversation

@brenzi-agent

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

Copy link
Copy Markdown

The registration's fee estimate overrides two storage slots of the .simplex contracts, so that registerName can be simulated before its commitment is mature and before the owner's terms are accepted on chain. The slots were those of the v1 contracts (SimplexController.commitments at 260, SimplexNamePolicy.acceptedTerms at 103). The v2 contracts, deployed behind proxies from simplex-network/ens-contracts ebf7698 and used by this dApp since #23, keep them at 160 and 2. With the v1 slots, the simulation reverts, and the dApp falls back to a fixed 700,000 gas for the registration.

Change

  • src/hooks/gasEstimation/calculateTransactions.ts: COMMITMENTS_SLOT = 160 and ACCEPTED_TERMS_SLOT = 2; the comment explaining the v1 slot 260 is removed.
  • src/hooks/chain/useEstimateGasWithStateOverride.ts: the comment naming slot 260 is removed.
  • src/hooks/gasEstimation/calculateTransactions.test.ts: the overrides are checked by slot, key and value.

Evidence

@epoberezkin
epoberezkin merged commit b003795 into simplex-chat:simplex Nov 23, 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