[Bug]: UI encodes the old 4-field Registration struct, so registration reverts
Nobody has claimed this yet.
- Dominant language
- Solidity
- Stars
- 4
- Forks
- 2
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 24
Description
Component
Registration
Priority
P1
What happened?
The UI's generated contract types in packages/ui/.cdm (produced by cdm install from cdm.json) model the DotnsRegistrarController Registration struct with four fields: label, owner, secret, reserved. The deployed controller takes six, adding maxPrice and pricingVersion. The four-field encoding produces a different function selector, so makeCommitment, register, and registerReserved match no function on the deployed contract and revert with empty data. Registration through the UI cannot complete.
Expected behavior
The UI encodes the six-field Registration struct, reads the current cost-model version, and completes a commit-reveal registration.
Reproduction
Start a registration in packages/ui against the paseo-next deployment and observe the empty-data revert on makeCommitment.
Selector check against the deployed controller 0xBdaA01bD1bA67d709F2b1fF286Da0d854977EA30:
makeCommitment((string,address,bytes32,bool,uint256,uint256))=0x7d0450f0is present.makeCommitment((string,address,bytes32,bool))=0x7a23df1dis absent, and reverts with empty data like any unknown selector.
Additional context
cdm.json pins @dotns/* at latest, which resolves to a release predating the struct change. The six-field struct ships in v0.5.8-rc1.
Two on-chain rules accompany the new fields, and the UI has to honour both:
commit()stamps the current cost-model version onto the commitment, andregister()rejects a reveal whosepricingVersiondiffers from that stamp. The UI must readcurrentVersion()from the cost-model registry, resolved viaprotocolRegistry().get(bytes32("costModel")), and seal it into the commitment.register()reverts withPriceExceedsMaxwhen the charged price exceedsmaxPrice, andmaxPriceis part of the commitment preimage, so it must be sealed at commit time and reused unchanged at reveal.
The SDK ABIs carry the same drift and need the same release bump. The UI needs the equivalent: regenerate the cdm types against the deployed ABI and thread maxPrice and pricingVersion through the registration flow.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/ui/.cdm and cdm.json, then trace the UI registration flow that calls makeCommitment, register, and registerReserved. Regenerate the cdm types against the deployed six-field Registration ABI and inspect the SDK ABIs for the matching release bump. Done means the UI reads currentVersion(), preserves maxPrice and pricingVersion through commit and reveal, and completes registration against the paseo-next deployment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100