contracts.nft.build.nft-item-editable-code.fif Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smartcontract Show documentation
Show all versions of smartcontract Show documentation
Build and manipulate TON smart contracts in easy way.
"Asm.fif" include
// automatically generated from `../stdlib.fc` `params.fc` `op-codes.fc` `nft-item-editable-DRAFT.fc`
PROGRAM{
DECLPROC force_chain
DECLPROC load_data
DECLPROC store_data
DECLPROC send_msg
DECLPROC transfer_ownership
DECLPROC transfer_editorship
DECLPROC recv_internal
102351 DECLMETHOD get_nft_data
90228 DECLMETHOD get_editor
force_chain PROC:<{
// addr
REWRITESTDADDR // _8 _9
DROP // wc
0 PUSHINT // wc _5
EQUAL // _6
333 THROWIFNOT
}>
load_data PROC:<{
//
c4 PUSH // _1
CTOS // ds
64 LDU // _5 ds
LDMSGADDR // index collection_address ds
DUP // index collection_address ds ds
SBITS // index collection_address ds _10
0 GTINT // index collection_address ds _12
IFJMP:<{ // index collection_address ds
-1 PUSHINT // index collection_address ds _13=-1
SWAP // index collection_address _13=-1 ds
LDMSGADDR // index collection_address _13=-1 _14 ds
LDREF // index collection_address _13=-1 _14 _16 ds
LDMSGADDR // index collection_address _13=-1 _14 _16 _33 _32
DROP // index collection_address _13=-1 _14 _16 _18
s3 s5 XCHG
s3 s4 XCHG // _13=-1 index collection_address _14 _16 _18
}> // index collection_address ds
DROP // index collection_address
0 PUSHINT // index collection_address _20=0
-ROT
PUSHNULL
PUSHNULL
PUSHNULL // _20=0 index collection_address _21 _22 _23
}>
store_data PROC:<{
// index collection_address owner_address content editor_address
s0 s4 XCHG
NEWC // editor_address collection_address owner_address content index _5
64 STU // editor_address collection_address owner_address content _7
s0 s3 XCHG2 // editor_address content owner_address _7 collection_address
STSLICER // editor_address content owner_address _8
SWAP // editor_address content _8 owner_address
STSLICER // editor_address content _9
STREF // editor_address _10
SWAP // _10 editor_address
STSLICER // _11
ENDC // _12
c4 POP
}>
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
}>
transfer_ownership PROCINLINE:<{
// my_balance index collection_address owner_address content editor_address sender_address query_id in_msg_body fwd_fees
s3 s6 XCPU // my_balance index collection_address owner_address content editor_address fwd_fees query_id in_msg_body sender_address owner_address
SDEQ // my_balance index collection_address owner_address content editor_address fwd_fees query_id in_msg_body _11
401 THROWIFNOT
LDMSGADDR // my_balance index collection_address owner_address content editor_address fwd_fees query_id new_owner_address in_msg_body
OVER // my_balance index collection_address owner_address content editor_address fwd_fees query_id new_owner_address in_msg_body new_owner_address
force_chain CALLDICT
LDMSGADDR // my_balance index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination in_msg_body
1 LDI // my_balance index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination _58 _57
NIP // my_balance index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination in_msg_body
LDVARUINT16 // my_balance index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount in_msg_body
50000000 PUSHINT // my_balance index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount in_msg_body _27
s1 s12 XCHG // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount my_balance _27
SUB // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount rest_amount
OVER // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount rest_amount forward_amount
IF:<{ // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount rest_amount
s1 s5 PUSH2 // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount rest_amount forward_amount fwd_fees
ADD // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount rest_amount _29
SUB // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount rest_amount
}> // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount rest_amount
s2 PUSH // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount rest_amount response_destination
2 PLDU // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount rest_amount _33
0 NEQINT // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount rest_amount need_response
DUP // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount rest_amount need_response need_response
IF:<{ // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_owner_address response_destination forward_amount rest_amount need_response
s0 s6 XCHG // in_msg_body index collection_address owner_address content editor_address need_response query_id new_owner_address response_destination forward_amount rest_amount fwd_fees
SUB // in_msg_body index collection_address owner_address content editor_address need_response query_id new_owner_address response_destination forward_amount rest_amount
}>ELSE<{
s6 POP // in_msg_body index collection_address owner_address content editor_address need_response query_id new_owner_address response_destination forward_amount rest_amount
}>
DUP // in_msg_body index collection_address owner_address content editor_address need_response query_id new_owner_address response_destination forward_amount rest_amount rest_amount
-1 GTINT // in_msg_body index collection_address owner_address content editor_address need_response query_id new_owner_address response_destination forward_amount rest_amount _39
402 THROWIFNOT
OVER // in_msg_body index collection_address owner_address content editor_address need_response query_id new_owner_address response_destination forward_amount rest_amount forward_amount
IF:<{ // in_msg_body index collection_address owner_address content editor_address need_response query_id new_owner_address response_destination forward_amount rest_amount
0x05138d91 PUSHINT // in_msg_body index collection_address owner_address content editor_address need_response query_id new_owner_address response_destination forward_amount rest_amount _41
NEWC // in_msg_body index collection_address owner_address content editor_address need_response query_id new_owner_address response_destination forward_amount rest_amount _41 _42
s0 s10 XCHG2 // in_msg_body index collection_address _41 content editor_address need_response query_id new_owner_address response_destination forward_amount rest_amount _42 owner_address
STSLICER // in_msg_body index collection_address _41 content editor_address need_response query_id new_owner_address response_destination forward_amount rest_amount _43
s0 s12 XCHG2 // rest_amount index collection_address _41 content editor_address need_response query_id new_owner_address response_destination forward_amount _43 in_msg_body
STSLICER // rest_amount index collection_address _41 content editor_address need_response query_id new_owner_address response_destination forward_amount _44
1 PUSHINT // rest_amount index collection_address _41 content editor_address need_response query_id new_owner_address response_destination forward_amount _44 _45=1
s4 PUSH
s10 s1 s4 XCHG3
s6 s10 s(-1) PUXC2 // rest_amount index collection_address response_destination content editor_address need_response query_id new_owner_address new_owner_address forward_amount _41 query_id _44 _45=1
send_msg INLINECALLDICT
s5 s8 XCHG // response_destination index collection_address rest_amount content editor_address need_response query_id new_owner_address
}>ELSE<{
s2 s11 XCHG
s8 POP
2DROP // response_destination index collection_address rest_amount content editor_address need_response query_id new_owner_address
}>
s0 s2 XCHG // response_destination index collection_address rest_amount content editor_address new_owner_address query_id need_response
IF:<{ // response_destination index collection_address rest_amount content editor_address new_owner_address query_id
s7 PUSH // response_destination index collection_address rest_amount content editor_address new_owner_address query_id response_destination
force_chain CALLDICT
0xd53276db PUSHINT // response_destination index collection_address rest_amount content editor_address new_owner_address query_id _48
s3 s8 XCHG
s5 s0 s0 XCHG3
PUSHNULL
1 PUSHINT // editor_address index collection_address new_owner_address content response_destination rest_amount _48 query_id _49 _50=1
send_msg INLINECALLDICT
}>ELSE<{
DROP
s3 POP
s5 POP // editor_address index collection_address new_owner_address content
}>
4 ROLL // index collection_address new_owner_address content editor_address
store_data CALLDICT
}>
transfer_editorship PROCINLINE:<{
// my_balance index collection_address owner_address content editor_address sender_address query_id in_msg_body fwd_fees
s3 s4 XCPU // my_balance index collection_address owner_address content editor_address fwd_fees query_id in_msg_body sender_address editor_address
SDEQ // my_balance index collection_address owner_address content editor_address fwd_fees query_id in_msg_body _11
401 THROWIFNOT
LDMSGADDR // my_balance index collection_address owner_address content editor_address fwd_fees query_id new_editor_address in_msg_body
OVER // my_balance index collection_address owner_address content editor_address fwd_fees query_id new_editor_address in_msg_body new_editor_address
force_chain CALLDICT
LDMSGADDR // my_balance index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination in_msg_body
1 LDI // my_balance index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination _58 _57
NIP // my_balance index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination in_msg_body
LDVARUINT16 // my_balance index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount in_msg_body
50000000 PUSHINT // my_balance index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount in_msg_body _27
s1 s12 XCHG // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount my_balance _27
SUB // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount rest_amount
OVER // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount rest_amount forward_amount
IF:<{ // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount rest_amount
s1 s5 PUSH2 // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount rest_amount forward_amount fwd_fees
ADD // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount rest_amount _29
SUB // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount rest_amount
}> // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount rest_amount
s2 PUSH // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount rest_amount response_destination
2 PLDU // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount rest_amount _33
0 NEQINT // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount rest_amount need_response
DUP // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount rest_amount need_response need_response
IF:<{ // in_msg_body index collection_address owner_address content editor_address fwd_fees query_id new_editor_address response_destination forward_amount rest_amount need_response
s0 s6 XCHG // in_msg_body index collection_address owner_address content editor_address need_response query_id new_editor_address response_destination forward_amount rest_amount fwd_fees
SUB // in_msg_body index collection_address owner_address content editor_address need_response query_id new_editor_address response_destination forward_amount rest_amount
}>ELSE<{
s6 POP // in_msg_body index collection_address owner_address content editor_address need_response query_id new_editor_address response_destination forward_amount rest_amount
}>
DUP // in_msg_body index collection_address owner_address content editor_address need_response query_id new_editor_address response_destination forward_amount rest_amount rest_amount
-1 GTINT // in_msg_body index collection_address owner_address content editor_address need_response query_id new_editor_address response_destination forward_amount rest_amount _39
402 THROWIFNOT
OVER // in_msg_body index collection_address owner_address content editor_address need_response query_id new_editor_address response_destination forward_amount rest_amount forward_amount
IF:<{ // in_msg_body index collection_address owner_address content editor_address need_response query_id new_editor_address response_destination forward_amount rest_amount
0x511a4463 PUSHINT // in_msg_body index collection_address owner_address content editor_address need_response query_id new_editor_address response_destination forward_amount rest_amount _41
NEWC // in_msg_body index collection_address owner_address content editor_address need_response query_id new_editor_address response_destination forward_amount rest_amount _41 _42
s0 s8 XCHG2 // in_msg_body index collection_address owner_address content _41 need_response query_id new_editor_address response_destination forward_amount rest_amount _42 editor_address
STSLICER // in_msg_body index collection_address owner_address content _41 need_response query_id new_editor_address response_destination forward_amount rest_amount _43
s0 s12 XCHG2 // rest_amount index collection_address owner_address content _41 need_response query_id new_editor_address response_destination forward_amount _43 in_msg_body
STSLICER // rest_amount index collection_address owner_address content _41 need_response query_id new_editor_address response_destination forward_amount _44
1 PUSHINT // rest_amount index collection_address owner_address content _41 need_response query_id new_editor_address response_destination forward_amount _44 _45=1
s4 PUSH
s8 s1 s4 XCHG3
s6 s8 s(-1) PUXC2 // rest_amount index collection_address owner_address content response_destination need_response query_id new_editor_address new_editor_address forward_amount _41 query_id _44 _45=1
send_msg INLINECALLDICT
s3 s8 XCHG // response_destination index collection_address owner_address content rest_amount need_response query_id new_editor_address
}>ELSE<{
s2 s11 XCHG
s6 POP
2DROP // response_destination index collection_address owner_address content rest_amount need_response query_id new_editor_address
}>
s0 s2 XCHG // response_destination index collection_address owner_address content rest_amount new_editor_address query_id need_response
IF:<{ // response_destination index collection_address owner_address content rest_amount new_editor_address query_id
s7 PUSH // response_destination index collection_address owner_address content rest_amount new_editor_address query_id response_destination
force_chain CALLDICT
0xd53276db PUSHINT // response_destination index collection_address owner_address content rest_amount new_editor_address query_id _48
s3 s8 XCHG
s8 s0 s0 XCHG3
PUSHNULL
1 PUSHINT // new_editor_address index collection_address owner_address content response_destination rest_amount _48 query_id _49 _50=1
send_msg INLINECALLDICT
}>ELSE<{
DROP
s6 POP
DROP // new_editor_address index collection_address owner_address content
}>
4 ROLL // index collection_address owner_address content new_editor_address
store_data CALLDICT
}>
recv_internal PROC:<{
// my_balance msg_value in_msg_full in_msg_body
s2 POP // my_balance in_msg_body in_msg_full
OVER // my_balance in_msg_body in_msg_full in_msg_body
SEMPTY // my_balance in_msg_body in_msg_full _4
IFJMP:<{ // my_balance in_msg_body in_msg_full
3 BLKDROP //
}> // my_balance in_msg_body in_msg_full
CTOS // my_balance in_msg_body cs
4 LDU // my_balance in_msg_body flags cs
SWAP
1 PUSHINT // my_balance in_msg_body cs flags _11=1
AND // my_balance in_msg_body cs _12
IFJMP:<{ // my_balance in_msg_body cs
3 BLKDROP //
}> // my_balance in_msg_body cs
LDMSGADDR // my_balance in_msg_body sender_address cs
LDMSGADDR // my_balance in_msg_body sender_address _88 _87
NIP // my_balance in_msg_body sender_address cs
LDVARUINT16 // my_balance in_msg_body sender_address _90 _89
NIP // my_balance in_msg_body sender_address cs
1 PUSHINT // my_balance in_msg_body sender_address cs _21=1
SDSKIPFIRST // my_balance in_msg_body sender_address cs
LDVARUINT16 // my_balance in_msg_body sender_address _92 _91
NIP // my_balance in_msg_body sender_address cs
LDVARUINT16 // my_balance in_msg_body sender_address _94 _93
DROP // my_balance in_msg_body sender_address _26
3 PUSHINT // my_balance in_msg_body sender_address _26 _28=3
1 MULRSHIFT# // my_balance in_msg_body sender_address fwd_fee
load_data CALLDICT // my_balance in_msg_body sender_address fwd_fee init? index collection_address owner_address content editor_address
s0 s5 XCHG // my_balance in_msg_body sender_address fwd_fee editor_address index collection_address owner_address content init?
NOT // my_balance in_msg_body sender_address fwd_fee editor_address index collection_address owner_address content _38
IFJMP:<{ // my_balance in_msg_body sender_address fwd_fee editor_address index collection_address owner_address content
2DROP
2 2 BLKDROP2
s4 POP // collection_address in_msg_body sender_address index
s3 s1 PUXC // collection_address in_msg_body index collection_address sender_address
SDEQ // collection_address in_msg_body index _40
405 THROWIFNOT
SWAP // collection_address index in_msg_body
LDMSGADDR // collection_address index _42 in_msg_body
LDREF // collection_address index _42 _44 in_msg_body
LDMSGADDR // collection_address index _42 _44 _106 _105
DROP // collection_address index _42 _44 _46
s3 s4 XCHG // index collection_address _42 _44 _46
store_data CALLDICT
}> // my_balance in_msg_body sender_address fwd_fee editor_address index collection_address owner_address content
s0 s7 XCHG // my_balance content sender_address fwd_fee editor_address index collection_address owner_address in_msg_body
32 LDU // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op in_msg_body
64 LDU // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body
0x5fcc3d14 PUSHINT // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body _57
s3 s(-1) PUXC // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body op _57
EQUAL // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body _58
IFJMP:<{ // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body
s2 POP // my_balance content sender_address fwd_fee editor_address index collection_address owner_address in_msg_body query_id
s4 s8 XCHG
s3 s7 XCHG
s2 s6 XCHG
s4 s5 XCHG
s0 s2 XCHG // my_balance index collection_address owner_address content editor_address sender_address query_id in_msg_body fwd_fee
transfer_ownership INLINECALLDICT
}> // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body
0x2fcb26a2 PUSHINT // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body _60
s3 s(-1) PUXC // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body op _60
EQUAL // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body _61
IFJMP:<{ // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body
s1 s3 XCHG
3 BLKDROP
s3 POP
s3 POP
s4 POP
s4 POP // query_id index sender_address collection_address
0 PUSHINT // query_id index sender_address collection_address _62=0
0x8b771735 PUSHINT // query_id index sender_address collection_address _62=0 _63
s0 s4 XCHG
NEWC // query_id _63 sender_address collection_address _62=0 index _64
256 STU // query_id _63 sender_address collection_address _62=0 _66
ROT // query_id _63 sender_address _62=0 _66 collection_address
STSLICER // query_id _63 sender_address _62=0 _67
s4 s3 s0 XCHG3
s1 s2 XCHG
64 PUSHINT // sender_address _62=0 _63 query_id _67 _68=64
send_msg INLINECALLDICT
}> // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body
0x1c04412a PUSHINT // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body _70
s3 s(-1) PUXC // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body op _70
EQUAL // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body _71
IFJMP:<{ // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body
s2 POP // my_balance content sender_address fwd_fee editor_address index collection_address owner_address in_msg_body query_id
s4 s8 XCHG
s3 s7 XCHG
s2 s6 XCHG
s4 s5 XCHG
s0 s2 XCHG // my_balance index collection_address owner_address content editor_address sender_address query_id in_msg_body fwd_fee
transfer_editorship INLINECALLDICT
}> // my_balance content sender_address fwd_fee editor_address index collection_address owner_address op query_id in_msg_body
NIP
s6 POP
s7 POP
s7 POP // owner_address op sender_address in_msg_body editor_address index collection_address
0x1a0b9d51 PUSHINT // owner_address op sender_address in_msg_body editor_address index collection_address _73
s1 s6 XCHG // owner_address collection_address sender_address in_msg_body editor_address index op _73
EQUAL // owner_address collection_address sender_address in_msg_body editor_address index _74
IFJMP:<{ // owner_address collection_address sender_address in_msg_body editor_address index
s3 s1 XCPU // owner_address collection_address index in_msg_body editor_address sender_address editor_address
SDEQ // owner_address collection_address index in_msg_body editor_address _76
410 THROWIFNOT
SWAP // owner_address collection_address index editor_address in_msg_body
LDREF // owner_address collection_address index editor_address _112 _111
DROP // owner_address collection_address index editor_address _78
s4 s0 s0 XCHG3 // index collection_address owner_address _78 editor_address
store_data CALLDICT
}> // owner_address collection_address sender_address in_msg_body editor_address index
6 BLKDROP //
16 PUSHPOW2DEC // _81=65535
THROWANY
}>
get_nft_data PROC:<{
//
load_data CALLDICT // _7 _8 _9 _10 _11 _12
DROP // init? index collection_address owner_address content
}>
get_editor PROC:<{
//
load_data CALLDICT // _7 _8 _9 _10 _11 _12
5 1 BLKDROP2 // editor_address
}>
}END>c