Documentation
¶
Overview ¶
Package ethtypes provides a collection of common Ethereum types implemented in Go. These types are essential for building various tools and modules within the Ethereum ecosystem. The library aims to standardize and simplify the development process by offering a consistent set of types that can be reused across different projects.
Index ¶
- Constants
- Variables
- type AccessListEntry
- type Address
- type Block
- type Bloom
- type Hash
- type Header
- type Log
- type Nonce
- type Transaction
- func (t *Transaction) Cost() *big.Int
- func (t *Transaction) GetAccessList() []*AccessListEntry
- func (t *Transaction) GetChainID() uint64
- func (t *Transaction) GetData() []byte
- func (t *Transaction) GetGas() uint64
- func (t *Transaction) GetGasPrice() *big.Int
- func (t *Transaction) GetHash() Hash
- func (t *Transaction) GetMaxFeePerGas() *big.Int
- func (t *Transaction) GetMaxPriorityFeePerGas() *big.Int
- func (t *Transaction) GetNonce() uint64
- func (t *Transaction) GetSigValues() (v, r, s *big.Int)
- func (t *Transaction) GetTo() Address
- func (t *Transaction) GetType() byte
- func (t *Transaction) GetValue() *big.Int
- type TransactionData
Constants ¶
const ( TransactionLegacy = iota Transaction1559 Transaction2930 )
Variables ¶
var ZeroAddress = Address{}
ZeroAddress represents a placeholder address value that contains all zero bytes
var ZeroHash = Hash{}
ZeroHash represents a placeholder hash value that contains all zero bytes
Functions ¶
This section is empty.
Types ¶
type AccessListEntry ¶
type Address ¶
type Address [addressSize]byte
func BytesToAddress ¶
BytesToAddress converts the specified address bytes into an Address representation (20B)
func StringToAddress ¶
StringToAddress converts the specified address string into an Address representation
type Hash ¶
type Hash [hashSize]byte
func BytesToHash ¶
BytesToHash converts the specified hash bytes into a Hash representation (32B)
func StringToHash ¶
StringToHash converts the specified hash string into a Hash representation
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Cost ¶
func (t *Transaction) Cost() *big.Int
func (*Transaction) GetAccessList ¶
func (t *Transaction) GetAccessList() []*AccessListEntry
func (*Transaction) GetChainID ¶
func (t *Transaction) GetChainID() uint64
func (*Transaction) GetData ¶
func (t *Transaction) GetData() []byte
func (*Transaction) GetGas ¶
func (t *Transaction) GetGas() uint64
func (*Transaction) GetGasPrice ¶
func (t *Transaction) GetGasPrice() *big.Int
func (*Transaction) GetHash ¶
func (t *Transaction) GetHash() Hash
func (*Transaction) GetMaxFeePerGas ¶
func (t *Transaction) GetMaxFeePerGas() *big.Int
func (*Transaction) GetMaxPriorityFeePerGas ¶
func (t *Transaction) GetMaxPriorityFeePerGas() *big.Int
func (*Transaction) GetNonce ¶
func (t *Transaction) GetNonce() uint64
func (*Transaction) GetSigValues ¶
func (t *Transaction) GetSigValues() (v, r, s *big.Int)
func (*Transaction) GetTo ¶
func (t *Transaction) GetTo() Address
GetTo returns the To address of the transaction. If none is set (ex. contract deployment), it returns ZeroAddress
func (*Transaction) GetType ¶
func (t *Transaction) GetType() byte
func (*Transaction) GetValue ¶
func (t *Transaction) GetValue() *big.Int
type TransactionData ¶
type TransactionData interface {
// contains filtered or unexported methods
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package hex provides the common hex manipulation functionality.
|
Package hex provides the common hex manipulation functionality. |
|
Package keccak provides a utility wrapper for the sha256 legacy keccak implementation.
|
Package keccak provides a utility wrapper for the sha256 legacy keccak implementation. |