Add makefile

This commit is contained in:
nolash 2020-12-06 17:37:50 +01:00
parent 30baee6d19
commit eb2b89b13e
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
2 changed files with 4 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -52,6 +52,7 @@ contract GiftableToken {
}
function transfer(address _to, uint256 _value) public returns (bool) {
require(balanceOf[msg.sender] >= _value);
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
emit Transfer(msg.sender, _to, _value);
@ -59,6 +60,8 @@ contract GiftableToken {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(allowances[_from][msg.sender] >= _value);
require(balanceOf[_from] >= _value);
allowances[_from][msg.sender] = allowances[_from][msg.sender] - _value;
balanceOf[_from] -= _value;
balanceOf[_to] += _value;