Documentation ¶
Index ¶
- type AddressToken
- type Addresses
- type Blocks
- type Events
- type Token
- type Topics
- type Transaction
- func (tx *Transaction) GetFirstColumn(db *gorm.DB) (*Transaction, error)
- func (tx *Transaction) GetTransactionByAddress(db *gorm.DB) (*Transaction, error)
- func (tx *Transaction) SelfInsert(db *gorm.DB) error
- func (tx *Transaction) SelfUpdate(db *gorm.DB) error
- func (tx *Transaction) TableName() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressToken ¶
type AddressToken struct { Id uint64 `gorm:"primary_key;AUTO_INCREMENT" json:"id"` AddressId uint64 `json:"address_id"` TokenId uint64 `json:"token_id"` HoldValue string `gorm:"type:varchar(256)" json:"hold_value"` HoldNum uint64 `json:"hold_num"` *gorm.Model }
func (*AddressToken) SelfInsert ¶
func (at *AddressToken) SelfInsert(db *gorm.DB) error
func (*AddressToken) SelfUpdate ¶
func (at *AddressToken) SelfUpdate(db *gorm.DB) error
func (*AddressToken) TableName ¶
func (at *AddressToken) TableName() string
type Addresses ¶
type Blocks ¶
type Blocks struct { Id int64 `json:"id" gorm:"primary_key;AUTO_INCREMENT"` BlockHeight uint64 `json:"block_height" gorm:"column:block_height;default: 0;"` BlockHash string `json:"block_hash" gorm:"column:block_hash;default: '';"` ParentHash string `json:"parent_hash" gorm:"column:parent_hash;default: '';"` LatestBlockHeight uint64 `json:"latest_block_height" gorm:"column:latest_block_height;default: 0;"` *gorm.Model }
type Events ¶
type Events struct { Id uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT" json:"id"` Address string `gorm:"type:char(42)" json:"address"` Data string `gorm:"type:varchar(1024)" json:"data"` BlockNumber uint64 `json:"block_number"` TxHash string `gorm:"type:char(66)" json:"tx_hash"` TxIndex uint `json:"tx_index"` BlockHash string `json:"block_hash"` LogIndex uint `json:"log_index"` Removed bool `json:"removed"` *gorm.Model }
type Token ¶
type Token struct { Id uint64 `gorm:"primary_key;AUTO_INCREMENT" json:"id"` Address string `gorm:"type:char(42)" json:"address"` Name string `gorm:"type:char(64)" json:"name"` Symbol string `gorm:"type:char(64)" json:"symbol"` Type string `gorm:"type:varchar(30);" json:"type"` // erc20:erc20; nft:nft(erc721/erc1155); other:other TotalSupply string `gorm:"type:varchar(256)" json:"total_supply"` Collections uint64 `json:"collections"` TotalNft uint64 `json:"total_nft"` TotalTransactions uint64 `json:"total_transactions"` TotalHolders uint64 `json:"total_holders"` *gorm.Model }
type Topics ¶
type Transaction ¶
type Transaction struct { Id uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT" json:"id"` BlockNumber uint64 `json:"block_number"` TxHash string `gorm:"type:char(66)" json:"tx_hash"` From string `gorm:"type:char(42)" json:"from"` To string `gorm:"type:char(42)" json:"to"` Value string `gorm:"type:varchar(256)" json:"value"` Contract string `gorm:"type:char(42)" json:"contract"` Status uint64 `json:"status"` Timestamp time.Time `json:"timestamp"` InputData []byte `gorm:"-" json:"input_data"` *gorm.Model }
func (*Transaction) GetFirstColumn ¶
func (tx *Transaction) GetFirstColumn(db *gorm.DB) (*Transaction, error)
func (*Transaction) GetTransactionByAddress ¶
func (tx *Transaction) GetTransactionByAddress(db *gorm.DB) (*Transaction, error)
func (*Transaction) SelfInsert ¶
func (tx *Transaction) SelfInsert(db *gorm.DB) error
func (*Transaction) SelfUpdate ¶
func (tx *Transaction) SelfUpdate(db *gorm.DB) error
func (*Transaction) TableName ¶
func (tx *Transaction) TableName() string
Click to show internal directories.
Click to hide internal directories.