Sponsored Link:   Buy your 1st Ethereum in 5 minutes. Trusted by more than 100k buyers.
Contract Overview
ETH Balance: 0 Ether
ETH USD Value: $0
No Of Transactions: 4773 txns
  Latest 25 txns from a total Of 4773 transactions View All

TxHash Age From To Value [TxFee]
0x8b27da86d92111feb3bcf61097f088b18e983a7c6f1914875b78215110cef4334 days 21 hrs ago0xb47342d7cb96ac010ff3cf946d6395d906fe966c  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.3 Ether0.00087658
0x7d495aed8462a235b1b13dca8a34785beac22d1d3f0e177ce27cd39ce8743cf95 days 14 hrs ago0x531f5272c7835f40a3c70fd4a0600e46206dcef9  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce1 Ether0.00021
0xf26732e876de790f05ad153bcfff46ca6b59e7a0af169c904970ffbae4c746415 days 14 hrs ago0xb47342d7cb96ac010ff3cf946d6395d906fe966c  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.3 Ether0.0008552
0x6eded91fd4840edbed445af4e9c4f383eb6c90b7343bf53eae8f051a34edc5515 days 20 hrs ago0xb88d005f94e9e4b5266a3a906c5f7c88e7f9e5f4  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce1.98 Ether0.00042
0x8f7639b184e99c626755d1f36fb7674339d44bef62a6d38eb51da1e4cf36efbf6 days 3 hrs ago0xd397f1f2fd9ea321d3b594aafd60fdebc070661d  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.000832472922389 Ether0.00042
0x275c1c460392c25dd4cf33f3b960339103ecf67a932e00ba131f6249e8e9d34d6 days 16 hrs ago0x8b72b00aa85f251d12d088a3e0e2d2f46c943561  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.4 Ether0.0029932
0xaf04bf25060d4a2a6a7949a9d5919ec9b040b86ad49c6ec0f2c77d974b0f50d06 days 21 hrs ago0xf02c7f90c33dab7e5664ec6c24df6ef30fa5eca3  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce1.51 Ether0.0008552
0xd28520d6bf2bf1233d6453242a61f11e15984c49b888ae63c89afdc9509b51746 days 21 hrs ago0xf02c7f90c33dab7e5664ec6c24df6ef30fa5eca3  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce1.51 Ether0.0008552
0x60fb727773801113e91c916c1d48efa7b70a4d575538eb1b6967cf63e821e5307 days 38 mins ago0xdea4828d773a60d47bcbd38d0902f76aceac2818  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce1 Ether0.0014966
0x3eddaa2c42b6d6d8daaff0ef7e74b9468ec68696871907203844805a37c6ec527 days 5 hrs ago0x2c181522cef2ebe26a5009c9d224b6d03ac54708  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.5 Ether0.0012828
0x8ddbaf734c987e3afd8a3b8b02a63def811ce25c291e224c4f80d6e8905cbe557 days 5 hrs ago0x2c181522cef2ebe26a5009c9d224b6d03ac54708  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.5 Ether0.00211662
0x5392389c5ec57048104d4dd2d93412ba2233aca7c65819ece6d4bb17b83e4d077 days 12 hrs ago0xdea4828d773a60d47bcbd38d0902f76aceac2818  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce1 Ether0.0009621
0xdbb69378b463a44d731ce74e34f23a439b01cb0084257871d4b6e905092bb0a47 days 12 hrs ago0xf971808fb5d78bd91b0845bb7b90d6af49fd3124  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.3 Ether0.00087658
0xee312a151ee132900835d081eec3f2784e7b9f86a76f8170ec5ee3d0a3cfe3a87 days 13 hrs ago0xeb57dfefac52e14a89111865f24c5a457c6560ad  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce2 Ether0.0005345
0xfa34dcf2f8f28677563fbb7de5a1139fefd493f01c559161c5e996db438692777 days 13 hrs ago0xeb57dfefac52e14a89111865f24c5a457c6560ad  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce2 Ether0.0005345
0xd20325ffc6bdb7d7ed030e5eec1103f87e8159567b034a880478b9d0a9390bd27 days 18 hrs ago0x9607ec77d5a370c01b479f2eb4c81cae984d30e0  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.4 Ether0.0023518
0x8d60e6fe1358defb995293f6379c59b224995acbe6bc395a6ab7421ec5dabba27 days 18 hrs ago0x9607ec77d5a370c01b479f2eb4c81cae984d30e0  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.4 Ether0.00231
0x3a2f93e076f5aef8eb57c3fd2b1f4283b29eaab6db41862453d01bce758b39047 days 20 hrs ago0xdea4828d773a60d47bcbd38d0902f76aceac2818  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.98 Ether0.00044898
0x72ef2c6dcdaef2c13db104c69025eedd9e8c029bc900cec6e671a03e6e8cf1cb8 days 1 min ago0x9607ec77d5a370c01b479f2eb4c81cae984d30e0  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.4 Ether0.0008552
0x5230890ee0fb902ac5b7c19b139dacf0cf3a70c0271a3667a2fcd6ed700877418 days 9 mins ago0x9607ec77d5a370c01b479f2eb4c81cae984d30e0  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.4 Ether0.001069
0x0af264f497b5134766eaf49a3383e1f489332ae3e085ccc3dbbf75a2f4dcf56c8 days 19 mins ago0x9607ec77d5a370c01b479f2eb4c81cae984d30e0  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.4 Ether0.00200972
0xf4f2d72b8ee0873fffd69d1a794bac2316f371c188b2be446663a786ddd9058b8 days 24 mins ago0x9607ec77d5a370c01b479f2eb4c81cae984d30e0  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.4 Ether0.00200972
0x17cadf9ff74f730984638cd6846ba66c85da4f112a0301eabe3d1d31eab60d738 days 28 mins ago0x9607ec77d5a370c01b479f2eb4c81cae984d30e0  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.4 Ether0.00200972
0xe9e82e8e6f5f1695c26a2c7fc1877b174c280d211a491e9489d2432a0704e2518 days 30 mins ago0x9607ec77d5a370c01b479f2eb4c81cae984d30e0  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0.4 Ether0.00200972
0x34b663650bb93bfff608533f59d4f3b3a013057505a817454f19fb1e450910c58 days 1 hr ago0x5d9d952063058d29f6006de242add2ff52b6f1d5  IN   0x354bf2c763e09006cbc5fd8e2420e78a0684dbce1 Ether0.00179592
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
  Latest 25 Internal Txns, Click here to View More View All
ParentTxHash Block Age From To Value
0xdf81c79cc666ddfd1a9aa341ad5029882adb78a5c22ab659614b9e413235efda48742329 days 3 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0x1522900b6dafac587d499a862861c0869be6e4280.5 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0xc2e1fe46d79759562cbf39727a8a5718f605370c0.305 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0xe9ed13772c1899a3c77897d4481cc6792c57248e2 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0x7091fadf0d53bcb4a9e59263ca32bd553e16d76f0.398286568 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0x3b09fcbc293ae91625e527acb4437fb58c80d6fe4 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0x0a6475e5a1d8f6252460c7312a03721cbf0dde090.38 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0xe23287e508bd9f1fb481cf2eb915de46f423f3400.8 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0xb74603c76504dcf85108610fba723fe27b334b450.5 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0xd6c47f1edafb94d6beccc7de3b5038940ee1da322.98 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0x5630307ab78203482be07365f6000aa96cd4c16e0.3 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0xff9c53119ce47f52020894a5c859357b8600627f0.3 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0x51a3274811ce10ce61241da3c07bf13292ad05841 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0xdd25d8c7c7bfe0ed03264f70af83c4efad232a0b0.4 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0xd3abac8f823b0c51fb460da8f04e5211168530d50.515 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0x4ae5b62ae572c8b3dcce7220aad863abd3867e931 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0x2448c6ec470acf26064bcb2cf2127e73cdce0b550.4 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0xe2b941d19d8430258a5d9f5058da3cf9a8f147ca0.3 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0x967f98a6e7454fc0a3a480f0bf71986d38a898e10.3 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0x9ee04afdbbe096cd22a5f91498d069ef06ec56fe1.01872899 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0x5ccba89b73b6ed1643fd0a989fd552a6bbe0efe92 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0x5d5d643ef1446b81cd8fc658deb918da540bdd230.6 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0x3f92b568e262a30e5121851863c4b63d18a5d68f1 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0x11bb5a34dddd22eb9be5d024552b3bf99ae6dff75 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0xe57d99cb9546ecc7a63ad84f07418a8d4aa31c780.69 Ether
0x81fd85338d8d189fbafc91cba11f78da3e334e5c71569be995ad88838ddbd5b048739489 days 5 hrs ago0x354bf2c763e09006cbc5fd8e2420e78a0684dbce0xf1a113c04f83bd652701f1e35396e985ef756aae0.303 Ether
[ Download CSV Export  ] 
Contract Source Code Verified
Contract Name: TelcoinSaleKYCEscrow
Compiler Version: v0.4.18+commit.9cf6e910
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity 0.4.18;


/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a * b;
        assert(a == 0 || c / a == b);
        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // assert(b > 0); // Solidity automatically throws when dividing by 0
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold
        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        assert(b <= a);
        return a - b;
    }

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        assert(c >= a);
        return c;
    }
}


contract Telcoin {
    using SafeMath for uint256;

    event Transfer(address indexed _from, address indexed _to, uint _value);
    event Approval(address indexed _owner, address indexed _spender, uint _value);

    string public constant name = "Telcoin";
    string public constant symbol = "TEL";
    uint8 public constant decimals = 2;

    /// The ERC20 total fixed supply of tokens.
    uint256 public constant totalSupply = 100000000000 * (10 ** uint256(decimals));

    /// Account balances.
    mapping(address => uint256) balances;

    /// The transfer allowances.
    mapping (address => mapping (address => uint256)) internal allowed;

    /// The initial distributor is responsible for allocating the supply
    /// into the various pools described in the whitepaper. This can be
    /// verified later from the event log.
    function Telcoin(address _distributor) public {
        balances[_distributor] = totalSupply;
        Transfer(0x0, _distributor, totalSupply);
    }

    /// ERC20 balanceOf().
    function balanceOf(address _owner) public view returns (uint256) {
        return balances[_owner];
    }

    /// ERC20 transfer().
    function transfer(address _to, uint256 _value) public returns (bool) {
        require(_to != address(0));
        require(_value <= balances[msg.sender]);

        // SafeMath.sub will throw if there is not enough balance.
        balances[msg.sender] = balances[msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        Transfer(msg.sender, _to, _value);
        return true;
    }

    /// ERC20 transferFrom().
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
        require(_to != address(0));
        require(_value <= balances[_from]);
        require(_value <= allowed[_from][msg.sender]);

        balances[_from] = balances[_from].sub(_value);
        balances[_to] = balances[_to].add(_value);
        allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
        Transfer(_from, _to, _value);
        return true;
    }

    /// ERC20 approve(). Comes with the standard caveat that an approval
    /// meant to limit spending may actually allow more to be spent due to
    /// unfortunate ordering of transactions. For safety, this method
    /// should only be called if the current allowance is 0. Alternatively,
    /// non-ERC20 increaseApproval() and decreaseApproval() can be used.
    function approve(address _spender, uint256 _value) public returns (bool) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    /// ERC20 allowance().
    function allowance(address _owner, address _spender) public view returns (uint256) {
        return allowed[_owner][_spender];
    }

    /// Not officially ERC20. Allows an allowance to be increased safely.
    function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
        allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
        Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
    }

    /// Not officially ERC20. Allows an allowance to be decreased safely.
    function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
        uint oldValue = allowed[msg.sender][_spender];
        if (_subtractedValue > oldValue) {
            allowed[msg.sender][_spender] = 0;
        } else {
            allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
        }
        Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
    }
}


contract TelcoinSaleToken {
    using SafeMath for uint256;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
    event Mint(address indexed to, uint256 amount);
    event MintFinished();
    event Redeem(address indexed beneficiary, uint256 sacrificedValue, uint256 grantedValue);
    event Transfer(address indexed from, address indexed to, uint256 value);

    /// The owner of the contract.
    address public owner;

    /// The total number of minted tokens, excluding destroyed tokens.
    uint256 public totalSupply;

    /// The token balance and released amount of each address.
    mapping(address => uint256) balances;
    mapping(address => uint256) redeemed;

    /// Whether the token is still mintable.
    bool public mintingFinished = false;

    /// Redeemable telcoin.
    Telcoin telcoin;
    uint256 public totalRedeemed;

    /// Vesting period.
    uint256 vestingStart;
    uint256 vestingDuration;

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

    function TelcoinSaleToken(
        Telcoin _telcoin,
        uint256 _vestingStart,
        uint256 _vestingDuration
    )
        public
    {
        owner = msg.sender;
        telcoin = _telcoin;
        vestingStart = _vestingStart;
        vestingDuration = _vestingDuration;
    }

    function finishMinting() onlyOwner public returns (bool) {
        require(!mintingFinished);

        mintingFinished = true;
        MintFinished();

        return true;
    }

    function mint(address _to, uint256 _amount) onlyOwner public returns (bool) {
        require(_to != 0x0);
        require(!mintingFinished);
        require(_amount > 0);

        totalSupply = totalSupply.add(_amount);
        balances[_to] = balances[_to].add(_amount);
        Mint(_to, _amount);
        Transfer(0x0, _to, _amount);

        return true;
    }

    function redeemMany(address[] _beneficiaries) public {
        for (uint256 i = 0; i < _beneficiaries.length; i++) {
            redeem(_beneficiaries[i]);
        }
    }

    function redeem(address _beneficiary) public returns (uint256) {
        require(mintingFinished);
        require(_beneficiary != 0x0);

        uint256 balance = redeemableBalance(_beneficiary);
        if (balance == 0) {
            return 0;
        }

        uint256 totalDistributable = telcoin.balanceOf(this).add(totalRedeemed);

        // Avoid loss of precision by multiplying and later dividing by
        // a large value.
        uint256 amount = balance.mul(10 ** 18).div(totalSupply).mul(totalDistributable).div(10 ** 18);

        balances[_beneficiary] = balances[_beneficiary].sub(balance);
        redeemed[_beneficiary] = redeemed[_beneficiary].add(balance);
        balances[telcoin] = balances[telcoin].add(balance);
        totalRedeemed = totalRedeemed.add(amount);

        Transfer(_beneficiary, telcoin, balance);
        Redeem(_beneficiary, balance, amount);

        telcoin.transfer(_beneficiary, amount);

        return amount;
    }

    function transferOwnership(address _to) onlyOwner public {
        require(_to != address(0));
        OwnershipTransferred(owner, _to);
        owner = _to;
    }

    function balanceOf(address _owner) public constant returns (uint256) {
        return balances[_owner];
    }

    function redeemableBalance(address _beneficiary) public constant returns (uint256) {
        return vestedBalance(_beneficiary).sub(redeemed[_beneficiary]);
    }

    function vestedBalance(address _beneficiary) public constant returns (uint256) {
        uint256 currentBalance = balances[_beneficiary];
        uint256 totalBalance = currentBalance.add(redeemed[_beneficiary]);

        if (now < vestingStart) {
            return 0;
        }

        if (now >= vestingStart.add(vestingDuration)) {
            return totalBalance;
        }

        return totalBalance.mul(now.sub(vestingStart)).div(vestingDuration);
    }
}


contract TelcoinSale {
    using SafeMath for uint256;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
    event WalletChanged(address indexed previousWallet, address indexed newWallet);
    event TokenPurchase(
        address indexed purchaser,
        address indexed beneficiary,
        uint256 value,
        uint256 amount,
        uint256 bonusAmount
    );
    event TokenAltPurchase(
        address indexed purchaser,
        address indexed beneficiary,
        uint256 value,
        uint256 amount,
        uint256 bonusAmount,
        string symbol,
        string transactionId
    );
    event Pause();
    event Unpause();
    event Withdrawal(address indexed wallet, uint256 weiAmount);
    event Extended(uint256 until);
    event Finalized();
    event Refunding();
    event Refunded(address indexed beneficiary, uint256 weiAmount);
    event Whitelisted(
        address indexed participant,
        uint256 minWeiAmount,
        uint256 maxWeiAmount,
        uint32 bonusRate
    );
    event CapFlexed(uint32 flex);

    /// The owner of the contract.
    address public owner;

    /// The temporary token we're selling. Sale tokens can be converted
    /// immediately upon successful completion of the sale. Bonus tokens
    /// are on a separate vesting schedule.
    TelcoinSaleToken public saleToken;
    TelcoinSaleToken public bonusToken;

    /// The token we'll convert to after the sale ends.
    Telcoin public telcoin;

    /// The minimum and maximum goals to reach. If the soft cap is not reached
    /// by the end of the sale, the contract will enter refund mode. If the
    /// hard cap is reached, the contract can be finished early.
    ///
    /// Due to our actual soft cap being tied to USD and the assumption that
    /// the value of Ether will continue to increase during the ICO, we
    /// implement a fixed minimum softcap that accounts for a 2.5x value
    /// increase. The capFlex is a scale factor that allows us to scale the
    /// caps above the fixed minimum values. Initially the scale factor will
    /// be set so that our effective soft cap is ~10M USD.
    uint256 public softCap;
    uint256 public hardCap;
    uint32 public capFlex;

    /// The sale period.
    uint256 public startTime;
    uint256 public endTime;
    uint256 public timeExtension;

    /// The numnber of tokens to mint per wei.
    uint256 public rate;

    /// The total number of wei raised. Note that the contract's balance may
    /// differ from this value if someone has decided to forcefully send us
    /// ether.
    uint256 public weiRaised;

    /// The wallet that will receive the contract's balance once the sale
    /// finishes and the soft cap is reached.
    address public wallet;

    /// The list of addresses that are allowed to participate in the sale,
    /// up to what amount, and any special rate they may have, provided
    /// that they do in fact participate with at least the minimum value
    /// they agreed to.
    mapping(address => uint256) public whitelistedMin;
    mapping(address => uint256) public whitelistedMax;
    mapping(address => uint32) public bonusRates;

    /// The amount of wei and wei equivalents invested by each investor.
    mapping(address => uint256) public deposited;
    mapping(address => uint256) public altDeposited;

    /// An enumerable list of investors.
    address[] public investors;

    /// Whether the sale is paused.
    bool public paused = false;

    /// Whether the sale has finished, and when.
    bool public finished = false;
    uint256 public finishedAt;

    /// Whether we're accepting refunds.
    bool public refunding = false;

    /// The total number of wei refunded.
    uint256 public weiRefunded;

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

    modifier saleOpen() {
        require(!finished);
        require(!paused);
        require(now >= startTime);
        require(now <= endTime + timeExtension);
        _;
    }

    function TelcoinSale(
        uint256 _softCap,
        uint256 _hardCap,
        uint32 _capFlex,
        uint256 _startTime,
        uint256 _endTime,
        uint256 _rate,
        address _wallet,
        Telcoin _telcoin,
        uint256 _bonusVestingStart,
        uint256 _bonusVestingDuration
    )
        public
        payable
    {
        require(msg.value > 0);
        require(_softCap > 0);
        require(_hardCap >= _softCap);
        require(_startTime >= now);
        require(_endTime >= _startTime);
        require(_rate > 0);
        require(_wallet != 0x0);

        owner = msg.sender;
        softCap = _softCap;
        hardCap = _hardCap;
        capFlex = _capFlex;
        startTime = _startTime;
        endTime = _endTime;
        rate = _rate;
        wallet = _wallet;
        telcoin = _telcoin;

        saleToken = new TelcoinSaleToken(telcoin, 0, 0);
        bonusToken = new TelcoinSaleToken(
            telcoin,
            _bonusVestingStart,
            _bonusVestingDuration
        );

        wallet.transfer(msg.value);
    }

    function () public payable {
        buyTokens(msg.sender);
    }

    function buyTokens(address _beneficiary) saleOpen public payable {
        require(_beneficiary != address(0));

        uint256 weiAmount = msg.value;
        require(weiAmount > 0);
        require(weiRaised.add(weiAmount) <= hardCap);

        uint256 totalPrior = totalDeposited(_beneficiary);
        uint256 totalAfter = totalPrior.add(weiAmount);
        require(totalAfter <= whitelistedMax[_beneficiary]);

        uint256 saleTokens;
        uint256 bonusTokens;

        (saleTokens, bonusTokens) = tokensForPurchase(_beneficiary, weiAmount);

        uint256 newDeposited = deposited[_beneficiary].add(weiAmount);
        deposited[_beneficiary] = newDeposited;
        investors.push(_beneficiary);

        weiRaised = weiRaised.add(weiAmount);

        saleToken.mint(_beneficiary, saleTokens);
        if (bonusTokens > 0) {
            bonusToken.mint(_beneficiary, bonusTokens);
        }

        TokenPurchase(
            msg.sender,
            _beneficiary,
            weiAmount,
            saleTokens,
            bonusTokens
        );
    }

    function changeWallet(address _wallet) onlyOwner public payable {
        require(_wallet != 0x0);
        require(msg.value > 0);

        WalletChanged(wallet, _wallet);
        wallet = _wallet;

        wallet.transfer(msg.value);
    }

    function extendTime(uint256 _timeExtension) onlyOwner public {
        require(!finished);
        require(now < endTime + timeExtension);
        require(_timeExtension > 0);

        timeExtension = timeExtension.add(_timeExtension);
        require(timeExtension <= 7 days);

        Extended(endTime.add(timeExtension));
    }

    function finish() onlyOwner public {
        require(!finished);
        require(hardCapReached() || now > endTime + timeExtension);

        finished = true;
        finishedAt = now;
        saleToken.finishMinting();
        bonusToken.finishMinting();

        uint256 distributableCoins = telcoin.balanceOf(this);

        if (softCapReached()) {
            uint256 saleTokens = saleToken.totalSupply();
            uint256 bonusTokens = bonusToken.totalSupply();
            uint256 totalTokens = saleTokens.add(bonusTokens);

            // Avoid loss of precision by multiplying and later dividing by
            // a large value.
            uint256 bonusPortion = bonusTokens.mul(10 ** 18).div(totalTokens).mul(distributableCoins).div(10 ** 18);
            uint256 salePortion = distributableCoins.sub(bonusPortion);

            saleToken.transferOwnership(owner);
            bonusToken.transferOwnership(owner);

            telcoin.transfer(saleToken, salePortion);
            telcoin.transfer(bonusToken, bonusPortion);

            withdraw();
        } else {
            refunding = true;
            telcoin.transfer(wallet, distributableCoins);
            Refunding();
        }

        Finalized();
    }

    function pause() onlyOwner public {
        require(!paused);
        paused = true;
        Pause();
    }

    function refundMany(address[] _investors) public {
        for (uint256 i = 0; i < _investors.length; i++) {
            refund(_investors[i]);
        }
    }

    function refund(address _investor) public {
        require(finished);
        require(refunding);
        require(deposited[_investor] > 0);

        uint256 weiAmount = deposited[_investor];
        deposited[_investor] = 0;
        weiRefunded = weiRefunded.add(weiAmount);
        Refunded(_investor, weiAmount);

        _investor.transfer(weiAmount);
    }

    function registerAltPurchase(
        address _beneficiary,
        string _symbol,
        string _transactionId,
        uint256 _weiAmount
    )
        saleOpen
        onlyOwner
        public
    {
        require(_beneficiary != address(0));
        require(totalDeposited(_beneficiary).add(_weiAmount) <= whitelistedMax[_beneficiary]);

        uint256 saleTokens;
        uint256 bonusTokens;

        (saleTokens, bonusTokens) = tokensForPurchase(_beneficiary, _weiAmount);

        uint256 newAltDeposited = altDeposited[_beneficiary].add(_weiAmount);
        altDeposited[_beneficiary] = newAltDeposited;
        investors.push(_beneficiary);

        weiRaised = weiRaised.add(_weiAmount);

        saleToken.mint(_beneficiary, saleTokens);
        if (bonusTokens > 0) {
            bonusToken.mint(_beneficiary, bonusTokens);
        }

        TokenAltPurchase(
            msg.sender,
            _beneficiary,
            _weiAmount,
            saleTokens,
            bonusTokens,
            _symbol,
            _transactionId
        );
    }

    function transferOwnership(address _to) onlyOwner public {
        require(_to != address(0));
        OwnershipTransferred(owner, _to);
        owner = _to;
    }

    function unpause() onlyOwner public {
        require(paused);
        paused = false;
        Unpause();
    }

    function updateCapFlex(uint32 _capFlex) onlyOwner public {
        require(!finished);
        capFlex = _capFlex;
        CapFlexed(capFlex);
    }

    function whitelistMany(
        address[] _participants,
        uint256 _minWeiAmount,
        uint256 _maxWeiAmount,
        uint32 _bonusRate
    )
        onlyOwner
        public
    {
        for (uint256 i = 0; i < _participants.length; i++) {
            whitelist(
                _participants[i],
                _minWeiAmount,
                _maxWeiAmount,
                _bonusRate
            );
        }
    }

    function whitelist(
        address _participant,
        uint256 _minWeiAmount,
        uint256 _maxWeiAmount,
        uint32 _bonusRate
    )
        onlyOwner
        public
    {
        require(_participant != 0x0);
        require(_bonusRate <= 400);

        whitelistedMin[_participant] = _minWeiAmount;
        whitelistedMax[_participant] = _maxWeiAmount;
        bonusRates[_participant] = _bonusRate;
        Whitelisted(
            _participant,
            _minWeiAmount,
            _maxWeiAmount,
            _bonusRate
        );
    }

    function withdraw() onlyOwner public {
        require(softCapReached() || (finished && now > finishedAt + 14 days));

        uint256 weiAmount = this.balance;

        if (weiAmount > 0) {
            wallet.transfer(weiAmount);
            Withdrawal(wallet, weiAmount);
        }
    }

    function hardCapReached() public constant returns (bool) {
        return weiRaised >= hardCap.mul(1000 + capFlex).div(1000);
    }

    function tokensForPurchase(
        address _beneficiary,
        uint256 _weiAmount
    )
        public
        constant
        returns (uint256, uint256)
    {
        uint256 baseTokens = _weiAmount.mul(rate);
        uint256 totalPrior = totalDeposited(_beneficiary);
        uint256 totalAfter = totalPrior.add(_weiAmount);

        // Has the beneficiary passed the assigned minimum purchase level?
        if (totalAfter < whitelistedMin[_beneficiary]) {
            return (baseTokens, 0);
        }

        uint32 bonusRate = bonusRates[_beneficiary];
        uint256 baseBonus = baseTokens.mul(1000 + bonusRate).div(1000).sub(baseTokens);

        // Do we pass the minimum purchase level with this purchase?
        if (totalPrior < whitelistedMin[_beneficiary]) {
            uint256 balancePrior = totalPrior.mul(rate);
            uint256 accumulatedBonus = balancePrior.mul(1000 + bonusRate).div(1000).sub(balancePrior);
            return (baseTokens, accumulatedBonus.add(baseBonus));
        }

        return (baseTokens, baseBonus);
    }

    function totalDeposited(address _investor) public constant returns (uint256) {
        return deposited[_investor].add(altDeposited[_investor]);
    }

    function softCapReached() public constant returns (bool) {
        return weiRaised >= softCap.mul(1000 + capFlex).div(1000);
    }
}


contract TelcoinSaleKYCEscrow {
    using SafeMath for uint256;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
    event ValuePlaced(address indexed purchaser, address indexed beneficiary, uint256 amount);
    event Approved(address indexed participant);
    event Rejected(address indexed participant);
    event Closed();

    /// The owner of the contract.
    address public owner;

    /// The actual sale.
    TelcoinSale public sale;

    /// Whether the escrow has closed.
    bool public closed = false;

    /// The amount of wei and wei equivalents invested by each investor.
    mapping(address => uint256) public deposited;

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

    modifier escrowOpen() {
        require(!closed);
        _;
    }

    function TelcoinSaleKYCEscrow(TelcoinSale _sale) public {
        require(_sale != address(0));

        owner = msg.sender;
        sale = _sale;
    }

    function () public payable {
        placeValue(msg.sender);
    }

    function approve(address _participant) onlyOwner public {
        uint256 weiAmount = deposited[_participant];
        require(weiAmount > 0);

        deposited[_participant] = 0;
        Approved(_participant);
        sale.buyTokens.value(weiAmount)(_participant);
    }

    function approveMany(address[] _participants) onlyOwner public {
        for (uint256 i = 0; i < _participants.length; i++) {
            approve(_participants[i]);
        }
    }

    function close() onlyOwner public {
        require(!closed);

        closed = true;
        Closed();
    }

    function placeValue(address _beneficiary) escrowOpen public payable {
        require(_beneficiary != address(0));

        uint256 weiAmount = msg.value;
        require(weiAmount > 0);

        uint256 newDeposited = deposited[_beneficiary].add(weiAmount);
        deposited[_beneficiary] = newDeposited;

        ValuePlaced(
            msg.sender,
            _beneficiary,
            weiAmount
        );
    }

    function reject(address _participant) onlyOwner public {
        uint256 weiAmount = deposited[_participant];
        require(weiAmount > 0);

        deposited[_participant] = 0;
        Rejected(_participant);
        require(_participant.call.value(weiAmount)());
    }

    function rejectMany(address[] _participants) onlyOwner public {
        for (uint256 i = 0; i < _participants.length; i++) {
            reject(_participants[i]);
        }
    }

    function transferOwnership(address _to) onlyOwner public {
        require(_to != address(0));
        OwnershipTransferred(owner, _to);
        owner = _to;
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_participants","type":"address[]"}],"name":"rejectMany","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"close","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"closed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"sale","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiary","type":"address"}],"name":"placeValue","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_participant","type":"address"}],"name":"reject","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_participants","type":"address[]"}],"name":"approveMany","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"deposited","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_participant","type":"address"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_sale","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"purchaser","type":"address"},{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"ValuePlaced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"participant","type":"address"}],"name":"Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"participant","type":"address"}],"name":"Rejected","type":"event"},{"anonymous":false,"inputs":[],"name":"Closed","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60606040526000600160146101000a81548160ff021916908315150217905550341561002a57600080fd5b604051602080610d8e83398101604052808051906020019091905050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561008257600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610c7b806101136000396000f3006060604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631b1e5d5d146100ba57806343d726d614610114578063597e1fb5146101295780636ad1fe02146101565780638da5cb5b146101ab578063a374480a14610200578063ab0da5a91461022e578063bb70705914610267578063cb13cddb146102c1578063daea85c51461030e578063f2fde38b14610347575b6100b833610380565b005b34156100c557600080fd5b6101126004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919050506104ef565b005b341561011f57600080fd5b61012761058b565b005b341561013457600080fd5b61013c61064a565b604051808215151515815260200191505060405180910390f35b341561016157600080fd5b61016961065d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101b657600080fd5b6101be610683565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61022c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610380565b005b341561023957600080fd5b610265600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106a8565b005b341561027257600080fd5b6102bf60048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190505061081d565b005b34156102cc57600080fd5b6102f8600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108b9565b6040518082815260200191505060405180910390f35b341561031957600080fd5b610345600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108d1565b005b341561035257600080fd5b61037e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610adc565b005b600080600160149054906101000a900460ff1615151561039f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156103db57600080fd5b3491506000821115156103ed57600080fd5b61043f82600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610c3190919063ffffffff16565b905080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f25aef7442b0598bbb138d66173db749b5ecbc084c908aadc631b7fcde53236e3846040518082815260200191505060405180910390a3505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561054c57600080fd5b600090505b81518110156105875761057a828281518110151561056b57fe5b906020019060200201516106a8565b8080600101915050610551565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105e657600080fd5b600160149054906101000a900460ff1615151561060257600080fd5b60018060146101000a81548160ff0219169083151502179055507f1cdde67b72a90f19919ac732a437ac2f7a10fc128d28c2a6e525d89ce5cd9d3a60405160405180910390a1565b600160149054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561070557600080fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111151561075657600080fd5b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff167faf77f8960cf590e245ec8b6d41c193a5dcacad8986ae4eb57ac9e5be7b6af03160405160405180910390a28173ffffffffffffffffffffffffffffffffffffffff168160405160006040518083038185876187965a03f192505050151561081957600080fd5b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561087a57600080fd5b600090505b81518110156108b5576108a8828281518110151561089957fe5b906020019060200201516108d1565b808060010191505061087f565b5050565b60026020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561092e57600080fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111151561097f57600080fd5b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff167f5d91bd0cecc45fef102af61de92c5462fadc884a5ce9d21c15e8a85198f2349e60405160405180910390a2600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ec8ac4d882846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506000604051808303818588803b1515610ac357600080fd5b6125ee5a03f11515610ad457600080fd5b505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b3757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610b7357600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000808284019050838110151515610c4557fe5b80915050929150505600a165627a7a7230582025871790f8a41b0fb34900dc5ee5c6233523c34ee5bb5d724cf5f7dcef11b20f002900000000000000000000000078f7ef08b4583f9866d8a98a9f2d9b64d9c02380

    Constructor Arguments (ABI-encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000078f7ef08b4583f9866d8a98a9f2d9b64d9c02380

-----Decoded View---------------
Found 1 constructor arguments :
Arg [0] : 00000000000000000000000078f7ef08b4583f9866d8a98a9f2d9b64d9c02380


   Swarm Source:
bzzr://25871790f8a41b0fb34900dc5ee5c6233523c34ee5bb5d724cf5f7dcef11b20f

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.