common

package
v0.0.0-...-e865ecf Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	L2ToL1Pending           = 0
	L2ToL1ReadyForProved    = 1
	L2ToL1InChallengePeriod = 2
	L2ToL1ReadyForClaim     = 3
	L2ToL1Claimed           = 4
	L1ToL2Pending           = 1
	L1ToL2Claimed           = 2
)
View Source
const (
	Polygon = "polygon_worker"
	Scroll  = "scroll_worker"
	Zksync  = "zksync"
	Op      = "Op"
	Mantle  = "mantle"
	Linea   = "linea_worker"
)

Variables

View Source
var (
	ConfigInfo *config.Config
)

Functions

func CalculateCurrentPage

func CalculateCurrentPage(total uint, pageSize uint) uint

func CalculateOffset

func CalculateOffset(page uint, pageSize uint) uint

func CloseAction

func CloseAction(fn func(ctx context.Context, shutdown <-chan struct{}) error) error

func GetBatchId

func GetBatchId() string

func GetRandom

func GetRandom(times int) string

func ParseAddress

func ParseAddress(address string) (common.Address, error)

func PrefixEnvVar

func PrefixEnvVar(prefix, suffix string) []string

func ValidateEnvVars

func ValidateEnvVars(prefix string, flags []cli.Flag, log log.Logger)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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