Flex
Flex exchange system
Public Member Functions | List of all members
IFlexClient Struct Reference

FlexClient is client contract for Flex. More...

#include <FlexClient.hpp>

Public Member Functions

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. More...
 
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. More...
 
void transfer (address dest, uint128 value, bool bounce)
 Transfer evers. More...
 
void transferTokens (address src, Tip3Creds dst, uint128 tokens, uint128 evers, uint128 keep_evers)
 Transfer tokens. More...
 
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. More...
 
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. More...
 
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)
 
void destroyIndex (uint256 user_id, uint128 evers)
 Remove UserIdIndex contract. More...
 
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). More...
 
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). More...
 
void continueBurnThemAll ()
 Will send to itself from burnThemAll if wallets are more than 255.
 
void cancelThemAll (uint128 cancel_ev, dict_array< address > prices)
 To cancel all orders for the provided wallets. More...
 
void continueCancelThemAll ()
 Will send to itself from cancelThemAll if prices are more than 255 / 2 (we need two messages per price)
 
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. More...
 
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) More...
 
resumable< void > onTip3Transfer (uint128 balance, uint128 new_tokens, uint128 evers_balance, Tip3Config tip3cfg, opt< Tip3Creds > sender, Tip3Creds receiver, cell payload, address answer_addr)
 
resumable< void > upgrade (uint128 request_evers, address user_data_cfg)
 Upgrade FlexClient to the specific UserDataConfig. More...
 
cell getPayloadForDeployInternalWallet (uint256 owner_pubkey, address_opt owner_addr, uint128 evers, uint128 keep_evers)
 
cell getPayloadForEverReTransferArgs (uint128 wallet_deploy_evers, uint128 wallet_keep_evers)
 Prepare payload for burn for WrapperEver -> WrapperEver transfer (EverReTransferArgs struct) More...
 
address getPriceXchgAddress (uint128 price_num, cell salted_price_code)
 Get PriceXchg address. More...
 
address getUserIdIndex (uint256 user_id)
 Return UserIdIndex address. More...
 
FlexClientDetails getDetails ()
 Get contract state details.
 
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. More...
 
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. More...
 
void transfer (address dest, uint128 value, bool bounce)
 Transfer evers. More...
 
void transferTokens (address src, Tip3Creds dst, uint128 tokens, uint128 evers, uint128 keep_evers)
 Transfer tokens. More...
 
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. More...
 
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. More...
 
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)
 
void destroyIndex (uint256 user_id, uint128 evers)
 Remove UserIdIndex contract. More...
 
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). More...
 
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). More...
 
void continueBurnThemAll ()
 Will send to itself from burnThemAll if wallets are more than 255.
 
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. More...
 
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) More...
 
resumable< void > onTip3Transfer (uint128 balance, uint128 new_tokens, uint128 evers_balance, Tip3Config tip3cfg, opt< Tip3Creds > sender, Tip3Creds receiver, cell payload, address answer_addr)
 
resumable< void > upgrade (uint128 request_evers, address user_data_cfg)
 Upgrade FlexClient to the specific UserDataConfig. More...
 
cell getPayloadForDeployInternalWallet (uint256 owner_pubkey, address_opt owner_addr, uint128 evers, uint128 keep_evers)
 
cell getPayloadForEverReTransferArgs (uint128 wallet_deploy_evers, uint128 wallet_keep_evers)
 Prepare payload for burn for WrapperEver -> WrapperEver transfer (EverReTransferArgs struct) More...
 
address getPriceXchgAddress (uint128 price_num, cell salted_price_code)
 Get PriceXchg address. More...
 
address getUserIdIndex (uint256 user_id)
 Return UserIdIndex address. More...
 
FlexClientDetails getDetails ()
 Get contract state details.
 
uint32 getTestValue ()
 Get Test value.
 

Detailed Description

FlexClient is client contract for Flex.

FlexClient keeps ownership of flex token wallets. Keeps/spends evers balance for processing. Makes orders.

Member Function Documentation

◆ bindWallet() [1/2]

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)

Parameters
eversProcessing evers
my_tip3_addrAddress of flex tip3 token wallet
set_bindingSet binding
bindingif `set_binding` is true, binding will be set
set_traderSet trader
traderif `set_trader` is true, trader (lend pubkey) will be set

◆ bindWallet() [2/2]

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)

Parameters
eversProcessing evers
my_tip3_addrAddress of flex tip3 token wallet
set_bindingSet binding
bindingif `set_binding` is true, binding will be set
set_traderSet trader
traderif `set_trader` is true, trader (lend pubkey) will be set

◆ burnThemAll() [1/2]

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

Parameters
burn_evProcessing evers for each wallet `burn` call
burnsArray of burn parameters for each wallet

◆ burnThemAll() [2/2]

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

Parameters
burn_evProcessing evers for each wallet `burn` call
burnsArray of burn parameters for each wallet

◆ burnWallet() [1/2]

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

Parameters
evers_valueProcessing evers
out_pubkeyPublic key for external wallet (out)
out_ownerInternal (contract) owner for external wallet (out)
my_tip3_addrAddress of flex tip3 token wallet to burn (convert to external tokens)
notifyNotification payload to the destination wallet's owner (or EverReTransferArgs for (old WrapperEver)->(new WrapperEver) transfer)

◆ burnWallet() [2/2]

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

Parameters
evers_valueProcessing evers
out_pubkeyPublic key for external wallet (out)
out_ownerInternal (contract) owner for external wallet (out)
my_tip3_addrAddress of flex tip3 token wallet to burn (convert to external tokens)
notifyNotification payload to the destination wallet's owner (or EverReTransferArgs for (old WrapperEver)->(new WrapperEver) transfer)

◆ cancelThemAll()

void cancelThemAll ( uint128  cancel_ev,
dict_array< address >  prices 
)

To cancel all orders for the provided wallets.

Parameters
cancel_evProcessing evers for each price `cancelOrder` call. Two such calls for each price (cancel sells and cancel buys).
pricesArray of PriceXchg addresses

◆ cancelXchgOrder() [1/2]

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.

Parameters
sellIs it a sell order
price_numPrice numerator for rational price value
valueProcessing evers
salted_price_codeCode of PriceXchg contract (salted)
user_idIs user_id is specified, only orders with this user_id will be canceled
order_idIs order_id is specified, only orders with this order_id will be canceled

◆ cancelXchgOrder() [2/2]

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.

Parameters
sellIs it a sell order
price_numPrice numerator for rational price value
valueProcessing evers
salted_price_codeCode of PriceXchg contract (salted)
user_idIs user_id is specified, only orders with this user_id will be canceled
order_idIs order_id is specified, only orders with this order_id will be canceled

◆ deployEmptyFlexWallet() [1/2]

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.

Parameters
pubkeyPublic key (for identification only)
evers_to_walletEvers to the wallet
tip3cfgTip3 token configuration
traderTrader (lend pubkey) info for `bind` call
flex_wallet_codeFlex wallet code

◆ deployEmptyFlexWallet() [2/2]

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.

Parameters
pubkeyPublic key (for identification only)
evers_to_walletEvers to the wallet
tip3cfgTip3 token configuration
traderTrader (lend pubkey) info for `bind` call
flex_wallet_codeFlex wallet code

◆ deployIndex() [1/2]

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.

Parameters
user_idUser id
lend_pubkeyLend public key
nameUser name (encoded)
evers_allEvers for all processing: UserIdIndex deploy and included AuthIndex deploy
evers_to_auth_idxEvers to AuthIndex deploy
refill_walletRe-fill wallet on transfer received
min_refillMinimum refill value

◆ deployIndex() [2/2]

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.

Parameters
user_idUser id
lend_pubkeyLend public key
nameUser name (encoded)
evers_allEvers for all processing: UserIdIndex deploy and included AuthIndex deploy
evers_to_auth_idxEvers to AuthIndex deploy
refill_walletRe-fill wallet on transfer received
min_refillMinimum refill value

◆ deployPriceXchg() [1/2]

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.

Parameters
sellIs it a sell order
immediate_clientShould this order try to be executed as a client order first (find existing corresponding orders).
post_orderShould this order be enqueued if it doesn't already have corresponding orders.
price_numPrice numerator for rational price value
amountAmount of major tip3 tokens to sell or buy
lend_amountLend amount. For sell, it should be amount of major tokens, for buy - minor.
lend_finish_timeLend finish time (order finish time also will be lend_finish_time - safe_period)
eversProcessing evers
unsalted_price_codeUnsalted PriceXchg code
price_saltPriceXchg code salt (configuration)
my_tip3_addrAddress of flex tip3 token wallet to provide tokens
user_idUser id
order_idOrder id

◆ deployPriceXchg() [2/2]

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.

Parameters
sellIs it a sell order
immediate_clientShould this order try to be executed as a client order first (find existing corresponding orders).
post_orderShould this order be enqueued if it doesn't already have corresponding orders.
price_numPrice numerator for rational price value
amountAmount of major tip3 tokens to sell or buy
lend_amountLend amount. For sell, it should be amount of major tokens, for buy - minor.
lend_finish_timeLend finish time (order finish time also will be lend_finish_time - safe_period)
eversProcessing evers
unsalted_price_codeUnsalted PriceXchg code
price_saltPriceXchg code salt (configuration)
my_tip3_addrAddress of flex tip3 token wallet to provide tokens
user_idUser id
order_idOrder id

◆ destroyIndex() [1/2]

void destroyIndex ( uint256  user_id,
uint128  evers 
)

Remove UserIdIndex contract.

Parameters
user_idUser id
eversEvers to send to `UserIdIndex->remove`, inside - to `AuthIndex->remove`. The remaining will return.

◆ destroyIndex() [2/2]

void destroyIndex ( uint256  user_id,
uint128  evers 
)

Remove UserIdIndex contract.

Parameters
user_idUser id
eversEvers to send to `UserIdIndex->remove`, inside - to `AuthIndex->remove`. The remaining will return.

◆ getPayloadForDeployInternalWallet() [1/2]

cell getPayloadForDeployInternalWallet ( uint256  owner_pubkey,
address_opt  owner_addr,
uint128  evers,
uint128  keep_evers 
)

Prepare payload for transferWithNotify call from external wallet to wrapper's wallet to deploy flex internal wallet

Parameters
owner_pubkeyOwner's public key
owner_addrOwner's internal address (contract)
eversProcessing evers
keep_eversEvers to keep in the wallet

◆ getPayloadForDeployInternalWallet() [2/2]

cell getPayloadForDeployInternalWallet ( uint256  owner_pubkey,
address_opt  owner_addr,
uint128  evers,
uint128  keep_evers 
)

Prepare payload for transferWithNotify call from external wallet to wrapper's wallet to deploy flex internal wallet

Parameters
owner_pubkeyOwner's public key
owner_addrOwner's internal address (contract)
eversProcessing evers
keep_eversEvers to keep in the wallet

◆ getPayloadForEverReTransferArgs() [1/2]

cell getPayloadForEverReTransferArgs ( uint128  wallet_deploy_evers,
uint128  wallet_keep_evers 
)

Prepare payload for burn for WrapperEver -> WrapperEver transfer (EverReTransferArgs struct)

Parameters
wallet_deploy_eversEvers to be sent to the deployable wallet.
wallet_keep_eversEvers to be kept in the deployable wallet.

◆ getPayloadForEverReTransferArgs() [2/2]

cell getPayloadForEverReTransferArgs ( uint128  wallet_deploy_evers,
uint128  wallet_keep_evers 
)

Prepare payload for burn for WrapperEver -> WrapperEver transfer (EverReTransferArgs struct)

Parameters
wallet_deploy_eversEvers to be sent to the deployable wallet.
wallet_keep_eversEvers to be kept in the deployable wallet.

◆ getPriceXchgAddress() [1/2]

address getPriceXchgAddress ( uint128  price_num,
cell  salted_price_code 
)

Get PriceXchg address.

Parameters
price_numPrice numerator for rational price value
salted_price_codeCode of PriceXchg contract (salted!).

◆ getPriceXchgAddress() [2/2]

address getPriceXchgAddress ( uint128  price_num,
cell  salted_price_code 
)

Get PriceXchg address.

Parameters
price_numPrice numerator for rational price value
salted_price_codeCode of PriceXchg contract (salted!).

◆ getUserIdIndex() [1/2]

address getUserIdIndex ( uint256  user_id)

Return UserIdIndex address.

Parameters
user_idUser id

◆ getUserIdIndex() [2/2]

address getUserIdIndex ( uint256  user_id)

Return UserIdIndex address.

Parameters
user_idUser id

◆ onTip3Transfer() [1/2]

resumable<void> onTip3Transfer ( uint128  balance,
uint128  new_tokens,
uint128  evers_balance,
Tip3Config  tip3cfg,
opt< Tip3Creds >  sender,
Tip3Creds  receiver,
cell  payload,
address  answer_addr 
)

Implementation of ITONTokenWalletNotify::onTip3Transfer. Notification from tip3 wallet to its owner contract about received tokens transfer.

Parameters
balanceNew balance of the wallet.
new_tokensAmount of tokens received in transfer.
evers_balanceEvers balance of the wallet.
tip3cfgTip3 config.
senderSender wallet's credentials (pubkey + owner). Empty if mint received from root/wrapper.
receiverReceiver wallet's credentials (pubkey + owner).
payloadPayload (must be FlexTransferPayloadArgs).
answer_addrAnswer address (to receive answer and the remaining processing evers).

◆ onTip3Transfer() [2/2]

resumable<void> onTip3Transfer ( uint128  balance,
uint128  new_tokens,
uint128  evers_balance,
Tip3Config  tip3cfg,
opt< Tip3Creds >  sender,
Tip3Creds  receiver,
cell  payload,
address  answer_addr 
)

Implementation of ITONTokenWalletNotify::onTip3Transfer. Notification from tip3 wallet to its owner contract about received tokens transfer.

Parameters
balanceNew balance of the wallet.
new_tokensAmount of tokens received in transfer.
evers_balanceEvers balance of the wallet.
tip3cfgTip3 config.
senderSender wallet's credentials (pubkey + owner). Empty if mint received from root/wrapper.
receiverReceiver wallet's credentials (pubkey + owner).
payloadPayload (must be FlexTransferPayloadArgs).
answer_addrAnswer address (to receive answer and the remaining processing evers).

◆ reBindWallets() [1/2]

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 
)

Change lend_pubkey into UserIdIndex contract(call UserIdIndex.reLendPubkey) if set_trader & trader. Call bind(set_binding, binding, set_trader, trader) for every wallet from wallets.

Parameters
user_idUser id
set_bindingSet binding
bindingIf `set_binding` is true, binding will be set into wallets
set_traderSet trader
traderIf `set_trader` is true, trader (lend pubkey) will be set into wallets and UserIdIndex
walletsArray of wallet addresses
evers_relend_callEvers for `UserIdIndex->reLendPubkey` call
evers_each_wallet_callEvers for each `FlexWallet->lendOwnershipPubkey` call
evers_to_removeEvers to send in `AuthIndex->remove` call inside `UserIdIndex->reLendPubkey`
evers_to_auth_idxEvers to send in new AuthIndex deploy call inside `UserIdIndex->reLendPubkey`

◆ reBindWallets() [2/2]

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 
)

Change lend_pubkey into UserIdIndex contract(call UserIdIndex.reLendPubkey) if set_trader & trader. Call bind(set_binding, binding, set_trader, trader) for every wallet from wallets.

Parameters
user_idUser id
set_bindingSet binding
bindingIf `set_binding` is true, binding will be set into wallets
set_traderSet trader
traderIf `set_trader` is true, trader (lend pubkey) will be set into wallets and UserIdIndex
walletsArray of wallet addresses
evers_relend_callEvers for `UserIdIndex->reLendPubkey` call
evers_each_wallet_callEvers for each `FlexWallet->lendOwnershipPubkey` call
evers_to_removeEvers to send in `AuthIndex->remove` call inside `UserIdIndex->reLendPubkey`
evers_to_auth_idxEvers to send in new AuthIndex deploy call inside `UserIdIndex->reLendPubkey`

◆ transfer() [1/2]

void transfer ( address  dest,
uint128  value,
bool  bounce 
)

Transfer evers.

Parameters
destDestination address
valueAmount of evers
bounceBounce flag

◆ transfer() [2/2]

void transfer ( address  dest,
uint128  value,
bool  bounce 
)

Transfer evers.

Parameters
destDestination address
valueAmount of evers
bounceBounce flag

◆ transferTokens() [1/2]

void transferTokens ( address  src,
Tip3Creds  dst,
uint128  tokens,
uint128  evers,
uint128  keep_evers 
)

Transfer tokens.

Parameters
srcSource address
dstDestination credentials (pubkey + owner)
tokensAmount of tokens
eversAmount of processing evers
keep_eversEvers to keep in destination wallet

◆ transferTokens() [2/2]

void transferTokens ( address  src,
Tip3Creds  dst,
uint128  tokens,
uint128  evers,
uint128  keep_evers 
)

Transfer tokens.

Parameters
srcSource address
dstDestination credentials (pubkey + owner)
tokensAmount of tokens
eversAmount of processing evers
keep_eversEvers to keep in destination wallet

◆ unwrapWallet() [1/2]

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.

Parameters
evers_valueProcessing evers
out_pubkeyPublic key for external wallet (out)
out_ownerInternal (contract) owner for external wallet (out)
my_tip3_addrAddress of flex tip3 token wallet to burn (convert to external tokens)
tokensTokens amount to unwrap (withdraw)
notifyNotification payload to the destination wallet's owner (or EverReTransferArgs for (old WrapperEver)->(new WrapperEver) transfer)

◆ unwrapWallet() [2/2]

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.

Parameters
evers_valueProcessing evers
out_pubkeyPublic key for external wallet (out)
out_ownerInternal (contract) owner for external wallet (out)
my_tip3_addrAddress of flex tip3 token wallet to burn (convert to external tokens)
tokensTokens amount to unwrap (withdraw)
notifyNotification payload to the destination wallet's owner (or EverReTransferArgs for (old WrapperEver)->(new WrapperEver) transfer)

◆ upgrade() [1/2]

resumable<void> upgrade ( uint128  request_evers,
address  user_data_cfg 
)

Upgrade FlexClient to the specific UserDataConfig.

Parameters
request_eversEvers to send in UserDataConfig::requestDetails()
user_data_cfgUserDataConfig address

◆ upgrade() [2/2]

resumable<void> upgrade ( uint128  request_evers,
address  user_data_cfg 
)

Upgrade FlexClient to the specific UserDataConfig.

Parameters
request_eversEvers to send in UserDataConfig::requestDetails()
user_data_cfgUserDataConfig address

The documentation for this struct was generated from the following files: