TON contracts for Agorata
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

845 lines
35 KiB

"Asm.fif" include
// automatically generated from `contracts/nft-collection.fc` incl:`contracts/imports/dns-utils.fc` incl:`contracts/imports/stdlib.fc` incl:`contracts/imports/op-codes.fc` incl:`contracts/imports/params.fc`
PROGRAM{
DECLPROC zero_address
DECLPROC get_top_domain_bits
DECLPROC read_comment
DECLPROC read_domain_from_comment
DECLPROC check_domain_string
DECLPROC split_by_semicolon
DECLPROC decode_asciicode
DECLPROC get_min_price_config
DECLPROC price_function
DECLPROC get_min_price
DECLPROC force_chain
DECLPROC load_data
DECLPROC save_data
DECLPROC calcprice
DECLPROC calculate_nft_item_state_init
DECLPROC get_attachment
DECLPROC calculate_nft_item_address
DECLPROC send_msg
DECLPROC deploy_nft_item
DECLPROC verify_signature
DECLPROC recv_internal
102491 DECLMETHOD get_collection_data
92067 DECLMETHOD get_nft_address_by_index
68445 DECLMETHOD get_nft_content
108963 DECLMETHOD get_price
75325 DECLMETHOD signature_data
123660 DECLMETHOD dnsresolve
zero_address PROC:<{
//
0 PUSHINT // _0=0
NEWC // _0=0 _1
2 STU // _3
ENDC // _4
CTOS // _5
}>
get_top_domain_bits PROC:<{
// domain
0 PUSHINT // domain i=0
UNTIL:<{
SWAP // i domain
8 LDU // i char domain
SWAP // i domain char
0 EQINT // i domain need_break
DUP // i domain need_break need_break
NOT // i domain need_break _11
IF:<{ // i domain need_break
s0 s2 XCHG // need_break domain i
8 ADDCONST // need_break domain i
s0 s2 XCHG // i domain need_break
}> // i domain need_break
s1 s2 XCHG // domain i need_break
}> // domain i
NIP // i
DUP // i i
0 EQINT // i _16
201 THROWIF
}>
read_comment PROC:<{
// in_msg_body
NEWC // in_msg_body result
UNTIL:<{
OVER // in_msg_body result in_msg_body
SBITS // in_msg_body result _6
s1 s2 XCHG // result in_msg_body _6
LDSLICEX // result _5 in_msg_body
-ROT // in_msg_body result _5
STSLICER // in_msg_body result
OVER // in_msg_body result in_msg_body
SREFS // in_msg_body result refs_len
DUP // in_msg_body result refs_len refs_len
0 EQINT // in_msg_body result refs_len need_break
DUP // in_msg_body result refs_len need_break need_break
NOT // in_msg_body result refs_len need_break _13
IF:<{ // in_msg_body result refs_len need_break
SWAP // in_msg_body result need_break refs_len
1 EQINT // in_msg_body result need_break _16
202 THROWIFNOT
s0 s2 XCHG // need_break result in_msg_body
LDREF // need_break result _26 _25
DROP // need_break result _18
CTOS // need_break result in_msg_body
s0 s2 XCHG // in_msg_body result need_break
}>ELSE<{
NIP // in_msg_body result need_break
}>
}> // in_msg_body result
NIP // result
ENDC // _21
CTOS // _22
}>
read_domain_from_comment PROC:<{
// in_msg_body
read_comment CALLDICT // _1
}>
check_domain_string PROC:<{
// domain
0 PUSHINT // domain i=0
OVER // domain i=0 domain
SBITS // domain i=0 len
UNTIL:<{
2DUP // domain i len i len
EQUAL // domain i len need_break
DUP // domain i len need_break need_break
NOT // domain i len need_break _8
IF:<{ // domain i len need_break
DROP // domain i len
s0 s2 XCHG // len i domain
8 LDU // len i char domain
OVER // len i char domain char
45 EQINT // len i char domain is_hyphen
s3 PUSH // len i char domain is_hyphen i
0 GTINT // len i char domain is_hyphen _18
AND // len i char domain _19
s4 PUSH // len i char domain _19 len
-8 ADDCONST // len i char domain _19 _21
s4 s(-1) PUXC // len i char domain _19 i _21
LESS // len i char domain _19 _22
AND // len i char domain _23
s2 PUSH // len i char domain _23 char
47 GTINT // len i char domain _23 _25
s3 PUSH // len i char domain _23 _25 char
58 LESSINT // len i char domain _23 _25 _27
AND // len i char domain _23 _28
OR // len i char domain _29
s2 PUSH // len i char domain _29 char
96 GTINT // len i char domain _29 _31
s0 s3 XCHG // len i _31 domain _29 char
123 LESSINT // len i _31 domain _29 _33
s1 s3 XCHG // len i _29 domain _31 _33
AND // len i _29 domain _34
s1 s2 XCHG // len i domain _29 _34
OR // len i domain valid_char
NOT // len i domain need_break
DUP // len i domain need_break need_break
NOT // len i domain need_break _37
IF:<{ // len i domain need_break
s0 s2 XCHG // len need_break domain i
8 ADDCONST // len need_break domain i
s0 s2 XCHG // len i domain need_break
}> // len i domain need_break
s1 s3 XCHG // domain i len need_break
}> // domain i len need_break
}> // domain i len
1 2 BLKDROP2 // i len
EQUAL // _40
}>
split_by_semicolon PROC:<{
// str
0 PUSHINT // str i=0
OVER // str i=0 str
SBITS // str i=0 len
NEWC // str i=0 len result1
UNTIL:<{
s2 s1 PUSH2 // str i len result1 i len
EQUAL // str i len result1 need_break
DUP // str i len result1 need_break need_break
NOT // str i len result1 need_break _10
IF:<{ // str i len result1 need_break
DROP // str i len result1
s0 s3 XCHG // result1 i len str
8 LDU // result1 i len char str
OVER // result1 i len char str char
59 EQINT // result1 i len char str need_break
s0 s4 XCHG // result1 need_break len char str i
8 ADDCONST // result1 need_break len char str i
s4 PUSH // result1 need_break len char str i need_break
NOT // result1 need_break len char str i _19
IF:<{ // result1 need_break len char str i
s2 s5 XCHG2 // i need_break len str char result1
8 STU // i need_break len str result1
s4 s4 XCHG2 // result1 need_break len i str
}>ELSE<{
s2 POP // result1 need_break len i str
}>
s3 PUSH // result1 need_break len i str need_break
NOT // result1 need_break len i str _23
s2 s3 PUSH2 // result1 need_break len i str _23 i len
GEQ // result1 need_break len i str _23 _24
AND // result1 need_break len i str _25
IF:<{ // result1 need_break len i str
259 THROW
}> // result1 need_break len i str
s4 s4 XCHG2
s0 s3 XCHG // str i len result1 need_break
}> // str i len result1 need_break
}> // str i len result1
ENDC // str i len _28
CTOS // str i len _29
s0 s2 XCHG // str _29 len i
SUB // str _29 _31
s1 s2 XCHG // _29 str _31
LDSLICEX // _29 _36 _35
DROP // _29 _30
}>
decode_asciicode PROC:<{
// str
DUP // str str
SBITS // str len
0 PUSHINT // str len need_break=0
NEWC // str len need_break=0 result
OVER // str len need_break=0 result res_len=0
WHILE:<{
s0 s2 XCHG // str len res_len result need_break
NOT // str len res_len result _9
}>DO<{ // str len res_len result
s2 PUSH // str len res_len result len
0 EQINT // str len res_len result need_break
DUP // str len res_len result need_break need_break
NOT // str len res_len result need_break _12
IF:<{ // str len res_len result need_break
s0 s4 XCHG // need_break len res_len result str
8 LDU // need_break len res_len result char str
0 PUSHINT // need_break len res_len result char str byte=0
s2 PUSH // need_break len res_len result char str byte=0 char
64 GTINT // need_break len res_len result char str byte=0 _20
s3 PUSH // need_break len res_len result char str byte=0 _20 char
91 LESSINT // need_break len res_len result char str byte=0 _20 _22
AND // need_break len res_len result char str byte=0 _23
IF:<{ // need_break len res_len result char str byte=0
DROP // need_break len res_len result char str
SWAP // need_break len res_len result str char
-65 ADDCONST // need_break len res_len result str byte
}>ELSE<{ // need_break len res_len result char str byte=0
s2 PUSH // need_break len res_len result char str byte=0 char
96 GTINT // need_break len res_len result char str byte=0 _27
s3 PUSH // need_break len res_len result char str byte=0 _27 char
123 LESSINT // need_break len res_len result char str byte=0 _27 _29
AND // need_break len res_len result char str byte=0 _30
IF:<{ // need_break len res_len result char str byte=0
DROP // need_break len res_len result char str
SWAP // need_break len res_len result str char
-71 ADDCONST // need_break len res_len result str byte
}>ELSE<{ // need_break len res_len result char str byte=0
s2 PUSH // need_break len res_len result char str byte=0 char
47 GTINT // need_break len res_len result char str byte=0 _34
s3 PUSH // need_break len res_len result char str byte=0 _34 char
58 LESSINT // need_break len res_len result char str byte=0 _34 _36
AND // need_break len res_len result char str byte=0 _37
IF:<{ // need_break len res_len result char str byte=0
DROP // need_break len res_len result char str
SWAP // need_break len res_len result str char
4 ADDCONST // need_break len res_len result str byte
}>ELSE<{ // need_break len res_len result char str byte=0
s2 PUSH // need_break len res_len result char str byte=0 char
45 EQINT // need_break len res_len result char str byte=0 _41
IF:<{ // need_break len res_len result char str byte=0
DROP
NIP // need_break len res_len result str
62 PUSHINT // need_break len res_len result str byte=62
}>ELSE<{ // need_break len res_len result char str byte=0
s0 s2 XCHG // need_break len res_len result byte=0 str char
95 EQINT // need_break len res_len result byte=0 str _44
IF:<{ // need_break len res_len result byte=0 str
NIP // need_break len res_len result str
63 PUSHINT // need_break len res_len result str byte=63
}>ELSE<{ // need_break len res_len result byte=0 str
260 THROW
SWAP // need_break len res_len result str byte
}>
}>
}>
}>
}>
s0 s4 XCHG // need_break byte res_len result str len
-8 ADDCONST // need_break byte res_len result str len
DUP // need_break byte res_len result str len len
0 GTINT // need_break byte res_len result str len _51
IF:<{ // need_break byte res_len result str len
s4 s2 XCHG2 // need_break str res_len len byte result
6 STU // need_break str res_len len result
}>ELSE<{ // need_break byte res_len result str len
8 PUSHINT // need_break byte res_len result str len _56=8
s4 s0 PUSH2 // need_break byte res_len result str len _56=8 res_len _57=8
MOD // need_break byte res_len result str len _56=8 _58
SUB // need_break byte res_len result str len _59
s5 s3 s0 XCHG3 // need_break str res_len len byte result _59
STUX // need_break str res_len len result
}>
s0 s2 XCHG // need_break str result len res_len
6 ADDCONST // need_break str result len res_len
s0 s0 s3 XCHG3
s0 s4 XCHG // str len res_len result need_break
}> // str len res_len result need_break
s0 s2 XCHG // str len need_break result res_len
}> // str len res_len result
3 1 BLKDROP2 // result
ENDC // _63
CTOS // _64
}>
get_min_price_config PROC:<{
// domain_char_count
DUP // domain_char_count domain_char_count
4 EQINT // domain_char_count _2
IFJMP:<{ // domain_char_count
DROP //
1000 PUSHINT // _3=1000
100 PUSHINT // _3=1000 _4=100
}> // domain_char_count
DUP // domain_char_count domain_char_count
5 EQINT // domain_char_count _6
IFJMP:<{ // domain_char_count
DROP //
500 PUSHINT // _7=500
50 PUSHINT // _7=500 _8=50
}> // domain_char_count
DUP // domain_char_count domain_char_count
6 EQINT // domain_char_count _10
IFJMP:<{ // domain_char_count
DROP //
400 PUSHINT // _11=400
40 PUSHINT // _11=400 _12=40
}> // domain_char_count
DUP // domain_char_count domain_char_count
7 EQINT // domain_char_count _14
IFJMP:<{ // domain_char_count
DROP //
300 PUSHINT // _15=300
30 PUSHINT // _15=300 _16=30
}> // domain_char_count
DUP // domain_char_count domain_char_count
8 EQINT // domain_char_count _18
IFJMP:<{ // domain_char_count
DROP //
200 PUSHINT // _19=200
20 PUSHINT // _19=200 _20=20
}> // domain_char_count
DUP // domain_char_count domain_char_count
9 EQINT // domain_char_count _22
IFJMP:<{ // domain_char_count
DROP //
100 PUSHINT // _23=100
10 PUSHINT // _23=100 _24=10
}> // domain_char_count
10 EQINT // _26
IFJMP:<{ //
50 PUSHINT // _27=50
5 PUSHINT // _27=50 _28=5
}> //
10 PUSHINT // _29=10
1 PUSHINT // _29=10 _30=1
}>
price_function PROC:<{
// length multiplierx50 steepness
25 PUSHINT // length multiplierx50 steepness price=25
s3 PUSH // length multiplierx50 steepness price=25 length
3 EQINT // length multiplierx50 steepness price=25 _6
IF:<{ // length multiplierx50 steepness price=25
DROP // length multiplierx50 steepness
100 PUSHINT // length multiplierx50 steepness price=100
}> // length multiplierx50 steepness price
s3 PUSH // length multiplierx50 steepness price length
4 EQINT // length multiplierx50 steepness price _9
IF:<{ // length multiplierx50 steepness price
DROP // length multiplierx50 steepness
50 PUSHINT // length multiplierx50 steepness price=50
}> // length multiplierx50 steepness price
s3 PUSH // length multiplierx50 steepness price length
5 EQINT // length multiplierx50 steepness price _12
IF:<{ // length multiplierx50 steepness price
DROP // length multiplierx50 steepness
25 PUSHINT // length multiplierx50 steepness price=25
}> // length multiplierx50 steepness price
s3 PUSH // length multiplierx50 steepness price length
6 EQINT // length multiplierx50 steepness price _15
IF:<{ // length multiplierx50 steepness price
DROP // length multiplierx50 steepness
20 PUSHINT // length multiplierx50 steepness price=20
}> // length multiplierx50 steepness price
s3 PUSH // length multiplierx50 steepness price length
7 EQINT // length multiplierx50 steepness price _18
IF:<{ // length multiplierx50 steepness price
DROP // length multiplierx50 steepness
15 PUSHINT // length multiplierx50 steepness price=15
}> // length multiplierx50 steepness price
s3 PUSH // length multiplierx50 steepness price length
8 EQINT // length multiplierx50 steepness price _21
IF:<{ // length multiplierx50 steepness price
DROP // length multiplierx50 steepness
10 PUSHINT // length multiplierx50 steepness price=10
}> // length multiplierx50 steepness price
s0 s3 XCHG // price multiplierx50 steepness length
8 GTINT // price multiplierx50 steepness _24
IF:<{ // price multiplierx50 steepness
5 PUSHINT
s3 POP // price=5 multiplierx50 steepness
}> // price multiplierx50 steepness
s0 s2 PUXC // steepness multiplierx50 steepness price
MUL // steepness multiplierx50 _26
10 PUSHINT // steepness multiplierx50 _26 _27=10
s0 s3 XCHG2 // _26 multiplierx50 _27=10 steepness
SUB // _26 multiplierx50 _28
25 MULCONST // _26 multiplierx50 _30
s1 s2 XCHG // multiplierx50 _26 _30
ADD // multiplierx50 _31
10 PUSHINT // multiplierx50 _31 _32=10
DIV // multiplierx50 price
1000000000 PUSHINT // multiplierx50 price _34=1000000000
MUL // multiplierx50 _35
SWAP // _35 multiplierx50
MUL // _36
50 PUSHINT // _36 _37=50
DIV // _38
}>
get_min_price PROC:<{
// domain_bits_length now_time
SWAP // now_time domain_bits_length
3 RSHIFT# // now_time _5
get_min_price_config CALLDICT // now_time start_min_price end_min_price
SWAP
1000000000 PUSHINT // now_time end_min_price start_min_price _7=1000000000
MUL // now_time end_min_price start_min_price
SWAP
1000000000 PUSHINT // now_time start_min_price end_min_price _9=1000000000
MUL // now_time start_min_price end_min_price
s0 s2 XCHG
1659171600 PUSHINT // end_min_price start_min_price now_time _12=1659171600
SUB // end_min_price start_min_price seconds
2592000 PUSHINT // end_min_price start_min_price seconds _15=2592000
DIV // end_min_price start_min_price months
DUP // end_min_price start_min_price months months
21 GTINT // end_min_price start_min_price months _18
IFJMP:<{ // end_min_price start_min_price months
2DROP // end_min_price
}> // end_min_price start_min_price months
1 2 BLKDROP2 // start_min_price months
REPEAT:<{ // start_min_price
90 MULCONST // _20
100 PUSHINT // _20 _21=100
DIV // start_min_price
}>
}>
force_chain PROC:<{
// addr
REWRITESTDADDR // _8 _9
DROP // wc
0 PUSHINT // wc _5
EQUAL // _6
333 THROWIFNOT
}>
load_data PROCINLINE:<{
//
c4 PUSH // _1
CTOS // ds
LDREF // _3 ds
LDREF // _3 _5 ds
LDREF // _3 _5 _7 ds
256 LDU // _3 _5 _7 _9 ds
LDMSGADDR // _3 _5 _7 _9 _12 ds
LDREF // _3 _5 _7 _9 _12 _27 _26
DROP // _3 _5 _7 _9 _12 _14
}>
save_data PROCINLINE:<{
// content nft_item_code pricing owner_key owner_addr data_scheme
s0 s5 XCHG
NEWC // data_scheme nft_item_code pricing owner_key owner_addr content _6
STREF // data_scheme nft_item_code pricing owner_key owner_addr _7
s1 s4 XCHG // data_scheme owner_addr pricing owner_key nft_item_code _7
STREF // data_scheme owner_addr pricing owner_key _8
s1 s2 XCHG // data_scheme owner_addr owner_key pricing _8
STREF // data_scheme owner_addr owner_key _9
256 STU // data_scheme owner_addr _11
SWAP // data_scheme _11 owner_addr
STSLICER // data_scheme _12
STREF // _13
ENDC // _14
c4 POP
}>
calcprice PROCREF:<{
// domain pricing
OVER // domain pricing domain
SBITS // domain pricing len
DUP // domain pricing len len
24 GTINT // domain pricing len _8
200 THROWIFNOT
DUP
1008 PUSHINT // domain pricing len len _13
LEQ // domain pricing len _14
201 THROWIFNOT
DUP
8 PUSHINT // domain pricing len len _17=8
MOD // domain pricing len _18
0 EQINT // domain pricing len _20
202 THROWIFNOT
s0 s2 XCHG // len pricing domain
check_domain_string CALLDICT // len pricing _23
203 THROWIFNOT
CTOS // len pr
8 LDU // len multiplier pr
4 LDU // len multiplier _41 _40
DROP // len multiplier steepness
s0 s2 XCHG // steepness multiplier len
3 RSHIFT# // steepness multiplier _36
s0 s2 XCHG // _36 multiplier steepness
price_function CALLDICT // _37
}>
calculate_nft_item_state_init PROC:<{
// item_index nft_item_code
SWAP
NEWC // nft_item_code item_index _3
256 STU // nft_item_code _5
MYADDR // nft_item_code _5 _6
STSLICER // nft_item_code _7
ENDC // nft_item_code data
0 PUSHINT // nft_item_code data _9=0
DUP // nft_item_code data _9=0 _10=0
NEWC // nft_item_code data _9=0 _10=0 _11
2 STU // nft_item_code data _9=0 _13
s1 s3 XCHG // _9=0 data nft_item_code _13
STDICT // _9=0 data _14
STDICT // _9=0 _15
1 STU // _17
ENDC // _18
}>
get_attachment PROC:<{
// domain data_scheme
CTOS // domain cs
LDREF // domain _5 cs
SWAP // domain cs _5
CTOS // domain cs prefix
SWAP // domain prefix cs
LDREF // domain prefix _9 cs
SWAP // domain prefix cs _9
CTOS // domain prefix cs postfixes
LDREF // domain prefix cs _13 postfixes
SWAP // domain prefix cs postfixes _13
CTOS // domain prefix cs postfixes postfix
SWAP // domain prefix cs postfix postfixes
LDREF // domain prefix cs postfix _61 _60
DROP // domain prefix cs postfix _17
CTOS // domain prefix cs postfix image_postfix
1 PUSHINT // domain prefix cs postfix image_postfix _21=1
NEWC // domain prefix cs postfix image_postfix _21=1 _22
8 STU // domain prefix cs postfix image_postfix _24
s4 PUSH // domain prefix cs postfix image_postfix _24 prefix
STSLICER // domain prefix cs postfix image_postfix _25
s5 PUSH // domain prefix cs postfix image_postfix _25 domain
STSLICER // domain prefix cs postfix image_postfix _26
ROT // domain prefix cs image_postfix _26 postfix
STSLICER // domain prefix cs image_postfix _27
ENDC // domain prefix cs image_postfix uri_cell
NEWC // domain prefix cs image_postfix uri_cell _30
s0 s4 XCHG2 // domain uri_cell cs image_postfix _30 prefix
STSLICER // domain uri_cell cs image_postfix _31
s4 PUSH // domain uri_cell cs image_postfix _31 domain
STSLICER // domain uri_cell cs image_postfix _32
SWAP // domain uri_cell cs _32 image_postfix
STSLICER // domain uri_cell cs _33
ENDC // domain uri_cell cs image_uri_cell
SWAP // domain uri_cell image_uri_cell cs
LDREF // domain uri_cell image_uri_cell _36 cs
SWAP // domain uri_cell image_uri_cell cs _36
CTOS // domain uri_cell image_uri_cell cs zone
NEWC // domain uri_cell image_uri_cell cs zone _40
s0 s5 XCHG2 // zone uri_cell image_uri_cell cs _40 domain
STSLICER // zone uri_cell image_uri_cell cs _41
s0 s4 XCHG2 // cs uri_cell image_uri_cell _41 zone
STSLICER // cs uri_cell image_uri_cell _42
ENDC // cs uri_cell image_uri_cell name_cell
s0 s3 XCHG // name_cell uri_cell image_uri_cell cs
LDREF // name_cell uri_cell image_uri_cell _65 _64
DROP // name_cell uri_cell image_uri_cell desc_cell
s0 s2 XCHG
NEWC // name_cell desc_cell image_uri_cell uri_cell _48
STREF // name_cell desc_cell image_uri_cell _49
STREF // name_cell desc_cell _50
s1 s2 XCHG // desc_cell name_cell _50
STREF // desc_cell _51
STREF // _52
ENDC // full_cell
}>
calculate_nft_item_address PROC:<{
// wc state_init
HASHCU // wc _2
4 PUSHINT // wc _2 _3=4
NEWC // wc _2 _3=4 _4
3 STU // wc _2 _6
s1 s2 XCHG // _2 wc _6
8 STI // _2 _8
256 STU // _10
ENDC // _11
CTOS // _12
}>
send_msg PROCINLINE:<{
// to_address amount op query_id payload send_mode
0 PUSHINT // to_address amount op query_id payload send_mode _7=0
16 PUSHINT // to_address amount op query_id payload send_mode _7=0 _8=16
NEWC // to_address amount op query_id payload send_mode _7=0 _8=16 _9
6 STU // to_address amount op query_id payload send_mode _7=0 _11
s0 s7 XCHG2 // _7=0 amount op query_id payload send_mode _11 to_address
STSLICER // _7=0 amount op query_id payload send_mode _12
s0 s5 XCHG2 // _7=0 send_mode op query_id payload _12 amount
STVARUINT16 // _7=0 send_mode op query_id payload _13
s1 s5 XCHG // payload send_mode op query_id _7=0 _13
107 STU // payload send_mode op query_id _27
s1 s2 XCHG // payload send_mode query_id op _27
32 STU // payload send_mode query_id _29
64 STU // payload send_mode msg
s2 PUSH // payload send_mode msg payload
ISNULL // payload send_mode msg _32
NOT // payload send_mode msg _33
IF:<{ // payload send_mode msg
ROT // send_mode msg payload
STBR // send_mode msg
SWAP // msg send_mode
}>ELSE<{
s2 POP // msg send_mode
}>
SWAP // send_mode msg
ENDC // send_mode _35
SWAP // _35 send_mode
SENDRAWMSG
}>
deploy_nft_item PROC:<{
// item_index nft_item_code nft_payload
-ROT // nft_payload item_index nft_item_code
calculate_nft_item_state_init CALLDICT // nft_payload state_init
0 PUSHINT // nft_payload state_init _6
OVER // nft_payload state_init _6 state_init
calculate_nft_item_address CALLDICT // nft_payload state_init nft_address
7 PUSHINT // nft_payload state_init nft_address _13
24 PUSHINT // nft_payload state_init nft_address _13 _14=24
NEWC // nft_payload state_init nft_address _13 _14=24 _15
6 STU // nft_payload state_init nft_address _13 _17
ROT // nft_payload state_init _13 _17 nft_address
STSLICER // nft_payload state_init _13 _18
0 PUSHINT // nft_payload state_init _13 _18 _19=0
STVARUINT16 // nft_payload state_init _13 _20
108 STU // nft_payload state_init _36
STREF // nft_payload _37
STREF // msg
ENDC // _39
64 PUSHINT // _39 _40=64
SENDRAWMSG
}>
verify_signature PROC:<{
// signature sender_address domain owner_key
0 PUSHINT // signature sender_address domain owner_key _5=0
NEWC // signature sender_address domain owner_key _5=0 _6
MYADDR // signature sender_address domain owner_key _5=0 _6 _7
STSLICER // signature sender_address domain owner_key _5=0 _8
s0 s3 XCHG2 // signature sender_address _5=0 owner_key _8 domain
STSLICER // signature sender_address _5=0 owner_key _9
s0 s3 XCHG2 // signature owner_key _5=0 _9 sender_address
STSLICER // signature owner_key _5=0 _10
2 STU // signature owner_key _12
ENDC // signature owner_key option_data
CTOS // signature owner_key _14
HASHSU // signature owner_key _15
-ROT // _15 signature owner_key
CHKSIGNU // _16
}>
recv_internal PROC:<{
// msg_value in_msg_full in_msg_body
DUP // msg_value in_msg_full in_msg_body in_msg_body
SEMPTY // msg_value in_msg_full in_msg_body _3
IF:<{ // msg_value in_msg_full in_msg_body
16 PUSHPOW2DEC // msg_value in_msg_full in_msg_body _4=65535
THROWANY
}> // msg_value in_msg_full in_msg_body
SWAP // msg_value in_msg_body in_msg_full
CTOS // msg_value in_msg_body cs
4 LDU // msg_value in_msg_body flags cs
SWAP
1 PUSHINT // msg_value in_msg_body cs flags _12=1
AND // msg_value in_msg_body cs _13
IFJMP:<{ // msg_value in_msg_body cs
3 BLKDROP //
}> // msg_value in_msg_body cs
SWAP // msg_value cs in_msg_body
32 LDU // msg_value cs op in_msg_body
load_data INLINECALLDICT // msg_value cs op in_msg_body _85 _86 _87 _88 _89 _90
s5 POP // msg_value cs op in_msg_body data_scheme nft_item_code pricing key addr
s6 PUSH // msg_value cs op in_msg_body data_scheme nft_item_code pricing key addr op
0 EQINT // msg_value cs op in_msg_body data_scheme nft_item_code pricing key addr _26
IFJMP:<{ // msg_value cs op in_msg_body data_scheme nft_item_code pricing key addr
DROP
s5 POP // msg_value cs key in_msg_body data_scheme nft_item_code pricing
s0 s3 XCHG // msg_value cs key pricing data_scheme nft_item_code in_msg_body
read_comment CALLDICT // msg_value cs key pricing data_scheme nft_item_code body
split_by_semicolon CALLDICT // msg_value cs key pricing data_scheme nft_item_code domain signature_encoded
s1 s4 PUXC // msg_value cs key signature_encoded data_scheme nft_item_code domain domain pricing
calcprice INLINECALLDICT // msg_value cs key signature_encoded data_scheme nft_item_code domain price
s1 s7 XCHG // domain cs key signature_encoded data_scheme nft_item_code msg_value price
GEQ // domain cs key signature_encoded data_scheme nft_item_code _39
204 THROWIFNOT
s5 PUSH // domain cs key signature_encoded data_scheme nft_item_code domain
HASHSU // domain cs key signature_encoded data_scheme nft_item_code item_index
s0 s5 XCHG // domain item_index key signature_encoded data_scheme nft_item_code cs
LDMSGADDR // domain item_index key signature_encoded data_scheme nft_item_code _94 _93
DROP // domain item_index key signature_encoded data_scheme nft_item_code sender_address
s4 PUSH // domain item_index key signature_encoded data_scheme nft_item_code sender_address key
0 NEQINT // domain item_index key signature_encoded data_scheme nft_item_code sender_address _47
IF:<{ // domain item_index key signature_encoded data_scheme nft_item_code sender_address
s0 s3 XCHG // domain item_index key sender_address data_scheme nft_item_code signature_encoded
decode_asciicode CALLDICT // domain item_index key sender_address data_scheme nft_item_code signature
s3 s6 s1 PU2XC
s0 s6 XCHG // domain item_index nft_item_code sender_address data_scheme signature sender_address domain key
verify_signature CALLDICT // domain item_index nft_item_code sender_address data_scheme _51
205 THROWIFNOT
}>ELSE<{
s3 POP
s3 POP // domain item_index nft_item_code sender_address data_scheme
}>
s4 s(-1) PUXC // domain item_index nft_item_code sender_address domain data_scheme
get_attachment CALLDICT // domain item_index nft_item_code sender_address _54
NEWC // domain item_index nft_item_code sender_address _54 _55
s0 s5 XCHG2 // _54 item_index nft_item_code sender_address _55 domain
STSLICER // _54 item_index nft_item_code sender_address _56
ENDC // _54 item_index nft_item_code sender_address _57
NEWC
ROT // _54 item_index nft_item_code _57 _58 sender_address
STSLICER // _54 item_index nft_item_code _57 _59
STREF // _54 item_index nft_item_code _60
s1 s3 XCHG // nft_item_code item_index _54 _60
STREF // nft_item_code item_index _61
ENDC // nft_item_code item_index nft_content
s1 s2 XCHG // item_index nft_item_code nft_content
deploy_nft_item CALLDICT
}> // msg_value cs op in_msg_body data_scheme nft_item_code pricing key addr
5 1 BLKDROP2 // msg_value cs op addr
OVER
923790417 PUSHINT // msg_value cs op addr op _64=923790417
EQUAL // msg_value cs op addr _65
IFJMP:<{ // msg_value cs op addr
4 BLKDROP //
}> // msg_value cs op addr
0x2a0c8a20 PUSHINT // msg_value cs op addr _66
s1 s2 XCHG // msg_value cs addr op _66
EQUAL // msg_value cs addr _67
IFJMP:<{ // msg_value cs addr
SWAP // msg_value addr cs
LDMSGADDR // msg_value addr _96 _95
DROP // msg_value addr sender_address
OVER // msg_value addr sender_address addr
SDEQ // msg_value addr _72
403 THROWIFNOT
0x2a0c8a20 PUSHINT // msg_value addr _74
s1 s2 XCHG
0 PUSHINT
PUSHNULL
1 PUSHINT // addr msg_value _74 _75=0 _76 _77=1
send_msg INLINECALLDICT
}> // msg_value cs addr
3 BLKDROP //
16 PUSHPOW2DEC // _79=65535
THROWANY
}>
get_collection_data PROC:<{
//
load_data INLINECALLDICT // _9 _10 _11 _12 _13 _14
5 BLKDROP // content
-1 PUSHINT // content _7=-1
zero_address CALLDICT // content _7=-1 _8
s1 s2 XCHG // _7=-1 content _8
}>
get_nft_address_by_index PROC:<{
// index
load_data INLINECALLDICT // index _12 _13 _14 _15 _16 _17
s4 s5 XCHG
5 BLKDROP // index nft_item_code
calculate_nft_item_state_init CALLDICT // state_init
0 PUSHINT // state_init _10
SWAP // _10 state_init
calculate_nft_item_address CALLDICT // _11
}>
get_nft_content PROC:<{
// index individual_nft_content
NIP // individual_nft_content
}>
get_price PROC:<{
// domain
load_data INLINECALLDICT // domain _9 _10 _11 _12 _13 _14
s3 s5 XCHG
5 BLKDROP // domain pricing
calcprice INLINECALLDICT // _8
}>
signature_data PROC:<{
// sender_address domain
NEWC // sender_address domain _3
MYADDR // sender_address domain _3 _4
STSLICER // sender_address domain _5
SWAP // sender_address _5 domain
STSLICER // sender_address _6
SWAP // _6 sender_address
STSLICER // _7
ENDC // option_data
CTOS // _9
HASHSU // _10
}>
dnsresolve PROC:<{
// subdomain category
DROP // subdomain
DUP // subdomain subdomain
SBITS // subdomain _3
8 PUSHINT // subdomain _3 _4=8
MOD // subdomain _5
0 EQINT // subdomain _7
70 THROWIFNOT
DUP // subdomain subdomain
8 PLDI // subdomain _11
0 EQINT // subdomain starts_with_zero_byte
OVER // subdomain starts_with_zero_byte subdomain
SBITS // subdomain starts_with_zero_byte _14
8 EQINT // subdomain starts_with_zero_byte _16
s1 s(-1) PUXC // subdomain starts_with_zero_byte starts_with_zero_byte _16
AND // subdomain starts_with_zero_byte _17
IFJMP:<{ // subdomain starts_with_zero_byte
2DROP //
8 PUSHINT // _18=8
PUSHNULL // _18=8 _19
}> // subdomain starts_with_zero_byte
DUP // subdomain starts_with_zero_byte starts_with_zero_byte
IF:<{ // subdomain starts_with_zero_byte
SWAP // starts_with_zero_byte subdomain
8 LDU // starts_with_zero_byte _43 _42
NIP // starts_with_zero_byte subdomain
SWAP // subdomain starts_with_zero_byte
}> // subdomain starts_with_zero_byte
OVER // subdomain starts_with_zero_byte subdomain
get_top_domain_bits CALLDICT // subdomain starts_with_zero_byte top_subdomain_bits
s2 s2 XCPU // top_subdomain_bits starts_with_zero_byte subdomain top_subdomain_bits
LDSLICEX // top_subdomain_bits starts_with_zero_byte _45 _44
DROP // top_subdomain_bits starts_with_zero_byte top_subdomain
HASHSU // top_subdomain_bits starts_with_zero_byte item_index
47763 PUSHINT // top_subdomain_bits starts_with_zero_byte item_index _31=47763
NEWC // top_subdomain_bits starts_with_zero_byte item_index _31=47763 _32
16 STU // top_subdomain_bits starts_with_zero_byte item_index _34
SWAP // top_subdomain_bits starts_with_zero_byte _34 item_index
get_nft_address_by_index CALLDICT // top_subdomain_bits starts_with_zero_byte _34 _35
STSLICER // top_subdomain_bits starts_with_zero_byte _36
ENDC // top_subdomain_bits starts_with_zero_byte result
SWAP // top_subdomain_bits result starts_with_zero_byte
IF:<{ // top_subdomain_bits result
8 PUSHINT // top_subdomain_bits result _38=8
}>ELSE<{ // top_subdomain_bits result
0 PUSHINT // top_subdomain_bits result _38=0
}>
s1 s2 XCHG // result top_subdomain_bits _38
ADD // result _41
SWAP // _41 result
}>
}END>c