Expand description
§HyperSync Format
Core data types and serialization formats for the HyperSync protocol.
This crate provides the fundamental data structures used to represent blockchain data in a standardized format, including blocks, transactions, logs, and traces.
§Features
- Standard blockchain types: Comprehensive data structures for Ethereum-compatible chains
- Efficient serialization: Optimized JSON and binary serialization
- Type safety: Strong typing for addresses, hashes, and numeric values
- Hex encoding: Automatic handling of hexadecimal encoding/decoding
§Key Types
Block- Complete block data including header and bodyTransaction- Transaction data with all fieldsLog- Event log from contract executionTrace- Execution trace informationAddress- 20-byte Ethereum address- [
Hash] - 32-byte cryptographic hash Hex- Wrapper for hexadecimal data
§Example
use hypersync_format::{Address, Hash};
// Parse an Ethereum address
let addr: Address = "0x742d35Cc6634C0532925a3b8D400ACDCD5C94C33".parse()?;
println!("Address: {}", addr);
// Create a hash from hex string
let hash: Hash = "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef".parse()?;
println!("Hash: {}", hash);Structs§
- Access
List - Evm access list object
- Authorization
- Evm transaction authorization object
- Block
- Evm block object
- Block
Header - Evm block header object
- Data
- Debug
Block Trace - Debug
TxTrace - Filter
Wrapper - Fixed
Size Data - Log
- Evm log object
- Quantity
- Trace
- Evm trace object (parity style, returned from trace_block request on RPC)
- Trace
Action - Action object inside trace object (parity style, returned from trace_block request on RPC)
- Trace
Result - Result object inside trace object (parity style, returned from trace_block request on RPC)
- Transaction
- Evm transaction object
- Transaction
Receipt - Evm transaction receipt object
- Transaction
Type - UInt
- Withdrawal
- Evm withdrawal object
Enums§
Traits§
Type Aliases§
- Address
- EVM address is 20 bytes of data
- Block
Number - Bloom
Filter - Hash
- EVM hash is 32 bytes of data
- LogArgument
- EVM log argument is 32 bytes of data
- LogIndex
- Nonce
- EVM nonce is 8 bytes of data
- Result
- Transaction
Index