Skip to content

Conversation

AayushJhaAudits
Copy link

Description
This pull request introduces two custom error checks to improve the ERC20 contract's robustness:

InsufficientBalance: This error is triggered when an account attempts to transfer more tokens than it has in balance.

TransferToZeroAddress: This error prevents users from transferring tokens to the zero address, which could result in lost funds.

Both errors are implemented with gas optimization, ensuring that no unnecessary operations are performed.

Additional Details:
Gas optimization is applied to reduce unnecessary operations, improving overall contract efficiency.

Checklist
Ran forge snapshot?
(Note: Some tests related to snapshots are failing due to existing issues in the repository, unrelated to changes.)

Ran npm run lint=>GOOD

Ran forge test?
(Note: Some tests are failing due to pre-existing issues, not caused by the changes in this PR.)

@AayushJhaAudits
Copy link
Author

“This is my first contribution to Solmate as part of my journey into smart contract auditing. Feedback welcome!”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant