Closed kevzettler closed 1 year ago
Can you share your code or an example to reproduce this?
If you have similar code to this issue, you can try moving the struct into the contract.
Hi @0xalpharush you can reproduce with the following chain of shell commands. This assumes you have git
, yarn
and slither
installed
git clone --single-branch --branch slither-v2.5.0 https://github.com/kevzettler/semaphore && \
cd semaphore && \
yarn && \
cd packages/contracts && \
slither .
I have confirmed that this parsing failure was due to a scenario where a shared library
had a struct defined outside of it like:
struct SharedStruct{}
library SharedLibrary{}
contract Testcontract{
using SharedLibrary for SharedStruct;
}
If I modify it to nest the struct
within the library
like:
library SharedLibrary{
struct SharedStruct{}
}
contract Testcontract{
using SharedLibrary for SharedLibrary.SharedStruct;
}
slither is able to parse.
Describe the issue:
I run
slither .
and get a python stack trace containing errors listed below.Code example to reproduce the issue:
slither.config.json
Version:
Relevant log output: