Closed apolishch closed 1 year ago
Hi @apolishch ! Thanks for the report; could you please confirm if you're running the latest crytic-compile? If you're not, can you upgrade it and let us know if this is still an issue? We added support for automatic solc remaps on etherscan compilations in crytic-compile 0.3.2 with PR https://github.com/crytic/crytic-compile/pull/447
% crytic-compile --version
0.3.4
I have been unable to reproduce this locally with the latest slither & crytic-compile:
% slither 0x97e6e0a40a3d02f12d1cec30ebfbae04e37c119e
'solc --standard-json --allow-paths /private/tmp/foobar/crytic-export/etherscan-contracts/0x97e6e0a40a3d02f12d1cec30ebfbae04e37c119e-CellarInitializableV2_1' running
INFO:Detectors:
Multicall.multicall(bytes[]) (src/base/Multicall.sol#13-30) has delegatecall inside a loop in a payable function: (success,result) = address(this).delegatecall(data[i]) (src/base/Multicall.sol#16)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation/#payable-functions-using-delegatecall-inside-a-loop
INFO:Detectors: (....)
INFO:Slither:0x97e6e0a40a3d02f12d1cec30ebfbae04e37c119e analyzed (34 contracts with 88 detectors), 236 result(s) found
@elopez Thank you! That did, indeed, fix the issue for me. Thanks for helping me find this :)
Describe the issue:
Slither does not respect remaps on remote address, neither the ones provided on etherscan, nor when
@openzeppelin/contracts
are installed locally andsolc-remaps
is provided, either as config file or on command line.For instance:
slither 0x97e6e0a40a3d02f12d1cec30ebfbae04e37c119e --etherscan-apikey <my_api_key> --json ./outputs/slither/0x97e6e0a40a3d02f12d1cec30ebfbae04e37c119e.json --no-fail-pedantic --solc-remaps @openzeppelin=node_modules/@openzeppelin
Fails with, for instance:Notably, remappings are defined on etherscan for the compiler, and also locally, but neither set is being respected. Adding, or leaving off the --solc-remaps flag, or defining a config file and passing that have no effect whatsoever
Code example to reproduce the issue:
https://etherscan.io/address/0x97e6e0a40a3d02f12d1cec30ebfbae04e37c119e#code
Version:
currently running 0.9.6. Had the same problem with 0.9.2
Relevant log output: