Documentation ¶
Index ¶
- type AccessListEntry
- type Block
- type DataVersion
- type LondonBlock
- type Transaction
- type TransactionEvent
- type TransactionReceipt
- type Type0Transaction
- func (t *Type0Transaction) MarshalJSON() ([]byte, error)
- func (t *Type0Transaction) MarshalYAML() ([]byte, error)
- func (t *Type0Transaction) String() string
- func (t *Type0Transaction) Type() uint64
- func (t *Type0Transaction) UnmarshalJSON(input []byte) error
- func (t *Type0Transaction) UnmarshalYAML(input []byte) error
- type Type1Transaction
- func (t *Type1Transaction) MarshalJSON() ([]byte, error)
- func (t *Type1Transaction) MarshalYAML() ([]byte, error)
- func (t *Type1Transaction) String() string
- func (t *Type1Transaction) Type() uint64
- func (t *Type1Transaction) UnmarshalJSON(input []byte) error
- func (t *Type1Transaction) UnmarshalYAML(input []byte) error
- type Type2Transaction
- func (t *Type2Transaction) MarshalJSON() ([]byte, error)
- func (t *Type2Transaction) MarshalYAML() ([]byte, error)
- func (t *Type2Transaction) String() string
- func (t *Type2Transaction) Type() uint64
- func (t *Type2Transaction) UnmarshalJSON(input []byte) error
- func (t *Type2Transaction) UnmarshalYAML(input []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessListEntry ¶
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 []byte LogsBloom []byte Miner []byte MixHash []byte Nonce []byte Number uint32 ParentHash []byte ReceiptsRoot []byte SHA3Uncles []byte Size uint32 StateRoot []byte Timestamp time.Time TotalDifficulty *big.Int Transactions []Transaction TransactionsRoot []byte Uncles [][]byte }
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 interface { // Type returns the transaction type. Type() uint64 }
Transaction defines a transaction.
func UnmarshalTransactionJSON ¶
func UnmarshalTransactionJSON(input []byte) (Transaction, error)
UnmarshalTransactionJSON unmarshals a transaction.
type TransactionEvent ¶
type TransactionEvent struct { Address []byte BlockHash []byte BlockNumber uint32 Data []byte Index uint32 Removed bool Topics [][]byte TransactionHash []byte 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 []byte BlockNumber uint32 ContractAddress []byte CumulativeGasUsed uint32 From []byte GasUsed uint32 Logs []*TransactionEvent LogsBloom []byte Status uint32 To []byte TransactionHash []byte 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.
type Type0Transaction ¶
type Type0Transaction struct { BlockHash []byte BlockNumber uint32 From []byte Gas uint32 GasPrice uint64 Hash []byte Input []byte Nonce uint64 R *big.Int S *big.Int To []byte TransactionIndex *big.Int V *big.Int Value *big.Int }
Type0Transaction contains a type 0 transaction, also known as a legacy transaction.
func (*Type0Transaction) MarshalJSON ¶
func (t *Type0Transaction) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*Type0Transaction) MarshalYAML ¶
func (t *Type0Transaction) MarshalYAML() ([]byte, error)
MarshalYAML implements yaml.Marshaler.
func (*Type0Transaction) String ¶
func (t *Type0Transaction) String() string
String returns a string version of the structure.
func (*Type0Transaction) Type ¶
func (t *Type0Transaction) Type() uint64
Type returns the type of this transaction.
func (*Type0Transaction) UnmarshalJSON ¶
func (t *Type0Transaction) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
func (*Type0Transaction) UnmarshalYAML ¶
func (t *Type0Transaction) UnmarshalYAML(input []byte) error
UnmarshalYAML implements yaml.Unmarshaler.
type Type1Transaction ¶
type Type1Transaction struct { AccessList []*AccessListEntry BlockHash []byte BlockNumber uint32 ChainID uint64 From []byte Gas uint32 GasPrice uint64 Hash []byte Input []byte Nonce uint64 R *big.Int S *big.Int To []byte TransactionIndex *big.Int V *big.Int Value *big.Int }
Type1Transaction contains a type 1 transaction, defined in EIP 2930
func (*Type1Transaction) MarshalJSON ¶
func (t *Type1Transaction) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*Type1Transaction) MarshalYAML ¶
func (t *Type1Transaction) MarshalYAML() ([]byte, error)
MarshalYAML implements yaml.Marshaler.
func (*Type1Transaction) String ¶
func (t *Type1Transaction) String() string
String returns a string version of the structure.
func (*Type1Transaction) Type ¶
func (t *Type1Transaction) Type() uint64
Type returns the type of this transaction.
func (*Type1Transaction) UnmarshalJSON ¶
func (t *Type1Transaction) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
func (*Type1Transaction) UnmarshalYAML ¶
func (t *Type1Transaction) UnmarshalYAML(input []byte) error
UnmarshalYAML implements yaml.Unmarshaler.
type Type2Transaction ¶
type Type2Transaction struct { AccessList []*AccessListEntry BlockHash []byte BlockNumber uint32 ChainID uint64 From []byte Gas uint32 GasPrice uint64 Hash []byte Input []byte MaxFeePerGas uint64 MaxPriorityFeePerGas uint64 Nonce uint64 R *big.Int S *big.Int To []byte TransactionIndex *big.Int V *big.Int Value *big.Int }
Type2Transaction contains a type 0 transaction, also known as an EIP-1559 transaction.
func (*Type2Transaction) MarshalJSON ¶
func (t *Type2Transaction) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*Type2Transaction) MarshalYAML ¶
func (t *Type2Transaction) MarshalYAML() ([]byte, error)
MarshalYAML implements yaml.Marshaler.
func (*Type2Transaction) String ¶
func (t *Type2Transaction) String() string
String returns a string version of the structure.
func (*Type2Transaction) Type ¶
func (t *Type2Transaction) Type() uint64
Type returns the type of this transaction.
func (*Type2Transaction) UnmarshalJSON ¶
func (t *Type2Transaction) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
func (*Type2Transaction) UnmarshalYAML ¶
func (t *Type2Transaction) UnmarshalYAML(input []byte) error
UnmarshalYAML implements yaml.Unmarshaler.