Documentation ¶
Index ¶
- type AccessListEntry
- type BerlinBlock
- type BerlinTransactionEvent
- type BerlinTransactionReceipt
- type Block
- func (b *Block) BaseFeePerGas() uint64
- func (b *Block) BlobGasUsed() (uint64, bool)
- func (b *Block) Difficulty() uint64
- func (b *Block) ExcessBlobGas() (uint64, bool)
- func (b *Block) ExtraData() []byte
- func (b *Block) FeeRecipient() types.Address
- func (b *Block) GasLimit() uint32
- func (b *Block) GasUsed() uint32
- func (b *Block) Hash() types.Hash
- func (b *Block) LogsBloom() []byte
- func (b *Block) MarshalJSON() ([]byte, error)
- func (b *Block) Miner() types.Address
- func (b *Block) MixHash() types.Hash
- func (b *Block) Nonce() []byte
- func (b *Block) Number() uint32
- func (b *Block) ParentBeaconBlockRoot() (types.Root, bool)
- func (b *Block) ParentHash() types.Hash
- func (b *Block) ReceiptsRoot() types.Root
- func (b *Block) SHA3Uncles() []byte
- func (b *Block) Size() uint32
- func (b *Block) StateRoot() types.Root
- func (b *Block) String() string
- func (b *Block) Timestamp() time.Time
- func (b *Block) TotalDifficulty() *big.Int
- func (b *Block) Transactions() []*Transaction
- func (b *Block) TransactionsRoot() types.Root
- func (b *Block) Uncles() []types.Hash
- func (b *Block) UnmarshalJSON(input []byte) error
- func (b *Block) Withdrawals() ([]*Withdrawal, bool)
- func (b *Block) WithdrawalsRoot() (types.Root, bool)
- type CancunBlock
- type CancunTransactionReceipt
- type Fork
- type LondonBlock
- type LondonTransactionReceipt
- type ShanghaiBlock
- type Transaction
- func (t *Transaction) AccessList() []*AccessListEntry
- func (t *Transaction) BlobGasUsed() *uint32
- func (t *Transaction) BlobVersionedHashes() []types.VersionedHash
- func (t *Transaction) BlockHash() *types.Hash
- func (t *Transaction) BlockNumber() *uint32
- func (t *Transaction) From() types.Address
- func (t *Transaction) Gas() uint32
- func (t *Transaction) GasPrice() uint64
- func (t *Transaction) Hash() types.Hash
- func (t *Transaction) Input() []byte
- func (t *Transaction) MarshalJSON() ([]byte, error)
- func (t *Transaction) MaxFeePerBlobGas() uint64
- func (t *Transaction) MaxFeePerGas() uint64
- func (t *Transaction) MaxPriorityFeePerGas() uint64
- func (t *Transaction) Nonce() uint64
- func (t *Transaction) R() *big.Int
- func (t *Transaction) S() *big.Int
- func (t *Transaction) String() string
- func (t *Transaction) To() *types.Address
- func (t *Transaction) TransactionIndex() *uint32
- func (t *Transaction) UnmarshalJSON(input []byte) error
- func (t *Transaction) V() *big.Int
- func (t *Transaction) Value() *big.Int
- type TransactionReceipt
- func (t *TransactionReceipt) BlobGasPrice() *big.Int
- func (t *TransactionReceipt) BlobGasUsed() uint32
- func (t *TransactionReceipt) BlockHash() types.Hash
- func (t *TransactionReceipt) BlockNumber() uint32
- func (t *TransactionReceipt) ContractAddress() *types.Address
- func (t *TransactionReceipt) CumulativeGasUsed() uint32
- func (t *TransactionReceipt) EffectiveGasPrice() uint64
- func (t *TransactionReceipt) From() types.Address
- func (t *TransactionReceipt) GasUsed() uint32
- func (t *TransactionReceipt) Logs() []*BerlinTransactionEvent
- func (t *TransactionReceipt) LogsBloom() []byte
- func (t *TransactionReceipt) MarshalJSON() ([]byte, error)
- func (t *TransactionReceipt) Status() uint32
- func (t *TransactionReceipt) String() string
- func (t *TransactionReceipt) To() *types.Address
- func (t *TransactionReceipt) TransactionHash() types.Hash
- func (t *TransactionReceipt) TransactionIndex() uint32
- func (t *TransactionReceipt) Type() TransactionType
- func (t *TransactionReceipt) UnmarshalJSON(input []byte) error
- type TransactionSubmission
- type TransactionType
- type Type0Transaction
- type Type1Transaction
- type Type2Transaction
- type Type3Transaction
- type Withdrawal
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) 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.
type BerlinBlock ¶ added in v0.7.0
type BerlinBlock struct { 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 }
BerlinBlock contains a block after the Berlin hardfork.
func (*BerlinBlock) MarshalJSON ¶ added in v0.7.0
func (b *BerlinBlock) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*BerlinBlock) String ¶ added in v0.7.0
func (b *BerlinBlock) String() string
String returns a string version of the structure.
func (*BerlinBlock) UnmarshalJSON ¶ added in v0.7.0
func (b *BerlinBlock) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type BerlinTransactionEvent ¶ added in v0.7.0
type BerlinTransactionEvent struct { Address types.Address BlockHash types.Hash BlockNumber uint32 Data []byte Index uint32 Removed bool Topics []types.Hash TransactionHash types.Hash TransactionIndex uint32 }
BerlinTransactionEvent contains a transaction event.
func (*BerlinTransactionEvent) MarshalJSON ¶ added in v0.7.0
func (t *BerlinTransactionEvent) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*BerlinTransactionEvent) String ¶ added in v0.7.0
func (t *BerlinTransactionEvent) String() string
String returns a string version of the structure.
func (*BerlinTransactionEvent) UnmarshalJSON ¶ added in v0.7.0
func (t *BerlinTransactionEvent) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type BerlinTransactionReceipt ¶ added in v0.7.0
type BerlinTransactionReceipt struct { BlockHash types.Hash BlockNumber uint32 ContractAddress *types.Address CumulativeGasUsed uint32 From types.Address GasUsed uint32 Logs []*BerlinTransactionEvent LogsBloom []byte Status uint32 To *types.Address TransactionHash types.Hash TransactionIndex uint32 Type TransactionType }
BerlinTransactionReceipt contains a transaction receipt.
func (*BerlinTransactionReceipt) MarshalJSON ¶ added in v0.7.0
func (t *BerlinTransactionReceipt) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*BerlinTransactionReceipt) String ¶ added in v0.7.0
func (t *BerlinTransactionReceipt) String() string
String returns a string version of the structure.
func (*BerlinTransactionReceipt) UnmarshalJSON ¶ added in v0.7.0
func (t *BerlinTransactionReceipt) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Block ¶
type Block struct { Fork Fork Berlin *BerlinBlock London *LondonBlock Shanghai *ShanghaiBlock Cancun *CancunBlock }
Block is a struct that covers versioned blocks.
func (*Block) BaseFeePerGas ¶ added in v0.7.0
BaseFeePerGas returns the base fee per gas of the block. This value will be 0 if the block does not use base fee (e.g. pre-London).
func (*Block) BlobGasUsed ¶ added in v0.9.0
BlobGasUsed returns the blob gas used of the block. This is not available in all forks, so also returns a presence flag.
func (*Block) Difficulty ¶ added in v0.7.0
Difficulty returns the difficulty of the block.
func (*Block) ExcessBlobGas ¶ added in v0.9.0
ExcessBlobGas returns the excess blob gas of the block. This is not available in all forks, so also returns a presence flag.
func (*Block) FeeRecipient ¶ added in v0.7.0
FeeRecipient returns the fee recipient of the block. This will return the miner for pre-paris blocks.
func (*Block) MarshalJSON ¶ added in v0.7.0
MarshalJSON marshals a typed transaction.
func (*Block) Miner ¶ added in v0.7.0
Miner returns the miner of the block. This will return fee recipient for post-london blocks.
func (*Block) ParentBeaconBlockRoot ¶ added in v0.8.6
ParentBeaconBlockRoot returns the parent beacon block root of the block. This is not available in all forks, so also returns a presence flag.
func (*Block) ParentHash ¶ added in v0.7.0
ParentHash returns the parent hash of the block.
func (*Block) ReceiptsRoot ¶ added in v0.7.0
ReceiptsRoot returns the receipts root of the block.
func (*Block) SHA3Uncles ¶ added in v0.7.0
SHA3Uncles returns the SHA3 hash of the uncles of the block.
func (*Block) TotalDifficulty ¶ added in v0.7.0
TotalDifficulty returns the total difficulty of the block.
func (*Block) Transactions ¶ added in v0.7.0
func (b *Block) Transactions() []*Transaction
Transactions returns the transactions of the block.
func (*Block) TransactionsRoot ¶ added in v0.7.0
TransactionsRoot returns the transactions root of the block.
func (*Block) UnmarshalJSON ¶ added in v0.7.0
UnmarshalJSON implements json.Unmarshaler.
func (*Block) Withdrawals ¶ added in v0.8.5
func (b *Block) Withdrawals() ([]*Withdrawal, bool)
Withdrawals returns the withdrawals of the block. This is not available in all forks, so also returns a presence flag.
type CancunBlock ¶ added in v0.8.4
type CancunBlock struct { BaseFeePerGas uint64 BlobGasUsed uint64 Difficulty uint64 ExcessBlobGas uint64 ExtraData []byte GasLimit uint32 GasUsed uint32 Hash types.Hash LogsBloom []byte Miner types.Address MixHash types.Hash Nonce []byte Number uint32 ParentBeaconBlockRoot types.Root 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 Withdrawals []*Withdrawal WithdrawalsRoot types.Root }
CancunBlock contains a block after the Cancun hardfork.
func (*CancunBlock) MarshalJSON ¶ added in v0.8.4
func (b *CancunBlock) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*CancunBlock) String ¶ added in v0.8.4
func (b *CancunBlock) String() string
String returns a string version of the structure.
func (*CancunBlock) UnmarshalJSON ¶ added in v0.8.4
func (b *CancunBlock) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type CancunTransactionReceipt ¶ added in v0.9.0
type CancunTransactionReceipt struct { BlobGasPrice *big.Int BlobGasUsed uint32 BlockHash types.Hash BlockNumber uint32 ContractAddress *types.Address CumulativeGasUsed uint32 EffectiveGasPrice uint64 From types.Address GasUsed uint32 Logs []*BerlinTransactionEvent LogsBloom []byte Status uint32 To *types.Address TransactionHash types.Hash TransactionIndex uint32 Type TransactionType }
CancunTransactionReceipt contains a transaction receipt.
func (*CancunTransactionReceipt) MarshalJSON ¶ added in v0.9.0
func (t *CancunTransactionReceipt) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*CancunTransactionReceipt) String ¶ added in v0.9.0
func (t *CancunTransactionReceipt) String() string
String returns a string version of the structure.
func (*CancunTransactionReceipt) UnmarshalJSON ¶ added in v0.9.0
func (t *CancunTransactionReceipt) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Fork ¶ added in v0.7.0
type Fork int
Fork defines the fork version of a response.
func (*Fork) MarshalJSON ¶ added in v0.7.0
MarshalJSON implements json.Marshaler.
func (*Fork) UnmarshalJSON ¶ added in v0.7.0
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) String ¶ added in v0.7.0
func (b *LondonBlock) String() string
String returns a string version of the structure.
func (*LondonBlock) UnmarshalJSON ¶
func (b *LondonBlock) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type LondonTransactionReceipt ¶ added in v0.7.0
type LondonTransactionReceipt struct { BlockHash types.Hash BlockNumber uint32 ContractAddress *types.Address CumulativeGasUsed uint32 EffectiveGasPrice uint64 From types.Address GasUsed uint32 Logs []*BerlinTransactionEvent LogsBloom []byte Status uint32 To *types.Address TransactionHash types.Hash TransactionIndex uint32 Type TransactionType }
LondonTransactionReceipt contains a transaction receipt.
func (*LondonTransactionReceipt) MarshalJSON ¶ added in v0.7.0
func (t *LondonTransactionReceipt) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*LondonTransactionReceipt) String ¶ added in v0.7.0
func (t *LondonTransactionReceipt) String() string
String returns a string version of the structure.
func (*LondonTransactionReceipt) UnmarshalJSON ¶ added in v0.7.0
func (t *LondonTransactionReceipt) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ShanghaiBlock ¶ added in v0.7.7
type ShanghaiBlock 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 Withdrawals []*Withdrawal WithdrawalsRoot types.Root }
ShanghaiBlock contains a block after the Shanghai hardfork.
func (*ShanghaiBlock) MarshalJSON ¶ added in v0.7.7
func (b *ShanghaiBlock) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*ShanghaiBlock) String ¶ added in v0.7.7
func (b *ShanghaiBlock) String() string
String returns a string version of the structure.
func (*ShanghaiBlock) UnmarshalJSON ¶ added in v0.7.7
func (b *ShanghaiBlock) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Transaction ¶
type Transaction struct { Type TransactionType Type0Transaction *Type0Transaction Type1Transaction *Type1Transaction Type2Transaction *Type2Transaction Type3Transaction *Type3Transaction }
Transaction is a struct that covers all transaction types.
func (*Transaction) AccessList ¶ added in v0.4.0
func (t *Transaction) AccessList() []*AccessListEntry
AccessList returns the access list of the transaction. This value can be nil, if the transaction does not support access lists.
func (*Transaction) BlobGasUsed ¶ added in v0.9.0
func (t *Transaction) BlobGasUsed() *uint32
BlobGasUsed returns the blob gas used by the transaction. This value can be nil, if the transaction does not support this (e.g. type 0 transactions).
func (*Transaction) BlobVersionedHashes ¶ added in v0.9.0
func (t *Transaction) BlobVersionedHashes() []types.VersionedHash
BlobVersionedHashes returns the blob versioned hashes of the transaction. This value can be nil, if the transaction is not a blob transaction.
func (*Transaction) BlockHash ¶ added in v0.4.0
func (t *Transaction) BlockHash() *types.Hash
BlockHash returns the block hash of the transaction. This value can be nil, if the transaction is not included in a block.
func (*Transaction) BlockNumber ¶ added in v0.4.0
func (t *Transaction) BlockNumber() *uint32
BlockNumber returns the block number of the transaction. This value can be nil, if the transaction is not included in a block.
func (*Transaction) From ¶ added in v0.4.0
func (t *Transaction) From() types.Address
From returns the sender of the transaction.
func (*Transaction) Gas ¶ added in v0.4.0
func (t *Transaction) Gas() uint32
Gas returns the gas limit of the transaction.
func (*Transaction) GasPrice ¶ added in v0.4.0
func (t *Transaction) GasPrice() uint64
GasPrice returns the gas price of the transaction. This will be 0 for transactions that do not have an individual gas price, for example type 2 transactions.
func (*Transaction) Hash ¶ added in v0.4.0
func (t *Transaction) Hash() types.Hash
Hash returns the hash of the transaction.
func (*Transaction) Input ¶ added in v0.4.0
func (t *Transaction) Input() []byte
Input returns the input data of the transaction.
func (*Transaction) MarshalJSON ¶ added in v0.4.0
func (t *Transaction) MarshalJSON() ([]byte, error)
MarshalJSON marshals a typed transaction.
func (*Transaction) MaxFeePerBlobGas ¶ added in v0.9.0
func (t *Transaction) MaxFeePerBlobGas() uint64
MaxFeePerBlobGas returns the maximum fee per blob gas paid by the transaction. This value can be 0, if the transaction does not support this (e.g. type 0 transactions).
func (*Transaction) MaxFeePerGas ¶ added in v0.4.0
func (t *Transaction) MaxFeePerGas() uint64
MaxFeePerGas returns the maximum fee per gas paid by the transaction. This value can be 0, if the transaction does not support this (e.g. type 0 transactions).
func (*Transaction) MaxPriorityFeePerGas ¶ added in v0.4.0
func (t *Transaction) MaxPriorityFeePerGas() uint64
MaxPriorityFeePerGas returns the maximum priority fee per gas paid by the transaction. This value can be 0, if the transaction does not support this (e.g. type 0 transactions).
func (*Transaction) Nonce ¶ added in v0.4.0
func (t *Transaction) Nonce() uint64
Nonce returns the nonce of the transaction.
func (*Transaction) R ¶ added in v0.4.0
func (t *Transaction) R() *big.Int
R returns the R portion of the signature of the transaction.
func (*Transaction) S ¶ added in v0.4.0
func (t *Transaction) S() *big.Int
S returns the S portion of the signature of the transaction.
func (*Transaction) String ¶ added in v0.4.0
func (t *Transaction) String() string
String returns a string version of the structure.
func (*Transaction) To ¶ added in v0.4.0
func (t *Transaction) To() *types.Address
To returns the recipient of the transaction. This can be nil, for example on contract creation.
func (*Transaction) TransactionIndex ¶ added in v0.4.0
func (t *Transaction) TransactionIndex() *uint32
TransactionIndex returns the index of the transaction in its block. This value can be nil, if the transaction is not included in a block.
func (*Transaction) UnmarshalJSON ¶ added in v0.4.0
func (t *Transaction) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
func (*Transaction) V ¶ added in v0.4.0
func (t *Transaction) V() *big.Int
V returns the V portion of the signature of the transaction.
func (*Transaction) Value ¶ added in v0.4.0
func (t *Transaction) Value() *big.Int
Value returns the value of the transaction.
type TransactionReceipt ¶
type TransactionReceipt struct { Fork Fork BerlinTransactionReceipt *BerlinTransactionReceipt LondonTransactionReceipt *LondonTransactionReceipt CancunTransactionReceipt *CancunTransactionReceipt }
TransactionReceipt is a struct that covers all transaction receipt versions.
func (*TransactionReceipt) BlobGasPrice ¶ added in v0.9.0
func (t *TransactionReceipt) BlobGasPrice() *big.Int
BlobGasPrice returns the blob gas price of the transaction receipt.
func (*TransactionReceipt) BlobGasUsed ¶ added in v0.9.0
func (t *TransactionReceipt) BlobGasUsed() uint32
BlobGasUsed returns the blob gas used of the transaction receipt.
func (*TransactionReceipt) BlockHash ¶
func (t *TransactionReceipt) BlockHash() types.Hash
BlockHash returns the block hash of the transaction receipt.
func (*TransactionReceipt) BlockNumber ¶
func (t *TransactionReceipt) BlockNumber() uint32
BlockNumber returns the block number of the transaction receipt.
func (*TransactionReceipt) ContractAddress ¶
func (t *TransactionReceipt) ContractAddress() *types.Address
ContractAddress returns the contract address of the transaction receipt. This will be nil for transactions that did not create a contract.
func (*TransactionReceipt) CumulativeGasUsed ¶
func (t *TransactionReceipt) CumulativeGasUsed() uint32
CumulativeGasUsed returns the cumulative gas used in the block up to this receipt.
func (*TransactionReceipt) EffectiveGasPrice ¶ added in v0.7.0
func (t *TransactionReceipt) EffectiveGasPrice() uint64
EffectiveGasPrice returns the effective gas price of the transaction. This will return 0 for pre-London transactions.
func (*TransactionReceipt) From ¶
func (t *TransactionReceipt) From() types.Address
From returns the sender of the transaction receipt.
func (*TransactionReceipt) GasUsed ¶
func (t *TransactionReceipt) GasUsed() uint32
GasUsed returns the gas used by the transaction.
func (*TransactionReceipt) Logs ¶
func (t *TransactionReceipt) Logs() []*BerlinTransactionEvent
Logs returns the logs generated by the transaction.
func (*TransactionReceipt) LogsBloom ¶
func (t *TransactionReceipt) LogsBloom() []byte
LogsBloom returns the logs bloom generated by the transaction.
func (*TransactionReceipt) MarshalJSON ¶
func (t *TransactionReceipt) MarshalJSON() ([]byte, error)
MarshalJSON marshals a typed transaction.
func (*TransactionReceipt) Status ¶
func (t *TransactionReceipt) Status() uint32
Status returns the status returned by the transaction.
func (*TransactionReceipt) String ¶
func (t *TransactionReceipt) String() string
String returns a string version of the structure.
func (*TransactionReceipt) To ¶
func (t *TransactionReceipt) To() *types.Address
To returns the recipient of the transaction receipt. This value will be nil for contract creation.
func (*TransactionReceipt) TransactionHash ¶
func (t *TransactionReceipt) TransactionHash() types.Hash
TransactionHash returns the hash of the transaction.
func (*TransactionReceipt) TransactionIndex ¶
func (t *TransactionReceipt) TransactionIndex() uint32
TransactionIndex returns the index of the transaction in the block.
func (*TransactionReceipt) Type ¶
func (t *TransactionReceipt) Type() TransactionType
Type returns the type of the transaction in the block.
func (*TransactionReceipt) UnmarshalJSON ¶
func (t *TransactionReceipt) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type TransactionSubmission ¶ added in v0.8.9
type TransactionSubmission struct { Type TransactionType ChainID *big.Int From types.Address Nonce *uint64 To *types.Address Input []byte Gas *big.Int GasPrice *big.Int MaxFeePerGas *big.Int MaxPriorityFeePerGas *big.Int MaxFeePerBlobGas *big.Int Value *big.Int AccessList []*AccessListEntry BlobVersionedHashes []types.VersionedHash Blobs []types.Blob }
TransactionSubmission provides the partial details of a transaction to submit to the network.
type TransactionType ¶ added in v0.7.0
type TransactionType int
TransactionType defines the spec version of a transaction.
const ( // TransactionType0 is a legacy transaction. TransactionType0 TransactionType = iota // TransactionType1 is an access list transaction. TransactionType1 // TransactionType2 is an EIP-1559 transaction. TransactionType2 // TransactionType3 is a data blob transaction. TransactionType3 )
func (*TransactionType) MarshalJSON ¶ added in v0.7.0
func (d *TransactionType) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (TransactionType) String ¶ added in v0.7.0
func (d TransactionType) String() string
String returns a string representation of the item.
func (*TransactionType) UnmarshalJSON ¶ added in v0.7.0
func (d *TransactionType) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Type0Transaction ¶
type Type0Transaction struct { BlockHash *types.Hash BlockNumber *uint32 ChainID *big.Int From types.Address Gas uint32 GasPrice 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 }
Type0Transaction is the spec representation of a type 0 transaction.
func (*Type0Transaction) MarshalJSON ¶
func (t *Type0Transaction) MarshalJSON() ([]byte, error)
MarshalJSON marshals a type 0 transaction.
func (*Type0Transaction) MarshalRLP ¶ added in v0.7.0
func (t *Type0Transaction) MarshalRLP() ([]byte, error)
MarshalRLP returns an RLP representation of the transaction.
func (*Type0Transaction) String ¶
func (t *Type0Transaction) String() string
String returns a string version of the structure.
func (*Type0Transaction) UnmarshalJSON ¶
func (t *Type0Transaction) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Type1Transaction ¶
type Type1Transaction struct { AccessList []*AccessListEntry BlockHash *types.Hash BlockNumber *uint32 ChainID *big.Int From types.Address Gas uint32 GasPrice 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 }
Type1Transaction is the type 1 transaction.
func (*Type1Transaction) MarshalJSON ¶
func (t *Type1Transaction) MarshalJSON() ([]byte, error)
MarshalJSON marshals a type 1 transaction.
func (*Type1Transaction) MarshalRLP ¶ added in v0.7.0
func (t *Type1Transaction) MarshalRLP() ([]byte, error)
MarshalRLP returns an RLP representation of the transaction.
func (*Type1Transaction) String ¶
func (t *Type1Transaction) String() string
String returns a string version of the structure.
func (*Type1Transaction) UnmarshalJSON ¶
func (t *Type1Transaction) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Type2Transaction ¶
type Type2Transaction struct { AccessList []*AccessListEntry // BlockHash is only available for transactions included in a block, so optional. BlockHash *types.Hash // BlockNumber is only available for transactions included in a block, so optional. BlockNumber *uint32 ChainID *big.Int From types.Address Gas uint32 // GasPrice is only available for transactions included in a block, so optional. GasPrice *uint64 Hash types.Hash Input []byte MaxFeePerGas uint64 MaxPriorityFeePerGas uint64 Nonce uint64 R *big.Int S *big.Int To *types.Address // TransactionIndex is only available for transactions included in a block, so optional. TransactionIndex *uint32 V *big.Int Value *big.Int }
Type2Transaction is a London type 2 transaction.
func (*Type2Transaction) MarshalJSON ¶
func (t *Type2Transaction) MarshalJSON() ([]byte, error)
MarshalJSON marshals a type 2 transaction.
func (*Type2Transaction) MarshalRLP ¶ added in v0.7.0
func (t *Type2Transaction) MarshalRLP() ([]byte, error)
MarshalRLP returns an RLP representation of the transaction.
func (*Type2Transaction) String ¶
func (t *Type2Transaction) String() string
String returns a string version of the structure.
func (*Type2Transaction) UnmarshalJSON ¶
func (t *Type2Transaction) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Type3Transaction ¶ added in v0.8.4
type Type3Transaction struct { AccessList []*AccessListEntry // BlobGasPrice is only available for transactions included in a block, so optional. BlobGasPrice *big.Int // BlobGasUsed is only available for transactions included in a block, so optional. BlobGasUsed *uint32 BlobVersionedHashes []types.VersionedHash // BlockHash is only available for transactions included in a block, so optional. BlockHash *types.Hash // BlockNumber is only available for transactions included in a block, so optional. BlockNumber *uint32 ChainID *big.Int From types.Address Gas uint32 // GasPrice is only available for transactions included in a block, so optional. GasPrice *uint64 Hash types.Hash Input []byte MaxFeePerBlobGas uint64 MaxFeePerGas uint64 MaxPriorityFeePerGas uint64 Nonce uint64 R *big.Int S *big.Int To *types.Address // TransactionIndex is only available for transactions included in a block, so optional. TransactionIndex *uint32 V *big.Int Value *big.Int }
Type3Transaction is a Cancun type 3 transaction.
func (*Type3Transaction) MarshalJSON ¶ added in v0.8.4
func (t *Type3Transaction) MarshalJSON() ([]byte, error)
MarshalJSON marshals a type 3 transaction.
func (*Type3Transaction) MarshalRLP ¶ added in v0.8.4
func (t *Type3Transaction) MarshalRLP() ([]byte, error)
MarshalRLP returns an RLP representation of the transaction.
func (*Type3Transaction) String ¶ added in v0.8.4
func (t *Type3Transaction) String() string
String returns a string version of the structure.
func (*Type3Transaction) UnmarshalJSON ¶ added in v0.8.4
func (t *Type3Transaction) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Withdrawal ¶ added in v0.7.7
Withdrawal is the spec representation of a withdrawal.
func (*Withdrawal) MarshalJSON ¶ added in v0.7.7
func (w *Withdrawal) MarshalJSON() ([]byte, error)
MarshalJSON marshals a type 0 transaction.
func (*Withdrawal) String ¶ added in v0.7.7
func (w *Withdrawal) String() string
String returns a string version of the structure.
func (*Withdrawal) UnmarshalJSON ¶ added in v0.7.7
func (w *Withdrawal) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
Source Files ¶
- accesslistentry.go
- berlinblock.go
- berlintransactionevent.go
- berlintransactionreceipt.go
- block.go
- cancunblock.go
- cancuntransactionreceipt.go
- fork.go
- londonblock.go
- londontransactionreceipt.go
- shanghaiblock.go
- transaction.go
- transactionreceipt.go
- transactionsubmission.go
- transactiontype.go
- type0transaction.go
- type1transaction.go
- type2transaction.go
- type3transaction.go
- withdrawal.go