alloy-rs / core

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

feat(sol-macro): add return value names to simple getters #648

Closed DaniPopes closed 3 months ago

DaniPopes commented 3 months ago

Example:

sol! {
    contract Counter {
        uint256 public number;
    }
}

// Before:
Counter::numberReturn { _0: U256 }
// After:
Counter::numberReturn { number: U256 }

See the added test

DaniPopes commented 3 months ago

This mismatches Solc-emitted ABI because it does not populate return names