types

package
v0.0.0-...-26d7e6f Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger    Logger
	BlockTime time.Duration

	// Primary RPC URL, must begin with ws:// or wss://
	RPCURL           *url.URL
	SecondaryRPCURLs []*url.URL
	ChainID          *big.Int

	HeadTrackerHistoryDepth  int64
	HeadTrackerMaxBufferSize int
	FinalityDepth            int64

	DBPollInterval time.Duration

	KeysDir         string
	DefaultGasPrice *big.Int
	MaxGasPrice     *big.Int
	GasBumpPercent  uint64
	GasBumpWei      *big.Int

	// Number of elapsed blocks to trigger gas bumping
	GasBumpThreshold int64
	GasBumpTxDepth   int
}

type Logger

type Logger interface {
	Panic(args ...interface{})
	Error(args ...interface{})
	Warn(args ...interface{})
	Info(args ...interface{})
	Debug(args ...interface{})
	Trace(args ...interface{})

	Panicw(msg string, keysAndValues ...interface{})
	Errorw(msg string, keysAndValues ...interface{})
	Warnw(msg string, keysAndValues ...interface{})
	Infow(msg string, keysAndValues ...interface{})
	Debugw(msg string, keysAndValues ...interface{})
	Tracew(msg string, keysAndValues ...interface{})

	Panicf(format string, v ...interface{})
	Errorf(format string, v ...interface{})
	Warnf(format string, v ...interface{})
	Infof(format string, v ...interface{})
	Debugf(format string, v ...interface{})
	Tracef(format string, v ...interface{})
}

Logger is implemented by any logging system that is used for standard logs.

Jump to

Keyboard shortcuts

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