You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

698 lines
39 KiB

2 years ago
#pragma version =0.4.1;
#pragma allow-post-modification;
#pragma compute-asm-ltr;
2 years ago
slice __tact_str_to_slice(slice s) asm "NOP";
int __tact_my_balance() inline {
return pair_first(get_balance());
}
2 years ago
forall X -> X __tact_not_null(X x) inline { throw_if(128, null?(x)); return x; }
global (int, slice, int, slice) __tact_context;
global cell __tact_context_sys;
(int, slice, int, slice) __tact_context_get() inline { return __tact_context; }
() __tact_verify_address(slice address) inline {
throw_unless(136, address.slice_bits() != 267);
}
builder __tact_store_bool(builder b, int v) inline {
b = b.store_int(v, 1);
return b;
}
(slice, slice) __tact_load_address(slice cs) inline {
slice raw = cs~load_msg_addr();
__tact_verify_address(raw);
return (cs, raw);
}
(slice, slice) __tact_load_address_opt(slice cs) inline {
slice raw = cs~load_msg_addr();
if (raw.preload_uint(2) != 0) {
__tact_verify_address(raw);
return (cs, raw);
} else {
return (cs, null());
}
}
builder __tact_store_address(builder b, slice address) inline {
__tact_verify_address(address);
b = b.store_slice(address);
return b;
}
builder __tact_store_address_opt(builder b, slice address) inline {
if (null?(address)) {
b = b.store_uint(0, 2);
return b;
} else {
return __tact_store_address(b, address);
}
}
slice __tact_create_address(int chain, int hash) inline {
var b = begin_cell();
b = b.store_uint(2, 2);
b = b.store_uint(0, 1);
b = b.store_int(chain, 8);
b = b.store_uint(hash, 256);
return b.end_cell().begin_parse();
}
slice __tact_compute_contract_address(int chain, cell code, cell data) inline {
var b = begin_cell();
b = b.store_uint(0, 2);
b = b.store_uint(3, 2);
b = b.store_uint(0, 1);
b = b.store_ref(code);
b = b.store_ref(data);
var hash = cell_hash(b.end_cell());
return __tact_create_address(chain, hash);
}
2 years ago
(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 {
return equal_slice_bits(a, b);
}
cell __tact_dict_set_code(cell dict, int id, cell code) inline {
return udict_set_ref(dict, 16, id, code);
}
cell __tact_dict_get_code(cell dict, int id) inline {
var (data, ok) = udict_get_ref?(dict, 16, id);
throw_unless(135, ok);
return data;
}
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);
build_0 = __tact_store_address(build_0, v'from);
build_0 = __tact_store_address_opt(build_0, v'responseAddress);
build_0 = build_0.store_coins(v'forwardTonAmount);
build_0 = build_0.store_slice(v'forwardPayload);
2 years ago
var build_1 = begin_cell();
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);
2 years ago
build_0 = store_ref(build_0, build_1.end_cell());
return build_0;
}
cell __gen_writecell_TokenTransferInternal((int, int, slice, slice, int, slice, int, slice) v) inline_ref {
return __gen_write_TokenTransferInternal(begin_cell(), v).end_cell();
}
2 years ago
builder __gen_write_TokenBurn(builder build_0, (int, int, slice, slice) v) inline {
var (v'queryId, v'amount, v'owner, v'responseAddress) = v;
build_0 = store_uint(build_0, 1499400124, 32);
build_0 = build_0.store_uint(v'queryId, 64);
build_0 = build_0.store_coins(v'amount);
build_0 = __tact_store_address(build_0, v'owner);
build_0 = __tact_store_address_opt(build_0, v'responseAddress);
return build_0;
}
cell __gen_writecell_TokenBurn((int, int, slice, slice) v) inline_ref {
return __gen_write_TokenBurn(begin_cell(), v).end_cell();
}
2 years ago
(slice, ((int, int, slice, slice))) __gen_read_TokenBurnNotification(slice sc_0) inline {
throw_unless(129, sc_0~load_uint(32) == 2078119902);
var v'queryId = sc_0~load_uint(64);
var v'amount = sc_0~load_coins();
var v'owner = sc_0~__tact_load_address();
var v'responseAddress = sc_0~__tact_load_address_opt();
return (sc_0, (v'queryId, v'amount, v'owner, v'responseAddress));
}
2 years ago
(slice, ((cell))) __gen_read_TokenUpdateContent(slice sc_0) inline {
throw_unless(129, sc_0~load_uint(32) == 201882270);
var v'content = sc_0~load_int(1) ? sc_0~load_ref() : null();
return (sc_0, (v'content));
}
2 years ago
builder __gen_write_SetLinkerNeighbor(builder build_0, (slice) v) inline {
2 years ago
var (v'neighbor) = v;
build_0 = store_uint(build_0, 3019699393, 32);
build_0 = __tact_store_address_opt(build_0, v'neighbor);
return build_0;
}
cell __gen_writecell_SetLinkerNeighbor((slice) v) inline_ref {
return __gen_write_SetLinkerNeighbor(begin_cell(), v).end_cell();
}
2 years ago
builder __gen_write_BlacklistWallet(builder build_0, (slice) v) inline {
var (v'wallet) = v;
build_0 = store_uint(build_0, 43811734, 32);
build_0 = __tact_store_address(build_0, v'wallet);
return build_0;
}
cell __gen_writecell_BlacklistWallet((slice) v) inline_ref {
return __gen_write_BlacklistWallet(begin_cell(), v).end_cell();
}
(slice, ((slice))) __gen_read_BlacklistWallet(slice sc_0) inline {
throw_unless(129, sc_0~load_uint(32) == 43811734);
var v'wallet = sc_0~__tact_load_address();
return (sc_0, (v'wallet));
}
builder __gen_write_WithdrawalRequests(builder build_0, (cell, cell, int) v) inline {
var (v'addresses, v'amounts, v'n_requests) = v;
build_0 = build_0.store_dict(v'addresses);
build_0 = build_0.store_dict(v'amounts);
build_0 = build_0.store_int(v'n_requests, 257);
return build_0;
}
2 years ago
(slice, ((cell, cell, int))) __gen_read_WithdrawalRequests(slice sc_0) inline {
var v'addresses = sc_0~load_dict();
var v'amounts = sc_0~load_dict();
var v'n_requests = sc_0~load_int(257);
return (sc_0, (v'addresses, v'amounts, v'n_requests));
}
2 years ago
(slice, ((int))) __gen_read_Deposit(slice sc_0) inline {
throw_unless(129, sc_0~load_uint(32) == 569292295);
var v'amount = sc_0~load_coins();
return (sc_0, (v'amount));
}
2 years ago
(slice, ((int))) __gen_read_Withdraw(slice sc_0) inline {
throw_unless(129, sc_0~load_uint(32) == 1616450832);
var v'amount = sc_0~load_int(257);
return (sc_0, (v'amount));
}
2 years ago
builder __gen_write_TONBWallet(builder build_0, (int, slice, slice, int, int, slice) v) inline {
var (v'balance, v'owner, v'master, v'blacklisted, 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);
build_0 = build_0.store_int(v'blacklisted, 1);
2 years ago
var build_1 = begin_cell();
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);
2 years ago
build_0 = store_ref(build_0, build_1.end_cell());
return build_0;
}
2 years ago
builder __gen_write_Linker(builder build_0, (int, slice, slice, slice) v) inline {
2 years ago
var (v'index, v'master, v'owner, v'neighbor) = v;
build_0 = build_0.store_int(v'index, 257);
build_0 = __tact_store_address(build_0, v'master);
build_0 = __tact_store_address(build_0, v'owner);
var build_1 = begin_cell();
build_1 = __tact_store_address_opt(build_1, v'neighbor);
build_0 = store_ref(build_0, build_1.end_cell());
return build_0;
}
2 years ago
builder __gen_write_TONB(builder build_0, (int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) v) inline {
var (v'totalSupply, v'owner, v'content, v'mintable, v'first_linker, v'last_linker, v'n_linkers, v'staking_pool, (v'withdrawal_requests'addresses, v'withdrawal_requests'amounts, v'withdrawal_requests'n_requests)) = v;
build_0 = build_0.store_coins(v'totalSupply);
build_0 = __tact_store_address(build_0, v'owner);
build_0 = ~ null?(v'content) ? build_0.store_int(true, 1).store_ref(v'content) : build_0.store_int(false, 1);
build_0 = build_0.store_int(v'mintable, 1);
build_0 = __tact_store_address_opt(build_0, v'first_linker);
build_0 = __tact_store_address_opt(build_0, v'last_linker);
var build_1 = begin_cell();
build_1 = build_1.store_int(v'n_linkers, 257);
build_1 = __tact_store_address_opt(build_1, v'staking_pool);
build_1 = __gen_write_WithdrawalRequests(build_1, (v'withdrawal_requests'addresses, v'withdrawal_requests'amounts, v'withdrawal_requests'n_requests));
build_0 = store_ref(build_0, build_1.end_cell());
return build_0;
}
2 years ago
(slice, ((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)))) __gen_read_TONB(slice sc_0) inline {
var v'totalSupply = sc_0~load_coins();
var v'owner = sc_0~__tact_load_address();
var v'content = sc_0~load_int(1) ? sc_0~load_ref() : null();
var v'mintable = sc_0~load_int(1);
var v'first_linker = sc_0~__tact_load_address_opt();
var v'last_linker = sc_0~__tact_load_address_opt();
slice sc_1 = sc_0~load_ref().begin_parse();
var v'n_linkers = sc_1~load_int(257);
var v'staking_pool = sc_1~__tact_load_address_opt();
var v'withdrawal_requests = sc_1~__gen_read_WithdrawalRequests();
return (sc_0, (v'totalSupply, v'owner, v'content, v'mintable, v'first_linker, v'last_linker, v'n_linkers, v'staking_pool, v'withdrawal_requests));
}
_ __gen_StateInit_get_code((cell, cell) v) inline {
var (v'code, v'data) = v;
return v'code;
}
_ __gen_Context_get_sender((int, slice, int, slice) v) inline {
var (v'bounced, v'sender, v'value, v'raw) = v;
return v'sender;
}
2 years ago
(int, int, slice, cell, cell) __gen_JettonData_to_external(((int, int, slice, cell, cell)) v) inline {
var (v'totalSupply, v'mintable, v'owner, v'content, v'walletCode) = v;
return (v'totalSupply, v'mintable, v'owner, v'content, v'walletCode);
}
2 years ago
(int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) __gen_load_TONB() inline {
slice sc = get_data().begin_parse();
__tact_context_sys = sc~load_ref();
return sc~__gen_read_TONB();
}
2 years ago
() __gen_store_TONB((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) v) impure inline {
builder b = begin_cell();
b = b.store_ref(__tact_context_sys);
b = __gen_write_TONB(b, v);
set_data(b.end_cell());
}
2 years ago
;; String "Deposit"
slice __gen_str_228592480() asm "B{b5ee9c7241010101000900000e4465706f7369749721d513} B>boc <s PUSHSLICE";
2 years ago
cell $emptyCell() impure inline_ref {
return end_cell(begin_cell());
}
2 years ago
slice $__gen_Cell_asSlice(cell $self) impure inline_ref {
var ($self) = $self;
return begin_parse($self);
}
2 years ago
slice $emptySlice() impure inline_ref {
return $__gen_Cell_asSlice($emptyCell());
}
2 years ago
slice $contractAddress((cell, cell) $s) impure inline_ref {
var (($s'code, $s'data)) = $s;
return __tact_compute_contract_address(0, $s'code, $s'data);
}
2 years ago
() $send((int, slice, int, int, cell, cell, cell) $params) impure inline_ref {
var (($params'bounce, $params'to, $params'value, $params'mode, $params'body, $params'code, $params'data)) = $params;
builder $b = begin_cell();
$b = store_int($b, 1, 2);
$b = __tact_store_bool($b, $params'bounce);
$b = store_int($b, 0, 3);
$b = __tact_store_address($b, $params'to);
$b = store_coins($b, $params'value);
$b = store_int($b, 0, ((((1 + 4) + 4) + 64) + 32));
if (((~ null?($params'code)) | (~ null?($params'data)))) {
$b = __tact_store_bool($b, true);
builder $bc = begin_cell();
$bc = __tact_store_bool($bc, false);
$bc = __tact_store_bool($bc, false);
if ((~ null?($params'code))) {
$bc = __tact_store_bool($bc, true);
$bc = store_ref($bc, __tact_not_null($params'code));
} else {
$bc = __tact_store_bool($bc, false);
}
if ((~ null?($params'data))) {
$bc = __tact_store_bool($bc, true);
$bc = store_ref($bc, __tact_not_null($params'data));
} else {
$bc = __tact_store_bool($bc, false);
}
$bc = __tact_store_bool($bc, false);
$b = __tact_store_bool($b, true);
$b = store_ref($b, end_cell($bc));
} else {
$b = __tact_store_bool($b, false);
}
cell $body = $params'body;
if ((~ null?($body))) {
$b = __tact_store_bool($b, true);
$b = store_ref($b, __tact_not_null($body));
} else {
$b = __tact_store_bool($b, false);
}
cell $c = end_cell($b);
send_raw_message($c, $params'mode);
}
2 years ago
(int, slice, int, int, cell, cell, cell) $stakingDepositMessage(int $value, slice $pool) impure inline_ref {
2 years ago
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) {
var (($self'balance, $self'owner, $self'master, $self'blacklisted, $self'linker, $self'linker_address)) = (null(), null(), null(), false, 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'blacklisted, $self'linker, $self'linker_address));
return b'.end_cell();
}
(cell, cell) $__gen_TONBWallet_init_child(cell sys', slice $master, slice $owner) {
slice sc' = sys'.begin_parse();
cell source = sc'~load_dict();
cell contracts = new_dict();
;; Contract Code: TONBWallet
cell mine = __tact_dict_get_code(source, 24708);
contracts = __tact_dict_set_code(contracts, 24708, mine);
cell sys = begin_cell().store_dict(contracts).end_cell();
return (mine, $__gen_TONBWallet_init(sys, $master, $owner));
}
2 years ago
cell $__gen_Linker_init(cell sys', int $index, slice $owner, slice $master) {
var (($self'index, $self'master, $self'owner, $self'neighbor)) = (null(), null(), null(), null());
$self'index = $index;
$self'owner = $owner;
$self'master = $master;
var b' = begin_cell();
b' = b'.store_ref(sys');
b' = __gen_write_Linker(b', ($self'index, $self'master, $self'owner, $self'neighbor));
return b'.end_cell();
}
(cell, cell) $__gen_Linker_init_child(cell sys', int $index, slice $owner, slice $master) {
slice sc' = sys'.begin_parse();
cell source = sc'~load_dict();
cell contracts = new_dict();
;; Contract Code: Linker
cell mine = __tact_dict_get_code(source, 59979);
contracts = __tact_dict_set_code(contracts, 59979, mine);
cell sys = begin_cell().store_dict(contracts).end_cell();
return (mine, $__gen_Linker_init(sys, $index, $owner, $master));
}
2 years ago
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), (cell, cell)) $__gen_TONB_getJettonWalletInit((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, slice $address) impure inline_ref {
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;
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)), $__gen_TONBWallet_init_child(__tact_context_sys, my_address(), $address));
}
2 years ago
slice $__gen_TONB_get_wallet_address((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, slice $owner) impure inline_ref {
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 ($winit'code, $winit'data) = ($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_getJettonWalletInit($owner);
return $contractAddress(($winit'code, $winit'data));
}
_ $__gen_get_get_wallet_address(slice $$owner) method_id(103289) {
slice $owner = $$owner;
var self = __gen_load_TONB();
var res = $__gen_TONB_get_wallet_address(self, $owner);
return res;
}
2 years ago
(int, int, slice, cell, cell) $__gen_TONB_get_jetton_data((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self) impure inline_ref {
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;
cell $code = __gen_StateInit_get_code(($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_getJettonWalletInit(my_address()));
return ($self'totalSupply, $self'mintable, $self'owner, $self'content, $code);
}
_ $__gen_get_get_jetton_data() method_id(106029) {
var self = __gen_load_TONB();
var res = $__gen_TONB_get_jetton_data(self);
return __gen_JettonData_to_external(res);
}
2 years ago
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), ()) $__gen_TONB_mint((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, slice $to, int $amount, slice $responseAddress) impure inline_ref {
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'totalSupply = ($self'totalSupply + $amount);
var ($winit'code, $winit'data) = ($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_getJettonWalletInit($to);
slice $walletAddress = $contractAddress(($winit'code, $winit'data));
2 years ago
var ($linker_init'code, $linker_init'data) = $__gen_Linker_init_child(__tact_context_sys, $self'n_linkers, $walletAddress, my_address());
slice $linker_address = $contractAddress(($linker_init'code, $linker_init'data));
$send((false, $linker_address, 20000000, 0, __gen_writecell_SetLinkerNeighbor(($self'last_linker)), $linker_init'code, $linker_init'data));
$self'last_linker = $linker_address;
$self'n_linkers = ($self'n_linkers + 1);
cell $wallet_msg_body = __gen_writecell_TokenTransferInternal((0, $amount, my_address(), $responseAddress, 0, $emptySlice(), ($self'n_linkers - 1), $linker_address));
2 years ago
$send((false, $walletAddress, 65000000, 0, $wallet_msg_body, $winit'code, $winit'data));
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)), ());
}
2 years ago
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), ()) $__gen_TONB_burn((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, slice $from, int $amount, slice $responseAddress) impure inline_ref {
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 ($winit'code, $winit'data) = ($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_getJettonWalletInit($from);
slice $walletAddress = $contractAddress(($winit'code, $winit'data));
$send((false, $walletAddress, 0, 64, __gen_writecell_TokenBurn((0, $amount, $from, $responseAddress)), $winit'code, $winit'data));
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)), ());
}
2 years ago
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), ()) $__gen_TONB_requireWallet((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, slice $owner) impure inline_ref {
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 ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get();
var ($winit'code, $winit'data) = ($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_getJettonWalletInit($owner);
throw_unless(4429, __tact_address_eq($contractAddress(($winit'code, $winit'data)), $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)), ());
}
2 years ago
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), ()) $__gen_TONB_requireOwner((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self) impure inline_ref {
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;
throw_unless(132, __tact_address_eq(__gen_Context_get_sender(__tact_context_get()), $self'owner));
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)), ());
}
2 years ago
slice $__gen_TONB_owner((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self) impure inline_ref {
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;
return $self'owner;
}
_ $__gen_get_owner() method_id(83229) {
var self = __gen_load_TONB();
var res = $__gen_TONB_owner(self);
return res;
}
2 years ago
((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 inline_ref {
2 years ago
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)), ());
}
2 years ago
((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 inline_ref {
2 years ago
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)), ());
}
2 years ago
(((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 inline {
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 ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get();
2 years ago
throw_unless(32366, ($ctx'value >= (((10000000 + $msg'amount) + 20000000) + 65000000)));
($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);
2 years ago
($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)), ());
}
2 years ago
(((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int))), ()) $__gen_TONB_receive((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self) impure inline {
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;
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)), ());
}
2 years ago
(((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int))), ()) $__gen_TONB_receive_Withdraw((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, (int) $msg) impure inline {
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 ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get();
2 years ago
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);
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)), ());
}
2 years ago
(((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int))), ()) $__gen_TONB_receive_TokenUpdateContent((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, (cell) $msg) impure inline {
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'content) = $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_requireOwner();
$self'content = $msg'content;
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)), ());
}
2 years ago
(((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int))), ()) $__gen_TONB_receive_TokenBurnNotification((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, (int, int, slice, slice) $msg) impure inline {
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'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'totalSupply - $msg'amount);
2 years ago
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()));
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)), ());
}
2 years ago
(((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int))), ()) $__gen_TONB_receive_BlacklistWallet((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, (slice) $msg) impure inline {
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'wallet) = $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_requireOwner();
var ($winit'code, $winit'data) = ($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_getJettonWalletInit($msg'wallet);
slice $walletAddress = $contractAddress(($winit'code, $winit'data));
$send((false, $walletAddress, 0, 64, __gen_writecell_BlacklistWallet(($msg'wallet)), 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)), ());
}
((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 inline {
2 years ago
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);
}
2 years ago
($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests) = (null(), null(), 0);
2 years ago
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 {
;; Parse incoming message
int op = 0;
if (slice_bits(in_msg) >= 32) {
op = in_msg.preload_uint(32);
}
var cs = in_msg_cell.begin_parse();
var msg_flags = cs~load_uint(4);
var msg_bounced = ((msg_flags & 1) == 1 ? true : false);
slice msg_sender_addr = cs~load_msg_addr();
__tact_context = (msg_bounced, msg_sender_addr, msg_value, cs);
;; Handle bounced messages
if (msg_bounced) {
return ();
}
;; Receive Deposit message
if (op == 569292295) {
var self = __gen_load_TONB();
var msg = in_msg~__gen_read_Deposit();
self~$__gen_TONB_receive_Deposit(msg);
__gen_store_TONB(self);
return ();
}
;; Receive empty message
if ((op == 0) & (slice_bits(in_msg) <= 32)) {
var self = __gen_load_TONB();
self~$__gen_TONB_receive();
__gen_store_TONB(self);
return ();
}
;; Receive Withdraw message
if (op == 1616450832) {
var self = __gen_load_TONB();
var msg = in_msg~__gen_read_Withdraw();
self~$__gen_TONB_receive_Withdraw(msg);
__gen_store_TONB(self);
return ();
}
;; Receive TokenUpdateContent message
if (op == 201882270) {
var self = __gen_load_TONB();
var msg = in_msg~__gen_read_TokenUpdateContent();
self~$__gen_TONB_receive_TokenUpdateContent(msg);
__gen_store_TONB(self);
return ();
}
;; Receive TokenBurnNotification message
if (op == 2078119902) {
var self = __gen_load_TONB();
var msg = in_msg~__gen_read_TokenBurnNotification();
self~$__gen_TONB_receive_TokenBurnNotification(msg);
__gen_store_TONB(self);
return ();
}
2 years ago
;; Receive BlacklistWallet message
if (op == 43811734) {
var self = __gen_load_TONB();
var msg = in_msg~__gen_read_BlacklistWallet();
self~$__gen_TONB_receive_BlacklistWallet(msg);
__gen_store_TONB(self);
return ();
}
2 years ago
;; 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);
}
_ supported_interfaces() method_id {
return (
"org.ton.introspection.v0"H >> 128,
"org.ton.abi.ipfs.v0"H >> 128,
"org.ton.jetton.master"H >> 128,
"org.ton.ownable"H >> 128
);
}
_ get_abi_ipfs() {
return "ipfs://QmS8xdbR6Ba79t2bLFssxSLGyPcHmTcGF5v9qMFJyN2nrb";
}