-
Notifications
You must be signed in to change notification settings - Fork 83
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
Added Test Cases per Zellic audit questions #138
Added Test Cases per Zellic audit questions #138
Conversation
SMA-143 Add length related checks to ERC20 SVM
> - In the ERC20SessionValidationModule, within the validateSessionUserOp function, should there be a check for the minimum length of _op.callData and a maximum length not exceeding 4 + offset + 32 + length? I suppose, that the minimum length check is being done implicitly. if it is less then 4 bytes, the selector check will revert if it is less than 68 bytes, decoding tokenAddr and callValue will fail. But you're right, that we maybe should add a test case to check that it definitely fails. For the maximum length check, do you mean the case when the callData is some arbitrary data, not the correctly encoded one, and the length can be taken from some random bytes? I think yes, maybe we need to test the behavior of ERC20 SVM in this case and see if the explicit check in the smart contract is needed or it still reverts in case of incorrectly encoded callData. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I think you need to fix a few linting errors
38e283a
@ankurdubey521 @Aboudjem Sorry guys, it requires approvals from you again. |
No worries ! the husky hook didn't work? |
I skipped it initially :) |
Summary
Related Issue: SMA-143, and SMA-144
Change Type
Checklist
P.S. The branch name is
fix/
not/fixes
because it was created before the discussion about naming convention. Next time will make itfixes/
.