bridge

package
v0.0.0-...-f462a82 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchReceptionIndex

func BatchReceptionIndex(logs []types.Log, l2BridgeAddress common.Address) []uint16

Batch reception index

func GetRollingHashUpdateTopic0

func GetRollingHashUpdateTopic0() (res [32]byte)

Returns the selector for RollingHashUpdated event.

func IsL1L2MessageHashesAddedToInbox

func IsL1L2MessageHashesAddedToInbox(log types.Log, l2BridgeAddress common.Address) bool

func IsRollingHashUpdated

func IsRollingHashUpdated(log ethtypes.Log, l2BridgeAddress common.Address) bool

func L1L2MessageHashesAddedToInboxTopic0

func L1L2MessageHashesAddedToInboxTopic0() common.Hash

Is the L1L2MessageHashes event topic 0

func L2L1MessageHashes

func L2L1MessageHashes(logs []ethtypes.Log, l2BridgeAddress common.Address) []types.FullBytes32

Returns the L2L1LogHashes from a list of logs and abi.encode them

func L2L1Topic0

func L2L1Topic0() (res [32]byte)

Returns the selector for the L2 L1 logs

func MsgConfirmSelector

func MsgConfirmSelector() []byte

Returns the selector for the msg reception receipt

Types

type L2L1Log

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

L2L1Log message

func ParseL2L1Log

func ParseL2L1Log(log ethtypes.Log) L2L1Log

ABI encode an L2L1 log

func (L2L1Log) MsgHash

func (l L2L1Log) MsgHash() types.FullBytes32

Returns the message hash of the log in hex format

type RollingHashUpdated

type RollingHashUpdated struct {
	MessageNumber int64             `json:"messageNumber"`
	RollingHash   types.FullBytes32 `json:"rollingHash"`
}

Bridge-event emitted post-compression release to notify the prover that a message has been received on L2 from L1.

func ExtractRollingHashUpdated

func ExtractRollingHashUpdated(logs []ethtypes.Log, l2BridgeAddress common.Address) []RollingHashUpdated

Scan the list of logs and returns the parsed `RollingHashUpdated` events that originated from the l2BridgeAddress.

func (*RollingHashUpdated) AsTypesLog

func (l *RollingHashUpdated) AsTypesLog(l2BridgeAddress common.Address) ethtypes.Log

Jump to

Keyboard shortcuts

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