Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StreamTypeSequencer represents a Sequencer stream StreamTypeSequencer datastreamer.StreamType = 1 // EntryTypeL2Block represents a L2 block EntryTypeL2Block datastreamer.EntryType = 1 // EntryTypeL2Tx represents a L2 transaction EntryTypeL2Tx datastreamer.EntryType = 2 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Database name Name string `mapstructure:"Name"` // Database User name User string `mapstructure:"User"` // Database Password of the user Password string `mapstructure:"Password"` // Host address of database Host string `mapstructure:"Host"` // Port Number of database Port string `mapstructure:"Port"` // EnableLog EnableLog bool `mapstructure:"EnableLog"` // MaxConns is the maximum number of connections in the pool. MaxConns int `mapstructure:"MaxConns"` }
type L2Block ¶
type L2Block struct { BatchNumber uint64 L2BlockNumber uint64 Timestamp time.Time GlobalExitRoot common.Hash Coinbase common.Address }
L2Block represents a L2 block
type L2Transaction ¶
type L2Transaction struct { BatchNumber uint64 EffectiveGasPricePercentage uint8 IsValid uint8 EncodedLength uint32 Encoded []byte }
L2Transaction represents a L2 transaction
func DecodeL2Transaction ¶
func DecodeL2Transaction(data []byte) L2Transaction
DecodeL2Transaction decodes a byte slice into a L2Transaction
func (L2Transaction) Encode ¶
func (l L2Transaction) Encode() []byte
Encode returns the encoded L2Transaction as a byte slice
type StateDB ¶
StateDB implements the StateDB interface
func NewStateDB ¶
NewPostgresStorage creates a new StateDB
func (*StateDB) GetL2Blocks ¶
func (*StateDB) GetL2Transactions ¶
Click to show internal directories.
Click to hide internal directories.