mirror of https://github.com/crytic/slither
parent
5f5aacdde7
commit
098851cbd2
@ -0,0 +1,6 @@ |
||||
The following unused import(s) in tests/e2e/detectors/test_data/unused-imports/0.8.16/B.sol should be removed: |
||||
-import "./A.sol"; (tests/e2e/detectors/test_data/unused-imports/0.8.16/B.sol#4) |
||||
|
||||
The following unused import(s) in tests/e2e/detectors/test_data/unused-imports/0.8.16/C.sol should be removed: |
||||
-import "./B.sol"; (tests/e2e/detectors/test_data/unused-imports/0.8.16/C.sol#4) |
||||
|
@ -0,0 +1,10 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
library A |
||||
{ |
||||
function a() public |
||||
{ |
||||
|
||||
} |
||||
} |
@ -0,0 +1,9 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./A.sol"; |
||||
|
||||
contract B |
||||
{ |
||||
|
||||
} |
@ -0,0 +1,12 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./B.sol"; |
||||
|
||||
contract C |
||||
{ |
||||
constructor() |
||||
{ |
||||
A.a(); |
||||
} |
||||
} |
Binary file not shown.
@ -0,0 +1,7 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
library ConstantContractLevel |
||||
{ |
||||
uint constant public CONSTANT = 0; |
||||
} |
@ -0,0 +1,9 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./ConstantContractLevel.sol"; |
||||
|
||||
contract ConstantContractLevelUsedInContractTest |
||||
{ |
||||
uint private v = ConstantContractLevel.CONSTANT; |
||||
} |
Binary file not shown.
@ -0,0 +1,12 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./ConstantContractLevel.sol"; |
||||
|
||||
uint constant __ = ConstantContractLevel.CONSTANT; |
||||
|
||||
// dummy contract, so that "No contract were found ..." message is not being thrown by Slither |
||||
contract Dummy |
||||
{ |
||||
|
||||
} |
Binary file not shown.
@ -0,0 +1,10 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
uint constant ConstantTopLevel = 0; |
||||
|
||||
// dummy contract, so that "No contract were found ..." message is not being thrown by Slither |
||||
contract Dummy |
||||
{ |
||||
|
||||
} |
@ -0,0 +1,9 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./ConstantTopLevel.sol"; |
||||
|
||||
contract ConstantTopLevelUsedInContractTest |
||||
{ |
||||
uint private v = ConstantTopLevel; |
||||
} |
Binary file not shown.
@ -0,0 +1,12 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./ConstantTopLevel.sol"; |
||||
|
||||
uint constant __ = ConstantTopLevel; |
||||
|
||||
// dummy contract, so that "No contract were found ..." message is not being thrown by Slither |
||||
contract Dummy_ |
||||
{ |
||||
|
||||
} |
Binary file not shown.
@ -0,0 +1,7 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
contract Contract |
||||
{ |
||||
|
||||
} |
@ -0,0 +1,9 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./Contract.sol"; |
||||
|
||||
contract ContractUsedInContractTest1 |
||||
{ |
||||
Contract c; |
||||
} |
Binary file not shown.
@ -0,0 +1,9 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./Contract.sol"; |
||||
|
||||
contract ContractUsedInContractTest2 is Contract |
||||
{ |
||||
|
||||
} |
Binary file not shown.
@ -0,0 +1,12 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./Contract.sol"; |
||||
|
||||
Contract constant c = Contract(address(0x0)); |
||||
|
||||
// dummy contract, so that "No contract were found ..." message is not being thrown by Slither |
||||
contract Dummy |
||||
{ |
||||
|
||||
} |
Binary file not shown.
@ -0,0 +1,10 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
error err(); |
||||
|
||||
// dummy contract, so that "No contract were found ..." message is not being thrown by Slither |
||||
contract Dummy |
||||
{ |
||||
|
||||
} |
@ -0,0 +1,17 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomErrorTopLevel.sol"; |
||||
|
||||
contract CustomErrorTopLevelUsedInContractTest |
||||
{ |
||||
constructor() |
||||
{ |
||||
f(); |
||||
} |
||||
|
||||
function f() private pure |
||||
{ |
||||
revert err(); |
||||
} |
||||
} |
Binary file not shown.
@ -0,0 +1,7 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
library CustomEventContractLevel |
||||
{ |
||||
event CustomEvent(); |
||||
} |
@ -0,0 +1,12 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomEventContractLevel.sol"; |
||||
|
||||
contract CustomEventContractLevelUsedInContractTest |
||||
{ |
||||
function f() public |
||||
{ |
||||
emit CustomEventContractLevel.CustomEvent(); |
||||
} |
||||
} |
Binary file not shown.
@ -0,0 +1,15 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomEventContractLevel.sol"; |
||||
|
||||
function f() |
||||
{ |
||||
emit CustomEventContractLevel.CustomEvent(); |
||||
} |
||||
|
||||
// dummy contract, so that "No contract were found ..." message is not being thrown by Slither |
||||
contract Dummy |
||||
{ |
||||
|
||||
} |
Binary file not shown.
@ -0,0 +1,7 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
contract CustomTypeContractLevel |
||||
{ |
||||
type CustomType is uint; |
||||
} |
@ -0,0 +1,9 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomTypeContractLevel.sol"; |
||||
|
||||
contract CustomTypeContractLevelUsedInContractTest1 |
||||
{ |
||||
CustomTypeContractLevel.CustomType private v; |
||||
} |
Binary file not shown.
@ -0,0 +1,12 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomTypeContractLevel.sol"; |
||||
|
||||
contract CustomTypeContractLevelUsedInContractTest2 |
||||
{ |
||||
function f(CustomTypeContractLevel.CustomType) public |
||||
{ |
||||
|
||||
} |
||||
} |
Binary file not shown.
@ -0,0 +1,13 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomTypeContractLevel.sol"; |
||||
|
||||
contract CustomTypeContractLevelUsedInContractTest3 |
||||
{ |
||||
modifier m() |
||||
{ |
||||
CustomTypeContractLevel.CustomType ___; |
||||
_; |
||||
} |
||||
} |
Binary file not shown.
@ -0,0 +1,12 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomTypeContractLevel.sol"; |
||||
|
||||
contract CustomTypeContractLevelUsedInContractTest4 |
||||
{ |
||||
struct CustomStruct |
||||
{ |
||||
CustomTypeContractLevel.CustomType ___; |
||||
} |
||||
} |
Binary file not shown.
@ -0,0 +1,15 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomTypeContractLevel.sol"; |
||||
|
||||
struct CustomTypeContractLevelUsedTopLevelTest1 |
||||
{ |
||||
CustomTypeContractLevel.CustomType __; |
||||
} |
||||
|
||||
// dummy contract, so that "No contract were found ..." message is not being thrown by Slither |
||||
contract Dummy |
||||
{ |
||||
|
||||
} |
Binary file not shown.
@ -0,0 +1,12 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomTypeContractLevel.sol"; |
||||
|
||||
CustomTypeContractLevel.CustomType constant __ = CustomTypeContractLevel.CustomType.wrap(0); |
||||
|
||||
// dummy contract, so that "No contract were found ..." message is not being thrown by Slither |
||||
contract Dummy |
||||
{ |
||||
|
||||
} |
Binary file not shown.
@ -0,0 +1,10 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
type CustomType is uint; |
||||
|
||||
// dummy contract, so that "No contract were found ..." message is not being thrown by Slither |
||||
contract Dummy |
||||
{ |
||||
|
||||
} |
@ -0,0 +1,9 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomTypeTopLevel.sol"; |
||||
|
||||
contract CustomTypeTopLevelUsedInContractTest1 |
||||
{ |
||||
CustomType private v; |
||||
} |
Binary file not shown.
@ -0,0 +1,12 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomTypeTopLevel.sol"; |
||||
|
||||
contract CustomTypeTopLevelUsedInContractTest2 |
||||
{ |
||||
function f(CustomType) public |
||||
{ |
||||
|
||||
} |
||||
} |
Binary file not shown.
@ -0,0 +1,13 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomTypeTopLevel.sol"; |
||||
|
||||
contract CustomTypeTopLevelUsedInContractTest3 |
||||
{ |
||||
modifier m() |
||||
{ |
||||
CustomType v; |
||||
_; |
||||
} |
||||
} |
Binary file not shown.
@ -0,0 +1,12 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomTypeTopLevel.sol"; |
||||
|
||||
contract CustomTypeTopLevelUsedInContractTest4 |
||||
{ |
||||
struct CustomStruct |
||||
{ |
||||
CustomType ___; |
||||
} |
||||
} |
Binary file not shown.
@ -0,0 +1,15 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomTypeTopLevel.sol"; |
||||
|
||||
struct CustomTypeTopLevelUsedTopLevelTest1 |
||||
{ |
||||
CustomType __; |
||||
} |
||||
|
||||
// dummy contract, so that "No contract were found ..." message is not being thrown by Slither |
||||
contract Dummy_ |
||||
{ |
||||
|
||||
} |
Binary file not shown.
@ -0,0 +1,12 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./CustomTypeTopLevel.sol"; |
||||
|
||||
CustomType constant __ = CustomType.wrap(0); |
||||
|
||||
// dummy contract, so that "No contract were found ..." message is not being thrown by Slither |
||||
contract Dummy_ |
||||
{ |
||||
|
||||
} |
Binary file not shown.
@ -0,0 +1,10 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
contract EnumContractLevel |
||||
{ |
||||
enum CustomEnum |
||||
{ |
||||
__ |
||||
} |
||||
} |
@ -0,0 +1,9 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./EnumContractLevel.sol"; |
||||
|
||||
contract EnumContractLevelUsedInContractTest |
||||
{ |
||||
uint private v = uint(EnumContractLevel.CustomEnum.__); |
||||
} |
Binary file not shown.
@ -0,0 +1,12 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./EnumContractLevel.sol"; |
||||
|
||||
uint constant __ = uint(EnumContractLevel.CustomEnum.__); |
||||
|
||||
// dummy contract, so that "No contract were found ..." message is not being thrown by Slither |
||||
contract Dummy |
||||
{ |
||||
|
||||
} |
Binary file not shown.
@ -0,0 +1,13 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
enum EnumTopLevel |
||||
{ |
||||
__ |
||||
} |
||||
|
||||
// dummy contract, so that "No contract were found ..." message is not being thrown by Slither |
||||
contract Dummy |
||||
{ |
||||
|
||||
} |
@ -0,0 +1,9 @@ |
||||
// SPDX-License-Identifier: Unlicense |
||||
pragma solidity 0.8.16; |
||||
|
||||
import "./EnumTopLevel.sol"; |
||||
|
||||
contract EnumTopLevelUsedInContractTest |
||||
{ |
||||
uint private v = uint(EnumTopLevel.__); |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue