Fix some bugs in total supply and value of percentaje that is actually half for the contract owner

This commit is contained in:
p1r0 2019-08-17 01:47:31 -05:00
parent d436a345f1
commit 9cd5513c2c
1 changed files with 3 additions and 2 deletions

View File

@ -231,7 +231,7 @@ contract DECAToken is DECAInterface, Owned, SafeMath {
uint toSender;
uint percentage;
percentage = 50; // percentage that goes to the owner 25% to carbon credits fund
percentage = 2; // percentage that goes to the owner 25% to carbon credits fund
if (now <= preICOEnds) {
tokens = msg.value * 2000;
@ -246,7 +246,8 @@ contract DECAToken is DECAInterface, Owned, SafeMath {
toSender = tokens; // tokens goes to sender
balances[msg.sender] = safeAdd(balances[msg.sender], toSender);
balances[owner] = safeAdd(balances[owner], toOwner);
_totalSupply = safeAdd(_totalSupply, tokens);
_totalSupply = safeAdd(_totalSupply, toSender);
_totalSupply = safeAdd(_totalSupply, toOwner);
emit Transfer(address(0), msg.sender, toSender);
emit Transfer(address(0), owner, toOwner);
owner.transfer(msg.value);