|
|
@ -1,3 +1,9 @@ |
|
|
|
|
|
|
|
slice __tact_str_to_slice(slice s) asm "NOP"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int __tact_my_balance() inline { |
|
|
|
|
|
|
|
return pair_first(get_balance()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
forall X -> X __tact_not_null(X x) { throw_if(128, null?(x)); return x; } |
|
|
|
forall X -> X __tact_not_null(X x) { throw_if(128, null?(x)); return x; } |
|
|
|
|
|
|
|
|
|
|
|
global (int, slice, int, slice) __tact_context; |
|
|
|
global (int, slice, int, slice) __tact_context; |
|
|
@ -65,6 +71,42 @@ slice __tact_compute_contract_address(int chain, cell code, cell data) inline { |
|
|
|
return __tact_create_address(chain, hash); |
|
|
|
return __tact_create_address(chain, hash); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(cell, ()) __tact_dict_set_int_int(cell d, int kl, int k, int v, int vl) inline { |
|
|
|
|
|
|
|
if (null?(v)) { |
|
|
|
|
|
|
|
var (r, ok) = idict_delete?(d, kl, k); |
|
|
|
|
|
|
|
return (r, ()); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return (idict_set_builder(d, kl, k, begin_cell().store_int(v, vl)), ()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int __tact_dict_get_int_int(cell d, int kl, int k, int vl) inline { |
|
|
|
|
|
|
|
var (r, ok) = idict_get?(d, kl, k); |
|
|
|
|
|
|
|
if (ok) { |
|
|
|
|
|
|
|
return r~load_int(vl); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return null(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(cell, ()) __tact_dict_set_int_slice(cell d, int kl, int k, slice v) inline { |
|
|
|
|
|
|
|
if (null?(v)) { |
|
|
|
|
|
|
|
var (r, ok) = idict_delete?(d, kl, k); |
|
|
|
|
|
|
|
return (r, ()); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return (idict_set(d, kl, k, v), ()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
slice __tact_dict_get_int_slice(cell d, int kl, int k) inline { |
|
|
|
|
|
|
|
var (r, ok) = idict_get?(d, kl, k); |
|
|
|
|
|
|
|
if (ok) { |
|
|
|
|
|
|
|
return r; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return null(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int __tact_address_eq(slice a, slice b) inline { |
|
|
|
int __tact_address_eq(slice a, slice b) inline { |
|
|
|
return equal_slice_bits(a, b); |
|
|
|
return equal_slice_bits(a, b); |
|
|
|
} |
|
|
|
} |
|
|
@ -248,6 +290,9 @@ _ __gen_Context_get_sender((int, slice, int, slice) v) inline { |
|
|
|
set_data(b.end_cell()); |
|
|
|
set_data(b.end_cell()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; String "Deposit" |
|
|
|
|
|
|
|
slice __gen_str_228592480() asm "B{b5ee9c7241010101000900000e4465706f7369749721d513} B>boc <s PUSHSLICE"; |
|
|
|
|
|
|
|
|
|
|
|
cell $emptyCell() impure { |
|
|
|
cell $emptyCell() impure { |
|
|
|
return end_cell(begin_cell()); |
|
|
|
return end_cell(begin_cell()); |
|
|
|
} |
|
|
|
} |
|
|
@ -309,6 +354,10 @@ slice $contractAddress((cell, cell) $s) impure { |
|
|
|
send_raw_message($c, $params'mode); |
|
|
|
send_raw_message($c, $params'mode); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(int, slice, int, int, cell, cell, cell) $stakingDepositMessage(int $value, slice $pool) impure { |
|
|
|
|
|
|
|
return (true, $pool, $value, 0, end_cell(store_slice(begin_cell(), __tact_str_to_slice(__gen_str_228592480()))), null(), null()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
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, $self'blacklisted, $self'linker, $self'linker_address)) = (null(), null(), null(), false, null(), null()); |
|
|
|
var (($self'balance, $self'owner, $self'master, $self'blacklisted, $self'linker, $self'linker_address)) = (null(), null(), null(), false, null(), null()); |
|
|
|
$self'balance = 0; |
|
|
|
$self'balance = 0; |
|
|
@ -433,12 +482,34 @@ _ $__gen_get_owner() method_id(83229) { |
|
|
|
return res; |
|
|
|
return res; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), ()) $__gen_TONB_sendStake((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self) impure { |
|
|
|
|
|
|
|
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self; |
|
|
|
|
|
|
|
if (null?($self'staking_pool)) { |
|
|
|
|
|
|
|
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
int $value = (__tact_my_balance() - 100000000); |
|
|
|
|
|
|
|
if (($value < 50000000)) { |
|
|
|
|
|
|
|
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$send($stakingDepositMessage($value, __tact_not_null($self'staking_pool))); |
|
|
|
|
|
|
|
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), ()) $__gen_TONB_requestWithdrawal((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, slice $address, int $value) impure { |
|
|
|
|
|
|
|
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self; |
|
|
|
|
|
|
|
$self'withdrawal_requests'addresses~__tact_dict_set_int_slice(257, $self'withdrawal_requests'n_requests, $address); |
|
|
|
|
|
|
|
$self'withdrawal_requests'amounts~__tact_dict_set_int_int(257, $self'withdrawal_requests'n_requests, $value, 257); |
|
|
|
|
|
|
|
$self'withdrawal_requests'n_requests = ($self'withdrawal_requests'n_requests + 1); |
|
|
|
|
|
|
|
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
(((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int))), ()) $__gen_TONB_receive_Deposit((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, (int) $msg) impure { |
|
|
|
(((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int))), ()) $__gen_TONB_receive_Deposit((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, (int) $msg) impure { |
|
|
|
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self; |
|
|
|
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self; |
|
|
|
var ($msg'amount) = $msg; |
|
|
|
var ($msg'amount) = $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(32366, ($ctx'value >= (((10000000 + $msg'amount) + 20000000) + 50000000))); |
|
|
|
throw_unless(32366, ($ctx'value >= (((10000000 + $msg'amount) + 20000000) + 50000000))); |
|
|
|
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_mint($ctx'sender, $msg'amount, $ctx'sender); |
|
|
|
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_mint($ctx'sender, $msg'amount, $ctx'sender); |
|
|
|
|
|
|
|
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_sendStake(); |
|
|
|
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ()); |
|
|
|
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -451,7 +522,7 @@ _ $__gen_get_owner() method_id(83229) { |
|
|
|
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self; |
|
|
|
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self; |
|
|
|
var ($msg'amount) = $msg; |
|
|
|
var ($msg'amount) = $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(6384, ($ctx'value >= 10000000)); |
|
|
|
throw_unless(6384, ($ctx'value >= 100000000)); |
|
|
|
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_burn($ctx'sender, $msg'amount, $ctx'sender); |
|
|
|
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_burn($ctx'sender, $msg'amount, $ctx'sender); |
|
|
|
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ()); |
|
|
|
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ()); |
|
|
|
} |
|
|
|
} |
|
|
@ -469,10 +540,30 @@ _ $__gen_get_owner() method_id(83229) { |
|
|
|
var ($msg'queryId, $msg'amount, $msg'owner, $msg'responseAddress) = $msg; |
|
|
|
var ($msg'queryId, $msg'amount, $msg'owner, $msg'responseAddress) = $msg; |
|
|
|
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_requireWallet($msg'owner); |
|
|
|
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_requireWallet($msg'owner); |
|
|
|
$self'totalSupply = ($self'totalSupply - $msg'amount); |
|
|
|
$self'totalSupply = ($self'totalSupply - $msg'amount); |
|
|
|
|
|
|
|
int $available = ((__tact_my_balance() - 100000000) - 100000000); |
|
|
|
|
|
|
|
if (($available < $msg'amount)) { |
|
|
|
|
|
|
|
int $diff = ($msg'amount - $available); |
|
|
|
|
|
|
|
$send((false, $msg'owner, (__tact_my_balance() - 100000000), 0, null(), null(), null())); |
|
|
|
|
|
|
|
cell $body = __gen_writecell_TokenTransferInternal((0, $diff, my_address(), my_address(), 0, $emptySlice(), null(), null())); |
|
|
|
|
|
|
|
slice $walletAddress = $__gen_TONB_get_wallet_address(($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), $msg'owner); |
|
|
|
|
|
|
|
$send((false, $walletAddress, 0, 64, $body, null(), null())); |
|
|
|
|
|
|
|
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_requestWithdrawal($msg'owner, $diff); |
|
|
|
|
|
|
|
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ()); |
|
|
|
|
|
|
|
} |
|
|
|
$send((false, $msg'owner, $msg'amount, 0, null(), null(), null())); |
|
|
|
$send((false, $msg'owner, $msg'amount, 0, null(), null(), null())); |
|
|
|
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ()); |
|
|
|
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), ()) $__gen_TONB_receive_comment_f7b1ab6077945b37370a1550574675180cf87df4cb047c869746812a83667d4c((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self) impure { |
|
|
|
|
|
|
|
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self; |
|
|
|
|
|
|
|
int $i = 0; |
|
|
|
|
|
|
|
while (($i < $self'withdrawal_requests'n_requests)) { |
|
|
|
|
|
|
|
$send((true, __tact_not_null(__tact_dict_get_int_slice($self'withdrawal_requests'addresses, 257, $i)), __tact_not_null(__tact_dict_get_int_int($self'withdrawal_requests'amounts, 257, $i, 257)), 0, null(), null(), null())); |
|
|
|
|
|
|
|
$i = ($i + 1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
() recv_internal(int msg_value, cell in_msg_cell, slice in_msg) impure { |
|
|
|
() recv_internal(int msg_value, cell in_msg_cell, slice in_msg) impure { |
|
|
|
|
|
|
|
|
|
|
@ -536,6 +627,19 @@ _ $__gen_get_owner() method_id(83229) { |
|
|
|
return (); |
|
|
|
return (); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Text Receivers |
|
|
|
|
|
|
|
if (op == 0) { |
|
|
|
|
|
|
|
var text_op = slice_hash(in_msg); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Receive "Withdraw completed" message |
|
|
|
|
|
|
|
if (text_op == 0xf7b1ab6077945b37370a1550574675180cf87df4cb047c869746812a83667d4c) { |
|
|
|
|
|
|
|
var self = __gen_load_TONB(); |
|
|
|
|
|
|
|
self~$__gen_TONB_receive_comment_f7b1ab6077945b37370a1550574675180cf87df4cb047c869746812a83667d4c(); |
|
|
|
|
|
|
|
__gen_store_TONB(self); |
|
|
|
|
|
|
|
return (); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
throw(130); |
|
|
|
throw(130); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -549,5 +653,5 @@ _ supported_interfaces() method_id { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_ get_abi_ipfs() { |
|
|
|
_ get_abi_ipfs() { |
|
|
|
return "ipfs://QmYVigftHMYXo1zGVnMx2hxo4jEsJqWmjJJq9AaWYe9gfp"; |
|
|
|
return "ipfs://QmUMBKY4L4n4GyTq3MSncGQ8X3nLYqomdtcYYcg1dzU2iS"; |
|
|
|
} |
|
|
|
} |