query

package
v0.3.0-beta4-tmp-bridge Latest Latest
Warning

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

Go to latest
Published: May 15, 2025 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoBridgeExits = fmt.Errorf("no bridge exits consumed")

Functions

func NewBridgeDataQuerier

func NewBridgeDataQuerier(bridgeSyncer types.L2BridgeSyncer) *bridgeDataQuerier

NewBridgeDataQuerier returns a new instance of the BridgeDataQuerier

func NewGERDataQuerier

func NewGERDataQuerier(
	l1InfoTreeQuerier types.L1InfoTreeDataQuerier,
	chainGERReader types.ChainGERReader) types.GERQuerier

NewGERDataQuerier returns a new instance of the GERQuerier

Types

type L1InfoTreeDataQuerier

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

L1InfoTreeDataQuerier is a struct that holds the logic to query the L1 Info tree data

func NewL1InfoTreeDataQuerier

func NewL1InfoTreeDataQuerier(
	l1Client types.EthClient,
	l1InfoTreeSyncer types.L1InfoTreeSyncer) *L1InfoTreeDataQuerier

NewL1InfoTreeDataQuerier returns a new instance of the L1InfoTreeDataQuery

func (*L1InfoTreeDataQuerier) CheckIfClaimsArePartOfFinalizedL1InfoTree

func (l *L1InfoTreeDataQuerier) CheckIfClaimsArePartOfFinalizedL1InfoTree(
	finalizedL1InfoTreeRoot *treetypes.Root,
	claims []bridgesync.Claim) error

CheckIfClaimsArePartOfFinalizedL1InfoTree checks if the claims are part of the finalized L1 Info tree

func (*L1InfoTreeDataQuerier) GetFinalizedL1InfoTreeData

GetFinalizedL1InfoTreeData returns the L1 Info tree data for the last finalized processed block l1InfoTreeData is: - merkle proof of given l1 info tree leaf - the leaf data of the highest index leaf on that block and root - the root of the l1 info tree on that block

func (*L1InfoTreeDataQuerier) GetLatestFinalizedL1InfoRoot

func (l *L1InfoTreeDataQuerier) GetLatestFinalizedL1InfoRoot(ctx context.Context) (
	*treetypes.Root, *l1infotreesync.L1InfoTreeLeaf, error)

GetLatestFinalizedL1InfoRoot returns the latest processed l1 info tree root based on the latest finalized l1 block

func (*L1InfoTreeDataQuerier) GetProofForGER

func (l *L1InfoTreeDataQuerier) GetProofForGER(
	ctx context.Context, ger, rootFromWhichToProve common.Hash) (
	*l1infotreesync.L1InfoTreeLeaf, treetypes.Proof, error)

GetProofForGER returns the L1 Info tree leaf and the merkle proof for the given GER

Jump to

Keyboard shortcuts

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