Documentation ¶
Index ¶
- func MarshalPool(pool domain.PoolI) (json.RawMessage, error)
- func ReadPools(poolsFile string) ([]domain.PoolI, map[uint64]domain.TickModel, error)
- func ReadTakerFees(takerFeeFileName string) (domain.TakerFeeMap, error)
- func StorePools(actualPools []domain.PoolI, tickModelMap map[uint64]domain.TickModel, ...) error
- func StoreTakerFees(takerFeesFile string, takerFeesMap domain.TakerFeeMap) error
- func UnmarshalPool(serializedPool SerializedPool) (domain.PoolI, error)
- type SerializedPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalPool ¶
func MarshalPool(pool domain.PoolI) (json.RawMessage, error)
MarshalPool marshals a pool to JSON.
func ReadTakerFees ¶
func ReadTakerFees(takerFeeFileName string) (domain.TakerFeeMap, error)
ReadTakerFees reads the taker fees from a file and returns them
func StorePools ¶
func StorePools(actualPools []domain.PoolI, tickModelMap map[uint64]domain.TickModel, poolsFile string) error
StorePools stores the pools to a file.
func StoreTakerFees ¶
func StoreTakerFees(takerFeesFile string, takerFeesMap domain.TakerFeeMap) error
StoreTakerFees stores the taker fees to a file.
func UnmarshalPool ¶
func UnmarshalPool(serializedPool SerializedPool) (domain.PoolI, error)
UnmarshalPool unmarshals a pool from JSON.
Types ¶
type SerializedPool ¶
type SerializedPool struct { Type poolmanagertypes.PoolType `json:"type"` ChainPool json.RawMessage `json:"data"` SQSModel domain.SQSPool `json:"sqs_model"` TickModel *domain.TickModel `json:"tick_model,omitempty"` }
SerializedPool is a struct that is used to serialize a pool to JSON.
Click to show internal directories.
Click to hide internal directories.