types

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainID

type ChainID uint256.Int

func ChainIDFromBig

func ChainIDFromBig(chainID *big.Int) ChainID

func ChainIDFromUInt64

func ChainIDFromUInt64(i uint64) ChainID

func (ChainID) String

func (id ChainID) String() string

func (ChainID) ToUInt32 added in v1.9.1

func (id ChainID) ToUInt32() (uint32, error)

type ExecutingMessage added in v1.9.3

type ExecutingMessage struct {
	Chain     uint32 // same as ChainID for now, but will be indirect, i.e. translated to full ID, later
	BlockNum  uint64
	LogIdx    uint32
	Timestamp uint64
	Hash      common.Hash
}

type Identifier

type Identifier struct {
	Origin      common.Address
	BlockNumber uint64
	LogIndex    uint64
	Timestamp   uint64
	ChainID     ChainID // flat, not a pointer, to make Identifier safe as map key
}

func (Identifier) MarshalJSON

func (id Identifier) MarshalJSON() ([]byte, error)

func (*Identifier) UnmarshalJSON

func (id *Identifier) UnmarshalJSON(input []byte) error

type Message added in v1.9.1

type Message struct {
	Identifier  Identifier  `json:"identifier"`
	PayloadHash common.Hash `json:"payloadHash"`
}

type SafetyLevel

type SafetyLevel string
const (
	// Finalized is CrossSafe, with the additional constraint that every
	// dependency is derived only from finalized L1 input data.
	// This matches RPC label "finalized".
	Finalized SafetyLevel = "finalized"
	// CrossSafe is as safe as LocalSafe, with all its dependencies
	// also fully verified to be reproducible from L1.
	// This matches RPC label "safe".
	CrossSafe SafetyLevel = "safe"
	// LocalSafe is verified to be reproducible from L1,
	// without any verified cross-L2 dependencies.
	// This does not have an RPC label.
	LocalSafe SafetyLevel = "local-safe"
	// CrossUnsafe is as safe as LocalUnsafe,
	// but with verified cross-L2 dependencies that are at least CrossUnsafe.
	// This does not have an RPC label.
	CrossUnsafe SafetyLevel = "cross-unsafe"
	// LocalUnsafe is the safety of the tip of the chain. This matches RPC label "unsafe".
	LocalUnsafe SafetyLevel = "unsafe"
	// Invalid is the safety of when the message or block is not matching the expected data.
	Invalid SafetyLevel = "invalid"
)

func (*SafetyLevel) AtLeastAsSafe added in v1.9.1

func (lvl *SafetyLevel) AtLeastAsSafe(min SafetyLevel) bool

AtLeastAsSafe returns true if the receiver is at least as safe as the other SafetyLevel.

func (SafetyLevel) MarshalText

func (lvl SafetyLevel) MarshalText() ([]byte, error)

func (SafetyLevel) String

func (lvl SafetyLevel) String() string

func (*SafetyLevel) UnmarshalText

func (lvl *SafetyLevel) UnmarshalText(text []byte) error

func (SafetyLevel) Valid

func (lvl SafetyLevel) Valid() bool

Jump to

Keyboard shortcuts

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