Flex
Flex exchange system
File List
Here is a list of all documented files with brief descriptions:
 AuthIndex.cppAuthIndex contract implementation
 AuthIndex.hppAuthIndex contract interfaces and data-structs
 bind_info.hpp
 dealer.hppClass for iterating sell & buy queues and processing tip3/tip3 deals for PriceXchg
 error_code.hppError codes for PriceXchg
 EversConfig.hppFlex evers configuration (processing costs)
 Flex.cppFlex root contract implementation
 Flex.hppFlex root contract interfaces and data-structs
 FlexClient.cppFlexClient contract implementation
 FlexClient.hppFlexClient contract interfaces and data-structs
 FlexClientStub.cppFlexClientStub contract implementation
 FlexClientStub.hppFlexClientStub contract interfaces and data-structs
 FlexClientTestUpdate.cppFlexClientTestUpdate contract implementation
 FlexClientTestUpdate.hppFlexClientTestUpdate contract interfaces and data-structs
 FlexSalt.hppFlex contract configuration structure (stored in code salt)
 FlexTransferPayloadArgs.hppFlex transfer payload args structure
 FlexVersion.hppFlex version structure
 GlobalConfig.cppGlobalConfig contract implementation
 GlobalConfig.hppGlobalConfig contract interfaces and data-structs
 immutable_ids.hpp
 orders_queue.hppClass for orders queue for PriceXchg
 PairCloneEvers.hppPair clone evers configuration structure
 PriceCommon.hppPrice common interfaces and data-structs
 PriceXchg.cppPriceXchg contract implementation. Contract for trading price for tip3/tip3 exchange. First tip3 in a pair is major and terms "sell", "buy", "amount" are related to the first tip3 in pair. Second tip3 is called "minor"
 PriceXchg.hppPriceXchg contract interfaces and data-structs PriceXchg - contract to enqueue and process tip3-tip3 exchange orders at a specific price
 PriceXchgSalt.hppPriceXchgSalt - configuration structure for PriceXchg (stored in code salt)
 process_queue_state.hppClass for keeping iteration state for PriceXchg
 RationalValue.hppFlex rational price (numerator / denominator)
 RootTokenContract.cppRootTokenContract contract implementation Compiles into two contract versions: RootTokenContract.tvc (for external wallets) and FlexTokenRoot.tvc (for internal wallets). With different macroses. Also, Wrapper contract may be internal wallets root and perform conversion external->internal and back
 RootTokenContract.hppRootTokenContract contract interfaces and data-structs. Compiles into two contract versions: RootTokenContract.tvc (for external wallets) and FlexTokenRoot.tvc (for internal wallets). With different macroses. Also, Wrapper contract may be internal wallets root and perform conversion external->internal and back
 SuperRoot.cppSuperRoot contract implementation
 SuperRoot.hppSuperRoot contract interfaces and data-structs
 SuperRootOwner.cppSuperRootOwner (single owner) contract implementation
 SuperRootOwner.hppSuperRootOwner (single owner) contract interfaces and data-structs
 TONTokenWallet.cppTONTokenWallet contract implementation Compiles into two contract versions: TONTokenWallet.tvc (external wallet) and FlexWallet.tvc (internal wallet). With different macroses
 TONTokenWallet.hppTONTokenWallet contract interfaces and data-structs
 UserDataConfig.cppUserDataConfig contract implementation
 UserDataConfig.hppUserDataConfig contract interfaces and data-structs
 UserIdIndex.cppUserIdIndex contract implementation
 UserIdIndex.hppUserIdIndex contract interfaces and data-structs
 WIC.cppWrapper Index Contract implementation
 WIC.hppWrapper Index Contract interfaces and data-structs
 WICCloneEvers.hppWIC clone evers configuration structure
 Wrapper.cppWrapper contract implementation
 Wrapper.hppWrapper contract interfaces and data-structs. Wrapper contract performes conversion of external tip3 wallet tokens into flex tip3 wallet tokens. Flex tip3 wallet supports only internal ownership (by some contract), and supports lend ownership to temporary grant ownership of tokens to PriceXchg contract for trading. Macroses TIP3_WALLET_CODE_HASH / TIP3_WALLET_CODE_DEPTH must be defined in compilation (code hash and code depth of FlexWallet). Use tonos-cli to get those values : tonos-cli decode stateinit –tvc FlexWallet.tvc ... "code_hash": "daf8d5fab85a9698fc9546e1beefbe0f1373f24d7980294bf26c0d5793cf1338", "data_hash": "55a703465a160dce20481375de2e5b830c841c2787303835eb5821d62d65ca9d", "code_depth": "20", "data_depth": "1", ..
 WrapperEver.cppWrapperEver contract implementation
 WrapperEver.hppWrapperEver contract interfaces and data-structs. WrapperEver contract performes conversion of Everscale native tokens (Evers) into flex tip3 wallet tokens. Flex tip3 wallet supports only internal ownership (by some contract), and supports lend ownership to temporary grant ownership of tokens to Price / PriceXchg contracts for trading. Macroses TIP3_WRAPPER_WALLET_CODE_HASH / TIP3_WRAPPER_WALLET_CODE_DEPTH must be defined in compilation (code hash and code depth of FlexWallet). Use tonos-cli to get those values : tonos-cli decode stateinit –tvc FlexWallet.tvc ... "code_hash": "daf8d5fab85a9698fc9546e1beefbe0f1373f24d7980294bf26c0d5793cf1338", "data_hash": "55a703465a160dce20481375de2e5b830c841c2787303835eb5821d62d65ca9d", "code_depth": "20", "data_depth": "1", ..
 WrappersConfig.cppWrappersConfig contract implementation
 WrappersConfig.hppWrappersConfig contract interfaces and data-structs
 xchg_iterator.hppExchange orders iterator for PriceXchg
 XchgPair.cppExchange pair contract implementation
 XchgPair.hppExchange pair (tip3/tip3) contract interfaces and data-structs. XchgPair - contract defining tip3/tip3 exchange pair. May only be deployed by Flex root contract
 XchgPairSalt.hppExchange pair (XchgPair) configuration structure (stored in code salt)