Decentralized Name Service (DeNS) implementation for Free TON by SuperArmor.
Unlike web domains this implementation of Free TON domains has the following structure:
- Example Free TON domain
org/freeton/nameis the analog of
namerepresent segments or levels of the domain.
- Segments can be up to
31letters long, can include lowercase letters, numbers and
-. Segment separator is
- Every Free TON domain can have from
4segments. Our implementation provides flat structure (any domain address can be resolved offline without needing any information from its parent) with hierarchical parenting for all domains.
Top-level domains (domains with 1 segment) don't have a parent, their registration/claiming is unconditional and instant.
2+ level domains care only about their closest parent and its registration type (for 2-segment domain it is a top-level domain, for 3-segment domain it is a 2-segment domain, etc.).
After a successfull registration domain ownership is not limited by time, but there is one condition: every 90 days owner needs to
prolongate() his domain, showing that domain is actively used and the owner still needs it.
Prolongation function becomes active 10 days prior to domain expiration.
When the owner doesn't need the domain anymore, he can:
- Wait for the domain to expire (after 90 days);
changeOwner()to transfer ownership manually;
Expired domain can be claimed by anyone, but every claim requires parent domain registration requirements to be met.
Deployment and Registration/Claiming
Contract deployment is equal to domain registration. Automatic claim is performed on deployment for top-level domains only, because they don't have a parent domain to meet its registration requirements.
When a 2+ level domain is deployed,
claimExpired() should be explicitly called to claim the domain.
When a 2+ level domain is deployed, and deployment is done via internal message with value,
claimExpired() is called automatically.
claimExpired() potential owner needs to check parent domain registration requirements -
getWhois()->registrationType and successfully fulfill them:
FFA: Free For All; any domain will be registered right away;
MONEY: In order to complete registration, an amount of TONs equal to parent's
getWhois()->registrationTypeneed to be attached as value to
claimExpired()message (don't forget to add extra TONs to pay all the fees);
OWNER: In order to complete registration, owner of the domain needs to be equal to the owner of the parent domain;
DENY: All registration requests will be denied right away;
Please use DeBot: 0:e49d816061c8d83f3f31d44a6bfa938855ad8848a5ab9b7206d2d9808636dac0 for domain deployment and management.
WARNING: when you deploy DnsRecord contract using DeBot, consider including 3 times more value to the message (e.g. 1.5 TON), because:
- The checks, that claimExpired() does are almost the same checks that constructor does (it already doubles the value);
- Minimum balance that DnsRecord contract maintains is the equivalent of 500k gas (or 0.5 TON at the moment), this amount will be reserved from the message value;
Again, when claiming already deployed DnsRecord, 0.5 TON will be more than enough.