Fix some bugs in total supply and value of percentaje that is actually half for the contract owner
This commit is contained in:
parent
d436a345f1
commit
9cd5513c2c
|
@ -231,7 +231,7 @@ contract DECAToken is DECAInterface, Owned, SafeMath {
|
||||||
uint toSender;
|
uint toSender;
|
||||||
uint percentage;
|
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) {
|
if (now <= preICOEnds) {
|
||||||
tokens = msg.value * 2000;
|
tokens = msg.value * 2000;
|
||||||
|
@ -246,7 +246,8 @@ contract DECAToken is DECAInterface, Owned, SafeMath {
|
||||||
toSender = tokens; // tokens goes to sender
|
toSender = tokens; // tokens goes to sender
|
||||||
balances[msg.sender] = safeAdd(balances[msg.sender], toSender);
|
balances[msg.sender] = safeAdd(balances[msg.sender], toSender);
|
||||||
balances[owner] = safeAdd(balances[owner], toOwner);
|
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), msg.sender, toSender);
|
||||||
emit Transfer(address(0), owner, toOwner);
|
emit Transfer(address(0), owner, toOwner);
|
||||||
owner.transfer(msg.value);
|
owner.transfer(msg.value);
|
||||||
|
|
Loading…
Reference in New Issue