Documentation
¶
Index ¶
- Variables
- func NewBridgeDataQuerier(bridgeSyncer types.L2BridgeSyncer) *bridgeDataQuerier
- func NewGERDataQuerier(l1InfoTreeQuerier types.L1InfoTreeDataQuerier, ...) types.GERQuerier
- type L1InfoTreeDataQuerier
- func (l *L1InfoTreeDataQuerier) CheckIfClaimsArePartOfFinalizedL1InfoTree(finalizedL1InfoTreeRoot *treetypes.Root, claims []bridgesync.Claim) error
- func (l *L1InfoTreeDataQuerier) GetFinalizedL1InfoTreeData(ctx context.Context) (treetypes.Proof, *l1infotreesync.L1InfoTreeLeaf, *treetypes.Root, error)
- func (l *L1InfoTreeDataQuerier) GetLatestFinalizedL1InfoRoot(ctx context.Context) (*treetypes.Root, *l1infotreesync.L1InfoTreeLeaf, error)
- func (l *L1InfoTreeDataQuerier) GetProofForGER(ctx context.Context, ger, rootFromWhichToProve common.Hash) (*l1infotreesync.L1InfoTreeLeaf, treetypes.Proof, error)
Constants ¶
This section is empty.
Variables ¶
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 ¶
func (l *L1InfoTreeDataQuerier) GetFinalizedL1InfoTreeData(ctx context.Context, ) (treetypes.Proof, *l1infotreesync.L1InfoTreeLeaf, *treetypes.Root, error)
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