-
Notifications
You must be signed in to change notification settings - Fork 982
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
add tool slither-interface #1898
Conversation
We need to add "interface" to this list so the test is run in CI slither/.github/workflows/ci.yml Line 45 in 0ec4874
|
I'm not sure why the tests are failing on Windows but not Ubuntu. Any ideas? Is there a different directory structure that's causing it to be unable to find the test contract? |
scripts/ci_test_interface.sh
Outdated
if [ "$DIFF" != "" ] | ||
then | ||
echo "slither-interface test 1 failed" | ||
cat test_1.sol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be crytic-export/interfaces/IWETH9.sol
? ditto for the other occurrences below.
As for the test failures on Windows, it might be caused by You can pass |
This is great work, thanks @0xGusMcCrae |
Thanks, glad I could help out! |
As per issue #1893
This tool outputs an interface file for a given contract input. The input can be a local source file or a deployment address if the contract is verified on etherscan.
Usage:
slither-interface <ContractName> <Source File or Address>
For example:
slither-interface WETH9 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
will output the interface file IWETH9.sol in crytic-export/interfaces.
There are optional flags for unrolling structs or excluding structs/enums/errors/events.
Tests can be found in
scripts/ci_test_interface.sh
I believe I did testing/linting correctly, let me know if I need to fix anything.