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: format abi item fallback formatting #259

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

KedziaPawel
Copy link
Contributor

@KedziaPawel KedziaPawel commented Dec 2, 2024

fixes #253

As in the issue description, there were changes in the #229 for parseAbiItem, but there wasn't a corresponding change made for the formatAbiItem. This PR fixes that.

Also, I spotted that FallbackSignature type was only accepting fallback() external, and not fallback() external payable, which it should have, so I fixed that as it was a change related to the issue.


PR-Codex overview

This PR focuses on enhancing the formatting of fallback functions in the formatAbiItem utility, ensuring that the output accurately reflects the stateMutability of the ABI items.

Detailed summary

  • Updated expected values in tests to include external for fallback functions.
  • Modified the formatAbiItem function to return fallback() external and fallback() external payable based on stateMutability.
  • Added type checks to ensure correct formatting in TypeScript tests.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

changeset-bot bot commented Dec 2, 2024

🦋 Changeset detected

Latest commit: 7bc14de

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
abitype Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Dec 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
abitype ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 6:38pm

@Raiden1411
Copy link
Collaborator

Looks good to me but @tmm should have the final say on this

@tmm tmm force-pushed the main branch 2 times, most recently from 59ae8ba to e5cdc14 Compare December 3, 2024 18:18
@tmm tmm merged commit f417a23 into wevm:main Dec 3, 2024
17 checks passed
@github-actions github-actions bot mentioned this pull request Dec 3, 2024
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.85%. Comparing base (ee60e67) to head (7bc14de).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #259   +/-   ##
=======================================
  Coverage   99.85%   99.85%           
=======================================
  Files          26       26           
  Lines        6103     6108    +5     
  Branches      186      188    +2     
=======================================
+ Hits         6094     6099    +5     
  Misses          8        8           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

parseAbi fails when the human readable ABI contains a fallback() function
3 participants