All Downloads are FREE. Search and download functionalities are using the official Maven repository.

contracts.ft.build.jetton-minter.fif Maven / Gradle / Ivy

There is a newer version: 0.8.0
Show newest version
"Asm.fif" include
// automatically generated from `../stdlib.fc` `params.fc` `op-codes.fc` `jetton-utils.fc` `jetton-minter.fc` 
PROGRAM{
  DECLPROC force_chain
  DECLPROC pack_jetton_wallet_data
  DECLPROC calculate_jetton_wallet_state_init
  DECLPROC calculate_jetton_wallet_address
  DECLPROC calculate_user_jetton_wallet_address
  DECLPROC load_data
  DECLPROC save_data
  DECLPROC mint_tokens
  DECLPROC recv_internal
  106029 DECLMETHOD get_jetton_data
  103289 DECLMETHOD get_wallet_address
  force_chain PROC:<{
    //  addr
    REWRITESTDADDR	//  _8 _9
    DROP	//  wc
    0 PUSHINT	//  wc _5
    EQUAL	//  _6
    333 THROWIFNOT
  }>
  pack_jetton_wallet_data PROCINLINE:<{
    //  balance owner_address jetton_master_address jetton_wallet_code
    NEWC	//  balance owner_address jetton_master_address jetton_wallet_code _4
    s0 s4 XCHG2	//  jetton_wallet_code owner_address jetton_master_address _4 balance
    STVARUINT16	//  jetton_wallet_code owner_address jetton_master_address _5
    ROT	//  jetton_wallet_code jetton_master_address _5 owner_address
    STSLICER	//  jetton_wallet_code jetton_master_address _6
    SWAP	//  jetton_wallet_code _6 jetton_master_address
    STSLICER	//  jetton_wallet_code _7
    STREF	//  _8
    ENDC	//  _9
  }>
  calculate_jetton_wallet_state_init PROCINLINE:<{
    //  owner_address jetton_master_address jetton_wallet_code
    0 PUSHINT	//  owner_address jetton_master_address jetton_wallet_code _3=0
    s0 s1 s2 XCPUXC
    s4 s0 s3 XC2PU	//  _3=0 jetton_wallet_code _4=0 owner_address jetton_master_address jetton_wallet_code
    pack_jetton_wallet_data INLINECALLDICT	//  _3=0 jetton_wallet_code _5
    s2 PUSH	//  _3=0 jetton_wallet_code _5 _6=0
    NEWC	//  _3=0 jetton_wallet_code _5 _6=0 _7
    2 STU	//  _3=0 jetton_wallet_code _5 _9
    s1 s2 XCHG	//  _3=0 _5 jetton_wallet_code _9
    STDICT	//  _3=0 _5 _10
    STDICT	//  _3=0 _11
    1 STU	//  _13
    ENDC	//  _14
  }>
  calculate_jetton_wallet_address PROCINLINE:<{
    //  state_init
    HASHCU	//  _1
    0 PUSHINT	//  _1 _2
    4 PUSHINT	//  _1 _2 _3=4
    NEWC	//  _1 _2 _3=4 _4
    3 STU	//  _1 _2 _6
    8 STI	//  _1 _8
    256 STU	//  _10
    ENDC	//  _11
    CTOS	//  _12
  }>
  calculate_user_jetton_wallet_address PROCINLINE:<{
    //  owner_address jetton_master_address jetton_wallet_code
    calculate_jetton_wallet_state_init INLINECALLDICT	//  _3
    calculate_jetton_wallet_address INLINECALLDICT	//  _4
  }>
  load_data PROCINLINE:<{
    // 
    c4 PUSH	//  _1
    CTOS	//  ds
    LDVARUINT16	//  _3 ds
    LDMSGADDR	//  _3 _5 ds
    LDREF	//  _3 _5 _7 ds
    LDREF	//  _3 _5 _7 _18 _17
    DROP	//  _3 _5 _7 _9
  }>
  save_data PROCINLINE:<{
    //  total_supply admin_address content jetton_wallet_code
    NEWC	//  total_supply admin_address content jetton_wallet_code _4
    s0 s4 XCHG2	//  jetton_wallet_code admin_address content _4 total_supply
    STVARUINT16	//  jetton_wallet_code admin_address content _5
    ROT	//  jetton_wallet_code content _5 admin_address
    STSLICER	//  jetton_wallet_code content _6
    STREF	//  jetton_wallet_code _7
    STREF	//  _8
    ENDC	//  _9
    c4 POP
  }>
  mint_tokens PROC:<{
    //  to_address jetton_wallet_code amount master_msg
    MYADDR	//  to_address jetton_wallet_code amount master_msg _5
    s4 s0 s3 XCHG3	//  amount master_msg to_address _5 jetton_wallet_code
    calculate_jetton_wallet_state_init INLINECALLDICT	//  amount master_msg state_init
    DUP	//  amount master_msg state_init state_init
    calculate_jetton_wallet_address INLINECALLDICT	//  amount master_msg state_init to_wallet_address
    7 PUSHINT	//  amount master_msg state_init to_wallet_address _14
    24 PUSHINT	//  amount master_msg state_init to_wallet_address _14 _15=24
    NEWC	//  amount master_msg state_init to_wallet_address _14 _15=24 _16
    6 STU	//  amount master_msg state_init to_wallet_address _14 _18
    ROT	//  amount master_msg state_init _14 _18 to_wallet_address
    STSLICER	//  amount master_msg state_init _14 _19
    s0 s4 XCHG2	//  _14 master_msg state_init _19 amount
    STVARUINT16	//  _14 master_msg state_init _20
    s1 s3 XCHG	//  state_init master_msg _14 _20
    108 STU	//  state_init master_msg _36
    s1 s2 XCHG	//  master_msg state_init _36
    STREF	//  master_msg _37
    STREF	//  msg
    ENDC	//  _39
    1 PUSHINT	//  _39 _40=1
    SENDRAWMSG
  }>
  recv_internal PROC:<{
    //  msg_value in_msg_full in_msg_body
    s2 POP	//  in_msg_body in_msg_full
    OVER	//  in_msg_body in_msg_full in_msg_body
    SEMPTY	//  in_msg_body in_msg_full _3
    IFJMP:<{	//  in_msg_body in_msg_full
      2DROP	// 
    }>	//  in_msg_body in_msg_full
    CTOS	//  in_msg_body cs
    4 LDU	//  in_msg_body flags cs
    SWAP
    1 PUSHINT	//  in_msg_body cs flags _10=1
    AND	//  in_msg_body cs _11
    IFJMP:<{	//  in_msg_body cs
      2DROP	// 
    }>	//  in_msg_body cs
    LDMSGADDR	//  in_msg_body _132 _131
    DROP	//  in_msg_body sender_address
    SWAP	//  sender_address in_msg_body
    32 LDU	//  sender_address op in_msg_body
    64 LDU	//  sender_address op query_id in_msg_body
    load_data INLINECALLDICT	//  sender_address op query_id in_msg_body total_supply admin_address content jetton_wallet_code
    21 PUSHINT	//  sender_address op query_id in_msg_body total_supply admin_address content jetton_wallet_code _28
    s7 s(-1) PUXC	//  sender_address op query_id in_msg_body total_supply admin_address content jetton_wallet_code op _28
    EQUAL	//  sender_address op query_id in_msg_body total_supply admin_address content jetton_wallet_code _29
    IFJMP:<{	//  sender_address op query_id in_msg_body total_supply admin_address content jetton_wallet_code
      s5 POP
      s5 POP	//  sender_address content jetton_wallet_code in_msg_body total_supply admin_address
      s5 s5 XCPU	//  admin_address content jetton_wallet_code in_msg_body total_supply sender_address admin_address
      SDEQ	//  admin_address content jetton_wallet_code in_msg_body total_supply _31
      73 THROWIFNOT
      SWAP	//  admin_address content jetton_wallet_code total_supply in_msg_body
      LDMSGADDR	//  admin_address content jetton_wallet_code total_supply to_address in_msg_body
      LDVARUINT16	//  admin_address content jetton_wallet_code total_supply to_address amount in_msg_body
      LDREF	//  admin_address content jetton_wallet_code total_supply to_address amount _146 _145
      DROP	//  admin_address content jetton_wallet_code total_supply to_address amount master_msg
      DUP	//  admin_address content jetton_wallet_code total_supply to_address amount master_msg master_msg
      CTOS	//  admin_address content jetton_wallet_code total_supply to_address amount master_msg master_msg_cs
      96 PUSHINT	//  admin_address content jetton_wallet_code total_supply to_address amount master_msg master_msg_cs _47
      SDSKIPFIRST	//  admin_address content jetton_wallet_code total_supply to_address amount master_msg master_msg_cs
      LDVARUINT16	//  admin_address content jetton_wallet_code total_supply to_address amount master_msg _148 _147
      DROP	//  admin_address content jetton_wallet_code total_supply to_address amount master_msg jetton_amount
      s5 PUSH
      s3 s4 XCHG
      s4 s2 XCHG2	//  admin_address content jetton_wallet_code total_supply jetton_amount to_address jetton_wallet_code amount master_msg
      mint_tokens CALLDICT
      ADD	//  admin_address content jetton_wallet_code _53
      3 -ROLL	//  _53 admin_address content jetton_wallet_code
      save_data INLINECALLDICT
    }>	//  sender_address op query_id in_msg_body total_supply admin_address content jetton_wallet_code
    0x7bdd97de PUSHINT	//  sender_address op query_id in_msg_body total_supply admin_address content jetton_wallet_code _55
    s7 s(-1) PUXC	//  sender_address op query_id in_msg_body total_supply admin_address content jetton_wallet_code op _55
    EQUAL	//  sender_address op query_id in_msg_body total_supply admin_address content jetton_wallet_code _56
    IFJMP:<{	//  sender_address op query_id in_msg_body total_supply admin_address content jetton_wallet_code
      s6 POP	//  sender_address jetton_wallet_code query_id in_msg_body total_supply admin_address content
      s0 s3 XCHG	//  sender_address jetton_wallet_code query_id content total_supply admin_address in_msg_body
      LDVARUINT16	//  sender_address jetton_wallet_code query_id content total_supply admin_address jetton_amount in_msg_body
      LDMSGADDR	//  sender_address jetton_wallet_code query_id content total_supply admin_address jetton_amount from_address in_msg_body
      MYADDR	//  sender_address jetton_wallet_code query_id content total_supply admin_address jetton_amount from_address in_msg_body _64
      s2 s0 s8 XC2PU	//  sender_address jetton_wallet_code query_id content total_supply admin_address jetton_amount in_msg_body from_address _64 jetton_wallet_code
      calculate_user_jetton_wallet_address INLINECALLDICT	//  sender_address jetton_wallet_code query_id content total_supply admin_address jetton_amount in_msg_body _65
      s0 s8 XCHG2	//  in_msg_body jetton_wallet_code query_id content total_supply admin_address jetton_amount _65 sender_address
      SDEQ	//  in_msg_body jetton_wallet_code query_id content total_supply admin_address jetton_amount _66
      74 THROWIFNOT
      s1 s2 XCHG	//  in_msg_body jetton_wallet_code query_id content admin_address total_supply jetton_amount
      SUB	//  in_msg_body jetton_wallet_code query_id content admin_address _68
      s0 s3 XCHG
      s2 s4 XCHG2	//  in_msg_body query_id _68 admin_address content jetton_wallet_code
      save_data INLINECALLDICT
      SWAP	//  query_id in_msg_body
      LDMSGADDR	//  query_id _154 _153
      DROP	//  query_id response_address
      DUP	//  query_id response_address response_address
      2 PLDU	//  query_id response_address _74
      0 NEQINT	//  query_id response_address _76
      IF:<{	//  query_id response_address
        0xd53276db PUSHINT	//  query_id response_address _78
        0 PUSHINT	//  query_id response_address _78 _79=0
        16 PUSHINT	//  query_id response_address _78 _79=0 _80=16
        NEWC	//  query_id response_address _78 _79=0 _80=16 _81
        6 STU	//  query_id response_address _78 _79=0 _83
        s0 s3 XCHG2	//  query_id _79=0 _78 _83 response_address
        STSLICER	//  query_id _79=0 _78 _84
        s2 PUSH	//  query_id _79=0 _78 _84 _85=0
        STVARUINT16	//  query_id _79=0 _78 _86
        s1 s2 XCHG	//  query_id _78 _79=0 _86
        107 STU	//  query_id _78 _100
        32 STU	//  query_id _102
        64 STU	//  msg
        ENDC	//  _105
        66 PUSHINT	//  _105 _108
        SENDRAWMSG
      }>ELSE<{
        2DROP	// 
      }>
    }>	//  sender_address op query_id in_msg_body total_supply admin_address content jetton_wallet_code
    s5 POP	//  sender_address op jetton_wallet_code in_msg_body total_supply admin_address content
    s5 PUSH	//  sender_address op jetton_wallet_code in_msg_body total_supply admin_address content op
    3 EQINT	//  sender_address op jetton_wallet_code in_msg_body total_supply admin_address content _111
    IFJMP:<{	//  sender_address op jetton_wallet_code in_msg_body total_supply admin_address content
      s5 POP	//  sender_address content jetton_wallet_code in_msg_body total_supply admin_address
      s1 s5 XCHG	//  total_supply content jetton_wallet_code in_msg_body sender_address admin_address
      SDEQ	//  total_supply content jetton_wallet_code in_msg_body _113
      73 THROWIFNOT
      LDMSGADDR	//  total_supply content jetton_wallet_code _156 _155
      DROP	//  total_supply content jetton_wallet_code new_admin_address
      -ROT	//  total_supply new_admin_address content jetton_wallet_code
      save_data INLINECALLDICT
    }>	//  sender_address op jetton_wallet_code in_msg_body total_supply admin_address content
    DROP	//  sender_address op jetton_wallet_code in_msg_body total_supply admin_address
    s0 s4 XCHG	//  sender_address admin_address jetton_wallet_code in_msg_body total_supply op
    4 EQINT	//  sender_address admin_address jetton_wallet_code in_msg_body total_supply _120
    IFJMP:<{	//  sender_address admin_address jetton_wallet_code in_msg_body total_supply
      s4 s3 XCPU	//  total_supply admin_address jetton_wallet_code in_msg_body sender_address admin_address
      SDEQ	//  total_supply admin_address jetton_wallet_code in_msg_body _122
      73 THROWIFNOT
      LDREF	//  total_supply admin_address jetton_wallet_code _158 _157
      DROP	//  total_supply admin_address jetton_wallet_code _124
      SWAP	//  total_supply admin_address _124 jetton_wallet_code
      save_data INLINECALLDICT
    }>	//  sender_address admin_address jetton_wallet_code in_msg_body total_supply
    5 BLKDROP	// 
    16 PUSHPOW2DEC	//  _127=65535
    THROWANY
  }>
  get_jetton_data PROC:<{
    // 
    load_data INLINECALLDICT	//  total_supply admin_address content jetton_wallet_code
    -1 PUSHINT	//  total_supply admin_address content jetton_wallet_code _5=-1
    3 -ROLL	//  total_supply _5=-1 admin_address content jetton_wallet_code
  }>
  get_wallet_address PROC:<{
    //  owner_address
    load_data INLINECALLDICT	//  owner_address _8 _9 _10 _11
    3 1 BLKDROP2	//  owner_address jetton_wallet_code
    MYADDR	//  owner_address jetton_wallet_code _6
    SWAP	//  owner_address _6 jetton_wallet_code
    calculate_user_jetton_wallet_address INLINECALLDICT	//  _7
  }>
}END>c




© 2015 - 2024 Weber Informatics LLC | Privacy Policy