query

package
v0.6.0-beta2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoProofBuiltYet = &grpc.GRPCError{
	Code:    codes.Unavailable,
	Message: "Proposer service has not built any proof yet",
}

Functions

func NewAggchainProofQuery added in v0.7.0

func NewAggchainProofQuery(
	log types.Logger,
	aggchainproofclient types.AggchainProofClientInterface,
	l1InfoTreeDataQuerier types.L1InfoTreeDataQuerier,
	optimisticSigner types.OptimisticSigner,
	lerQuerier types.LocalExitRootQuery,
	gerQuerier types.GERQuerier,
) *aggchainProofQuery

NewAggchainProofQuery creates a new instance of aggchainProofQuery with the provided dependencies.

func NewBridgeDataQuerier

func NewBridgeDataQuerier(
	log types.Logger,
	bridgeSyncer types.L2BridgeSyncer,
	delayBetweenRetries time.Duration,
) *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

func NewLERDataQuerier added in v0.5.0

func NewLERDataQuerier(
	rollupManagerAddr common.Address,
	l1GenesisBlock uint64,
	rollupDataQuerier types.RollupDataQuerier) (types.LERQuerier, error)

NewLERDataQuerier creates a new instance of LERQuerier for querying Layer 1 Ethereum Rollup data. It initializes the RollupManager contract using the provided address and Ethereum client.

Parameters:

  • rollupManagerAddr: The Ethereum address of the RollupManager contract.
  • l1GenesisBlock: The block number of the Layer 1 genesis block.
  • l1Client: An implementation of BaseEthereumClienter for interacting with the Ethereum network.

Returns:

  • types.LERQuerier: An initialized LERQuerier for querying rollup data.
  • error: An error if the RollupManager contract could not be created.

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 aggkittypes.BaseEthereumClienter,
	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) GetL1InfoRootByLeafIndex added in v0.7.0

func (l *L1InfoTreeDataQuerier) GetL1InfoRootByLeafIndex(ctx context.Context,
	leafIndex uint32) (*treetypes.Root, error)

GetL1InfoRootByLeafIndex returns the L1 Info tree root tha corresponds to the given leaf index

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