mirror of https://github.com/crytic/slither
parent
ab690d1f24
commit
c442ec056e
@ -0,0 +1,25 @@ |
||||
pragma solidity ^0.4.24; |
||||
contract Owner{ |
||||
|
||||
address owner; |
||||
|
||||
modifier onlyOwner(){ |
||||
require(msg.sender == owner); |
||||
_; |
||||
} |
||||
|
||||
} |
||||
|
||||
contract MyContract is Owner{ |
||||
|
||||
mapping(address => uint) balances; |
||||
|
||||
constructor() public{ |
||||
owner = msg.sender; |
||||
} |
||||
|
||||
function mint(uint value) onlyOwner public{ |
||||
balances[msg.sender] += value; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue