Documentation ¶
Overview ¶
Package model holds all the models for the database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TransactionIDFieldName is the field name of the transactionID. TransactionIDFieldName string // ContractAddressFieldName is the field name of the contract address. ContractAddressFieldName string // ChainIDFieldName is the field name of the chain id. ChainIDFieldName string // AddressFieldName is the field name of the address. AddressFieldName string // BlockNumberFieldName is the field name of the block number. BlockNumberFieldName string // TokenIDFieldName is the field name of the token id, used in the token and balance tables. TokenIDFieldName string // SymbolFieldName is the field name of the symbol for the token table. SymbolFieldName string // NameFieldName is the field name of the name for the token table. NameFieldName string // DecimalsFieldName is the field name of the decimals for the token table. DecimalsFieldName string )
Functions ¶
func GetAllModels ¶
func GetAllModels() (allModels []interface{})
GetAllModels gets all models to migrate.
Types ¶
type DeadlineQueue ¶
type DeadlineQueue struct { Timestamp int64 TransactionID string `gorm:"column:transaction_id;primaryKey"` }
DeadlineQueue is the underlying table in the deadline queue.
type DestinationBridgeEvent ¶
type DestinationBridgeEvent struct { TransactionID string `gorm:"column:transaction_id;primaryKey"` Request string OriginChainID uint32 DestChainID uint32 BlockNumber uint64 TxHash string TxIndex uint BlockHash string LogIndex uint Removed bool }
DestinationBridgeEvent is the table that holds every destination fast bridge transaction (relay).
type LastIndexed ¶
type LastIndexed struct { gorm.Model // ContractAddress is the contract address ContractAddress string `gorm:"column:contract_address;index:idx_last_indexed,priority:1;uniqueIndex:idx_contract_chain"` // BlockNumber is the last block number indexed. // NOTE: SQLite's max int is below the max uint64 in golang. However, we can assume that no chain will have over 9 quintillion blocks. BlockNumber uint64 `gorm:"column:block_number;index:idx_last_indexed,priority:2"` // ChainID is the chain id of the contract ChainID uint32 `gorm:"column:chain_id;index:idx_last_indexed;uniqueIndex:idx_contract_chain"` }
LastIndexed contains information on when a contract was last indexed.
type OriginBridgeEvent ¶
type OriginBridgeEvent struct { TransactionID string `gorm:"column:transaction_id;primaryKey"` Request string OriginChainID uint32 DestChainID uint32 OriginSender string DestRecipient string OriginToken string DestToken string OriginAmount string DestAmount string Deadline string Nonce string BlockNumber uint64 TxHash string TxIndex uint BlockHash string LogIndex uint Removed bool }
OriginBridgeEvent is the table that holds every origin fast bridge transaction (bridge).
Click to show internal directories.
Click to hide internal directories.