system

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoTransactions = fmt.Errorf("no transactions")
)

Functions

func DeriveAddresses

func DeriveAddresses(receipt *types.Receipt) (common.SystemContractAddresses, error)

func GenerateDeploymentTransaction

func GenerateDeploymentTransaction(initCode []byte, logger gethlog.Logger) (*common.L2Tx, error)

func SystemDeployerInitTransaction

func SystemDeployerInitTransaction(logger gethlog.Logger, eoaOwner gethcommon.Address) (*common.L2Tx, error)

func VerifyLogs

func VerifyLogs(receipt *types.Receipt) error

Types

type SystemContractCallbacks

type SystemContractCallbacks interface {
	// Getters
	PublicCallbackHandler() *gethcommon.Address
	TransactionPostProcessor() *gethcommon.Address
	SystemContractsUpgrader() *gethcommon.Address
	PublicSystemContracts() map[string]*gethcommon.Address
	// Initialization
	Initialize(batch *core.Batch, receipts types.Receipt, msgBusManager SystemContractsInitializable) error
	Load(msgBusManager SystemContractsInitializable) error

	// Usage
	CreateOnBatchEndTransaction(ctx context.Context, stateDB *state.StateDB, results core.TxExecResults) (*types.Transaction, error)
	CreatePublicCallbackHandlerTransaction(ctx context.Context, stateDB *state.StateDB) (*types.Transaction, error)

	// VerifyOnBlockReceipt - used for debugging
	VerifyOnBlockReceipt(transactions common.L2Transactions, receipt *types.Receipt) (bool, error)
}

func NewSystemContractCallbacks

func NewSystemContractCallbacks(storage storage.Storage, upgrader *gethcommon.Address, logger gethlog.Logger) SystemContractCallbacks

type SystemContractsInitializable

type SystemContractsInitializable interface {
	Initialize(common.SystemContractAddresses) error
}

Jump to

Keyboard shortcuts

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