From 9cd5513c2c9f1ca23c2699df434f76d4a7497c53 Mon Sep 17 00:00:00 2001 From: p1r0 Date: Sat, 17 Aug 2019 01:47:31 -0500 Subject: [PATCH] Fix some bugs in total supply and value of percentaje that is actually half for the contract owner --- DECA_ERC20_0.4.18.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DECA_ERC20_0.4.18.sol b/DECA_ERC20_0.4.18.sol index 31a824f..762f5ec 100644 --- a/DECA_ERC20_0.4.18.sol +++ b/DECA_ERC20_0.4.18.sol @@ -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);