blocks

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockInternal

type BlockInternal struct {
	Number        string                `json:"number"`
	Hash          common.Hash           `json:"hash"`
	ParentHash    common.Hash           `json:"parentHash"`
	BaseFeePerGas *hexutil.Big          `json:"baseFeePerGas"`
	Timestamp     hexutil.Uint64        `json:"timestamp"`
	Transactions  []TransactionInternal `json:"transactions"`
}

BlockInternal is JSON-serialization optimized intermediate representation between EVM blocks and our public representation

func (*BlockInternal) CodecDecodeSelf

func (x *BlockInternal) CodecDecodeSelf(d *codec1978.Decoder)

func (*BlockInternal) CodecEncodeSelf

func (x *BlockInternal) CodecEncodeSelf(e *codec1978.Encoder)

func (BlockInternal) Empty

func (bi BlockInternal) Empty() bool

func (*BlockInternal) IsCodecEmpty

func (x *BlockInternal) IsCodecEmpty() bool

type TransactionInternal

type TransactionInternal struct {
	GasPrice             *hexutil.Big    `json:"gasPrice"`
	Gas                  *hexutil.Uint64 `json:"gas"`
	MaxFeePerGas         *hexutil.Big    `json:"maxFeePerGas"`
	MaxPriorityFeePerGas *hexutil.Big    `json:"maxPriorityFeePerGas"`
	Type                 *TxType         `json:"type"`
	Hash                 common.Hash     `json:"hash"`
}

TransactionInternal is JSON-serialization optimized intermediate representation between EVM blocks and our public representation

func (*TransactionInternal) CodecDecodeSelf

func (x *TransactionInternal) CodecDecodeSelf(d *codec1978.Decoder)

func (*TransactionInternal) CodecEncodeSelf

func (x *TransactionInternal) CodecEncodeSelf(e *codec1978.Encoder)

func (*TransactionInternal) IsCodecEmpty

func (x *TransactionInternal) IsCodecEmpty() bool

type TxType

type TxType uint8

func (*TxType) CodecDecodeSelf

func (x *TxType) CodecDecodeSelf(d *codec1978.Decoder)

func (TxType) CodecEncodeSelf

func (x TxType) CodecEncodeSelf(e *codec1978.Encoder)

func (*TxType) MarshalText

func (txt *TxType) MarshalText() ([]byte, error)

func (*TxType) UnmarshalJSON

func (txt *TxType) UnmarshalJSON(data []byte) error

NOTE: Need to roll our own unmarshaller since geth's hexutil.Uint64 does not handle double zeroes e.g. 0x00

Jump to

Keyboard shortcuts

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