Created
September 20, 2020 12:46
-
-
Save Gribnik2K/f4e50e68af2e3cddbe05353109aa0803 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.5.12; | |
contract SKALPToken { | |
mapping(address => uint256) balances; | |
uint256 public totalSupply = 0; | |
function transfer(address _to, uint256 _value) public returns (bool success) { | |
if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) { | |
balances[msg.sender] -= _value; | |
balances[_to] += _value; | |
return true; | |
} else { return false; } | |
} | |
function balanceOf(address _owner) public view returns (uint256 balance) { | |
return balances[_owner]; | |
} | |
function mint(uint256 _value) public { | |
balances[msg.sender] += _value; | |
totalSupply += _value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment