rollupmanager

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRollupInfo

type CreateRollupInfo struct {
	Root            common.Hash
	Block           uint64
	BlockHash       common.Hash
	ParentBlockHash common.Hash
	Timestamp       uint64
	ChainID         uint64
	RollupID        uint32
	GasToken        common.Address
	VerifierType    VerifierType
}

type RollupManager

type RollupManager struct {
	Address            common.Address
	BridgeAddress      common.Address
	GERAddr            common.Address
	POLAddr            common.Address
	CreationBlock      uint64
	UpdateToULxLyBlock uint64

	Client   *ethclient.Client                          `json:"-"`
	Contract *polygonrollupmanager.Polygonrollupmanager `json:"-"`
}

func LoadFromFile

func LoadFromFile(client *ethclient.Client, filePath string) (*RollupManager, error)

func LoadFromL1

func LoadFromL1(ctx context.Context, client *ethclient.Client, address common.Address) (*RollupManager, error)

func (*RollupManager) GetAttachedRollups

func (rm *RollupManager) GetAttachedRollups(ctx context.Context) (map[uint64]string, error)

GetAttachedRollups returns a list of attached rollups

func (*RollupManager) GetConsensusDescription

func (rm *RollupManager) GetConsensusDescription(ctx context.Context, rollupID uint32) (string, error)

GetConsensusDescription returns the description of the consensus for a given rollup ID

func (*RollupManager) GetInitializedBlock

func (rm *RollupManager) GetInitializedBlock(ctx context.Context) (uint64, error)

GetInitializedBlock returns the block in which the contract was initialized

func (*RollupManager) GetRollupCreationInfo

func (rm *RollupManager) GetRollupCreationInfo(ctx context.Context, rollupID uint32) (CreateRollupInfo, error)

GetRollupCreation returns genesis root and the block number in which the rollup was created

func (*RollupManager) GetRollupIdentityData

func (rm *RollupManager) GetRollupIdentityData(chainID uint64) (common.Address, uint32, error)

GetRollupIdentityData returns the rollup id and its address based on the provided chain id

func (*RollupManager) GetUpgradeBlocks

func (rm *RollupManager) GetUpgradeBlocks(ctx context.Context) (map[uint8]uint64, error)

GetUpgradeBlocks returns a mapping of version => block number of the rollup manager

func (*RollupManager) InitContract

func (rm *RollupManager) InitContract(ctx context.Context, client bind.ContractBackend) error

InitContract initializes the rollup manager contract if not already initialized

type VerifierType

type VerifierType int
const (
	StateTransition VerifierType = iota
	Pessimistic
)

Jump to

Keyboard shortcuts

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