Skip to content

Commit

Permalink
🐛 Fix: Validate params bugs (#1197)
Browse files Browse the repository at this point in the history
## Description

_Concise description of proposed changes_

## Testing

Explain the quality checks that have been done on the code changes

## Additional Information

- [ ] I read the [contributing docs](../docs/contributing.md) (if this
is your first contribution)

Your ENS/address:



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Resolved parameter validation issues in `tevmCall` and related
methods, ensuring nested structures like arrays are validated correctly.

- **Documentation**
- Added detailed documentation and examples for various parameters in
`BaseCallParams` to improve clarity and usability.

- **Tests**
- Introduced new test cases for validating base call parameters to
ensure correctness.

- **Refactor**
- Updated validation constraints for `gasRefund`, `gas`, `value`, and
`depth` parameters to ensure they are positive values.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: William Cory <[email protected]>
  • Loading branch information
roninjin10 and William Cory authored Jun 13, 2024
1 parent c58a6e5 commit fbf5192
Show file tree
Hide file tree
Showing 16 changed files with 571 additions and 293 deletions.
5 changes: 5 additions & 0 deletions .changeset/mighty-pans-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tevm/actions": patch
---

Fixed bug where tevmCall and related methods would improperly validate params such as depth and value. Previously it would not throw a validation error if these numbers are negative
5 changes: 5 additions & 0 deletions .changeset/proud-pugs-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tevm/actions": patch
---

Fixed bug where validation errors of nested structures like arrays would sometimes get swallowed by tevmCall and related methods

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion packages/actions/docs/functions/validateBaseCallParams.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fbf5192

Please sign in to comment.