Documentation
¶
Index ¶
- type AccessListEntry
- type Address
- type Block
- type DataVersion
- type Hash
- type LondonBlock
- type Root
- 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 Hash
LogsBloom []byte
Miner Address
MixHash Hash
Nonce []byte
Number uint32
ParentHash Hash
ReceiptsRoot Root
SHA3Uncles []byte
Size uint32
StateRoot Root
Timestamp time.Time
TotalDifficulty *big.Int
Transactions []Transaction
TransactionsRoot Root
Uncles []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 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 Address
BlockHash Hash
BlockNumber uint32
Data []byte
Index uint32
Removed bool
Topics []Hash
TransactionHash 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 Hash
BlockNumber uint32
ContractAddress *Address
CumulativeGasUsed uint32
From Address
GasUsed uint32
Logs []*TransactionEvent
LogsBloom []byte
Status uint32
To *Address
TransactionHash 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.
type Type0Transaction ¶
type Type0Transaction struct {
BlockHash Hash
BlockNumber uint32
From Address
Gas uint32
GasPrice uint64
Hash Hash
Input []byte
Nonce uint64
R *big.Int
S *big.Int
To *Address
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 Hash
BlockNumber uint32
ChainID uint64
From Address
Gas uint32
GasPrice uint64
Hash Hash
Input []byte
Nonce uint64
R *big.Int
S *big.Int
To *Address
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 Hash
BlockNumber uint32
ChainID uint64
From Address
Gas uint32
GasPrice uint64
Hash Hash
Input []byte
MaxFeePerGas uint64
MaxPriorityFeePerGas uint64
Nonce uint64
R *big.Int
S *big.Int
To *Address
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.