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

feat(sol-types)!: rm validate: bool #863

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open

Conversation

yash-atreya
Copy link
Member

@yash-atreya yash-atreya commented Jan 31, 2025

Motivation

Currently, in abi_decode_* methods of sol type traits (SolEnum, SolType, SolValue, SolCall, SolInterface, SolEvents), we expose a validate: bool arg to bypass type-checking while decoding.

Some validations are incorrect, as they reject valid ABI data that exists in the wild. For example:

Solution

  • Remove the validate: bool from abi_decode_* fns of various sol type traits.
  • Skips type validation while decoding, meaning that the validate flag has been set to false by default now.
  • Address the consequent breaking changes in the sol! expansions.
  • Fix tests.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@yash-atreya yash-atreya changed the title Yash/rm validate bool feat(sol-types): rm validate: bool Jan 31, 2025
@yash-atreya yash-atreya marked this pull request as draft January 31, 2025 06:57
@yash-atreya yash-atreya marked this pull request as ready for review February 3, 2025 16:39
@yash-atreya yash-atreya added the enhancement New feature or request label Feb 3, 2025
@DaniPopes DaniPopes changed the title feat(sol-types): rm validate: bool feat(sol-types)!: rm validate: bool Feb 10, 2025
@DaniPopes DaniPopes changed the title feat(sol-types)!: rm validate: bool feat(sol-types)!: rm validate: bool Feb 10, 2025
Co-authored-by: DaniPopes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking enhancement New feature or request
Projects
Status: Reviewed
Development

Successfully merging this pull request may close these issues.

2 participants