Documentation ¶
Overview ¶
Database module defines the data DB struct which wraps specific DB interfaces for L1/L2 block headers, contract events, bridging schemas.
Index ¶
- Variables
- type BlockHeader
- type BlocksDB
- type BlocksView
- type BridgeDB
- type BridgeView
- type ContractEvent
- type ContractEventsDB
- type ContractEventsView
- type DB
- type Deposit
- type DepositWithTransactionHash
- type L1BlockHeader
- type L1ContractEvent
- type L2BlockHeader
- type L2ContractEvent
- type LegacyStateBatch
- type TokenPair
- type Transaction
- type U256
- type Withdrawal
- type WithdrawalWithTransactionHashes
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrU256ContainsDecimal = errors.New("number contains fractional digits")
View Source
var ErrU256NotNull = errors.New("number cannot be null")
View Source
var ErrU256Overflow = errors.New("number exceeds u256")
Functions ¶
This section is empty.
Types ¶
type BlockHeader ¶
type BlocksDB ¶
type BlocksDB interface { BlocksView StoreL1BlockHeaders([]*L1BlockHeader) error StoreLegacyStateBatch(*LegacyStateBatch) error StoreL2BlockHeaders([]*L2BlockHeader) error MarkFinalizedL1RootForL2Block(common.Hash, common.Hash) error }
type BlocksView ¶
type BridgeView ¶
type BridgeView interface { DepositsByAddress(address common.Address) ([]*DepositWithTransactionHash, error) WithdrawalsByAddress(address common.Address) ([]*WithdrawalWithTransactionHashes, error) }
type ContractEvent ¶
type ContractEventsDB ¶
type ContractEventsDB interface { ContractEventsView StoreL1ContractEvents([]*L1ContractEvent) error StoreL2ContractEvents([]*L2ContractEvent) error }
type ContractEventsView ¶
type ContractEventsView interface { L1ContractEventByGUID(string) (*L1ContractEvent, error) L2ContractEventByGUID(string) (*L2ContractEvent, error) }
type DB ¶
type DB struct { Blocks BlocksDB ContractEvents ContractEventsDB Bridge BridgeDB // contains filtered or unexported fields }
type Deposit ¶
type Deposit struct { GUID string `gorm:"primaryKey"` InitiatedL1EventGUID string Tx Transaction `gorm:"embedded"` TokenPair TokenPair `gorm:"embedded"` }
type L1BlockHeader ¶
type L1BlockHeader struct {
BlockHeader
}
type L1ContractEvent ¶
type L1ContractEvent struct {
ContractEvent `gorm:"embedded"`
}
type L2BlockHeader ¶
type L2BlockHeader struct { BlockHeader // Marked when the proposed output is finalized on L1. // All bedrock blocks will have `LegacyStateBatchIndex ^== NULL` L1BlockHash *common.Hash `gorm:"serializer:json"` LegacyStateBatchIndex *uint64 }
type L2ContractEvent ¶
type L2ContractEvent struct {
ContractEvent `gorm:"embedded"`
}
type LegacyStateBatch ¶
type Transaction ¶
type U256 ¶
U256 is a wrapper over big.Int that conforms to the database U256 numeric domain type
type Withdrawal ¶
Click to show internal directories.
Click to hide internal directories.