validations

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionV180 = "v1.8.0"
	VersionV200 = "v2.0.0"
	VersionV300 = "v3.0.0"
)

Variables

This section is empty.

Functions

func ErrorDescription

func ErrorDescription(code string) string

func ValidatorAddress

func ValidatorAddress(chainID uint64, version string) (common.Address, error)

Types

type BaseValidator

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

func NewV180Validator

func NewV180Validator(client *rpc.Client) *BaseValidator

func NewV200Validator

func NewV200Validator(client *rpc.Client) *BaseValidator

func (*BaseValidator) Validate

func (v *BaseValidator) Validate(ctx context.Context, input BaseValidatorInput) ([]string, error)

type BaseValidatorInput

type BaseValidatorInput struct {
	ProxyAdminAddress   common.Address
	SystemConfigAddress common.Address
	AbsolutePrestate    common.Hash
	L2ChainID           *big.Int
}

type Output

type Output struct {
	Errors []string
}

func (*Output) AsMarkdown

func (o *Output) AsMarkdown() string

type Validator

type Validator interface {
	Validate(ctx context.Context, input BaseValidatorInput) ([]string, error)
}

Jump to

Keyboard shortcuts

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