-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggestion] Improve API around (single) unnamed return values #580
Comments
having an unwrapped return type would be more convenient, |
we can, but it breaks encoding symmetry for any case where (T,) and T have different abi encodings, which would need to be accounted for |
We deemed the current API consistent and good enough. This change would require some specific workarounds and maybe hard to do in the current type system. If you want return types to have a "nicer name" in functions, you can name them in the The example in the issue already has a named return value due to it being an elementary type getter: core/crates/sol-types/tests/macros/sol/mod.rs Lines 242 to 255 in b4ca4fe
|
Component
contract
Describe the feature you would like
Follow up from conversation: alloy-rs/examples#8 (comment)
Consider the following:
Where Counter is implemented as follows:
It would be preferable to either:
let ret = contract.number().call().await?;
)_0
into a user defined valueAdditional context
Any changes will be reflected in
alloy/examples
The text was updated successfully, but these errors were encountered: