protofire/solhint

`gas-indexed-events` not working for Interfaces

0xCLARITY opened this issue · 2 comments

PoC:

  1. Clone repo: https://github.com/0xCLARITY/solhint-testing
  2. Run yarn lint
  3. 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.
  1. Look at code:
pragma solidity ^0.8.20;

interface ICounter {
  event Increment (address indexed sender, uint256 indexed value);
}
  1. Be confused about alleged warnings.

jajaj thanks @0xCLARITY for your message
will be fixing as soon as I can
I think I missed interfaces... need to check

fixed in #573
already included in latest version 4.5.4