|
|
|
@ -99,8 +99,8 @@ cell __tact_dict_get_code(cell dict, int id) inline {
|
|
|
|
|
return (sc_0, (v'queryId, v'amount, v'destination, v'responseDestination, v'customPayload, v'forwardTonAmount, v'forwardPayload)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
builder __gen_write_TokenTransferInternal(builder build_0, (int, int, slice, slice, int, slice, slice) v) inline_ref { |
|
|
|
|
var (v'queryId, v'amount, v'from, v'responseAddress, v'forwardTonAmount, v'forwardPayload, v'setLinker) = v; |
|
|
|
|
builder __gen_write_TokenTransferInternal(builder build_0, (int, int, slice, slice, int, slice, int, slice) v) inline_ref { |
|
|
|
|
var (v'queryId, v'amount, v'from, v'responseAddress, v'forwardTonAmount, v'forwardPayload, v'setLinker, v'setLinkerAddress) = v; |
|
|
|
|
build_0 = store_uint(build_0, 395134233, 32); |
|
|
|
|
build_0 = build_0.store_uint(v'queryId, 64); |
|
|
|
|
build_0 = build_0.store_coins(v'amount); |
|
|
|
@ -109,16 +109,17 @@ builder __gen_write_TokenTransferInternal(builder build_0, (int, int, slice, sli
|
|
|
|
|
build_0 = build_0.store_coins(v'forwardTonAmount); |
|
|
|
|
build_0 = build_0.store_slice(v'forwardPayload); |
|
|
|
|
var build_1 = begin_cell(); |
|
|
|
|
build_1 = __tact_store_address_opt(build_1, v'setLinker); |
|
|
|
|
build_1 = ~ null?(v'setLinker) ? build_1.store_int(true, 1).store_int(v'setLinker, 257) : build_1.store_int(false, 1); |
|
|
|
|
build_1 = __tact_store_address_opt(build_1, v'setLinkerAddress); |
|
|
|
|
build_0 = store_ref(build_0, build_1.end_cell()); |
|
|
|
|
return build_0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
cell __gen_writecell_TokenTransferInternal((int, int, slice, slice, int, slice, slice) v) inline_ref { |
|
|
|
|
cell __gen_writecell_TokenTransferInternal((int, int, slice, slice, int, slice, int, slice) v) inline_ref { |
|
|
|
|
return __gen_write_TokenTransferInternal(begin_cell(), v).end_cell(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
(slice, ((int, int, slice, slice, int, slice, slice))) __gen_read_TokenTransferInternal(slice sc_0) inline_ref { |
|
|
|
|
(slice, ((int, int, slice, slice, int, slice, int, slice))) __gen_read_TokenTransferInternal(slice sc_0) inline_ref { |
|
|
|
|
throw_unless(129, sc_0~load_uint(32) == 395134233); |
|
|
|
|
var v'queryId = sc_0~load_uint(64); |
|
|
|
|
var v'amount = sc_0~load_coins(); |
|
|
|
@ -127,8 +128,9 @@ cell __gen_writecell_TokenTransferInternal((int, int, slice, slice, int, slice,
|
|
|
|
|
var v'forwardTonAmount = sc_0~load_coins(); |
|
|
|
|
var v'forwardPayload = sc_0; |
|
|
|
|
slice sc_1 = sc_0~load_ref().begin_parse(); |
|
|
|
|
var v'setLinker = sc_1~__tact_load_address_opt(); |
|
|
|
|
return (sc_0, (v'queryId, v'amount, v'from, v'responseAddress, v'forwardTonAmount, v'forwardPayload, v'setLinker)); |
|
|
|
|
var v'setLinker = sc_1~load_int(1) ? sc_1~load_int(257) : null(); |
|
|
|
|
var v'setLinkerAddress = sc_1~__tact_load_address_opt(); |
|
|
|
|
return (sc_0, (v'queryId, v'amount, v'from, v'responseAddress, v'forwardTonAmount, v'forwardPayload, v'setLinker, v'setLinkerAddress)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
builder __gen_write_TokenNotification(builder build_0, (int, int, slice, slice) v) inline_ref { |
|
|
|
@ -179,24 +181,26 @@ cell __gen_writecell_TokenExcesses((int) v) inline_ref {
|
|
|
|
|
return __gen_write_TokenExcesses(begin_cell(), v).end_cell(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
builder __gen_write_TONBWallet(builder build_0, (int, slice, slice, slice) v) inline_ref { |
|
|
|
|
var (v'balance, v'owner, v'master, v'linker) = v; |
|
|
|
|
builder __gen_write_TONBWallet(builder build_0, (int, slice, slice, int, slice) v) inline_ref { |
|
|
|
|
var (v'balance, v'owner, v'master, v'linker, v'linker_address) = v; |
|
|
|
|
build_0 = build_0.store_int(v'balance, 257); |
|
|
|
|
build_0 = __tact_store_address(build_0, v'owner); |
|
|
|
|
build_0 = __tact_store_address(build_0, v'master); |
|
|
|
|
var build_1 = begin_cell(); |
|
|
|
|
build_1 = __tact_store_address_opt(build_1, v'linker); |
|
|
|
|
build_1 = ~ null?(v'linker) ? build_1.store_int(true, 1).store_int(v'linker, 257) : build_1.store_int(false, 1); |
|
|
|
|
build_1 = __tact_store_address_opt(build_1, v'linker_address); |
|
|
|
|
build_0 = store_ref(build_0, build_1.end_cell()); |
|
|
|
|
return build_0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
(slice, ((int, slice, slice, slice))) __gen_read_TONBWallet(slice sc_0) inline_ref { |
|
|
|
|
(slice, ((int, slice, slice, int, slice))) __gen_read_TONBWallet(slice sc_0) inline_ref { |
|
|
|
|
var v'balance = sc_0~load_int(257); |
|
|
|
|
var v'owner = sc_0~__tact_load_address(); |
|
|
|
|
var v'master = sc_0~__tact_load_address(); |
|
|
|
|
slice sc_1 = sc_0~load_ref().begin_parse(); |
|
|
|
|
var v'linker = sc_1~__tact_load_address_opt(); |
|
|
|
|
return (sc_0, (v'balance, v'owner, v'master, v'linker)); |
|
|
|
|
var v'linker = sc_1~load_int(1) ? sc_1~load_int(257) : null(); |
|
|
|
|
var v'linker_address = sc_1~__tact_load_address_opt(); |
|
|
|
|
return (sc_0, (v'balance, v'owner, v'master, v'linker, v'linker_address)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_ __gen_StateInit_get_code((cell, cell) v) inline { |
|
|
|
@ -209,13 +213,13 @@ _ __gen_StateInit_get_code((cell, cell) v) inline {
|
|
|
|
|
return (v'balance, v'owner, v'master, v'walletCode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
(int, slice, slice, slice) __gen_load_TONBWallet() inline_ref { |
|
|
|
|
(int, slice, slice, int, slice) __gen_load_TONBWallet() inline_ref { |
|
|
|
|
slice sc = get_data().begin_parse(); |
|
|
|
|
__tact_context_sys = sc~load_ref(); |
|
|
|
|
return sc~__gen_read_TONBWallet(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
() __gen_store_TONBWallet((int, slice, slice, slice) v) impure inline_ref { |
|
|
|
|
() __gen_store_TONBWallet((int, slice, slice, int, slice) v) impure inline_ref { |
|
|
|
|
builder b = begin_cell(); |
|
|
|
|
b = b.store_ref(__tact_context_sys); |
|
|
|
|
b = __gen_write_TONBWallet(b, v); |
|
|
|
@ -281,13 +285,13 @@ int $__gen_Context_readForwardFee((int, slice, int, slice) $self) impure {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
cell $__gen_TONBWallet_init(cell sys', slice $master, slice $owner) { |
|
|
|
|
var (($self'balance, $self'owner, $self'master, $self'linker)) = (null(), null(), null(), null()); |
|
|
|
|
var (($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address)) = (null(), null(), null(), null(), null()); |
|
|
|
|
$self'balance = 0; |
|
|
|
|
$self'owner = $owner; |
|
|
|
|
$self'master = $master; |
|
|
|
|
var b' = begin_cell(); |
|
|
|
|
b' = b'.store_ref(sys'); |
|
|
|
|
b' = __gen_write_TONBWallet(b', ($self'balance, $self'owner, $self'master, $self'linker)); |
|
|
|
|
b' = __gen_write_TONBWallet(b', ($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address)); |
|
|
|
|
return b'.end_cell(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -303,8 +307,8 @@ cell $__gen_TONBWallet_init(cell sys', slice $master, slice $owner) {
|
|
|
|
|
return (mine, $__gen_TONBWallet_init(sys, $master, $owner)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
(int, slice, slice, cell) $__gen_TONBWallet_get_wallet_data((int, slice, slice, slice) $self) impure { |
|
|
|
|
var (($self'balance, $self'owner, $self'master, $self'linker)) = $self; |
|
|
|
|
(int, slice, slice, cell) $__gen_TONBWallet_get_wallet_data((int, slice, slice, int, slice) $self) impure { |
|
|
|
|
var (($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address)) = $self; |
|
|
|
|
return ($self'balance, $self'owner, $self'master, __gen_StateInit_get_code($__gen_TONBWallet_init_child(__tact_context_sys, $self'master, $self'owner))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -314,8 +318,8 @@ _ $__gen_get_get_wallet_data() method_id(97026) {
|
|
|
|
|
return __gen_JettonWalletData_to_external(res); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
(((int, slice, slice, slice)), ()) $__gen_TONBWallet_receive_TokenTransfer((int, slice, slice, slice) $self, (int, int, slice, slice, cell, int, slice) $msg) impure { |
|
|
|
|
var ($self'balance, $self'owner, $self'master, $self'linker) = $self; |
|
|
|
|
(((int, slice, slice, int, slice)), ()) $__gen_TONBWallet_receive_TokenTransfer((int, slice, slice, int, slice) $self, (int, int, slice, slice, cell, int, slice) $msg) impure { |
|
|
|
|
var ($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address) = $self; |
|
|
|
|
var ($msg'queryId, $msg'amount, $msg'destination, $msg'responseDestination, $msg'customPayload, $msg'forwardTonAmount, $msg'forwardPayload) = $msg; |
|
|
|
|
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get(); |
|
|
|
|
throw_unless(4429, __tact_address_eq($ctx'sender, $self'owner)); |
|
|
|
@ -329,18 +333,19 @@ _ $__gen_get_get_wallet_data() method_id(97026) {
|
|
|
|
|
throw_unless(16059, ($ctx'value > ((($fwdCount * $fwdFee) + (2 * 10000000)) + 10000000))); |
|
|
|
|
var ($init'code, $init'data) = $__gen_TONBWallet_init_child(__tact_context_sys, $self'master, $msg'destination); |
|
|
|
|
slice $walletAddress = $contractAddress(($init'code, $init'data)); |
|
|
|
|
$send((true, $walletAddress, 0, 64, __gen_writecell_TokenTransferInternal(($msg'queryId, $msg'amount, $self'owner, $self'owner, $msg'forwardTonAmount, $msg'forwardPayload, null())), $init'code, $init'data)); |
|
|
|
|
return (($self'balance, $self'owner, $self'master, $self'linker), ()); |
|
|
|
|
$send((true, $walletAddress, 0, 64, __gen_writecell_TokenTransferInternal(($msg'queryId, $msg'amount, $self'owner, $self'owner, $msg'forwardTonAmount, $msg'forwardPayload, null(), null())), $init'code, $init'data)); |
|
|
|
|
return (($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address), ()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
(((int, slice, slice, slice)), ()) $__gen_TONBWallet_receive_TokenTransferInternal((int, slice, slice, slice) $self, (int, int, slice, slice, int, slice, slice) $msg) impure { |
|
|
|
|
var ($self'balance, $self'owner, $self'master, $self'linker) = $self; |
|
|
|
|
var ($msg'queryId, $msg'amount, $msg'from, $msg'responseAddress, $msg'forwardTonAmount, $msg'forwardPayload, $msg'setLinker) = $msg; |
|
|
|
|
(((int, slice, slice, int, slice)), ()) $__gen_TONBWallet_receive_TokenTransferInternal((int, slice, slice, int, slice) $self, (int, int, slice, slice, int, slice, int, slice) $msg) impure { |
|
|
|
|
var ($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address) = $self; |
|
|
|
|
var ($msg'queryId, $msg'amount, $msg'from, $msg'responseAddress, $msg'forwardTonAmount, $msg'forwardPayload, $msg'setLinker, $msg'setLinkerAddress) = $msg; |
|
|
|
|
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get(); |
|
|
|
|
if (null?($self'linker)) { |
|
|
|
|
$self'linker = $msg'setLinker; |
|
|
|
|
$self'linker_address = $msg'setLinkerAddress; |
|
|
|
|
} |
|
|
|
|
if ((__tact_address_neq($ctx'sender, $self'master) & __tact_address_neq($ctx'sender, $self'linker))) { |
|
|
|
|
if ((__tact_address_neq($ctx'sender, $self'master) & __tact_address_neq($ctx'sender, $self'linker_address))) { |
|
|
|
|
var ($sinit'code, $sinit'data) = $__gen_TONBWallet_init_child(__tact_context_sys, $self'master, $msg'from); |
|
|
|
|
throw_unless(4429, __tact_address_eq($contractAddress(($sinit'code, $sinit'data)), $ctx'sender)); |
|
|
|
|
} |
|
|
|
@ -358,31 +363,31 @@ _ $__gen_get_get_wallet_data() method_id(97026) {
|
|
|
|
|
if (((~ null?($msg'responseAddress)) & ($msgValue > 0))) { |
|
|
|
|
$send((false, __tact_not_null($msg'responseAddress), $msgValue, 0, __gen_writecell_TokenExcesses(($msg'queryId)), null(), null())); |
|
|
|
|
} |
|
|
|
|
return (($self'balance, $self'owner, $self'master, $self'linker), ()); |
|
|
|
|
return (($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address), ()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
(((int, slice, slice, slice)), ()) $__gen_TONBWallet_receive_TokenBurn((int, slice, slice, slice) $self, (int, int, slice, slice) $msg) impure { |
|
|
|
|
var ($self'balance, $self'owner, $self'master, $self'linker) = $self; |
|
|
|
|
(((int, slice, slice, int, slice)), ()) $__gen_TONBWallet_receive_TokenBurn((int, slice, slice, int, slice) $self, (int, int, slice, slice) $msg) impure { |
|
|
|
|
var ($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address) = $self; |
|
|
|
|
var ($msg'queryId, $msg'amount, $msg'owner, $msg'responseAddress) = $msg; |
|
|
|
|
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get(); |
|
|
|
|
throw_unless(4429, ((__tact_address_eq($ctx'sender, $self'owner) | __tact_address_eq($ctx'sender, $self'master)) | __tact_address_eq($ctx'sender, $self'linker))); |
|
|
|
|
throw_unless(4429, ((__tact_address_eq($ctx'sender, $self'owner) | __tact_address_eq($ctx'sender, $self'master)) | __tact_address_eq($ctx'sender, $self'linker_address))); |
|
|
|
|
$self'balance = ($self'balance - $msg'amount); |
|
|
|
|
throw_unless(62972, ($self'balance >= 0)); |
|
|
|
|
int $fwdFee = $__gen_Context_readForwardFee(($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw)); |
|
|
|
|
throw_unless(16059, ($ctx'value > (($fwdFee + (2 * 10000000)) + 10000000))); |
|
|
|
|
throw_unless(16059, ($ctx'value > ((2 * 10000000) + 10000000))); |
|
|
|
|
$send((true, $self'master, 0, 64, __gen_writecell_TokenBurnNotification(($msg'queryId, $msg'amount, $self'owner, $self'owner)), null(), null())); |
|
|
|
|
return (($self'balance, $self'owner, $self'master, $self'linker), ()); |
|
|
|
|
return (($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address), ()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
((int, slice, slice, slice), ()) $__gen_TONBWallet_receive_bounced((int, slice, slice, slice) $self, slice $msg) impure { |
|
|
|
|
var ($self'balance, $self'owner, $self'master, $self'linker) = $self; |
|
|
|
|
((int, slice, slice, int, slice), ()) $__gen_TONBWallet_receive_bounced((int, slice, slice, int, slice) $self, slice $msg) impure { |
|
|
|
|
var ($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address) = $self; |
|
|
|
|
$msg~skip_bits(32); |
|
|
|
|
int $op = $msg~load_uint(32); |
|
|
|
|
int $queryId = $msg~load_uint(64); |
|
|
|
|
int $jettonAmount = $msg~load_coins(); |
|
|
|
|
throw_unless(13650, (($op == 395134233) | ($op == 2078119902))); |
|
|
|
|
$self'balance = ($self'balance + $jettonAmount); |
|
|
|
|
return (($self'balance, $self'owner, $self'master, $self'linker), ()); |
|
|
|
|
return (($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address), ()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -446,5 +451,5 @@ _ supported_interfaces() method_id {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_ get_abi_ipfs() { |
|
|
|
|
return "ipfs://QmWqpvx8PLAjtTJAa4RuwzEXeejSonT37BiA5HxjDFbLvM"; |
|
|
|
|
return "ipfs://QmNcnMjCZjwpaP9xLwcPNt8ziw2bt7pGUNu1PCVFvkfGtv"; |
|
|
|
|
} |