Documentation
¶
Index ¶
- Variables
- type RollupMetadata
- func LoadMetadataFromFile(filePath string) (*RollupMetadata, error)
- func LoadMetadataFromL1ByChainID(ctx context.Context, client *ethclient.Client, rm *rollupmanager.RollupManager, ...) (*RollupMetadata, error)
- func NewRollupMetadata(rollupName string, chainID uint64, rollupAddr common.Address, ...) *RollupMetadata
- type RollupPessimisticProofs
- func (r *RollupPessimisticProofs) GetBatchL2Data(client bind.ContractBackend) (string, error)
- func (r *RollupPessimisticProofs) GetRollupGlobalExitRoot(rm *rollupmanager.RollupManager, client bind.ContractBackend) (common.Hash, error)
- func (r *RollupPessimisticProofs) InitContract(ctx context.Context, client bind.ContractBackend) error
- type RollupValidium
Constants ¶
This section is empty.
Variables ¶
View Source
var L2GERManager = common.HexToAddress("0xa40d5f56745a118d0906a34e69aec8c0db1cb8fa")
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
AggchainType rollupmanager.AggchainType
}
func LoadMetadataFromFile ¶
func LoadMetadataFromFile(filePath string) (*RollupMetadata, error)
LoadMetadataFromFile reads the rollup metadata from the json file
func LoadMetadataFromL1ByChainID ¶
func LoadMetadataFromL1ByChainID( ctx context.Context, 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, aggchainType rollupmanager.AggchainType, rollupInfo rollupmanager.CreateRollupInfo) *RollupMetadata
func (*RollupMetadata) IsPessimistic ¶ added in v0.0.12
func (r *RollupMetadata) IsPessimistic() bool
IsPessimistic returns true if the rollup uses pessimistic proofs
type RollupPessimisticProofs ¶
type RollupPessimisticProofs struct {
*RollupMetadata
Contract *aggchainecdsamultisig.Aggchainecdsamultisig `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
Click to show internal directories.
Click to hide internal directories.