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/examples/printers/slihtir.sol

27 lines
492 B

pragma solidity ^0.4.24;
library UnsafeMath{
function add(uint a, uint b) public pure returns(uint){
return a + b;
}
function min(uint a, uint b) public pure returns(uint){
return a - b;
}
}
contract MyContract{
using UnsafeMath for uint;
mapping(address => uint) balances;
function transfer(address to, uint val) public{
balances[msg.sender] = balances[msg.sender].min(val);
balances[to] = balances[to].add(val);
}
}