You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Over all I really like the ergonomics of using the sol! macro! 👏
The only thing that currently seems odd is that the return type is a struct instead of a tuple.
So specifically this code:
alloy_sol_types::sol! {
function example() external returns (uint256, uint256);
}
Shortly after opening the issue I noticed that you already support named function arguments and return tuple fields so this is less of an issue for me now.
But supporting tuples would still be cool.
Component
sol! macro
Describe the feature you would like
Over all I really like the ergonomics of using the
sol!
macro! 👏The only thing that currently seems odd is that the return type is a struct instead of a tuple.
So specifically this code:
Roughly results in this return type:
whereas a return type like this seems more natural to use:
Maybe having the type as a struct is nicer for the internal library code. But in that case at least having a function like
into_tuple()
would be nice.Additional context
For context I wanted to have a generic function like this which should immediately return the tuple instead of the struct:
The text was updated successfully, but these errors were encountered: