rollup

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var L2GERManager = common.HexToAddress("0xa40d5f56745a118d0906a34e69aec8c0db1cb8fa")

https://github.com/0xPolygonHermez/zkevm-commonjs/blob/bb0e77e9158a0fc3d06eb5de53b458bb87f77bc7/src/constants.js#L58

Functions

This section is empty.

Types

type RollupMetadata

type RollupMetadata struct {
	Address                 common.Address
	GenesisRoot             common.Hash
	CreationBlock           uint64
	CreationBlockHash       common.Hash
	CreationParentBlockHash common.Hash
	CreationTimestamp       uint64
	ChainID                 uint64
	Name                    string
	RollupID                uint32
	GasToken                common.Address
	VerifierType            rollupmanager.VerifierType
}

func LoadMetadataFromFile

func LoadMetadataFromFile(filePath string) (*RollupMetadata, error)

LoadMetadataFromFile reads the rollup metadata from the json file

func LoadMetadataFromL1ByChainID

func LoadMetadataFromL1ByChainID(client *ethclient.Client, rm *rollupmanager.RollupManager, chainID uint64) (*RollupMetadata, error)

LoadMetadataFromL1ByChainID reads the on-chain rollup metadata by the given chain id

func NewRollupMetadata

func NewRollupMetadata(rollupName string, chainID uint64, rollupAddr common.Address, rollupInfo rollupmanager.CreateRollupInfo) *RollupMetadata

type RollupPessimisticProofs

type RollupPessimisticProofs struct {
	*RollupMetadata

	Contract *polygonpessimisticconsensus.Polygonpessimisticconsensus `json:"-"`
}

func (*RollupPessimisticProofs) GetBatchL2Data

func (r *RollupPessimisticProofs) GetBatchL2Data(client bind.ContractBackend) (string, error)

GetBatchL2Data constructs bridge initialization transaction. The logic is implemented according to the following snippet: https://github.com/0xPolygonHermez/zkevm-contracts/blob/v9.0.0-rc.3-pp/deployment/v2/4_createRollup.ts#L404-L456

func (*RollupPessimisticProofs) GetRollupGlobalExitRoot

func (r *RollupPessimisticProofs) GetRollupGlobalExitRoot(rm *rollupmanager.RollupManager, client bind.ContractBackend) (common.Hash, error)

GetRollupGlobalExitRoot retrieves the actual global exit root at the rollup creation time

func (*RollupPessimisticProofs) InitContract

func (r *RollupPessimisticProofs) InitContract(ctx context.Context, client bind.ContractBackend) error

type RollupValidium

type RollupValidium struct {
	*RollupMetadata

	Contract *polygonvalidiumetrog.Polygonvalidiumetrog `json:"-"`
}

func (*RollupValidium) InitContract

func (r *RollupValidium) InitContract(ctx context.Context, client bind.ContractBackend) error

InitContract initializes the rollup contract if not already initialized

Jump to

Keyboard shortcuts

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