Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xD111bd7ad596ed9C78Ad8fdeCC6e23acA63b4383
Balance 6.0400 ETH
Nonce 1
Code Size 1990 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

1990 bytes
0x606060405236156100b75763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632288fad681146100cc57806325bae118146101185780632e1a7d4d1461013d5780633f5174df146101555780635aa3d2b01461017a57806366d38203146101ab5780638da5cb5b146101de578063ae4cc7571461020d578063d7a14a0514610234578063f0c7131814610259578063f2fde38b14610288578063f974a1a2146102a9575b6100ca5b6100c6333442610334565b505b565b005b34156100d757600080fd5b6100e2600435610495565b6040518084600160a060020a0316600160a060020a03168152602001838152602001828152602001935050505060405180910390f35b341561012357600080fd5b61012b6104d2565b60405190815260200160405180910390f35b341561014857600080fd5b6100ca6004356104d8565b005b341561016057600080fd5b61012b61052b565b60405190815260200160405180910390f35b341561018557600080fd5b61012b600160a060020a0360043516610532565b60405190815260200160405180910390f35b34156101b657600080fd5b6101ca600160a060020a03600435166105b4565b604051901515815260200160405180910390f35b34156101e957600080fd5b6101f161061c565b604051600160a060020a03909116815260200160405180910390f35b341561021857600080fd5b6101ca61062b565b604051901515815260200160405180910390f35b341561023f57600080fd5b61012b610650565b60405190815260200160405180910390f35b341561026457600080fd5b6101f1610694565b604051600160a060020a03909116815260200160405180910390f35b341561029357600080fd5b6100ca600160a060020a03600435166106a3565b005b34156102b457600080fd5b6102bc6106eb565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156102f95780820151818401525b6020016102e0565b50505050905090810190601f1680156103265780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b600354600090600160a060020a0316158015906103cc5750600354600090600160a060020a0316635bfdb8b282604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156103af57600080fd5b6102c65a03f115156103c057600080fd5b50505060405180519050115b156103d657600080fd5b600060025411156103e657600080fd5b8115806103f257504282115b156103fc57600080fd5b6001805480820161040d8382610722565b916000526020600020906003020160005b60606040519081016040908152600160a060020a03891682526020820188905281018690529190508151815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03919091161781556020820151816001015560408201518160020155505050600190505b5b5b9392505050565b60018054829081106104a357fe5b906000526020600020906003020160005b5080546001820154600290920154600160a060020a03909116925083565b60025481565b60005433600160a060020a039081169116146104f357600080fd5b600054600160a060020a031681156108fc0282604051600060405180830381858888f1935050505015156100c657600080fd5b5b5b50565b6001545b90565b6000805b6001548110156105ad5782600160a060020a031660018281548110151561055957fe5b906000526020600020906003020160005b5054600160a060020a031614156105a457600180548290811061058957fe5b906000526020600020906003020160005b5060010154820191505b5b600101610536565b5b50919050565b6000805433600160a060020a039081169116146105d057600080fd5b600354600160a060020a0316151561061257506003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790556001610616565b5060005b5b919050565b600054600160a060020a031681565b6000805433600160a060020a0390811691161461064757600080fd5b426002555b5b90565b6000805b60015481101561068f57600180548290811061066c57fe5b906000526020600020906003020160005b5060010154820191505b600101610654565b5b5090565b600354600160a060020a031681565b60005433600160a060020a039081169116146106be57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b60408051908101604052600381527f4554480000000000000000000000000000000000000000000000000000000000602082015281565b81548183558181151161074e5760030281600302836000526020600020918201910161074e9190610754565b5b505050565b61052f91905b8082111561068f57805473ffffffffffffffffffffffffffffffffffffffff19168155600060018201819055600282015560030161075a565b5090565b905600a165627a7a723058209541ba99cbc4d056fc53a33cf4b3f9456e0177bee6f19bd725fa06727d1854140029

Verified Source Code Partial Match

Compiler: v0.4.14-nightly.2017.7.10+commit.6fa5d47f Optimization: Yes (200 runs)
ZENOSEarlyPurchase.sol 156 lines
pragma solidity ^0.4.7;

contract AbstractZENOSCrowdsale {
    function crowdsaleStartingBlock() constant returns (uint256 startingBlock) {}
}

/// @title EarlyPurchase contract - Keep track of purchased amount by Early Purchasers
/// Project by ZENOS Team (http://www.thezenos.com/)
/// This smart contract developed by Starbase - Token funding & payment Platform for innovative projects <support[at]starbase.co>

contract ZENOSEarlyPurchase {
    /*
     *  Properties
     */
    string public constant PURCHASE_AMOUNT_UNIT = 'ETH';    // Ether
    address public owner;
    EarlyPurchase[] public earlyPurchases;
    uint public earlyPurchaseClosedAt;

    /*
     *  Types
     */
    struct EarlyPurchase {
        address purchaser;
        uint amount;        // Amount in Wei( = 1/ 10^18 Ether)
        uint purchasedAt;   // timestamp
    }

    /*
     *  External contracts
     */
    AbstractZENOSCrowdsale public zenOSCrowdsale;


    /*
     *  Modifiers
     */
    modifier onlyOwner() {
        if (msg.sender != owner) {
            throw;
        }
        _;
    }

    modifier onlyBeforeCrowdsale() {
        if (address(zenOSCrowdsale) != 0 &&
            zenOSCrowdsale.crowdsaleStartingBlock() > 0)
        {
            throw;
        }
        _;
    }

    modifier onlyEarlyPurchaseTerm() {
        if (earlyPurchaseClosedAt > 0) {
            throw;
        }
        _;
    }

    /// @dev Contract constructor function
    function ZENOSEarlyPurchase() {
        owner = msg.sender;
    }

    /*
     *  Contract functions
     */
    /// @dev Returns early purchased amount by purchaser's address
    /// @param purchaser Purchaser address
    function purchasedAmountBy(address purchaser)
        external
        constant
        returns (uint amount)
    {
        for (uint i; i < earlyPurchases.length; i++) {
            if (earlyPurchases[i].purchaser == purchaser) {
                amount += earlyPurchases[i].amount;
            }
        }
    }

    /// @dev Returns total amount of raised funds by Early Purchasers
    function totalAmountOfEarlyPurchases()
        constant
        returns (uint totalAmount)
    {
        for (uint i; i < earlyPurchases.length; i++) {
            totalAmount += earlyPurchases[i].amount;
        }
    }

    /// @dev Returns number of early purchases
    function numberOfEarlyPurchases()
        external
        constant
        returns (uint)
    {
        return earlyPurchases.length;
    }

    /// @dev Append an early purchase log
    /// @param purchaser Purchaser address
    /// @param amount Purchase amount
    /// @param purchasedAt Timestamp of purchased date
    function appendEarlyPurchase(address purchaser, uint amount, uint purchasedAt)
        internal
        onlyBeforeCrowdsale
        onlyEarlyPurchaseTerm
        returns (bool)
    {

        if (purchasedAt == 0 || purchasedAt > now) {
            throw;
        }

        earlyPurchases.push(EarlyPurchase(purchaser, amount, purchasedAt));
        return true;
    }

    /// @dev Close early purchase term
    function closeEarlyPurchase()
        external
        onlyOwner
        returns (bool)
    {
        earlyPurchaseClosedAt = now;
    }

    /// @dev Setup function sets external crowdsale contract's address
    /// @param zenOSCrowdsaleAddress Token address
    function setup(address zenOSCrowdsaleAddress)
        external
        onlyOwner
        returns (bool)
    {
        if (address(zenOSCrowdsale) == 0) {
            zenOSCrowdsale = AbstractZENOSCrowdsale(zenOSCrowdsaleAddress);
            return true;
        }
        return false;
    }

    function withdraw(uint withdrawalAmount) onlyOwner {
          if(!owner.send(withdrawalAmount)) throw;  // send collected ETH to ZENOS team
    }

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

    /// @dev By sending Ether to the contract, early purchase will be recorded.
    function () payable {
        appendEarlyPurchase(msg.sender, msg.value, block.timestamp);
    }
}

Write Contract 12 functions

These functions modify contract state and require a wallet transaction to execute.

PURCHASE_AMOUNT_UNIT 0xf974a1a2
No parameters
returns: string
closeEarlyPurchase 0xae4cc757
No parameters
returns: bool
earlyPurchaseClosedAt 0x25bae118
No parameters
returns: uint256
earlyPurchases 0x2288fad6
uint256
returns: address, uint256, uint256
numberOfEarlyPurchases 0x3f5174df
No parameters
returns: uint256
owner 0x8da5cb5b
No parameters
returns: address
purchasedAmountBy 0x5aa3d2b0
address purchaser
returns: uint256
setup 0x66d38203
address zenOSCrowdsaleAddress
returns: bool
totalAmountOfEarlyPurchases 0xd7a14a05
No parameters
returns: uint256
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x2e1a7d4d
uint256 withdrawalAmount
zenOSCrowdsale 0xf0c71318
No parameters
returns: address

Token Balances (1)

View Transfers →
WETH 0

Recent Transactions

No transactions found for this address