Skip to content

Fix: Missing zero address validation in LibERC20.approve()#33

Merged
mudgen merged 1 commit into
Perfect-Abstractions:mainfrom
adamgall:fix/liberc20-approve-validation
Oct 21, 2025
Merged

Fix: Missing zero address validation in LibERC20.approve()#33
mudgen merged 1 commit into
Perfect-Abstractions:mainfrom
adamgall:fix/liberc20-approve-validation

Conversation

@adamgall

Copy link
Copy Markdown
Collaborator

Fixes #27

The LibERC20.approve() function was missing zero address validation for the spender parameter, allowing approvals to the zero address which violates the ERC-20 standard and could lead to locked tokens.

This fix adds the ERC20InvalidSpender error and validates that the spender is not the zero address, maintaining consistency with ERC20Facet.approve().

The LibERC20.approve() function was missing zero address validation for the
spender parameter, allowing approvals to the zero address which violates the
ERC-20 standard and could lead to locked tokens.

This fix adds the ERC20InvalidSpender error and validates that the spender is
not the zero address, maintaining consistency with ERC20Facet.approve().
@mudgen mudgen merged commit ba45ebc into Perfect-Abstractions:main Oct 21, 2025
@adamgall adamgall deleted the fix/liberc20-approve-validation branch October 21, 2025 17:55
JackieXu pushed a commit to JackieXu/Compose that referenced this pull request Nov 6, 2025
…-approve-validation

Fix: Missing zero address validation in LibERC20.approve()
maxnorm added a commit that referenced this pull request Mar 25, 2026
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.

LibERC20: approve() missing zero address validation for spender

2 participants