diff --git a/DECA_ERC20_0.4.18.sol b/DECA_ERC20_0.4.26.sol similarity index 81% rename from DECA_ERC20_0.4.18.sol rename to DECA_ERC20_0.4.26.sol index 6063b80..dda4528 100644 --- a/DECA_ERC20_0.4.18.sol +++ b/DECA_ERC20_0.4.26.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.26; +pragma solidity 0.4.26; // ---------------------------------------------------------------------------- // 'DECA' DEcentralized CArbon tokens - ITDE (initial token distribution event) @@ -16,7 +16,6 @@ pragma solidity ^0.4.26; // fork and modifications to fix DECA's ICO needs by p1r0 and kaicudon // ---------------------------------------------------------------------------- - // ---------------------------------------------------------------------------- // Safe maths // ---------------------------------------------------------------------------- @@ -39,7 +38,6 @@ contract SafeMath { } } - // ---------------------------------------------------------------------------- // ERC Token Standard #20 Interface // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md @@ -56,7 +54,6 @@ contract ERC20Interface { event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } - // ---------------------------------------------------------------------------- // Contract function to receive approval and execute function in one call // @@ -66,7 +63,6 @@ contract ApproveAndCallFallBack { function receiveApproval(address from, uint256 tokens, address token, bytes data) public; } - // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- @@ -89,9 +85,11 @@ contract Owned { function updateCCDBAddress(string CCDBAddress) public onlyOwner { _CCDBAddress = CCDBAddress; } + function transferOwnership(address _newOwner) public onlyOwner { newOwner = _newOwner; } + function acceptOwnership() public { require(msg.sender == newOwner); emit OwnershipTransferred(owner, newOwner); @@ -100,42 +98,24 @@ contract Owned { } } - // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ---------------------------------------------------------------------------- contract DECAToken is ERC20Interface, Owned, SafeMath { - string public symbol; - string public name; - uint8 public decimals; + string public symbol = "DECA"; + string public name = "DEcentralized CArbon tokens"; + uint8 public decimals = 18; uint public _totalSupply; - uint public startDate; - uint public preICOEnds; - uint public bonus1Ends; - uint public bonus2Ends; - uint public endDate; + //for testing change weeks for hours... + uint public preICOEnds = now + 1 hours; + uint public bonus1Ends = now + 3 hours; + uint public bonus2Ends = now + 6 hours; + uint public endDate = now + 11 hours; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; - - // ------------------------------------------------------------------------ - // Constructor - // ------------------------------------------------------------------------ - constructor () public { - symbol = "DECA"; - name = "DEcentralized CArbon tokens"; - decimals = 18; - //for testing change weeks for days... - preICOEnds = now + 1 weeks; - bonus1Ends = now + 3 weeks; - bonus2Ends = now + 6 weeks; - endDate = now + 11 weeks; - - } - - // ------------------------------------------------------------------------ // Total supply: Get the total token supply // ------------------------------------------------------------------------ @@ -151,7 +131,6 @@ contract DECAToken is ERC20Interface, Owned, SafeMath { return balances[tokenOwner]; } - // ------------------------------------------------------------------------ // Transfer the balance from token owner's account to `to` account // - Owner's account must have sufficient balance to transfer @@ -164,7 +143,6 @@ contract DECAToken is ERC20Interface, Owned, SafeMath { return true; } - // ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account @@ -174,11 +152,38 @@ contract DECAToken is ERC20Interface, Owned, SafeMath { // as this should be implemented in user interfaces // ------------------------------------------------------------------------ function approve(address spender, uint tokens) public returns (bool success) { - allowed[msg.sender][spender] = tokens; - emit Approval(msg.sender, spender, tokens); + // approve should only be called when setting an initial allowance, + // or when resetting it to zero. To increase and decrease it, use + // 'increaseApproval' and 'decreaseApproval' + if (allowed[msg.sender][spender] == 0 || tokens == 0){ + emit Approval(msg.sender, spender, tokens); + return true; + } + return false; + } + + /* + * approve should be called when allowed[spender] == 0. To increment + * allowed value is better to use this function to avoid 2 calls (and wait until + * the first transaction is mined) + */ + function increaseApproval (address spender, uint tokens) public returns (bool success){ + allowed[msg.sender][spender] = safeAdd(allowed[msg.sender][spender], tokens); + emit Approval(msg.sender, spender, allowed[msg.sender][spender]); return true; } + function decreaseApproval (address spender, uint tokens) public returns (bool success) { + uint oldValue = allowed[msg.sender][spender]; + if (tokens > oldValue) { + allowed[msg.sender][spender] = 0; + } + else{ + allowed[msg.sender][spender] = safeSub(oldValue, tokens); + } + emit Approval(msg.sender, spender, allowed[msg.sender][spender]); + return true; + } // ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account @@ -197,7 +202,6 @@ contract DECAToken is ERC20Interface, Owned, SafeMath { return true; } - // ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account @@ -206,7 +210,6 @@ contract DECAToken is ERC20Interface, Owned, SafeMath { return allowed[tokenOwner][spender]; } - // ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account. The `spender` contract function @@ -223,13 +226,13 @@ contract DECAToken is ERC20Interface, Owned, SafeMath { // 1,000 DECA Tokens per 1 ETH // ------------------------------------------------------------------------ function () public payable { - require(now >= startDate && now <= endDate); + require(now <= endDate); uint tokens; uint toOwner; uint toSender; - uint percentage; + uint divBy; - percentage = 2; // percentage that goes to the owner + divBy = 10; // division to get 10% if (now <= preICOEnds) { tokens = msg.value * 2000; @@ -240,17 +243,21 @@ contract DECAToken is ERC20Interface, Owned, SafeMath { } else { tokens = msg.value * 1000; } - toOwner = safeDiv(tokens, percentage); // percentage assigned to the contract owner (DAO) + toOwner = safeDiv(tokens, divBy); // divBy to get the percentage assigned to the contract owner (for exchange to Cabron Credits) toSender = tokens; // tokens goes to sender balances[msg.sender] = safeAdd(balances[msg.sender], toSender); balances[owner] = safeAdd(balances[owner], toOwner); - _totalSupply = safeAdd(_totalSupply, safeAdd(tokens,safeDiv(tokens, percentage))); + _totalSupply = safeAdd(_totalSupply, safeAdd(toSender,toOwner)); emit Transfer(address(0), msg.sender, toSender); emit Transfer(address(0), owner, toOwner); - owner.transfer(msg.value); } - + //Close down the ICO and Claim the Ether. + function getETH() public onlyOwner { + require(now >= endDate ); + // transfer the ETH balance in the contract to the owner + owner.transfer(address(this).balance); + } // ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens @@ -258,4 +265,4 @@ contract DECAToken is ERC20Interface, Owned, SafeMath { function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); } -} +} \ No newline at end of file diff --git a/DECA_ERC20_0.5.3.sol b/DECA_ERC20_0.5.3.sol new file mode 100644 index 0000000..e7da5bf --- /dev/null +++ b/DECA_ERC20_0.5.3.sol @@ -0,0 +1,272 @@ +pragma solidity 0.5.3; + +// ---------------------------------------------------------------------------- +// 'DECA' DEcentralized CArbon tokens - ITDE (initial token distribution event) +// +// Deployed to : ------ +// Network : Ropsten +// Symbol : DECA +// Name : Decentralized Carbon tokens +// Total supply: Gazillion +// Decimals : 18 +// +// (c) by Moritz Neto & Daniel Bar with BokkyPooBah / Bok Consulting Pty Ltd Au 2017. The MIT Licence. +// fork and modifications to fix DECA's ICO needs by p1r0 , +// Oscar and kaicudon +// ---------------------------------------------------------------------------- + +// ---------------------------------------------------------------------------- +// Safe maths +// ---------------------------------------------------------------------------- +contract SafeMath { + function safeAdd(uint a, uint b) internal pure returns (uint c) { + c = a + b; + require(c >= a); + } + function safeSub(uint a, uint b) internal pure returns (uint c) { + require(b <= a); + c = a - b; + } + function safeMul(uint a, uint b) internal pure returns (uint c) { + c = a * b; + require(a == 0 || c / a == b); + } + function safeDiv(uint a, uint b) internal pure returns (uint c) { + require(b > 0); + c = a / b; + } +} + +// ---------------------------------------------------------------------------- +// ERC Token Standard #20 Interface +// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md +// ---------------------------------------------------------------------------- +contract ERC20Interface { + function getTotalSupply() public view returns (uint); + function balanceOf(address tokenOwner) public view returns (uint balance); + function allowance(address tokenOwner, address spender) public view returns (uint remaining); + function transfer(address to, uint tokens) public returns (bool success); + function approve(address spender, uint tokens) public returns (bool success); + function increaseApproval (address spender, uint tokens) public returns (bool success); + function decreaseApproval (address spender, uint tokens) public returns (bool success); + function transferFrom(address from, address to, uint tokens) public returns (bool success); + + event Transfer(address indexed from, address indexed to, uint tokens); + event Approval(address indexed tokenOwner, address indexed spender, uint tokens); +} + +// ---------------------------------------------------------------------------- +// Contract function to receive approval and execute function in one call +// Borrowed from MiniMeToken +// ---------------------------------------------------------------------------- +contract ApproveAndCallFallBack { + function receiveApproval(address from, uint256 tokens, address token, bytes memory data) public; +} + +// ---------------------------------------------------------------------------- +// Owned contract +// ---------------------------------------------------------------------------- +contract Owned { + address payable public owner; + address payable public newOwner; + string public CCDBAddress; + + event OwnershipTransferred(address indexed _from, address indexed _to); + + constructor () public { + owner = msg.sender; + } + + modifier onlyOwner { + require(msg.sender == owner); + _; + } + // ---------------------------------------------------------------------------- + //Function that updates the orbitDB address at IPFS + //This database will store the carbon credits gotten by the 20% DECAS that the contract owner recives + // ---------------------------------------------------------------------------- + function updateCCDBAddress(string memory _CCDBAddress) public onlyOwner { + CCDBAddress = _CCDBAddress; + } + function transferOwnership(address payable _newOwner) public onlyOwner { + newOwner = _newOwner; + } + function acceptOwnership() public { + require(msg.sender == newOwner); + emit OwnershipTransferred(owner, newOwner); + owner = newOwner; + newOwner = address(0); + } +} + + +// ---------------------------------------------------------------------------- +// ERC20 Token, with the addition of symbol, name and decimals and assisted +// token transfers +// ---------------------------------------------------------------------------- +contract DECAToken is ERC20Interface, Owned, SafeMath { + string constant public symbol = "DECA"; + string constant public name = "DEcentralized CArbon tokens"; + uint8 constant public decimals = 18; + uint public totalSupply; + //for testing change weeks for hours... + uint public preICOEnds = now + 1 hours; + uint public bonus1Ends = now + 3 hours; + uint public bonus2Ends = now + 6 hours; + uint public endDate = now + 11 hours; + + mapping(address => uint) balances; + mapping(address => mapping(address => uint)) allowed; + + // ------------------------------------------------------------------------ + // Total supply: Get the total token supply + // ------------------------------------------------------------------------ + function getTotalSupply() public view returns (uint) { + return totalSupply - balances[address(0)]; + } + + // ------------------------------------------------------------------------ + // Get the token balance for account `tokenOwner` + // ------------------------------------------------------------------------ + function balanceOf(address tokenOwner) public view returns (uint balance) { + return balances[tokenOwner]; + } + + // ------------------------------------------------------------------------ + // Transfer the balance from token owner's account to `to` account + // - Owner's account must have sufficient balance to transfer + // - 0 value transfers are allowed + // ------------------------------------------------------------------------ + 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); + return true; + } + + // ------------------------------------------------------------------------ + // Token owner can approve for `spender` to transferFrom(...) `tokens` + // from the token owner's account + // ------------------------------------------------------------------------ + function approve(address spender, uint tokens) public returns (bool success) { + // approve should only be called when setting an initial allowance, + // or when resetting it to zero. To increase and decrease it, use + // 'increaseApproval' and 'decreaseApproval' + if (allowed[msg.sender][spender] == 0 || tokens == 0){ + emit Approval(msg.sender, spender, tokens); + return true; + } + return false; + } + + // ------------------------------------------------------------------------ + // approve should be called when allowed[spender] == 0. To increment + // allowed value is better to use this function to avoid 2 calls (and wait until + // the first transaction is mined) + // ------------------------------------------------------------------------ + function increaseApproval (address spender, uint tokens) public returns (bool success){ + allowed[msg.sender][spender] = safeAdd(allowed[msg.sender][spender], tokens); + emit Approval(msg.sender, spender, allowed[msg.sender][spender]); + return true; + } + + function decreaseApproval (address spender, uint tokens) public returns (bool success) { + uint oldValue = allowed[msg.sender][spender]; + if (tokens > oldValue) { + allowed[msg.sender][spender] = 0; + } + else{ + allowed[msg.sender][spender] = safeSub(oldValue, tokens); + } + emit Approval(msg.sender, spender, allowed[msg.sender][spender]); + return true; + } + + // ------------------------------------------------------------------------ + // Transfer `tokens` from the `from` account to the `to` account + // + // The calling account must already have sufficient tokens approve(...)-d + // for spending from the `from` account and + // - From account must have sufficient balance to transfer + // - Spender must have sufficient allowance to transfer + // - 0 value transfers are allowed + // ------------------------------------------------------------------------ + function transferFrom(address from, address to, uint tokens) public returns (bool success) { + 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); + return true; + } + + // ------------------------------------------------------------------------ + // Returns the amount of tokens approved by the owner that can be + // transferred to the spender's account + // ------------------------------------------------------------------------ + function allowance(address tokenOwner, address spender) public view returns (uint remaining) { + return allowed[tokenOwner][spender]; + } + + // ------------------------------------------------------------------------ + // Token owner can approve for `spender` to transferFrom(...) `tokens` + // from the token owner's account. The `spender` contract function + // `receiveApproval(...)` is then executed + // ------------------------------------------------------------------------ + function approveAndCall(address spender, uint tokens, bytes memory data) public returns (bool success) { + allowed[msg.sender][spender] = tokens; + emit Approval(msg.sender, spender, tokens); + ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, address(this), data); + return true; + } + + // ------------------------------------------------------------------------ + // 100 DECA Tokens per 1 ETH + // ------------------------------------------------------------------------ + function () external payable { + require(now <= endDate); + uint tokens; + uint toOwner; + uint toSender; + uint divBy; + // ------------------------------------------------------------------------ + // We want to have 20% of the DECA tokens market cap in order to exchange + // them for carbon credits and have a better decentralization + // NOTE: The Contract Owner must publish this usage in the orbitdb database + // in order to prove that it's not holding using them with any other propose + // (this can be also verified by the blockchain). + // ------------------------------------------------------------------------ + divBy = 4; // 25% extra printed to be 20% of the marketcap, please see README.md + + if (now <= preICOEnds) { + tokens = msg.value * 200; + } else if (now > preICOEnds && now <= bonus1Ends ) { + tokens = msg.value * 150; + } else if (now > bonus1Ends && now <= bonus2Ends) { + tokens = msg.value * 125; + } else { + tokens = msg.value * 100; + } + + toOwner = safeDiv(tokens, divBy); //created 25% extra to the contract owner + toSender = tokens; //tokens that goes to the sender + balances[msg.sender] = safeAdd(balances[msg.sender], toSender); + balances[owner] = safeAdd(balances[owner], toOwner); + totalSupply = safeAdd(totalSupply, safeAdd(toSender,toOwner)); + emit Transfer(address(0), msg.sender, toSender); + emit Transfer(address(0), owner, toOwner); + } + + //Close down the ICO and claim the Ether. + function getETH() public onlyOwner { + require(now >= endDate ); + // transfer the ETH balance in the contract to the owner + owner.transfer(address(this).balance); + } + + // ------------------------------------------------------------------------ + // Owner can transfer out any accidentally sent ERC20 tokens + // ------------------------------------------------------------------------ + function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { + return ERC20Interface(tokenAddress).transfer(owner, tokens); + } +} diff --git a/DECA_IERC20_0.4.18.json b/DECA_IERC20_0.4.18.json deleted file mode 100644 index fe810cd..0000000 --- a/DECA_IERC20_0.4.18.json +++ /dev/null @@ -1 +0,0 @@ -[ { "constant": true, "inputs": [], "name": "name", "outputs": [ { "name": "", "type": "string", "value": "Decentralized Carbon tokens" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0x06fdde03" }, { "constant": false, "inputs": [ { "name": "spender", "type": "address" }, { "name": "tokens", "type": "uint256" } ], "name": "approve", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function", "signature": "0x095ea7b3" }, { "constant": true, "inputs": [], "name": "startDate", "outputs": [ { "name": "", "type": "uint256", "value": "0" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0x0b97bc86" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ { "name": "", "type": "uint256", "value": "0" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0x18160ddd" }, { "constant": false, "inputs": [ { "name": "tokenAddress", "type": "address" }, { "name": "tokens", "type": "uint256" } ], "name": "transferAnyDECAToken", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function", "signature": "0x1893e0fb" }, { "constant": false, "inputs": [ { "name": "from", "type": "address" }, { "name": "to", "type": "address" }, { "name": "tokens", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function", "signature": "0x23b872dd" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [ { "name": "", "type": "uint8", "value": "18" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0x313ce567" }, { "constant": true, "inputs": [], "name": "_CCDBAddress", "outputs": [ { "name": "", "type": "string", "value": "" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0x34dc584d" }, { "constant": true, "inputs": [], "name": "_totalSupply", "outputs": [ { "name": "", "type": "uint256", "value": "0" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0x3eaaf86b" }, { "constant": true, "inputs": [ { "name": "tokenOwner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "name": "balance", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0x70a08231" }, { "constant": false, "inputs": [], "name": "acceptOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function", "signature": "0x79ba5097" }, { "constant": false, "inputs": [ { "name": "CCDBAddress", "type": "string" } ], "name": "updateCCDBAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function", "signature": "0x7a26788e" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address", "value": "0xA18e00831aeE32FE3182E814A183881FCEFB2eD0" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0x8da5cb5b" }, { "constant": true, "inputs": [], "name": "symbol", "outputs": [ { "name": "", "type": "string", "value": "DECA" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0x95d89b41" }, { "constant": false, "inputs": [ { "name": "to", "type": "address" }, { "name": "tokens", "type": "uint256" } ], "name": "transfer", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function", "signature": "0xa9059cbb" }, { "constant": true, "inputs": [], "name": "endDate", "outputs": [ { "name": "", "type": "uint256", "value": "1567276288" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0xc24a0f8b" }, { "constant": false, "inputs": [ { "name": "spender", "type": "address" }, { "name": "tokens", "type": "uint256" }, { "name": "data", "type": "bytes" } ], "name": "approveAndCall", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function", "signature": "0xcae9ca51" }, { "constant": true, "inputs": [], "name": "newOwner", "outputs": [ { "name": "", "type": "address", "value": "0x0000000000000000000000000000000000000000" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0xd4ee1d90" }, { "constant": true, "inputs": [ { "name": "tokenOwner", "type": "address" }, { "name": "spender", "type": "address" } ], "name": "allowance", "outputs": [ { "name": "remaining", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0xdd62ed3e" }, { "constant": true, "inputs": [], "name": "bonus1Ends", "outputs": [ { "name": "", "type": "uint256", "value": "1566585088" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0xe8294aad" }, { "constant": true, "inputs": [], "name": "bonus2Ends", "outputs": [ { "name": "", "type": "uint256", "value": "1566844288" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0xef0b44db" }, { "constant": false, "inputs": [ { "name": "_newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function", "signature": "0xf2fde38b" }, { "constant": true, "inputs": [], "name": "preICOEnds", "outputs": [ { "name": "", "type": "uint256", "value": "1566412288" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0xfc5fc8ae" }, { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor", "signature": "constructor" }, { "payable": true, "stateMutability": "payable", "type": "fallback" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "_from", "type": "address" }, { "indexed": true, "name": "_to", "type": "address" } ], "name": "OwnershipTransferred", "type": "event", "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "from", "type": "address" }, { "indexed": true, "name": "to", "type": "address" }, { "indexed": false, "name": "tokens", "type": "uint256" } ], "name": "Transfer", "type": "event", "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "tokenOwner", "type": "address" }, { "indexed": true, "name": "spender", "type": "address" }, { "indexed": false, "name": "tokens", "type": "uint256" } ], "name": "Approval", "type": "event", "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" } ] diff --git a/DECA_IERC20_0.4.26.json b/DECA_IERC20_0.4.26.json new file mode 100644 index 0000000..4dadc9c --- /dev/null +++ b/DECA_IERC20_0.4.26.json @@ -0,0 +1,493 @@ +[ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "tokens", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "getETH", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "tokens", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_CCDBAddress", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "tokens", + "type": "uint256" + } + ], + "name": "decreaseApproval", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenOwner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "CCDBAddress", + "type": "string" + } + ], + "name": "updateCCDBAddress", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "tokens", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "endDate", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "tokens", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "tokens", + "type": "uint256" + } + ], + "name": "increaseApproval", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "tokenAddress", + "type": "address" + }, + { + "name": "tokens", + "type": "uint256" + } + ], + "name": "transferAnyERC20Token", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenOwner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "remaining", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "bonus1Ends", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "bonus2Ends", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "preICOEnds", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "name": "_to", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "tokens", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "tokenOwner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "tokens", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } +] diff --git a/DECA_IERC20_0.5.3.json b/DECA_IERC20_0.5.3.json new file mode 100644 index 0000000..fb501fa --- /dev/null +++ b/DECA_IERC20_0.5.3.json @@ -0,0 +1,493 @@ +[ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "tokens", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "getETH", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "tokens", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "tokens", + "type": "uint256" + } + ], + "name": "decreaseApproval", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenOwner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_CCDBAddress", + "type": "string" + } + ], + "name": "updateCCDBAddress", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "tokens", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "endDate", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getTotalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "tokens", + "type": "uint256" + }, + { + "name": "data", + "type": "bytes" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CCDBAddress", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "tokens", + "type": "uint256" + } + ], + "name": "increaseApproval", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "tokenAddress", + "type": "address" + }, + { + "name": "tokens", + "type": "uint256" + } + ], + "name": "transferAnyERC20Token", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "tokenOwner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "remaining", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "bonus1Ends", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "bonus2Ends", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "preICOEnds", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "name": "_to", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "tokens", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "tokenOwner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "tokens", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } +]