{"id":15141966,"url":"https://github.com/portalnetwork/tns","last_synced_at":"2025-10-23T19:30:57.090Z","repository":{"id":52142350,"uuid":"145664791","full_name":"PortalNetwork/tns","owner":"PortalNetwork","description":"📙🌐 Documents and implementations for the Tomochain Name Service.","archived":false,"fork":false,"pushed_at":"2021-05-09T16:45:18.000Z","size":4012,"stargazers_count":6,"open_issues_count":6,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T20:30:35.069Z","etag":null,"topics":["blockchain","tns","tomochain"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/PortalNetwork.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-22T06:17:30.000Z","updated_at":"2022-04-28T06:49:29.000Z","dependencies_parsed_at":"2022-09-08T06:31:38.992Z","dependency_job_id":null,"html_url":"https://github.com/PortalNetwork/tns","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PortalNetwork%2Ftns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PortalNetwork%2Ftns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PortalNetwork%2Ftns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PortalNetwork%2Ftns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PortalNetwork","download_url":"https://codeload.github.com/PortalNetwork/tns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237877021,"owners_count":19380344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["blockchain","tns","tomochain"],"created_at":"2024-09-26T09:21:13.104Z","updated_at":"2025-10-23T19:30:56.472Z","avatar_url":"https://github.com/PortalNetwork.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"![TomoChain Name Service](./assets/title.jpg)\n\n\u003e 📖🔍 Documents of the TomoChain Name Service.\n\n# Overview\n\n## 💡 What is TomoChain?\nTomoChain is a public blockchain for dApps. The mission is to be a leading force in building the Internet of Value, designing its infrastructure and working to create an alternative financial system which is more secure, transparent, efficient, inclusive and equitable for everyone.\n\n## 💡 What is BNS?\nBNS – or blockchain name system – is the protocol on the internet that turns human-comprehensible decentralized website names such as ‘website.perl’ or ‘mywebsite.eth’ into addresses understandable by decentralized network machines.\n\n## 📝 Description\n\nTNS is the TomoChain Name Service, a distributed, open, and extensible naming system based on the TomoChain blockchain.\n\n## 📚 Documents\n\n#### Table of Contents\n- [Introduction](./docs/INTRODUCTION.md)\n- [Implementation](./docs/IMPLEMENTATION.md)\n    - [Registry](./docs/REGISTRY.md)\n    - [Registrar](./docs/REGISTRAR.md)\n    - [Resolver](./docs/RESOLVER.md)\n- [Integration](./docs/INTEGRATION.md)\n\n## 📝 Guideline\n- [Smart Contract Testing](./tns/README.md)\n- [Smart Contract Design Principle](./docs/SMART_CONTRACT_DESIGN_PRINCIPLE.md)\n- [Smart Contract Deploy](./docs/TUTORIAL.md)\n- [TNS Deploy](./docs/Contract_deploy.md)\n\n## 🗂️ TomoChain Technical Stack\nTomoChain Name Service (TNS) is governed by three smart contract components, registrar, registry, and resolver. The three smart contracts contain the core logic for the TomoChain Name Service implementation, from the ownership managment for a domain, to the global resolving layer that is reposible for connecting different tech stacks and enhances the usability for different infrastructures.\n![TomoChain Tech Stack](./assets/TomoChain-layer.png)\n\n### State Layer\nState layer is where user’s “state”, or user’s information and behavior, is stored. TomoChain is where these data are stored, and gives users the ability to control their own state.\n![TomoChain State](./assets/Tomo-state.png)\n\n### Computation Layer\nTomoChain uses EVM (Ethereum Virtual Machine) in its computation layer, which is responsible for executing complicated calculations. It is in charge of managing, checking the code of smart contract on TomoChain. When a transaction occurs on TomoChain, the logic designed in EVM will determine its path that cannot be altered. Portal Network will be deploying TNS (Smart Contract Standard) on this layer that consists 3 major components.\n![TomoChain Computation](./assets/Tomo-computation.png)\n\n### Component Layer\nThe design of digital assets can have more functions through combing the State Layer and Computation Layer, such as : crypto assets, and identities. Those programmable assets has many more potential usages and sub-economies within. TNS includes three major component:\n\nA registry component stores all the information relative to a domain, and can operate the set of logics to map between the TomoChain domains and its owners.\nA registrar component governs the domain purchase through the customized auction or trading rules.\nA resolver component processes the corresponding resources from wallet address to decentralized application or website on TomoChain.\n![TomoChain Component](./assets/Tomo-component.png)\n\n### Protocol Layer\nOn the Protocol Layer, we will be presenting our BNS (Blockchain Name Service) standards that can make the TNS more efficient and applicable. With the state, computation and component layers behind the scene, protocol layer serve as a gateway for users and developers to interact with our TNS standard.\n![TomoChain Protocol](./assets/Tomo-protocol.png)\n\n### User Control Layer\nUser control layer is in charge of managing private keys to communicate with the state layer. TNS empowers users to control, set up and manage their digital asset with an easier and readable text, which could be further utilized in the next application layer.\n![TomoChain User](./assets/Tomo-user.png)\n\n### Application Layer\nTNS can be implemented into many other applications on TomoChain, such as wallet that can resolve TNS, dApp that utilize TNS for users identity and many more. We believe that it is an essential components to provide a better environment for both technical and non-technical users.\n![TomoChain Application](./assets/Tomo-app.png)\n\n\n## ⚙️ TNS smart contract test coverage\n__Continuous updating__\n- [Coverage Report](./tns/coverage/)\n\n![Coverage](./assets/coverage.png)\n\n```\nLaunched testrpc on port 8555\nRunning: truffle test\n(this can take a few seconds)...\nUsing network 'development'.\n\n\n\n  Contract: TNS\n    ✓ should allow registration of names (103ms)\n    ✓ should register a domain (125ms)\n    ✓ should check resolver interfaces (99ms)\n    ✓ should not support a random interface\n    ✓ should set resolver for node (138ms)\n    ✓ should set text (207ms)\n    ✓ should set address (185ms)\n    ✓ should set multihash (200ms)\n\n\n  8 passing (3s)\n\n-------------------|----------|----------|----------|----------|----------------|\nFile               |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n-------------------|----------|----------|----------|----------|----------------|\n contracts/        |       75 |       50 |       76 |     77.5 |                |\n  TNS.sol          |      100 |      100 |      100 |      100 |                |\n  TNSRegistrar.sol |      100 |       50 |      100 |      100 |                |\n  TNSRegistry.sol  |    78.57 |       50 |    77.78 |       80 |       68,69,96 |\n  TNSResolver.sol  |    66.67 |       50 |    69.23 |    68.42 |... ,99,130,141 |\n-------------------|----------|----------|----------|----------|----------------|\nAll files          |       75 |       50 |       76 |     77.5 |                |\n-------------------|----------|----------|----------|----------|----------------|\n\nIstanbul coverage reports generated\nCleaning up...\nShutting down testrpc-sc (pid 83549)\nDone.\n```\n\n## 🎯 TNS Deploy\n\n### TNS Contracts\n\nTNS Contract | Network    | Contract Address                           | Transaction Hash\n-------------|------------|--------------------------------------------|-----------------------------------------------\nRegistry     | Testnet    | 0xdf9e5ce912412ab6af0dd46acff0ffc112bbe36e | [0x971c1ae1ccc10bf97bdebf24deb455362d847011d3cccb6fd517dd0e974ec490](https://scan.testnet.tomochain.com/txs/0x971c1ae1ccc10bf97bdebf24deb455362d847011d3cccb6fd517dd0e974ec490)\nRegistrar    | Testnet    | 0xb4cc8deec867c8352ec8f86afc945590629ae260 | [0xdf41eb54713ba8c931ef9c64a677b55759ee874606f3bb51e9b0f52434e68014](https://scan.testnet.tomochain.com/txs/0xdf41eb54713ba8c931ef9c64a677b55759ee874606f3bb51e9b0f52434e68014)\nResolver     | Testnet    | 0x89e77b691c8e3718b808015dbca094d35d7c37cc | [0xd66e858bbde4f95e30886c1d4d9dbaa76ea14d85628db4dcb50d087a8a86de22](https://scan.testnet.tomochain.com/txs/0xd66e858bbde4f95e30886c1d4d9dbaa76ea14d85628db4dcb50d087a8a86de22)\n\n### Claim TOMO from faucet\n\nLink: https://faucet.testnet.tomochain.com/\n\n![Faucet](./assets/tomo-faucet.png)\n \n## Smart contract Deploy\n\n### Source code compiler tool\n- [Remix](http://remix.ethereum.org/)\n\n### Publish and verify by Tomoscan\n\n#### Step 1. Send transaction through myetherwallet\nPaste the bytecode from Remix of the smart contract\n![MyEtherWallet](./assets/myetherwallet.png)\n\n#### Step 2. Check the transaction hash of smart contract\n![Step2](./assets/tomoscan-deploy.png)\n\n#### Step 3. Verify the smart contract\n![Step3](./assets/tomoscan-verify.png)\n\n#### Step 4. View the verified smart contract\nTNS Registry \n![Registry](./assets/tomoscan-verified-registry.png)\nTNS Registrar\n![Regsitrar](./assets/tomoscan-verified-registrar.png)\nTNS Resolver\n![Resolver](./assets/tomoscan-verified-resolver.png)\n\n## 🗃 Changelog\nSee [CHANGELOG.md](./CHANGELOG.md).\n\n## 📣 Contributing\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for how to help out.\n\n## 🗒 Licence\nSee [LICENSE](./LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fportalnetwork%2Ftns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fportalnetwork%2Ftns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fportalnetwork%2Ftns/lists"}