Coder Social home page Coder Social logo

ton-dens's Introduction

TON Decentralized Name Service (DeNS)

Key Features

  • True TIP-2, infinity amount of subdomains and levels
  • Add new top level domains(root domains) with SMV interface
  • Buy domains at Auction
  • Instant buy Domain Name for short period with fixed price
  • Reselling subdomains of your domain
  • Gas managing, no need to replenish certificates
  • Build and tests with Github Actions(broken with last update(0.38), will be fixed)

Domain and subdomain registration options

Each Name certificate has own type of registration child domains. Registration type and other parameters can be changed by an owner of certificate.

Child certificates can be issued no longer than the expiration period of the parent certificate.

enum RegistrationTypes { OwnerOnly, Auction, Instant }
function setRegistrationType(RegistrationTypes newRegistrationType) external;

Auction

One Auction contract will be deployed one per domain for a buy. All bids are made blindly by sending hash of (bid + salt). Then, during the confirmation phase, participant need to send the entire bet and salt.

The highest bid wins, but participant need to pay for the domain according to the size of the second bid.

Anyone can create Auction for child domain by sending specific request to NIC if domain available or expiration < 28 Days.

function registerNameByAuction(string domainName, uint8 durationInYears, uint256 bidHash) external;
function setAuctionDeposit(uint32 auctionDeposit) external;

To prevent bet spam, it is possible to set the size of the blind bet.

Instant Buy

Option to buy domain right now for short period of time avoiding the auction. Max duration and price installed by owner.

function registerInstantName(string domainName, uint32 durationInSec) external;
function setInstantBuyPrice(uint128 instantBuyPrice) external;
function setInstantBuyMaxSecDuration(uint32 instantBuyMaxSecDuration) external;

Create by Owner

New certificates can be issued by an owner.

function registerNameByOwner(string domainName, uint32 expiresAt) external;

Build and run

Requirements:

  • ton-solidity 0.37.0
  • tvm-linker
  • nodejs

Setup environment

Copy .env.dist to .env and change variables up to you

  • SOLC_BIN - path to solc binary file
  • TVM_LINKER_BIN - path to tvm-linker binary file
  • STDLIB_PATH - path to stdlib_sol.tvm lib
  • NETWORK - DApp server address or Node SE

Install node js dependencies

npm install

For view all make instructions

make help

Compile, deploy and test all contracts

make build
make deploy
make tests

System diagram

Diagram.png

Example of "get Whois info" with debot

DeBotExample.jpg

ton-dens's People

Contributors

abionics avatar pavelkhachatrian avatar

Watchers

 avatar

ton-dens's Issues

Create Actions for github

  • Run local tests
  • Run on-chain test (local node)
  • Build using specific version of sol2tvm compiler
  • Deploy package with compiled contracts to github repo

Write documentation

  • Step-by-step instructions for building and deploying by hand
  • System workflow
  • Interfaces description
  • ...
  • Composite structure diagram
  • Sequence diagram
  • Deployment diagram

Create local tests

Create scripts(may be python) for running only specific contract methods and check for results

TestSuite4 - python framework for testing SMC

Test Cases:

  • will be added in future

Create on-chain tests

Create js scripts using SDK for running different cases and contracts usages right in blockchain(devnet, local node)

Test Cases:

  • will be added in future

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.