no-simple-event-func-name should have an exception of ERC20 token
See original GitHub issueERC 20 is a standard. Unfortunately, they named their Transfer
event the same as their transfer
function.
You’re correct in marking this as a warning if no-simple-event-func-name
is being checked, but I think it’s a bad idea to do so.
A nieve programmer may change that event name to something else, only to silence the linter, but this will make the token contract non-compliant. In order to remove the warning, the programmer must create an incompatible client.
I would make an exception and not report a warning if the smart contract is an ERC20 token (which may be impossible, but in that case simply don’t warn for the Transfer(address indexed, address indexed, uint256) event.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:8 (5 by maintainers)
Top Results From Across the Web
ERC20 token standard vulnerability classification. · GitHub
This is a critical flaw of the standard that led to impossibility of error handling. Also depositing tokens to a contract with transfer...
Read more >How to Create an ERC20 Token the Simple Way - Toptal
This article will detail how you can create your own Ethereum token, but before we get started, let's take a closer look at...
Read more >Navigating the pitfalls of securely interacting with ERC20 tokens
If the call itself didn't revert, it therefore must mean that the transfer was successful and true should have been returned. With the...
Read more >ERC 20 - OpenZeppelin Docs
SafeERC20 is a wrapper around the interface that eliminates the need to handle boolean return values. TokenTimelock can hold tokens for a beneficiary...
Read more >Minting Your Own ERC-20 Tokens in Ethereum
For the stalls at the carnivals, they would only accept tokens as a form of payment — strictly no cash for them. In...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ended up disabling this rule globally: I find that forcing events to use CamelCase and functions to use mixedCase is enough to differentiate them.
hey @mswezey23 thanks for the feedback. I really like the idea of checking if a given code is ERCXYZ compliant, looks to me that it’s worth researching into it. First thing that comes to my mind is checking that it matches proposed interface. Do you think there may be other stuff to check/validate?