You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to analyze a Solidity contract using Slither's Python API, but I'm getting compilation errors when the contract imports Chainlink dependencies. The imports can't be resolved even though I have the dependencies installed and remappings configured.
Error:
SlitherError: Invalid compilation:
Invalid solc compilation Error: Source "@chainlink/contracts-ccip/src/v0.8/shared/access/OwnerIsCreator.sol" not found: File not found. Searched the following locations: "".
My setup:
Contract imports: import {OwnerIsCreator} from "@chainlink/contracts-ccip/src/v0.8/shared/access/OwnerIsCreator.sol";
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to analyze a Solidity contract using Slither's Python API, but I'm getting compilation errors when the contract imports Chainlink dependencies. The imports can't be resolved even though I have the dependencies installed and remappings configured.
Error:
My setup:
import {OwnerIsCreator} from "@chainlink/contracts-ccip/src/v0.8/shared/access/OwnerIsCreator.sol";
npm install @chainlink/contracts-ccip
✓Python code:
What I've tried:
solc_remaps
parameter:slither = Slither(path, solc_remaps=["@chainlink/=node_modules/@chainlink/"])
solc_args
with various formats:--remap
,--include-path
,--base-path
node_modules/@chainlink/contracts-ccip/src/v0.8/shared/access/OwnerIsCreator.sol
✓solc
command (works fine)Environment:
Any help would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions