Browse Source

Staking on deposit

master
Lev 2 years ago
parent
commit
c5ccf7d6a2
  1. 3
      sources/constants.tact
  2. 6
      sources/jetton.tact
  3. 1
      sources/jetton_trait.tact
  4. 4
      sources/messages.tact
  5. 2
      sources/output/jetton_Linker.abi
  6. 2
      sources/output/jetton_Linker.code.fc
  7. 2
      sources/output/jetton_Linker.code.fif
  8. 6
      sources/output/jetton_Linker.md
  9. 2
      sources/output/jetton_Linker.pkg
  10. 41
      sources/output/jetton_Linker.ts
  11. 2
      sources/output/jetton_PseudoStaking.abi
  12. BIN
      sources/output/jetton_PseudoStaking.code.boc
  13. 22
      sources/output/jetton_PseudoStaking.code.fc
  14. 41
      sources/output/jetton_PseudoStaking.code.fif
  15. 70
      sources/output/jetton_PseudoStaking.code.rev.fif
  16. 8
      sources/output/jetton_PseudoStaking.md
  17. 2
      sources/output/jetton_PseudoStaking.pkg
  18. 50
      sources/output/jetton_PseudoStaking.ts
  19. 2
      sources/output/jetton_TONB.abi
  20. BIN
      sources/output/jetton_TONB.code.boc
  21. 189
      sources/output/jetton_TONB.code.fc
  22. 243
      sources/output/jetton_TONB.code.fif
  23. 830
      sources/output/jetton_TONB.code.rev.fif
  24. BIN
      sources/output/jetton_TONB.init.boc
  25. 21
      sources/output/jetton_TONB.init.fc
  26. 39
      sources/output/jetton_TONB.init.fif
  27. 39
      sources/output/jetton_TONB.init.rev.fif
  28. 8
      sources/output/jetton_TONB.md
  29. 2
      sources/output/jetton_TONB.pkg
  30. 63
      sources/output/jetton_TONB.ts
  31. 2
      sources/output/jetton_TONBWallet.abi
  32. 2
      sources/output/jetton_TONBWallet.code.fc
  33. 2
      sources/output/jetton_TONBWallet.code.fif
  34. 6
      sources/output/jetton_TONBWallet.md
  35. 2
      sources/output/jetton_TONBWallet.pkg
  36. 41
      sources/output/jetton_TONBWallet.ts
  37. 13
      sources/pseudostaking.tact
  38. 4
      sources/staking.tact
  39. 88
      sources/tests/__snapshots__/jetton.spec.ts.snap
  40. 15
      sources/tests/jetton.spec.ts
  41. 3
      sources/tests/voting.spec.ts

3
sources/constants.tact

@ -4,5 +4,6 @@ const withdraw_gas_consumption: Int = ton("0.1");
const deposit_gas_consumption: Int = ton("0.01"); // Gas consumption during processing
const linker_credit: Int = ton("0.02"); // TON to send to the linker for the fees
const wallet_credit: Int = ton("0.065"); // TON to send to the wallet for the fees
const tonb_floor: Int = ton("0.1"); // Minimum amount of TON to keep on TONB
const tonb_floor: Int = ton("0.5"); // Minimum amount of TON to keep on TONB
const transfer_gas_consumption: Int = ton("0.05"); // Gas consumption during transfer processing
const staking_gas: Int = ton("0.3");

6
sources/jetton.tact

@ -30,11 +30,12 @@ contract TONB with TONBTrait {
in_the_pool: Int = 0;
withdrawal_requests: WithdrawalRequests;
init(owner: Address, content: Cell?) {
init(owner: Address, content: Cell?, staking_pool: Address?) {
self.totalSupply = 0;
self.owner = owner;
self.mintable = true;
self.content = content;
self.staking_pool = staking_pool;
self.withdrawal_requests = WithdrawalRequests {
addresses: emptyMap(),
amounts: emptyMap()
@ -56,4 +57,7 @@ contract TONB with TONBTrait {
self.burn(ctx.sender, msg.amount, ctx.sender);
}
receive(msg: SetStakingPool) {
self.staking_pool = msg.staking_pool;
}
}

1
sources/jetton_trait.tact

@ -21,6 +21,7 @@ trait TONBTrait with Ownable, StakingTrait {
last_linker: Address?;
n_linkers: Int = 0;
staking_pool: Address?;
in_the_pool: Int = 0;
withdrawal_requests: WithdrawalRequests;

4
sources/messages.tact

@ -126,3 +126,7 @@ message InitiateDistributionVote {
vote_time: Int;
distribution: Distribution;
}
message SetStakingPool {
staking_pool: Address?;
}

2
sources/output/jetton_Linker.abi

File diff suppressed because one or more lines are too long

2
sources/output/jetton_Linker.code.fc

@ -229,5 +229,5 @@ _ supported_interfaces() method_id {
}
_ get_abi_ipfs() {
return "ipfs://QmcaNamVs7qjMiic6ATCSqKuXsaffQQmXU43UPgK6t2sGc";
return "ipfs://QmWkjXBm4uV3FSCQFo4XgZ4C4ZZdKD7TWpVno86LVkSrRS";
}

2
sources/output/jetton_Linker.code.fif

@ -354,6 +354,6 @@ PROGRAM{
209801025412363888721030803524359905849 PUSHINT
}>
get_abi_ipfs PROC:<{
x{697066733a2f2f516d63614e616d567337716a4d6969633641544353714b75587361666651516d585534335550674b367432734763} PUSHSLICE
x{697066733a2f2f516d576b6a58426d3475563346534351466f3458675a3443345a5a644b4437545770566e6f38364c566b53725253} PUSHSLICE
}>
}END>c

6
sources/output/jetton_Linker.md

@ -3,7 +3,7 @@ Contract: Linker
BOC Size: 645 bytes
# Types
Total Types: 28
Total Types: 29
## StateInit
TLB: `_ code:^cell data:^cell = StateInit`
@ -101,6 +101,10 @@ Signature: `Distribution{addresses:AddressList{addresses:dict<int, address>,leng
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>}}`
## SetStakingPool
TLB: `set_staking_pool#0764d148 staking_pool:Maybe address = SetStakingPool`
Signature: `SetStakingPool{staking_pool:Maybe address}`
## 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

41
sources/output/jetton_Linker.ts

@ -1263,6 +1263,47 @@ function dictValueParserInitiateDistributionVote(): DictionaryValue<InitiateDist
}
}
}
export type SetStakingPool = {
$$type: 'SetStakingPool';
staking_pool: Address | null;
}
export function storeSetStakingPool(src: SetStakingPool) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(124047688, 32);
b_0.storeAddress(src.staking_pool);
};
}
export function loadSetStakingPool(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 124047688) { throw Error('Invalid prefix'); }
let _staking_pool = sc_0.loadMaybeAddress();
return { $$type: 'SetStakingPool' as const, staking_pool: _staking_pool };
}
function loadTupleSetStakingPool(source: TupleReader) {
let _staking_pool = source.readAddressOpt();
return { $$type: 'SetStakingPool' as const, staking_pool: _staking_pool };
}
function storeTupleSetStakingPool(source: SetStakingPool) {
let builder = new TupleBuilder();
builder.writeAddress(source.staking_pool);
return builder.build();
}
function dictValueParserSetStakingPool(): DictionaryValue<SetStakingPool> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeSetStakingPool(src)).endCell());
},
parse: (src) => {
return loadSetStakingPool(src.loadRef().beginParse());
}
}
}
export type WithdrawalRequests = {
$$type: 'WithdrawalRequests';
addresses: Dictionary<bigint, Address>;

2
sources/output/jetton_PseudoStaking.abi

File diff suppressed because one or more lines are too long

BIN
sources/output/jetton_PseudoStaking.code.boc

Binary file not shown.

22
sources/output/jetton_PseudoStaking.code.fc

@ -139,6 +139,21 @@ builder __gen_write_PseudoStaking(builder build_0, (cell) v) inline {
return (($self'stakes), ());
}
((cell), ()) $__gen_PseudoStaking_receive_fallback((cell) $self, slice $msg) impure inline {
var ($self'stakes) = $self;
int $op = $msg~load_uint(32);
if (($op == 2077040623)) {
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get();
slice $sender = $ctx'sender;
int $ex_stake = __tact_dict_get_slice_int($self'stakes, 267, $sender, 257);
if (null?($ex_stake)) {
$ex_stake = 0;
}
$self'stakes~__tact_dict_set_slice_int(267, $sender, (__tact_not_null($ex_stake) + $ctx'value), 257);
}
return (($self'stakes), ());
}
() recv_internal(int msg_value, cell in_msg_cell, slice in_msg) impure {
@ -180,7 +195,10 @@ builder __gen_write_PseudoStaking(builder build_0, (cell) v) inline {
}
}
throw(130);
;; Receiver fallback
var self = __gen_load_PseudoStaking();
self~$__gen_PseudoStaking_receive_fallback(in_msg);
__gen_store_PseudoStaking(self);
}
_ supported_interfaces() method_id {
@ -191,5 +209,5 @@ _ supported_interfaces() method_id {
}
_ get_abi_ipfs() {
return "ipfs://QmWUgDgfWMDJUh9Ga3MPmqtyhuJnxvzjwT6b4Ka3UuutJg";
return "ipfs://QmYKdgrRXE254hAvD7qktcXju6QEyfjCpU1nZegvJD7C9K";
}

41
sources/output/jetton_PseudoStaking.code.fif

@ -14,6 +14,7 @@ PROGRAM{
DECLPROC $send
DECLPROC $__gen_PseudoStaking_receive_comment_2dcb19a5b89db9d3377fc651c6f9b6b92db9be624060c62a50572cdc97968638
DECLPROC $__gen_PseudoStaking_receive_StakingWithdraw
DECLPROC $__gen_PseudoStaking_receive_fallback
DECLPROC recv_internal
113617 DECLMETHOD supported_interfaces
DECLPROC get_abi_ipfs
@ -239,6 +240,35 @@ PROGRAM{
PUSHNULL
$send INLINECALLDICT
}>
$__gen_PseudoStaking_receive_fallback PROCINLINE:<{
32 LDU
DROP
2077040623 PUSHINT
EQUAL
IF:<{
__tact_context_get INLINECALLDICT
DROP
s2 POP
s2 PUSH
267 PUSHINT
s2 PUSH
257 PUSHINT
__tact_dict_get_slice_int INLINECALLDICT
DUP
ISNULL
IF:<{
DROP
0 PUSHINT
}>
267 PUSHINT
SWAP
__tact_not_null INLINECALLDICT
s0 s3 XCHG2
ADD
257 PUSHINT
__tact_dict_set_slice_int CALLDICT
}>
}>
recv_internal PROC:<{
c2 SAVE
SAMEALTSAVE
@ -287,25 +317,28 @@ PROGRAM{
}>
0 EQINT
IF:<{
DUP
HASHSU
20712925151889215669912116818955575927875783670988084319049521716100301489720 PUSHINT
EQUAL
IFJMP:<{
DROP
__gen_load_PseudoStaking INLINECALLDICT
$__gen_PseudoStaking_receive_comment_2dcb19a5b89db9d3377fc651c6f9b6b92db9be624060c62a50572cdc97968638 INLINECALLDICT
__gen_store_PseudoStaking INLINECALLDICT
RETALT
}>
}>ELSE<{
DROP
}>
130 THROW
__gen_load_PseudoStaking INLINECALLDICT
SWAP
$__gen_PseudoStaking_receive_fallback INLINECALLDICT
__gen_store_PseudoStaking INLINECALLDICT
}>
supported_interfaces PROC:<{
123515602279859691144772641439386770278 PUSHINT
209801025412363888721030803524359905849 PUSHINT
}>
get_abi_ipfs PROC:<{
x{697066733a2f2f516d575567446766574d444a5568394761334d506d71747968754a6e78767a6a77543662344b6133557575744a67} PUSHSLICE
x{697066733a2f2f516d594b6467725258453235346841764437716b7463586a7536514579666a437055316e5a6567764a443743394b} PUSHSLICE
}>
}END>c

70
sources/output/jetton_PseudoStaking.code.rev.fif

@ -209,13 +209,12 @@ SETCP0
IFJMP
0 EQINT
<{
s0 POP
}> PUSHCONT
<{
s0 PUSH
HASHSU
20712925151889215669912116818955575927875783670988084319049521716100301489720 PUSHINT
EQUAL
<{
s0 POP
c4 PUSH
CTOS
LDREF
@ -273,8 +272,69 @@ SETCP0
RETALT
}> PUSHCONT
IFJMP
}> IFREFELSE
130 THROW
}> IFREF
c4 PUSH
CTOS
LDREF
s0 s1 XCHG
2 SETGLOBVAR
LDDICT
s0 s1 XCHG
s1 POP
s0 s1 XCHG
32 LDU
s0 POP
2077040623 PUSHINT
EQUAL
<{
1 GETGLOBVAR
4 UNTUPLE
s0 POP
s2 POP
s2 PUSH
267 PUSHINT
s2 PUSH
257 PUSHINT
s1 s3 s3 XCHG3
DICTGET
NULLSWAPIFNOT
<{
s0 s1 XCHG
LDI
s0 POP
}> PUSHCONT
<{
2DROP
PUSHNULL
}> PUSHCONT
IFELSE
s0 PUSH
ISNULL
<{
s0 POP
0 PUSHINT
}> PUSHCONT
IF
267 PUSHINT
s0 s1 XCHG
s0 PUSH
ISNULL
128 THROWIF
s0 s3 XCHG2
ADD
257 PUSHINT
6 CALLDICT
}> PUSHCONT
IF
NEWC
2 GETGLOBVAR
s0 s1 XCHG
STREF
s0 s1 XCHG
s0 s1 XCHG
STDICT
ENDC
c4 POP
6:
s1 PUSH

8
sources/output/jetton_PseudoStaking.md

@ -1,9 +1,9 @@
# TACT Compilation Report
Contract: PseudoStaking
BOC Size: 495 bytes
BOC Size: 584 bytes
# Types
Total Types: 28
Total Types: 29
## StateInit
TLB: `_ code:^cell data:^cell = StateInit`
@ -101,6 +101,10 @@ Signature: `Distribution{addresses:AddressList{addresses:dict<int, address>,leng
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>}}`
## SetStakingPool
TLB: `set_staking_pool#0764d148 staking_pool:Maybe address = SetStakingPool`
Signature: `SetStakingPool{staking_pool:Maybe address}`
## 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_PseudoStaking.pkg

File diff suppressed because one or more lines are too long

50
sources/output/jetton_PseudoStaking.ts

@ -1263,6 +1263,47 @@ function dictValueParserInitiateDistributionVote(): DictionaryValue<InitiateDist
}
}
}
export type SetStakingPool = {
$$type: 'SetStakingPool';
staking_pool: Address | null;
}
export function storeSetStakingPool(src: SetStakingPool) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(124047688, 32);
b_0.storeAddress(src.staking_pool);
};
}
export function loadSetStakingPool(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 124047688) { throw Error('Invalid prefix'); }
let _staking_pool = sc_0.loadMaybeAddress();
return { $$type: 'SetStakingPool' as const, staking_pool: _staking_pool };
}
function loadTupleSetStakingPool(source: TupleReader) {
let _staking_pool = source.readAddressOpt();
return { $$type: 'SetStakingPool' as const, staking_pool: _staking_pool };
}
function storeTupleSetStakingPool(source: SetStakingPool) {
let builder = new TupleBuilder();
builder.writeAddress(source.staking_pool);
return builder.build();
}
function dictValueParserSetStakingPool(): DictionaryValue<SetStakingPool> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeSetStakingPool(src)).endCell());
},
parse: (src) => {
return loadSetStakingPool(src.loadRef().beginParse());
}
}
}
export type WithdrawalRequests = {
$$type: 'WithdrawalRequests';
addresses: Dictionary<bigint, Address>;
@ -1437,8 +1478,8 @@ function dictValueParserWithdraw(): DictionaryValue<Withdraw> {
}
async function PseudoStaking_init() {
const __init = 'te6ccgEBBgEALQABFP8A9KQT9LzyyAsBAgFiAgMCAs4EBQAJoUrd4AUAAUgAE0bQHIzAEB9ADJg=';
const __code = 'te6ccgECCQEAAeMAART/APSkE/S88sgLAQIBYgIDAgLNBAUATaF3owTgudh6ullc9j0J2HOslQo2zQThO6xqWlbI+WZFp15b++LEcwL3120Xb9uBDrpOEPypgQa4WP7wFoaYGAuNhgAMi/yLhxAP0gESgzN4J8MIFIrfAQQQhtQB9+3UddGHaiaGoA/DF6AgCYgOmPgMEIbUAfft15cED9AACY/CC3kggRr4G/gTg2trbtnmR8IQDmAID6AGT2qnBgAEiYcYb5YEFAYHACNohbpVbWfRZMODIAc8AQTP0QYB9shxAcoBUAcBygBwAcoCUAXPFlAD+gJwAcpoI26zJW6zsY5MfwHKAMhwAcoAcAHKACRus51/AcoABCBu8tCAUATMljQDcAHKAOIkbrOdfwHKAAQgbvLQgFAEzJY0A3ABygDicAHKAAJ/AcoAAslYzJczMwFwAcoA4iFuswgA6vkBgvAtyxmluJ250zd/xlHG+ba5Lbm+YkBgxipQVyzcl5aGOLqOTe1E0NQB+GL0BAEx+EFvJDAyIoEBCyKBAQFBM/QKb6GUAdcAMJJbbeIgbpIwcN6BAQsBIG7y0IBQA6CBAQHwBsj4QgHMAQH0AMntVNsx4AAwnH8BygABIG7y0IABzJUxcAHKAOLJAfsA';
const __system = 'te6cckECCwEAAe0AAQHAAQEFoGa7AgEU/wD0pBP0vPLICwMCAWIFBABNoXejBOC52Hq6WVz2PQnYc6yVCjbNBOE7rGpaVsj5ZkWnXlv74sRzAgLNBwYAI2iFulVtZ9Fkw4MgBzwBBM/RBgL3120Xb9uBDrpOEPypgQa4WP7wFoaYGAuNhgAMi/yLhxAP0gESgzN4J8MIFIrfAQQQhtQB9+3UddGHaiaGoA/DF6AgCYgOmPgMEIbUAfft15cED9AACY/CC3kggRr4G/gTg2trbtnmR8IQDmAID6AGT2qnBgAEiYcYb5YEFAkIAOr5AYLwLcsZpbidudM3f8ZRxvm2uS25vmJAYMYqUFcs3JeWhji6jk3tRNDUAfhi9AQBMfhBbyQwMiKBAQsigQEBQTP0Cm+hlAHXADCSW23iIG6SMHDegQELASBu8tCAUAOggQEB8AbI+EIBzAEB9ADJ7VTbMeAB9shxAcoBUAcBygBwAcoCUAXPFlAD+gJwAcpoI26zJW6zsY5MfwHKAMhwAcoAcAHKACRus51/AcoABCBu8tCAUATMljQDcAHKAOIkbrOdfwHKAAQgbvLQgFAEzJY0A3ABygDicAHKAAJ/AcoAAslYzJczMwFwAcoA4iFuswoAMJx/AcoAASBu8tCAAcyVMXABygDiyQH7AACvC4k=';
const __code = 'te6ccgECCgEAAjwAART/APSkE/S88sgLAQIBYgIDAgLNBAUATaF3owTgudh6ullc9j0J2HOslQo2zQThO6xqWlbI+WZFp15b++LEcwPt120Xb9uBDrpOEPypgQa4WP7wFoaYGAuNhgAMi/yLhxAP0gESgzN4J8MIFIrfAQQQhtQB9+3UddGHaiaGoA/DF6AgCYgOmPgMEIbUAfft15cED9AACY/CC3kggRr4G/gTg2trbtnmR8IQDmAID6AGT2qnBgAHGAQGBwgAI2iFulVtZ9Fkw4MgBzwBBM/RBgH2yHEBygFQBwHKAHABygJQBc8WUAP6AnABymgjbrMlbrOxjkx/AcoAyHABygBwAcoAJG6znX8BygAEIG7y0IBQBMyWNANwAcoA4iRus51/AcoABCBu8tCAUATMljQDcAHKAOJwAcoAAn8BygACyVjMlzMzAXABygDiIW6zCQDuIPkBgvAtyxmluJ250zd/xlHG+ba5Lbm+YkBgxipQVyzcl5aGOLqOTjDtRNDUAfhi9AQBMfhBbyQwMiKBAQsigQEBQTP0Cm+hlAHXADCSW23iIG6SMHDegQELASBu8tCAUAOggQEB8AbI+EIBzAEB9ADJ7VTbMeAAsu1E0NQB+GL0BAExAdMfMIIQe80f77qONPhBbyQwMiKBAQsigQEBQTP0Cm+hlAHXADCSW23iIG6SMHDegQELASBu8tCAUAOggQEB8AbeyPhCAcwBAfQAye1UADCcfwHKAAEgbvLQgAHMlTFwAcoA4skB+wA=';
const __system = 'te6cckECDAEAAkYAAQHAAQEFoGa7AgEU/wD0pBP0vPLICwMCAWIFBABNoXejBOC52Hq6WVz2PQnYc6yVCjbNBOE7rGpaVsj5ZkWnXlv74sRzAgLNBwYAI2iFulVtZ9Fkw4MgBzwBBM/RBgPt120Xb9uBDrpOEPypgQa4WP7wFoaYGAuNhgAMi/yLhxAP0gESgzN4J8MIFIrfAQQQhtQB9+3UddGHaiaGoA/DF6AgCYgOmPgMEIbUAfft15cED9AACY/CC3kggRr4G/gTg2trbtnmR8IQDmAID6AGT2qnBgAHGAQKCQgAsu1E0NQB+GL0BAExAdMfMIIQe80f77qONPhBbyQwMiKBAQsigQEBQTP0Cm+hlAHXADCSW23iIG6SMHDegQELASBu8tCAUAOggQEB8AbeyPhCAcwBAfQAye1UAO4g+QGC8C3LGaW4nbnTN3/GUcb5trktub5iQGDGKlBXLNyXloY4uo5OMO1E0NQB+GL0BAEx+EFvJDAyIoEBCyKBAQFBM/QKb6GUAdcAMJJbbeIgbpIwcN6BAQsBIG7y0IBQA6CBAQHwBsj4QgHMAQH0AMntVNsx4AH2yHEBygFQBwHKAHABygJQBc8WUAP6AnABymgjbrMlbrOxjkx/AcoAyHABygBwAcoAJG6znX8BygAEIG7y0IBQBMyWNANwAcoA4iRus51/AcoABCBu8tCAUATMljQDcAHKAOJwAcoAAn8BygACyVjMlzMzAXABygDiIW6zCwAwnH8BygABIG7y0IABzJUxcAHKAOLJAfsAN0iFUQ==';
let systemCell = Cell.fromBase64(__system);
let builder = new TupleBuilder();
builder.writeCell(systemCell);
@ -1521,7 +1562,7 @@ export class PseudoStaking implements Contract {
this.init = init;
}
async send(provider: ContractProvider, via: Sender, args: { value: bigint, bounce?: boolean| null | undefined }, message: 'Deposit' | StakingWithdraw) {
async send(provider: ContractProvider, via: Sender, args: { value: bigint, bounce?: boolean| null | undefined }, message: 'Deposit' | StakingWithdraw | Slice) {
let body: Cell | null = null;
if (message === 'Deposit') {
@ -1530,6 +1571,9 @@ export class PseudoStaking implements Contract {
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'StakingWithdraw') {
body = beginCell().store(storeStakingWithdraw(message)).endCell();
}
if (message && typeof message === 'object' && message instanceof Slice) {
body = message.asCell();
}
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.

189
sources/output/jetton_TONB.code.fc

@ -2,8 +2,6 @@
#pragma allow-post-modification;
#pragma compute-asm-ltr;
slice __tact_str_to_slice(slice s) asm "NOP";
int __tact_my_balance() inline {
return pair_first(get_balance());
}
@ -202,6 +200,12 @@ cell __gen_writecell_BlacklistWallet((slice) v) inline_ref {
return (sc_0, (v'wallet));
}
(slice, ((slice))) __gen_read_SetStakingPool(slice sc_0) inline {
throw_unless(129, sc_0~load_uint(32) == 124047688);
var v'staking_pool = sc_0~__tact_load_address_opt();
return (sc_0, (v'staking_pool));
}
builder __gen_write_WithdrawalRequests(builder build_0, (cell, cell, int) v) inline {
var (v'addresses, v'amounts, v'n_requests) = v;
build_0 = build_0.store_dict(v'addresses);
@ -253,8 +257,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, (cell, cell, int)) v) inline {
var (v'totalSupply, v'owner, v'content, v'mintable, v'first_linker, v'last_linker, v'n_linkers, v'staking_pool, (v'withdrawal_requests'addresses, v'withdrawal_requests'amounts, v'withdrawal_requests'n_requests)) = v;
builder __gen_write_TONB(builder build_0, (int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) v) inline {
var (v'totalSupply, v'owner, v'content, v'mintable, v'first_linker, v'last_linker, v'n_linkers, v'staking_pool, v'in_the_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);
@ -264,12 +268,15 @@ 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_1 = build_1.store_int(v'in_the_pool, 257);
var build_2 = begin_cell();
build_2 = __gen_write_WithdrawalRequests(build_2, (v'withdrawal_requests'addresses, v'withdrawal_requests'amounts, v'withdrawal_requests'n_requests));
build_1 = store_ref(build_1, build_2.end_cell());
build_0 = store_ref(build_0, build_1.end_cell());
return build_0;
}
(slice, ((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)))) __gen_read_TONB(slice sc_0) inline {
(slice, ((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)))) __gen_read_TONB(slice sc_0) inline {
var v'totalSupply = sc_0~load_coins();
var v'owner = sc_0~__tact_load_address();
var v'content = sc_0~load_int(1) ? sc_0~load_ref() : null();
@ -279,8 +286,10 @@ 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();
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));
var v'in_the_pool = sc_1~load_int(257);
slice sc_2 = sc_1~load_ref().begin_parse();
var v'withdrawal_requests = sc_2~__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'in_the_pool, v'withdrawal_requests));
}
_ __gen_StateInit_get_code((cell, cell) v) inline {
@ -298,22 +307,19 @@ _ __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, (cell, cell, int)) __gen_load_TONB() inline {
(int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) __gen_load_TONB() inline {
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, (cell, cell, int)) v) impure inline {
() __gen_store_TONB((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) v) impure inline {
builder b = begin_cell();
b = b.store_ref(__tact_context_sys);
b = __gen_write_TONB(b, v);
set_data(b.end_cell());
}
;; String "Deposit"
slice __gen_str_228592480() asm "B{b5ee9c7241010101000900000e4465706f7369749721d513} B>boc <s PUSHSLICE";
cell $emptyCell() impure inline_ref {
return end_cell(begin_cell());
}
@ -376,7 +382,7 @@ slice $contractAddress((cell, cell) $s) impure inline_ref {
}
(int, slice, int, int, cell, cell, cell) $stakingDepositMessage(int $value, slice $pool) impure inline_ref {
return (true, $pool, $value, 0, end_cell(store_slice(begin_cell(), __tact_str_to_slice(__gen_str_228592480()))), null(), null());
return (true, $pool, $value, 0, end_cell(store_uint(begin_cell(), 2077040623, 32)), null(), null());
}
cell $__gen_TONBWallet_init(cell sys', slice $master, slice $owner) {
@ -425,14 +431,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, int)), (cell, cell)) $__gen_TONB_getJettonWalletInit((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, slice $address) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), $__gen_TONBWallet_init_child(__tact_context_sys, my_address(), $address));
((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)), (cell, cell)) $__gen_TONB_getJettonWalletInit((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self, slice $address) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_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'in_the_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, (cell, cell, int)) $self, slice $owner) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
var ($winit'code, $winit'data) = ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_getJettonWalletInit($owner);
slice $__gen_TONB_get_wallet_address((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self, slice $owner) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_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'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_getJettonWalletInit($owner);
return $contractAddress(($winit'code, $winit'data));
}
@ -443,9 +449,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, (cell, cell, int)) $self) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
cell $code = __gen_StateInit_get_code(($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_getJettonWalletInit(my_address()));
(int, int, slice, cell, cell) $__gen_TONB_get_jetton_data((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_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'in_the_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);
}
@ -455,10 +461,10 @@ _ $__gen_get_get_jetton_data() method_id(106029) {
return __gen_JettonData_to_external(res);
}
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), ()) $__gen_TONB_mint((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, slice $to, int $amount, slice $responseAddress) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)), ()) $__gen_TONB_mint((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self, slice $to, int $amount, slice $responseAddress) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
$self'totalSupply = ($self'totalSupply + $amount);
var ($winit'code, $winit'data) = ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_getJettonWalletInit($to);
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'in_the_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));
@ -467,33 +473,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, 65000000, 0, $wallet_msg_body, $winit'code, $winit'data));
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), ()) $__gen_TONB_burn((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, slice $from, int $amount, slice $responseAddress) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
var ($winit'code, $winit'data) = ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_getJettonWalletInit($from);
((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)), ()) $__gen_TONB_burn((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self, slice $from, int $amount, slice $responseAddress) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_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'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_getJettonWalletInit($from);
slice $walletAddress = $contractAddress(($winit'code, $winit'data));
$send((false, $walletAddress, 0, 64, __gen_writecell_TokenBurn((0, $amount, $from, $responseAddress)), $winit'code, $winit'data));
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), ()) $__gen_TONB_requireWallet((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, slice $owner) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)), ()) $__gen_TONB_requireWallet((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self, slice $owner) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get();
var ($winit'code, $winit'data) = ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_getJettonWalletInit($owner);
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'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_getJettonWalletInit($owner);
throw_unless(4429, __tact_address_eq($contractAddress(($winit'code, $winit'data)), $ctx'sender));
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), ()) $__gen_TONB_requireOwner((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)), ()) $__gen_TONB_requireOwner((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
throw_unless(132, __tact_address_eq(__gen_Context_get_sender(__tact_context_get()), $self'owner));
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_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, (cell, cell, int)) $self) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
slice $__gen_TONB_owner((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
return $self'owner;
}
@ -503,97 +509,105 @@ _ $__gen_get_owner() method_id(83229) {
return res;
}
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), ()) $__gen_TONB_sendStake((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)), ()) $__gen_TONB_sendStake((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
if (null?($self'staking_pool)) {
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
int $value = (__tact_my_balance() - 100000000);
int $value = ((__tact_my_balance() - 500000000) - 300000000);
if (($value < 50000000)) {
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
$self'in_the_pool = ($self'in_the_pool + $value);
$send($stakingDepositMessage($value, __tact_not_null($self'staking_pool)));
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), ()) $__gen_TONB_requestWithdrawal((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, slice $address, int $value) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)), ()) $__gen_TONB_requestWithdrawal((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self, slice $address, int $value) impure inline_ref {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = $self;
$self'withdrawal_requests'addresses~__tact_dict_set_int_slice(257, $self'withdrawal_requests'n_requests, $address);
$self'withdrawal_requests'amounts~__tact_dict_set_int_int(257, $self'withdrawal_requests'n_requests, $value, 257);
$self'withdrawal_requests'n_requests = ($self'withdrawal_requests'n_requests + 1);
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
(((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int))), ()) $__gen_TONB_receive_Deposit((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, (int) $msg) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self;
(((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int))), ()) $__gen_TONB_receive_Deposit((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self, (int) $msg) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_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 + $msg'amount) + 20000000) + 65000000)));
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_mint($ctx'sender, $msg'amount, $ctx'sender);
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_sendStake();
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_mint($ctx'sender, $msg'amount, $ctx'sender);
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_sendStake();
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
(((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int))), ()) $__gen_TONB_receive((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self;
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
(((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int))), ()) $__gen_TONB_receive((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_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'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
(((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int))), ()) $__gen_TONB_receive_Withdraw((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, (int) $msg) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self;
(((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int))), ()) $__gen_TONB_receive_Withdraw((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self, (int) $msg) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_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 >= 100000000));
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_burn($ctx'sender, $msg'amount, $ctx'sender);
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_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'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
(((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int))), ()) $__gen_TONB_receive_SetStakingPool((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self, (slice) $msg) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self;
var ($msg'staking_pool) = $msg;
$self'staking_pool = $msg'staking_pool;
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
(((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int))), ()) $__gen_TONB_receive_TokenUpdateContent((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, (cell) $msg) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self;
(((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int))), ()) $__gen_TONB_receive_TokenUpdateContent((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self, (cell) $msg) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self;
var ($msg'content) = $msg;
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_requireOwner();
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_requireOwner();
$self'content = $msg'content;
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
(((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int))), ()) $__gen_TONB_receive_TokenBurnNotification((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, (int, int, slice, slice) $msg) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self;
(((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int))), ()) $__gen_TONB_receive_TokenBurnNotification((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self, (int, int, slice, slice) $msg) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self;
var ($msg'queryId, $msg'amount, $msg'owner, $msg'responseAddress) = $msg;
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_requireWallet($msg'owner);
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_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);
int $available = ((__tact_my_balance() - 100000000) - 100000000);
int $available = ((__tact_my_balance() - 500000000) - 100000000);
if (($available < $msg'amount)) {
int $diff = ($msg'amount - $available);
$send((false, $msg'owner, (__tact_my_balance() - 100000000), 0, null(), null(), null()));
$send((false, $msg'owner, (__tact_my_balance() - 500000000), 0, null(), null(), null()));
cell $body = __gen_writecell_TokenTransferInternal((0, $diff, my_address(), my_address(), 0, $emptySlice(), null(), null()));
slice $walletAddress = $__gen_TONB_get_wallet_address(($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), $msg'owner);
slice $walletAddress = $__gen_TONB_get_wallet_address(($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), $msg'owner);
$send((false, $walletAddress, 0, 64, $body, null(), null()));
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_requestWithdrawal($msg'owner, $diff);
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_requestWithdrawal($msg'owner, $diff);
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
$send((false, $msg'owner, $msg'amount, 0, null(), null(), null()));
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
(((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int))), ()) $__gen_TONB_receive_BlacklistWallet((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self, (slice) $msg) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self;
(((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int))), ()) $__gen_TONB_receive_BlacklistWallet((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self, (slice) $msg) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self;
var ($msg'wallet) = $msg;
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_requireOwner();
var ($winit'code, $winit'data) = ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_getJettonWalletInit($msg'wallet);
($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_requireOwner();
var ($winit'code, $winit'data) = ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))~$__gen_TONB_getJettonWalletInit($msg'wallet);
slice $walletAddress = $contractAddress(($winit'code, $winit'data));
$send((false, $walletAddress, 0, 64, __gen_writecell_BlacklistWallet(($msg'wallet)), null(), null()));
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)), ()) $__gen_TONB_receive_comment_f7b1ab6077945b37370a1550574675180cf87df4cb047c869746812a83667d4c((int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) $self) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self;
((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)), ()) $__gen_TONB_receive_comment_f7b1ab6077945b37370a1550574675180cf87df4cb047c869746812a83667d4c((int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) $self) impure inline {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)) = $self;
int $i = 0;
while (($i < $self'withdrawal_requests'n_requests)) {
$send((true, __tact_not_null(__tact_dict_get_int_slice($self'withdrawal_requests'addresses, 257, $i)), __tact_not_null(__tact_dict_get_int_int($self'withdrawal_requests'amounts, 257, $i, 257)), 0, null(), null(), null()));
$i = ($i + 1);
}
($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests) = (null(), null(), 0);
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
return (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)), ());
}
@ -641,6 +655,15 @@ _ $__gen_get_owner() method_id(83229) {
return ();
}
;; Receive SetStakingPool message
if (op == 124047688) {
var self = __gen_load_TONB();
var msg = in_msg~__gen_read_SetStakingPool();
self~$__gen_TONB_receive_SetStakingPool(msg);
__gen_store_TONB(self);
return ();
}
;; Receive TokenUpdateContent message
if (op == 201882270) {
var self = __gen_load_TONB();
@ -694,5 +717,5 @@ _ supported_interfaces() method_id {
}
_ get_abi_ipfs() {
return "ipfs://QmS8xdbR6Ba79t2bLFssxSLGyPcHmTcGF5v9qMFJyN2nrb";
return "ipfs://QmT3asZBJxdjojRfpy7LPafCD4rqJn3fQzFqeWGuf8rLCC";
}

243
sources/output/jetton_TONB.code.fif

@ -28,6 +28,7 @@ PROGRAM{
DECLPROC __gen_write_BlacklistWallet
DECLPROC __gen_writecell_BlacklistWallet
DECLPROC __gen_read_BlacklistWallet
DECLPROC __gen_read_SetStakingPool
DECLPROC __gen_write_WithdrawalRequests
DECLPROC __gen_read_WithdrawalRequests
DECLPROC __gen_read_Deposit
@ -67,6 +68,7 @@ PROGRAM{
DECLPROC $__gen_TONB_receive_Deposit
DECLPROC $__gen_TONB_receive
DECLPROC $__gen_TONB_receive_Withdraw
DECLPROC $__gen_TONB_receive_SetStakingPool
DECLPROC $__gen_TONB_receive_TokenUpdateContent
DECLPROC $__gen_TONB_receive_TokenBurnNotification
DECLPROC $__gen_TONB_receive_BlacklistWallet
@ -357,6 +359,14 @@ PROGRAM{
129 THROWIFNOT
__tact_load_address INLINECALLDICT
}>
__gen_read_SetStakingPool PROCINLINE:<{
32 LDU
SWAP
124047688 PUSHINT
EQUAL
129 THROWIFNOT
__tact_load_address_opt INLINECALLDICT
}>
__gen_write_WithdrawalRequests PROCINLINE:<{
s2 s3 XCHG2
STDICT
@ -438,28 +448,28 @@ PROGRAM{
STREF
}>
__gen_write_TONB PROCINLINE:<{
s11 s10 XCHG2
s12 s11 XCHG2
STGRAMS
s0 s8 XCHG2
s0 s9 XCHG2
__tact_store_address INLINECALLDICT
s6 PUSH
s7 PUSH
ISNULL
NOT
IF:<{
TRUE
SWAP
1 STI
s1 s6 XCHG
s1 s7 XCHG
STREF
}>ELSE<{
s6 POP
s7 POP
FALSE
s0 s6 XCHG2
s0 s7 XCHG2
1 STI
}>
s1 s4 XCHG
s1 s5 XCHG
1 STI
ROT
s0 s3 XCHG2
__tact_store_address_opt INLINECALLDICT
SWAP
__tact_store_address_opt INLINECALLDICT
@ -469,9 +479,17 @@ PROGRAM{
STIX
ROT
__tact_store_address_opt INLINECALLDICT
s4 s3 XCHG2
s1 s2 XCHG
257 PUSHINT
STIX
NEWC
s3 s1 s3 XCHG3
s5 s4 XCHG2
__gen_write_WithdrawalRequests INLINECALLDICT
ENDC
ROT
STREF
ENDC
SWAP
STREF
}>
@ -499,14 +517,19 @@ PROGRAM{
LDIX
__tact_load_address_opt INLINECALLDICT
SWAP
257 PUSHINT
LDIX
LDREF
DROP
CTOS
__gen_read_WithdrawalRequests INLINECALLDICT
s3 POP
s5 s11 XCHG
s5 s10 XCHG
s5 s9 XCHG
s5 s8 XCHG
s5 s7 XCHG
s5 s6 XCHG
s6 s12 XCHG
s6 s11 XCHG
s6 s10 XCHG
s6 s9 XCHG
s6 s8 XCHG
s6 s7 XCHG
ROT
}>
__gen_StateInit_get_code PROCINLINE:<{
@ -525,14 +548,14 @@ PROGRAM{
SWAP
__tact_context_sys SETGLOB
__gen_read_TONB INLINECALLDICT
1 11 BLKDROP2
1 12 BLKDROP2
}>
__gen_store_TONB PROCINLINE:<{
NEWC
__tact_context_sys GETGLOB
SWAP
STREF
11 -ROLL
12 -ROLL
__gen_write_TONB INLINECALLDICT
ENDC
c4 POP
@ -656,8 +679,9 @@ PROGRAM{
TRUE
0 PUSHINT
NEWC
B{b5ee9c7241010101000900000e4465706f7369749721d513} B>boc <s PUSHSLICE
STSLICER
2077040623 PUSHINT
SWAP
32 STU
ENDC
s2 s4 XCHG
PUSHNULL
@ -733,18 +757,18 @@ PROGRAM{
}>
$__gen_TONB_get_wallet_address PROCREF:<{
$__gen_TONB_getJettonWalletInit INLINECALLDICT
11 2 BLKDROP2
12 2 BLKDROP2
$contractAddress INLINECALLDICT
}>
$__gen_get_get_wallet_address PROC:<{
__gen_load_TONB INLINECALLDICT
11 ROLL
12 ROLL
$__gen_TONB_get_wallet_address INLINECALLDICT
}>
$__gen_TONB_get_jetton_data PROCREF:<{
MYADDR
$__gen_TONB_getJettonWalletInit INLINECALLDICT
7 2 BLKDROP2
8 2 BLKDROP2
__gen_StateInit_get_code INLINECALLDICT
s3 s3 s0 XCHG3
}>
@ -754,31 +778,32 @@ PROGRAM{
__gen_JettonData_to_external INLINECALLDICT
}>
$__gen_TONB_mint PROCREF:<{
s13 s1 XCPU
s14 s1 XCPU
ADD
11 2 BLKSWAP
12 2 BLKSWAP
$__gen_TONB_getJettonWalletInit INLINECALLDICT
2DUP
$contractAddress INLINECALLDICT
__tact_context_sys GETGLOB
MYADDR
s9 s2 s(-2) PU2XC
s10 s2 s(-2) PU2XC
$__gen_Linker_init_child CALLDICT
2DUP
$contractAddress INLINECALLDICT
FALSE
20000000 PUSHINT
0 PUSHINT
s0 s14 XCHG
s0 s15 XCHG
__gen_writecell_SetLinkerNeighbor INLINECALLDICT
s3 PUSH
s3 s6 XCHG
s4 s1 s5 XCHG3
s3 s15 XCHG
s1 s15 s0 XCHG3
s3 16 s() XCHG
s1 s2 XCHG
s1 16 s() XCHG
$send INLINECALLDICT
s8 PUSH
s0 s8 XCHG
s9 PUSH
s0 s9 XCHG
INC
0 PUSHINT
MYADDR
@ -787,40 +812,32 @@ PROGRAM{
s4 PUSH
DEC
s4 s7 XCHG
s6 20 s() XCHG
s6 21 s() XCHG
s3 s5 XCHG
s4 21 s() XCHG
s4 22 s() XCHG
3 ROLL
s0 s14 XCHG
s0 s15 XCHG
__gen_writecell_TokenTransferInternal INLINECALLDICT
FALSE
s0 s4 XCHG
s3 s14 XCHG
s3 s15 XCHG
65000000 PUSHINT
s0 s3 XCHG
0 PUSHINT
s3 s1 s3 XCHG3
s0 17 s() XCHG
s0 18 s() XCHG
$send INLINECALLDICT
s9 s11 XCHG
s8 s10 XCHG
s7 s9 XCHG
s6 s8 XCHG
s5 s7 XCHG
s4 s6 XCHG
s0 s3 s5 XCHG3
s1 s4 XCHG
4 3 REVERSE
2 3 BLKSWAP
}>
$__gen_TONB_burn PROCREF:<{
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
12 3 BLKSWAP
s14 PUSH
$__gen_TONB_getJettonWalletInit INLINECALLDICT
2DUP
$contractAddress INLINECALLDICT
@ -829,15 +846,17 @@ PROGRAM{
64 PUSHINT
s1 s0 s2 PUXC2
s2 20 s() XCHG
s1 18 s() XCHG
s1 21 s() XCHG
s0 19 s() XCHG
__gen_writecell_TokenBurn INLINECALLDICT
s6 16 s() XCHG
s1 s5 XCHG
s4 17 s() XCHG
s3 s15 XCHG
s15 s2 XCHG2
s3 18 s() XCHG
s0 s2 XCHG
s1 18 s() XCHG
$send INLINECALLDICT
s8 s11 XCHG
s7 s10 XCHG
3 7 BLKSWAP
}>
@ -845,40 +864,42 @@ PROGRAM{
__tact_context_get INLINECALLDICT
s2 s3 XCHG
3 BLKDROP
12 -ROLL
13 -ROLL
$__gen_TONB_getJettonWalletInit INLINECALLDICT
SWAP
4429 PUSHINT
s0 s2 XCHG
$contractAddress INLINECALLDICT
s0 s13 XCHG2
s0 s14 XCHG2
__tact_address_eq INLINECALLDICT
s1 s12 XCHG
s1 s13 XCHG
THROWANYIFNOT
10 ROLL
11 ROLL
}>
$__gen_TONB_requireOwner PROCREF:<{
__tact_context_get INLINECALLDICT
__gen_Context_get_sender INLINECALLDICT
s10 PUSH
s11 PUSH
__tact_address_eq INLINECALLDICT
132 THROWIFNOT
}>
$__gen_TONB_owner PROCREF:<{
s9 s10 XCHG
10 BLKDROP
s10 s11 XCHG
11 BLKDROP
}>
$__gen_get_owner PROC:<{
__gen_load_TONB INLINECALLDICT
$__gen_TONB_owner INLINECALLDICT
}>
$__gen_TONB_sendStake PROCREF:<{
s3 PUSH
s4 PUSH
ISNULL
IFJMP:<{
}>
__tact_my_balance INLINECALLDICT
100000000 PUSHINT
500000000 PUSHINT
SUB
300000000 PUSHINT
SUB
DUP
50000000 PUSHINT
@ -886,8 +907,11 @@ PROGRAM{
IFJMP:<{
DROP
}>
s4 PUSH
s4 s4 XCPU
ADD
s5 PUSH
__tact_not_null INLINECALLDICT
s1 s5 XCHG
$stakingDepositMessage INLINECALLDICT
$send INLINECALLDICT
}>
@ -939,31 +963,27 @@ PROGRAM{
TUCK
$__gen_TONB_burn INLINECALLDICT
}>
$__gen_TONB_receive_SetStakingPool PROCINLINE:<{
s5 POP
}>
$__gen_TONB_receive_TokenUpdateContent PROCINLINE:<{
11 -ROLL
12 -ROLL
$__gen_TONB_requireOwner INLINECALLDICT
s8 POP
s9 POP
s10 s11 XCHG
s9 s10 XCHG
s8 s9 XCHG
7 ROLL
8 ROLL
}>
$__gen_TONB_receive_TokenBurnNotification PROCINLINE:<{
DROP
s2 POP
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
12 2 BLKSWAP
s13 PUSH
$__gen_TONB_requireWallet INLINECALLDICT
s10 s12 XCPU
s11 s12 XCPU
SUB
__tact_my_balance INLINECALLDICT
100000000 PUSHINT
500000000 PUSHINT
SUB
100000000 PUSHINT
SUB
@ -974,9 +994,9 @@ PROGRAM{
SUB
FALSE
__tact_my_balance INLINECALLDICT
100000000 PUSHINT
500000000 PUSHINT
SUB
s13 s(-1) PUXC
s15 s(-1) PUXC
0 PUSHINT
PUSHNULL
PUSHNULL
@ -992,12 +1012,12 @@ PROGRAM{
PUSHNULL
PUSHNULL
__gen_writecell_TokenTransferInternal INLINECALLDICT
s13 s10 s9 PUSH3
s11 s10 s9 PUSH3
s11 s10 s9 PUSH3
s11 PUSH
21 s() PUSH
s13 s11 s10 PUSH3
s12 s11 s10 PUSH3
s12 s11 s10 PUSH3
s12 s11 PUSH2
23 s() PUSH
26 s() PUSH
$__gen_TONB_get_wallet_address INLINECALLDICT
FALSE
s0 s2 XCHG
@ -1007,6 +1027,8 @@ PROGRAM{
PUSHNULL
PUSHNULL
$send INLINECALLDICT
s12 s13 XCHG
s10 s12 XCHG
s9 s11 XCHG
s8 s10 XCHG
s7 s9 XCHG
@ -1015,37 +1037,37 @@ PROGRAM{
s4 s6 XCHG
s3 s5 XCHG
s4 s3 s0 XCHG3
s1 s2 XCHG
$__gen_TONB_requestWithdrawal INLINECALLDICT
}>ELSE<{
DROP
FALSE
s0 s12 s13 XCHG3
s0 s14 s13 XCHG3
0 PUSHINT
PUSHNULL
PUSHNULL
PUSHNULL
$send INLINECALLDICT
s9 s10 XCHG
2 8 BLKSWAP
2 9 BLKSWAP
}>
}>
$__gen_TONB_receive_BlacklistWallet PROCINLINE:<{
11 -ROLL
12 -ROLL
$__gen_TONB_requireOwner INLINECALLDICT
s11 PUSH
s12 PUSH
$__gen_TONB_getJettonWalletInit INLINECALLDICT
$contractAddress INLINECALLDICT
FALSE
0 PUSHINT
64 PUSHINT
s0 s15 XCHG
s0 16 s() XCHG
__gen_writecell_BlacklistWallet INLINECALLDICT
s1 s4 s0 XCHG3
s1 s15 XCHG
s1 16 s() XCHG
PUSHNULL
PUSHNULL
$send INLINECALLDICT
10 ROLL
11 ROLL
}>
$__gen_TONB_receive_comment_f7b1ab6077945b37370a1550574675180cf87df4cb047c869746812a83667d4c PROCINLINE:<{
0 PUSHINT
@ -1116,9 +1138,10 @@ PROGRAM{
IFJMP:<{
DROP
__gen_load_TONB INLINECALLDICT
s0 s11 XCHG
s0 s12 XCHG
__gen_read_Deposit INLINECALLDICT
NIP
s11 s12 XCHG
s10 s11 XCHG
s9 s10 XCHG
s8 s9 XCHG
@ -1149,9 +1172,10 @@ PROGRAM{
IFJMP:<{
DROP
__gen_load_TONB INLINECALLDICT
s0 s11 XCHG
s0 s12 XCHG
__gen_read_Withdraw INLINECALLDICT
NIP
s11 s12 XCHG
s10 s11 XCHG
s9 s10 XCHG
s8 s9 XCHG
@ -1165,14 +1189,37 @@ PROGRAM{
__gen_store_TONB INLINECALLDICT
}>
DUP
124047688 PUSHINT
EQUAL
IFJMP:<{
DROP
__gen_load_TONB INLINECALLDICT
s0 s12 XCHG
__gen_read_SetStakingPool INLINECALLDICT
NIP
s11 s12 XCHG
s10 s11 XCHG
s9 s10 XCHG
s8 s9 XCHG
s7 s8 XCHG
s6 s7 XCHG
s5 s6 XCHG
s4 s5 XCHG
s3 s4 XCHG
s1 s3 s0 XCHG3
$__gen_TONB_receive_SetStakingPool INLINECALLDICT
__gen_store_TONB INLINECALLDICT
}>
DUP
201882270 PUSHINT
EQUAL
IFJMP:<{
DROP
__gen_load_TONB INLINECALLDICT
s0 s11 XCHG
s0 s12 XCHG
__gen_read_TokenUpdateContent INLINECALLDICT
NIP
s11 s12 XCHG
s10 s11 XCHG
s9 s10 XCHG
s8 s9 XCHG
@ -1191,9 +1238,10 @@ PROGRAM{
IFJMP:<{
DROP
__gen_load_TONB INLINECALLDICT
s0 s11 XCHG
s0 s12 XCHG
__gen_read_TokenBurnNotification INLINECALLDICT
s4 POP
s14 s15 XCHG
s13 s14 XCHG
s12 s13 XCHG
s11 s12 XCHG
@ -1214,9 +1262,10 @@ PROGRAM{
IFJMP:<{
DROP
__gen_load_TONB INLINECALLDICT
s0 s11 XCHG
s0 s12 XCHG
__gen_read_BlacklistWallet INLINECALLDICT
NIP
s11 s12 XCHG
s10 s11 XCHG
s9 s10 XCHG
s8 s9 XCHG
@ -1252,6 +1301,6 @@ PROGRAM{
86142586315491086060343270784266291122 PUSHINT
}>
get_abi_ipfs PROC:<{
x{697066733a2f2f516d53387864625236426137397432624c46737378534c47795063486d54634746357639714d464a794e326e7262} PUSHSLICE
x{697066733a2f2f516d543361735a424a78646a6f6a52667079374c50616643443472714a6e3366517a4671655747756638724c4343} PUSHSLICE
}>
}END>c

830
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.

21
sources/output/jetton_TONB.init.fc

@ -29,8 +29,8 @@ builder __gen_write_WithdrawalRequests(builder build_0, (cell, cell, int) v) inl
return build_0;
}
builder __gen_write_TONB(builder build_0, (int, slice, cell, int, slice, slice, int, slice, (cell, cell, int)) v) inline {
var (v'totalSupply, v'owner, v'content, v'mintable, v'first_linker, v'last_linker, v'n_linkers, v'staking_pool, (v'withdrawal_requests'addresses, v'withdrawal_requests'amounts, v'withdrawal_requests'n_requests)) = v;
builder __gen_write_TONB(builder build_0, (int, slice, cell, int, slice, slice, int, slice, int, (cell, cell, int)) v) inline {
var (v'totalSupply, v'owner, v'content, v'mintable, v'first_linker, v'last_linker, v'n_linkers, v'staking_pool, v'in_the_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);
@ -40,28 +40,33 @@ 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_1 = build_1.store_int(v'in_the_pool, 257);
var build_2 = begin_cell();
build_2 = __gen_write_WithdrawalRequests(build_2, (v'withdrawal_requests'addresses, v'withdrawal_requests'amounts, v'withdrawal_requests'n_requests));
build_1 = store_ref(build_1, build_2.end_cell());
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, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = (null(), null(), null(), null(), null(), null(), 0, null(), null());
cell $__gen_TONB_init(cell sys', slice $owner, cell $content, slice $staking_pool) {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable, $self'first_linker, $self'last_linker, $self'n_linkers, $self'staking_pool, $self'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests))) = (null(), null(), null(), null(), null(), null(), 0, null(), 0, null());
$self'totalSupply = 0;
$self'owner = $owner;
$self'mintable = true;
$self'content = $content;
$self'staking_pool = $staking_pool;
($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests) = (null(), null(), 0);
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, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)));
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'in_the_pool, ($self'withdrawal_requests'addresses, $self'withdrawal_requests'amounts, $self'withdrawal_requests'n_requests)));
return b'.end_cell();
}
cell init(cell sys', slice $$owner, cell $$content) method_id {
cell init(cell sys', slice $$owner, cell $$content, slice $$staking_pool) method_id {
slice $owner = $$owner;
cell $content = $$content;
return $__gen_TONB_init(sys', $owner, $content);
slice $staking_pool = $$staking_pool;
return $__gen_TONB_init(sys', $owner, $content, $staking_pool);
}
() main() {

39
sources/output/jetton_TONB.init.fif

@ -36,28 +36,28 @@ PROGRAM{
STIX
}>
__gen_write_TONB PROCINLINE:<{
s11 s10 XCHG2
s12 s11 XCHG2
STGRAMS
s0 s8 XCHG2
s0 s9 XCHG2
__tact_store_address INLINECALLDICT
s6 PUSH
s7 PUSH
ISNULL
NOT
IF:<{
TRUE
SWAP
1 STI
s1 s6 XCHG
s1 s7 XCHG
STREF
}>ELSE<{
s6 POP
s7 POP
FALSE
s0 s6 XCHG2
s0 s7 XCHG2
1 STI
}>
s1 s4 XCHG
s1 s5 XCHG
1 STI
ROT
s0 s3 XCHG2
__tact_store_address_opt INLINECALLDICT
SWAP
__tact_store_address_opt INLINECALLDICT
@ -67,9 +67,17 @@ PROGRAM{
STIX
ROT
__tact_store_address_opt INLINECALLDICT
s4 s3 XCHG2
s1 s2 XCHG
257 PUSHINT
STIX
NEWC
s3 s1 s3 XCHG3
s5 s4 XCHG2
__gen_write_WithdrawalRequests INLINECALLDICT
ENDC
ROT
STREF
ENDC
SWAP
STREF
}>
@ -77,20 +85,21 @@ PROGRAM{
PUSHNULL
PUSHNULL
0 PUSHINT
PUSHNULL
OVER
s0 s0 PUSH2
TRUE
PUSHNULL
PUSHNULL
s3 PUSH
s0 s11 XCHG
s0 s12 XCHG
NEWC
STREF
s0 s11 XCHG
s0 s12 XCHG
s4 s11 XCHG
s4 s10 XCHG
s4 s9 XCHG
s4 s8 XCHG
5 3 REVERSE
s3 s8 XCHG
s3 s7 XCHG
s3 s6 XCHG
s3 s5 XCHG
__gen_write_TONB INLINECALLDICT
ENDC

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

@ -6,45 +6,46 @@ SETCP0
PUSHNULL
PUSHNULL
0 PUSHINT
PUSHNULL
s1 PUSH
s0 s0 PUSH2
-1 PUSHINT
PUSHNULL
PUSHNULL
s3 PUSH
s0 s11 XCHG
s0 s12 XCHG
NEWC
STREF
s0 s11 XCHG
s0 s12 XCHG
s4 s11 XCHG
s4 s10 XCHG
s4 s9 XCHG
s4 s8 XCHG
5 3 REVERSE
s3 s8 XCHG
s3 s7 XCHG
s3 s6 XCHG
s3 s5 XCHG
s11 s10 XCHG2
s12 s11 XCHG2
STGRAMS
s0 s8 XCHG2
s0 s9 XCHG2
STSLICER
s6 PUSH
s7 PUSH
ISNULL
NOT
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
s1 s6 XCHG
s1 s7 XCHG
STREF
}> PUSHCONT
<{
s6 POP
s7 POP
0 PUSHINT
s0 s6 XCHG2
s0 s7 XCHG2
1 STI
}> PUSHCONT
IFELSE
s1 s4 XCHG
s1 s5 XCHG
1 STI
ROT
s0 s3 XCHG2
s0 PUSH
ISNULL
<{
@ -87,13 +88,21 @@ SETCP0
STSLICER
}> PUSHCONT
IFELSE
s4 s3 XCHG2
s1 s2 XCHG
257 PUSHINT
STIX
NEWC
s3 s1 s3 XCHG3
s5 s4 XCHG2
s2 s3 XCHG2
STDICT
STDICT
257 PUSHINT
STIX
ENDC
ROT
STREF
ENDC
s0 s1 XCHG
STREF
ENDC

8
sources/output/jetton_TONB.md

@ -1,9 +1,9 @@
# TACT Compilation Report
Contract: TONB
BOC Size: 3240 bytes
BOC Size: 3438 bytes
# Types
Total Types: 28
Total Types: 29
## StateInit
TLB: `_ code:^cell data:^cell = StateInit`
@ -101,6 +101,10 @@ Signature: `Distribution{addresses:AddressList{addresses:dict<int, address>,leng
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>}}`
## SetStakingPool
TLB: `set_staking_pool#0764d148 staking_pool:Maybe address = SetStakingPool`
Signature: `SetStakingPool{staking_pool:Maybe address}`
## 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

63
sources/output/jetton_TONB.ts

File diff suppressed because one or more lines are too long

2
sources/output/jetton_TONBWallet.abi

File diff suppressed because one or more lines are too long

2
sources/output/jetton_TONBWallet.code.fc

@ -491,5 +491,5 @@ _ supported_interfaces() method_id {
}
_ get_abi_ipfs() {
return "ipfs://QmcxTwUyhdWnVtTQofwhidFsnnH8J6cMrdWwQR5o9oNWav";
return "ipfs://QmWmwq8kiCPdxDUjPz2DSrahAGvYmYK56xg35uBGLkKibZ";
}

2
sources/output/jetton_TONBWallet.code.fif

@ -962,6 +962,6 @@ PROGRAM{
209778528950190195973528115415557644819 PUSHINT
}>
get_abi_ipfs PROC:<{
x{697066733a2f2f516d6378547755796864576e567454516f667768696446736e6e48384a36634d726457775152356f396f4e576176} PUSHSLICE
x{697066733a2f2f516d576d7771386b694350647844556a507a324453726168414776596d594b3536786733357542474c6b4b69625a} PUSHSLICE
}>
}END>c

6
sources/output/jetton_TONBWallet.md

@ -3,7 +3,7 @@ Contract: TONBWallet
BOC Size: 2048 bytes
# Types
Total Types: 28
Total Types: 29
## StateInit
TLB: `_ code:^cell data:^cell = StateInit`
@ -101,6 +101,10 @@ Signature: `Distribution{addresses:AddressList{addresses:dict<int, address>,leng
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>}}`
## SetStakingPool
TLB: `set_staking_pool#0764d148 staking_pool:Maybe address = SetStakingPool`
Signature: `SetStakingPool{staking_pool:Maybe address}`
## 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

41
sources/output/jetton_TONBWallet.ts

@ -1263,6 +1263,47 @@ function dictValueParserInitiateDistributionVote(): DictionaryValue<InitiateDist
}
}
}
export type SetStakingPool = {
$$type: 'SetStakingPool';
staking_pool: Address | null;
}
export function storeSetStakingPool(src: SetStakingPool) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(124047688, 32);
b_0.storeAddress(src.staking_pool);
};
}
export function loadSetStakingPool(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 124047688) { throw Error('Invalid prefix'); }
let _staking_pool = sc_0.loadMaybeAddress();
return { $$type: 'SetStakingPool' as const, staking_pool: _staking_pool };
}
function loadTupleSetStakingPool(source: TupleReader) {
let _staking_pool = source.readAddressOpt();
return { $$type: 'SetStakingPool' as const, staking_pool: _staking_pool };
}
function storeTupleSetStakingPool(source: SetStakingPool) {
let builder = new TupleBuilder();
builder.writeAddress(source.staking_pool);
return builder.build();
}
function dictValueParserSetStakingPool(): DictionaryValue<SetStakingPool> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeSetStakingPool(src)).endCell());
},
parse: (src) => {
return loadSetStakingPool(src.loadRef().beginParse());
}
}
}
export type WithdrawalRequests = {
$$type: 'WithdrawalRequests';
addresses: Dictionary<bigint, Address>;

13
sources/pseudostaking.tact

@ -22,4 +22,17 @@ contract PseudoStaking {
to: ctx.sender
});
}
receive(msg: Slice) {
let op: Int = msg.loadUint(32);
if (op == 0x7bcd1fef) {
let ctx: Context = context();
let sender: Address = ctx.sender;
let ex_stake: Int? = self.stakes.get(sender);
if (ex_stake == null) {
ex_stake = 0;
}
self.stakes.set(sender, ex_stake!! + ctx.value);
}
}
}

4
sources/staking.tact

@ -5,7 +5,7 @@ fun stakingDepositMessage(value: Int, pool: Address): SendParameters {
return SendParameters{
to: pool,
value: value,
body: beginCell().storeSlice("Deposit".asSlice()).endCell()
body: beginCell().storeUint(0x7bcd1fef, 32)/*.storeSlice("Deposit".asSlice())*/.endCell()
};
}
@ -43,7 +43,7 @@ trait StakingTrait {
if(self.staking_pool == null) {
return;
}
let value: Int = myBalance() - tonb_floor;
let value: Int = myBalance() - tonb_floor - staking_gas;
if(value < ton("0.05")) {
return;
}

88
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": "kQAvIKE3SXqBVFVm7n-B_dWCiJEMzGsZubdM6KSjmKUjfdqx",
"to": "kQARvF2GzXY8kGo8EO2AxHCdVSVMqmP0pod9Q_GW1C8Vdi26",
"type": "internal",
"value": 1200000000n,
},
"type": "received",
},
{
"gasUsed": 31793n,
"gasUsed": 32790n,
"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": "kQAvIKE3SXqBVFVm7n-B_dWCiJEMzGsZubdM6KSjmKUjfdqx",
"to": "kQDZZaNqE7XxaQofxheKTzH3r_5VsKq0v-AacCBfKJpVnhV6",
"from": "kQARvF2GzXY8kGo8EO2AxHCdVSVMqmP0pod9Q_GW1C8Vdi26",
"to": "kQAgW4rD7L7jO9_YMVn-LKJH1Z5Ng4s_G8LfeTG6aYuA58xu",
"type": "internal",
"value": 11365000n,
},
@ -43,13 +43,13 @@ exports[`jetton should deploy and deposit the wallet with the correct sum of mon
"messages": [
{
"body": {
"cell": "x{178D4519000000000000000043B9ACA008005E41426E92F502A8AACDDCFF03FBAB0511221998D633736E99D14947314A46FB00023EDC525573FCB04AE638BEAD1B62BCD1ED2E0E721E32EDB4D4FE2E722CE07702_}
x{80000000000000000000000000000000000000000000000000000000000000002006CB2D1B509DAF8B4850FE30BC52798FBD7FF2AD8555A5FF00D38102F944D2ACF4_}",
"cell": "x{178D4519000000000000000043B9ACA008002378BB0D9AEC7920D47821DB0188E13AAA4A9954C7E94D0EFA87E32DA85E2AED00023EDC525573FCB04AE638BEAD1B62BCD1ED2E0E721E32EDB4D4FE2E722CE07702_}
x{8000000000000000000000000000000000000000000000000000000000000000200102DC561F65F719DEFEC18ACFF165123EACF26C1C59F8DE16FBC98DD34C5C073C_}",
"type": "cell",
},
"bounce": false,
"from": "kQAvIKE3SXqBVFVm7n-B_dWCiJEMzGsZubdM6KSjmKUjfdqx",
"to": "kQCYHPl_7VmiHpjZoVX0zEce5MDyg6VkYw-1HxUVzAFjOKZZ",
"from": "kQARvF2GzXY8kGo8EO2AxHCdVSVMqmP0pod9Q_GW1C8Vdi26",
"to": "kQDw_1r97a4JZHQhzXS1TNtQoCM7KzhazVMoGfbme_ASRl9L",
"type": "internal",
"value": 42293000n,
},
@ -58,3 +58,75 @@ exports[`jetton should deploy and deposit the wallet with the correct sum of mon
},
]
`;
exports[`jetton should work correctly with the staking 1`] = `
[
{
"message": {
"body": {
"cell": "x{21EEB6075174876E800}",
"type": "cell",
},
"bounce": true,
"from": "kQAI-3FJVc_ywSuY4vq0bYrzR7S4Och4y7bTU_i5yLOB3A6P",
"to": "kQCUp9iwvsCkm4HlN2V-yoIL2_lmaOUhJSVeIwqsTfuGOkLp",
"type": "internal",
"value": 100200000000n,
},
"type": "received",
},
{
"gasUsed": 36073n,
"type": "processed",
},
{
"messages": [
{
"body": {
"cell": "x{B3FCF4C12_}",
"type": "cell",
},
"bounce": false,
"from": "kQCUp9iwvsCkm4HlN2V-yoIL2_lmaOUhJSVeIwqsTfuGOkLp",
"to": "kQDaE50R-IOeyYvl7P7cnbkEjDQMUYps7YugwTKWJoqwqOH6",
"type": "internal",
"value": 11365000n,
},
],
"type": "sent",
},
{
"messages": [
{
"body": {
"cell": "x{178D451900000000000000005174876E800801294FB1617D81493703CA6ECAFD950417B7F2CCD1CA424A4ABC4615589BF70C7500023EDC525573FCB04AE638BEAD1B62BCD1ED2E0E721E32EDB4D4FE2E722CE07702_}
x{80000000000000000000000000000000000000000000000000000000000000002006D09CE88FC41CF64C5F2F67F6E4EDC82461A0628C53676C5D060994B134558544_}",
"type": "cell",
},
"bounce": false,
"from": "kQCUp9iwvsCkm4HlN2V-yoIL2_lmaOUhJSVeIwqsTfuGOkLp",
"to": "kQAhe-C5pZaLYVtsvlprNC53th6GxI2qyS81QDuC2f3RZ2pl",
"type": "internal",
"value": 42285000n,
},
],
"type": "sent",
},
{
"messages": [
{
"body": {
"cell": "x{7BCD1FEF}",
"type": "cell",
},
"bounce": true,
"from": "kQCUp9iwvsCkm4HlN2V-yoIL2_lmaOUhJSVeIwqsTfuGOkLp",
"to": "kQAQUSIm_zYC9VxtmVfOeKhmjxmGLXoU3PR_y7RQR9lxXtJM",
"type": "internal",
"value": 99491421000n,
},
],
"type": "sent",
},
]
`;

15
sources/tests/jetton.spec.ts

@ -14,7 +14,7 @@ describe('jetton', () => {
// Create jetton
let system = await ContractSystem.create();
let owner = system.treasure('owner');
let contract = system.open(await TONB.fromInit(owner.address, default_content));
let contract = system.open(await TONB.fromInit(owner.address, default_content, null));
let tracker = system.track(contract.address);
// Mint
@ -47,11 +47,20 @@ describe('jetton', () => {
// Create jetton
let system = await ContractSystem.create();
let owner = system.treasure('owner');
let contract = system.open(await TONB.fromInit(owner.address, default_content));
let tracker = system.track(contract.address);
let pseudostaking_contract = system.open(await PseudoStaking.fromInit());
let contract = system.open(await TONB.fromInit(owner.address, default_content, pseudostaking_contract.address));
await pseudostaking_contract.send(owner, { value: toNano('10000')}, "Deposit");
await contract.send(owner, {value: toNano('0.1')}, { $$type: "SetStakingPool", staking_pool: pseudostaking_contract.address });
await system.run();
let tracker = system.track(contract.address);
// Mint
await contract.send(owner, { value: toNano('100.2') }, { $$type: 'Deposit', amount: toNano('100') });
let log = await system.run();
let events = tracker.events();
// console.log(events)
expect(events).toMatchSnapshot();
expect((events[4] as any).messages[0].value).toBeGreaterThan(99000000000n);
});
});

3
sources/tests/voting.spec.ts

@ -10,11 +10,10 @@ import { PseudoStaking } from '../output/jetton_PseudoStaking';
describe('jetton', () => {
it('should be able to create a vote', async () => {
// Create jetton
let system = await ContractSystem.create();
let owner = system.treasure('owner');
let contract = system.open(await TONB.fromInit(owner.address, default_content));
let contract = system.open(await TONB.fromInit(owner.address, default_content, null));
let tracker = system.track(contract.address);
});
});
Loading…
Cancel
Save