Flex root contract interface. Flex is a root contract for exchange system.
More...
#include <Flex.hpp>
|
resumable< void > | onDeploy (uint128 flex_keep_evers, PairCloneEvers evers, address_opt old_flex) |
| Constructor of Flex. More...
|
|
address | addXchgPair (PairCloneEvers evers, Tip3Config major_tip3cfg, Tip3Config minor_tip3cfg, uint128 min_amount, uint128 minmove, uint128 price_denum, address notify_addr) |
| Register tip3/tip3 xchg pair (returns pre-calculated address of future xchg pair) More...
|
|
void | unlistXchgPair (address pair) |
| Unlist tip3/tip3 xchg pair. More...
|
|
PairsRange | requestPairs () |
| Request first/last pair in list.
|
|
FlexSalt | getConfig () |
| Get Flex configuration from code salt.
|
|
FlexDetails | getDetails () |
| Get contract state details.
|
|
address | getXchgTradingPair (address tip3_major_root, address tip3_minor_root) |
| Get address of tip3/tip3 exchange pair.
|
|
uint128 | calcLendTokensForOrder (bool sell, uint128 major_tokens, price_t price) |
| Calculate necessary lend tokens for order.
|
|
Flex root contract interface. Flex is a root contract for exchange system.
◆ addXchgPair()
address addXchgPair |
( |
PairCloneEvers |
evers, |
|
|
Tip3Config |
major_tip3cfg, |
|
|
Tip3Config |
minor_tip3cfg, |
|
|
uint128 |
min_amount, |
|
|
uint128 |
minmove, |
|
|
uint128 |
price_denum, |
|
|
address |
notify_addr |
|
) |
| |
Register tip3/tip3 xchg pair (returns pre-calculated address of future xchg pair)
- Parameters
-
evers | Evers configuration for cloning procedure |
major_tip3cfg | Major tip3 configuration |
minor_tip3cfg | Minor tip3 configuration |
min_amount | Minimum amount of major tokens for a deal or an order |
minmove | Minimum move for price |
price_denum | Price denominator for the pair |
notify_addr | Notification address (AMM) |
◆ onDeploy()
resumable<void> onDeploy |
( |
uint128 |
flex_keep_evers, |
|
|
PairCloneEvers |
evers, |
|
|
address_opt |
old_flex |
|
) |
| |
Constructor of Flex.
- Parameters
-
flex_keep_evers | Evers to keep in Flex |
evers | Evers configuration for each pair cloning procedure |
old_flex | Old Flex to clone pairs from |
◆ unlistXchgPair()
void unlistXchgPair |
( |
address |
pair | ) |
|
Unlist tip3/tip3 xchg pair.
- Parameters
-
The documentation for this interface was generated from the following file: