Flex
Flex exchange system
|
SuperRootOwner contract interface. SuperRootOwner is an owning contract for SuperRoot. First version just proxying external pubkey access into internal command messages to the SuperRoot. More...
#include <SuperRootOwner.hpp>
Public Member Functions | |
void | constructor (uint256 pubkey) |
Constructor of SuperRootOwner. More... | |
void | setCode (uint8 type, cell code) |
Set code of specific sub-component. More... | |
address | deploySuperRoot (uint128 evers, address_opt prev_super_root) |
Deploy SuperRoot. More... | |
void | update (uint128 main_evers, uint128 cfg_deploy_evers, uint128 cfg_keep_evers, FlexVersion version, address wrappers_cfg, address flex, address user_cfg, string description) |
void | release (uint128 main_evers) |
Convert beta-version into release. More... | |
void | addWrapperType (uint128 main_evers, uint128 wrappers_cfg_keep_evers, address wrappers_cfg, uint8 type, address wrapper_deployer) |
Add wrapper type. Will fail if the update procedure started. More... | |
void | addWrapper (uint128 main_evers, uint128 wrappers_cfg_keep_evers, address wrappers_cfg, WICCloneEvers evers, string symbol, uint8 type, cell init_args) |
Add wrapper to list a new token. Will fail if the update procedure started. More... | |
void | addXchgPair (uint128 main_evers, address flex, PairCloneEvers evers, Tip3Config major_tip3cfg, Tip3Config minor_tip3cfg, uint128 min_amount, uint128 minmove, uint128 price_denum, address notify_addr) |
Add XchgPair to list a new trading pair. Will fail if the update procedure started. More... | |
void | unlistWrapper (uint128 main_evers, address wrappers_cfg, address wic) |
Unlist Wrapper. More... | |
void | unlistXchgPair (uint128 main_evers, address flex, address pair) |
Unlist XchgPair. More... | |
void | upgradeBroxusWrapperWallet (uint128 main_evers, address wrapper) |
Upgrade WrapperBroxus's wallet. More... | |
resumable< address > | deployWrappersConfig (uint128 main_evers, uint128 deploy_evers, uint128 wrappers_cfg_keep_evers, uint32 token_version) |
Deploy WrappersConfig contract. More... | |
resumable< address > | deployFlex (uint128 main_evers, uint128 deploy_evers, uint128 keep_evers, PairCloneEvers evers, address_opt old_flex, uint32 exchange_version, EversConfig ev_cfg, uint8 deals_limit) |
Deploy Flex contract. More... | |
resumable< address > | deployUserDataConfig (uint128 main_evers, uint128 deploy_evers, FlexVersion triplet, address flex) |
Deploy UserDataConfig contract. More... | |
resumable< address > | cloneWrappersConfig (uint128 main_evers, address wrappers_cfg, uint128 wrapper_cfg_keep_evers, uint128 clone_deploy_evers, WICCloneEvers wic_evers, uint32 new_token_version, dict_array< address > wrapper_deployers) |
Clone WrappersConfig to the new version. More... | |
void | setFlags (uint128 main_evers, opt< bool > stop_trade, opt< bool > abandon_ship, opt< bool > update_started) |
Set flags. If optional is not set, flag will not be changed. More... | |
void | transfer (uint128 main_evers, address to, uint128 evers) |
Transfer native evers from super root. Not allowed for the update team. More... | |
void | transferReserveTokens (uint128 main_evers, address wrapper, uint128 tokens, address to) |
Transfer flex tip3 tokens from a reserve wallet. Not allowed for the update team. More... | |
void | setOwner (uint128 main_evers, address owner) |
Set new owner contract. This owner contract will loose ownership access. More... | |
void | setUpdateTeam (uint128 main_evers, address_opt team) |
Set update team address. Update team is allowed to deploy beta versions and related contracts. More... | |
void | setNextSuperRoot (uint128 main_evers, address next_super_root) |
Set next (updated) super root. More... | |
SuperRootOwnerDetails | getDetails () |
Get contract details. | |
SuperRootOwner contract interface. SuperRootOwner is an owning contract for SuperRoot. First version just proxying external pubkey access into internal command messages to the SuperRoot.
void addWrapper | ( | uint128 | main_evers, |
uint128 | wrappers_cfg_keep_evers, | ||
address | wrappers_cfg, | ||
WICCloneEvers | evers, | ||
string | symbol, | ||
uint8 | type, | ||
cell | init_args | ||
) |
Add wrapper to list a new token. Will fail if the update procedure started.
main_evers | Main call evers |
wrappers_cfg_keep_evers | Evers to keep in WrappersConfig before returning the rest back |
wrappers_cfg | WrappersConfig address |
evers | Evers configuration |
symbol | Token symbol |
type | Wrapper type number |
init_args | Initial wrapper args for deployer |
void addWrapperType | ( | uint128 | main_evers, |
uint128 | wrappers_cfg_keep_evers, | ||
address | wrappers_cfg, | ||
uint8 | type, | ||
address | wrapper_deployer | ||
) |
Add wrapper type. Will fail if the update procedure started.
main_evers | Main call evers |
wrappers_cfg_keep_evers | Evers to keep in WrappersConfig before returning the rest back |
wrappers_cfg | WrappersConfig address |
type | New Wrapper type number, must be equal to wrapper_deployers_.size() |
wrapper_deployer | Wrapper deployer contract |
void addXchgPair | ( | uint128 | main_evers, |
address | flex, | ||
PairCloneEvers | evers, | ||
Tip3Config | major_tip3cfg, | ||
Tip3Config | minor_tip3cfg, | ||
uint128 | min_amount, | ||
uint128 | minmove, | ||
uint128 | price_denum, | ||
address | notify_addr | ||
) |
Add XchgPair to list a new trading pair. Will fail if the update procedure started.
main_evers | Main call evers |
flex | Flex address |
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) |
resumable<address> cloneWrappersConfig | ( | uint128 | main_evers, |
address | wrappers_cfg, | ||
uint128 | wrapper_cfg_keep_evers, | ||
uint128 | clone_deploy_evers, | ||
WICCloneEvers | wic_evers, | ||
uint32 | new_token_version, | ||
dict_array< address > | wrapper_deployers | ||
) |
Clone WrappersConfig to the new version.
main_evers | Main call evers |
wrappers_cfg | WrappersConfig address |
wrapper_cfg_keep_evers | Evers to keep in WrappersConfig before returning the rest back |
clone_deploy_evers | Evers to send in WrappersConfig clone deploy |
wic_evers | Evers configuration (for each WIC clone) |
new_token_version | New token update group version |
wrapper_deployers | Wrapper deployers for different types of Wrappers |
void constructor | ( | uint256 | pubkey | ) |
Constructor of SuperRootOwner.
pubkey | Owner's public key. |
resumable<address> deployFlex | ( | uint128 | main_evers, |
uint128 | deploy_evers, | ||
uint128 | keep_evers, | ||
PairCloneEvers | evers, | ||
address_opt | old_flex, | ||
uint32 | exchange_version, | ||
EversConfig | ev_cfg, | ||
uint8 | deals_limit | ||
) |
Deploy Flex contract.
main_evers | Main call evers |
deploy_evers | Evers for deploy Flex contract |
keep_evers | Evers to keep in Flex contract |
evers | Evers configuration for each pair cloning procedure |
old_flex | Old Flex to clone pairs from |
exchange_version | Exchange update group version |
ev_cfg | Processing costs configuration of Flex in native funds (evers) |
deals_limit | Limit for processed deals in one request |
address deploySuperRoot | ( | uint128 | evers, |
address_opt | prev_super_root | ||
) |
Deploy SuperRoot.
evers | Evers for processing |
prev_super_root | Previous super root (if any) |
resumable<address> deployUserDataConfig | ( | uint128 | main_evers, |
uint128 | deploy_evers, | ||
FlexVersion | triplet, | ||
address | flex | ||
) |
Deploy UserDataConfig contract.
resumable<address> deployWrappersConfig | ( | uint128 | main_evers, |
uint128 | deploy_evers, | ||
uint128 | wrappers_cfg_keep_evers, | ||
uint32 | token_version | ||
) |
Deploy WrappersConfig contract.
main_evers | Main call evers |
deploy_evers | Evers for deploy contract |
wrappers_cfg_keep_evers | Evers to keep in WrappersConfig contract |
token_version | Token update group version |
void release | ( | uint128 | main_evers | ) |
Convert beta-version into release.
main_evers | Main call evers |
void setCode | ( | uint8 | type, |
cell | code | ||
) |
Set code of specific sub-component.
type | Must be `sroot_code_type` enum |
code | Sub-component code |
void setFlags | ( | uint128 | main_evers, |
opt< bool > | stop_trade, | ||
opt< bool > | abandon_ship, | ||
opt< bool > | update_started | ||
) |
Set flags. If optional is not set, flag will not be changed.
main_evers | Main call evers |
stop_trade | Recommendation to stop trading (in case if problem found in trading algorithms) |
abandon_ship | Recommendation to cancel all orders and withdraw funds (in case if critical problem found) |
update_started | Update procedures started (Wrappers/Flex/UI cloning started) |
void setNextSuperRoot | ( | uint128 | main_evers, |
address | next_super_root | ||
) |
Set next (updated) super root.
main_evers | Main call evers |
next_super_root | Next super root |
void setOwner | ( | uint128 | main_evers, |
address | owner | ||
) |
Set new owner contract. This owner contract will loose ownership access.
main_evers | Main call evers |
owner | New owner contract |
void setUpdateTeam | ( | uint128 | main_evers, |
address_opt | team | ||
) |
Set update team address. Update team is allowed to deploy beta versions and related contracts.
main_evers | Main call evers |
team | Update team address. Empty means revoke access. |
void transfer | ( | uint128 | main_evers, |
address | to, | ||
uint128 | evers | ||
) |
Transfer native evers from super root. Not allowed for the update team.
main_evers | Main call evers |
to | Destination address |
evers | Evers to transfer |
void transferReserveTokens | ( | uint128 | main_evers, |
address | wrapper, | ||
uint128 | tokens, | ||
address | to | ||
) |
Transfer flex tip3 tokens from a reserve wallet. Not allowed for the update team.
main_evers | Main call evers |
wrapper | Wrapper address |
tokens | Tokens to transfer |
to | Destination address (must be flex tip3 wallet) |
void unlistWrapper | ( | uint128 | main_evers, |
address | wrappers_cfg, | ||
address | wic | ||
) |
Unlist Wrapper.
main_evers | Main call evers |
wrappers_cfg | WrappersConfig address |
wic | WIC (WrapperIndexContract) address |
void unlistXchgPair | ( | uint128 | main_evers, |
address | flex, | ||
address | pair | ||
) |
void update | ( | uint128 | main_evers, |
uint128 | cfg_deploy_evers, | ||
uint128 | cfg_keep_evers, | ||
FlexVersion | version, | ||
address | wrappers_cfg, | ||
address | flex, | ||
address | user_cfg, | ||
string | description | ||
) |
Update Flex to the new beta version. The current release version will remain working. Flex will send deploy message with new GlobalConfig. release
method should be called also to convert beta into current release.
main_evers | Main call evers |
cfg_deploy_evers | Evers to send in GlobalConfig deploy message |
cfg_keep_evers | Evers to keep in GlobalConfig contract |
version | New Flex version |
wrappers_cfg | WrappersConfig |
flex | New Flex root address |
user_cfg | New user contracts configuration |
description | Update description |
void upgradeBroxusWrapperWallet | ( | uint128 | main_evers, |
address | wrapper | ||
) |
Upgrade WrapperBroxus's wallet.
main_evers | Main call evers |
wrapper | WrapperBroxus address |