Flex
Flex exchange system
|
PriceXchg contract interface. More...
#include <PriceXchg.hpp>
Public Member Functions | |
OrderRet | onTip3LendOwnership (uint128 balance, uint32 lend_finish_time, Tip3Creds creds, cell payload, address answer_addr) |
Implementation of ITONTokenWalletNotify::onTip3LendOwnership(). More... | |
void | processQueue () |
Process enqueued orders. More... | |
void | cancelOrder (bool sell, opt< uint256 > user_id, opt< uint256 > order_id) |
Will cancel all sell/buy orders with this sender's client_addr. More... | |
void | cancelWalletOrder (bool sell, address owner, uint256 user_id, opt< uint256 > order_id) |
Will cancel orders, may be requested only from FlexWallet. More... | |
PriceXchgDetails | getDetails () |
Get contract details. | |
PriceXchg contract interface.
PriceXchg - contract to enqueue and process tip3-tip3 exchange orders at a specific price.
void cancelOrder | ( | bool | sell, |
opt< uint256 > | user_id, | ||
opt< uint256 > | order_id | ||
) |
Will cancel all sell/buy orders with this sender's client_addr.
sell | Cancel sell order(s) |
user_id | Is user_id is specified, only orders with this user_id will be canceled |
order_id | Is order_id is specified, only orders with this order_id will be canceled |
void cancelWalletOrder | ( | bool | sell, |
address | owner, | ||
uint256 | user_id, | ||
opt< uint256 > | order_id | ||
) |
Will cancel orders, may be requested only from FlexWallet.
sell | Cancel sell order(s) |
owner | FlexWallet's owner (FlexClient) |
user_id | FlexWallet's public key (also, it is User Id) |
order_id | Is order_id is specified, only orders with this order_id will be canceled |
OrderRet onTip3LendOwnership | ( | uint128 | balance, |
uint32 | lend_finish_time, | ||
Tip3Creds | creds, | ||
cell | payload, | ||
address | answer_addr | ||
) |
Implementation of ITONTokenWalletNotify::onTip3LendOwnership().
Tip3 wallet notifies PriceXchg contract about lent token balance.
balance | Lend token balance (amount of tokens to participate in a deal) |
lend_finish_time | Lend ownership finish time |
creds | Wallet's credentials (pubkey + owner) |
payload | Payload, must be PayloadArgs struct |
answer_addr | Answer address |
void processQueue | ( | ) |
Process enqueued orders.
This function is called from the PriceXchg itself when onTip3LendOwnership processing hits deals limit. Or when processQueue processing hits deals limit also.