Sponsored:   Ubex.com - World roadshow: Seoul Sep 17-19, Singapore Sep 19-20, Dubai 18-23. Meet us!.
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 1 txn
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), NestedArrayFunctionCallDecoder (medium-severity), ZeroFunctionSelector (very low-severity), DelegateCallReturnValue (low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: TEST_Crowdsale
Compiler Text: v0.4.14+commit.c2215d46
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.13;

contract token {
    function transfer(address _to, uint256 _value);
    function balanceOf(address _owner) constant returns (uint256 balance);	
}

contract TEST_Crowdsale {
    
    token public sharesTokenAddress; 
    address public owner;
    address public safeContract;

	uint public TIMEstartICO = 1513728000; 
	uint public stopICO = 1521504000;
	uint febr20 = 1519084800;
	uint jan20 = 1516406400;
	uint public price = 0.0035 * 1 ether; 
	uint coeff = 100000; 
	
	uint256 public tokenSold = 0;
	uint256 public tokenFree = 0; 
	bool public crowdsaleClosed = false;
    bool public tokenWithdraw = false;
	
	event TokenFree(uint256 value);
	event CrowdsaleClosed(bool value);
    
	function TEST_Crowdsale(address _tokenAddress, address _owner, address _stopScamHolder) {
		owner = _owner;
		sharesTokenAddress = token(_tokenAddress);
		safeContract = _stopScamHolder;
	}

	function() payable {
	    
	    if(now > febr20) price = 0.0105 * 1 ether; 
	    else if(now > jan20) price = 0.0070 * 1 ether; 
	    
		tokenFree = sharesTokenAddress.balanceOf(this);
		
		if (now < TIMEstartICO) {
		    msg.sender.transfer(msg.value);
		}
		else if (now > stopICO) {
			msg.sender.transfer(msg.value);
			if(!tokenWithdraw){ 
			    sharesTokenAddress.transfer(safeContract, sharesTokenAddress.balanceOf(this));
			    tokenFree = sharesTokenAddress.balanceOf(this);
			    tokenWithdraw = true;
			    crowdsaleClosed = true;
			}
		} 
		else if (crowdsaleClosed) {
			msg.sender.transfer(msg.value); 
		} 
		else {
			uint256 tokenToBuy = msg.value / price * coeff; 
			if(tokenToBuy <= 0) msg.sender.transfer(msg.value); 
			require(tokenToBuy > 0);
			uint256 actualETHTransfer = tokenToBuy * price / coeff;
			if (tokenFree >= tokenToBuy) { 
				owner.transfer(actualETHTransfer);
				if (msg.value > actualETHTransfer){ 
					msg.sender.transfer(msg.value - actualETHTransfer);
				}
				sharesTokenAddress.transfer(msg.sender, tokenToBuy);
				tokenSold += tokenToBuy;
				tokenFree -= tokenToBuy;
				if(tokenFree==0) crowdsaleClosed = true;
			} else { 
				uint256 sendETH = tokenFree * price / coeff;
				owner.transfer(sendETH); 
				sharesTokenAddress.transfer(msg.sender, tokenFree); 
				msg.sender.transfer(msg.value - sendETH); 
				tokenSold += tokenFree;
				tokenFree = sharesTokenAddress.balanceOf(this);
				crowdsaleClosed = true;
			}
		}
		TokenFree(tokenFree);
		CrowdsaleClosed(crowdsaleClosed);
	}
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"sharesTokenAddress","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenWithdraw","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenSold","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"TIMEstartICO","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenFree","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"price","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"stopICO","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"crowdsaleClosed","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"safeContract","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"inputs":[{"name":"_tokenAddress","type":"address"},{"name":"_owner","type":"address"},{"name":"_stopScamHolder","type":"address"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"value","type":"uint256"}],"name":"TokenFree","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"value","type":"bool"}],"name":"CrowdsaleClosed","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052635a39a800600355635ab04f00600455635a8b6500600555635a628680600655660c6f3b40b6c000600755620186a060085560006009819055600a55600b805461ffff19169055341561005657600080fd5b6040516060806109e78339810160405280805191906020018051919060200180519150505b60018054600160a060020a03808516600160a060020a0319928316179092556000805486841690831617905560028054928416929091169190911790555b5050505b61091b806100cc6000396000f300606060405236156100885763ffffffff60e060020a60003504166327ebcf0e81146106f957806330c74e0414610728578063519ee19e1461074f5780638da5cb5b14610774578063916b5cfa146107a357806396c5406d146107c8578063a035b1fe146107ed578063c8e569a814610812578063ccb07cef14610837578063f9081ba21461085e575b5b60008060006005544211156100a85766254db1c22440006007556100be565b6006544211156100be576618de76816d80006007555b5b60008054600160a060020a0316906370a082319030906040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561011a57600080fd5b6102c65a03f1151561012b57600080fd5b5050506040518051600a555060035442101561017857600160a060020a0333163480156108fc0290604051600060405180830381858888f19350505050151561017357600080fd5b610680565b60045442111561033957600160a060020a0333163480156108fc0290604051600060405180830381858888f1935050505015156101b457600080fd5b600b54610100900460ff1615156101735760008054600254600160a060020a039182169263a9059cbb929091169083906370a082319030906040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561023157600080fd5b6102c65a03f1151561024257600080fd5b5050506040518051905060405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561028f57600080fd5b6102c65a03f115156102a057600080fd5b505060008054600160a060020a031691506370a082319030906040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156102fe57600080fd5b6102c65a03f1151561030f57600080fd5b5050506040518051600a5550600b805460ff1961ff0019909116610100171660011790555b610680565b600b5460ff161561037b57600160a060020a0333163480156108fc0290604051600060405180830381858888f19350505050151561017357600080fd5b610680565b6008546007543481151561038b57fe5b04029250600083116103c957600160a060020a0333163480156108fc0290604051600060405180830381858888f1935050505015156103c957600080fd5b5b600083116103d757600080fd5b60085460075484028115156103e857fe5b04915082600a541015156104fd57600154600160a060020a031682156108fc0283604051600060405180830381858888f19350505050151561042957600080fd5b813411156104665733600160a060020a03166108fc8334039081150290604051600060405180830381858888f19350505050151561046657600080fd5b5b600054600160a060020a031663a9059cbb338560405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156104bd57600080fd5b6102c65a03f115156104ce57600080fd5b5050600980548501905550600a805484900390819055151561017357600b805460ff191660011790555b610680565b600854600754600a540281151561051057fe5b6001549190049150600160a060020a031681156108fc0282604051600060405180830381858888f19350505050151561054857600080fd5b600054600a54600160a060020a039091169063a9059cbb90339060405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156105a557600080fd5b6102c65a03f115156105b657600080fd5b50505033600160a060020a03166108fc8234039081150290604051600060405180830381858888f1935050505015156105ee57600080fd5b600a5460098054909101905560008054600160a060020a0316906370a082319030906040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561065557600080fd5b6102c65a03f1151561066657600080fd5b5050506040518051600a5550600b805460ff191660011790555b5b5b5b7f85e41e7e886c0f7ecfd1244a971d24ef6642f4167a6ae2351d701101e4b5c3af600a5460405190815260200160405180910390a1600b547f26c4e8a8234d09f52198046894a4c654d79af230b4b261ac1abde16d6667300d9060ff16604051901515815260200160405180910390a15b505050005b341561070457600080fd5b61070c61088d565b604051600160a060020a03909116815260200160405180910390f35b341561073357600080fd5b61073b61089c565b604051901515815260200160405180910390f35b341561075a57600080fd5b6107626108aa565b60405190815260200160405180910390f35b341561077f57600080fd5b61070c6108b0565b604051600160a060020a03909116815260200160405180910390f35b34156107ae57600080fd5b6107626108bf565b60405190815260200160405180910390f35b34156107d357600080fd5b6107626108c5565b60405190815260200160405180910390f35b34156107f857600080fd5b6107626108cb565b60405190815260200160405180910390f35b341561081d57600080fd5b6107626108d1565b60405190815260200160405180910390f35b341561084257600080fd5b61073b6108d7565b604051901515815260200160405180910390f35b341561086957600080fd5b61070c6108e0565b604051600160a060020a03909116815260200160405180910390f35b600054600160a060020a031681565b600b54610100900460ff1681565b60095481565b600154600160a060020a031681565b60035481565b600a5481565b60075481565b60045481565b600b5460ff1681565b600254600160a060020a0316815600a165627a7a72305820f74fa4e39cec2c2af9ae7cfb6bc40ffd13624616847ec42bc7e29bb7ce932a660029000000000000000000000000acb65cc264aecb5aeb872763dcf46d34d172da3d000000000000000000000000bf783daf2c629669ab20ecb9f8f21f8e580ef118000000000000000000000000e010d0a52791340db3323b77700817546a062109

    Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000acb65cc264aecb5aeb872763dcf46d34d172da3d000000000000000000000000bf783daf2c629669ab20ecb9f8f21f8e580ef118000000000000000000000000e010d0a52791340db3323b77700817546a062109

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000acb65cc264aecb5aeb872763dcf46d34d172da3d
Arg [1] : 000000000000000000000000bf783daf2c629669ab20ecb9f8f21f8e580ef118
Arg [2] : 000000000000000000000000e010d0a52791340db3323b77700817546a062109


   Swarm Source:
bzzr://f74fa4e39cec2c2af9ae7cfb6bc40ffd13624616847ec42bc7e29bb7ce932a66

 

View All
Block Age transaction Difficulty Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.