parsing

package
v21.0.0-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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 ReadPools

func ReadPools(poolsFile string) ([]domain.PoolI, map[uint64]domain.TickModel, error)

ReadPools reads the pools from a file and returns them

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL