2019-06-14 10:16:30 +00:00
|
|
|
pragma solidity ^0.5.0;
|
|
|
|
|
|
|
|
contract ERC20Transfer {
|
|
|
|
|
2019-07-02 07:28:57 +00:00
|
|
|
mapping (address => uint256) public balances;
|
|
|
|
|
2019-06-14 10:16:30 +00:00
|
|
|
constructor() public {}
|
|
|
|
|
|
|
|
event Transfer(address indexed from, address indexed to, uint256 value);
|
|
|
|
|
|
|
|
function transfer(address to, uint256 value) public {
|
2019-07-02 07:28:57 +00:00
|
|
|
balances[to] += value;
|
2019-06-14 10:16:30 +00:00
|
|
|
emit Transfer(msg.sender, to, value);
|
|
|
|
}
|
2019-07-02 07:28:57 +00:00
|
|
|
|
|
|
|
function balanceOf(address account) public view returns (uint256) {
|
|
|
|
return balances[account];
|
|
|
|
}
|
2019-06-14 10:16:30 +00:00
|
|
|
}
|