Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ERC20ContractTableName ¶
ERC20ContractTableName returns its contract table
func ERC20TransferTableName ¶
ERC20TransferTableName returns its contract table
Types ¶
type ERC20 ¶
type ERC20 struct {
BlockNumber int64
Address []byte
Code []byte
TotalSupply string
Decimals int
Name string
}
ERC20 represents the ERC20 contract
type ERC20Storage ¶
type ERC20Storage struct {
Address []byte `gorm:"-"`
BlockNumber int64 `gorm:"size:8;index;unique_index:idx_block_number_key_hash"`
Key []byte `gorm:"column:key_hash;size:32;unique_index:idx_block_number_key_hash"`
Value []byte `gorm:"size:32"`
}
ERC20Storage represents the contract storage
func (ERC20Storage) TableName ¶
func (s ERC20Storage) TableName() string
TableName retruns the table name of this erc20 contract
type ERC20Transfer ¶
type ERC20Transfer struct {
Address []byte `gorm:"-"`
BlockNumber int64 `gorm:"size:8;index"`
TxHash []byte `gorm:"size:32;index"`
From []byte `gorm:"size:20;index"`
To []byte `gorm:"size:20;index"`
Value string `gorm:"size:32"`
}
ERC20Transfer represents the transfer event in erc20
func (ERC20Transfer) TableName ¶
func (s ERC20Transfer) TableName() string
TableName retruns the table name of this erc20 contract
type ETHTransfer ¶
type ETHTransfer struct {
BlockNumber int64 `gorm:"size:8;index"`
TxHash []byte `gorm:"size:32;index"`
From []byte `gorm:"size:20;index"`
To []byte `gorm:"size:20;index"`
Value string `gorm:"size:32"`
}
ETHTransfer represents the transfer event in ether
func (ETHTransfer) TableName ¶
func (e ETHTransfer) TableName() string
TableName retruns the table name of this erc20 contract
type Header ¶
type Header struct {
Hash []byte
ParentHash []byte
UncleHash []byte
Coinbase []byte
Root []byte
TxHash []byte
ReceiptHash []byte
Difficulty int64
Number int64
GasLimit int64
GasUsed int64
Time int64
ExtraData []byte
MixDigest []byte
Nonce []byte
}
Header represents the header of a block
type Log ¶
type Log struct {
TxHash []byte
BlockNumber int64
ContractAddress []byte
// The sha3 of the event method
EventName []byte
// Indexed parameters of event. At most 3 topics.
Topic1 []byte
Topic2 []byte
Topic3 []byte
Data []byte
}
Log represents a receipt log
type Receipt ¶
type Receipt struct {
Root []byte
Status uint
CumulativeGasUsed int64
Bloom []byte
TxHash []byte
ContractAddress []byte
GasUsed int64
BlockNumber int64
Logs []*Log
}
Receipt represents a transaction receipt
type TotalDifficulty ¶
TotalDifficulty represents total difficulty for this block
func (TotalDifficulty) TableName ¶
func (t TotalDifficulty) TableName() string
TableName returns the table name of this model
type Transaction ¶
type Transaction struct {
Hash []byte
BlockHash []byte
From []byte
To []byte
Nonce int64
GasPrice string
GasLimit int64
Amount string
Payload []byte
BlockNumber int64
}
Transaction represents a transaction
func (Transaction) TableName ¶
func (t Transaction) TableName() string
TableName returns the table name of this model