Flex
Flex exchange system
Public Member Functions | List of all members
IPriceXchg Interface Reference

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.
 

Detailed Description

PriceXchg contract interface.

PriceXchg - contract to enqueue and process tip3-tip3 exchange orders at a specific price.

Member Function Documentation

◆ cancelOrder()

void cancelOrder ( bool  sell,
opt< uint256 >  user_id,
opt< uint256 >  order_id 
)

Will cancel all sell/buy orders with this sender's client_addr.

Parameters
sellCancel sell order(s)
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

◆ cancelWalletOrder()

void cancelWalletOrder ( bool  sell,
address  owner,
uint256  user_id,
opt< uint256 >  order_id 
)

Will cancel orders, may be requested only from FlexWallet.

Parameters
sellCancel sell order(s)
ownerFlexWallet's owner (FlexClient)
user_idFlexWallet's public key (also, it is User Id)
order_idIs order_id is specified, only orders with this order_id will be canceled

◆ onTip3LendOwnership()

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.

Parameters
balanceLend token balance (amount of tokens to participate in a deal)
lend_finish_timeLend ownership finish time
credsWallet's credentials (pubkey + owner)
payloadPayload, must be PayloadArgs struct
answer_addrAnswer address

◆ processQueue()

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.


The documentation for this interface was generated from the following file: