alloy-rs / core

High-performance, well-tested & documented core libraries for Ethereum, in Rust
https://alloy.rs
Apache License 2.0
764 stars 139 forks source link

refactor: break SolInput to its own crate #578

Closed prestwich closed 6 months ago

prestwich commented 6 months ago

Motivation

Closes #567

Decompose sol! macro and allow reuse of input across multiple expanders

Solution

followup #579

PR Checklist

prestwich commented 6 months ago

I don't have enough context for why this is beneficial, but it sounds reasonable to me

incremental progress towards reusing the same input for multiple procmacros. Basically, this would allow us to ingest the input (solidity + #[...] attributes) once, handle re-names and other attributes that modify the input, and then run it through multiple expanders

i.e. We could separate the sol interface macro expansion logic, from the rpc bindings macro expansion logic, and then compose those expanders. Much cleaner macro architecture, long-term.