Crate serde_helpers
Expand description
§alloy-serde
Serde related helpers for Alloy.
Modules§
- displayfromstr
- Serde functions for (de)serializing using FromStr and Display
- quantity
- Serde functions for encoding primitive numbers using the Ethereum JSON-RPC “quantity” format.
- storage
- Storage related helpers.
- ttd
- Json U256 serde helpers.
Structs§
- Other
Fields - Generic type for capturing additional fields when deserializing structs.
- With
Other Fields - An extension to a struct that allows to capture additional fields when deserializing.
Enums§
- Json
Storage Key - A storage key type that can be serialized to and from a hex string up to 32 bytes. Used for
eth_getStorageAt
andeth_getProof
RPCs.
Functions§
- deserialize_
json_ ttd_ opt - Supports parsing the TTD as an
Option<u64>
, orOption<f64>
specifically for the mainnet TTD (5.875e22). - null_
as_ default - For use with serde’s
deserialize_with
on a sequence that must be deserialized as a single but optional (i.e. possiblynull
) value. - reject_
if_ some - For use with serde’s
deserialize_with
on a field that must be missing. - serialize_
b256_ hex_ string_ no_ prefix - Serialize a B256 as a hex string without the “0x” prefix.
- serialize_
hex_ string_ no_ prefix - Serialize a byte vec as a hex string without the “0x” prefix.