9 #include <tvm/schema/message.hpp>
10 #include <tvm/smart_switcher.hpp>
11 #include <tvm/contract_handle.hpp>
16 #include "EverReTransferArgs.hpp"
51 bool immediate_client,
57 uint32 lend_finish_time,
59 cell unsalted_price_code,
72 cell salted_price_code,
99 uint128 evers_to_wallet,
102 cell flex_wallet_code
112 uint128 evers_to_auth_idx,
113 uint128 refill_wallet,
123 opt<bind_info> binding,
126 dict_array<address> wallets,
127 uint128 evers_relend_call,
128 uint128 evers_each_wallet_call,
129 uint128 evers_to_remove,
130 uint128 evers_to_auth_idx
145 address_opt out_owner,
146 address my_tip3_addr,
155 dict_array<BurnInfo> burns
167 dict_array<address> prices
179 address_opt out_owner,
180 address my_tip3_addr,
190 address my_tip3_addr,
192 opt<bind_info> binding,
199 [[
internal, answer_id]]
203 uint128 evers_balance,
205 opt<Tip3Creds> sender,
214 uint128 request_evers,
215 address user_data_cfg
222 uint256 owner_pubkey,
223 address_opt owner_addr,
231 uint128 wallet_deploy_evers,
232 uint128 wallet_keep_evers
239 cell salted_price_code
252 using IFlexClientPtr = handle<IFlexClient>;
FlexClientStub contract interfaces and data-structs.
PriceXchg contract interfaces and data-structs PriceXchg - contract to enqueue and process tip3-tip3 ...
Burn parameters for each wallet in burnThemAll
Definition: FlexClient.hpp:33
uint256 out_pubkey
Public key for external wallet (out)
Definition: FlexClient.hpp:34
address_opt out_owner
Internal (contract) owner for external wallet (out)
Definition: FlexClient.hpp:35
address wallet
Wallet address.
Definition: FlexClient.hpp:36
opt< cell > notify
Definition: FlexClient.hpp:37
FlexClient persistent data struct.
Definition: FlexClient.hpp:255
uint256 owner_
Owner's public key.
Definition: FlexClient.hpp:256
dict_array< BurnInfo > burns_
Array of burn parameters for each wallet.
Definition: FlexClient.hpp:264
bool_t packet_canceling_
When cancelThemAll was postponed into continueCancelThemAll call.
Definition: FlexClient.hpp:265
optcell auth_index_code_
AuthIndex code.
Definition: FlexClient.hpp:259
uint128 burn_ev_
Processing evers for each wallet burn call.
Definition: FlexClient.hpp:263
FlexVersion ex_triplet_
Ex-version triplet (initialized during code upgrade)
Definition: FlexClient.hpp:258
optcell user_id_index_code_
UserIdIndex code.
Definition: FlexClient.hpp:260
uint128 cancel_ev_
Processing evers for each wallet cancelOrder call.
Definition: FlexClient.hpp:266
FlexVersion triplet_
Version triplet.
Definition: FlexClient.hpp:257
bool_t packet_burning_
When burnThemAll was postponed into continueBurnThemAll call.
Definition: FlexClient.hpp:262
dict_array< address > prices_
Array of PriceXchg addresses.
Definition: FlexClient.hpp:267
opt< bind_info > binding_
Binding info for exchange.
Definition: FlexClient.hpp:261
FlexClientStub persistent data struct.
Definition: FlexClientStub.hpp:47
FlexClient events interface.
Definition: FlexClient.hpp:274
FlexClient details (for getter)
Definition: FlexClient.hpp:24
FlexVersion triplet
Version triplet.
Definition: FlexClient.hpp:26
cell user_id_index_code
UserIdIndex code.
Definition: FlexClient.hpp:29
cell auth_index_code
AuthIndex code.
Definition: FlexClient.hpp:28
uint256 owner
Owner's public key.
Definition: FlexClient.hpp:25
opt< FlexVersion > ex_triplet
Ex-version triplet (initialized during code upgrade)
Definition: FlexClient.hpp:27
Flex version triplet.
Definition: FlexVersion.hpp:14
FlexClient is client contract for Flex.
Definition: FlexClient.hpp:45
void unwrapWallet(uint128 evers_value, uint256 out_pubkey, address_opt out_owner, address my_tip3_addr, uint128 tokens, opt< cell > notify)
To convert some flex tip3 tokens back to external tip3 tokens.
void burnThemAll(uint128 burn_ev, dict_array< BurnInfo > burns)
To convert many flex tip3 tokens back to external tip3 tokens (with destruction of the wallets).
void reBindWallets(uint256 user_id, bool set_binding, opt< bind_info > binding, bool set_trader, opt< uint256 > trader, dict_array< address > wallets, uint128 evers_relend_call, uint128 evers_each_wallet_call, uint128 evers_to_remove, uint128 evers_to_auth_idx)
cell getPayloadForEverReTransferArgs(uint128 wallet_deploy_evers, uint128 wallet_keep_evers)
Prepare payload for burn for WrapperEver -> WrapperEver transfer (EverReTransferArgs struct)
void burnWallet(uint128 evers_value, uint256 out_pubkey, address_opt out_owner, address my_tip3_addr, opt< cell > notify)
To convert flex tip3 tokens back to external tip3 tokens (with destruction of the wallet).
cell getPayloadForDeployInternalWallet(uint256 owner_pubkey, address_opt owner_addr, uint128 evers, uint128 keep_evers)
address deployPriceXchg(bool sell, bool immediate_client, bool post_order, uint128 price_num, uint128 amount, uint128 lend_amount, uint32 lend_finish_time, uint128 evers, cell unsalted_price_code, cell price_salt, address my_tip3_addr, uint256 user_id, uint256 order_id)
Deploy tip3-tip3 PriceXchg contract with sell or buy order.
void deployIndex(uint256 user_id, uint256 lend_pubkey, string name, uint128 evers_all, uint128 evers_to_auth_idx, uint128 refill_wallet, uint128 min_refill)
Deploy UserIdIndex contract.
void destroyIndex(uint256 user_id, uint128 evers)
Remove UserIdIndex contract.
void cancelThemAll(uint128 cancel_ev, dict_array< address > prices)
To cancel all orders for the provided wallets.
address deployEmptyFlexWallet(uint256 pubkey, uint128 evers_to_wallet, Tip3Config tip3cfg, uint256 trader, cell flex_wallet_code)
Deploy an empty flex tip3 token wallet, owned by FlexClient contract.
void transfer(address dest, uint128 value, bool bounce)
Transfer evers.
FlexClientDetails getDetails()
Get contract state details.
address getPriceXchgAddress(uint128 price_num, cell salted_price_code)
Get PriceXchg address.
resumable< void > onTip3Transfer(uint128 balance, uint128 new_tokens, uint128 evers_balance, Tip3Config tip3cfg, opt< Tip3Creds > sender, Tip3Creds receiver, cell payload, address answer_addr)
void transferTokens(address src, Tip3Creds dst, uint128 tokens, uint128 evers, uint128 keep_evers)
Transfer tokens.
void continueCancelThemAll()
Will send to itself from cancelThemAll if prices are more than 255 / 2 (we need two messages per pric...
address getUserIdIndex(uint256 user_id)
Return UserIdIndex address.
void bindWallet(uint128 evers, address my_tip3_addr, bool set_binding, opt< bind_info > binding, bool set_trader, opt< uint256 > trader)
Bind trading wallet to a specific flex and PriceXchg code hash and set trader (lend pubkey)
void cancelXchgOrder(bool sell, uint128 price_num, uint128 value, cell salted_price_code, opt< uint256 > user_id, opt< uint256 > order_id)
Cancel tip3-tip sell or buy order.
void continueBurnThemAll()
Will send to itself from burnThemAll if wallets are more than 255.
resumable< void > upgrade(uint128 request_evers, address user_data_cfg)
Upgrade FlexClient to the specific UserDataConfig.