Browse Source

Voting in the foundation

master
Lev 2 years ago
parent
commit
58e9d7c8e3
  1. 167
      sources/foundation.tact
  2. 4
      sources/jetton.tact
  3. 11
      sources/linker.tact
  4. 47
      sources/messages.tact
  5. 2
      sources/output/jetton_Linker.abi
  6. BIN
      sources/output/jetton_Linker.code.boc
  7. 76
      sources/output/jetton_Linker.code.fc
  8. 156
      sources/output/jetton_Linker.code.fif
  9. 245
      sources/output/jetton_Linker.code.rev.fif
  10. 40
      sources/output/jetton_Linker.md
  11. 2
      sources/output/jetton_Linker.pkg
  12. 441
      sources/output/jetton_Linker.ts
  13. 2
      sources/output/jetton_TONB.abi
  14. BIN
      sources/output/jetton_TONB.code.boc
  15. 132
      sources/output/jetton_TONB.code.fc
  16. 217
      sources/output/jetton_TONB.code.fif
  17. 622
      sources/output/jetton_TONB.code.rev.fif
  18. BIN
      sources/output/jetton_TONB.init.boc
  19. 17
      sources/output/jetton_TONB.init.fc
  20. 46
      sources/output/jetton_TONB.init.fif
  21. 48
      sources/output/jetton_TONB.init.rev.fif
  22. 40
      sources/output/jetton_TONB.md
  23. 2
      sources/output/jetton_TONB.pkg
  24. 438
      sources/output/jetton_TONB.ts
  25. 2
      sources/output/jetton_TONBWallet.abi
  26. BIN
      sources/output/jetton_TONBWallet.code.boc
  27. 76
      sources/output/jetton_TONBWallet.code.fc
  28. 147
      sources/output/jetton_TONBWallet.code.fif
  29. 377
      sources/output/jetton_TONBWallet.code.rev.fif
  30. BIN
      sources/output/jetton_TONBWallet.init.boc
  31. 9
      sources/output/jetton_TONBWallet.init.fc
  32. 11
      sources/output/jetton_TONBWallet.init.fif
  33. 11
      sources/output/jetton_TONBWallet.init.rev.fif
  34. 40
      sources/output/jetton_TONBWallet.md
  35. 2
      sources/output/jetton_TONBWallet.pkg
  36. 443
      sources/output/jetton_TONBWallet.ts
  37. 2
      sources/staking.tact
  38. 16
      sources/tests/__snapshots__/jetton.spec.ts.snap
  39. 28
      sources/wallet.tact

167
sources/foundation.tact

@ -1,22 +1,169 @@
import "./messages";
struct AddressList {
addresses: map[Int]Address;
length: Int;
struct Proposal {
type: Int; // 0 - Blacklist, 1 - Full liquidation, 2 - Change percents
data: Cell; // Address for blacklist, Distribution for percents
}
struct Vote {
id: Int;
votes: map[Int]Int; // -1 - no vote, 0 - abstain, 1 - yes, 2 - no
vote_end: Int;
proposal: Proposal;
quorum_percent: Int;
ended: Bool = false;
result: Bool?; // None - no result, True - passed, False - failed
}
fun get_message(prop: Proposal): Cell {
if (prop.type == 0) {
return BlacklistWallet {
wallet: prop.data.readAddress()
}.asCell();
}
}
contract Foundation {
admins: AddressList;
founders: AddressList;
percents: map[Address]Int;
vote_time: Int;
founders: AddressList; // aka superadmins
admins: Distribution/* Distribution is defined in messages.tact */;
tonb: Address;
votes: map[Int]Vote;
n_votes: Int;
init(admins: AddressList, founders: AddressList, percents: map[Address]Int, vote_time: Int, tonb: Address) {
init(admins: Distribution, founders: AddressList, tonb: Address) {
self.admins = admins;
self.founders = founders;
self.percents = percents;
self.vote_time = vote_time;
self.tonb = tonb;
}
receive(msg: FinishVote) {
require(msg.vote_id < self.n_votes, "Invalid vote id");
let vote: Vote = self.votes.get(msg.vote_id)!!;
require(vote.ended == false, "Vote already ended");
require(vote.vote_end < now(), "Vote is not finished yet");
let n_yes: Int = 0;
let n_no: Int = 0;
let n_abstain: Int = 0;
let i: Int = 0;
while (i < self.admins.addresses.length) {
let vote_: Int = vote.votes.get(i)!!;
if (vote_i == 1) {
n_yes = n_yes + 1;
} else if (vote_i == 2) {
n_no = n_no + 1;
} else if (vote_i == 0) {
n_abstain = n_abstain + 1;
}
i = i + 1;
}
let n_total: Int = n_yes + n_no + n_abstain;
let present: Int = n_total * 100 / self.admins.addresses.length;
if (present < vote.quorum_percent) {
vote.result = false;
} else if (n_yes > n_no) {
vote.result = true;
} else {
vote.result = false;
}
vote.ended = true;
self.votes.set(msg.vote_id, vote);
if (vote.result == true) {
let msg: Cell = get_message(vote.proposal);
send(SendParameters{
to: self.tonb,
value: 0,
mode: SendRemainingValue,
body: msg
});
}
}
receive(msg: Vote) {
require(msg.adminIndex < self.admins.addresses.length, "Invalid admin index")
let ctx: Context = context();
require(ctx.sender == self.admins.addresses.addresses.get(msg.adminIndex), "Only an admin can vote");
require(msg.vote_id < self.n_votes, "Invalid vote id");
let vote: Vote = self.votes.get(msg.vote_id)!!;
require(vote.ended == false, "Vote already ended");
require(vote.vote_end > now(), "Vote is finished");
require(msg.vote >= 0 && msg.vote <= 2, "Invalid vote");
vote.votes.set(msg.adminIndex, msg.vote);
self.votes.set(msg.vote_id, vote);
}
receive(msg: InitiateBlacklistVote) {
let ctx: Context = context();
require(ctx.sender == self.admins.addresses.addresses.get(msg.adminIndex), "Only an admin can initiate a vote");
require(ctx.value >= ton("1.0"), "Voting requires at least 1 ton for the fees")
require(msg.quorum_percent > 20 && msg.quorum_percent <= 100, "Invalid quorum percent");
require(msg.vote_time > 0 && msg.vote_time < 3 * 24 * 3600, "Invalid vote time");
let vote = Vote {
id: self.n_votes,
vote_end: now() + msg.vote_time,
proposal: Proposal {
type: 0,
data: msg.address
},
quorum_percent: msg.quorum_percent
};
let i: Int = 0;
while (i < self.admins.addresses.length) {
vote.votes.set(i, -1);
i = i + 1;
}
self.votes.set(self.n_votes, vote);
self.n_votes = self.n_votes + 1;
}
receive(msg: InitiateDistributionVote) {
let ctx: Context = context();
require(ctx.sender == self.admins.addresses.addresses.get(msg.adminIndex), "Only an admin can initiate a vote");
require(ctx.value >= ton("1.0"), "Voting requires at least 1 ton for the fees")
require(msg.quorum_percent > 20 && msg.quorum_percent <= 100, "Invalid quorum percent");
require(msg.vote_time > 0 && msg.vote_time < 3 * 24 * 3600, "Invalid vote time");
let vote = Vote {
id: self.n_votes,
vote_end: now() + msg.vote_time,
proposal: Proposal {
type: 2,
data: msg.distribution
},
quorum_percent: msg.quorum_percent
};
let i: Int = 0;
while (i < self.admins.addresses.length) {
vote.votes.set(i, -1);
i = i + 1;
}
self.votes.set(self.n_votes, vote);
self.n_votes = self.n_votes + 1;
}
receive(msg: InitiateFullLiquidationVote) {
let ctx: Context = context();
require(ctx.sender == self.admins.addresses.addresses.get(msg.adminIndex), "Only an admin can initiate a vote");
require(ctx.value >= ton("1.0"), "Voting requires at least 1 ton for the fees")
require(msg.quorum_percent > 85 && msg.quorum_percent <= 100, "Invalid quorum percent");
require(msg.vote_time > 0 && msg.vote_time < 3 * 24 * 3600, "Invalid vote time");
let vote = Vote {
id: self.n_votes,
vote_end: now() + msg.vote_time,
proposal: Proposal {
type: 1,
data: beginCell().endCell()
},
quorum_percent: msg.quorum_percent
};
let i: Int = 0;
while (i < self.admins.addresses.length) {
vote.votes.set(i, -1);
i = i + 1;
}
self.votes.set(self.n_votes, vote);
self.n_votes = self.n_votes + 1;
}
}

4
sources/jetton.tact

@ -26,6 +26,7 @@ contract TONB with TONBTrait {
last_linker: Address?;
n_linkers: Int = 0;
staking_pool: Address?;
withdrawal_requests: WithdrawalRequests;
init(owner: Address, content: Cell?) {
self.totalSupply = 0;
@ -36,8 +37,7 @@ contract TONB with TONBTrait {
receive(msg: Deposit) {
let ctx: Context = context();
require(ctx.value >= deposit_gas_consumption, "not enough money for deposit");
// require(ctx.value >= deposit_gas_consumption + msg.amount + linker_credit + wallet_credit, "not enough money for deposit");
require(ctx.value >= deposit_gas_consumption + msg.amount + linker_credit + wallet_credit, "not enough money for deposit");
self.mint(ctx.sender, msg.amount, ctx.sender);
}

11
sources/linker.tact

@ -21,6 +21,17 @@ contract Linker {
self.neighbor = msg.neighbor;
}
receive(msg: ForwardToWallet) {
let ctx: Context = context();
require(ctx.sender == self.master, "Invalid sender");
send(SendParameters{
to: self.owner,
value: 0,
mode: SendRemainingValue,
body: msg.body
});
}
get fun owner(): Address? {
return self.owner;
}

47
sources/messages.tact

@ -75,3 +75,50 @@ message InitLinker {
walletAddress: Address;
responseAddress: Address?;
}
message ForwardToWallet {
body: Cell;
}
message BlacklistWallet {
wallet: Address;
}
message InitiateBlacklistVote {
adminIndex: Int;
wallet: Address;
quorum_percent: Int;
vote_time: Int;
}
message InitiateLiquidationVote {
adminIndex: Int;
quorum_percent: Int;
vote_time: Int;
}
message FinishVote {
voteId: Int;
}
message Vote {
voteId: Int;
adminIndex: Int;
vote: Int; // 0 - abstain, 1 - yes, 2 - no
}
struct AddressList {
addresses: map[Int]Address;
length: Int;
}
struct Distribution {
addresses: AddressList;
percents: map[Address]Int;
}
message InitiateDistributionVote {
adminIndex: Int;
quorum_percent: Int;
vote_time: Int;
distribution: Distribution;
}

2
sources/output/jetton_Linker.abi

File diff suppressed because one or more lines are too long

BIN
sources/output/jetton_Linker.code.boc

Binary file not shown.

76
sources/output/jetton_Linker.code.fc

@ -1,3 +1,5 @@
forall X -> X __tact_not_null(X x) { throw_if(128, null?(x)); return x; }
global (int, slice, int, slice) __tact_context;
global cell __tact_context_sys;
@ -7,6 +9,11 @@ global cell __tact_context_sys;
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);
@ -48,6 +55,12 @@ int __tact_address_eq(slice a, slice b) inline {
return (sc_0, (v'neighbor));
}
(slice, ((cell))) __gen_read_ForwardToWallet(slice sc_0) inline_ref {
throw_unless(129, sc_0~load_uint(32) == 1562223291);
var v'body = sc_0~load_ref();
return (sc_0, (v'body));
}
builder __gen_write_Linker(builder build_0, (int, slice, slice, slice) v) inline_ref {
var (v'index, v'master, v'owner, v'neighbor) = v;
build_0 = build_0.store_int(v'index, 257);
@ -81,6 +94,49 @@ builder __gen_write_Linker(builder build_0, (int, slice, slice, slice) v) inline
set_data(b.end_cell());
}
() $send((int, slice, int, int, cell, cell, cell) $params) impure {
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);
}
slice $__gen_Linker_owner((int, slice, slice, slice) $self) impure {
var (($self'index, $self'master, $self'owner, $self'neighbor)) = $self;
return $self'owner;
@ -112,6 +168,15 @@ _ $__gen_get_master() method_id(120253) {
return (($self'index, $self'master, $self'owner, $self'neighbor), ());
}
(((int, slice, slice, slice)), ()) $__gen_Linker_receive_ForwardToWallet((int, slice, slice, slice) $self, (cell) $msg) impure {
var ($self'index, $self'master, $self'owner, $self'neighbor) = $self;
var ($msg'body) = $msg;
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get();
throw_unless(4429, __tact_address_eq($ctx'sender, $self'master));
$send((true, $self'owner, 0, 64, $msg'body, null(), null()));
return (($self'index, $self'master, $self'owner, $self'neighbor), ());
}
() recv_internal(int msg_value, cell in_msg_cell, slice in_msg) impure {
@ -140,6 +205,15 @@ _ $__gen_get_master() method_id(120253) {
return ();
}
;; Receive ForwardToWallet message
if (op == 1562223291) {
var self = __gen_load_Linker();
var msg = in_msg~__gen_read_ForwardToWallet();
self~$__gen_Linker_receive_ForwardToWallet(msg);
__gen_store_Linker(self);
return ();
}
throw(130);
}
@ -151,5 +225,5 @@ _ supported_interfaces() method_id {
}
_ get_abi_ipfs() {
return "ipfs://QmP8qFn4KBRoGwXGpZzK8E7torCEscLLo8Ror4EcyYkigW";
return "ipfs://Qmd4VoPiDkKcRnC2NE9UhqMyeg5rwYtt115YFSjLfcoLrb";
}

156
sources/output/jetton_Linker.code.fif

@ -1,26 +1,36 @@
PROGRAM{
DECLPROC __tact_not_null
DECLPROC __tact_context_get
DECLPROC __tact_verify_address
DECLPROC __tact_store_bool
DECLPROC __tact_load_address
DECLPROC __tact_load_address_opt
DECLPROC __tact_store_address
DECLPROC __tact_store_address_opt
DECLPROC __tact_address_eq
DECLPROC __gen_read_SetLinkerNeighbor
DECLPROC __gen_read_ForwardToWallet
DECLPROC __gen_write_Linker
DECLPROC __gen_read_Linker
DECLPROC __gen_load_Linker
DECLPROC __gen_store_Linker
DECLPROC $send
DECLPROC $__gen_Linker_owner
83229 DECLMETHOD $__gen_get_owner
DECLPROC $__gen_Linker_master
120253 DECLMETHOD $__gen_get_master
DECLPROC $__gen_Linker_receive_SetLinkerNeighbor
DECLPROC $__gen_Linker_receive_ForwardToWallet
DECLPROC recv_internal
113617 DECLMETHOD supported_interfaces
DECLPROC get_abi_ipfs
DECLGLOBVAR __tact_context
DECLGLOBVAR __tact_context_sys
__tact_not_null PROC:<{
DUP
ISNULL
128 THROWIF
}>
__tact_context_get PROCINLINE:<{
__tact_context GETGLOB
4 UNTUPLE
@ -31,6 +41,10 @@ PROGRAM{
NEQ
136 THROWIFNOT
}>
__tact_store_bool PROCINLINE:<{
SWAP
1 STI
}>
__tact_load_address PROCINLINE:<{
LDMSGADDR
SWAP
@ -73,6 +87,15 @@ PROGRAM{
129 THROWIFNOT
__tact_load_address_opt INLINECALLDICT
}>
__gen_read_ForwardToWallet PROCREF:<{
32 LDU
SWAP
1562223291 PUSHINT
EQUAL
129 THROWIFNOT
LDREF
SWAP
}>
__gen_write_Linker PROCREF:<{
s3 s4 XCHG2
257 PUSHINT
@ -122,6 +145,105 @@ PROGRAM{
ENDC
c4 POP
}>
$send PROC:<{
NEWC
1 PUSHINT
SWAP
2 STI
s0 s7 XCHG2
__tact_store_bool INLINECALLDICT
0 PUSHINT
SWAP
3 STI
s0 s5 XCHG2
__tact_store_address INLINECALLDICT
s0 s3 XCHG2
STGRAMS
0 PUSHINT
SWAP
105 STI
s3 PUSH
ISNULL
NOT
s5 PUSH
ISNULL
NOT
OR
IF:<{
TRUE
__tact_store_bool INLINECALLDICT
NEWC
FALSE
__tact_store_bool INLINECALLDICT
FALSE
__tact_store_bool INLINECALLDICT
s4 PUSH
ISNULL
NOT
IF:<{
TRUE
__tact_store_bool INLINECALLDICT
s0 s4 XCHG
__tact_not_null CALLDICT
s0 s4 XCHG2
STREF
}>ELSE<{
s4 POP
s0 s3 XCHG
FALSE
__tact_store_bool INLINECALLDICT
}>
s4 PUSH
ISNULL
NOT
IF:<{
TRUE
__tact_store_bool INLINECALLDICT
s0 s4 XCHG
__tact_not_null CALLDICT
s0 s4 XCHG2
STREF
}>ELSE<{
s4 POP
s0 s3 XCHG
FALSE
__tact_store_bool INLINECALLDICT
}>
FALSE
__tact_store_bool INLINECALLDICT
s0 s2 XCHG
TRUE
__tact_store_bool INLINECALLDICT
s0 s2 XCHG
ENDC
ROT
STREF
}>ELSE<{
s3 POP
s3 POP
SWAP
FALSE
__tact_store_bool INLINECALLDICT
}>
OVER
ISNULL
NOT
IF:<{
TRUE
__tact_store_bool INLINECALLDICT
SWAP
__tact_not_null CALLDICT
SWAP
STREF
}>ELSE<{
NIP
FALSE
__tact_store_bool INLINECALLDICT
}>
ENDC
SWAP
SENDRAWMSG
}>
$__gen_Linker_owner PROC:<{
s1 s3 XCHG
3 BLKDROP
@ -148,6 +270,24 @@ PROGRAM{
__tact_address_eq INLINECALLDICT
THROWANYIFNOT
}>
$__gen_Linker_receive_ForwardToWallet PROC:<{
__tact_context_get INLINECALLDICT
2DROP
4429 PUSHINT
s2 POP
s5 PUSH
__tact_address_eq INLINECALLDICT
THROWANYIFNOT
TRUE
SWAP
0 PUSHINT
64 PUSHINT
s5 PUSH
s0 s3 XCHG
PUSHNULL
PUSHNULL
$send CALLDICT
}>
recv_internal PROC:<{
0 PUSHINT
OVER
@ -180,9 +320,11 @@ PROGRAM{
IFJMP:<{
2DROP
}>
DUP
3019699393 PUSHINT
EQUAL
IFJMP:<{
DROP
__gen_load_Linker INLINECALLDICT
s0 s4 XCHG
__gen_read_SetLinkerNeighbor INLINECALLDICT
@ -192,6 +334,18 @@ PROGRAM{
$__gen_Linker_receive_SetLinkerNeighbor CALLDICT
__gen_store_Linker INLINECALLDICT
}>
1562223291 PUSHINT
EQUAL
IFJMP:<{
__gen_load_Linker INLINECALLDICT
s0 s4 XCHG
__gen_read_ForwardToWallet INLINECALLDICT
NIP
s3 s4 XCHG
s1 s3 s0 XCHG3
$__gen_Linker_receive_ForwardToWallet CALLDICT
__gen_store_Linker INLINECALLDICT
}>
DROP
130 THROW
}>
@ -200,6 +354,6 @@ PROGRAM{
209801025412363888721030803524359905849 PUSHINT
}>
get_abi_ipfs PROC:<{
x{697066733a2f2f516d503871466e344b42526f47775847705a7a4b384537746f72434573634c4c6f38526f7234456379596b696757} PUSHSLICE
x{697066733a2f2f516d6434566f5069446b4b63526e43324e45395568714d7965673572775974743131355946536a4c66636f4c7262} PUSHSLICE
}>
}END>c

245
sources/output/jetton_Linker.code.rev.fif

@ -36,9 +36,11 @@ SETCP0
2DROP
}> PUSHCONT
IFJMP
s0 PUSH
3019699393 PUSHINT
EQUAL
<{
s0 POP
<{
c4 PUSH
CTOS
@ -98,7 +100,97 @@ SETCP0
s1 POP
s3 s4 XCHG
s1 s3 s0 XCHG3
15 CALLDICT
19 CALLDICT
<{
NEWC
2 GETGLOBVAR
s0 s1 XCHG
STREF
4 1 BLKSWAP
<{
s3 s4 XCHG2
257 PUSHINT
STIX
s0 s1 XCHG
STSLICER
s0 s1 XCHG
STSLICER
NEWC
ROT
s0 PUSH
ISNULL
<{
s0 POP
0 PUSHINT
s0 s1 XCHG
2 STU
}> PUSHCONT
<{
STSLICER
}> PUSHCONT
IFELSE
ENDC
s0 s1 XCHG
STREF
}> CALLREF
ENDC
c4 POP
}> CALLREF
}> PUSHCONT
IFJMP
1562223291 PUSHINT
EQUAL
<{
<{
c4 PUSH
CTOS
LDREF
s0 s1 XCHG
2 SETGLOBVAR
<{
257 PUSHINT
LDI
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
LDREF
s0 s1 XCHG
CTOS
LDMSGADDR
s1 PUSH
2 PLDU
0 NEQINT
<{
s0 s1 XCHG
}> PUSHCONT
<{
s1 POP
PUSHNULL
}> PUSHCONT
IFELSE
s1 POP
s1 s4 XCHG
s3 s3 s0 XCHG3
}> CALLREF
1 4 BLKDROP2
}> CALLREF
s0 s4 XCHG
<{
32 LDU
s0 s1 XCHG
1562223291 PUSHINT
EQUAL
129 THROWIFNOT
LDREF
s0 s1 XCHG
}> CALLREF
s1 POP
s3 s4 XCHG
s1 s3 s0 XCHG3
20 CALLDICT
<{
NEWC
2 GETGLOBVAR
@ -139,15 +231,137 @@ SETCP0
s0 POP
130 THROW
13:
1:
s0 PUSH
ISNULL
128 THROWIF
16:
NEWC
1 PUSHINT
s0 s1 XCHG
2 STI
s0 s7 XCHG2
s0 s1 XCHG
1 STI
0 PUSHINT
s0 s1 XCHG
3 STI
s0 s5 XCHG2
STSLICER
s0 s3 XCHG2
STGRAMS
0 PUSHINT
s0 s1 XCHG
105 STI
s3 PUSH
ISNULL
NOT
s5 PUSH
ISNULL
NOT
OR
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
NEWC
0 PUSHINT
s0 s1 XCHG
1 STI
0 PUSHINT
s0 s1 XCHG
1 STI
s4 PUSH
ISNULL
NOT
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
s0 s4 XCHG
1 CALLDICT
s0 s4 XCHG2
STREF
}> PUSHCONT
<{
s4 POP
s0 s3 XCHG
0 PUSHINT
s0 s1 XCHG
1 STI
}> PUSHCONT
IFELSE
s4 PUSH
ISNULL
NOT
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
s0 s4 XCHG
1 CALLDICT
s0 s4 XCHG2
STREF
}> PUSHCONT
<{
s4 POP
s0 s3 XCHG
0 PUSHINT
s0 s1 XCHG
1 STI
}> PUSHCONT
IFELSE
0 PUSHINT
s0 s1 XCHG
1 STI
s0 s2 XCHG
-1 PUSHINT
s0 s1 XCHG
1 STI
s0 s2 XCHG
ENDC
ROT
STREF
}> PUSHCONT
<{
s3 POP
s3 POP
s0 s1 XCHG
0 PUSHINT
s0 s1 XCHG
1 STI
}> PUSHCONT
IFELSE
s1 PUSH
ISNULL
NOT
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
s0 s1 XCHG
1 CALLDICT
s0 s1 XCHG
STREF
}> IFREFELSEREF
ENDC
s0 s1 XCHG
SENDRAWMSG
s1 POP
0 PUSHINT
s0 s1 XCHG
1 STI
17:
s1 s3 XCHG
3 BLKDROP
14:
18:
s2 s3 XCHG
3 BLKDROP
15:
19:
s1 POP
1 GETGLOBVAR
4 UNTUPLE
@ -158,6 +372,25 @@ SETCP0
SDEQ
THROWANYIFNOT
20:
1 GETGLOBVAR
4 UNTUPLE
2DROP
4429 PUSHINT
s2 POP
s5 PUSH
SDEQ
THROWANYIFNOT
-1 PUSHINT
s0 s1 XCHG
0 PUSHINT
64 PUSHINT
s5 PUSH
s0 s3 XCHG
PUSHNULL
PUSHNULL
16 CALLDICT
owner:
<{
c4 PUSH
@ -195,7 +428,7 @@ SETCP0
}> CALLREF
1 4 BLKDROP2
}> CALLREF
13 CALLDICT
17 CALLDICT
113617:
123515602279859691144772641439386770278 PUSHINT
@ -238,7 +471,7 @@ SETCP0
}> CALLREF
1 4 BLKDROP2
}> CALLREF
14 CALLDICT
18 CALLDICT
) 19 DICTPUSHCONST
DICTIGETJMPZ
11 THROWARG

40
sources/output/jetton_Linker.md

@ -1,9 +1,9 @@
# TACT Compilation Report
Contract: Linker
BOC Size: 348 bytes
BOC Size: 594 bytes
# Types
Total Types: 18
Total Types: 27
## StateInit
TLB: `_ code:^cell data:^cell = StateInit`
@ -61,6 +61,42 @@ Signature: `SetLinkerNeighbor{neighbor:Maybe address}`
TLB: `init_linker#67c08154 neighbor:Maybe address walletAmount:int257 walletCode:^cell walletData:^cell walletAddress:address responseAddress:Maybe address = InitLinker`
Signature: `InitLinker{neighbor:Maybe address,walletAmount:int257,walletCode:^cell,walletData:^cell,walletAddress:address,responseAddress:Maybe address}`
## ForwardToWallet
TLB: `forward_to_wallet#5d1da2bb body:^cell = ForwardToWallet`
Signature: `ForwardToWallet{body:^cell}`
## BlacklistWallet
TLB: `blacklist_wallet#029c8396 wallet:address = BlacklistWallet`
Signature: `BlacklistWallet{wallet:address}`
## InitiateBlacklistVote
TLB: `initiate_blacklist_vote#e8fffb0b adminIndex:int257 wallet:address quorum_percent:int257 vote_time:int257 = InitiateBlacklistVote`
Signature: `InitiateBlacklistVote{adminIndex:int257,wallet:address,quorum_percent:int257,vote_time:int257}`
## InitiateLiquidationVote
TLB: `initiate_liquidation_vote#11fb862f adminIndex:int257 quorum_percent:int257 vote_time:int257 = InitiateLiquidationVote`
Signature: `InitiateLiquidationVote{adminIndex:int257,quorum_percent:int257,vote_time:int257}`
## FinishVote
TLB: `finish_vote#2a574443 voteId:int257 = FinishVote`
Signature: `FinishVote{voteId:int257}`
## Vote
TLB: `vote#b670f4ce voteId:int257 adminIndex:int257 vote:int257 = Vote`
Signature: `Vote{voteId:int257,adminIndex:int257,vote:int257}`
## AddressList
TLB: `_ addresses:dict<int, address> length:int257 = AddressList`
Signature: `AddressList{addresses:dict<int, address>,length:int257}`
## Distribution
TLB: `_ addresses:AddressList{addresses:dict<int, address>,length:int257} percents:dict<address, int> = Distribution`
Signature: `Distribution{addresses:AddressList{addresses:dict<int, address>,length:int257},percents:dict<address, int>}`
## InitiateDistributionVote
TLB: `initiate_distribution_vote#1078d0b5 adminIndex:int257 quorum_percent:int257 vote_time:int257 distribution:Distribution{addresses:AddressList{addresses:dict<int, address>,length:int257},percents:dict<address, int>} = InitiateDistributionVote`
Signature: `InitiateDistributionVote{adminIndex:int257,quorum_percent:int257,vote_time:int257,distribution:Distribution{addresses:AddressList{addresses:dict<int, address>,length:int257},percents:dict<address, int>}}`
## WithdrawalRequests
TLB: `_ addresses:dict<int, address> amounts:dict<int, int> n_requests:int257 = WithdrawalRequests`
Signature: `WithdrawalRequests{addresses:dict<int, address>,amounts:dict<int, int>,n_requests:int257}`

2
sources/output/jetton_Linker.pkg

File diff suppressed because one or more lines are too long

441
sources/output/jetton_Linker.ts

@ -791,6 +791,437 @@ function dictValueParserInitLinker(): DictionaryValue<InitLinker> {
}
}
}
export type ForwardToWallet = {
$$type: 'ForwardToWallet';
body: Cell;
}
export function storeForwardToWallet(src: ForwardToWallet) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(1562223291, 32);
b_0.storeRef(src.body);
};
}
export function loadForwardToWallet(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 1562223291) { throw Error('Invalid prefix'); }
let _body = sc_0.loadRef();
return { $$type: 'ForwardToWallet' as const, body: _body };
}
function loadTupleForwardToWallet(source: TupleReader) {
let _body = source.readCell();
return { $$type: 'ForwardToWallet' as const, body: _body };
}
function storeTupleForwardToWallet(source: ForwardToWallet) {
let builder = new TupleBuilder();
builder.writeCell(source.body);
return builder.build();
}
function dictValueParserForwardToWallet(): DictionaryValue<ForwardToWallet> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeForwardToWallet(src)).endCell());
},
parse: (src) => {
return loadForwardToWallet(src.loadRef().beginParse());
}
}
}
export type BlacklistWallet = {
$$type: 'BlacklistWallet';
wallet: Address;
}
export function storeBlacklistWallet(src: BlacklistWallet) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(43811734, 32);
b_0.storeAddress(src.wallet);
};
}
export function loadBlacklistWallet(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 43811734) { throw Error('Invalid prefix'); }
let _wallet = sc_0.loadAddress();
return { $$type: 'BlacklistWallet' as const, wallet: _wallet };
}
function loadTupleBlacklistWallet(source: TupleReader) {
let _wallet = source.readAddress();
return { $$type: 'BlacklistWallet' as const, wallet: _wallet };
}
function storeTupleBlacklistWallet(source: BlacklistWallet) {
let builder = new TupleBuilder();
builder.writeAddress(source.wallet);
return builder.build();
}
function dictValueParserBlacklistWallet(): DictionaryValue<BlacklistWallet> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeBlacklistWallet(src)).endCell());
},
parse: (src) => {
return loadBlacklistWallet(src.loadRef().beginParse());
}
}
}
export type InitiateBlacklistVote = {
$$type: 'InitiateBlacklistVote';
adminIndex: bigint;
wallet: Address;
quorum_percent: bigint;
vote_time: bigint;
}
export function storeInitiateBlacklistVote(src: InitiateBlacklistVote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(3909090059, 32);
b_0.storeInt(src.adminIndex, 257);
b_0.storeAddress(src.wallet);
b_0.storeInt(src.quorum_percent, 257);
let b_1 = new Builder();
b_1.storeInt(src.vote_time, 257);
b_0.storeRef(b_1.endCell());
};
}
export function loadInitiateBlacklistVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 3909090059) { throw Error('Invalid prefix'); }
let _adminIndex = sc_0.loadIntBig(257);
let _wallet = sc_0.loadAddress();
let _quorum_percent = sc_0.loadIntBig(257);
let sc_1 = sc_0.loadRef().beginParse();
let _vote_time = sc_1.loadIntBig(257);
return { $$type: 'InitiateBlacklistVote' as const, adminIndex: _adminIndex, wallet: _wallet, quorum_percent: _quorum_percent, vote_time: _vote_time };
}
function loadTupleInitiateBlacklistVote(source: TupleReader) {
let _adminIndex = source.readBigNumber();
let _wallet = source.readAddress();
let _quorum_percent = source.readBigNumber();
let _vote_time = source.readBigNumber();
return { $$type: 'InitiateBlacklistVote' as const, adminIndex: _adminIndex, wallet: _wallet, quorum_percent: _quorum_percent, vote_time: _vote_time };
}
function storeTupleInitiateBlacklistVote(source: InitiateBlacklistVote) {
let builder = new TupleBuilder();
builder.writeNumber(source.adminIndex);
builder.writeAddress(source.wallet);
builder.writeNumber(source.quorum_percent);
builder.writeNumber(source.vote_time);
return builder.build();
}
function dictValueParserInitiateBlacklistVote(): DictionaryValue<InitiateBlacklistVote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeInitiateBlacklistVote(src)).endCell());
},
parse: (src) => {
return loadInitiateBlacklistVote(src.loadRef().beginParse());
}
}
}
export type InitiateLiquidationVote = {
$$type: 'InitiateLiquidationVote';
adminIndex: bigint;
quorum_percent: bigint;
vote_time: bigint;
}
export function storeInitiateLiquidationVote(src: InitiateLiquidationVote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(301696559, 32);
b_0.storeInt(src.adminIndex, 257);
b_0.storeInt(src.quorum_percent, 257);
b_0.storeInt(src.vote_time, 257);
};
}
export function loadInitiateLiquidationVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 301696559) { throw Error('Invalid prefix'); }
let _adminIndex = sc_0.loadIntBig(257);
let _quorum_percent = sc_0.loadIntBig(257);
let _vote_time = sc_0.loadIntBig(257);
return { $$type: 'InitiateLiquidationVote' as const, adminIndex: _adminIndex, quorum_percent: _quorum_percent, vote_time: _vote_time };
}
function loadTupleInitiateLiquidationVote(source: TupleReader) {
let _adminIndex = source.readBigNumber();
let _quorum_percent = source.readBigNumber();
let _vote_time = source.readBigNumber();
return { $$type: 'InitiateLiquidationVote' as const, adminIndex: _adminIndex, quorum_percent: _quorum_percent, vote_time: _vote_time };
}
function storeTupleInitiateLiquidationVote(source: InitiateLiquidationVote) {
let builder = new TupleBuilder();
builder.writeNumber(source.adminIndex);
builder.writeNumber(source.quorum_percent);
builder.writeNumber(source.vote_time);
return builder.build();
}
function dictValueParserInitiateLiquidationVote(): DictionaryValue<InitiateLiquidationVote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeInitiateLiquidationVote(src)).endCell());
},
parse: (src) => {
return loadInitiateLiquidationVote(src.loadRef().beginParse());
}
}
}
export type FinishVote = {
$$type: 'FinishVote';
voteId: bigint;
}
export function storeFinishVote(src: FinishVote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(710362179, 32);
b_0.storeInt(src.voteId, 257);
};
}
export function loadFinishVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 710362179) { throw Error('Invalid prefix'); }
let _voteId = sc_0.loadIntBig(257);
return { $$type: 'FinishVote' as const, voteId: _voteId };
}
function loadTupleFinishVote(source: TupleReader) {
let _voteId = source.readBigNumber();
return { $$type: 'FinishVote' as const, voteId: _voteId };
}
function storeTupleFinishVote(source: FinishVote) {
let builder = new TupleBuilder();
builder.writeNumber(source.voteId);
return builder.build();
}
function dictValueParserFinishVote(): DictionaryValue<FinishVote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeFinishVote(src)).endCell());
},
parse: (src) => {
return loadFinishVote(src.loadRef().beginParse());
}
}
}
export type Vote = {
$$type: 'Vote';
voteId: bigint;
adminIndex: bigint;
vote: bigint;
}
export function storeVote(src: Vote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(3060856014, 32);
b_0.storeInt(src.voteId, 257);
b_0.storeInt(src.adminIndex, 257);
b_0.storeInt(src.vote, 257);
};
}
export function loadVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 3060856014) { throw Error('Invalid prefix'); }
let _voteId = sc_0.loadIntBig(257);
let _adminIndex = sc_0.loadIntBig(257);
let _vote = sc_0.loadIntBig(257);
return { $$type: 'Vote' as const, voteId: _voteId, adminIndex: _adminIndex, vote: _vote };
}
function loadTupleVote(source: TupleReader) {
let _voteId = source.readBigNumber();
let _adminIndex = source.readBigNumber();
let _vote = source.readBigNumber();
return { $$type: 'Vote' as const, voteId: _voteId, adminIndex: _adminIndex, vote: _vote };
}
function storeTupleVote(source: Vote) {
let builder = new TupleBuilder();
builder.writeNumber(source.voteId);
builder.writeNumber(source.adminIndex);
builder.writeNumber(source.vote);
return builder.build();
}
function dictValueParserVote(): DictionaryValue<Vote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeVote(src)).endCell());
},
parse: (src) => {
return loadVote(src.loadRef().beginParse());
}
}
}
export type AddressList = {
$$type: 'AddressList';
addresses: Dictionary<bigint, Address>;
length: bigint;
}
export function storeAddressList(src: AddressList) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeDict(src.addresses, Dictionary.Keys.BigInt(257), Dictionary.Values.Address());
b_0.storeInt(src.length, 257);
};
}
export function loadAddressList(slice: Slice) {
let sc_0 = slice;
let _addresses = Dictionary.load(Dictionary.Keys.BigInt(257), Dictionary.Values.Address(), sc_0);
let _length = sc_0.loadIntBig(257);
return { $$type: 'AddressList' as const, addresses: _addresses, length: _length };
}
function loadTupleAddressList(source: TupleReader) {
let _addresses = Dictionary.loadDirect(Dictionary.Keys.BigInt(257), Dictionary.Values.Address(), source.readCellOpt());
let _length = source.readBigNumber();
return { $$type: 'AddressList' as const, addresses: _addresses, length: _length };
}
function storeTupleAddressList(source: AddressList) {
let builder = new TupleBuilder();
builder.writeCell(source.addresses.size > 0 ? beginCell().storeDictDirect(source.addresses, Dictionary.Keys.BigInt(257), Dictionary.Values.Address()).endCell() : null);
builder.writeNumber(source.length);
return builder.build();
}
function dictValueParserAddressList(): DictionaryValue<AddressList> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeAddressList(src)).endCell());
},
parse: (src) => {
return loadAddressList(src.loadRef().beginParse());
}
}
}
export type Distribution = {
$$type: 'Distribution';
addresses: AddressList;
percents: Dictionary<Address, bigint>;
}
export function storeDistribution(src: Distribution) {
return (builder: Builder) => {
let b_0 = builder;
b_0.store(storeAddressList(src.addresses));
b_0.storeDict(src.percents, Dictionary.Keys.Address(), Dictionary.Values.BigInt(257));
};
}
export function loadDistribution(slice: Slice) {
let sc_0 = slice;
let _addresses = loadAddressList(sc_0);
let _percents = Dictionary.load(Dictionary.Keys.Address(), Dictionary.Values.BigInt(257), sc_0);
return { $$type: 'Distribution' as const, addresses: _addresses, percents: _percents };
}
function loadTupleDistribution(source: TupleReader) {
const _addresses = loadTupleAddressList(source.readTuple());
let _percents = Dictionary.loadDirect(Dictionary.Keys.Address(), Dictionary.Values.BigInt(257), source.readCellOpt());
return { $$type: 'Distribution' as const, addresses: _addresses, percents: _percents };
}
function storeTupleDistribution(source: Distribution) {
let builder = new TupleBuilder();
builder.writeTuple(storeTupleAddressList(source.addresses));
builder.writeCell(source.percents.size > 0 ? beginCell().storeDictDirect(source.percents, Dictionary.Keys.Address(), Dictionary.Values.BigInt(257)).endCell() : null);
return builder.build();
}
function dictValueParserDistribution(): DictionaryValue<Distribution> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeDistribution(src)).endCell());
},
parse: (src) => {
return loadDistribution(src.loadRef().beginParse());
}
}
}
export type InitiateDistributionVote = {
$$type: 'InitiateDistributionVote';
adminIndex: bigint;
quorum_percent: bigint;
vote_time: bigint;
distribution: Distribution;
}
export function storeInitiateDistributionVote(src: InitiateDistributionVote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(276353205, 32);
b_0.storeInt(src.adminIndex, 257);
b_0.storeInt(src.quorum_percent, 257);
b_0.storeInt(src.vote_time, 257);
let b_1 = new Builder();
b_1.store(storeDistribution(src.distribution));
b_0.storeRef(b_1.endCell());
};
}
export function loadInitiateDistributionVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 276353205) { throw Error('Invalid prefix'); }
let _adminIndex = sc_0.loadIntBig(257);
let _quorum_percent = sc_0.loadIntBig(257);
let _vote_time = sc_0.loadIntBig(257);
let sc_1 = sc_0.loadRef().beginParse();
let _distribution = loadDistribution(sc_1);
return { $$type: 'InitiateDistributionVote' as const, adminIndex: _adminIndex, quorum_percent: _quorum_percent, vote_time: _vote_time, distribution: _distribution };
}
function loadTupleInitiateDistributionVote(source: TupleReader) {
let _adminIndex = source.readBigNumber();
let _quorum_percent = source.readBigNumber();
let _vote_time = source.readBigNumber();
const _distribution = loadTupleDistribution(source.readTuple());
return { $$type: 'InitiateDistributionVote' as const, adminIndex: _adminIndex, quorum_percent: _quorum_percent, vote_time: _vote_time, distribution: _distribution };
}
function storeTupleInitiateDistributionVote(source: InitiateDistributionVote) {
let builder = new TupleBuilder();
builder.writeNumber(source.adminIndex);
builder.writeNumber(source.quorum_percent);
builder.writeNumber(source.vote_time);
builder.writeTuple(storeTupleDistribution(source.distribution));
return builder.build();
}
function dictValueParserInitiateDistributionVote(): DictionaryValue<InitiateDistributionVote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeInitiateDistributionVote(src)).endCell());
},
parse: (src) => {
return loadInitiateDistributionVote(src.loadRef().beginParse());
}
}
}
export type WithdrawalRequests = {
$$type: 'WithdrawalRequests';
addresses: Dictionary<bigint, Address>;
@ -965,8 +1396,8 @@ function dictValueParserWithdraw(): DictionaryValue<Withdraw> {
}
async function Linker_init(index: bigint, owner: Address, master: Address) {
const __init = 'te6ccgEBBwEATgABFP8A9KQT9LzyyAsBAgFiAgMCAs0EBQAJoUrd4AsAAdQBE2W0EyMxQJNs8yYGADxQNIEBAc8AAc8WAc8WyFggbpUwcAHLAZLPFuLJAcw=';
const __code = 'te6ccgECEwEAAVAAART/APSkE/S88sgLAQIBYgIDAgLMBAUCASANDgOL24EOuk4Q/KmBBrhY/vAWhpgYC42GAAyL/IuHEA/SARKDM3gnwwgUit8EEIWf56YN1Hx22eAm2eGIgaIJh4B+2ecBh5YEFBEGBwIBWAkKADbTHwGCELP89MG68uCB+kAh1wsBwwCRAZIxbeIBGMj4QgHMVTDbPMntVAgAP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Ns8ye1UGwA8UDSBAQHPAAHPFgHPFshYIG6VMHABywGSzxbiyQHMADbTHwGCELP89MG68uCB+kAh1wsBwwCRAZIxbeIBFu1E0NQB+GLbPGwUHgBEgQEB1wD6QAEB+kABAdQB0PpAIdcLAcMAkQGSMW3iMRRDMODigOY=';
let systemCell = Cell.fromBase64(__system);
let builder = new TupleBuilder();
builder.writeCell(systemCell);
@ -1021,6 +1452,7 @@ const Linker_errors: { [key: number]: { message: string } } = {
13650: { message: `Invalid bounced message` },
16059: { message: `Invalid value` },
32366: { message: `not enough money for deposit` },
44816: { message: `Wallet is blacklisted` },
62972: { message: `Invalid balance` },
}
@ -1051,12 +1483,15 @@ export class Linker implements Contract {
this.init = init;
}
async send(provider: ContractProvider, via: Sender, args: { value: bigint, bounce?: boolean| null | undefined }, message: SetLinkerNeighbor) {
async send(provider: ContractProvider, via: Sender, args: { value: bigint, bounce?: boolean| null | undefined }, message: SetLinkerNeighbor | ForwardToWallet) {
let body: Cell | null = null;
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'SetLinkerNeighbor') {
body = beginCell().store(storeSetLinkerNeighbor(message)).endCell();
}
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'ForwardToWallet') {
body = beginCell().store(storeForwardToWallet(message)).endCell();
}
if (body === null) { throw new Error('Invalid message type'); }
await provider.internal(via, { ...args, body: body });

2
sources/output/jetton_TONB.abi

File diff suppressed because one or more lines are too long

BIN
sources/output/jetton_TONB.code.boc

Binary file not shown.

132
sources/output/jetton_TONB.code.fc

@ -139,6 +139,21 @@ cell __gen_writecell_SetLinkerNeighbor((slice) v) inline_ref {
return __gen_write_SetLinkerNeighbor(begin_cell(), v).end_cell();
}
builder __gen_write_WithdrawalRequests(builder build_0, (cell, cell, int) v) inline_ref {
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;
}
(slice, ((cell, cell, int))) __gen_read_WithdrawalRequests(slice sc_0) inline_ref {
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));
}
(slice, ((int))) __gen_read_Deposit(slice sc_0) inline_ref {
throw_unless(129, sc_0~load_uint(32) == 569292295);
var v'amount = sc_0~load_coins();
@ -151,11 +166,12 @@ cell __gen_writecell_SetLinkerNeighbor((slice) v) inline_ref {
return (sc_0, (v'amount));
}
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;
builder __gen_write_TONBWallet(builder build_0, (int, slice, slice, int, int, slice) v) inline_ref {
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);
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);
@ -174,8 +190,8 @@ builder __gen_write_Linker(builder build_0, (int, slice, slice, slice) v) inline
return build_0;
}
builder __gen_write_TONB(builder build_0, (int, slice, cell, int, slice, slice, int, slice) v) inline_ref {
var (v'totalSupply, v'owner, v'content, v'mintable, v'first_linker, v'last_linker, v'n_linkers, v'staking_pool) = v;
builder __gen_write_TONB(builder build_0, (int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) v) inline_ref {
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);
@ -185,11 +201,12 @@ builder __gen_write_TONB(builder build_0, (int, slice, cell, int, slice, slice,
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;
}
(slice, ((int, slice, cell, int, slice, slice, int, slice))) __gen_read_TONB(slice sc_0) inline_ref {
(slice, ((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)))) __gen_read_TONB(slice sc_0) inline_ref {
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();
@ -199,7 +216,8 @@ builder __gen_write_TONB(builder build_0, (int, slice, cell, int, slice, slice,
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();
return (sc_0, (v'totalSupply, v'owner, v'content, v'mintable, v'first_linker, v'last_linker, v'n_linkers, v'staking_pool));
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 {
@ -217,13 +235,13 @@ _ __gen_Context_get_sender((int, slice, int, slice) v) inline {
return (v'totalSupply, v'mintable, v'owner, v'content, v'walletCode);
}
(int, slice, cell, int, slice, slice, int, slice) __gen_load_TONB() inline_ref {
(int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) __gen_load_TONB() inline_ref {
slice sc = get_data().begin_parse();
__tact_context_sys = sc~load_ref();
return sc~__gen_read_TONB();
}
() __gen_store_TONB((int, slice, cell, int, slice, slice, int, slice) v) impure inline_ref {
() __gen_store_TONB((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) v) impure inline_ref {
builder b = begin_cell();
b = b.store_ref(__tact_context_sys);
b = __gen_write_TONB(b, v);
@ -292,13 +310,13 @@ slice $contractAddress((cell, cell) $s) impure {
}
cell $__gen_TONBWallet_init(cell sys', slice $master, slice $owner) {
var (($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address)) = (null(), null(), null(), 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'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, $self'linker_address));
b' = __gen_write_TONBWallet(b', ($self'balance, $self'owner, $self'master, $self'blacklisted, $self'linker, $self'linker_address));
return b'.end_cell();
}
@ -337,14 +355,14 @@ cell $__gen_Linker_init(cell sys', int $index, slice $owner, slice $master) {
return (mine, $__gen_Linker_init(sys, $index, $owner, $master));
}
((int, slice, cell, int, slice, slice, int, slice), (cell, cell)) $__gen_TONB_getJettonWalletInit((int, slice, cell, int, slice, slice, int, slice) $self, slice $address) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool)) = $self;
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool), $__gen_TONBWallet_init_child(__tact_context_sys, my_address(), $address));
((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 {
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));
}
slice $__gen_TONB_get_wallet_address((int, slice, cell, int, slice, slice, int, slice) $self, slice $owner) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool)) = $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)~$__gen_TONB_getJettonWalletInit($owner);
slice $__gen_TONB_get_wallet_address((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, slice $owner) 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 ($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));
}
@ -355,9 +373,9 @@ _ $__gen_get_get_wallet_address(slice $$owner) method_id(103289) {
return res;
}
(int, int, slice, cell, cell) $__gen_TONB_get_jetton_data((int, slice, cell, int, slice, slice, int, slice) $self) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool)) = $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)~$__gen_TONB_getJettonWalletInit(my_address()));
(int, int, slice, cell, cell) $__gen_TONB_get_jetton_data((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;
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);
}
@ -367,10 +385,10 @@ _ $__gen_get_get_jetton_data() method_id(106029) {
return __gen_JettonData_to_external(res);
}
((int, slice, cell, int, slice, slice, int, slice), ()) $__gen_TONB_mint((int, slice, cell, int, slice, slice, int, slice) $self, slice $to, int $amount, slice $responseAddress) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool)) = $self;
((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 {
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)~$__gen_TONB_getJettonWalletInit($to);
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));
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));
@ -379,33 +397,33 @@ _ $__gen_get_get_jetton_data() method_id(106029) {
$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));
$send((false, $walletAddress, 50000000, 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), ());
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), ()) $__gen_TONB_burn((int, slice, cell, int, slice, slice, int, slice) $self, slice $from, int $amount, slice $responseAddress) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool)) = $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)~$__gen_TONB_getJettonWalletInit($from);
((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 {
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), ());
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), ()) $__gen_TONB_requireWallet((int, slice, cell, int, slice, slice, int, slice) $self, slice $owner) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool)) = $self;
((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 {
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)~$__gen_TONB_getJettonWalletInit($owner);
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), ());
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), ()) $__gen_TONB_requireOwner((int, slice, cell, int, slice, slice, int, slice) $self) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool)) = $self;
((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 {
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), ());
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)), ());
}
slice $__gen_TONB_owner((int, slice, cell, int, slice, slice, int, slice) $self) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool)) = $self;
slice $__gen_TONB_owner((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;
return $self'owner;
}
@ -415,44 +433,44 @@ _ $__gen_get_owner() method_id(83229) {
return res;
}
(((int, slice, cell, int, slice, slice, int, slice)), ()) $__gen_TONB_receive_Deposit((int, slice, cell, int, slice, slice, int, slice) $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;
(((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 ($msg'amount) = $msg;
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get();
throw_unless(32366, ($ctx'value >= 10000000));
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool)~$__gen_TONB_mint($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), ());
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);
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)), ()) $__gen_TONB_receive((int, slice, cell, int, slice, slice, int, slice) $self) impure {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool) = $self;
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool), ());
(((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 {
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)), ());
}
(((int, slice, cell, int, slice, slice, int, slice)), ()) $__gen_TONB_receive_Withdraw((int, slice, cell, int, slice, slice, int, slice) $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;
(((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 {
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();
throw_unless(6384, ($ctx'value >= 10000000));
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool)~$__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'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)), ());
}
(((int, slice, cell, int, slice, slice, int, slice)), ()) $__gen_TONB_receive_TokenUpdateContent((int, slice, cell, int, slice, slice, int, slice) $self, (cell) $msg) impure {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool) = $self;
(((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 {
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)~$__gen_TONB_requireOwner();
($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), ());
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)), ()) $__gen_TONB_receive_TokenBurnNotification((int, slice, cell, int, slice, slice, int, slice) $self, (int, int, slice, slice) $msg) impure {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool) = $self;
(((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 {
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)~$__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);
$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), ());
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)), ());
}
@ -531,5 +549,5 @@ _ supported_interfaces() method_id {
}
_ get_abi_ipfs() {
return "ipfs://QmRq7Ws4rcHn99Mv8T1S9fKrCFxp46UnQyae1gPiBrqj5M";
return "ipfs://QmYVigftHMYXo1zGVnMx2hxo4jEsJqWmjJJq9AaWYe9gfp";
}

217
sources/output/jetton_TONB.code.fif

@ -20,6 +20,8 @@ PROGRAM{
DECLPROC __gen_read_TokenUpdateContent
DECLPROC __gen_write_SetLinkerNeighbor
DECLPROC __gen_writecell_SetLinkerNeighbor
DECLPROC __gen_write_WithdrawalRequests
DECLPROC __gen_read_WithdrawalRequests
DECLPROC __gen_read_Deposit
DECLPROC __gen_read_Withdraw
DECLPROC __gen_write_TONBWallet
@ -265,6 +267,20 @@ PROGRAM{
__gen_write_SetLinkerNeighbor INLINECALLDICT
ENDC
}>
__gen_write_WithdrawalRequests PROCREF:<{
s2 s3 XCHG2
STDICT
STDICT
257 PUSHINT
STIX
}>
__gen_read_WithdrawalRequests PROCREF:<{
LDDICT
LDDICT
257 PUSHINT
LDIX
3 -ROLL
}>
__gen_read_Deposit PROCREF:<{
32 LDU
SWAP
@ -285,13 +301,14 @@ PROGRAM{
SWAP
}>
__gen_write_TONBWallet PROCREF:<{
s4 s5 XCHG2
s5 s6 XCHG2
257 PUSHINT
STIX
ROT
s0 s3 XCHG2
__tact_store_address INLINECALLDICT
SWAP
__tact_store_address INLINECALLDICT
1 STI
NEWC
s2 PUSH
ISNULL
@ -331,36 +348,39 @@ PROGRAM{
STREF
}>
__gen_write_TONB PROCREF:<{
s8 s7 XCHG2
s11 s10 XCHG2
STGRAMS
s0 s5 XCHG2
s0 s8 XCHG2
__tact_store_address INLINECALLDICT
s3 PUSH
s6 PUSH
ISNULL
NOT
IF:<{
TRUE
SWAP
1 STI
s1 s3 XCHG
s1 s6 XCHG
STREF
}>ELSE<{
s3 POP
s6 POP
FALSE
s0 s3 XCHG2
s0 s6 XCHG2
1 STI
}>
s1 s4 XCHG
1 STI
SWAP
ROT
__tact_store_address_opt INLINECALLDICT
SWAP
__tact_store_address_opt INLINECALLDICT
s0 s2 XCHG
SWAP
NEWC
257 PUSHINT
STIX
SWAP
ROT
__tact_store_address_opt INLINECALLDICT
s4 s3 XCHG2
__gen_write_WithdrawalRequests INLINECALLDICT
ENDC
SWAP
STREF
@ -388,13 +408,16 @@ PROGRAM{
257 PUSHINT
LDIX
__tact_load_address_opt INLINECALLDICT
NIP
s2 s8 XCHG
s2 s7 XCHG
s2 s6 XCHG
s2 s5 XCHG
s2 s4 XCHG
s2 s3 XCHG
SWAP
__gen_read_WithdrawalRequests INLINECALLDICT
s3 POP
s5 s11 XCHG
s5 s10 XCHG
s5 s9 XCHG
s5 s8 XCHG
s5 s7 XCHG
s5 s6 XCHG
ROT
}>
__gen_StateInit_get_code PROCINLINE:<{
DROP
@ -412,14 +435,14 @@ PROGRAM{
SWAP
__tact_context_sys SETGLOB
__gen_read_TONB INLINECALLDICT
1 8 BLKDROP2
1 11 BLKDROP2
}>
__gen_store_TONB PROCREF:<{
NEWC
__tact_context_sys GETGLOB
SWAP
STREF
8 -ROLL
11 -ROLL
__gen_write_TONB INLINECALLDICT
ENDC
c4 POP
@ -540,14 +563,16 @@ PROGRAM{
SENDRAWMSG
}>
$__gen_TONBWallet_init PROC:<{
FALSE
PUSHNULL
PUSHNULL
0 PUSHINT
s0 s5 XCHG
s0 s6 XCHG
NEWC
STREF
s0 s6 XCHG
s0 s5 XCHG
s4 s4 s4 XCHG3
3 -ROLL
__gen_write_TONBWallet INLINECALLDICT
ENDC
}>
@ -607,18 +632,18 @@ PROGRAM{
}>
$__gen_TONB_get_wallet_address PROC:<{
$__gen_TONB_getJettonWalletInit CALLDICT
8 2 BLKDROP2
11 2 BLKDROP2
$contractAddress CALLDICT
}>
$__gen_get_get_wallet_address PROC:<{
__gen_load_TONB INLINECALLDICT
8 ROLL
11 ROLL
$__gen_TONB_get_wallet_address CALLDICT
}>
$__gen_TONB_get_jetton_data PROC:<{
MYADDR
$__gen_TONB_getJettonWalletInit CALLDICT
4 2 BLKDROP2
7 2 BLKDROP2
__gen_StateInit_get_code INLINECALLDICT
s3 s3 s0 XCHG3
}>
@ -628,31 +653,31 @@ PROGRAM{
__gen_JettonData_to_external CALLDICT
}>
$__gen_TONB_mint PROC:<{
s10 s1 XCPU
s13 s1 XCPU
ADD
8 2 BLKSWAP
11 2 BLKSWAP
$__gen_TONB_getJettonWalletInit CALLDICT
2DUP
$contractAddress CALLDICT
__tact_context_sys GETGLOB
MYADDR
s6 s2 s(-2) PU2XC
s9 s2 s(-2) PU2XC
$__gen_Linker_init_child CALLDICT
2DUP
$contractAddress CALLDICT
FALSE
20000000 PUSHINT
0 PUSHINT
s0 s11 XCHG
s0 s14 XCHG
__gen_writecell_SetLinkerNeighbor INLINECALLDICT
s3 PUSH
s3 s6 XCHG
s4 s1 s5 XCHG3
s3 s12 XCHG
s1 s12 s0 XCHG3
s3 s15 XCHG
s1 s15 s0 XCHG3
$send CALLDICT
s5 PUSH
s0 s5 XCHG
s8 PUSH
s0 s8 XCHG
INC
0 PUSHINT
MYADDR
@ -661,35 +686,40 @@ PROGRAM{
s4 PUSH
DEC
s4 s7 XCHG
s6 17 s() XCHG
s6 20 s() XCHG
s3 s5 XCHG
s4 18 s() XCHG
s4 21 s() XCHG
3 ROLL
s0 s11 XCHG
s0 s14 XCHG
__gen_writecell_TokenTransferInternal INLINECALLDICT
FALSE
s0 s4 XCHG
s3 s11 XCHG
s3 s14 XCHG
50000000 PUSHINT
s0 s3 XCHG
0 PUSHINT
s3 s1 s3 XCHG3
s0 s14 XCHG
s0 17 s() XCHG
$send CALLDICT
s8 s10 XCHG
s7 s9 XCHG
s6 s8 XCHG
s5 s7 XCHG
s4 s6 XCHG
s3 s5 XCHG
s4 s0 s3 XCHG3
s0 s2 XCHG
s0 s3 s5 XCHG3
s1 s4 XCHG
}>
$__gen_TONB_burn PROC:<{
s7 s10 XCHG
s6 s9 XCHG
s5 s8 XCHG
s4 s10 XCHG
s3 s9 XCHG
s8 s10 s9 XCHG3
s8 PUSH
s10 s13 XCHG
s9 s12 XCHG
s8 s11 XCHG
s7 s13 XCHG
s6 s12 XCHG
s5 s11 XCHG
s4 s13 XCHG
s3 s12 XCHG
s11 s13 s12 XCHG3
s11 PUSH
$__gen_TONB_getJettonWalletInit CALLDICT
2DUP
$contractAddress CALLDICT
@ -697,45 +727,45 @@ PROGRAM{
0 PUSHINT
64 PUSHINT
s1 s0 s2 PUXC2
s2 17 s() XCHG
s0 16 s() XCHG
s1 s15 XCHG
s2 20 s() XCHG
s1 18 s() XCHG
s0 19 s() XCHG
__gen_writecell_TokenBurn INLINECALLDICT
s6 s13 XCHG
s6 16 s() XCHG
s1 s5 XCHG
s4 s14 XCHG
s3 s12 XCHG
s12 s2 XCHG2
s4 17 s() XCHG
s3 s15 XCHG
s15 s2 XCHG2
$send CALLDICT
s4 s7 XCHG
3 4 BLKSWAP
s7 s10 XCHG
3 7 BLKSWAP
}>
$__gen_TONB_requireWallet PROC:<{
__tact_context_get INLINECALLDICT
s2 s3 XCHG
3 BLKDROP
9 -ROLL
12 -ROLL
$__gen_TONB_getJettonWalletInit CALLDICT
SWAP
4429 PUSHINT
s0 s2 XCHG
$contractAddress CALLDICT
s0 s10 XCHG2
s0 s13 XCHG2
__tact_address_eq INLINECALLDICT
s1 s9 XCHG
s1 s12 XCHG
THROWANYIFNOT
7 ROLL
10 ROLL
}>
$__gen_TONB_requireOwner PROC:<{
__tact_context_get INLINECALLDICT
__gen_Context_get_sender INLINECALLDICT
s7 PUSH
s10 PUSH
__tact_address_eq INLINECALLDICT
132 THROWIFNOT
}>
$__gen_TONB_owner PROC:<{
s6 s7 XCHG
7 BLKDROP
s9 s10 XCHG
10 BLKDROP
}>
$__gen_get_owner PROC:<{
__gen_load_TONB INLINECALLDICT
@ -744,9 +774,16 @@ PROGRAM{
$__gen_TONB_receive_Deposit PROC:<{
__tact_context_get INLINECALLDICT
DROP
s2 POP
32366 PUSHINT
s3 POP
10000000 PUSHINT
s4 PUSH
ADD
20000000 PUSHINT
ADD
50000000 PUSHINT
ADD
s1 s3 XCHG
GEQ
s1 s2 XCHG
THROWANYIFNOT
@ -768,29 +805,37 @@ PROGRAM{
$__gen_TONB_burn CALLDICT
}>
$__gen_TONB_receive_TokenUpdateContent PROC:<{
8 -ROLL
11 -ROLL
$__gen_TONB_requireOwner CALLDICT
s5 POP
s6 s7 XCHG
s5 s6 XCHG
4 ROLL
s8 POP
s9 s10 XCHG
s8 s9 XCHG
7 ROLL
}>
$__gen_TONB_receive_TokenBurnNotification PROC:<{
DROP
s2 POP
8 2 BLKSWAP
s9 PUSH
s10 s12 XCHG
5 8 REVERSE
s7 s11 XCHG
s6 s12 XCHG
s5 s11 XCHG
s4 s12 XCHG
s3 s11 XCHG
s12 s11 s12 XCHG3
s11 PUSH
$__gen_TONB_requireWallet CALLDICT
s7 s8 XCPU
s10 s12 XCPU
SUB
FALSE
s0 s10 s9 XCHG3
s0 s12 s13 XCHG3
0 PUSHINT
PUSHNULL
PUSHNULL
PUSHNULL
$send CALLDICT
2 5 BLKSWAP
s9 s10 XCHG
2 8 BLKSWAP
}>
recv_internal PROC:<{
0 PUSHINT
@ -830,9 +875,12 @@ PROGRAM{
IFJMP:<{
DROP
__gen_load_TONB INLINECALLDICT
s0 s8 XCHG
s0 s11 XCHG
__gen_read_Deposit INLINECALLDICT
NIP
s10 s11 XCHG
s9 s10 XCHG
s8 s9 XCHG
s7 s8 XCHG
s6 s7 XCHG
s5 s6 XCHG
@ -860,9 +908,12 @@ PROGRAM{
IFJMP:<{
DROP
__gen_load_TONB INLINECALLDICT
s0 s8 XCHG
s0 s11 XCHG
__gen_read_Withdraw INLINECALLDICT
NIP
s10 s11 XCHG
s9 s10 XCHG
s8 s9 XCHG
s7 s8 XCHG
s6 s7 XCHG
s5 s6 XCHG
@ -878,9 +929,12 @@ PROGRAM{
IFJMP:<{
DROP
__gen_load_TONB INLINECALLDICT
s0 s8 XCHG
s0 s11 XCHG
__gen_read_TokenUpdateContent INLINECALLDICT
NIP
s10 s11 XCHG
s9 s10 XCHG
s8 s9 XCHG
s7 s8 XCHG
s6 s7 XCHG
s5 s6 XCHG
@ -894,9 +948,12 @@ PROGRAM{
EQUAL
IFJMP:<{
__gen_load_TONB INLINECALLDICT
s0 s8 XCHG
s0 s11 XCHG
__gen_read_TokenBurnNotification INLINECALLDICT
s4 POP
s13 s14 XCHG
s12 s13 XCHG
s11 s12 XCHG
s10 s11 XCHG
s9 s10 XCHG
s8 s9 XCHG
@ -918,6 +975,6 @@ PROGRAM{
86142586315491086060343270784266291122 PUSHINT
}>
get_abi_ipfs PROC:<{
x{697066733a2f2f516d5271375773347263486e39394d763854315339664b72434678703436556e51796165316750694272716a354d} PUSHSLICE
x{697066733a2f2f516d595669676674484d59586f317a47566e4d783268786f346a45734a71576d6a4a4a7139416157596539676670} PUSHSLICE
}>
}END>c

622
sources/output/jetton_TONB.code.rev.fif

File diff suppressed because it is too large Load Diff

BIN
sources/output/jetton_TONB.init.boc

Binary file not shown.

17
sources/output/jetton_TONB.init.fc

@ -17,8 +17,16 @@ builder __tact_store_address_opt(builder b, slice address) inline {
}
}
builder __gen_write_TONB(builder build_0, (int, slice, cell, int, slice, slice, int, slice) v) inline_ref {
var (v'totalSupply, v'owner, v'content, v'mintable, v'first_linker, v'last_linker, v'n_linkers, v'staking_pool) = v;
builder __gen_write_WithdrawalRequests(builder build_0, (cell, cell, int) v) inline_ref {
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;
}
builder __gen_write_TONB(builder build_0, (int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) v) inline_ref {
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);
@ -28,19 +36,20 @@ builder __gen_write_TONB(builder build_0, (int, slice, cell, int, slice, slice,
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;
}
cell $__gen_TONB_init(cell sys', slice $owner, cell $content) {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool)) = (null(), null(), null(), null(), null(), null(), 0, null());
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))) = (null(), null(), null(), null(), null(), null(), 0, null(), null());
$self'totalSupply = 0;
$self'owner = $owner;
$self'mintable = true;
$self'content = $content;
var b' = begin_cell();
b' = b'.store_ref(sys');
b' = __gen_write_TONB(b', ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool));
b' = __gen_write_TONB(b', ($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 b'.end_cell();
}

46
sources/output/jetton_TONB.init.fif

@ -2,6 +2,7 @@ PROGRAM{
DECLPROC __tact_verify_address
DECLPROC __tact_store_address
DECLPROC __tact_store_address_opt
DECLPROC __gen_write_WithdrawalRequests
DECLPROC __gen_write_TONB
DECLPROC $__gen_TONB_init
107886 DECLMETHOD init
@ -27,37 +28,47 @@ PROGRAM{
__tact_store_address INLINECALLDICT
}>
}>
__gen_write_WithdrawalRequests PROCREF:<{
s2 s3 XCHG2
STDICT
STDICT
257 PUSHINT
STIX
}>
__gen_write_TONB PROCREF:<{
s8 s7 XCHG2
s11 s10 XCHG2
STGRAMS
s0 s5 XCHG2
s0 s8 XCHG2
__tact_store_address INLINECALLDICT
s3 PUSH
s6 PUSH
ISNULL
NOT
IF:<{
TRUE
SWAP
1 STI
s1 s3 XCHG
s1 s6 XCHG
STREF
}>ELSE<{
s3 POP
s6 POP
FALSE
s0 s3 XCHG2
s0 s6 XCHG2
1 STI
}>
s1 s4 XCHG
1 STI
SWAP
ROT
__tact_store_address_opt INLINECALLDICT
SWAP
__tact_store_address_opt INLINECALLDICT
s0 s2 XCHG
SWAP
NEWC
257 PUSHINT
STIX
SWAP
ROT
__tact_store_address_opt INLINECALLDICT
s4 s3 XCHG2
__gen_write_WithdrawalRequests INLINECALLDICT
ENDC
SWAP
STREF
@ -67,16 +78,19 @@ PROGRAM{
PUSHNULL
0 PUSHINT
PUSHNULL
OVER
PUSHNULL
s4 PUSH
TRUE
s0 s8 XCHG
s0 s11 XCHG
NEWC
STREF
s0 s8 XCHG
s4 s7 s4 XCHG3
s1 s6 XCHG
s1 s5 XCHG
s1 s3 XCHG
s0 s11 XCHG
s0 s7 XCHG
s10 s5 XCHG2
s9 s3 XCHG2
s0 s8 XCHG2
s0 s6 XCHG
s4 s1 s4 XCHG3
__gen_write_TONB INLINECALLDICT
ENDC
}>

48
sources/output/jetton_TONB.init.rev.fif

@ -2,45 +2,49 @@ SETCP0
(:methods
recv_internal:
5:
6:
PUSHNULL
PUSHNULL
0 PUSHINT
PUSHNULL
s1 PUSH
PUSHNULL
s4 PUSH
-1 PUSHINT
s0 s8 XCHG
s0 s11 XCHG
NEWC
STREF
s0 s8 XCHG
s4 s7 s4 XCHG3
s1 s6 XCHG
s1 s5 XCHG
s1 s3 XCHG
s0 s11 XCHG
s0 s7 XCHG
s10 s5 XCHG2
s9 s3 XCHG2
s0 s8 XCHG2
s0 s6 XCHG
s4 s1 s4 XCHG3
<{
s8 s7 XCHG2
s11 s10 XCHG2
STGRAMS
s0 s5 XCHG2
s0 s8 XCHG2
STSLICER
s3 PUSH
s6 PUSH
ISNULL
NOT
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
s1 s3 XCHG
s1 s6 XCHG
STREF
}> PUSHCONT
<{
s3 POP
s6 POP
0 PUSHINT
s0 s3 XCHG2
s0 s6 XCHG2
1 STI
}> PUSHCONT
IFELSE
s1 s4 XCHG
1 STI
s0 s1 XCHG
ROT
s0 PUSH
ISNULL
<{
@ -66,11 +70,11 @@ SETCP0
STSLICER
}> PUSHCONT
IFELSE
s0 s2 XCHG
s0 s1 XCHG
NEWC
257 PUSHINT
STIX
s0 s1 XCHG
ROT
s0 PUSH
ISNULL
<{
@ -83,6 +87,14 @@ SETCP0
STSLICER
}> PUSHCONT
IFELSE
s4 s3 XCHG2
<{
s2 s3 XCHG2
STDICT
STDICT
257 PUSHINT
STIX
}> CALLREF
ENDC
s0 s1 XCHG
STREF
@ -90,7 +102,7 @@ SETCP0
ENDC
107886:
5 CALLDICT
6 CALLDICT
) 19 DICTPUSHCONST
DICTIGETJMPZ
11 THROWARG

40
sources/output/jetton_TONB.md

@ -1,9 +1,9 @@
# TACT Compilation Report
Contract: TONB
BOC Size: 1708 bytes
BOC Size: 1822 bytes
# Types
Total Types: 18
Total Types: 27
## StateInit
TLB: `_ code:^cell data:^cell = StateInit`
@ -61,6 +61,42 @@ Signature: `SetLinkerNeighbor{neighbor:Maybe address}`
TLB: `init_linker#67c08154 neighbor:Maybe address walletAmount:int257 walletCode:^cell walletData:^cell walletAddress:address responseAddress:Maybe address = InitLinker`
Signature: `InitLinker{neighbor:Maybe address,walletAmount:int257,walletCode:^cell,walletData:^cell,walletAddress:address,responseAddress:Maybe address}`
## ForwardToWallet
TLB: `forward_to_wallet#5d1da2bb body:^cell = ForwardToWallet`
Signature: `ForwardToWallet{body:^cell}`
## BlacklistWallet
TLB: `blacklist_wallet#029c8396 wallet:address = BlacklistWallet`
Signature: `BlacklistWallet{wallet:address}`
## InitiateBlacklistVote
TLB: `initiate_blacklist_vote#e8fffb0b adminIndex:int257 wallet:address quorum_percent:int257 vote_time:int257 = InitiateBlacklistVote`
Signature: `InitiateBlacklistVote{adminIndex:int257,wallet:address,quorum_percent:int257,vote_time:int257}`
## InitiateLiquidationVote
TLB: `initiate_liquidation_vote#11fb862f adminIndex:int257 quorum_percent:int257 vote_time:int257 = InitiateLiquidationVote`
Signature: `InitiateLiquidationVote{adminIndex:int257,quorum_percent:int257,vote_time:int257}`
## FinishVote
TLB: `finish_vote#2a574443 voteId:int257 = FinishVote`
Signature: `FinishVote{voteId:int257}`
## Vote
TLB: `vote#b670f4ce voteId:int257 adminIndex:int257 vote:int257 = Vote`
Signature: `Vote{voteId:int257,adminIndex:int257,vote:int257}`
## AddressList
TLB: `_ addresses:dict<int, address> length:int257 = AddressList`
Signature: `AddressList{addresses:dict<int, address>,length:int257}`
## Distribution
TLB: `_ addresses:AddressList{addresses:dict<int, address>,length:int257} percents:dict<address, int> = Distribution`
Signature: `Distribution{addresses:AddressList{addresses:dict<int, address>,length:int257},percents:dict<address, int>}`
## InitiateDistributionVote
TLB: `initiate_distribution_vote#1078d0b5 adminIndex:int257 quorum_percent:int257 vote_time:int257 distribution:Distribution{addresses:AddressList{addresses:dict<int, address>,length:int257},percents:dict<address, int>} = InitiateDistributionVote`
Signature: `InitiateDistributionVote{adminIndex:int257,quorum_percent:int257,vote_time:int257,distribution:Distribution{addresses:AddressList{addresses:dict<int, address>,length:int257},percents:dict<address, int>}}`
## WithdrawalRequests
TLB: `_ addresses:dict<int, address> amounts:dict<int, int> n_requests:int257 = WithdrawalRequests`
Signature: `WithdrawalRequests{addresses:dict<int, address>,amounts:dict<int, int>,n_requests:int257}`

2
sources/output/jetton_TONB.pkg

File diff suppressed because one or more lines are too long

438
sources/output/jetton_TONB.ts

@ -791,6 +791,437 @@ function dictValueParserInitLinker(): DictionaryValue<InitLinker> {
}
}
}
export type ForwardToWallet = {
$$type: 'ForwardToWallet';
body: Cell;
}
export function storeForwardToWallet(src: ForwardToWallet) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(1562223291, 32);
b_0.storeRef(src.body);
};
}
export function loadForwardToWallet(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 1562223291) { throw Error('Invalid prefix'); }
let _body = sc_0.loadRef();
return { $$type: 'ForwardToWallet' as const, body: _body };
}
function loadTupleForwardToWallet(source: TupleReader) {
let _body = source.readCell();
return { $$type: 'ForwardToWallet' as const, body: _body };
}
function storeTupleForwardToWallet(source: ForwardToWallet) {
let builder = new TupleBuilder();
builder.writeCell(source.body);
return builder.build();
}
function dictValueParserForwardToWallet(): DictionaryValue<ForwardToWallet> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeForwardToWallet(src)).endCell());
},
parse: (src) => {
return loadForwardToWallet(src.loadRef().beginParse());
}
}
}
export type BlacklistWallet = {
$$type: 'BlacklistWallet';
wallet: Address;
}
export function storeBlacklistWallet(src: BlacklistWallet) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(43811734, 32);
b_0.storeAddress(src.wallet);
};
}
export function loadBlacklistWallet(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 43811734) { throw Error('Invalid prefix'); }
let _wallet = sc_0.loadAddress();
return { $$type: 'BlacklistWallet' as const, wallet: _wallet };
}
function loadTupleBlacklistWallet(source: TupleReader) {
let _wallet = source.readAddress();
return { $$type: 'BlacklistWallet' as const, wallet: _wallet };
}
function storeTupleBlacklistWallet(source: BlacklistWallet) {
let builder = new TupleBuilder();
builder.writeAddress(source.wallet);
return builder.build();
}
function dictValueParserBlacklistWallet(): DictionaryValue<BlacklistWallet> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeBlacklistWallet(src)).endCell());
},
parse: (src) => {
return loadBlacklistWallet(src.loadRef().beginParse());
}
}
}
export type InitiateBlacklistVote = {
$$type: 'InitiateBlacklistVote';
adminIndex: bigint;
wallet: Address;
quorum_percent: bigint;
vote_time: bigint;
}
export function storeInitiateBlacklistVote(src: InitiateBlacklistVote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(3909090059, 32);
b_0.storeInt(src.adminIndex, 257);
b_0.storeAddress(src.wallet);
b_0.storeInt(src.quorum_percent, 257);
let b_1 = new Builder();
b_1.storeInt(src.vote_time, 257);
b_0.storeRef(b_1.endCell());
};
}
export function loadInitiateBlacklistVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 3909090059) { throw Error('Invalid prefix'); }
let _adminIndex = sc_0.loadIntBig(257);
let _wallet = sc_0.loadAddress();
let _quorum_percent = sc_0.loadIntBig(257);
let sc_1 = sc_0.loadRef().beginParse();
let _vote_time = sc_1.loadIntBig(257);
return { $$type: 'InitiateBlacklistVote' as const, adminIndex: _adminIndex, wallet: _wallet, quorum_percent: _quorum_percent, vote_time: _vote_time };
}
function loadTupleInitiateBlacklistVote(source: TupleReader) {
let _adminIndex = source.readBigNumber();
let _wallet = source.readAddress();
let _quorum_percent = source.readBigNumber();
let _vote_time = source.readBigNumber();
return { $$type: 'InitiateBlacklistVote' as const, adminIndex: _adminIndex, wallet: _wallet, quorum_percent: _quorum_percent, vote_time: _vote_time };
}
function storeTupleInitiateBlacklistVote(source: InitiateBlacklistVote) {
let builder = new TupleBuilder();
builder.writeNumber(source.adminIndex);
builder.writeAddress(source.wallet);
builder.writeNumber(source.quorum_percent);
builder.writeNumber(source.vote_time);
return builder.build();
}
function dictValueParserInitiateBlacklistVote(): DictionaryValue<InitiateBlacklistVote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeInitiateBlacklistVote(src)).endCell());
},
parse: (src) => {
return loadInitiateBlacklistVote(src.loadRef().beginParse());
}
}
}
export type InitiateLiquidationVote = {
$$type: 'InitiateLiquidationVote';
adminIndex: bigint;
quorum_percent: bigint;
vote_time: bigint;
}
export function storeInitiateLiquidationVote(src: InitiateLiquidationVote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(301696559, 32);
b_0.storeInt(src.adminIndex, 257);
b_0.storeInt(src.quorum_percent, 257);
b_0.storeInt(src.vote_time, 257);
};
}
export function loadInitiateLiquidationVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 301696559) { throw Error('Invalid prefix'); }
let _adminIndex = sc_0.loadIntBig(257);
let _quorum_percent = sc_0.loadIntBig(257);
let _vote_time = sc_0.loadIntBig(257);
return { $$type: 'InitiateLiquidationVote' as const, adminIndex: _adminIndex, quorum_percent: _quorum_percent, vote_time: _vote_time };
}
function loadTupleInitiateLiquidationVote(source: TupleReader) {
let _adminIndex = source.readBigNumber();
let _quorum_percent = source.readBigNumber();
let _vote_time = source.readBigNumber();
return { $$type: 'InitiateLiquidationVote' as const, adminIndex: _adminIndex, quorum_percent: _quorum_percent, vote_time: _vote_time };
}
function storeTupleInitiateLiquidationVote(source: InitiateLiquidationVote) {
let builder = new TupleBuilder();
builder.writeNumber(source.adminIndex);
builder.writeNumber(source.quorum_percent);
builder.writeNumber(source.vote_time);
return builder.build();
}
function dictValueParserInitiateLiquidationVote(): DictionaryValue<InitiateLiquidationVote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeInitiateLiquidationVote(src)).endCell());
},
parse: (src) => {
return loadInitiateLiquidationVote(src.loadRef().beginParse());
}
}
}
export type FinishVote = {
$$type: 'FinishVote';
voteId: bigint;
}
export function storeFinishVote(src: FinishVote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(710362179, 32);
b_0.storeInt(src.voteId, 257);
};
}
export function loadFinishVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 710362179) { throw Error('Invalid prefix'); }
let _voteId = sc_0.loadIntBig(257);
return { $$type: 'FinishVote' as const, voteId: _voteId };
}
function loadTupleFinishVote(source: TupleReader) {
let _voteId = source.readBigNumber();
return { $$type: 'FinishVote' as const, voteId: _voteId };
}
function storeTupleFinishVote(source: FinishVote) {
let builder = new TupleBuilder();
builder.writeNumber(source.voteId);
return builder.build();
}
function dictValueParserFinishVote(): DictionaryValue<FinishVote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeFinishVote(src)).endCell());
},
parse: (src) => {
return loadFinishVote(src.loadRef().beginParse());
}
}
}
export type Vote = {
$$type: 'Vote';
voteId: bigint;
adminIndex: bigint;
vote: bigint;
}
export function storeVote(src: Vote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(3060856014, 32);
b_0.storeInt(src.voteId, 257);
b_0.storeInt(src.adminIndex, 257);
b_0.storeInt(src.vote, 257);
};
}
export function loadVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 3060856014) { throw Error('Invalid prefix'); }
let _voteId = sc_0.loadIntBig(257);
let _adminIndex = sc_0.loadIntBig(257);
let _vote = sc_0.loadIntBig(257);
return { $$type: 'Vote' as const, voteId: _voteId, adminIndex: _adminIndex, vote: _vote };
}
function loadTupleVote(source: TupleReader) {
let _voteId = source.readBigNumber();
let _adminIndex = source.readBigNumber();
let _vote = source.readBigNumber();
return { $$type: 'Vote' as const, voteId: _voteId, adminIndex: _adminIndex, vote: _vote };
}
function storeTupleVote(source: Vote) {
let builder = new TupleBuilder();
builder.writeNumber(source.voteId);
builder.writeNumber(source.adminIndex);
builder.writeNumber(source.vote);
return builder.build();
}
function dictValueParserVote(): DictionaryValue<Vote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeVote(src)).endCell());
},
parse: (src) => {
return loadVote(src.loadRef().beginParse());
}
}
}
export type AddressList = {
$$type: 'AddressList';
addresses: Dictionary<bigint, Address>;
length: bigint;
}
export function storeAddressList(src: AddressList) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeDict(src.addresses, Dictionary.Keys.BigInt(257), Dictionary.Values.Address());
b_0.storeInt(src.length, 257);
};
}
export function loadAddressList(slice: Slice) {
let sc_0 = slice;
let _addresses = Dictionary.load(Dictionary.Keys.BigInt(257), Dictionary.Values.Address(), sc_0);
let _length = sc_0.loadIntBig(257);
return { $$type: 'AddressList' as const, addresses: _addresses, length: _length };
}
function loadTupleAddressList(source: TupleReader) {
let _addresses = Dictionary.loadDirect(Dictionary.Keys.BigInt(257), Dictionary.Values.Address(), source.readCellOpt());
let _length = source.readBigNumber();
return { $$type: 'AddressList' as const, addresses: _addresses, length: _length };
}
function storeTupleAddressList(source: AddressList) {
let builder = new TupleBuilder();
builder.writeCell(source.addresses.size > 0 ? beginCell().storeDictDirect(source.addresses, Dictionary.Keys.BigInt(257), Dictionary.Values.Address()).endCell() : null);
builder.writeNumber(source.length);
return builder.build();
}
function dictValueParserAddressList(): DictionaryValue<AddressList> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeAddressList(src)).endCell());
},
parse: (src) => {
return loadAddressList(src.loadRef().beginParse());
}
}
}
export type Distribution = {
$$type: 'Distribution';
addresses: AddressList;
percents: Dictionary<Address, bigint>;
}
export function storeDistribution(src: Distribution) {
return (builder: Builder) => {
let b_0 = builder;
b_0.store(storeAddressList(src.addresses));
b_0.storeDict(src.percents, Dictionary.Keys.Address(), Dictionary.Values.BigInt(257));
};
}
export function loadDistribution(slice: Slice) {
let sc_0 = slice;
let _addresses = loadAddressList(sc_0);
let _percents = Dictionary.load(Dictionary.Keys.Address(), Dictionary.Values.BigInt(257), sc_0);
return { $$type: 'Distribution' as const, addresses: _addresses, percents: _percents };
}
function loadTupleDistribution(source: TupleReader) {
const _addresses = loadTupleAddressList(source.readTuple());
let _percents = Dictionary.loadDirect(Dictionary.Keys.Address(), Dictionary.Values.BigInt(257), source.readCellOpt());
return { $$type: 'Distribution' as const, addresses: _addresses, percents: _percents };
}
function storeTupleDistribution(source: Distribution) {
let builder = new TupleBuilder();
builder.writeTuple(storeTupleAddressList(source.addresses));
builder.writeCell(source.percents.size > 0 ? beginCell().storeDictDirect(source.percents, Dictionary.Keys.Address(), Dictionary.Values.BigInt(257)).endCell() : null);
return builder.build();
}
function dictValueParserDistribution(): DictionaryValue<Distribution> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeDistribution(src)).endCell());
},
parse: (src) => {
return loadDistribution(src.loadRef().beginParse());
}
}
}
export type InitiateDistributionVote = {
$$type: 'InitiateDistributionVote';
adminIndex: bigint;
quorum_percent: bigint;
vote_time: bigint;
distribution: Distribution;
}
export function storeInitiateDistributionVote(src: InitiateDistributionVote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(276353205, 32);
b_0.storeInt(src.adminIndex, 257);
b_0.storeInt(src.quorum_percent, 257);
b_0.storeInt(src.vote_time, 257);
let b_1 = new Builder();
b_1.store(storeDistribution(src.distribution));
b_0.storeRef(b_1.endCell());
};
}
export function loadInitiateDistributionVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 276353205) { throw Error('Invalid prefix'); }
let _adminIndex = sc_0.loadIntBig(257);
let _quorum_percent = sc_0.loadIntBig(257);
let _vote_time = sc_0.loadIntBig(257);
let sc_1 = sc_0.loadRef().beginParse();
let _distribution = loadDistribution(sc_1);
return { $$type: 'InitiateDistributionVote' as const, adminIndex: _adminIndex, quorum_percent: _quorum_percent, vote_time: _vote_time, distribution: _distribution };
}
function loadTupleInitiateDistributionVote(source: TupleReader) {
let _adminIndex = source.readBigNumber();
let _quorum_percent = source.readBigNumber();
let _vote_time = source.readBigNumber();
const _distribution = loadTupleDistribution(source.readTuple());
return { $$type: 'InitiateDistributionVote' as const, adminIndex: _adminIndex, quorum_percent: _quorum_percent, vote_time: _vote_time, distribution: _distribution };
}
function storeTupleInitiateDistributionVote(source: InitiateDistributionVote) {
let builder = new TupleBuilder();
builder.writeNumber(source.adminIndex);
builder.writeNumber(source.quorum_percent);
builder.writeNumber(source.vote_time);
builder.writeTuple(storeTupleDistribution(source.distribution));
return builder.build();
}
function dictValueParserInitiateDistributionVote(): DictionaryValue<InitiateDistributionVote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeInitiateDistributionVote(src)).endCell());
},
parse: (src) => {
return loadInitiateDistributionVote(src.loadRef().beginParse());
}
}
}
export type WithdrawalRequests = {
$$type: 'WithdrawalRequests';
addresses: Dictionary<bigint, Address>;
@ -964,9 +1395,9 @@ function dictValueParserWithdraw(): DictionaryValue<Withdraw> {
}
}
async function TONB_init(owner: Address, content: Cell | null) {
const __init = 'te6ccgEBBwEAhgABFP8A9KQT9LzyyAsBAgFiAgMCAs0EBQAJoUrd4AsAAdQBJWW1tcG0hfwjIzAhEdBYVE9s8yYGAJpQh/oCUAXPFiNus5Z/AcoAE8yWM3BQA8oA4soAASBulTBwAcsBks8W4gEgbpUwcAHLAZLPFuICyIEBAc8AASBulTBwAcsBks8W4skBzA==';
const __code = 'te6ccgECUAEABqAAART/APSkE/S88sgLAQIBYgIDAgLKBAUCASAGBwIBIAwNAgEgHB0BDb4o7tnngYwXAgFICAkCAVgKCwCVt3owTgudh6ullc9j0J2HOslQo2zQThO6xqWlbI+WZFp15b++LEcwThhMiKTJr7fJFy9sM7TqukCwTggZzq084r86ShYDrC3EyPZQARGtvO2eKoP4FcAXARGvFu2eeBZ4D0AXAgHODg8AA6dABKkcCHXScIflTAg1wsf3gLQ0wMBcbDAAZF/kXDiAfpAIlBmbwT4YQKRW+AgghAh7rYHuo+XMNs8CNs8MRB4EGcQVhBFEDRBMPAy2zzgIMAAItdJwSGwgFxAZEQALCBu8tCAgACDTHwGCECHutge68uCB+gABBDiPB1vbPPAz2zzgIIIQYFkVELrjAiCCEAwIep66FxkSEwMuMNs8CNs8MRB4EGcQVhBFEDRBMPA02zwXFBkEQo+XMNs8CNs8MRB4EGcQVhBFEDRBMPA12zzgghB73Zfeuhc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DIcgHLAXABywASygfL/8nQgAgEgk5IAAfICAWKVlAALQgbvLQgIBIlHAh10nCH5UwINcLH94C0NMDAXGwwAGRf5Fw4gH6QCJQZm8E+GECjwkw2zxVBfAs2zzgIIIQD4p+pbrjAiCCEBeNRRm6ignpyWBESPlzDbPAbbPDgQzRC8EKsQmhCJVQbwKds84CCCEFlfB7y6oJuelwRAj5cw2zwG2zw0EIkQeBBnEFYQRVUC8CrbPOCCCpyDlrqgmp6YAzKPkts8Bts8MRBWEEUQNEEw8CvbPOAw8sCCoJmeAB7THwGCCpyDlrry4IH6QAEATNMfAYIQWV8HvLry4IHTP/oA+kABAfpAIdcLAcMAkQGSMW3iFEMwAKTTHwGCEBeNRRm68uCB0z/6APpAAQH6QCHXCwHDAJEBkjFt4gH6ACDUAdDSAAGVgQEB1wCSbQHi+kAh1wsBwwCRAZIxbeIxECgQJxAmECUQJBAjAy4w2zwG2zw3ELwQqxCaEIkQeFUF8CjbPKCdngBs0x8BghAPin6luvLggdM/+gD6QAEB+kAh1wsBwwCRAZIxbeIB0gABkdSSbQHi+gBRZhYVFEMwARjI+EIBzFVQ2zzJ7VSfAGxQVoEBAc8AUAPPFgHPFsoAyCJus5p/AcoAEoEBAc8AlTJwWMoA4lggbpUwcAHLAZLPFuLJAcwBFu1E0NQB+GLbPGwWoQBsgQEB1wD6QAEB+kABAdIA1AHQ0gABlYEBAdcAkm0B4vpAIdcLAcMAkQGSMW3iMRAmECUQJBAjrIrdPA==';
let systemCell = Cell.fromBase64(__system);
let builder = new TupleBuilder();
builder.writeCell(systemCell);
@ -1020,6 +1451,7 @@ const TONB_errors: { [key: number]: { message: string } } = {
13650: { message: `Invalid bounced message` },
16059: { message: `Invalid value` },
32366: { message: `not enough money for deposit` },
44816: { message: `Wallet is blacklisted` },
62972: { message: `Invalid balance` },
}

2
sources/output/jetton_TONBWallet.abi

File diff suppressed because one or more lines are too long

BIN
sources/output/jetton_TONBWallet.code.boc

Binary file not shown.

76
sources/output/jetton_TONBWallet.code.fc

@ -181,11 +181,18 @@ 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, int, slice) v) inline_ref {
var (v'balance, v'owner, v'master, v'linker, v'linker_address) = v;
(slice, ((slice))) __gen_read_BlacklistWallet(slice sc_0) inline_ref {
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_TONBWallet(builder build_0, (int, slice, slice, int, int, slice) v) inline_ref {
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);
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);
@ -193,14 +200,15 @@ builder __gen_write_TONBWallet(builder build_0, (int, slice, slice, int, slice)
return build_0;
}
(slice, ((int, slice, slice, int, slice))) __gen_read_TONBWallet(slice sc_0) inline_ref {
(slice, ((int, slice, slice, int, 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();
var v'blacklisted = sc_0~load_int(1);
slice sc_1 = sc_0~load_ref().begin_parse();
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));
return (sc_0, (v'balance, v'owner, v'master, v'blacklisted, v'linker, v'linker_address));
}
_ __gen_StateInit_get_code((cell, cell) v) inline {
@ -213,13 +221,13 @@ _ __gen_StateInit_get_code((cell, cell) v) inline {
return (v'balance, v'owner, v'master, v'walletCode);
}
(int, slice, slice, int, slice) __gen_load_TONBWallet() inline_ref {
(int, slice, slice, int, 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, int, slice) v) impure inline_ref {
() __gen_store_TONBWallet((int, slice, slice, int, int, slice) v) impure inline_ref {
builder b = begin_cell();
b = b.store_ref(__tact_context_sys);
b = __gen_write_TONBWallet(b, v);
@ -285,13 +293,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, $self'linker_address)) = (null(), null(), null(), 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'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, $self'linker_address));
b' = __gen_write_TONBWallet(b', ($self'balance, $self'owner, $self'master, $self'blacklisted, $self'linker, $self'linker_address));
return b'.end_cell();
}
@ -307,8 +315,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, int, slice) $self) impure {
var (($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address)) = $self;
(int, slice, slice, cell) $__gen_TONBWallet_get_wallet_data((int, slice, slice, int, int, slice) $self) impure {
var (($self'balance, $self'owner, $self'master, $self'blacklisted, $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)));
}
@ -318,9 +326,10 @@ _ $__gen_get_get_wallet_data() method_id(97026) {
return __gen_JettonWalletData_to_external(res);
}
(((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;
(((int, slice, slice, int, int, slice)), ()) $__gen_TONBWallet_receive_TokenTransfer((int, slice, slice, int, int, slice) $self, (int, int, slice, slice, cell, int, slice) $msg) impure {
var ($self'balance, $self'owner, $self'master, $self'blacklisted, $self'linker, $self'linker_address) = $self;
var ($msg'queryId, $msg'amount, $msg'destination, $msg'responseDestination, $msg'customPayload, $msg'forwardTonAmount, $msg'forwardPayload) = $msg;
throw_unless(44816, (~ $self'blacklisted));
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get();
throw_unless(4429, __tact_address_eq($ctx'sender, $self'owner));
$self'balance = ($self'balance - $msg'amount);
@ -334,11 +343,11 @@ _ $__gen_get_get_wallet_data() method_id(97026) {
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(), null())), $init'code, $init'data));
return (($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address), ());
return (($self'balance, $self'owner, $self'master, $self'blacklisted, $self'linker, $self'linker_address), ());
}
(((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;
(((int, slice, slice, int, int, slice)), ()) $__gen_TONBWallet_receive_TokenTransferInternal((int, slice, slice, int, int, slice) $self, (int, int, slice, slice, int, slice, int, slice) $msg) impure {
var ($self'balance, $self'owner, $self'master, $self'blacklisted, $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)) {
@ -363,11 +372,11 @@ _ $__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, $self'linker_address), ());
return (($self'balance, $self'owner, $self'master, $self'blacklisted, $self'linker, $self'linker_address), ());
}
(((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;
(((int, slice, slice, int, int, slice)), ()) $__gen_TONBWallet_receive_TokenBurn((int, slice, slice, int, int, slice) $self, (int, int, slice, slice) $msg) impure {
var ($self'balance, $self'owner, $self'master, $self'blacklisted, $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_address)));
@ -376,18 +385,30 @@ _ $__gen_get_get_wallet_data() method_id(97026) {
int $fwdFee = $__gen_Context_readForwardFee(($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw));
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, $self'linker_address), ());
return (($self'balance, $self'owner, $self'master, $self'blacklisted, $self'linker, $self'linker_address), ());
}
(((int, slice, slice, int, int, slice)), ()) $__gen_TONBWallet_receive_BlacklistWallet((int, slice, slice, int, int, slice) $self, (slice) $_msg) impure {
var ($self'balance, $self'owner, $self'master, $self'blacklisted, $self'linker, $self'linker_address) = $self;
var ($_msg'wallet) = $_msg;
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get();
throw_unless(4429, (__tact_address_eq($ctx'sender, $self'master) | __tact_address_eq($ctx'sender, $self'linker_address)));
$self'blacklisted = true;
int $amount = $self'balance;
$self'balance = 0;
$send((true, $self'master, 0, 64, __gen_writecell_TokenBurnNotification((0, $amount, $self'owner, $self'owner)), null(), null()));
return (($self'balance, $self'owner, $self'master, $self'blacklisted, $self'linker, $self'linker_address), ());
}
((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;
((int, slice, slice, int, int, slice), ()) $__gen_TONBWallet_receive_bounced((int, slice, slice, int, int, slice) $self, slice $msg) impure {
var ($self'balance, $self'owner, $self'master, $self'blacklisted, $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, $self'linker_address), ());
return (($self'balance, $self'owner, $self'master, $self'blacklisted, $self'linker, $self'linker_address), ());
}
@ -439,6 +460,15 @@ _ $__gen_get_get_wallet_data() method_id(97026) {
return ();
}
;; Receive BlacklistWallet message
if (op == 43811734) {
var self = __gen_load_TONBWallet();
var msg = in_msg~__gen_read_BlacklistWallet();
self~$__gen_TONBWallet_receive_BlacklistWallet(msg);
__gen_store_TONBWallet(self);
return ();
}
throw(130);
}
@ -451,5 +481,5 @@ _ supported_interfaces() method_id {
}
_ get_abi_ipfs() {
return "ipfs://QmNcnMjCZjwpaP9xLwcPNt8ziw2bt7pGUNu1PCVFvkfGtv";
return "ipfs://QmPUAFaC5zcamYhWHG5KeLoZhES1TbT25fgkJq3JKn4sEV";
}

147
sources/output/jetton_TONBWallet.code.fif

@ -25,6 +25,7 @@ PROGRAM{
DECLPROC __gen_writecell_TokenBurnNotification
DECLPROC __gen_write_TokenExcesses
DECLPROC __gen_writecell_TokenExcesses
DECLPROC __gen_read_BlacklistWallet
DECLPROC __gen_write_TONBWallet
DECLPROC __gen_read_TONBWallet
DECLPROC __gen_StateInit_get_code
@ -41,6 +42,7 @@ PROGRAM{
DECLPROC $__gen_TONBWallet_receive_TokenTransfer
DECLPROC $__gen_TONBWallet_receive_TokenTransferInternal
DECLPROC $__gen_TONBWallet_receive_TokenBurn
DECLPROC $__gen_TONBWallet_receive_BlacklistWallet
DECLPROC $__gen_TONBWallet_receive_bounced
DECLPROC recv_internal
113617 DECLMETHOD supported_interfaces
@ -323,14 +325,23 @@ PROGRAM{
__gen_write_TokenExcesses INLINECALLDICT
ENDC
}>
__gen_read_BlacklistWallet PROCREF:<{
32 LDU
SWAP
43811734 PUSHINT
EQUAL
129 THROWIFNOT
__tact_load_address INLINECALLDICT
}>
__gen_write_TONBWallet PROCREF:<{
s4 s5 XCHG2
s5 s6 XCHG2
257 PUSHINT
STIX
ROT
s0 s3 XCHG2
__tact_store_address INLINECALLDICT
SWAP
__tact_store_address INLINECALLDICT
1 STI
NEWC
s2 PUSH
ISNULL
@ -361,6 +372,7 @@ PROGRAM{
SWAP
__tact_load_address INLINECALLDICT
SWAP
1 LDI
LDREF
SWAP
CTOS
@ -375,6 +387,7 @@ PROGRAM{
}>
__tact_load_address_opt INLINECALLDICT
NIP
s2 s6 XCHG
s2 s5 XCHG
s2 s4 XCHG
s2 s3 XCHG
@ -391,14 +404,14 @@ PROGRAM{
SWAP
__tact_context_sys SETGLOB
__gen_read_TONBWallet INLINECALLDICT
1 5 BLKDROP2
1 6 BLKDROP2
}>
__gen_store_TONBWallet PROCREF:<{
NEWC
__tact_context_sys GETGLOB
SWAP
STREF
5 -ROLL
6 -ROLL
__gen_write_TONBWallet INLINECALLDICT
ENDC
c4 POP
@ -521,14 +534,16 @@ PROGRAM{
1 RSHIFT#
}>
$__gen_TONBWallet_init PROC:<{
FALSE
PUSHNULL
PUSHNULL
0 PUSHINT
s0 s5 XCHG
s0 s6 XCHG
NEWC
STREF
s0 s6 XCHG
s0 s5 XCHG
s4 s4 s4 XCHG3
3 -ROLL
__gen_write_TONBWallet INLINECALLDICT
ENDC
}>
@ -552,7 +567,7 @@ PROGRAM{
$__gen_TONBWallet_init CALLDICT
}>
$__gen_TONBWallet_get_wallet_data PROC:<{
2DROP
3 BLKDROP
__tact_context_sys GETGLOB
s1 s2 PUSH2
$__gen_TONBWallet_init_child CALLDICT
@ -565,19 +580,23 @@ PROGRAM{
}>
$__gen_TONBWallet_receive_TokenTransfer PROC:<{
2 2 BLKDROP2
44816 PUSHINT
s8 PUSH
NOT
THROWANYIFNOT
__tact_context_get INLINECALLDICT
4429 PUSHINT
s3 s13 PUSH2
s3 s14 PUSH2
__tact_address_eq INLINECALLDICT
THROWANYIFNOT
s13 s7 XCPU
s14 s7 XCPU
SUB
62972 PUSHINT
OVER
-1 GTINT
THROWANYIFNOT
s3 s3 s0 XCHG3
s3 s13 PUXC
s3 s14 PUXC
$__gen_Context_readForwardFee CALLDICT
1 PUSHINT
s4 PUSH
@ -597,7 +616,7 @@ PROGRAM{
GREATER
THROWANYIFNOT
__tact_context_sys GETGLOB
s0 s8 s3 XCPUXC
s0 s9 s3 XCPUXC
$__gen_TONBWallet_init_child CALLDICT
2DUP
$contractAddress CALLDICT
@ -607,10 +626,10 @@ PROGRAM{
64 PUSHINT
PUSHNULL
PUSHNULL
s15 PUSH
s0 s4 XCHG
16 s() PUSH
s0 s4 XCHG
17 s() PUSH
s0 s4 XCHG
s3 s10 XCHG
s11 s10 s11 XCHG3
__gen_writecell_TokenTransferInternal INLINECALLDICT
@ -632,14 +651,14 @@ PROGRAM{
s4 POP
s4 POP
}>
s0 s12 PUSH2
s0 s13 PUSH2
__tact_address_neq INLINECALLDICT
s1 s11 PUSH2
__tact_address_neq INLINECALLDICT
AND
IF:<{
__tact_context_sys GETGLOB
s13 s8 PUSH2
s14 s8 PUSH2
$__gen_TONBWallet_init_child CALLDICT
SWAP
4429 PUSHINT
@ -649,7 +668,7 @@ PROGRAM{
__tact_address_eq INLINECALLDICT
THROWANYIFNOT
}>
s14 s8 XCPU
s15 s8 XCPU
ADD
62972 PUSHINT
OVER
@ -669,12 +688,13 @@ PROGRAM{
s6 PUSH
0 GTINT
IF:<{
s3 s1 s15 XCHG3
s2 s3 XCHG
s0 16 s() XCHG
s4 s2 XCHG2
$__gen_Context_readForwardFee CALLDICT
s3 s(-1) PUXC
ADD
s1 s12 XCHG
s1 s13 XCHG
SUB
FALSE
0 PUSHINT
@ -682,20 +702,20 @@ PROGRAM{
s8 s1 s3 XCHG3
s7 s4 XCHG2
__gen_writecell_TokenNotification INLINECALLDICT
s10 PUSH
s11 PUSH
s4 s6 XCHG
s3 s1 s3 XCHG3
s5 s5 XCHG2
PUSHNULL
PUSHNULL
$send CALLDICT
s0 s7 XCHG2
s0 s8 XCHG2
}>ELSE<{
s7 s15 XCHG
s7 16 s() XCHG
s8 s9 XCHG2
8 BLKDROP
}>
s7 PUSH
s8 PUSH
ISNULL
NOT
s2 PUSH
@ -703,19 +723,19 @@ PROGRAM{
AND
IF:<{
FALSE
s0 s8 XCHG
s0 s9 XCHG
__tact_not_null CALLDICT
0 PUSHINT
s0 s4 XCHG
__gen_writecell_TokenExcesses INLINECALLDICT
s4 s9 XCHG
s4 s10 XCHG
s3 s3 s0 XCHG3
s1 s9 XCHG
s1 s10 XCHG
PUSHNULL
PUSHNULL
$send CALLDICT
}>ELSE<{
s7 POP
s8 POP
2DROP
}>
}>
@ -723,23 +743,23 @@ PROGRAM{
2DROP
__tact_context_get INLINECALLDICT
4429 PUSHINT
s3 s10 PUSH2
s3 s11 PUSH2
__tact_address_eq INLINECALLDICT
s4 s10 PUSH2
s4 s11 PUSH2
__tact_address_eq INLINECALLDICT
OR
s4 s8 PUSH2
__tact_address_eq INLINECALLDICT
OR
THROWANYIFNOT
s10 s4 XCPU
s11 s4 XCPU
SUB
62972 PUSHINT
OVER
-1 GTINT
THROWANYIFNOT
s3 s3 s0 XCHG3
s3 s10 PUXC
s3 s11 PUXC
$__gen_Context_readForwardFee CALLDICT
DROP
16059 PUSHINT
@ -751,14 +771,44 @@ PROGRAM{
0 PUSHINT
s0 s3 XCHG
64 PUSHINT
s3 s8 s8 XCPU2
s3 s9 s9 XCPU2
__gen_writecell_TokenBurnNotification INLINECALLDICT
s3 s0 s6 XC2PU
s3 s0 s7 XC2PU
s3 s3 XCHG2
PUSHNULL
PUSHNULL
$send CALLDICT
}>
$__gen_TONBWallet_receive_BlacklistWallet PROC:<{
DROP
s2 POP
__tact_context_get INLINECALLDICT
s2 s3 XCHG
3 BLKDROP
4429 PUSHINT
s1 s4 PUSH2
__tact_address_eq INLINECALLDICT
s2 s4 XCPU
__tact_address_eq INLINECALLDICT
s1 s2 XCHG
OR
THROWANYIFNOT
TRUE
0 PUSHINT
TRUE
s1 s1 PUSH2
64 PUSHINT
s10 s9 s9 XCPU2
__gen_writecell_TokenBurnNotification INLINECALLDICT
s7 PUSH
s0 s3 XCHG
s0 s4 XCHG
s10 s10 XCHG2
PUSHNULL
PUSHNULL
$send CALLDICT
s0 s2 XCHG
}>
$__gen_TONBWallet_receive_bounced PROC:<{
32 PUSHINT
SDSKIPFIRST
@ -778,9 +828,9 @@ PROGRAM{
OR
s1 s2 XCHG
THROWANYIFNOT
s1 s5 XCHG
s1 s6 XCHG
ADD
s0 s4 XCHG
s0 s5 XCHG
}>
recv_internal PROC:<{
0 PUSHINT
@ -814,7 +864,7 @@ PROGRAM{
IFJMP:<{
DROP
__gen_load_TONBWallet INLINECALLDICT
5 ROLL
6 ROLL
$__gen_TONBWallet_receive_bounced CALLDICT
__gen_store_TONBWallet INLINECALLDICT
}>
@ -824,9 +874,10 @@ PROGRAM{
IFJMP:<{
DROP
__gen_load_TONBWallet INLINECALLDICT
s0 s5 XCHG
s0 s6 XCHG
__gen_read_TokenTransfer INLINECALLDICT
s7 POP
s11 s12 XCHG
s10 s11 XCHG
s9 s10 XCHG
s8 s9 XCHG
@ -841,9 +892,10 @@ PROGRAM{
IFJMP:<{
DROP
__gen_load_TONBWallet INLINECALLDICT
s0 s5 XCHG
s0 s6 XCHG
__gen_read_TokenTransferInternal INLINECALLDICT
s8 POP
s12 s13 XCHG
s11 s12 XCHG
s10 s11 XCHG
s9 s10 XCHG
@ -852,13 +904,16 @@ PROGRAM{
$__gen_TONBWallet_receive_TokenTransferInternal CALLDICT
__gen_store_TONBWallet INLINECALLDICT
}>
DUP
1499400124 PUSHINT
EQUAL
IFJMP:<{
DROP
__gen_load_TONBWallet INLINECALLDICT
s0 s5 XCHG
s0 s6 XCHG
__gen_read_TokenBurn INLINECALLDICT
s4 POP
s8 s9 XCHG
s7 s8 XCHG
s6 s7 XCHG
s5 s6 XCHG
@ -867,6 +922,20 @@ PROGRAM{
$__gen_TONBWallet_receive_TokenBurn CALLDICT
__gen_store_TONBWallet INLINECALLDICT
}>
43811734 PUSHINT
EQUAL
IFJMP:<{
__gen_load_TONBWallet INLINECALLDICT
s0 s6 XCHG
__gen_read_BlacklistWallet INLINECALLDICT
NIP
s5 s6 XCHG
s4 s5 XCHG
s3 s4 XCHG
s1 s3 s0 XCHG3
$__gen_TONBWallet_receive_BlacklistWallet CALLDICT
__gen_store_TONBWallet INLINECALLDICT
}>
DROP
130 THROW
}>
@ -876,6 +945,6 @@ PROGRAM{
209778528950190195973528115415557644819 PUSHINT
}>
get_abi_ipfs PROC:<{
x{697066733a2f2f516d4e636e4d6a435a6a7770615039784c7763504e74387a6977326274377047554e753150435646766b66477476} PUSHSLICE
x{697066733a2f2f516d505541466143357a63616d5968574847354b654c6f5a68455331546254323566676b4a71334a4b6e34734556} PUSHSLICE
}>
}END>c

377
sources/output/jetton_TONBWallet.code.rev.fif

@ -49,6 +49,7 @@ SETCP0
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
1 LDI
LDREF
s0 s1 XCHG
CTOS
@ -76,28 +77,30 @@ SETCP0
}> PUSHCONT
IFELSE
s1 POP
s2 s6 XCHG
s2 s5 XCHG
s2 s4 XCHG
s2 s3 XCHG
}> CALLREF
1 5 BLKDROP2
1 6 BLKDROP2
}> CALLREF
1 5 BLKSWAP
42 CALLDICT
1 6 BLKSWAP
44 CALLDICT
<{
NEWC
2 GETGLOBVAR
s0 s1 XCHG
STREF
5 1 BLKSWAP
6 1 BLKSWAP
<{
s4 s5 XCHG2
s5 s6 XCHG2
257 PUSHINT
STIX
ROT
s0 s3 XCHG2
STSLICER
s0 s1 XCHG
STSLICER
1 STI
NEWC
s2 PUSH
ISNULL
@ -159,6 +162,7 @@ SETCP0
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
1 LDI
LDREF
s0 s1 XCHG
CTOS
@ -186,13 +190,14 @@ SETCP0
}> PUSHCONT
IFELSE
s1 POP
s2 s6 XCHG
s2 s5 XCHG
s2 s4 XCHG
s2 s3 XCHG
}> CALLREF
1 5 BLKDROP2
1 6 BLKDROP2
}> CALLREF
s0 s5 XCHG
s0 s6 XCHG
<{
32 LDU
s0 s1 XCHG
@ -235,26 +240,28 @@ SETCP0
s3 s3 s0 XCHG3
}> CALLREF
s7 POP
s11 s12 XCHG
s10 s11 XCHG
s9 s10 XCHG
s8 s9 XCHG
s7 s8 XCHG
1 6 BLKSWAP
39 CALLDICT
40 CALLDICT
<{
NEWC
2 GETGLOBVAR
s0 s1 XCHG
STREF
5 1 BLKSWAP
6 1 BLKSWAP
<{
s4 s5 XCHG2
s5 s6 XCHG2
257 PUSHINT
STIX
ROT
s0 s3 XCHG2
STSLICER
s0 s1 XCHG
STSLICER
1 STI
NEWC
s2 PUSH
ISNULL
@ -315,6 +322,7 @@ SETCP0
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
1 LDI
LDREF
s0 s1 XCHG
CTOS
@ -342,13 +350,14 @@ SETCP0
}> PUSHCONT
IFELSE
s1 POP
s2 s6 XCHG
s2 s5 XCHG
s2 s4 XCHG
s2 s3 XCHG
}> CALLREF
1 5 BLKDROP2
1 6 BLKDROP2
}> CALLREF
s0 s5 XCHG
s0 s6 XCHG
<{
32 LDU
s0 s1 XCHG
@ -410,26 +419,28 @@ SETCP0
s2 s3 XCHG
}> CALLREF
s8 POP
s12 s13 XCHG
s11 s12 XCHG
s10 s11 XCHG
s9 s10 XCHG
s8 s9 XCHG
1 7 BLKSWAP
40 CALLDICT
41 CALLDICT
<{
NEWC
2 GETGLOBVAR
s0 s1 XCHG
STREF
5 1 BLKSWAP
6 1 BLKSWAP
<{
s4 s5 XCHG2
s5 s6 XCHG2
257 PUSHINT
STIX
ROT
s0 s3 XCHG2
STSLICER
s0 s1 XCHG
STSLICER
1 STI
NEWC
s2 PUSH
ISNULL
@ -471,9 +482,11 @@ SETCP0
}> CALLREF
}> PUSHCONT
IFJMP
s0 PUSH
1499400124 PUSHINT
EQUAL
<{
s0 POP
<{
c4 PUSH
CTOS
@ -489,6 +502,7 @@ SETCP0
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
1 LDI
LDREF
s0 s1 XCHG
CTOS
@ -516,13 +530,14 @@ SETCP0
}> PUSHCONT
IFELSE
s1 POP
s2 s6 XCHG
s2 s5 XCHG
s2 s4 XCHG
s2 s3 XCHG
}> CALLREF
1 5 BLKDROP2
1 6 BLKDROP2
}> CALLREF
s0 s5 XCHG
s0 s6 XCHG
<{
32 LDU
s0 s1 XCHG
@ -550,26 +565,153 @@ SETCP0
s3 s3 s0 XCHG3
}> CALLREF
s4 POP
s8 s9 XCHG
s7 s8 XCHG
s6 s7 XCHG
s5 s6 XCHG
s4 s5 XCHG
1 3 BLKSWAP
41 CALLDICT
42 CALLDICT
<{
NEWC
2 GETGLOBVAR
s0 s1 XCHG
STREF
5 1 BLKSWAP
6 1 BLKSWAP
<{
s4 s5 XCHG2
s5 s6 XCHG2
257 PUSHINT
STIX
s0 s3 XCHG2
STSLICER
s0 s1 XCHG
STSLICER
1 STI
NEWC
s2 PUSH
ISNULL
NOT
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
s1 s2 XCHG
257 PUSHINT
STIX
}> PUSHCONT
<{
s2 POP
0 PUSHINT
ROT
1 STI
}> PUSHCONT
IFELSE
ROT
s0 PUSH
ISNULL
<{
s0 POP
0 PUSHINT
s0 s1 XCHG
2 STU
}> PUSHCONT
<{
STSLICER
}> PUSHCONT
IFELSE
ENDC
s0 s1 XCHG
STREF
}> CALLREF
ENDC
c4 POP
}> CALLREF
}> PUSHCONT
IFJMP
43811734 PUSHINT
EQUAL
<{
<{
c4 PUSH
CTOS
LDREF
s0 s1 XCHG
2 SETGLOBVAR
<{
257 PUSHINT
LDI
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
1 LDI
LDREF
s0 s1 XCHG
CTOS
1 LDI
s0 s1 XCHG
<{
257 PUSHINT
LDI
}> PUSHCONT
<{
PUSHNULL
s0 s1 XCHG
}> PUSHCONT
IFELSE
LDMSGADDR
s1 PUSH
2 PLDU
0 NEQINT
<{
s0 s1 XCHG
}> PUSHCONT
<{
s1 POP
PUSHNULL
}> PUSHCONT
IFELSE
s1 POP
s2 s6 XCHG
s2 s5 XCHG
s2 s4 XCHG
s2 s3 XCHG
}> CALLREF
1 6 BLKDROP2
}> CALLREF
s0 s6 XCHG
<{
32 LDU
s0 s1 XCHG
43811734 PUSHINT
EQUAL
129 THROWIFNOT
LDMSGADDR
s0 s1 XCHG
}> CALLREF
s1 POP
s5 s6 XCHG
s4 s5 XCHG
s3 s4 XCHG
s1 s3 s0 XCHG3
43 CALLDICT
<{
NEWC
2 GETGLOBVAR
s0 s1 XCHG
STREF
6 1 BLKSWAP
<{
s5 s6 XCHG2
257 PUSHINT
STIX
s0 s3 XCHG2
STSLICER
s0 s1 XCHG
STSLICER
1 STI
NEWC
s2 PUSH
ISNULL
@ -619,9 +761,9 @@ SETCP0
ISNULL
128 THROWIF
30:
31:
33:
34:
0 PUSHINT
ROTREV
NEWC
@ -652,7 +794,7 @@ SETCP0
ENDC
CTOS
34:
35:
NEWC
1 PUSHINT
s0 s1 XCHG
@ -769,7 +911,7 @@ SETCP0
s0 s1 XCHG
1 STI
35:
36:
3 1 BLKDROP2
LDGRAMS
s1 POP
@ -782,23 +924,26 @@ SETCP0
3 MULCONST
1 RSHIFT
36:
37:
0 PUSHINT
PUSHNULL
PUSHNULL
0 PUSHINT
s0 s5 XCHG
s0 s6 XCHG
NEWC
STREF
s0 s6 XCHG
s0 s5 XCHG
s4 s4 s4 XCHG3
3 1 BLKSWAP
<{
s4 s5 XCHG2
s5 s6 XCHG2
257 PUSHINT
STIX
ROT
s0 s3 XCHG2
STSLICER
s0 s1 XCHG
STSLICER
1 STI
NEWC
s2 PUSH
ISNULL
@ -837,7 +982,7 @@ SETCP0
}> CALLREF
ENDC
37:
38:
s0 s2 XCHG
CTOS
LDDICT
@ -860,32 +1005,36 @@ SETCP0
STDICT
ENDC
s0 s0 s3 XCHG3
36 CALLDICT
37 CALLDICT
38:
2DROP
39:
3 BLKDROP
2 GETGLOBVAR
s1 s2 PUSH2
37 CALLDICT
38 CALLDICT
s0 POP
39:
40:
2 2 BLKDROP2
44816 PUSHINT
s8 PUSH
NOT
THROWANYIFNOT
1 GETGLOBVAR
4 UNTUPLE
4429 PUSHINT
s3 s13 PUSH2
s3 s14 PUSH2
SDEQ
THROWANYIFNOT
s13 s7 XCPU
s14 s7 XCPU
SUB
62972 PUSHINT
s1 PUSH
-1 GTINT
THROWANYIFNOT
s3 s3 s0 XCHG3
s3 s13 PUXC
35 CALLDICT
s3 s14 PUXC
36 CALLDICT
1 PUSHINT
s4 PUSH
0 GTINT
@ -905,20 +1054,20 @@ SETCP0
GREATER
THROWANYIFNOT
2 GETGLOBVAR
0 8 3 XCPUXC
37 CALLDICT
0 9 3 XCPUXC
38 CALLDICT
2DUP
33 CALLDICT
34 CALLDICT
-1 PUSHINT
s7 s6 XCHG2
0 PUSHINT
64 PUSHINT
PUSHNULL
PUSHNULL
s15 PUSH
s0 s4 XCHG
s16 PUSH
s0 s4 XCHG
s17 PUSH
s0 s4 XCHG
s3 s10 XCHG
s11 s10 s11 XCHG3
<{
@ -992,9 +1141,9 @@ SETCP0
s5 s6 XCHG
s3 s4 XCHG
ROTREV
34 CALLDICT
35 CALLDICT
40:
41:
1 GETGLOBVAR
4 UNTUPLE
s13 PUSH
@ -1010,7 +1159,7 @@ SETCP0
s4 POP
}> PUSHCONT
IFELSE
s0 s12 PUSH2
s0 s13 PUSH2
SDEQ
NOT
s1 s11 PUSH2
@ -1019,18 +1168,18 @@ SETCP0
AND
<{
2 GETGLOBVAR
s13 s8 PUSH2
37 CALLDICT
s14 s8 PUSH2
38 CALLDICT
s0 s1 XCHG
4429 PUSHINT
s0 s2 XCHG
33 CALLDICT
34 CALLDICT
s2 PUSH
SDEQ
THROWANYIFNOT
}> PUSHCONT
IF
s14 s8 XCPU
s15 s8 XCPU
ADD
62972 PUSHINT
s1 PUSH
@ -1051,17 +1200,20 @@ SETCP0
s6 PUSH
0 GTINT
<{
s7 s15 XCHG
s0 s7 XCHG
s0 s16 XCHG
s0 s7 XCHG
s8 s9 XCHG2
8 BLKDROP
}> PUSHCONT
<{
s3 s1 s15 XCHG3
s2 s3 XCHG
s0 s16 XCHG
s4 s2 XCHG2
35 CALLDICT
36 CALLDICT
s3 s-1 PUXC
ADD
s1 s12 XCHG
s1 s13 XCHG
SUB
0 PUSHINT
0 PUSHINT
@ -1086,28 +1238,28 @@ SETCP0
}> CALLREF
ENDC
}> CALLREF
s10 PUSH
s11 PUSH
s4 s6 XCHG
s3 s1 s3 XCHG3
s5 s5 XCHG2
PUSHNULL
PUSHNULL
34 CALLDICT
s0 s7 XCHG2
35 CALLDICT
s0 s8 XCHG2
}> IFREFELSE
s7 PUSH
s8 PUSH
ISNULL
NOT
s2 PUSH
0 GTINT
AND
<{
s7 POP
s8 POP
2DROP
}> PUSHCONT
<{
0 PUSHINT
s0 s8 XCHG
s0 s9 XCHG
2 CALLDICT
0 PUSHINT
s0 s4 XCHG
@ -1122,37 +1274,37 @@ SETCP0
}> CALLREF
ENDC
}> CALLREF
s4 s9 XCHG
s4 s10 XCHG
s3 s3 s0 XCHG3
s1 s9 XCHG
s1 s10 XCHG
PUSHNULL
PUSHNULL
34 CALLDICT
35 CALLDICT
}> IFREFELSE
41:
42:
2DROP
1 GETGLOBVAR
4 UNTUPLE
4429 PUSHINT
s3 s10 PUSH2
s3 s11 PUSH2
SDEQ
s4 s10 PUSH2
s4 s11 PUSH2
SDEQ
OR
s4 s8 PUSH2
SDEQ
OR
THROWANYIFNOT
s10 s4 XCPU
s11 s4 XCPU
SUB
62972 PUSHINT
s1 PUSH
-1 GTINT
THROWANYIFNOT
s3 s3 s0 XCHG3
s3 s10 PUXC
35 CALLDICT
s3 s11 PUXC
36 CALLDICT
s0 POP
16059 PUSHINT
s0 s1 XCHG
@ -1163,7 +1315,7 @@ SETCP0
0 PUSHINT
s0 s3 XCHG
64 PUSHINT
3 8 8 XCPU2
3 9 9 XCPU2
<{
NEWC
4 1 BLKSWAP
@ -1193,13 +1345,72 @@ SETCP0
}> CALLREF
ENDC
}> CALLREF
3 0 6 XC2PU
3 0 7 XC2PU
s3 s3 XCHG2
PUSHNULL
PUSHNULL
34 CALLDICT
35 CALLDICT
42:
43:
s0 POP
s2 POP
1 GETGLOBVAR
4 UNTUPLE
s2 s3 XCHG
3 BLKDROP
4429 PUSHINT
s1 s4 PUSH2
SDEQ
s2 s4 XCPU
SDEQ
s1 s2 XCHG
OR
THROWANYIFNOT
-1 PUSHINT
0 PUSHINT
-1 PUSHINT
s1 s1 PUSH2
64 PUSHINT
10 9 9 XCPU2
<{
NEWC
4 1 BLKSWAP
<{
2078119902 PUSHINT
s0 s5 XCHG2
32 STU
s1 s3 XCHG
64 STU
s0 s1 XCHG
STGRAMS
s0 s1 XCHG
STSLICER
s0 s1 XCHG
s0 PUSH
ISNULL
<{
s0 POP
0 PUSHINT
s0 s1 XCHG
2 STU
}> PUSHCONT
<{
STSLICER
}> PUSHCONT
IFELSE
}> CALLREF
ENDC
}> CALLREF
s7 PUSH
s0 s3 XCHG
s0 s4 XCHG
s10 s10 XCHG2
PUSHNULL
PUSHNULL
35 CALLDICT
s0 s2 XCHG
44:
32 PUSHINT
SDSKIPFIRST
32 LDU
@ -1218,9 +1429,9 @@ SETCP0
OR
s1 s2 XCHG
THROWANYIFNOT
s1 s5 XCHG
s1 s6 XCHG
ADD
s0 s4 XCHG
s0 s5 XCHG
get_wallet_data:
<{
@ -1238,6 +1449,7 @@ SETCP0
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
1 LDI
LDREF
s0 s1 XCHG
CTOS
@ -1265,14 +1477,15 @@ SETCP0
}> PUSHCONT
IFELSE
s1 POP
s2 s6 XCHG
s2 s5 XCHG
s2 s4 XCHG
s2 s3 XCHG
}> CALLREF
1 5 BLKDROP2
1 6 BLKDROP2
}> CALLREF
38 CALLDICT
30 CALLDICT
39 CALLDICT
31 CALLDICT
113617:
123515602279859691144772641439386770278 PUSHINT

BIN
sources/output/jetton_TONBWallet.init.boc

Binary file not shown.

9
sources/output/jetton_TONBWallet.init.fc

@ -17,11 +17,12 @@ builder __tact_store_address_opt(builder b, slice address) inline {
}
}
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;
builder __gen_write_TONBWallet(builder build_0, (int, slice, slice, int, int, slice) v) inline_ref {
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);
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);
@ -30,13 +31,13 @@ builder __gen_write_TONBWallet(builder build_0, (int, slice, slice, int, slice)
}
cell $__gen_TONBWallet_init(cell sys', slice $master, slice $owner) {
var (($self'balance, $self'owner, $self'master, $self'linker, $self'linker_address)) = (null(), null(), null(), 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'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, $self'linker_address));
b' = __gen_write_TONBWallet(b', ($self'balance, $self'owner, $self'master, $self'blacklisted, $self'linker, $self'linker_address));
return b'.end_cell();
}

11
sources/output/jetton_TONBWallet.init.fif

@ -28,13 +28,14 @@ PROGRAM{
}>
}>
__gen_write_TONBWallet PROCREF:<{
s4 s5 XCHG2
s5 s6 XCHG2
257 PUSHINT
STIX
ROT
s0 s3 XCHG2
__tact_store_address INLINECALLDICT
SWAP
__tact_store_address INLINECALLDICT
1 STI
NEWC
s2 PUSH
ISNULL
@ -59,14 +60,16 @@ PROGRAM{
STREF
}>
$__gen_TONBWallet_init PROC:<{
FALSE
PUSHNULL
PUSHNULL
0 PUSHINT
s0 s5 XCHG
s0 s6 XCHG
NEWC
STREF
s0 s6 XCHG
s0 s5 XCHG
s4 s4 s4 XCHG3
3 -ROLL
__gen_write_TONBWallet INLINECALLDICT
ENDC
}>

11
sources/output/jetton_TONBWallet.init.rev.fif

@ -3,22 +3,25 @@ SETCP0
recv_internal:
5:
0 PUSHINT
PUSHNULL
PUSHNULL
0 PUSHINT
s0 s5 XCHG
s0 s6 XCHG
NEWC
STREF
s0 s6 XCHG
s0 s5 XCHG
s4 s4 s4 XCHG3
3 1 BLKSWAP
<{
s4 s5 XCHG2
s5 s6 XCHG2
257 PUSHINT
STIX
ROT
s0 s3 XCHG2
STSLICER
s0 s1 XCHG
STSLICER
1 STI
NEWC
s2 PUSH
ISNULL

40
sources/output/jetton_TONBWallet.md

@ -1,9 +1,9 @@
# TACT Compilation Report
Contract: TONBWallet
BOC Size: 1514 bytes
BOC Size: 1650 bytes
# Types
Total Types: 18
Total Types: 27
## StateInit
TLB: `_ code:^cell data:^cell = StateInit`
@ -61,6 +61,42 @@ Signature: `SetLinkerNeighbor{neighbor:Maybe address}`
TLB: `init_linker#67c08154 neighbor:Maybe address walletAmount:int257 walletCode:^cell walletData:^cell walletAddress:address responseAddress:Maybe address = InitLinker`
Signature: `InitLinker{neighbor:Maybe address,walletAmount:int257,walletCode:^cell,walletData:^cell,walletAddress:address,responseAddress:Maybe address}`
## ForwardToWallet
TLB: `forward_to_wallet#5d1da2bb body:^cell = ForwardToWallet`
Signature: `ForwardToWallet{body:^cell}`
## BlacklistWallet
TLB: `blacklist_wallet#029c8396 wallet:address = BlacklistWallet`
Signature: `BlacklistWallet{wallet:address}`
## InitiateBlacklistVote
TLB: `initiate_blacklist_vote#e8fffb0b adminIndex:int257 wallet:address quorum_percent:int257 vote_time:int257 = InitiateBlacklistVote`
Signature: `InitiateBlacklistVote{adminIndex:int257,wallet:address,quorum_percent:int257,vote_time:int257}`
## InitiateLiquidationVote
TLB: `initiate_liquidation_vote#11fb862f adminIndex:int257 quorum_percent:int257 vote_time:int257 = InitiateLiquidationVote`
Signature: `InitiateLiquidationVote{adminIndex:int257,quorum_percent:int257,vote_time:int257}`
## FinishVote
TLB: `finish_vote#2a574443 voteId:int257 = FinishVote`
Signature: `FinishVote{voteId:int257}`
## Vote
TLB: `vote#b670f4ce voteId:int257 adminIndex:int257 vote:int257 = Vote`
Signature: `Vote{voteId:int257,adminIndex:int257,vote:int257}`
## AddressList
TLB: `_ addresses:dict<int, address> length:int257 = AddressList`
Signature: `AddressList{addresses:dict<int, address>,length:int257}`
## Distribution
TLB: `_ addresses:AddressList{addresses:dict<int, address>,length:int257} percents:dict<address, int> = Distribution`
Signature: `Distribution{addresses:AddressList{addresses:dict<int, address>,length:int257},percents:dict<address, int>}`
## InitiateDistributionVote
TLB: `initiate_distribution_vote#1078d0b5 adminIndex:int257 quorum_percent:int257 vote_time:int257 distribution:Distribution{addresses:AddressList{addresses:dict<int, address>,length:int257},percents:dict<address, int>} = InitiateDistributionVote`
Signature: `InitiateDistributionVote{adminIndex:int257,quorum_percent:int257,vote_time:int257,distribution:Distribution{addresses:AddressList{addresses:dict<int, address>,length:int257},percents:dict<address, int>}}`
## WithdrawalRequests
TLB: `_ addresses:dict<int, address> amounts:dict<int, int> n_requests:int257 = WithdrawalRequests`
Signature: `WithdrawalRequests{addresses:dict<int, address>,amounts:dict<int, int>,n_requests:int257}`

2
sources/output/jetton_TONBWallet.pkg

File diff suppressed because one or more lines are too long

443
sources/output/jetton_TONBWallet.ts

@ -791,6 +791,437 @@ function dictValueParserInitLinker(): DictionaryValue<InitLinker> {
}
}
}
export type ForwardToWallet = {
$$type: 'ForwardToWallet';
body: Cell;
}
export function storeForwardToWallet(src: ForwardToWallet) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(1562223291, 32);
b_0.storeRef(src.body);
};
}
export function loadForwardToWallet(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 1562223291) { throw Error('Invalid prefix'); }
let _body = sc_0.loadRef();
return { $$type: 'ForwardToWallet' as const, body: _body };
}
function loadTupleForwardToWallet(source: TupleReader) {
let _body = source.readCell();
return { $$type: 'ForwardToWallet' as const, body: _body };
}
function storeTupleForwardToWallet(source: ForwardToWallet) {
let builder = new TupleBuilder();
builder.writeCell(source.body);
return builder.build();
}
function dictValueParserForwardToWallet(): DictionaryValue<ForwardToWallet> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeForwardToWallet(src)).endCell());
},
parse: (src) => {
return loadForwardToWallet(src.loadRef().beginParse());
}
}
}
export type BlacklistWallet = {
$$type: 'BlacklistWallet';
wallet: Address;
}
export function storeBlacklistWallet(src: BlacklistWallet) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(43811734, 32);
b_0.storeAddress(src.wallet);
};
}
export function loadBlacklistWallet(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 43811734) { throw Error('Invalid prefix'); }
let _wallet = sc_0.loadAddress();
return { $$type: 'BlacklistWallet' as const, wallet: _wallet };
}
function loadTupleBlacklistWallet(source: TupleReader) {
let _wallet = source.readAddress();
return { $$type: 'BlacklistWallet' as const, wallet: _wallet };
}
function storeTupleBlacklistWallet(source: BlacklistWallet) {
let builder = new TupleBuilder();
builder.writeAddress(source.wallet);
return builder.build();
}
function dictValueParserBlacklistWallet(): DictionaryValue<BlacklistWallet> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeBlacklistWallet(src)).endCell());
},
parse: (src) => {
return loadBlacklistWallet(src.loadRef().beginParse());
}
}
}
export type InitiateBlacklistVote = {
$$type: 'InitiateBlacklistVote';
adminIndex: bigint;
wallet: Address;
quorum_percent: bigint;
vote_time: bigint;
}
export function storeInitiateBlacklistVote(src: InitiateBlacklistVote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(3909090059, 32);
b_0.storeInt(src.adminIndex, 257);
b_0.storeAddress(src.wallet);
b_0.storeInt(src.quorum_percent, 257);
let b_1 = new Builder();
b_1.storeInt(src.vote_time, 257);
b_0.storeRef(b_1.endCell());
};
}
export function loadInitiateBlacklistVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 3909090059) { throw Error('Invalid prefix'); }
let _adminIndex = sc_0.loadIntBig(257);
let _wallet = sc_0.loadAddress();
let _quorum_percent = sc_0.loadIntBig(257);
let sc_1 = sc_0.loadRef().beginParse();
let _vote_time = sc_1.loadIntBig(257);
return { $$type: 'InitiateBlacklistVote' as const, adminIndex: _adminIndex, wallet: _wallet, quorum_percent: _quorum_percent, vote_time: _vote_time };
}
function loadTupleInitiateBlacklistVote(source: TupleReader) {
let _adminIndex = source.readBigNumber();
let _wallet = source.readAddress();
let _quorum_percent = source.readBigNumber();
let _vote_time = source.readBigNumber();
return { $$type: 'InitiateBlacklistVote' as const, adminIndex: _adminIndex, wallet: _wallet, quorum_percent: _quorum_percent, vote_time: _vote_time };
}
function storeTupleInitiateBlacklistVote(source: InitiateBlacklistVote) {
let builder = new TupleBuilder();
builder.writeNumber(source.adminIndex);
builder.writeAddress(source.wallet);
builder.writeNumber(source.quorum_percent);
builder.writeNumber(source.vote_time);
return builder.build();
}
function dictValueParserInitiateBlacklistVote(): DictionaryValue<InitiateBlacklistVote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeInitiateBlacklistVote(src)).endCell());
},
parse: (src) => {
return loadInitiateBlacklistVote(src.loadRef().beginParse());
}
}
}
export type InitiateLiquidationVote = {
$$type: 'InitiateLiquidationVote';
adminIndex: bigint;
quorum_percent: bigint;
vote_time: bigint;
}
export function storeInitiateLiquidationVote(src: InitiateLiquidationVote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(301696559, 32);
b_0.storeInt(src.adminIndex, 257);
b_0.storeInt(src.quorum_percent, 257);
b_0.storeInt(src.vote_time, 257);
};
}
export function loadInitiateLiquidationVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 301696559) { throw Error('Invalid prefix'); }
let _adminIndex = sc_0.loadIntBig(257);
let _quorum_percent = sc_0.loadIntBig(257);
let _vote_time = sc_0.loadIntBig(257);
return { $$type: 'InitiateLiquidationVote' as const, adminIndex: _adminIndex, quorum_percent: _quorum_percent, vote_time: _vote_time };
}
function loadTupleInitiateLiquidationVote(source: TupleReader) {
let _adminIndex = source.readBigNumber();
let _quorum_percent = source.readBigNumber();
let _vote_time = source.readBigNumber();
return { $$type: 'InitiateLiquidationVote' as const, adminIndex: _adminIndex, quorum_percent: _quorum_percent, vote_time: _vote_time };
}
function storeTupleInitiateLiquidationVote(source: InitiateLiquidationVote) {
let builder = new TupleBuilder();
builder.writeNumber(source.adminIndex);
builder.writeNumber(source.quorum_percent);
builder.writeNumber(source.vote_time);
return builder.build();
}
function dictValueParserInitiateLiquidationVote(): DictionaryValue<InitiateLiquidationVote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeInitiateLiquidationVote(src)).endCell());
},
parse: (src) => {
return loadInitiateLiquidationVote(src.loadRef().beginParse());
}
}
}
export type FinishVote = {
$$type: 'FinishVote';
voteId: bigint;
}
export function storeFinishVote(src: FinishVote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(710362179, 32);
b_0.storeInt(src.voteId, 257);
};
}
export function loadFinishVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 710362179) { throw Error('Invalid prefix'); }
let _voteId = sc_0.loadIntBig(257);
return { $$type: 'FinishVote' as const, voteId: _voteId };
}
function loadTupleFinishVote(source: TupleReader) {
let _voteId = source.readBigNumber();
return { $$type: 'FinishVote' as const, voteId: _voteId };
}
function storeTupleFinishVote(source: FinishVote) {
let builder = new TupleBuilder();
builder.writeNumber(source.voteId);
return builder.build();
}
function dictValueParserFinishVote(): DictionaryValue<FinishVote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeFinishVote(src)).endCell());
},
parse: (src) => {
return loadFinishVote(src.loadRef().beginParse());
}
}
}
export type Vote = {
$$type: 'Vote';
voteId: bigint;
adminIndex: bigint;
vote: bigint;
}
export function storeVote(src: Vote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(3060856014, 32);
b_0.storeInt(src.voteId, 257);
b_0.storeInt(src.adminIndex, 257);
b_0.storeInt(src.vote, 257);
};
}
export function loadVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 3060856014) { throw Error('Invalid prefix'); }
let _voteId = sc_0.loadIntBig(257);
let _adminIndex = sc_0.loadIntBig(257);
let _vote = sc_0.loadIntBig(257);
return { $$type: 'Vote' as const, voteId: _voteId, adminIndex: _adminIndex, vote: _vote };
}
function loadTupleVote(source: TupleReader) {
let _voteId = source.readBigNumber();
let _adminIndex = source.readBigNumber();
let _vote = source.readBigNumber();
return { $$type: 'Vote' as const, voteId: _voteId, adminIndex: _adminIndex, vote: _vote };
}
function storeTupleVote(source: Vote) {
let builder = new TupleBuilder();
builder.writeNumber(source.voteId);
builder.writeNumber(source.adminIndex);
builder.writeNumber(source.vote);
return builder.build();
}
function dictValueParserVote(): DictionaryValue<Vote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeVote(src)).endCell());
},
parse: (src) => {
return loadVote(src.loadRef().beginParse());
}
}
}
export type AddressList = {
$$type: 'AddressList';
addresses: Dictionary<bigint, Address>;
length: bigint;
}
export function storeAddressList(src: AddressList) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeDict(src.addresses, Dictionary.Keys.BigInt(257), Dictionary.Values.Address());
b_0.storeInt(src.length, 257);
};
}
export function loadAddressList(slice: Slice) {
let sc_0 = slice;
let _addresses = Dictionary.load(Dictionary.Keys.BigInt(257), Dictionary.Values.Address(), sc_0);
let _length = sc_0.loadIntBig(257);
return { $$type: 'AddressList' as const, addresses: _addresses, length: _length };
}
function loadTupleAddressList(source: TupleReader) {
let _addresses = Dictionary.loadDirect(Dictionary.Keys.BigInt(257), Dictionary.Values.Address(), source.readCellOpt());
let _length = source.readBigNumber();
return { $$type: 'AddressList' as const, addresses: _addresses, length: _length };
}
function storeTupleAddressList(source: AddressList) {
let builder = new TupleBuilder();
builder.writeCell(source.addresses.size > 0 ? beginCell().storeDictDirect(source.addresses, Dictionary.Keys.BigInt(257), Dictionary.Values.Address()).endCell() : null);
builder.writeNumber(source.length);
return builder.build();
}
function dictValueParserAddressList(): DictionaryValue<AddressList> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeAddressList(src)).endCell());
},
parse: (src) => {
return loadAddressList(src.loadRef().beginParse());
}
}
}
export type Distribution = {
$$type: 'Distribution';
addresses: AddressList;
percents: Dictionary<Address, bigint>;
}
export function storeDistribution(src: Distribution) {
return (builder: Builder) => {
let b_0 = builder;
b_0.store(storeAddressList(src.addresses));
b_0.storeDict(src.percents, Dictionary.Keys.Address(), Dictionary.Values.BigInt(257));
};
}
export function loadDistribution(slice: Slice) {
let sc_0 = slice;
let _addresses = loadAddressList(sc_0);
let _percents = Dictionary.load(Dictionary.Keys.Address(), Dictionary.Values.BigInt(257), sc_0);
return { $$type: 'Distribution' as const, addresses: _addresses, percents: _percents };
}
function loadTupleDistribution(source: TupleReader) {
const _addresses = loadTupleAddressList(source.readTuple());
let _percents = Dictionary.loadDirect(Dictionary.Keys.Address(), Dictionary.Values.BigInt(257), source.readCellOpt());
return { $$type: 'Distribution' as const, addresses: _addresses, percents: _percents };
}
function storeTupleDistribution(source: Distribution) {
let builder = new TupleBuilder();
builder.writeTuple(storeTupleAddressList(source.addresses));
builder.writeCell(source.percents.size > 0 ? beginCell().storeDictDirect(source.percents, Dictionary.Keys.Address(), Dictionary.Values.BigInt(257)).endCell() : null);
return builder.build();
}
function dictValueParserDistribution(): DictionaryValue<Distribution> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeDistribution(src)).endCell());
},
parse: (src) => {
return loadDistribution(src.loadRef().beginParse());
}
}
}
export type InitiateDistributionVote = {
$$type: 'InitiateDistributionVote';
adminIndex: bigint;
quorum_percent: bigint;
vote_time: bigint;
distribution: Distribution;
}
export function storeInitiateDistributionVote(src: InitiateDistributionVote) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(276353205, 32);
b_0.storeInt(src.adminIndex, 257);
b_0.storeInt(src.quorum_percent, 257);
b_0.storeInt(src.vote_time, 257);
let b_1 = new Builder();
b_1.store(storeDistribution(src.distribution));
b_0.storeRef(b_1.endCell());
};
}
export function loadInitiateDistributionVote(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 276353205) { throw Error('Invalid prefix'); }
let _adminIndex = sc_0.loadIntBig(257);
let _quorum_percent = sc_0.loadIntBig(257);
let _vote_time = sc_0.loadIntBig(257);
let sc_1 = sc_0.loadRef().beginParse();
let _distribution = loadDistribution(sc_1);
return { $$type: 'InitiateDistributionVote' as const, adminIndex: _adminIndex, quorum_percent: _quorum_percent, vote_time: _vote_time, distribution: _distribution };
}
function loadTupleInitiateDistributionVote(source: TupleReader) {
let _adminIndex = source.readBigNumber();
let _quorum_percent = source.readBigNumber();
let _vote_time = source.readBigNumber();
const _distribution = loadTupleDistribution(source.readTuple());
return { $$type: 'InitiateDistributionVote' as const, adminIndex: _adminIndex, quorum_percent: _quorum_percent, vote_time: _vote_time, distribution: _distribution };
}
function storeTupleInitiateDistributionVote(source: InitiateDistributionVote) {
let builder = new TupleBuilder();
builder.writeNumber(source.adminIndex);
builder.writeNumber(source.quorum_percent);
builder.writeNumber(source.vote_time);
builder.writeTuple(storeTupleDistribution(source.distribution));
return builder.build();
}
function dictValueParserInitiateDistributionVote(): DictionaryValue<InitiateDistributionVote> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeInitiateDistributionVote(src)).endCell());
},
parse: (src) => {
return loadInitiateDistributionVote(src.loadRef().beginParse());
}
}
}
export type WithdrawalRequests = {
$$type: 'WithdrawalRequests';
addresses: Dictionary<bigint, Address>;
@ -964,9 +1395,9 @@ function dictValueParserWithdraw(): DictionaryValue<Withdraw> {
}
}
async function TONBWallet_init(master: Address, owner: Address) {
const __init = 'te6ccgEBBwEAZgABFP8A9KQT9LzyyAsBAgFiAgMCAs0EBQAJoUrd4AsAAdQBGWW1tcAXIzAVERNs8yYGAGZQRYEBAc8AWM8WAc8WyCJus5p/AcoAEoEBAc8AlTJwWMoA4lggbpUwcAHLAZLPFuLJAcw=';
const __code = 'te6ccgECNAEABd4AART/APSkE/S88sgLAQIBYgIDAgLKBgcCASAEBQERv9gW2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CACAVgoJQL3MhxAcoBUAcBygBwAcoCUAXPFlAD+gJwAcpoI26zJW6zsY5GfwHKAMhwAcoAcAHKACRus5p/AcoABPACUATMljQDcAHKAOIkbrOafwHKAATwAlAEzJY0A3ABygDicAHKAAJ/AcoAAslYzJczMwFwAcoA4iFus+MPyQH7AICcmAAoxcAHKAAASfwHKAAHwAgHMAEscFnIcAHLAXMBywFwAcsAEszMyfkAyHIBywFwAcsAEsoHy//J0IAIBICsqAAHyAgFiLSwAC0IG7y0ICASJRwIddJwh+VMCDXCx/eAtDTAwFxsMABkX+RcOIB+kAiUGZvBPhhAo8JMNs8VQXwLNs84CCCEA+KfqW64wIgghAXjUUZuoODY0LgREj5cw2zwG2zw4EM0QvBCrEJoQiVUG8CnbPOAgghBZXwe8ujgzNi8EQI+XMNs8Bts8NBCJEHgQZxBWEEVVAvAq2zzgggqcg5a6ODI2MAMyj5LbPAbbPDEQVhBFEDRBMPAr2zzgMPLAgjgxNgAe0x8Bggqcg5a68uCB+kABAEzTHwGCEFlfB7y68uCB0z/6APpAAQH6QCHXCwHDAJEBkjFt4hRDMACk0x8BghAXjUUZuvLggdM/+gD6QAEB+kAh1wsBwwCRAZIxbeIB+gAg1AHQ0gABlYEBAdcAkm0B4vpAIdcLAcMAkQGSMW3iMRAoECcQJhAlECQQIwMuMNs8Bts8NxC8EKsQmhCJEHhVBfAo2zw4NTYAbNMfAYIQD4p+pbry4IHTP/oA+kABAfpAIdcLAcMAkQGSMW3iAdIAAZHUkm0B4voAUWYWFRRDMAEYyPhCAcxVUNs8ye1UNwBsUFaBAQHPAFADzxYBzxbKAMgibrOafwHKABKBAQHPAJUycFjKAOJYIG6VMHABywGSzxbiyQHMARbtRNDUAfhi2zxsFjkAbIEBAdcA+kABAfpAAQHSANQB0NIAAZWBAQHXAJJtAeL6QCHXCwHDAJEBkjFt4jEQJhAlECQQIxaLV8A=';
let systemCell = Cell.fromBase64(__system);
let builder = new TupleBuilder();
builder.writeCell(systemCell);
@ -1020,6 +1451,7 @@ const TONBWallet_errors: { [key: number]: { message: string } } = {
13650: { message: `Invalid bounced message` },
16059: { message: `Invalid value` },
32366: { message: `not enough money for deposit` },
44816: { message: `Wallet is blacklisted` },
62972: { message: `Invalid balance` },
}
@ -1050,7 +1482,7 @@ export class TONBWallet implements Contract {
this.init = init;
}
async send(provider: ContractProvider, via: Sender, args: { value: bigint, bounce?: boolean| null | undefined }, message: TokenTransfer | TokenTransferInternal | TokenBurn) {
async send(provider: ContractProvider, via: Sender, args: { value: bigint, bounce?: boolean| null | undefined }, message: TokenTransfer | TokenTransferInternal | TokenBurn | BlacklistWallet) {
let body: Cell | null = null;
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'TokenTransfer') {
@ -1062,6 +1494,9 @@ export class TONBWallet implements Contract {
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'TokenBurn') {
body = beginCell().store(storeTokenBurn(message)).endCell();
}
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'BlacklistWallet') {
body = beginCell().store(storeBlacklistWallet(message)).endCell();
}
if (body === null) { throw new Error('Invalid message type'); }
await provider.internal(via, { ...args, body: body });

2
sources/staking.tact

@ -17,7 +17,7 @@ fun stakingWithdrawMessage(value: Int, pool: Address): SendParameters {
struct WithdrawalRequests {
addresses: map[Int]Address;
amounts: map[Int]Int;
n_requests: Int;
n_requests: Int = 0;
}
fun withdrawalSum(requests: WithdrawalRequests): Int {

16
sources/tests/__snapshots__/jetton.spec.ts.snap

@ -13,14 +13,14 @@ exports[`jetton should deploy and deposit the wallet with the correct sum of mon
},
"bounce": true,
"from": "kQAI-3FJVc_ywSuY4vq0bYrzR7S4Och4y7bTU_i5yLOB3A6P",
"to": "kQBvLWbJmRxsnDuBrGvOkN_QmzLpgeyyQf0XbfnIeM7XYTwh",
"to": "kQC21U5V6OpVNUMgmbDF89Gv4-nNbCQraGZW6CyNxjZ54mIG",
"type": "internal",
"value": 1200000000n,
},
"type": "received",
},
{
"gasUsed": 37054n,
"gasUsed": 37309n,
"type": "processed",
},
{
@ -31,8 +31,8 @@ exports[`jetton should deploy and deposit the wallet with the correct sum of mon
"type": "cell",
},
"bounce": false,
"from": "kQBvLWbJmRxsnDuBrGvOkN_QmzLpgeyyQf0XbfnIeM7XYTwh",
"to": "kQDvdSDFqvr41l4MwWjbjCSwTka3iYJTlTEjj5rVuePsXsSa",
"from": "kQC21U5V6OpVNUMgmbDF89Gv4-nNbCQraGZW6CyNxjZ54mIG",
"to": "kQBX5jl-CCnwNVNcNfQEr5mWWfNCD7wLX88zZLoP6HgwGPXa",
"type": "internal",
"value": 13474000n,
},
@ -43,13 +43,13 @@ exports[`jetton should deploy and deposit the wallet with the correct sum of mon
"messages": [
{
"body": {
"cell": "x{178D4519000000000000000043B9ACA00800DE5ACD933238D938770358D79D21BFA13665D303D96483FA2EDBF390F19DAEC300023EDC525573FCB04AE638BEAD1B62BCD1ED2E0E721E32EDB4D4FE2E722CE07702_}
x{800000000000000000000000000000000000000000000000000000000000000020077BA9062D57D7C6B2F0660B46DC6125827235BC4C129CA9891C7CD6ADCF1F62F4_}",
"cell": "x{178D4519000000000000000043B9ACA008016DAA9CABD1D4AA6A864133618BE7A35FC7D39AD84856D0CCADD0591B8C6CF3C500023EDC525573FCB04AE638BEAD1B62BCD1ED2E0E721E32EDB4D4FE2E722CE07702_}
x{80000000000000000000000000000000000000000000000000000000000000002002BF31CBF0414F81AA9AE1AFA0257CCCB2CF9A107DE05AFE799B25D07F43C180C4_}",
"type": "cell",
},
"bounce": false,
"from": "kQBvLWbJmRxsnDuBrGvOkN_QmzLpgeyyQf0XbfnIeM7XYTwh",
"to": "kQATwu07DUC3EW02Ouf3rQA9zbePcr9Z3bGajEVnEsilpexg",
"from": "kQC21U5V6OpVNUMgmbDF89Gv4-nNbCQraGZW6CyNxjZ54mIG",
"to": "kQCIAtWss1aC4r_RS9uo0BqWrfh2tc-AhjmJAY_eXbQ5ALyd",
"type": "internal",
"value": 30513000n,
},

28
sources/wallet.tact

@ -12,7 +12,8 @@ contract TONBWallet {
balance: Int;
owner: Address;
master: Address;
master: Address;
blacklisted: Bool = false;
linker: Int?;
linker_address: Address?;
@ -23,6 +24,7 @@ contract TONBWallet {
}
receive(msg: TokenTransfer) {
require(!self.blacklisted, "Wallet is blacklisted");
// Check sender
let ctx: Context = context();
@ -145,6 +147,30 @@ contract TONBWallet {
});
}
receive(_msg: BlacklistWallet) {
// Check sender
let ctx: Context = context();
require(ctx.sender == self.master || ctx.sender == self.linker_address, "Invalid sender");
// Blacklist wallet
self.blacklisted = true;
let amount: Int = self.balance;
self.balance = 0;
send(SendParameters{
to: self.master,
value: 0,
mode: SendRemainingValue,
bounce: true,
body: TokenBurnNotification{
queryId: 0,
amount: amount,
owner: self.owner,
responseAddress: self.owner
}.toCell()
});
}
bounced(msg: Slice) {
// Parse bounced message

Loading…
Cancel
Save