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

support abi.encodeCall #1460

Merged
merged 1 commit into from
Dec 20, 2022
Merged

support abi.encodeCall #1460

merged 1 commit into from
Dec 20, 2022

Conversation

plotchy
Copy link
Contributor

@plotchy plotchy commented Nov 8, 2022

abi.encodeCall is not supported as a SolidityFunction/SolidityCall. This adds support

@0xalpharush / @montyly If you have time, can you help explain how to set up an ast_parsing test to me? I plan to add tests, but could use a little guidance

@0xalpharush
Copy link
Contributor

I would modify units_and_global_variables-0.8.12.sol . If necessary, create another test case in tests/ast-parsing with a newer version of Solidity (not sure if this bug is relevant).

For each test case, we store a zip file of the compilation e.g. units_and_global_variables-0.8.0.sol-0.8.12-compact.zip.

For existing test cases that are modified, it must be deleted and regenerated.

For new test cases the zip file needs to be created for the first time. In addition, new test cases must be registered here with the file name and which solidity versions it should be tested against.

Command to generate zip for test:

python ./tests/test_ast_parsing.py --compile

Then, you can generate the json file of slither's output:

python ./tests/test_ast_parsing.py --compile

You can copy commands from here in your local environment https://github.com/crytic/slither/blob/master/CONTRIBUTING.md#parser-tests

Here's what a similar PR ended up looking like #1086. Lmk if you have other questions or need clarification.

@montyly
Copy link
Member

montyly commented Dec 20, 2022

Thanks @plotchy

@montyly montyly merged commit 45f6d71 into crytic:dev Dec 20, 2022
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

Successfully merging this pull request may close these issues.

3 participants