-
Notifications
You must be signed in to change notification settings - Fork 50
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
refactor: (C4 #115) add input validations when setting data in LSP6SetDataModule
#679
Conversation
Task linked: DEV-7685 [C4#115] Missing input validations |
Changes to gas cost
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
8aeaf49
to
82c1d96
Compare
tests/LSP20CallVerification/LSP6/Admin/PermissionChangeAddExtensions.test.ts
Show resolved
Hide resolved
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.
Let's please review the newly added errors. This is adding 66k gas on deployment. It's way too much for just one check and two new custom errors.
Let's see if we can reduce this gas by some small refactoring or re-using the other errors 🙏
84ee0bf
to
65cab65
Compare
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.
Was it discussed to have it strictly the length or the minimum length?
Good point. I remember @frozeman saying it should be at least the minimum length. Any extra byte we ignore it. |
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
|
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.
Added some final suggestions for the Natspec
e16f060
to
67e16e1
Compare
LSP1UniversalReceiverDelegateUP
LSP1UniversalReceiverDelegateUP
LSP6SetDataModule
LSP6SetDataModule
LSP6SetDataModule
What does this PR introduce?
PR Checklist
♻️ Refactor
Add input validations for the data values of specific data keys.
npm run lint
&&npm run lint:solidity
(solhint)npm run format
(prettier)npm run build
npm run test