|
|
@ -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)); |
|
|
|
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) v) inline_ref { |
|
|
|
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; |
|
|
|
var (v'queryId, v'amount, v'from, v'responseAddress, v'forwardTonAmount, v'forwardPayload, v'setLinker) = v; |
|
|
|
build_0 = store_uint(build_0, 395134233, 32); |
|
|
|
build_0 = store_uint(build_0, 395134233, 32); |
|
|
|
build_0 = build_0.store_uint(v'queryId, 64); |
|
|
|
build_0 = build_0.store_uint(v'queryId, 64); |
|
|
|
build_0 = build_0.store_coins(v'amount); |
|
|
|
build_0 = build_0.store_coins(v'amount); |
|
|
@ -108,14 +108,17 @@ builder __gen_write_TokenTransferInternal(builder build_0, (int, int, slice, sli |
|
|
|
build_0 = __tact_store_address_opt(build_0, v'responseAddress); |
|
|
|
build_0 = __tact_store_address_opt(build_0, v'responseAddress); |
|
|
|
build_0 = build_0.store_coins(v'forwardTonAmount); |
|
|
|
build_0 = build_0.store_coins(v'forwardTonAmount); |
|
|
|
build_0 = build_0.store_slice(v'forwardPayload); |
|
|
|
build_0 = build_0.store_slice(v'forwardPayload); |
|
|
|
|
|
|
|
var build_1 = begin_cell(); |
|
|
|
|
|
|
|
build_1 = __tact_store_address_opt(build_1, v'setLinker); |
|
|
|
|
|
|
|
build_0 = store_ref(build_0, build_1.end_cell()); |
|
|
|
return build_0; |
|
|
|
return build_0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
cell __gen_writecell_TokenTransferInternal((int, int, slice, slice, int, slice) v) inline_ref { |
|
|
|
cell __gen_writecell_TokenTransferInternal((int, int, slice, slice, int, slice, slice) v) inline_ref { |
|
|
|
return __gen_write_TokenTransferInternal(begin_cell(), v).end_cell(); |
|
|
|
return __gen_write_TokenTransferInternal(begin_cell(), v).end_cell(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
(slice, ((int, int, slice, slice, int, slice))) __gen_read_TokenTransferInternal(slice sc_0) inline_ref { |
|
|
|
(slice, ((int, int, slice, slice, int, slice, slice))) __gen_read_TokenTransferInternal(slice sc_0) inline_ref { |
|
|
|
throw_unless(129, sc_0~load_uint(32) == 395134233); |
|
|
|
throw_unless(129, sc_0~load_uint(32) == 395134233); |
|
|
|
var v'queryId = sc_0~load_uint(64); |
|
|
|
var v'queryId = sc_0~load_uint(64); |
|
|
|
var v'amount = sc_0~load_coins(); |
|
|
|
var v'amount = sc_0~load_coins(); |
|
|
@ -123,7 +126,9 @@ cell __gen_writecell_TokenTransferInternal((int, int, slice, slice, int, slice) |
|
|
|
var v'responseAddress = sc_0~__tact_load_address_opt(); |
|
|
|
var v'responseAddress = sc_0~__tact_load_address_opt(); |
|
|
|
var v'forwardTonAmount = sc_0~load_coins(); |
|
|
|
var v'forwardTonAmount = sc_0~load_coins(); |
|
|
|
var v'forwardPayload = sc_0; |
|
|
|
var v'forwardPayload = sc_0; |
|
|
|
return (sc_0, (v'queryId, v'amount, v'from, v'responseAddress, v'forwardTonAmount, v'forwardPayload)); |
|
|
|
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)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
builder __gen_write_TokenNotification(builder build_0, (int, int, slice, slice) v) inline_ref { |
|
|
|
builder __gen_write_TokenNotification(builder build_0, (int, int, slice, slice) v) inline_ref { |
|
|
@ -174,19 +179,24 @@ cell __gen_writecell_TokenExcesses((int) v) inline_ref { |
|
|
|
return __gen_write_TokenExcesses(begin_cell(), v).end_cell(); |
|
|
|
return __gen_write_TokenExcesses(begin_cell(), v).end_cell(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
builder __gen_write_TONBWallet(builder build_0, (int, slice, slice) v) inline_ref { |
|
|
|
builder __gen_write_TONBWallet(builder build_0, (int, slice, slice, slice) v) inline_ref { |
|
|
|
var (v'balance, v'owner, v'master) = v; |
|
|
|
var (v'balance, v'owner, v'master, v'linker) = v; |
|
|
|
build_0 = build_0.store_int(v'balance, 257); |
|
|
|
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'owner); |
|
|
|
build_0 = __tact_store_address(build_0, v'master); |
|
|
|
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_0 = store_ref(build_0, build_1.end_cell()); |
|
|
|
return build_0; |
|
|
|
return build_0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
(slice, ((int, slice, slice))) __gen_read_TONBWallet(slice sc_0) inline_ref { |
|
|
|
(slice, ((int, slice, slice, slice))) __gen_read_TONBWallet(slice sc_0) inline_ref { |
|
|
|
var v'balance = sc_0~load_int(257); |
|
|
|
var v'balance = sc_0~load_int(257); |
|
|
|
var v'owner = sc_0~__tact_load_address(); |
|
|
|
var v'owner = sc_0~__tact_load_address(); |
|
|
|
var v'master = sc_0~__tact_load_address(); |
|
|
|
var v'master = sc_0~__tact_load_address(); |
|
|
|
return (sc_0, (v'balance, v'owner, v'master)); |
|
|
|
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)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_ __gen_StateInit_get_code((cell, cell) v) inline { |
|
|
|
_ __gen_StateInit_get_code((cell, cell) v) inline { |
|
|
@ -199,13 +209,13 @@ _ __gen_StateInit_get_code((cell, cell) v) inline { |
|
|
|
return (v'balance, v'owner, v'master, v'walletCode); |
|
|
|
return (v'balance, v'owner, v'master, v'walletCode); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
(int, slice, slice) __gen_load_TONBWallet() inline_ref { |
|
|
|
(int, slice, slice, slice) __gen_load_TONBWallet() inline_ref { |
|
|
|
slice sc = get_data().begin_parse(); |
|
|
|
slice sc = get_data().begin_parse(); |
|
|
|
__tact_context_sys = sc~load_ref(); |
|
|
|
__tact_context_sys = sc~load_ref(); |
|
|
|
return sc~__gen_read_TONBWallet(); |
|
|
|
return sc~__gen_read_TONBWallet(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
() __gen_store_TONBWallet((int, slice, slice) v) impure inline_ref { |
|
|
|
() __gen_store_TONBWallet((int, slice, slice, slice) v) impure inline_ref { |
|
|
|
builder b = begin_cell(); |
|
|
|
builder b = begin_cell(); |
|
|
|
b = b.store_ref(__tact_context_sys); |
|
|
|
b = b.store_ref(__tact_context_sys); |
|
|
|
b = __gen_write_TONBWallet(b, v); |
|
|
|
b = __gen_write_TONBWallet(b, v); |
|
|
@ -271,13 +281,13 @@ int $__gen_Context_readForwardFee((int, slice, int, slice) $self) impure { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
cell $__gen_TONBWallet_init(cell sys', slice $master, slice $owner) { |
|
|
|
cell $__gen_TONBWallet_init(cell sys', slice $master, slice $owner) { |
|
|
|
var (($self'balance, $self'owner, $self'master)) = (null(), null(), null()); |
|
|
|
var (($self'balance, $self'owner, $self'master, $self'linker)) = (null(), null(), null(), null()); |
|
|
|
$self'balance = 0; |
|
|
|
$self'balance = 0; |
|
|
|
$self'owner = $owner; |
|
|
|
$self'owner = $owner; |
|
|
|
$self'master = $master; |
|
|
|
$self'master = $master; |
|
|
|
var b' = begin_cell(); |
|
|
|
var b' = begin_cell(); |
|
|
|
b' = b'.store_ref(sys'); |
|
|
|
b' = b'.store_ref(sys'); |
|
|
|
b' = __gen_write_TONBWallet(b', ($self'balance, $self'owner, $self'master)); |
|
|
|
b' = __gen_write_TONBWallet(b', ($self'balance, $self'owner, $self'master, $self'linker)); |
|
|
|
return b'.end_cell(); |
|
|
|
return b'.end_cell(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -293,8 +303,8 @@ cell $__gen_TONBWallet_init(cell sys', slice $master, slice $owner) { |
|
|
|
return (mine, $__gen_TONBWallet_init(sys, $master, $owner)); |
|
|
|
return (mine, $__gen_TONBWallet_init(sys, $master, $owner)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
(int, slice, slice, cell) $__gen_TONBWallet_get_wallet_data((int, slice, slice) $self) impure { |
|
|
|
(int, slice, slice, cell) $__gen_TONBWallet_get_wallet_data((int, slice, slice, slice) $self) impure { |
|
|
|
var (($self'balance, $self'owner, $self'master)) = $self; |
|
|
|
var (($self'balance, $self'owner, $self'master, $self'linker)) = $self; |
|
|
|
return ($self'balance, $self'owner, $self'master, __gen_StateInit_get_code($__gen_TONBWallet_init_child(__tact_context_sys, $self'master, $self'owner))); |
|
|
|
return ($self'balance, $self'owner, $self'master, __gen_StateInit_get_code($__gen_TONBWallet_init_child(__tact_context_sys, $self'master, $self'owner))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -304,8 +314,8 @@ _ $__gen_get_get_wallet_data() method_id(97026) { |
|
|
|
return __gen_JettonWalletData_to_external(res); |
|
|
|
return __gen_JettonWalletData_to_external(res); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
(((int, slice, slice)), ()) $__gen_TONBWallet_receive_TokenTransfer((int, slice, slice) $self, (int, int, slice, slice, cell, int, slice) $msg) impure { |
|
|
|
(((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; |
|
|
|
var ($self'balance, $self'owner, $self'master, $self'linker) = $self; |
|
|
|
var ($msg'queryId, $msg'amount, $msg'destination, $msg'responseDestination, $msg'customPayload, $msg'forwardTonAmount, $msg'forwardPayload) = $msg; |
|
|
|
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(); |
|
|
|
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get(); |
|
|
|
throw_unless(4429, __tact_address_eq($ctx'sender, $self'owner)); |
|
|
|
throw_unless(4429, __tact_address_eq($ctx'sender, $self'owner)); |
|
|
@ -319,15 +329,18 @@ _ $__gen_get_get_wallet_data() method_id(97026) { |
|
|
|
throw_unless(16059, ($ctx'value > ((($fwdCount * $fwdFee) + (2 * 10000000)) + 10000000))); |
|
|
|
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); |
|
|
|
var ($init'code, $init'data) = $__gen_TONBWallet_init_child(__tact_context_sys, $self'master, $msg'destination); |
|
|
|
slice $walletAddress = $contractAddress(($init'code, $init'data)); |
|
|
|
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)), $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), ()); |
|
|
|
return (($self'balance, $self'owner, $self'master, $self'linker), ()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
(((int, slice, slice)), ()) $__gen_TONBWallet_receive_TokenTransferInternal((int, slice, slice) $self, (int, int, slice, slice, int, slice) $msg) impure { |
|
|
|
(((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; |
|
|
|
var ($self'balance, $self'owner, $self'master, $self'linker) = $self; |
|
|
|
var ($msg'queryId, $msg'amount, $msg'from, $msg'responseAddress, $msg'forwardTonAmount, $msg'forwardPayload) = $msg; |
|
|
|
var ($msg'queryId, $msg'amount, $msg'from, $msg'responseAddress, $msg'forwardTonAmount, $msg'forwardPayload, $msg'setLinker) = $msg; |
|
|
|
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get(); |
|
|
|
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get(); |
|
|
|
if (__tact_address_neq($ctx'sender, $self'master)) { |
|
|
|
if (null?($self'linker)) { |
|
|
|
|
|
|
|
$self'linker = $msg'setLinker; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ((__tact_address_neq($ctx'sender, $self'master) & __tact_address_neq($ctx'sender, $self'linker))) { |
|
|
|
var ($sinit'code, $sinit'data) = $__gen_TONBWallet_init_child(__tact_context_sys, $self'master, $msg'from); |
|
|
|
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)); |
|
|
|
throw_unless(4429, __tact_address_eq($contractAddress(($sinit'code, $sinit'data)), $ctx'sender)); |
|
|
|
} |
|
|
|
} |
|
|
@ -345,31 +358,31 @@ _ $__gen_get_get_wallet_data() method_id(97026) { |
|
|
|
if (((~ null?($msg'responseAddress)) & ($msgValue > 0))) { |
|
|
|
if (((~ null?($msg'responseAddress)) & ($msgValue > 0))) { |
|
|
|
$send((false, __tact_not_null($msg'responseAddress), $msgValue, 0, __gen_writecell_TokenExcesses(($msg'queryId)), null(), null())); |
|
|
|
$send((false, __tact_not_null($msg'responseAddress), $msgValue, 0, __gen_writecell_TokenExcesses(($msg'queryId)), null(), null())); |
|
|
|
} |
|
|
|
} |
|
|
|
return (($self'balance, $self'owner, $self'master), ()); |
|
|
|
return (($self'balance, $self'owner, $self'master, $self'linker), ()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
(((int, slice, slice)), ()) $__gen_TONBWallet_receive_TokenBurn((int, slice, slice) $self, (int, int, slice, slice) $msg) impure { |
|
|
|
(((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; |
|
|
|
var ($self'balance, $self'owner, $self'master, $self'linker) = $self; |
|
|
|
var ($msg'queryId, $msg'amount, $msg'owner, $msg'responseAddress) = $msg; |
|
|
|
var ($msg'queryId, $msg'amount, $msg'owner, $msg'responseAddress) = $msg; |
|
|
|
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get(); |
|
|
|
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))); |
|
|
|
throw_unless(4429, ((__tact_address_eq($ctx'sender, $self'owner) | __tact_address_eq($ctx'sender, $self'master)) | __tact_address_eq($ctx'sender, $self'linker))); |
|
|
|
$self'balance = ($self'balance - $msg'amount); |
|
|
|
$self'balance = ($self'balance - $msg'amount); |
|
|
|
throw_unless(62972, ($self'balance >= 0)); |
|
|
|
throw_unless(62972, ($self'balance >= 0)); |
|
|
|
int $fwdFee = $__gen_Context_readForwardFee(($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw)); |
|
|
|
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 > (($fwdFee + (2 * 10000000)) + 10000000))); |
|
|
|
$send((true, $self'master, 0, 64, __gen_writecell_TokenBurnNotification(($msg'queryId, $msg'amount, $self'owner, $self'owner)), null(), null())); |
|
|
|
$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), ()); |
|
|
|
return (($self'balance, $self'owner, $self'master, $self'linker), ()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
((int, slice, slice), ()) $__gen_TONBWallet_receive_bounced((int, slice, slice) $self, slice $msg) impure { |
|
|
|
((int, slice, slice, slice), ()) $__gen_TONBWallet_receive_bounced((int, slice, slice, slice) $self, slice $msg) impure { |
|
|
|
var ($self'balance, $self'owner, $self'master) = $self; |
|
|
|
var ($self'balance, $self'owner, $self'master, $self'linker) = $self; |
|
|
|
$msg~skip_bits(32); |
|
|
|
$msg~skip_bits(32); |
|
|
|
int $op = $msg~load_uint(32); |
|
|
|
int $op = $msg~load_uint(32); |
|
|
|
int $queryId = $msg~load_uint(64); |
|
|
|
int $queryId = $msg~load_uint(64); |
|
|
|
int $jettonAmount = $msg~load_coins(); |
|
|
|
int $jettonAmount = $msg~load_coins(); |
|
|
|
throw_unless(13650, (($op == 395134233) | ($op == 2078119902))); |
|
|
|
throw_unless(13650, (($op == 395134233) | ($op == 2078119902))); |
|
|
|
$self'balance = ($self'balance + $jettonAmount); |
|
|
|
$self'balance = ($self'balance + $jettonAmount); |
|
|
|
return (($self'balance, $self'owner, $self'master), ()); |
|
|
|
return (($self'balance, $self'owner, $self'master, $self'linker), ()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -433,5 +446,5 @@ _ supported_interfaces() method_id { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_ get_abi_ipfs() { |
|
|
|
_ get_abi_ipfs() { |
|
|
|
return "ipfs://QmdeQibxp6Bp8gtTKCziJsCfzaEpbxC4zCEomnBb1nCyer"; |
|
|
|
return "ipfs://QmWqpvx8PLAjtTJAa4RuwzEXeejSonT37BiA5HxjDFbLvM"; |
|
|
|
} |
|
|
|
} |