Repository navigation
Fix validation uint int sizes - #6434
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 4.x #6434 +/- ##
=======================================
Coverage 89.67% 89.67%
=======================================
Files 214 215 +1
Lines 8222 8234 +12
Branches 2223 2224 +1
=======================================
+ Hits 7373 7384 +11
- Misses 849 850 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
avkos
left a comment
There was a problem hiding this comment.
LGTM. Thanks for your contribution
|
Same in this PR , update is required to fix Conflicting file, I'll merge PR after it, Thanks |
584d31d to
0e76199
Compare
0e76199 to
47004c7
Compare
…t is not a power of 2
… Zod 'check' function is undefined (due to unsupported type)
47004c7 to
d408325
Compare
Checking |
|
is the solution to use an older version of web3js? |
|
Hey there im looking into an issue. @fullkomnun theres an inconsistent integration test failing in the pipelines and i think it stems from the last PR you pushed. The abi and the testcase that is failing. any ideas? |
jdevcs
left a comment
There was a problem hiding this comment.
codecov/patch Failing after 1s — 66.66% of diff hit (target 89.88%)
|
@luu-alex update, it seems to be an eventslog issue. not related to PR |
|
Muhammad-Altabba
left a comment
There was a problem hiding this comment.
Looks good, thanks,
I just have suggestions for the error string...
|
Any news about this PR? |
|
@ngmachado will be merged in today |
Description
Previously an ABI that contained a numeric type (int/uint) of size that is not a power of 2 (such as uint40, int24) would result in the validator / check function being set on Zod as undefined and lead to a cryptic TypeError during validation.
I have setup validators for all valid numeric type sizes ([u]int8, [u]int 16, ... , [u]int256) and throw an error right away if during conversion of JSON scheme to Zod an unsupported type is encountered.
Generated 'single parameter' ABI test cases for all valid sizes.
Type of change
Checklist:
npm run lintwith success and extended the tests and types if necessary.npm run test:unitwith success.npm run test:coverageand my test cases cover all the lines and branches of the added code.npm run buildand testeddist/web3.min.jsin a browser.CHANGELOG.mdfile in the root folder.