mirror of https://github.com/crytic/slither
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
556 B
20 lines
556 B
library MyLibrary {
|
|
|
|
function aViewCall(address token) internal view {
|
|
(bool success ,) = token.staticcall(abi.encodeWithSignature("decimals"));
|
|
require(success, "call failed");
|
|
}
|
|
}
|
|
|
|
contract A {
|
|
uint256 private protectMe = 1;
|
|
function good() external {
|
|
MyLibrary.aViewCall(0x6B175474E89094C44Da98b954EedeAC495271d0F);
|
|
protectMe += 1;
|
|
}
|
|
function good1() external {
|
|
(bool success,) = address(MyLibrary).staticcall(abi.encodeWithSignature("aViewCall(address)"));
|
|
require(success, "call failed");
|
|
protectMe += 1;
|
|
}
|
|
}
|
|
|