Skip to content
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

fix(json-abi): fallback to tuple types for nested params in to_sol #354

Merged
merged 2 commits into from
Oct 9, 2023

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Oct 9, 2023

Motivation

Fixes #349

Solution

When the param type is tuple or tuple[N?]..., emit a tuple type (T, U, V, ...) instead of just the word "tuple" which trips up syn-solidity.

This can only happen in Solc 0.4.X ABI.

This is not actually valid Solidity, but it works in sol! and with other more lenient parser like in forge fmt.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@DaniPopes DaniPopes changed the title fix(json-abi): emit inline tuple types for params in to_sol fix(json-abi): fallback to tuple types for nested params in to_sol Oct 9, 2023
@DaniPopes DaniPopes merged commit 23bffbf into main Oct 9, 2023
20 checks passed
@DaniPopes DaniPopes deleted the dani/json-tuple-types branch October 9, 2023 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Expected Parenthesizes
1 participant