 Documentation
      ¶
      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 OutputProposal
- 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
	StoreL2BlockHeaders([]*L2BlockHeader) error
	StoreLegacyStateBatches([]*LegacyStateBatch) error
	StoreOutputProposals([]*OutputProposal) error
}
    type BlocksView ¶
type BlocksView interface {
	LatestL1BlockHeader() (*L1BlockHeader, error)
	LatestCheckpointedOutput() (*OutputProposal, error)
	LatestL2BlockHeader() (*L2BlockHeader, error)
}
    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 {
}
    type DB ¶
type DB struct {
	Blocks         BlocksDB
	ContractEvents ContractEventsDB
	Bridge         BridgeDB
	// contains filtered or unexported fields
}
    type Deposit ¶
type Deposit struct {
	GUID                 uuid.UUID `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
}
    type L2ContractEvent ¶
type L2ContractEvent struct {
	ContractEvent `gorm:"embedded"`
}
    type LegacyStateBatch ¶
type OutputProposal ¶
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.