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

Bug in function-id printer #210

Closed
sobolev-igor opened this issue Apr 25, 2019 · 2 comments · Fixed by #211
Closed

Bug in function-id printer #210

sobolev-igor opened this issue Apr 25, 2019 · 2 comments · Fixed by #211
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@sobolev-igor
Copy link
Contributor

Hi there! There is an issue connected to function-id printer that I faced:

when you create a dynamic array with public visibility modifier compiler automatically generates a getter-function with uint256 input parameter. However, Slither thinks that the getter has no input parameters. Thus, the wrong function signature is printed in the output.

Here is a small example.

pragma solidity 0.5.7;

contract Example {
    uint256[] public example;
}

Slither outputs the following table:

+-----------+------------+
|    Name   |     ID     |
+-----------+------------+
| example() | 0x54353f2f |
+-----------+------------+

However, the real example() function's signature is 0x477e4a02 in the example.

@montyly
Copy link
Member

montyly commented Apr 25, 2019

Thank you @sobolev-igor for reporting the issue. We are going to fix the printer

@montyly montyly added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Apr 25, 2019
@montyly
Copy link
Member

montyly commented Apr 26, 2019

Hi @sobolev-igor, the issue is fixed in master, it will be included in the next pypi release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants