mirror of https://github.com/ConsenSys/mythril
blockchainethereumsmart-contractssoliditysecurityprogram-analysissecurity-analysissymbolic-execution
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.
22 lines
529 B
22 lines
529 B
6 years ago
|
pragma solidity ^0.4.18;
|
||
|
|
||
|
contract Token {
|
||
7 years ago
|
|
||
|
mapping(address => uint) balances;
|
||
|
uint public totalSupply;
|
||
|
|
||
|
function Token(uint _initialSupply) {
|
||
|
balances[msg.sender] = totalSupply = _initialSupply;
|
||
|
}
|
||
|
|
||
6 years ago
|
function transfer(address _to, uint _value) public returns (bool) {
|
||
7 years ago
|
require(balances[msg.sender] - _value >= 0);
|
||
|
balances[msg.sender] -= _value;
|
||
|
balances[_to] += _value;
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
function balanceOf(address _owner) public constant returns (uint balance) {
|
||
|
return balances[_owner];
|
||
|
}
|
||
|
}
|