Add FreeTrialSubdomainRegistrar alpha-agent mint UI and registrar integration; ABI & mobile script refactor#1469
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77c9aaad55
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| {"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"}],"name":"getParentStatus","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"parentLocked","type":"bool"},{"internalType":"bool","name":"registrarAuthorised","type":"bool"},{"internalType":"bool","name":"parentUsable","type":"bool"},{"internalType":"uint64","name":"parentEffectiveExpiry","type":"uint64"}],"stateMutability":"view","type":"function"}, | ||
| {"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"available","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}, | ||
| {"inputs":[{"internalType":"string","name":"label","type":"string"}],"name":"validateLabel","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}, | ||
| {"inputs":[{"internalType":"string","name":"label","type":"string"}],"name":"validateLabel","outputs":[],"stateMutability":"view","type":"function"}, |
There was a problem hiding this comment.
Restore boolean output for validateLabel
FreeTrialSubdomainRegistrarABI now declares validateLabel with outputs: [], but the deployed registrar at FREE_TRIAL_REGISTRAR returns a boolean, so Web3 decodes .call() to an empty object instead of true/false; in updateAlphaMintPreview, that object path is treated as valid (isContractValid = true), which suppresses registrar-side invalid-label feedback and can let users attempt registerSimple on labels the contract would reject.
Useful? React with 👍 / 👎.
Motivation
*.alpha.agent.agi.ethENS subnames via the on-chainFreeTrialSubdomainRegistrarand make the registrar state and availability checks first-class in the UI.registerSimpleflow and persist recent names locally for convenience.Description
mintGrid,mintPreview,mintAlphaLabel,mintAlphaRecipient,mintAlphaAgentBtn,mintAlphaStatus,recentAlphaAgentNames, and analphaMintReviewModalfor transaction review.FreeTrialSubdomainRegistrarcontract: addedFreeTrialSubdomainRegistrarABI(includingNameRegisteredevent), new constants (FREE_TRIAL_REGISTRAR,ALPHA_AGENT_PARENT,ALPHA_AGENT_PARENT_NODE), registrar wrapper handling, parent status reads, label validation, availability checks (available) and trial expiry display.normalizeAlphaLabel,validateAlphaLabelLocal, improved timestamp formatting viaformatTimestamp, updated recent-name localStorage key toagijobmanager_v27_recent_alpha_names, and functions to load/save/render recent names.registerSimple(parentNode,label,recipient)and addedmintAlphaAgentNameto run tracked txs and handleNameRegisteredevent outcomes.MIN_LABEL_LENGTH/MAX_LABEL_LENGTHABI types, added ENSJobPages getters (jobEnsLabel,jobEnsName,jobEnsURI,jobEnsNode) and improved ENS preview messaging.v27→v26in a few places, and renamed mobile enhancement IDs/classes and script content fromv27→v26(dock/sheet element and handler renames) to keep mobile shell consistent.Testing
Codex Task