Skip to content

Conversation

@phrwlk
Copy link
Contributor

@phrwlk phrwlk commented Nov 25, 2025

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

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use crate docs here

@mattsse mattsse closed this Dec 2, 2025
@github-project-automation github-project-automation bot moved this to Done in Alloy Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants