spec

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: Apache-2.0 Imports: 12 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessListEntry

type AccessListEntry struct {
	Address     []byte
	StorageKeys [][]byte
}

AccessListEntry contains a single entry in an access list.

func (*AccessListEntry) MarshalJSON

func (a *AccessListEntry) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*AccessListEntry) MarshalYAML

func (a *AccessListEntry) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*AccessListEntry) String

func (a *AccessListEntry) String() string

String returns a string version of the structure.

func (*AccessListEntry) UnmarshalJSON

func (a *AccessListEntry) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*AccessListEntry) UnmarshalYAML

func (a *AccessListEntry) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type Block

type Block struct {
	Version DataVersion
	London  *LondonBlock
}

Block contains a versioned block.

type DataVersion

type DataVersion int

DataVersion defines the spec version of the data in a response.

const (
	// DataVersionPreMerge is data applicable for the per-merge release of the execution chain.
	DataVersionPreMerge DataVersion = iota
)

func (*DataVersion) MarshalJSON

func (d *DataVersion) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (DataVersion) String

func (d DataVersion) String() string

String returns a string representation of the

func (*DataVersion) UnmarshalJSON

func (d *DataVersion) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

type LondonBlock

type LondonBlock struct {
	BaseFeePerGas    uint64
	Difficulty       uint64
	ExtraData        []byte
	GasLimit         uint32
	GasUsed          uint32
	Hash             types.Hash
	LogsBloom        []byte
	Miner            types.Address
	MixHash          types.Hash
	Nonce            []byte
	Number           uint32
	ParentHash       types.Hash
	ReceiptsRoot     types.Root
	SHA3Uncles       []byte
	Size             uint32
	StateRoot        types.Root
	Timestamp        time.Time
	TotalDifficulty  *big.Int
	Transactions     []*Transaction
	TransactionsRoot types.Root
	Uncles           []types.Hash
}

LondonBlock contains a block after the London hardfork.

func (*LondonBlock) MarshalJSON

func (b *LondonBlock) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*LondonBlock) UnmarshalJSON

func (b *LondonBlock) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler. nolint:gocyclo

type Transaction

type Transaction struct {
	Type                 uint64
	BlockHash            types.Hash
	BlockIndex           uint32
	ChainID              uint64
	BlockNumber          uint32
	From                 types.Address
	Gas                  uint32
	GasPrice             uint64
	MaxFeePerGas         uint64
	MaxPriorityFeePerGas uint64
	Hash                 types.Hash
	Input                []byte
	Nonce                uint64
	R                    *big.Int
	S                    *big.Int
	To                   *types.Address
	TransactionIndex     uint32
	V                    *big.Int
	Value                *big.Int
	AccessList           []*AccessListEntry
}

Transaction is a struct that covers all transaction types.

func (*Transaction) MarshalJSON added in v0.4.0

func (t *Transaction) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Transaction) MarshalType0JSON added in v0.4.0

func (t *Transaction) MarshalType0JSON() ([]byte, error)

MarshalType0JSON marshals a type 0 transaction.

func (*Transaction) MarshalType1JSON added in v0.4.0

func (t *Transaction) MarshalType1JSON() ([]byte, error)

MarshalType1JSON marshals a type 1 transaction.

func (*Transaction) MarshalType2JSON added in v0.4.0

func (t *Transaction) MarshalType2JSON() ([]byte, error)

MarshalType2JSON marshals a type 2 transaction.

func (*Transaction) MarshalYAML added in v0.4.0

func (t *Transaction) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*Transaction) String added in v0.4.0

func (t *Transaction) String() string

String returns a string version of the structure.

func (*Transaction) UnmarshalJSON added in v0.4.0

func (t *Transaction) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*Transaction) UnmarshalYAML added in v0.4.0

func (t *Transaction) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type TransactionEvent

type TransactionEvent struct {
	Address          types.Address
	BlockHash        types.Hash
	BlockNumber      uint32
	Data             []byte
	Index            uint32
	Removed          bool
	Topics           []types.Hash
	TransactionHash  types.Hash
	TransactionIndex uint32
}

TransactionEvent contains a transaction event.

func (*TransactionEvent) MarshalJSON

func (t *TransactionEvent) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*TransactionEvent) MarshalYAML

func (t *TransactionEvent) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*TransactionEvent) String

func (t *TransactionEvent) String() string

String returns a string version of the structure.

func (*TransactionEvent) UnmarshalJSON

func (t *TransactionEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*TransactionEvent) UnmarshalYAML

func (t *TransactionEvent) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type TransactionReceipt

type TransactionReceipt struct {
	BlockHash         types.Hash
	BlockNumber       uint32
	ContractAddress   *types.Address
	CumulativeGasUsed uint32
	From              types.Address
	GasUsed           uint32
	Logs              []*TransactionEvent
	LogsBloom         []byte
	Status            uint32
	To                *types.Address
	TransactionHash   types.Hash
	TransactionIndex  uint32
	Type              uint32
}

TransactionReceipt contains a transaction receipt.

func (*TransactionReceipt) MarshalJSON

func (t *TransactionReceipt) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*TransactionReceipt) MarshalYAML

func (t *TransactionReceipt) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*TransactionReceipt) String

func (t *TransactionReceipt) String() string

String returns a string version of the structure.

func (*TransactionReceipt) UnmarshalJSON

func (t *TransactionReceipt) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*TransactionReceipt) UnmarshalYAML

func (t *TransactionReceipt) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

Jump to

Keyboard shortcuts

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