Static Analyzer for Solidity
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.
 
 
 
 
slither/tests/unit/utils/test_data/upgradeability_util/src/ContractV1.sol

36 lines
681 B

pragma solidity ^0.8.2;
import "./ProxyStorage.sol";
contract ContractV1 is ProxyStorage {
uint private stateA = 0;
uint private stateB = 0;
uint constant CONST = 32;
bool bug = false;
function f(uint x) public {
if (msg.sender == admin) {
stateA = x;
}
}
function g(uint y) public {
if (checkA()) {
stateB = y - 10;
}
}
function h() public {
if (checkB()) {
bug = true;
}
}
function checkA() internal returns (bool) {
return stateA % CONST == 1;
}
function checkB() internal returns (bool) {
return stateB == 62;
}
}