{"id":43592615,"url":"https://github.com/thenamespace/l2-subnames-poc","last_synced_at":"2026-02-04T02:12:55.981Z","repository":{"id":246107076,"uuid":"819745948","full_name":"thenamespace/l2-subnames-poc","owner":"thenamespace","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-26T16:23:41.000Z","size":1176,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-26T22:42:37.300Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thenamespace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-25T06:03:07.000Z","updated_at":"2024-06-26T16:23:44.000Z","dependencies_parsed_at":"2024-06-25T22:29:25.109Z","dependency_job_id":null,"html_url":"https://github.com/thenamespace/l2-subnames-poc","commit_stats":null,"previous_names":["thenamespace/l2-subnames-poc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thenamespace/l2-subnames-poc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenamespace%2Fl2-subnames-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenamespace%2Fl2-subnames-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenamespace%2Fl2-subnames-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenamespace%2Fl2-subnames-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thenamespace","download_url":"https://codeload.github.com/thenamespace/l2-subnames-poc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenamespace%2Fl2-subnames-poc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29064264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T01:55:38.219Z","status":"online","status_checked_at":"2026-02-04T02:00:07.999Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-04T02:12:54.643Z","updated_at":"2026-02-04T02:12:55.965Z","avatar_url":"https://github.com/thenamespace.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# L2 Subnames!\n\nThis repository contains a proof of concept code for issuing subnames on L2 chains.\nIn a nutshell, every name has a separate NFT contract, deployed on an L2 chain. The minters can mint a subname via NameRegistryController contract.\n\nNameFactory is responsible for allowing listing a name only to a lister who really owns a name on mainnet.\n\n# ENS Name Listing\n\nThe listing of an ENS name will allow the name to be used for minting of subnames. The initial step is to generate an [EIP712 signature](https://eips.ethereum.org/EIPS/eip-712).\n\nThe signature type is defined as:\n`\"RegistryContext(string listingName,string symbol,string parentLabel,string baseUri,address owner,address resolver,uint8 parentControl,uint8 listingType)\"`\nThe signature is generated using the private key of the `verifier` account, which is stored in the `NameRegistryFactory` contract.\n\nThe next step is to call the `create(RegistryContext memory context, bytes memory verificationSignature)` function of `NameRegistryFactory`, with the following paramaters:\n\n- `verificationSignature` - the signature generated by the `verifier` private key\n- `context` - registration parameters defined as:\n\n```\nstruct RegistryContext {\n    string listingName;\n    string symbol;\n    string parentLabel;\n    string baseUri;\n    address owner;\n    address resolver;\n    ParentControl parentControl;\n    ListingType listingType;\n}\n\nenum ListingType {\n    BASIC,\n    EXPIRABLE\n}\n\nenum ParentControl {\n    NO_CONTROL,\n    CONTROLLABLE\n}\n```\n\nThere are two types of listings `BASIC` and `EXPIRABLE`. The `BASIC` listing creates a simple ERC721 token for the listed ENS Name, while the `EXPIRABLE` listing also creates ERC721 token, whose subnames will have an expiry.\n\nAlso, there is a level of control, with `CONTROLLABLE` listings allowing the parent to burn minted subnames, so that they can be minted again.\n\nOnce the `create()` function is called and `verificationSignature` is verified that it was generated by the `verifier` address, `NameRegistryFactory` will create a new ERC721 contract for the listed ENS name. The contract will then be used to mint subnames by assigning ERC721 token IDs to each subname.\n\n# ENS Subname Minting\n\nOnce the ENS name is listed, it can be used to mint subnames using the `NameRegistryController` contract. Similarly the minting process requires a signature generated of chain. The type of the signatrue is defined as:\n`\"MintContext(string label,string parentLabel,address resolver,address owner,uint256 price,uint256 fee,address paymentReceiver,uint256 expiry)\"` and it represents minting data.\n\nOnce the signature is generated the `mint(MintContext memory context, bytes memory signature, bytes memory extraData)` function of `NameRegistryController` can be called with the following parameters:\n\n- `signature` - the generated `MintContext` signature\n- `extraData` - data parameter set in the `NameMinted` event to track mints\n- `context` - minting parameters defined as:\n\n```\nstruct MintContext {\n    address owner;\n    string label;\n    string parentLabel;\n    address resolver;\n    uint256 price;\n    uint256 fee;\n    address paymentReceiver;\n    bytes[] resolverData;\n    uint256 expiry;\n}\n```\n\n# Architectural overview\n\n## Resolution\n\nThe subs are resolvable by ccip-gateway, using the ccip-read protocol (until we get an emv-gateway running).\n\n![resolution](https://namespace.fra1.cdn.digitaloceanspaces.com/misc/Resolution.png)\n\n## Minting\n\n![Minting](https://namespace.fra1.cdn.digitaloceanspaces.com/misc/Minting.png)\n\n## Setting Records\n\n![Records management](https://namespace.fra1.cdn.digitaloceanspaces.com/misc/Setting-Records.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenamespace%2Fl2-subnames-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthenamespace%2Fl2-subnames-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenamespace%2Fl2-subnames-poc/lists"}