Skip to content

Updated code that were deprecated. #3

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

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
16 changes: 8 additions & 8 deletions ico-contract.sol
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ contract Owned {

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

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

@@ -88,7 +88,7 @@ contract Owned {
}
function acceptOwnership() public {
require(msg.sender == newOwner);
OwnershipTransferred(owner, newOwner);
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
newOwner = address(0);
}
@@ -115,7 +115,7 @@ contract bitfwdToken is ERC20Interface, Owned, SafeMath {
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
function bitfwdToken() public {
constructor() public {
symbol = "FWD";
name = "bitfwd Token";
decimals = 18;
@@ -149,7 +149,7 @@ contract bitfwdToken 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);
Transfer(msg.sender, to, tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}

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

@@ -182,7 +182,7 @@ contract bitfwdToken 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);
Transfer(from, to, tokens);
emit Transfer(from, to, tokens);
return true;
}

@@ -203,7 +203,7 @@ contract bitfwdToken is ERC20Interface, Owned, SafeMath {
// ------------------------------------------------------------------------
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
@@ -221,7 +221,7 @@ contract bitfwdToken is ERC20Interface, Owned, SafeMath {
}
balances[msg.sender] = safeAdd(balances[msg.sender], tokens);
_totalSupply = safeAdd(_totalSupply, tokens);
Transfer(address(0), msg.sender, tokens);
emit Transfer(address(0), msg.sender, tokens);
owner.transfer(msg.value);
}