docs(tx-macros): document TransactionEnvelope derive, attributes, and features #3249
+161
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change fills the previously empty crates/tx-macros/README.md, which is included as crate-level documentation via #![doc = include_str!("../README.md")] in crates/tx-macros/src/lib.rs. The README now precisely documents the TransactionEnvelope derive macro based strictly on the current implementation in src/lib.rs, src/parse.rs, and src/expand.rs. It explains when to use the macro, enum-only and single-field variant requirements, container attributes (tx_type_name, alloy_consensus, typed, serde_cfg, arbitrary_cfg), variant attributes (ty, flatten, and optional per-variant typed), and the generated items including the ...Type enum and implementations of Transaction, Typed2718, Encodable2718, and Decodable2718. It also details serde tagging behavior for EIP‑2718 type IDs (lowercase hex with accepted aliases), provides minimal usage examples, notes path override behavior for alloy_consensus, and includes troubleshooting for common compile-time errors. This is a documentation-only change that aligns with the existing code paths and feature flags