solhint
solhint copied to clipboard
`gas-indexed-events` not working for Interfaces
PoC:
- Clone repo: https://github.com/0xCLARITY/solhint-testing
- Run
yarn lint
- Observe "errors":
yarn lint
yarn run v1.22.21
$ solhint 'src/**/*.sol'
src/ICounter.sol
4:3 warning GC: [sender] on Event [Increment] could be Indexed gas-indexed-events
4:3 warning GC: [value] on Event [Increment] could be Indexed gas-indexed-events
✖ 2 problems (0 errors, 2 warnings)
✨ Done in 0.85s.
- Look at code:
pragma solidity ^0.8.20;
interface ICounter {
event Increment (address indexed sender, uint256 indexed value);
}
- Be confused about alleged warnings.