23 #include "WrapperCommon.hpp"
24 #include "immutable_ids.hpp"
37 address external_wallet,
38 uint128 reserve_wallet_evers,
39 cell internal_wallet_code
43 [[
internal, answer_id]]
52 [[
internal, answer_id]]
56 uint128 evers_balance,
58 opt<Tip3Creds> sender,
72 uint256 sender_pubkey,
73 address_opt sender_owner,
76 address_opt out_owner,
84 address_opt answer_addr,
90 [[
internal, answer_id]]
94 [[
internal, answer_id]]
95 std::pair<address_opt, uint256>
cloned() = immutable_ids::wrapper_cloned_id;
101 uint256 cloned_pubkey,
102 address wrappers_cfg,
103 uint256 wrappers_cfg_code_hash,
104 uint16 wrappers_cfg_code_depth
105 ) = immutable_ids::wrapper_set_cloned_id;
109 wrapper_details_info
getDetails() = immutable_ids::wrapper_get_details_id;
124 ) = immutable_ids::wrapper_get_wallet_address_id;
130 using IWrapperPtr = handle<IWrapper>;
136 static std::pair<StateInit, uint256> execute(DWrapper data, cell code) {
137 cell data_cl = prepare_persistent_data<IWrapper, void, DWrapper>({}, data);
138 StateInit init { {}, {}, code, data_cl, {} };
139 cell init_cl = build(init).make_cell();
140 return { init, uint256(tvm_hash(init_cl)) };
TONTokenWallet contract interfaces and data-structs.
Wrapper contract interface.
Definition: Wrapper.hpp:32
uint128 requestTotalGranted()
Request total granted tokens.
wrapper_details_info getDetails()
Get info about contract state details.
address getWalletAddress(uint256 pubkey, address_opt owner)
Calculate flex tip3 wallet address.
void init(address external_wallet, uint128 reserve_wallet_evers, cell internal_wallet_code)
Additional initialization on deploy.
void transferFromReserveWallet(address_opt answer_addr, address to, uint128 tokens)
Transfer gathered fees from reserve wallet to other wallet. Request allowed only from Flex root.
WrapperRet onTip3Transfer(uint128 balance, uint128 new_tokens, uint128 evers_balance, Tip3Config tip3cfg, opt< Tip3Creds > sender, Tip3Creds receiver, cell payload, address answer_addr)
Implements ITONTokenWalletNotify::onTip3Transfer(). Notification about incoming tokens from Wrapper o...
void setCloned(address_opt cloned, uint256 cloned_pubkey, address wrappers_cfg, uint256 wrappers_cfg_code_hash, uint16 wrappers_cfg_code_depth)
Set cloned wrapper address.
void burn(uint128 tokens, address answer_addr, uint256 sender_pubkey, address_opt sender_owner, uint256 out_pubkey, address_opt out_owner, opt< cell > notify)
Burn internal tokens.
Tip3Config getTip3Config()
Get Tip3 configuration.
address getReserveWallet()
Get reserve token wallet address for this Wrapper.
address deployEmptyWallet(uint256 pubkey, address_opt owner, uint128 evers)
Deploy empty wallet.
std::pair< address_opt, uint256 > cloned()
Request cloned wrapper address.
bool hasInternalWalletCode()
If internal wallet code was set up.