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 22 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.

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
crates/dyn-abi/src/dynamic/call.rs Outdated Show resolved Hide resolved
);
}
// #[test]
// fn decode_solidity_no_interface() {
Copy link
Member

Choose a reason for hiding this comment

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

as you can see here not all the validations are correct as we're rejecting valid inputs; this needs a bit more investigation

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: Ready for Review
Development

Successfully merging this pull request may close these issues.

2 participants