Contract 0xbb3B11BbC8c48B4Ee17149dD374564C89139Ff01

 

TxHash Block Age From To Value [TxFee]
0x97607055a5403cf9587b5e4ba905d2c21f3a44775f784b667e9011d87d00c2775220318344 days 7 hrs ago0xf477af69dbdc7ce072524bf0b33b8de027562550  IN   0xbb3b11bbc8c48b4ee17149dd374564c89139ff010.101 Ether0.000063
0x5b4f041958f7cd5d148ab5cbb464e35fae2b5a7ffd24cd953e5065838c20a7e85220252344 days 7 hrs ago0xf477af69dbdc7ce072524bf0b33b8de027562550  IN   0xbb3b11bbc8c48b4ee17149dd374564c89139ff010.107160152441508 Ether0.000063
0xa1d4810171f6b0e64c883a49b83acffa4c92c0979162e7a17bb20e55e11b44cc5211210345 days 20 hrs ago0x17175ae92c5595e43166cc59a78da3cd88d71656  IN   0xbb3b11bbc8c48b4ee17149dd374564c89139ff010.014 Ether0.000257955
0xf641fa493722fe3593cb71a07a80c77247e09a5265ad7b45bc211b6987e083d15211077345 days 21 hrs ago0x2b830933d565a2476ed1a424bdb4f7ee02dc37cc  IN   Contract Creation0 Ether0.00393806
[ Download CSV Export 

Latest 1 Internal Transaction Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0xa1d4810171f6b0e64c883a49b83acffa4c92c0979162e7a17bb20e55e11b44cc5211210345 days 20 hrs ago0xbb3b11bbc8c48b4ee17149dd374564c89139ff010x2b830933d565a2476ed1a424bdb4f7ee02dc37cc0.014 Ether
[ Download CSV Export 
Warning: The compiled contract might be susceptible to ExpExponentCleanup (medium/high-severity), NestedArrayFunctionCallDecoder (medium-severity), ZeroFunctionSelector (very low-severity) Solidity Compiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: IcoContract
Compiler Version: v0.4.16+commit.d7661dd9
Optimization Enabled: Yes
Runs (Optimizer):  200


Contract Source Code
pragma solidity ^0.4.15;

//EKN: deploy with Current version:0.4.16+commit.d7661dd9.Emscripten.clang

// ================= Ownable Contract start =============================
/*
 * Ownable
 *
 * Base contract with an owner.
 * Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner.
 */
contract Ownable {
  address public owner;

  function Ownable() {
    owner = msg.sender;
  }

  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  function transferOwnership(address newOwner) onlyOwner {
    if (newOwner != address(0)) {
      owner = newOwner;
    }
  }
}

contract SafeMath {

  function safeAdd(uint256 x, uint256 y) internal returns(uint256) {
    uint256 z = x + y;
    assert((z >= x) && (z >= y));
    return z;
  }

  function safeSubtract(uint256 x, uint256 y) internal returns(uint256) {
    assert(x >= y);
    uint256 z = x - y;
    return z;
  }

  function safeMult(uint256 x, uint256 y) internal returns(uint256) {
    uint256 z = x * y;
    assert((x == 0)||(z/x == y));
    return z;
  }
}

/*
 * ERC20 interface
 * see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 {
  uint public totalSupply;
  function balanceOf(address who) constant returns (uint);
  function allowance(address owner, address spender) constant returns (uint);

  function transfer(address to, uint value) returns (bool ok);
  function transferFrom(address from, address to, uint value) returns (bool ok);
  function approve(address spender, uint value) returns (bool ok);
  event Transfer(address indexed from, address indexed to, uint value);
  event Approval(address indexed owner, address indexed spender, uint value);
}

contract StandardToken is ERC20, SafeMath {

  /**
  * @dev Fix for the ERC20 short address attack.
   */
  modifier onlyPayloadSize(uint size) {
    require(msg.data.length >= size + 4) ;
    _;
  }

  mapping(address => uint) balances;
  mapping (address => mapping (address => uint)) allowed;

  function transfer(address _to, uint _value) onlyPayloadSize(2 * 32)  returns (bool success){
    balances[msg.sender] = safeSubtract(balances[msg.sender], _value);
    balances[_to] = safeAdd(balances[_to], _value);
    Transfer(msg.sender, _to, _value);
    return true;
  }

  function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) returns (bool success) {
    var _allowance = allowed[_from][msg.sender];

    balances[_to] = safeAdd(balances[_to], _value);
    balances[_from] = safeSubtract(balances[_from], _value);
    allowed[_from][msg.sender] = safeSubtract(_allowance, _value);
    Transfer(_from, _to, _value);
    return true;
  }

  function balanceOf(address _owner) constant returns (uint balance) {
    return balances[_owner];
  }

  function approve(address _spender, uint _value) returns (bool success) {
    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }

  function allowance(address _owner, address _spender) constant returns (uint remaining) {
    return allowed[_owner][_spender];
  }
}

/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
  event Pause();
  event Unpause();

  bool public paused = false;

  /**
  * @dev modifier to allow actions only when the contract IS paused
  */
  modifier whenNotPaused() {
    require (!paused);
    _;
  }

  /**
  * @dev modifier to allow actions only when the contract IS NOT paused
  */
  modifier whenPaused {
    require (paused) ;
    _;
  }

  /**
  * @dev called by the owner to pause, triggers stopped state
  */
  function pause() onlyOwner whenNotPaused returns (bool) {
    paused = true;
    Pause();
    return true;
  }

  /**
  * @dev called by the owner to unpause, returns to normal state
  */
  function unpause() onlyOwner whenPaused returns (bool) {
    paused = false;
    Unpause();
    return true;
  }
}

// ================= ZIONToken  start =======================

contract IcoToken is SafeMath, StandardToken, Pausable {
  string public name;
  string public symbol;
  uint256 public decimals;
  string public version;
  address public icoContract;
  address public developer_BSR;
  address public developer_EKN;

  //EKN: Reserve initial amount tokens for future ZION projects / Exchanges
  //40 million
  uint256 public constant INITIAL_SUPPLY = 40000000 * 10**18;
  //EKN: Developers share
  //10 million
  uint256 public constant DEVELOPER_SUPPLY = 10000000 * 10**18;

  function IcoToken() {

    name = "ZION Token";
    symbol = "ZION";
    decimals = 18;
    version = "1.0";
    developer_BSR = 0xAEf46875Eb00Ce14B5830b8de2e05aB79dC625d9;
    developer_EKN = 0x1dEB6F7f7F2c4807cE287A8627681044547AB00A;

    balances[msg.sender] = INITIAL_SUPPLY;
    balances[developer_BSR] = DEVELOPER_SUPPLY / 2;
    balances[developer_EKN] = DEVELOPER_SUPPLY / 2;

    totalSupply = INITIAL_SUPPLY + DEVELOPER_SUPPLY;

  }

  function transfer(address _to, uint _value) whenNotPaused returns (bool success) {
    return super.transfer(_to,_value);
  }

  function approve(address _spender, uint _value) whenNotPaused returns (bool success) {
    return super.approve(_spender,_value);
  }

  function balanceOf(address _owner) constant returns (uint balance) {
    return super.balanceOf(_owner);
  }

  function setIcoContract(address _icoContract) onlyOwner {
    if (_icoContract != address(0)) {
      icoContract = _icoContract;
    }
  }

  function sell(address _recipient, uint256 _value) whenNotPaused returns (bool success) {
      assert(_value > 0);
      require(msg.sender == icoContract);

      balances[_recipient] += _value;
      totalSupply += _value;

      Transfer(0x0, owner, _value);
      Transfer(owner, _recipient, _value);
      return true;
  }
}

// ================= Sale Contract Start ====================

contract IcoContract is SafeMath, Pausable {
  IcoToken public ico;

  uint256 public tokenCreationCap;
  uint256 public totalSupply;

  address public ethFundDeposit;
  address public tokenAddress;

  uint256 public fundingStartTime;

  bool public isFinalized;
  uint256 public tokenExchangeRate;

  event LogCreateICO(address from, address to, uint256 val);

  function CreateICO(address to, uint256 val) internal returns (bool success) {
    LogCreateICO(0x0, to, val);
    return ico.sell(to, val);
  }

  function IcoContract(
    address _ethFundDeposit,
    address _tokenAddress,
    uint256 _tokenCreationCap,
    uint256 _tokenExchangeRate,
    uint256 _fundingStartTime

  )
  {
    ethFundDeposit = _ethFundDeposit;         //ETH deposit Address
    tokenAddress = _tokenAddress;             //ERC20 Token address
    tokenCreationCap = _tokenCreationCap;     //"100000000000000000000000000", // 100.000.000 Token
    tokenExchangeRate = _tokenExchangeRate;   //"5000", // Rate: 1 ETH = 5000 Token
    fundingStartTime = _fundingStartTime;     //"1519862400", // StartTime 01/03/2018 (unixtimestamp.com)
    ico = IcoToken(tokenAddress);
    isFinalized = false;

  }

  function () payable {
    createTokens(msg.sender, msg.value);
  }

  /// @dev Accepts ether and creates new ICO tokens.
  function createTokens(address _beneficiary, uint256 _value) internal whenNotPaused {
    require (tokenCreationCap > totalSupply);
    require (now >= fundingStartTime);
    require (!isFinalized);

    uint256 tokens = safeMult(_value, tokenExchangeRate);
    uint256 checkedSupply = safeAdd(totalSupply, tokens);

    if (tokenCreationCap < checkedSupply) {
      uint256 tokensToAllocate = safeSubtract(tokenCreationCap, totalSupply);
      uint256 tokensToRefund   = safeSubtract(tokens, tokensToAllocate);
      totalSupply = tokenCreationCap;
      uint256 etherToRefund = tokensToRefund / tokenExchangeRate;

      require(CreateICO(_beneficiary, tokensToAllocate));
      msg.sender.transfer(etherToRefund);
      ethFundDeposit.transfer(this.balance);
      return;
    }

    totalSupply = checkedSupply;

    require(CreateICO(_beneficiary, tokens));
    ethFundDeposit.transfer(this.balance);
  }

  /// @dev Ends the funding period and sends the ETH home
  function finalize() external onlyOwner {
    require (!isFinalized);
    // move to operational
    isFinalized = true;
    ethFundDeposit.transfer(this.balance);
  }
}

Contract ABI
[{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fundingStartTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokenExchangeRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finalize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ico","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenCreationCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isFinalized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ethFundDeposit","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_ethFundDeposit","type":"address"},{"name":"_tokenAddress","type":"address"},{"name":"_tokenCreationCap","type":"uint256"},{"name":"_tokenExchangeRate","type":"uint256"},{"name":"_fundingStartTime","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"val","type":"uint256"}],"name":"LogCreateICO","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"}]

Contract Creation Code
60606040526000805460a060020a60ff0219169055341561001f57600080fd5b60405160a08061093b83398101604052808051919060200180519190602001805191906020018051919060200180519150505b5b60008054600160a060020a03191633600160a060020a03161790555b60048054600160a060020a03808816600160a060020a0319928316179092556005805487841690831617908190556002869055600885905560068490556001805490921692169190911790556007805460ff191690555b50505050505b610860806100db6000396000f300606060405236156100cd5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318160ddd81146100db5780631df93558146101005780633f4ba83a146101255780634172d0801461014c5780634bb278f3146101715780635c975abb146101865780635d452201146101ad5780636f7920fd146101dc5780638456cb59146102015780638d4e4083146102285780638da5cb5b1461024f5780639d76ea581461027e578063a81c3bdf146102ad578063f2fde38b146102dc575b5b6100d833346102fd565b5b005b34156100e657600080fd5b6100ee610487565b60405190815260200160405180910390f35b341561010b57600080fd5b6100ee61048d565b60405190815260200160405180910390f35b341561013057600080fd5b610138610493565b604051901515815260200160405180910390f35b341561015757600080fd5b6100ee61051a565b60405190815260200160405180910390f35b341561017c57600080fd5b6100d8610520565b005b341561019157600080fd5b610138610595565b604051901515815260200160405180910390f35b34156101b857600080fd5b6101c06105a5565b604051600160a060020a03909116815260200160405180910390f35b34156101e757600080fd5b6100ee6105b4565b60405190815260200160405180910390f35b341561020c57600080fd5b6101386105ba565b604051901515815260200160405180910390f35b341561023357600080fd5b610138610646565b604051901515815260200160405180910390f35b341561025a57600080fd5b6101c061064f565b604051600160a060020a03909116815260200160405180910390f35b341561028957600080fd5b6101c061065e565b604051600160a060020a03909116815260200160405180910390f35b34156102b857600080fd5b6101c061066d565b604051600160a060020a03909116815260200160405180910390f35b34156102e757600080fd5b6100d8600160a060020a036004351661067c565b005b60008054819081908190819060a060020a900460ff161561031d57600080fd5b6003546002541161032d57600080fd5b60065442101561033c57600080fd5b60075460ff161561034c57600080fd5b610358866008546106d4565b945061036660035486610703565b93508360025410156104295761038060025460035461072b565b925061038c858461072b565b600254600355600854909250828115156103a257fe5b0490506103af8784610746565b15156103ba57600080fd5b600160a060020a03331681156108fc0282604051600060405180830381858888f1935050505015156103eb57600080fd5b600454600160a060020a039081169030163180156108fc0290604051600060405180830381858888f19350505050151561042457600080fd5b61047c565b60038490556104388786610746565b151561044357600080fd5b600454600160a060020a039081169030163180156108fc0290604051600060405180830381858888f19350505050151561047c57600080fd5b5b5b50505050505050565b60035481565b60065481565b6000805433600160a060020a039081169116146104af57600080fd5b60005460a060020a900460ff1615156104c757600080fd5b6000805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a15060015b5b5b90565b60085481565b60005433600160a060020a0390811691161461053b57600080fd5b60075460ff161561054b57600080fd5b6007805460ff19166001179055600454600160a060020a039081169030163180156108fc0290604051600060405180830381858888f19350505050151561059157600080fd5b5b5b565b60005460a060020a900460ff1681565b600154600160a060020a031681565b60025481565b6000805433600160a060020a039081169116146105d657600080fd5b60005460a060020a900460ff16156105ed57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a15060015b5b5b90565b60075460ff1681565b600054600160a060020a031681565b600554600160a060020a031681565b600454600160a060020a031681565b60005433600160a060020a0390811691161461069757600080fd5b600160a060020a038116156106cf576000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b5b50565b60008282028315806106f057508284828115156106ed57fe5b04145b15156106f857fe5b8091505b5092915050565b60008282018381108015906106f05750828110155b15156106f857fe5b8091505b5092915050565b6000808284101561073857fe5b5050808203805b5092915050565b60007f6ffa1d489045d96c2691a9c911b5cd15308401f6c62def7cf8f32653d8d70b2460008484604051600160a060020a039384168152919092166020820152604080820192909252606001905180910390a1600154600160a060020a0316636c197ff584846000604051602001526040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561081157600080fd5b6102c65a03f1151561082257600080fd5b50505060405180519150505b929150505600a165627a7a723058208b859c396af8c73c55e83fe2b6ebc3060cf3a51594600b1b0c22b1f734ce8d3e00290000000000000000000000002b830933d565a2476ed1a424bdb4f7ee02dc37cc00000000000000000000000040bfefb5886a301422541a105bf629b128f6015d00000000000000000000000000000000000000000052b7d2dcc80cd2e40000000000000000000000000000000000000000000000000000000000000000001388000000000000000000000000000000000000000000000000000000005a974280


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

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000002b830933d565a2476ed1a424bdb4f7ee02dc37cc
Arg [1] : 00000000000000000000000040bfefb5886a301422541a105bf629b128f6015d
Arg [2] : 00000000000000000000000000000000000000000052b7d2dcc80cd2e4000000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000001388
Arg [4] : 000000000000000000000000000000000000000000000000000000005a974280


   Swarm Source:
bzzr://8b859c396af8c73c55e83fe2b6ebc3060cf3a51594600b1b0c22b1f734ce8d3e
Block Age transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.