priceresolver

package module
v0.0.0-...-a8c7a59 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

price_resolver

Tool to find resolve pricing for a batch of requests with preference to decentralized price derivation methods

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDB

func ConnectDB(path string) (*badger.DB, error)

Types

type CEX

type CEX interface {
	GetPrice(string, time.Time) (*big.Float, error)
}

type CEXDerived

type CEXDerived interface {
	GetCEXDerivedBatchPrices([][]common.Address) (map[common.Address]*big.Float, error)
	RemCEXDerivedBatchPrices([][]common.Address)
	SetCEXDerivedBatchPrices([]common.Address, []*big.Float) error
}

type CEXDirect

type CEXDirect interface {
	GetCEXDirectBatchPrices([][]common.Address) (map[common.Address]*big.Float, error)
	RemCEXDirectBatchPrices([][]common.Address)
	SetCEXDirectBatchPrices([]common.Address, []*big.Float) error
}

type ChainlinkDerived

type ChainlinkDerived interface {
	GetChainlinkDerivedBatchPrices([][]common.Address) (map[common.Address]*big.Float, error)
	RemChainlinkDerivedBatchPrices([][]common.Address)
	SetChainlinkDerivedBatchPrices([]common.Address, []*big.Float) error
}

type ChainlinkDirect

type ChainlinkDirect interface {
	GetChainlinkDirectBatchPrices([][]common.Address) (map[common.Address]*big.Float, error)
	RemChainlinkDirectBatchPrices([][]common.Address)
	SetChainlinkDirectBatchPrices([]common.Address, []*big.Float) error
}

type DBStatus

type DBStatus uint
const (
	Unintialized DBStatus = iota
	Connected
	Closed
)

type DBTokenNameResolver

type DBTokenNameResolver interface {
	GetTokenNames([]common.Address) ([]string, error)
	SetTokenNames([]common.Address, []string) error
}

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

type EthRPC

type EthRPC interface {
	GetTokenName([]common.Address) (string, error)
	GetCLLatestAnswer(common.Address) error
	GetUniswapLatestPrice(common.Address, common.Address) error
}

type UniswapDerived

type UniswapDerived interface {
	GetUniswapDerivedBatchPrices([][]common.Address) (map[common.Address]*big.Float, error)
	RemUniswapDerivedBatchPrices([][]common.Address)
	SetUniswapDerivedBatchPrices([]common.Address, []*big.Float) error
}

type UniswapDirect

type UniswapDirect interface {
	GetUniswapDirectBatchPrices([][]common.Address) (map[common.Address]*big.Float, error)
	RemUniswapDirectBatchPrices([][]common.Address)
	SetUniswapDirectBatchPrices([]common.Address, []*big.Float) error
}

Jump to

Keyboard shortcuts

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