validations

package
v1.16.3 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

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
}

BaseValidator is used for 1.8.0-4.1.0 validation contracts

func NewV180Validator

func NewV180Validator(client *rpc.Client) *BaseValidator

func NewV200Validator

func NewV200Validator(client *rpc.Client) *BaseValidator

func NewV300Validator added in v1.13.4

func NewV300Validator(client *rpc.Client) *BaseValidator

func NewV400Validator added in v1.13.4

func NewV400Validator(client *rpc.Client) *BaseValidator

func NewV410Validator added in v1.16.3

func NewV410Validator(client *rpc.Client) *BaseValidator

func (*BaseValidator) Validate

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

Validate (BaseValidator) is used for 1.8.0-4.1.0 validation contracts

type BaseValidatorInput

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

BaseValidatorInput is used for all validation contracts

type OPCMStandardValidator added in v1.16.3

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

OPCMStandardValidator is used for 5.0.0+ validation contracts

func NewV500Validator added in v1.16.3

func NewV500Validator(client *rpc.Client) *OPCMStandardValidator

func (*OPCMStandardValidator) Validate added in v1.16.3

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

Validate (OPCMStandardValidator) is used for 5.0.0+ validation contracts

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)
}

Validator is used for all validation contracts

Jump to

Keyboard shortcuts

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