Wire Sysio Wire Sysion 1.0.0
|
#include <exchange_state.hpp>
Classes | |
struct | connector |
Public Member Functions | |
uint64_t | primary_key () const |
asset | convert_to_exchange (connector &reserve, const asset &payment) |
asset | convert_from_exchange (connector &reserve, const asset &tokens) |
asset | convert (const asset &from, const symbol &to) |
asset | direct_convert (const asset &from, const symbol &to) |
Static Public Member Functions | |
static int64_t | get_bancor_output (int64_t inp_reserve, int64_t out_reserve, int64_t inp) |
static int64_t | get_bancor_input (int64_t out_reserve, int64_t inp_reserve, int64_t out) |
Public Attributes | |
asset | supply |
connector | base |
connector | quote |
Uses Bancor math to create a 50/50 relay between two asset types.
The state of the bancor exchange is entirely contained within this struct. There are no external side effects associated with using this API.
Definition at line 17 of file exchange_state.hpp.
Definition at line 39 of file exchange_state.cpp.
asset sysiosystem::exchange_state::convert_from_exchange | ( | connector & | reserve, |
const asset & | tokens ) |
Definition at line 25 of file exchange_state.cpp.
asset sysiosystem::exchange_state::convert_to_exchange | ( | connector & | reserve, |
const asset & | payment ) |
Definition at line 11 of file exchange_state.cpp.
Definition at line 59 of file exchange_state.cpp.
|
static |
Definition at line 96 of file exchange_state.cpp.
|
static |
Definition at line 81 of file exchange_state.cpp.
|
inline |
Definition at line 30 of file exchange_state.hpp.
connector sysiosystem::exchange_state::base |
Definition at line 27 of file exchange_state.hpp.
connector sysiosystem::exchange_state::quote |
Definition at line 28 of file exchange_state.hpp.
asset sysiosystem::exchange_state::supply |
Definition at line 18 of file exchange_state.hpp.