Overview
Core Lane provides fundamental data structures for accounts, transactions, and receipts. These types form the foundation of state management and transaction processing.CoreLaneAccount
Represents a Core Lane account with balance and nonce tracking. Location:src/account.rs:8
Structure
Methods
Creates a new account with zero balance and nonce.
Creates a new account with the specified balance and zero nonce.Parameters:
balance: Initial balance for the account
Increments the account nonce by 1. Returns an error if nonce would overflow.
Adds the specified amount to the account balance.Parameters:
amount: Amount to add to the balance
Subtracts the specified amount from the account balance.Parameters:
amount: Amount to subtract from the balance
Example
TransactionReceipt
Receipt generated after transaction execution. Location:src/state.rs:32
Structure
Fields
Hash of the executed transaction
Block number where transaction was included
Address that sent the transaction
Recipient address (None for contract creation)
Transaction execution status (“1” for success, “0” for failure)
Event logs emitted during execution
Log
Event log emitted during transaction execution. Location:src/state.rs:14
Structure
StoredTransaction
Transaction stored in state with metadata. Location:src/state.rs:49
Structure
Fields
Decoded transaction envelope (Legacy, EIP-1559, EIP-2930, or EIP-4844)
Raw transaction bytes for hash calculation
Block number where transaction was included
CoreLaneStateForLib
Simplified state context for external applications. Location:src/lib.rs:84
Structure
Methods
Replaces the internal state manager with a new one. Useful when applying changes to a StateManager.
Example
Re-exported Types
The following types are re-exported from external crates for convenience:From alloy_primitives
Address- Ethereum address (20 bytes)Bytes- Dynamic byte arrayB256- 256-bit hashU256- 256-bit unsigned integer
From alloy_consensus
TxEnvelope- Transaction envelope supporting Legacy, EIP-1559, EIP-2930, and EIP-4844 transactions