Token BitcoinGalaxy

 

Overview [ERC-20]

Max Total Supply:
21,000,000 BTCG

Holders:
8,756 (0.00%)

Transfers:
-

 
Loading
[ Download CSV Export  ] 
Loading
[ Download CSV Export  ] 
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BitcoinGalaxy

Compiler Version
v0.4.20-nightly.2017.12.20+commit.efc198d5

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2017-12-24
*/

pragma solidity ^0.4.18;

contract BitcoinGalaxy {
    string public symbol = "BTCG";
    string public name = "BitcoinGalaxy";
    uint8 public constant decimals = 8;
    uint256 _totalSupply = 0;
	uint256 _maxTotalSupply = 2100000000000000;
	uint256 _adminsupply = 500000000000000;//Admin Supply of 5 Million Coins
	uint256 _miningReward = 10000000000; //1 BTCG - To be halved every 4 years
	uint256 _maxMiningReward = 1000000000000; //50 BTCG - To be halved every 4 years
	uint256 _rewardHalvingTimePeriod = 126227704; //4 years
	uint256 _nextRewardHalving = now + _rewardHalvingTimePeriod;
	uint256 _rewardTimePeriod = 600; //10 minutes
	uint256 _AdminSupplyTime = 600; //20 minutes
	uint256 _currentTime = now; //20 minutes
	uint256 _AdminSupplyEnd = now + _AdminSupplyTime; //20 minutes
	uint256 _rewardStart = now;
	uint256 _rewardEnd = now + _rewardTimePeriod;
	uint256 _currentMined = 0;
    
    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
 
    mapping(address => uint256) balances;
 
    mapping(address => mapping (address => uint256)) allowed;
 
    function totalSupply() public constant returns (uint256) {        
		return _totalSupply;
    }
 
    function balanceOf(address _owner) public constant returns (uint256 balance) {
        return balances[_owner];
    }
    
   function AdminSupply() public returns (bool success)
	{
		if (now < _AdminSupplyEnd)
		{
			balances[msg.sender] += _adminsupply;
			_currentMined += _adminsupply;
			_totalSupply += _adminsupply;
			Transfer(this, msg.sender, _adminsupply);
			return true;
		}				
		return false;
	}
     
    function transfer(address _to, uint256 _amount) public returns (bool success) {
        if (balances[msg.sender] >= _amount 
            && _amount > 0
            && balances[_to] + _amount > balances[_to]) {
            balances[msg.sender] -= _amount;
            balances[_to] += _amount;
            Transfer(msg.sender, _to, _amount);
            return true;
        } else {
            return false;
        }
    }
 
    function transferFrom(
        address _from,
        address _to,
        uint256 _amount
    ) public returns (bool success) {
        if (balances[_from] >= _amount
            && allowed[_from][msg.sender] >= _amount
            && _amount > 0
            && balances[_to] + _amount > balances[_to]) {
            balances[_from] -= _amount;
            allowed[_from][msg.sender] -= _amount;
            balances[_to] += _amount;
            Transfer(_from, _to, _amount);
            return true;
        } else {
            return false;
        }
    }
 
    function approve(address _spender, uint256 _amount) public returns (bool success) {
        allowed[msg.sender][_spender] = _amount;
        Approval(msg.sender, _spender, _amount);
        return true;
    }
 
    function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
        return allowed[_owner][_spender];
    }
	
	function Mine() public returns (bool success)
	{
		if (now < _rewardEnd && _currentMined >= _maxMiningReward)
			revert();
		else if (now >= _rewardEnd)
		{
			_rewardStart = now;
			_rewardEnd = now + _rewardTimePeriod;
			_currentMined = 0;
		}
	
		if (now >= _nextRewardHalving)
		{
			_nextRewardHalving = now + _rewardHalvingTimePeriod;
			_miningReward = _miningReward / 2;
			_maxMiningReward = _maxMiningReward / 2;
			_currentMined = 0;
			_rewardStart = now;
			_rewardEnd = now + _rewardTimePeriod;
		}	
		
		if ((_currentMined < _maxMiningReward) && (_totalSupply < _maxTotalSupply))
		{
			balances[msg.sender] += _miningReward;
			_currentMined += _miningReward;
			_totalSupply += _miningReward;
			Transfer(this, msg.sender, _miningReward);
			return true;
		}				
		return false;
	}
	
	function MaxTotalSupply() public constant returns(uint256)
	{
		return _maxTotalSupply;
	}
	
	function MiningReward() public constant returns(uint256)
	{
		return _miningReward;
	}
	
	function MaxMiningReward() public constant returns(uint256)
	{
		return _maxMiningReward;
	}
	
	function RewardHalvingTimePeriod() public constant returns(uint256)
	{
		return _rewardHalvingTimePeriod;
	}
	
	function NextRewardHalving() public constant returns(uint256)
	{
		return _nextRewardHalving;
	}
	
	function RewardTimePeriod() public constant returns(uint256)
	{
		return _rewardTimePeriod;
	}
	
	function RewardStart() public constant returns(uint256)
	{
		return _rewardStart;
	}
	
	function RewardEnd() public constant returns(uint256)
	{
		return _rewardEnd;
	}
	
	function CurrentMined() public constant returns(uint256)
	{
		return _currentMined;
	}
	
	function TimeNow() public constant returns(uint256)
	{
		return now;
	}
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"NextRewardHalving","outputs":[{"name":"","type":"uint256"}],"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":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","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":"Mine","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MaxMiningReward","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"RewardStart","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"RewardHalvingTimePeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"AdminSupply","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"RewardTimePeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MiningReward","outputs":[{"name":"","type":"uint256"}],"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":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"RewardEnd","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"TimeNow","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CurrentMined","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MaxTotalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"}]

60606040526040805190810160405280600481526020017f4254434700000000000000000000000000000000000000000000000000000000815250600090805190602001906200005192919062000118565b506040805190810160405280600d81526020017f426974636f696e47616c61787900000000000000000000000000000000000000815250600190805190602001906200009f92919062000118565b506000600255660775f05a0740006003556601c6bf526340006004556402540be40060055564e8d4a5100060065563078614f86007556007544201600855610258600955610258600a5542600b55600a544201600c5542600d556009544201600e556000600f5534156200011257600080fd5b620001c7565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200015b57805160ff19168380011785556200018c565b828001600101855582156200018c579182015b828111156200018b5782518255916020019190600101906200016e565b5b5090506200019b91906200019f565b5090565b620001c491905b80821115620001c0576000816000905550600101620001a6565b5090565b90565b6111a580620001d76000396000f30060606040526004361061011d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde0314610122578063095ea7b3146101b05780630c3980ef1461020a57806318160ddd1461023357806323b872dd1461025c578063313ce567146102d557806342c8705b146103045780634668f372146103315780635d7e994a1461035a578063662a719b1461038357806369a4c408146103ac57806370a08231146103d95780638a5910a5146104265780638a61dcb71461044f57806395d89b4114610478578063a9059cbb14610506578063b579d7de14610560578063b597842a14610589578063cc0a26d1146105b2578063da0f039d146105db578063dd62ed3e14610604575b600080fd5b341561012d57600080fd5b610135610670565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561017557808201518184015260208101905061015a565b50505050905090810190601f1680156101a25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101bb57600080fd5b6101f0600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061070e565b604051808215151515815260200191505060405180910390f35b341561021557600080fd5b61021d610800565b6040518082815260200191505060405180910390f35b341561023e57600080fd5b61024661080a565b6040518082815260200191505060405180910390f35b341561026757600080fd5b6102bb600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610814565b604051808215151515815260200191505060405180910390f35b34156102e057600080fd5b6102e8610b1b565b604051808260ff1660ff16815260200191505060405180910390f35b341561030f57600080fd5b610317610b20565b604051808215151515815260200191505060405180910390f35b341561033c57600080fd5b610344610cc8565b6040518082815260200191505060405180910390f35b341561036557600080fd5b61036d610cd2565b6040518082815260200191505060405180910390f35b341561038e57600080fd5b610396610cdc565b6040518082815260200191505060405180910390f35b34156103b757600080fd5b6103bf610ce6565b604051808215151515815260200191505060405180910390f35b34156103e457600080fd5b610410600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ddd565b6040518082815260200191505060405180910390f35b341561043157600080fd5b610439610e26565b6040518082815260200191505060405180910390f35b341561045a57600080fd5b610462610e30565b6040518082815260200191505060405180910390f35b341561048357600080fd5b61048b610e3a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104cb5780820151818401526020810190506104b0565b50505050905090810190601f1680156104f85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561051157600080fd5b610546600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ed8565b604051808215151515815260200191505060405180910390f35b341561056b57600080fd5b6105736110cc565b6040518082815260200191505060405180910390f35b341561059457600080fd5b61059c6110d6565b6040518082815260200191505060405180910390f35b34156105bd57600080fd5b6105c56110de565b6040518082815260200191505060405180910390f35b34156105e657600080fd5b6105ee6110e8565b6040518082815260200191505060405180910390f35b341561060f57600080fd5b61065a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506110f2565b6040518082815260200191505060405180910390f35b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107065780601f106106db57610100808354040283529160200191610706565b820191906000526020600020905b8154815290600101906020018083116106e957829003601f168201915b505050505081565b600081601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600854905090565b6000600254905090565b600081601060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156108e1575081601160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156108ed5750600082115b80156109785750601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482601060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401115b15610b0f5781601060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081601160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081601060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050610b14565b600090505b9392505050565b600881565b6000600e5442108015610b375750600654600f5410155b15610b4157600080fd5b600e5442101515610b675742600d819055506009544201600e819055506000600f819055505b60085442101515610bc25760075442016008819055506002600554811515610b8b57fe5b046005819055506002600654811515610ba057fe5b046006819055506000600f8190555042600d819055506009544201600e819055505b600654600f54108015610bd85750600354600254105b15610cc057600554601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600554600f600082825401925050819055506005546002600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6005546040518082815260200191505060405180910390a360019050610cc5565b600090505b90565b6000600654905090565b6000600d54905090565b6000600754905090565b6000600c54421015610dd557600454601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600454600f600082825401925050819055506004546002600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6004546040518082815260200191505060405180910390a360019050610dda565b600090505b90565b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600954905090565b6000600554905090565b60008054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ed05780601f10610ea557610100808354040283529160200191610ed0565b820191906000526020600020905b815481529060010190602001808311610eb357829003601f168201915b505050505081565b600081601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158015610f295750600082115b8015610fb45750601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482601060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401115b156110c15781601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081601060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190506110c6565b600090505b92915050565b6000600e54905090565b600042905090565b6000600f54905090565b6000600354905090565b6000601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050929150505600a165627a7a72305820c2bcfb6318cf6d173261dad7a3e350c44f57e23b79762c44f2a37719c318e20a0029

Swarm Source

bzzr://c2bcfb6318cf6d173261dad7a3e350c44f57e23b79762c44f2a37719c318e20a

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.