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.
83 lines
1.6 KiB
83 lines
1.6 KiB
6 years ago
|
//pragma solidity ^0.4.24;
|
||
6 years ago
|
|
||
6 years ago
|
import "./external_function_import.sol";
|
||
6 years ago
|
|
||
6 years ago
|
contract ContractWithFunctionCalledSuper is ContractWithFunctionCalled {
|
||
|
function callWithSuper() public {
|
||
6 years ago
|
uint256 i = 0;
|
||
|
}
|
||
|
}
|
||
|
|
||
6 years ago
|
contract ContractWithFunctionNotCalled {
|
||
6 years ago
|
|
||
6 years ago
|
function funcNotCalled3() public {
|
||
6 years ago
|
|
||
6 years ago
|
}
|
||
|
|
||
6 years ago
|
function funcNotCalled2() public {
|
||
6 years ago
|
|
||
|
}
|
||
|
|
||
6 years ago
|
function funcNotCalled() public {
|
||
6 years ago
|
|
||
|
}
|
||
6 years ago
|
|
||
|
function my_func() internal returns(bool){
|
||
|
return true;
|
||
|
}
|
||
|
|
||
6 years ago
|
}
|
||
|
|
||
6 years ago
|
contract ContractWithFunctionNotCalled2 is ContractWithFunctionCalledSuper {
|
||
|
function funcNotCalled() public {
|
||
6 years ago
|
uint256 i = 0;
|
||
6 years ago
|
address three = address(new ContractWithFunctionNotCalled());
|
||
|
three.call(abi.encode(bytes4(keccak256("helloTwo()"))));
|
||
6 years ago
|
super.callWithSuper();
|
||
|
ContractWithFunctionCalled c = new ContractWithFunctionCalled();
|
||
|
c.funcCalled();
|
||
6 years ago
|
}
|
||
6 years ago
|
}
|
||
|
|
||
|
contract InternalCall {
|
||
|
|
||
|
function() returns(uint) ptr;
|
||
|
|
||
|
function set_test1() external{
|
||
|
ptr = test1;
|
||
|
}
|
||
|
|
||
|
function set_test2() external{
|
||
|
ptr = test2;
|
||
|
}
|
||
|
|
||
|
function test1() public returns(uint){
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
function test2() public returns(uint){
|
||
|
return 2;
|
||
|
}
|
||
|
|
||
|
function test3() public returns(uint){
|
||
|
return 3;
|
||
|
}
|
||
|
|
||
|
function exec() external returns(uint){
|
||
|
return ptr();
|
||
|
}
|
||
|
|
||
6 years ago
|
}
|
||
6 years ago
|
|
||
|
contract FunctionParameterWrite {
|
||
|
|
||
|
function parameter_read_ok_for_external (uint i) public {
|
||
|
uint local = i;
|
||
|
}
|
||
|
|
||
|
function parameter_read_not_ok_for_external (uint i) public returns (uint) {
|
||
|
i += 1;
|
||
|
return (i);
|
||
|
}
|
||
|
}
|