alloy-rs / core

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

feat(sol-types): implement traits for longer tuples #699

Closed MatheoGrivault closed 1 month ago

MatheoGrivault commented 1 month ago

Motivation

Currently, sol-types traits are implemented for tuples up to 24 elements long, this prevents generating long structs using the sol! macro.

Solution

Added lines inside the all_the_tuples! macro to support up to 60 elements.

PR Checklist

MatheoGrivault commented 1 month ago

a contract I'm using has a struct with 54 fields, that's why I had to go that high

mattsse commented 1 month ago

I see, I'm fine with 60

wdyt @DaniPopes

mattsse commented 1 month ago

doesn't hurt really besides compile time