monitor

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventNameNewPriorityRequest = "NewPriorityRequest"
	EventNameBlockCommit        = "BlockCommit"
	EventNameBlockVerification  = "BlockVerification"

	EventTypeNewPriorityRequest = 0
	EventTypeCommittedBlock     = 1
	EventTypeVerifiedBlock      = 2
	EventTypeRevertedBlock      = 3

	EventNameNewAsset              = "NewAsset"
	EventNameNewGovernor           = "NewGovernor"
	EventNameNewAssetGovernance    = "NewAssetGovernance"
	EventNameValidatorStatusUpdate = "ValidatorStatusUpdate"
	EventNameAssetPausedUpdate     = "AssetPausedUpdate"

	EventTypeAddAsset              = 4
	EventTypeNewGovernor           = 5
	EventTypeNewAssetGovernance    = 6
	EventTypeValidatorStatusUpdate = 7
	EventTypeAssetPausedUpdate     = 8

	PendingStatus = priorityrequest.PendingStatus

	TxTypeRegisterZns = types.TxTypeRegisterZns
	TxTypeDeposit     = types.TxTypeDeposit
	TxTypeDepositNft  = types.TxTypeDepositNft
	TxTypeFullExit    = types.TxTypeFullExit
	TxTypeFullExitNft = types.TxTypeFullExitNft
)

Variables

View Source
var (
	ZkBNBContractAbi, _ = abi.JSON(strings.NewReader(zkbnb.ZkBNBMetaData.ABI))

	GovernanceContractAbi, _ = abi.JSON(strings.NewReader(zkbnb.GovernanceMetaData.ABI))
)

Functions

func ComputeL1TxTxHash

func ComputeL1TxTxHash(requestId int64, txHash string) string

func EmptyCallOpts

func EmptyCallOpts() *bind.CallOpts

Types

type GovernancePendingChanges

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

func NewGovernancePendingChanges

func NewGovernancePendingChanges() *GovernancePendingChanges

type L1Event

type L1Event struct {
	// deposit / lock / committed / verified / reverted
	EventType uint8
	// tx hash
	TxHash string
}

type Monitor

type Monitor struct {
	Config config.Config

	BlockModel           block.BlockModel
	TxModel              tx.TxModel
	TxPoolModel          tx.TxPoolModel
	SysConfigModel       sysconfig.SysConfigModel
	L1RollupTxModel      l1rolluptx.L1RollupTxModel
	ProofModel           proof.ProofModel
	L2AssetModel         asset.AssetModel
	PriorityRequestModel priorityrequest.PriorityRequestModel
	L1SyncedBlockModel   l1syncedblock.L1SyncedBlockModel
	// contains filtered or unexported fields
}

func NewMonitor

func NewMonitor(c config.Config) *Monitor

func (*Monitor) CleanHistoryBlocks

func (m *Monitor) CleanHistoryBlocks() (err error)

func (*Monitor) MonitorGenericBlocks

func (m *Monitor) MonitorGenericBlocks() (err error)

func (*Monitor) MonitorGovernanceBlocks

func (m *Monitor) MonitorGovernanceBlocks() (err error)

func (*Monitor) MonitorPriorityRequests

func (m *Monitor) MonitorPriorityRequests() error

func (*Monitor) Shutdown

func (m *Monitor) Shutdown()

Jump to

Keyboard shortcuts

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