entities

package
v0.0.0-...-548fa13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockEntity

type BlockEntity struct {
	Hash        types.Hash64  `json:"hash"       			 gencodec:"required"  gorm:"primaryKey"`
	ParentHash  types.Hash64  `json:"parentHash"       gencodec:"required"`
	UncleHash   types.Hash64  `json:"uncleHahs"        gencodec:"required"`
	Coinbase    types.Address `json:"miner"`
	Root        types.Hash32  `json:"stateRoot"        gencodec:"required"`
	TxHash      types.Hash32  `json:"transactionsRoot" gencodec:"required"`
	ReceiptHash types.Hash32  `json:"receiptsRoot"     gencodec:"required"`
	Bloom       types.Bloom   `json:"logsBloom"        gencodec:"required"`
	Difficulty  big.Int       `json:"difficulty"       gencodec:"required"`
	Number      big.Int       `json:"number"           gencodec:"required"`
	GasLimit    uint64        `json:"gasLimit"         gencodec:"required"`
	GasUsed     uint64        `json:"gasUsed"          gencodec:"required"`
	Time        uint64        `json:"timestamp"        gencodec:"required"`
	Extra       []byte        `json:"extraData"        gencodec:"required"`
	MixDigest   types.Hash32  `json:"mixHash"`

	// BaseFee was added by EIP-1559 and is ignored in legacy headers.
	BaseFee big.Int `json:"baseFeePerGas" rlp:"optional"`

	// WithdrawalsHash was added by EIP-4895 and is ignored in legacy headers.
	WithdrawalsHash types.Hash32 `json:"withdrawalsRoot" rlp:"optional"`

	// BlobGasUsed was added by EIP-4844 and is ignored in legacy headers.
	BlobGasUsed uint64 `json:"blobGasUsed" rlp:"optional"`

	// ExcessBlobGas was added by EIP-4844 and is ignored in legacy headers.
	ExcessBlobGas uint64 `json:"excessBlobGas" rlp:"optional"`

	// ParentBeaconRoot was added by EIP-4788 and is ignored in legacy headers.
	ParentBeaconRoot types.Hash32 `json:"parentBeaconBlockRoot" rlp:"optional"`
}

type LogEntity

type LogEntity struct {
	// contains filtered or unexported fields
}

type TransactionEntity

type TransactionEntity struct {
	Hash                 string         `json:"hash" gorm:"type:CHAR(64) CHARACTER SET binary COLLATE binary"`
	Nonce                int8           `json:"nonce"`
	BlockHash            string         `json:"blockhash" gorm:"type:CHAR(64) CHARACTER SET binary COLLATE binary"`
	BlockNumber          string         `json:"blockNumber"`
	From                 sql.NullString `json:"from" gorm:"type:CHAR(20) CHARACTER SET binary COLLATE binary"`
	To                   string         `json:"to" gorm:"type:CHAR(20) CHARACTER SET binary COLLATE binary"`
	Gas                  string         `json:"gas" gorm:"type:DECIMAL(65)"`
	GasPrice             string         `json:"gasPrice" gorm:"type:DECIMAL(65)"`
	MaxPriorityFeePerGas *string        `json:"maxPriorityFeePerGas" gorm:"type:DECIMAL(65)"`
	MaxFeePerGas         *string        `json:"maxFeePerGas" gorm:"type:DECIMAL(65)"`
	Type                 byte           `json:"type"`
	Value                string         `json:"value" gorm:"type:DECIMAL(65)"`
	Input                sql.RawBytes   `json:"input"`
	V                    string         `json:"v" gorm:"type:DECIMAL(65)"`
	R                    string         `json:"r" gorm:"type:DECIMAL(65)"`
	S                    string         `json:"s" gorm:"type:DECIMAL(65)"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL