Documentation
¶
Overview ¶
Package types provides type aliases to ethereum types This ensures compatibility with ethereum interfaces while allowing our own extensions
Index ¶
- Constants
- Variables
- type AccessList
- type AccessListTx
- type AccessTuple
- type Account
- type BlobTx
- type BlobTxSidecar
- type Block
- type BlockNonce
- type Bloom
- type Body
- type DerivableList
- type DynamicFeeTx
- type EIP155Signer
- type FrontierSigner
- type FullAccount
- type GenesisAccount
- type GenesisAlloc
- type GenesisMultiCoinBalance
- type Header
- type HomesteadSigner
- type LegacyTx
- type Log
- type Receipt
- type ReceiptForStorage
- type Receipts
- type Signer
- type StateAccount
- type Transaction
- type Transactions
- type TxByNonce
- type TxData
- type Withdrawal
- type Withdrawals
Constants ¶
const ( // Transaction types LegacyTxType = ethtypes.LegacyTxType AccessListTxType = ethtypes.AccessListTxType DynamicFeeTxType = ethtypes.DynamicFeeTxType BlobTxType = ethtypes.BlobTxType // Receipt status ReceiptStatusFailed = ethtypes.ReceiptStatusFailed ReceiptStatusSuccessful = ethtypes.ReceiptStatusSuccessful )
Constants
const ( BloomBitLength = ethtypes.BloomBitLength BloomByteLength = ethtypes.BloomByteLength )
Constants for bloom filters
Variables ¶
var ( // Hashes EmptyRootHash = ethtypes.EmptyRootHash EmptyCodeHash = ethtypes.EmptyCodeHash EmptyTxsHash = ethtypes.EmptyTxsHash EmptyReceiptsHash = ethtypes.EmptyReceiptsHash EmptyWithdrawalsHash = ethtypes.EmptyWithdrawalsHash // Errors ErrInvalidSig = ethtypes.ErrInvalidSig ErrUnexpectedProtection = ethtypes.ErrUnexpectedProtection ErrInvalidTxType = ethtypes.ErrInvalidTxType ErrTxTypeNotSupported = ethtypes.ErrTxTypeNotSupported ErrGasFeeCapTooLow = ethtypes.ErrGasFeeCapTooLow ErrInvalidChainId = ethtypes.ErrInvalidChainId )
Variables
var ( // Transaction creation NewTx = ethtypes.NewTx NewTransaction = ethtypes.NewTransaction NewContractCreation = ethtypes.NewContractCreation // Signing SignTx = ethtypes.SignTx SignNewTx = ethtypes.SignNewTx MustSignNewTx = ethtypes.MustSignNewTx Sender = ethtypes.Sender LatestSigner = ethtypes.LatestSigner LatestSignerForChainID = ethtypes.LatestSignerForChainID NewEIP155Signer = ethtypes.NewEIP155Signer NewLondonSigner = ethtypes.NewLondonSigner NewCancunSigner = ethtypes.NewCancunSigner MakeSigner = ethtypes.MakeSigner // Block functions CalcUncleHash = ethtypes.CalcUncleHash DeriveSha = ethtypes.DeriveSha NewBlockWithHeader = ethtypes.NewBlockWithHeader )
Functions
var (
NewEmptyStateAccount = ethtypes.NewEmptyStateAccount
)
Functions for accounts
Functions ¶
This section is empty.
Types ¶
type AccessListTx ¶
type AccessListTx = ethtypes.AccessListTx
Core types - direct aliases to ethereum types
type AccessTuple ¶
type AccessTuple = ethtypes.AccessTuple
Core types - direct aliases to ethereum types
type Account ¶
type Account struct {
Code []byte `json:"code,omitempty"`
Storage map[common.Hash]common.Hash `json:"storage,omitempty"`
Balance *big.Int `json:"balance" gencodec:"required"`
Nonce uint64 `json:"nonce,omitempty"`
// used in tests
PrivateKey []byte `json:"secretKey,omitempty"`
}
Account represents an Ethereum account and its attached data. This type is used to specify accounts in the genesis block state, and is also useful for JSON encoding/decoding of accounts.
type BlobTxSidecar ¶
type BlobTxSidecar = ethtypes.BlobTxSidecar
Core types - direct aliases to ethereum types
type Block ¶
Block types
func BlockWithExtData ¶ added in v0.15.20
BlockWithExtData adds extended data to a block This is a helper function since we can't add methods to the aliased Block type
func NewBlockWithExtData ¶ added in v0.15.4
func NewBlockWithExtData(header *Header, txs []*Transaction, uncles []*Header, receipts []*Receipt, version uint32, extData []byte, commit bool) *Block
NewBlockWithExtData creates a new block with extended data This is a Lux-specific function that maintains compatibility
type BlockNonce ¶
type BlockNonce = ethtypes.BlockNonce
Body is defined in block_ext.go as ExtendedBody
type Body ¶
type Body struct {
Transactions []*Transaction
Uncles []*Header
Version uint32
ExtData []byte
}
Body represents a block body with Lux extensions
type DynamicFeeTx ¶
type DynamicFeeTx = ethtypes.DynamicFeeTx
Core types - direct aliases to ethereum types
type EIP155Signer ¶
type EIP155Signer = ethtypes.EIP155Signer
Core types - direct aliases to ethereum types
type FrontierSigner ¶
type FrontierSigner = ethtypes.FrontierSigner
Additional aliases for missing types
type GenesisAccount ¶ added in v0.15.4
type GenesisAccount struct {
Code []byte `json:"code,omitempty"`
Storage map[common.Hash]common.Hash `json:"storage,omitempty"`
Balance *big.Int `json:"balance" gencodec:"required"`
MCBalance GenesisMultiCoinBalance `json:"mcbalance,omitempty"`
Nonce uint64 `json:"nonce,omitempty"`
PrivateKey []byte `json:"secretKey,omitempty"` // for tests
}
GenesisAccount is an account in the state of the genesis block.
type GenesisAlloc ¶
type GenesisAlloc map[common.Address]GenesisAccount
GenesisAlloc specifies the initial state of a genesis block.
func (*GenesisAlloc) UnmarshalJSON ¶
func (ga *GenesisAlloc) UnmarshalJSON(data []byte) error
type GenesisMultiCoinBalance ¶ added in v0.15.4
type HomesteadSigner ¶
type HomesteadSigner = ethtypes.HomesteadSigner
Additional aliases for missing types
type ReceiptForStorage ¶
type ReceiptForStorage = ethtypes.ReceiptForStorage
Additional aliases for missing types
type Transactions ¶
type Transactions = ethtypes.Transactions
Core types - direct aliases to ethereum types
type Withdrawal ¶
type Withdrawal = ethtypes.Withdrawal
Core types - direct aliases to ethereum types
type Withdrawals ¶
type Withdrawals = ethtypes.Withdrawals
Core types - direct aliases to ethereum types