Closed Muhammad-Altabba closed 6 years ago
@Muhammad-Altabba I'd ask you to also implement tests to verify the behaviour you've introduced, but first...
@skmgoldin If we added these protections (ie. prevent send to 0x0
and address(this)
), I think we should do so in a child contract that inherits from EIP20.sol. What do you think?
I will be happy to implement tests to verify the behavior. And if we need to add the proposed check in a child contract I will also be happy to implement (even I prefer it to be inside the same EIP20.sol contract). Please direct me with your recommendation and I will do the needed. Thanks,
I feel it definitely should not be in EIP20.sol. Perhaps a different implementation called something like SafeEIP20.sol or something.
Dear @maurelian and @skmgoldin, I added SafeEIP20.sol and changed EIP20Factory to use SafeEIP20. And I wrote JavaScript Truffle Tests for the new contract: SafeEIP20. Please let me know if you think that more things are needed to be done or modified. Thanks,
Hello, Is there anything, I can help with, to speed up accepting this Pull Request? Thanks,
Hi, Could I help regarding this pull request?
Done. Apologies for the delay Muhammad.
No problem, Many thanks,
Prevent transferring to the 0x0 address, and the contract address, according to Token Implementation Best Practices. Reference: https://consensys.github.io/smart-contract-best-practices/tokens/