Processing orders queue state for PriceXchg.
More...
#include <process_queue_state.hpp>
|
| process_queue_state (price_t price, address pair, Tip3Config major_tip3cfg, Tip3Config minor_tip3cfg, EversConfig ev_cfg, uint128 min_amount, unsigned deals_limit, unsigned msgs_limit, IFlexNotifyPtr notify_addr, unsigned sell_idx, unsigned buy_idx) |
|
void | on_expired (OrderInfoXchgWithIdx ord_idx, bool sell) |
|
void | on_out_of_evers (OrderInfoXchgWithIdx ord_idx, bool sell) |
|
void | on_order_done (OrderInfoXchgWithIdx ord_idx, bool sell) |
| When order is done.
|
|
void | on_no_post_order_done (OrderInfoXchgWithIdx ord_idx, bool sell) |
| When we have order without post-order flag and other side queue is empty.
|
|
void | check_ret (bool sell, unsigned idx, OrderRet ret) |
| Check that order is the current requested order and we need to save return value.
|
|
void | on_deal (bool seller_taker, uint128 deal_amount) |
| When a deal is processed.
|
|
bool | is_order_done (OrderInfoXchg ord) const |
| Is the order done? Means the remaining amount is less than min_amount or minor_cost can't be calculated.
|
|
bool | overlimit () const |
| If we hit deals or messages limit.
|
|
void | finalize (uint128 rest_sell_amount, uint128 rest_buy_amount) |
| Finalize state - send AMM notifications about processed deals and canceled orders.
|
|
Processing orders queue state for PriceXchg.
◆ process_queue_state()
process_queue_state |
( |
price_t |
price, |
|
|
address |
pair, |
|
|
Tip3Config |
major_tip3cfg, |
|
|
Tip3Config |
minor_tip3cfg, |
|
|
EversConfig |
ev_cfg, |
|
|
uint128 |
min_amount, |
|
|
unsigned |
deals_limit, |
|
|
unsigned |
msgs_limit, |
|
|
IFlexNotifyPtr |
notify_addr, |
|
|
unsigned |
sell_idx, |
|
|
unsigned |
buy_idx |
|
) |
| |
|
inline |
- Parameters
-
price | Price (rational value) |
pair | Address of XchgPair |
major_tip3cfg | Major tip3 configuration |
minor_tip3cfg | Minor tip3 configuration |
ev_cfg | Processing costs configuration |
min_amount | Minimum amount of major tokens for a deal or an order |
deals_limit | Deals limit |
msgs_limit | Messages limit |
notify_addr | Notification address for AMM (IFlexNotify) |
sell_idx | If we are processing onTip3LendOwnership with sell, this index we can use for return value |
buy_idx | If we are processing onTip3LendOwnership with buy, this index we can use for return value |
◆ on_expired()
void on_expired |
( |
OrderInfoXchgWithIdx |
ord_idx, |
|
|
bool |
sell |
|
) |
| |
|
inline |
◆ on_out_of_evers()
void on_out_of_evers |
( |
OrderInfoXchgWithIdx |
ord_idx, |
|
|
bool |
sell |
|
) |
| |
|
inline |
When order has not enough evers to process deals, sending IPriceCallback::onOrderFinished() notification and calling ITONTokenWallet::returnOwnership() to unlock tip3 tokens in the client wallet.
The documentation for this class was generated from the following file: