Documentation ¶
Index ¶
- Constants
- Variables
- func Ethers(value int64) *big.Int
- func GetAddressFromPublicKey(pk []byte) common.Address
- func GetMarketsChannelID(channel string) string
- func GetModTime(ts, interval int64, unit string) (int64, int64)
- func GetOHLCVChannelID(bt, qt common.Address, unit string, duration int64) string
- func GetOrderBookChannelID(bt, qt common.Address) string
- func GetPairKey(bt, qt common.Address) string
- func GetPriceBoardChannelID(bt, qt common.Address) string
- func GetTickChannelID(bt, qt common.Address, unit string, duration int64) string
- func GetTradeChannelID(bt, qt common.Address) string
- func IsNativeTokenByAddress(address common.Address) bool
- func JSON(x interface{}) string
- func NewColoredLogger() *logging.Logger
- func NewErrorLogger() *logging.Logger
- func NewFileLogger(module string, logFile string) *logging.Logger
- func NewLogger(module string, logFile string) *logging.Logger
- func NewNoopLogger() *logging.Logger
- func NewStandardOutputLogger() *logging.Logger
- func PrintError(msg string, err error)
- func PrintJSON(x interface{})
- func Retry(retries int, fn func() error) error
- func ToDecimal(value *big.Int) float64
- func UintToPaddedString(num int64) string
- func Union(a, b []common.Address) []common.Address
- func UnitToSecond(interval int64, unit string) int64
- func Use(...interface{})
Constants ¶
const (
LogPrefix = ""
)
TODO: add log prefix to params
Variables ¶
var Logger = NewLogger("main", "./logs/main.log")
var StdoutLogger = NewStandardOutputLogger()
var TerminalLogger = NewColoredLogger()
Functions ¶
func GetAddressFromPublicKey ¶
GetAddressFromPublicKey get derived address from public key
func GetMarketsChannelID ¶
func GetModTime ¶ added in v1.2.0
GetModTime get round time by step
func GetOHLCVChannelID ¶
func GetOrderBookChannelID ¶
func GetPairKey ¶
GetPairKey return the pair key identifier corresponding to two
func GetPriceBoardChannelID ¶
func GetTickChannelID ¶
GetTickChannelID is used to get the channel id for OHLCV data streaming it takes pairname, duration and units of data streaming
func GetTradeChannelID ¶
func IsNativeTokenByAddress ¶
func NewColoredLogger ¶
func NewColoredLogger() *logging.Logger
func NewErrorLogger ¶
func NewErrorLogger() *logging.Logger
func NewFileLogger ¶
NewFileLogger creates a logging utility that outputs to the file passed as argument but but does not output to stdout.
func NewLogger ¶
NewLogger creates a logging utility that outputs to the file passed as argument and also output to stdout.
func NewNoopLogger ¶
func NewNoopLogger() *logging.Logger
func NewStandardOutputLogger ¶
func NewStandardOutputLogger() *logging.Logger
NewFileLogger creates a logging utility that only output to stdout.
func PrintError ¶
func UintToPaddedString ¶
UintToPaddedString converts an int to string of length 19 by padding with 0
func UnitToSecond ¶ added in v1.2.0
UnitToSecond time uint to second
Types ¶
This section is empty.