Skip to content

Fix/cast abi strict args #11189

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

Merged
merged 8 commits into from
Aug 21, 2025

Conversation

simon0820s
Copy link
Contributor

@simon0820s simon0820s commented Aug 1, 2025

Motivation

Fixes #5053

Solution

Add validation that arguments exactly match parameters before encode arguments and add tests for this validation.

PR Checklist

  • [✅] Added Tests
  • [✅] Added Documentation
  • [❌] Breaking changes

@zerosnacks
Copy link
Member

Hi @simon0820s thanks for your PR!

Glad to see #5053 being fixed, the current behavior of silently accepting additional arguments can be a footgun

Some small notes

@simon0820s
Copy link
Contributor Author

Thanks, i will fix that

@simon0820s simon0820s force-pushed the fix/cast-abi-strict-args branch from 9e59b62 to b3e7938 Compare August 11, 2025 00:37
Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@DaniPopes DaniPopes enabled auto-merge (squash) August 21, 2025 11:15
@DaniPopes DaniPopes merged commit e1d12ce into foundry-rs:master Aug 21, 2025
22 checks passed
@github-project-automation github-project-automation bot moved this to Done in Foundry Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

abi-encode and calldata accept redundant arguments
4 participants