huff-language / huffmate

A library of modern, hyper-optimized, and extensible Huff contracts with extensive testing and documentation built by Huff maintainers.
https://github.com/pentagonxyz/huffmate
MIT License
437 stars 55 forks source link

Duplicated `APPROVE` macro in the ERC20 contract #137

Closed iFrostizz closed 11 months ago

iFrostizz commented 11 months ago

This is a good find from sashik.eth, so reposting here for tracking purposes, and it's a "good first issue" for anyone who wanna take it.

" Why in huffmate/ERC20 "approve" macro declared twice? https://github.com/huff-language/huffmate/blob/main/src/tokens/ERC20.huff#L98 https://github.com/huff-language/huffmate/blob/main/src/tokens/ERC20.huff#L248 "

By the way, one message later, he mentioned that huff-rs should not allow this to compile. So the current huffmate ERC20 is broken

" Previous versions of huff allowed to compile this? because with the current I receive: Error: Duplicate MACRO name found: \"APPROVE\" \nMACRO names should be unique "

MathisGD commented 11 months ago

Fixed by #134 already