1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

auto-dns & manual-dns smartcontracts updated to actual DNS standard version by starlightduck

This commit is contained in:
tolya-yanot 2022-09-30 12:14:14 +03:00
parent 1ded7af335
commit 313d37e134
4 changed files with 61 additions and 26 deletions

View file

@ -42,7 +42,7 @@ variable Actions
{ @end? abort"subdomain name expected" @next dup $len 127 > abort"subdomain name too long"
} : parse-domain
{ @end? abort"category number expected" @next (number) 1 <> abort"category must be integer"
dup 16 fits not abort"category does not fit into 16 bit integer"
dup 256 fits not abort"category does not fit into 256 bit integer"
dup 0= abort"category must be non-zero"
} : parse-cat-num
{ @end? abort"`cat` expected" @next "cat" $= not abort"`cat` expected" parse-cat-num
@ -107,11 +107,11 @@ file-base +"-dns" +contractid +".addr" load-address
{ dup first
dup `add eq? {
drop 4 untuple <b swap value, b> -rot
<b 11 6 u, swap 16 i, swap subdomain,
<b 11 6 u, swap 256 u, swap subdomain,
swap dict, nip } {
dup `delete eq? {
drop untriple rot drop
<b 12 6 u, swap 16 i, swap subdomain, } {
<b 12 6 u, swap 256 u, swap subdomain, } {
dup `drop eq? {
drop second <b 22 6 u, swap subdomain, } {
dup `upgrade eq? {