Sponsored Link:  Up to 2% Cryptocurrency Cashback - Reserve your card - Monaco App - www.mona.co
Contract Overview
ETH Balance: 0 Ether
ETH USD Value: $0
No Of Transactions: 2 txns
  Latest 2 txns

TxHash Age From To Value [TxFee]
0xc0ca55667df11b028e0a83f8abaa7832cfdbd6dee79cc39474606256481df7ee29 days 13 hrs ago0x759f667b95ba4b32c2d017e8180708f34c8317a4  IN   0x763de7eb97a80f12784436aabf3911d3d9ac823a0.1257 Ether0.002785923
0x6b91b28f7e7c07174fccb086757b7f8cb2c75e0f20976fc740658e470d7c7c3929 days 13 hrs ago0x3c1f16a8d4b56889d4f6e49cc49b47b5c4287751  IN    Contract Creation0 Ether0.01183259
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
  Latest 1 Internal Transaction

ParentTxHash Block Age From To Value
0xc0ca55667df11b028e0a83f8abaa7832cfdbd6dee79cc39474606256481df7ee455314329 days 13 hrs ago0x763de7eb97a80f12784436aabf3911d3d9ac823a0x48084911fda6c97aa317516f2d21dd3e4698fc540.1257 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to ZeroFunctionSelector (very low-severity), DelegateCallReturnValue (low-severity), ECRecoverMalformedInput (medium-severity) Solidity compiler bugs.

Contract Source Code Verified
Contract Name: PCICO
Compiler Version: v0.4.13+commit.fb4cb1a
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity ^0.4.13;
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;
    }
}

contract PrivateCityTokens {
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
}


contract PCICO is SafeMath{

    uint256 public totalSupply;
    // Deposit address of account controlled by the creators
    address public ethFundDeposit = 0x48084911fdA6C97aa317516f2d21dD3e4698FC54;
    address public tokenExchangeAddress = 0x009f0e67dbaf4644603c0660e974cf5e34726481;
    address public tokenAccountAddress = 0x3c1F16a8D4B56889D4F6E49cc49b47B5c4287751;
    //Access to token contract for tokens exchange
    PrivateCityTokens public tokenExchange;

    // Fundraising parameters
    enum ContractState { Fundraising }
    ContractState public state;           // Current state of the contract

    uint256 public constant decimals = 18;
    //start date: 08/07/2017 @ 12:00am (UTC)
    uint public startDate = 1506521932;
    //start date: 09/21/2017 @ 11:59pm (UTC)
    uint public endDate = 1510761225;
    
    uint256 public constant TOKEN_MIN = 1 * 10**decimals; // 1 PCT

    // We need to keep track of how much ether have been contributed, since we have a cap for ETH too
    uint256 public totalReceivedEth = 0;
	

    // Constructor
    function PCICO()
    {
        // Contract state
        state = ContractState.Fundraising;
        tokenExchange = PrivateCityTokens(tokenExchangeAddress);
        totalSupply = 0;
    }

    
    function ()
    payable
    external
    {
        require(now >= startDate);
        require(now <= endDate);
        require(msg.value > 0);
        

        // First we check the ETH cap, as it's easier to calculate, return
        // the contribution if the cap has been reached already
        uint256 checkedReceivedEth = safeAdd(totalReceivedEth, msg.value);

        // If all is fine with the ETH cap, we continue to check the
        // minimum amount of tokens
        uint256 tokens = safeMult(msg.value, getCurrentTokenPrice());
        require(tokens >= TOKEN_MIN);

        totalReceivedEth = checkedReceivedEth;
        totalSupply = safeAdd(totalSupply, tokens);
        ethFundDeposit.transfer(msg.value);
        if(!tokenExchange.transferFrom(tokenAccountAddress, msg.sender, tokens)) revert();
            

    }


    /// @dev Returns the current token price
    function getCurrentTokenPrice()
    private
    constant
    returns (uint256 currentPrice)
    {
        return 800;//bonuses are not implied!
    }

}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"startDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenExchange","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalReceivedEth","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"ethFundDeposit","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenAccountAddress","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"state","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"endDate","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"TOKEN_MIN","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenExchangeAddress","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"}]

  Contract Creation Code Switch To Opcodes View
606060405260018054600160a060020a03199081167348084911fda6c97aa317516f2d21dd3e4698fc5417909155600280548216729f0e67dbaf4644603c0660e974cf5e3472648117905560038054909116733c1f16a8d4b56889d4f6e49cc49b47b5c42877511790556359cbb34c600555635a0c63096006556000600755341561008957600080fd5b5b600480546000919060a060020a60ff02191674010000000000000000000000000000000000000000835b021790555060025460048054600160a060020a031916600160a060020a03909216919091179055600080555b5b6104f9806100f06000396000f300606060405236156100ac5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630b97bc86811461021857806318160ddd1461023d578063313ce56714610262578063636f6159146102875780637801fc3e146102b6578063a81c3bdf146102db578063b0c2ff431461030a578063c19d93fb14610339578063c24a0f8b14610370578063e74799b414610395578063ef80ff18146103ba575b6102165b60008060055442101515156100c457600080fd5b6006544211156100d357600080fd5b600034116100e057600080fd5b6100ec600754346103e9565b91506100ff346100fa610411565b610418565b9050670de0b6b3a764000081101561011657600080fd5b600782905560005461012890826103e9565b600055600154600160a060020a03163480156108fc0290604051600060405180830381858888f19350505050151561015f57600080fd5b600454600354600160a060020a03918216916323b872dd911633846000604051602001526040517c010000000000000000000000000000000000000000000000000000000063ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b15156101eb57600080fd5b6102c65a03f115156101fc57600080fd5b50505060405180519050151561021157600080fd5b5b5050565b005b341561022357600080fd5b61022b610447565b60405190815260200160405180910390f35b341561024857600080fd5b61022b61044d565b60405190815260200160405180910390f35b341561026d57600080fd5b61022b610453565b60405190815260200160405180910390f35b341561029257600080fd5b61029a610458565b604051600160a060020a03909116815260200160405180910390f35b34156102c157600080fd5b61022b610467565b60405190815260200160405180910390f35b34156102e657600080fd5b61029a61046d565b604051600160a060020a03909116815260200160405180910390f35b341561031557600080fd5b61029a61047c565b604051600160a060020a03909116815260200160405180910390f35b341561034457600080fd5b61034c61048b565b6040518082600081111561035c57fe5b60ff16815260200191505060405180910390f35b341561037b57600080fd5b61022b6104ac565b60405190815260200160405180910390f35b34156103a057600080fd5b61022b6104b2565b60405190815260200160405180910390f35b34156103c557600080fd5b61029a6104be565b604051600160a060020a03909116815260200160405180910390f35b60008282018381108015906103fe5750828110155b151561040657fe5b8091505b5092915050565b6103205b90565b60008282028315806103fe575082848281151561043157fe5b04145b151561040657fe5b8091505b5092915050565b60055481565b60005481565b601281565b600454600160a060020a031681565b60075481565b600154600160a060020a031681565b600354600160a060020a031681565b60045474010000000000000000000000000000000000000000900460ff1681565b60065481565b670de0b6b3a764000081565b600254600160a060020a0316815600a165627a7a7230582017c66980182311c56ccaedbf130ddffadda59336698512c8faac6ff81bb14a950029

   Swarm Source:
bzzr://17c66980182311c56ccaedbf130ddffadda59336698512c8faac6ff81bb14a95

 

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.