Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Update to solidity 0.4.24" #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions contracts/erc20_tutorial.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity ^0.4.18;

// ----------------------------------------------------------------------------
// '0Fucks' token contract
Expand Down Expand Up @@ -74,7 +74,7 @@ contract Owned {

event OwnershipTransferred(address indexed _from, address indexed _to);

constructor() public {
function Owned() public {
owner = msg.sender;
}

Expand All @@ -88,7 +88,7 @@ contract Owned {
}
function acceptOwnership() public {
require(msg.sender == newOwner);
emit OwnershipTransferred(owner, newOwner);
OwnershipTransferred(owner, newOwner);
owner = newOwner;
newOwner = address(0);
}
Expand All @@ -112,13 +112,13 @@ contract FucksToken is ERC20Interface, Owned, SafeMath {
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
constructor() public {
function FucksToken() public {
symbol = "0FUCKS";
name = "0 Fucks Token";
decimals = 18;
_totalSupply = 100000000000000000000000000;
balances[0x5A86f0cafD4ef3ba4f0344C138afcC84bd1ED222] = _totalSupply;
emit Transfer(address(0), 0x5A86f0cafD4ef3ba4f0344C138afcC84bd1ED222, _totalSupply);
Transfer(address(0), 0x5A86f0cafD4ef3ba4f0344C138afcC84bd1ED222, _totalSupply);
}


Expand Down Expand Up @@ -146,7 +146,7 @@ contract FucksToken is ERC20Interface, Owned, SafeMath {
function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
Transfer(msg.sender, to, tokens);
return true;
}

Expand All @@ -161,7 +161,7 @@ contract FucksToken is ERC20Interface, Owned, SafeMath {
// ------------------------------------------------------------------------
function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
Approval(msg.sender, spender, tokens);
return true;
}

Expand All @@ -179,7 +179,7 @@ contract FucksToken is ERC20Interface, Owned, SafeMath {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(from, to, tokens);
Transfer(from, to, tokens);
return true;
}

Expand All @@ -200,7 +200,7 @@ contract FucksToken is ERC20Interface, Owned, SafeMath {
// ------------------------------------------------------------------------
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
Expand Down