Documentation ¶
Index ¶
- Constants
- func FindGoodTradePath(maxPathLen uint, pools []*shared.Pdexv3PoolPairWithId, ...) ([]*shared.Pdexv3PoolPairWithId, uint64)
- func FindSellAmount(maxPathLen uint, pools []*shared.Pdexv3PoolPairWithId, ...) ([]*shared.Pdexv3PoolPairWithId, uint64)
- func GetPdexv3PoolDataFromRawRPCResult(message json.RawMessage) ([]*shared.Pdexv3PoolPairWithId, map[string]*pdex.PoolPairState, error)
- type Node
- type PriceCalculator
- type SimplePoolNodeData
Constants ¶
View Source
const (
BaseAmplifier = 10000
)
View Source
const (
MaxPaths = 20
)
Variables ¶
This section is empty.
Functions ¶
func FindGoodTradePath ¶
func FindGoodTradePath( maxPathLen uint, pools []*shared.Pdexv3PoolPairWithId, poolPairStates map[string]*pdex.PoolPairState, tokenIDStrSource string, tokenIDStrDest string, originalSellAmount uint64, ) ([]*shared.Pdexv3PoolPairWithId, uint64)
func FindSellAmount ¶
func FindSellAmount( maxPathLen uint, pools []*shared.Pdexv3PoolPairWithId, poolPairStates map[string]*pdex.PoolPairState, tokenIDStrSource string, tokenIDStrDest string, expectedBuyAmount uint64, ) ([]*shared.Pdexv3PoolPairWithId, uint64)
func GetPdexv3PoolDataFromRawRPCResult ¶
func GetPdexv3PoolDataFromRawRPCResult(message json.RawMessage) ([]*shared.Pdexv3PoolPairWithId, map[string]*pdex.PoolPairState, error)
Types ¶
type PriceCalculator ¶
Click to show internal directories.
Click to hide internal directories.