Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ETH = 0 ETH = 0 WETH = 1 // ERC20 = 1 ERC20 = 20 // ERC721 = 2 ERC721 = 721 // ERC1155 = 3 ERC1155 = 1155 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockHeader ¶
type BlockHeader struct { GUID uuid.UUID `gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','');serializer:uuid"` Hash common.Hash `gorm:"primaryKey;serializer:bytes"` ParentHash common.Hash `gorm:"serializer:bytes"` Number *big.Int `gorm:"serializer:u256"` Timestamp uint64 RLPHeader *common2.RLPHeader `gorm:"serializer:rlp;column:rlp_bytes"` }
func BlockHeaderFromHeader ¶
func BlockHeaderFromHeader(header *types.Header) BlockHeader
type BlocksDB ¶
type BlocksDB interface { BlocksView StoreBlockHeaders(string, []ChainBlockHeader) error }
func NewBlocksDB ¶
type BlocksView ¶
type BlocksView interface { ChainBlockHeader(string, common.Hash) (*BlockHeader, error) ChainBlockHeaderWithFilter(string, BlockHeader) (*BlockHeader, error) ChainBlockHeaderWithScope(func(db *gorm.DB) *gorm.DB, string) (*BlockHeader, error) ChainLatestBlockHeader(string) (*BlockHeader, error) LatestObservedEpochForChain(string, *big.Int, uint64) (*BlockHeader, error) BlockTimeStampByNum(string, uint64) (int64, error) CleanBlockHerders(chainId string) error }
type ChainBlockHeader ¶
type ChainBlockHeader struct {
BlockHeader `gorm:"embedded"`
}
Click to show internal directories.
Click to hide internal directories.