-
Notifications
You must be signed in to change notification settings - Fork 2
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: typos, removed unsafeBurn, modify unsafeMint #69
Conversation
chore: prettier
4252f11
to
3a23944
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.
Just one comment about the packageManager
All tests are working now, so this PR is ready to be merged after review. VERY Important: After my new implementation of Error handling, I noticed one of your test "should be able to transferFrom only if allowance is sufficient" inside EncryptedERC20WithError.test.ts had two logical errors that I fixed. Could you double check that now the correct test logic is indeed implemented please before merging? @PacificYield thanks. |
function getTotalNumberErrors() external view returns (uint8 totalNumberErrors) { | ||
return _TOTAL_NUMBER_ERRORS; | ||
function saveError(euint8 errorCode) internal returns (uint256) { | ||
uint256 errorId = _errorCounter; |
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.
uint256 errorId = _errorCounter++;
You can increment on the same lane.
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.
this reduces readability and doesn't save gas, i dont think it is a good idea
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.
OK!
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.
A few suggestions:
- Start all functions/variables that are internal with underscore (_) https://docs.soliditylang.org/en/latest/style-guide.html#underscore-prefix-for-non-external-functions-and-variables
- For all functions that deal with errors (from EncryptedErrors), I suggest to start with a recognizable prefix such as "_errorDefineIf", "_errorDefineIfNot". It would help standardizing encrypted error management for future use cases and make it very apparent for developers. --> Can be done in later stages.
- Make sure to follow the Solidity pattern for visibility of functions or at least be consistent (external / public /internal /private)
I prefer we merge this one and I'll rebase the other PR and continue on this one! |
I agree, this is what I wanted to do exactly. |
I am not sure to understand what do you mean here? I noticed several points here: |
No description provided.