{"id":43395266,"url":"https://github.com/namehash/namekit-contracts","last_synced_at":"2026-02-02T14:25:30.643Z","repository":{"id":208234094,"uuid":"718021389","full_name":"namehash/namekit-contracts","owner":"namehash","description":"Earn revenue for helping ENS grow","archived":false,"fork":false,"pushed_at":"2024-04-30T19:32:24.000Z","size":117,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-02T09:20:23.467Z","etag":null,"topics":["ens"],"latest_commit_sha":null,"homepage":"https://namekit.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/namehash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-13T07:53:04.000Z","updated_at":"2024-04-30T19:32:28.000Z","dependencies_parsed_at":"2024-04-27T17:24:36.441Z","dependency_job_id":"e57879db-65c6-4dbf-93a0-d9f61e5a0736","html_url":"https://github.com/namehash/namekit-contracts","commit_stats":null,"previous_names":["namehash/namekit-contracts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/namehash/namekit-contracts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namehash%2Fnamekit-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namehash%2Fnamekit-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namehash%2Fnamekit-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namehash%2Fnamekit-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/namehash","download_url":"https://codeload.github.com/namehash/namekit-contracts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namehash%2Fnamekit-contracts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29012922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T12:48:30.580Z","status":"ssl_error","status_checked_at":"2026-02-02T12:46:38.384Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ens"],"created_at":"2026-02-02T14:25:26.363Z","updated_at":"2026-02-02T14:25:30.638Z","avatar_url":"https://github.com/namehash.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NameKit contracts\n- [NameKit contracts](#namekit-contracts)\n  - [How it works?](#how-it-works)\n  - [Getting started](#getting-started)\n    - [Required](#required)\n    - [Deploying your contracts](#deploying-your-contracts)\n  - [Commands](#commands)\n    - [For registering a name through](#for-registering-a-name-through)\n    - [For withdrawing collected fees](#for-withdrawing-collected-fees)\n  - [Contracts deployed](#contracts-deployed)\n    - [Mainnet](#mainnet)\n    - [Sepolia](#sepolia)\n  - [License](#license)\n\n## How it works?\nThis project is one of many components of NameKit. The goal of this contract template is helping ENS grow by incentivizing more wallets and apps to promote ENS name registration and renewal to their users. The contract enables those wallets \u0026 apps to define a custom price premium on top of the base rate for .eth names. This enables the creation of recurring revenue streams for builders who help ENS grow. We hope this creates more incentives for wallets \u0026 apps to onboard their users into ENS.\n\nEach wallet and app should deploy their own instance of this contract that defines their specialized treasury address.\n\nThis contract only works for the registration and renewal of direct subnames of \".eth\".\n\nThe contract is designed and optimized to spend as little gas overhead as possible. Users pay a little more for the app to have this revenue opportunity.\n\n```mermaid\nsequenceDiagram\n\tautoNumber\n\tApp -\u003e\u003e User: Request base price + custom fee\n  User -\u003e\u003e NameKit: Register tx\n\tNameKit -\u003e\u003e ENS: Forward register tx\n\tENS --\u003e\u003e User: Send ENS name\n\tENS --\u003e\u003e NameKit: Send refund (custom fee)\n```\n\n1. The app gets the base price of the desired \".eth\" name and adds their customized price premium. The app then requests this total value in the registration transaction to be approved by the user.\n2. The user approves the transaction, interacting with app's custom deployment of the NameKit Controller contract.\n3. The app's custom deployment of the NameKit Controller forwards the transaction to ETHRegistrarController with all the user-provided parameters.\n4. ETHRegistrarController sends the ENS name NFT to the user.\n5. The app's custom deployment of the NameKit Controller accrues their customized price premium, which can be withdrawn to their custom treasury address whenever desired.\n\n\n\n## Getting started\n\n### Required\n- Node and Yarn, to run the scripts\n- Infura API key, to deploy and interact with contracts\n- Etherscan API key, to verify contracts\n\n\n### Deploying your contracts\n1. Install all the dependencies with [Node](https://nodejs.org/en/download/) and Yarn.\n   ```\n   yarn\n   ```\n\n2. Copy the `sample.env` file and rename it to `.env`, then complete all missing variables.\n3.  If having the same contract address in testnet and mainnet is important to you, then the following steps are needed.\n    1.  Same treasury address across networks. \n        -  If it's an EOA (address that comes from private key), no worries. \n        -  If you want a Safe Multisig, then create your treasury [here](https://smold.app/safe).\n    2. The deployer private key must be a fresh account, with zero transactions. Make sure to send some ETH to this account in order to pay for fees on contract deployment.\n4. Deploying contracts\n   - Sepolia\n   ```\n   yarn deploy:sepolia\n   ```\n   - Mainnet\n   ```\n   yarn deploy:mainnet\n   ```\n5. Fork this repo and change the NamekitController and treasury addresses on README, for internal documentation.\n\n🎉 Congrats, now you have a new way to generate revenue!!\n\n## Commands\nBefore running these commands, make sure to:\n- Generate the typechain interfaces: `yarn compile`\n- Change CHAIN_ID in `.env` to the desired network you want to interact with. 1 = Mainnet, 11155111 = Sepolia.\n\n### For registering a name through\n- Make sure to fill the environment variables\n  - PLATFORM_URL: For making your registrations to count on [ENSIP-14](https://docs.ens.domains/ens-improvement-proposals/ensip-14-platform-source-parameter) standard.\n  - NAME_TO_REGISTER\n```\nyarn register-name\n```\n\n### For withdrawing collected fees\n```\nyarn withdraw\n```\n  \n## Contracts deployed\n\n### Mainnet\n- [Example NamekitController](https://etherscan.io/address/0x232332263e6e4bd8a134b238975e2200c8b7dac1#code): `0x232332263e6e4bd8a134b238975e2200c8b7dac1`\n- [Example NameKit Treasury](https://etherscan.io/address/0xC362EB2dDCde1866b263fF59778c0a6eF69eF4F3#code): `0xC362EB2dDCde1866b263fF59778c0a6eF69eF4F3`\n- [ENS ETHRegistrarController](https://etherscan.io/address/0x253553366Da8546fC250F225fe3d25d0C782303b#code): `0x253553366Da8546fC250F225fe3d25d0C782303b`\n- [ENS Public resolver](https://etherscan.io/address/0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41#code): `0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41`\n- [ENS Registry with fallback](https://etherscan.io/address/0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e#code): `0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e`\n- [Chainlink ETH/USD data feed](https://etherscan.io/address/0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419#code) `0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419`\n\n### Sepolia\n- [Example NamekitController](https://sepolia.etherscan.io/address/0x1cf7735B2e2641274f6d038701c561010D2fCf46#code): `0x1cf7735B2e2641274f6d038701c561010D2fCf46`\n- [Example NameKit Treasury](https://sepolia.etherscan.io/address/0xb3C70b0FEeFfE0F3a540514C8080147c296982d3#code): `0xb3C70b0FEeFfE0F3a540514C8080147c296982d3`\n- [ENS ETHRegistrarController](https://sepolia.etherscan.io/address/0xFED6a969AaA60E4961FCD3EBF1A2e8913ac65B72#code): `0xFED6a969AaA60E4961FCD3EBF1A2e8913ac65B72`\n- [ENS Public resolver](https://sepolia.etherscan.io/address/0x8FADE66B79cC9f707aB26799354482EB93a5B7dD#code): `0x8FADE66B79cC9f707aB26799354482EB93a5B7dD`\n- [ENS Registry with fallback](https://sepolia.etherscan.io/address/0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e#code): `0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e`\n- [Chainlink ETH/USD data feed](https://sepolia.etherscan.io/address/0x694AA1769357215DE4FAC081bf1f309aDC325306#code): `0x694AA1769357215DE4FAC081bf1f309aDC325306`\n\n_ABIs are avaiable on Etherscan_\n\n## License\n\nLicensed under the MIT License, Copyright © 2023-present [NameHash Labs](https://namehashlabs.org).\n\nSee [LICENSE](./LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamehash%2Fnamekit-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamehash%2Fnamekit-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamehash%2Fnamekit-contracts/lists"}