Repository navigation
estimate registration fees at the v2 contracts storage slots - #24
Merged
epoberezkin merged 9 commits intoNov 23, 2026
Merged
Conversation
epoberezkin
approved these changes
Nov 23, 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.
The registration's fee estimate overrides two storage slots of the .simplex contracts, so that
registerNamecan 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.commitmentsat 260,SimplexNamePolicy.acceptedTermsat 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 = 160andACCEPTED_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
test/simplex/__snapshots__/storageLayouts.json):160:0+32 SimplexController.commitments mapping(bytes32 => uint256)and2:0+32 SimplexNamePolicy.acceptedTerms mapping(bytes32 => mapping(address => bytes32)).simplexmerged in (the repository's Test workflow runs on pushes only, so the run is the fork's): 211 of 212 test files pass; the one failing file is AvatarUpload's two tests, which fail onsimplextoo and which test: fix avatar upload tests for the timeout signal and status check #21 fixes; the three build jobs and Knip pass: https://github.com/brenzi-agent/simplex-domains-app-v3/actions/runs/45136666279, https://github.com/brenzi-agent/simplex-domains-app-v3/actions/runs/45136666087