Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gas-indexed-events not working for Interfaces #569

Closed
0xCLARITY opened this issue Mar 19, 2024 · 2 comments
Closed

gas-indexed-events not working for Interfaces #569

0xCLARITY opened this issue Mar 19, 2024 · 2 comments

Comments

@0xCLARITY
Copy link
Contributor

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.
@dbale-altoros
Copy link
Collaborator

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

@dbale-altoros
Copy link
Collaborator

fixed in #573
already included in latest version 4.5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants