[Feat]: Read the network TLD from the registry in tests instead of a literal
Nobody has claimed this yet.
- Dominant language
- Solidity
- Stars
- 4
- Forks
- 2
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 24
Description
Component
Other
Priority
P2
Summary
The test suite hardcodes the TLD as the literal .dot in roughly 36 places, for example string.concat(label, ".dot"). The TLD is per network and read live from the protocol registry, and the fixture already exposes it through protocolRegistry.tld(), derived from the single TLD_LABEL constant in BaseDotns. The literals drift from the configured TLD, so a change to TLD_LABEL would not flow through these assertions.
Proposal
- Replace
string.concat(label, ".dot")and similar literals withstring.concat(label, protocolRegistry.tld()). - Keep
TLD_LABELas the single value the fixture initialises the registry with, so every derivation follows from one place.
Acceptance criteria
- No test hardcodes the TLD as a literal; full names derive from
protocolRegistry.tld(). - Changing
TLD_LABELflows through every affected assertion with no other edits.
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
Search the test suite for hardcoded .dot literals such as string.concat(label, ".dot"), then inspect how protocolRegistry.tld() is exposed and initialized from TLD_LABEL in BaseDotns. Replace the affected literals so full names derive from the registry, and verify that changing TLD_LABEL updates every assertion without other edits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain, testing
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- Half a day
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100