Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x574B36BceD443338875d171CC377E691f7d4F887
Balance 0 ETH
Nonce 1
Code Size 3474 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

3474 bytes
0x6060604052600436106101325763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461018b578063095ea7b314610215578063131d28731461024b57806318160ddd1461025e57806323b872dd14610283578063313ce567146102ab578063315a095d146102d457806341c0e1b5146102ec57806342966c68146102ff5780636b4c07891461031557806370a082311461032d57806379c650681461034c57806379cc67901461036e5780638620410b146103905780638da5cb5b146103a357806391b7f5ed146103d257806395d89b41146103e8578063a9059cbb146103fb578063b414d4b61461041d578063cae9ca511461043c578063dd62ed3e146104a1578063e724529c146104c6578063f2fde38b146104ea575b600754600090151561014357600080fd5b506007543402610154303383610509565b600054600160a060020a03163480156108fc0290604051600060405180830381858888f19350505050151561018857600080fd5b50005b341561019657600080fd5b61019e610630565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101da5780820151838201526020016101c2565b50505050905090810190601f1680156102075780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561022057600080fd5b610237600160a060020a03600435166024356106ce565b604051901515815260200160405180910390f35b341561025657600080fd5b6102376106fe565b341561026957600080fd5b610271610707565b60405190815260200160405180910390f35b341561028e57600080fd5b610237600160a060020a036004358116906024351660443561070d565b34156102b657600080fd5b6102be610784565b60405160ff909116815260200160405180910390f35b34156102df57600080fd5b6102ea60043561078d565b005b34156102f757600080fd5b6102ea6107b6565b341561030a57600080fd5b6102376004356107dd565b341561032057600080fd5b6102ea6004351515610868565b341561033857600080fd5b610271600160a060020a03600435166108c9565b341561035757600080fd5b6102ea600160a060020a03600435166024356108db565b341561037957600080fd5b610237600160a060020a03600435166024356109a1565b341561039b57600080fd5b610271610a7d565b34156103ae57600080fd5b6103b6610a83565b604051600160a060020a03909116815260200160405180910390f35b34156103dd57600080fd5b6102ea600435610a92565b34156103f357600080fd5b61019e610ab2565b341561040657600080fd5b6102ea600160a060020a0360043516602435610b1d565b341561042857600080fd5b610237600160a060020a0360043516610b2c565b341561044757600080fd5b61023760048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610b4195505050505050565b34156104ac57600080fd5b610271600160a060020a0360043581169060243516610c73565b34156104d157600080fd5b6102ea600160a060020a03600435166024351515610c90565b34156104f557600080fd5b6102ea600160a060020a0360043516610d1c565b60085460ff161561051957600080fd5b600160a060020a038216151561052e57600080fd5b600160a060020a0383166000908152600560205260409020548190101561055457600080fd5b600160a060020a0382166000908152600560205260409020548181011161057a57600080fd5b600160a060020a03831660009081526009602052604090205460ff16156105a057600080fd5b600160a060020a03821660009081526009602052604090205460ff16156105c657600080fd5b600160a060020a038084166000818152600560205260408082208054869003905592851680825290839020805485019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a3505050565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106c65780601f1061069b576101008083540402835291602001916106c6565b820191906000526020600020905b8154815290600101906020018083116106a957829003601f168201915b505050505081565b600160a060020a033381166000908152600660209081526040808320938616835292905220819055600192915050565b60085460ff1681565b60045481565b600160a060020a0380841660009081526006602090815260408083203390941683529290529081205482111561074257600080fd5b600160a060020a038085166000908152600660209081526040808320339094168352929052208054839003905561077a848484610509565b5060019392505050565b60035460ff1681565b60005433600160a060020a039081169116146107a857600080fd5b6107b3303383610509565b50565b60005433600160a060020a039081169116146107d157600080fd5b33600160a060020a0316ff5b600160a060020a0333166000908152600560205260408120548290101561080357600080fd5b600160a060020a03331660008181526005602052604090819020805485900390556004805485900390557fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59084905190815260200160405180910390a2506001919050565b60005433600160a060020a0390811691161461088357600080fd5b6008805460ff19168215151790557f477721e94e6195635782eeafaad12680e1bb921582e2103a5cff656b0c32a17781604051901515815260200160405180910390a150565b60056020526000908152604090205481565b60005433600160a060020a039081169116146108f657600080fd5b600160a060020a03808316600090815260056020526040808220805485019055600480548501905530909216917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a381600160a060020a031630600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405190815260200160405180910390a35050565b600160a060020a038216600090815260056020526040812054829010156109c757600080fd5b600160a060020a03808416600090815260066020908152604080832033909416835292905220548211156109fa57600080fd5b600160a060020a038084166000818152600560209081526040808320805488900390556006825280832033909516835293905282902080548590039055600480548590039055907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59084905190815260200160405180910390a250600192915050565b60075481565b600054600160a060020a031681565b60005433600160a060020a03908116911614610aad57600080fd5b600755565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106c65780601f1061069b576101008083540402835291602001916106c6565b610b28338383610509565b5050565b60096020526000908152604090205460ff1681565b600083610b4e81856106ce565b15610c6b5780600160a060020a0316638f4ffcb1338630876040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610c04578082015183820152602001610bec565b50505050905090810190601f168015610c315780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1515610c5257600080fd5b6102c65a03f11515610c6357600080fd5b505050600191505b509392505050565b600660209081526000928352604080842090915290825290205481565b60005433600160a060020a03908116911614610cab57600080fd5b600160a060020a03821660009081526009602052604090819020805460ff19168315151790557f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a5908390839051600160a060020a039092168252151560208201526040908101905180910390a15050565b60005433600160a060020a03908116911614610d3757600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a723058207f0c7af7d30de4cba57c8760c80472bc56b29b980175f59844bdec703d7aa0ba0029

Verified Source Code Partial Match

Compiler: v0.4.18+commit.9cf6e910 Optimization: Yes (200 runs)
Co2Bit.sol 248 lines
pragma solidity ^0.4.18;
/*
This is based on the standard example of an ERC20 token.
*/
contract owned {
    address public owner;

    function owned() public {
        owner = msg.sender;
    }

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

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

interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }

contract TokenERC20 {
    // Public variables of the token
    string public name;
    string public symbol;
    uint8 public decimals = 18;
    
    uint256 public totalSupply;

    
    mapping (address => uint256) public balanceOf;
    mapping (address => mapping (address => uint256)) public allowance;

    // This generates a public event on the blockchain that will notify clients
    event Transfer(address indexed from, address indexed to, uint256 value);

    // This notifies clients about the amount burnt
    event Burn(address indexed from, uint256 value);

    /**
     * Constructor function
     *
     * Initializes contract with initial supply tokens to the creator of the contract
     */
    function TokenERC20(
        uint256 initialSupply,
        string tokenName,
        string tokenSymbol
    ) public {
        totalSupply = initialSupply * 10 ** uint256(decimals);                    // Update total supply with the decimal amount
        balanceOf[msg.sender] = totalSupply;                                      // Give the creator all initial tokens
        name = tokenName;                                                         // Set the name for display purposes
        symbol = tokenSymbol;                                                     // Set the symbol for display purposes
    }

    /**
     * Internal transfer, only can be called by this contract
     */
    function _transfer(address _from, address _to, uint _value) internal {
        // Prevent transfer to 0x0 address. Use burn() instead
        require(_to != 0x0);
        // Check if the sender has enough
        require(balanceOf[_from] >= _value);
        // Check for overflows
        require(balanceOf[_to] + _value > balanceOf[_to]);
        // Save this for an assertion in the future
        uint previousBalances = balanceOf[_from] + balanceOf[_to];
        // Subtract from the sender
        balanceOf[_from] -= _value;
        // Add the same to the recipient
        balanceOf[_to] += _value;
        Transfer(_from, _to, _value);
        // Asserts are used to use static analysis to find bugs in your code. They should never fail
        assert(balanceOf[_from] + balanceOf[_to] == previousBalances);
    }

    /**
     * Transfer tokens
     *
     * Send `_value` tokens to `_to` from your account
     *
     * @param _to The address of the recipient
     * @param _value the amount to send
     */
    function transfer(address _to, uint256 _value) public {
        _transfer(msg.sender, _to, _value);
    }

    /**
     * Transfer tokens from other address
     *
     * Send `_value` tokens to `_to` in behalf of `_from`
     *
     * @param _from The address of the sender
     * @param _to The address of the recipient
     * @param _value the amount to send
     */
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
        require(_value <= allowance[_from][msg.sender]);     // Check allowance
        allowance[_from][msg.sender] -= _value;
        _transfer(_from, _to, _value);
        return true;
    }

    /**
     * Set allowance for other address
     *
     * Allows `_spender` to spend no more than `_value` tokens in your behalf
     *
     * @param _spender The address authorized to spend
     * @param _value the max amount they can spend
     */
    function approve(address _spender, uint256 _value) public
        returns (bool success) {
        allowance[msg.sender][_spender] = _value;
        return true;
    }

    /**
     * Set allowance for other address and notify
     *
     * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
     *
     * @param _spender The address authorized to spend
     * @param _value the max amount they can spend
     * @param _extraData some extra information to send to the approved contract
     */
    function approveAndCall(address _spender, uint256 _value, bytes _extraData)
        public
        returns (bool success) {
        tokenRecipient spender = tokenRecipient(_spender);
        if (approve(_spender, _value)) {
            spender.receiveApproval(msg.sender, _value, this, _extraData);
            return true;
        }
    }

    /**
     * Destroy tokens
     *
     * Remove `_value` tokens from the system irreversibly
     *
     * @param _value the amount of money to burn
     */
    function burn(uint256 _value) public returns (bool success) {
        require(balanceOf[msg.sender] >= _value);   // Check if the sender has enough
        balanceOf[msg.sender] -= _value;            // Subtract from the sender
        totalSupply -= _value;                      // Updates totalSupply
        Burn(msg.sender, _value);
        return true;
    }

    /**
     * Destroy tokens from other account
     *
     * Remove `_value` tokens from the system irreversibly on behalf of `_from`.
     *
     * @param _from the address of the sender
     * @param _value the amount of money to burn
     */
    function burnFrom(address _from, uint256 _value) public returns (bool success) {
        require(balanceOf[_from] >= _value);                // Check if the targeted balance is enough
        require(_value <= allowance[_from][msg.sender]);    // Check allowance
        balanceOf[_from] -= _value;                         // Subtract from the targeted balance
        allowance[_from][msg.sender] -= _value;             // Subtract from the sender's allowance
        totalSupply -= _value;                              // Update totalSupply
        Burn(_from, _value);
        return true;
    }
}

contract Co2Bit is owned, TokenERC20 {

    uint256 public buyPrice;
    bool public isContractFrozen;
    
    mapping (address => bool) public frozenAccount;
    
    /* This generates a public event on the blockchain that will notify clients */
    event FrozenFunds(address target, bool frozen);
    event FrozenContract(bool frozen);

    /* Initializes contract with initial supply tokens to the creator of the contract */
    function Co2Bit(
        uint256 initialSupply,
        string tokenName,
        string tokenSymbol
    ) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}

    /* Internal transfer, only can be called by this contract */
    function _transfer(address _from, address _to, uint _value) internal {
        require (!isContractFrozen);
        require (_to != 0x0);                               // Prevent transfer to 0x0 address. Use burn() instead
        require (balanceOf[_from] >= _value);               // Check if the sender has enough
        require (balanceOf[_to] + _value > balanceOf[_to]); // Check for overflows
        require(!frozenAccount[_from]);                     // Check if sender is frozen
        require(!frozenAccount[_to]);                       // Check if recipient is frozen
        balanceOf[_from] -= _value;                         // Subtract from the sender
        balanceOf[_to] += _value;                           // Add the same to the recipient
        Transfer(_from, _to, _value);
    }

    /// @notice Create `mintedAmount` tokens and send it to `target`
    /// @param target Address to receive the tokens
    /// @param mintedAmount the amount of tokens it will receive
    function mintToken(address target, uint256 mintedAmount) onlyOwner public {
        balanceOf[target] += mintedAmount;
        totalSupply += mintedAmount;
        Transfer(0, this, mintedAmount);
        Transfer(this, target, mintedAmount);
    }

    /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
    /// @param target Address to be frozen
    /// @param freeze either to freeze it or not
    function freezeAccount(address target, bool freeze) onlyOwner public {
        frozenAccount[target] = freeze;
        FrozenFunds(target, freeze);
    }

    function freezeContract(bool freeze) onlyOwner public {
      /// Implements the ability to stop all token transfers 
      ///   in order to migrate to a new contract
        isContractFrozen = freeze;
        FrozenContract(freeze);           // trigers network event
    }
    
    function setPrice(uint256 newBuyPrice) onlyOwner public {
        buyPrice = newBuyPrice;                           
    }
    
    function () public payable {
        require (buyPrice != 0);                          // don't allow purchases before price has been set 
        uint amountTokens = msg.value*buyPrice;           // calculate tokens to be sent
        _transfer(this, msg.sender, amountTokens);        // makes the token transfer
        owner.transfer(msg.value);
    }
    
    function withdrawTokens(uint256 amount) onlyOwner public{
        _transfer(this, msg.sender, amount);
    }
    
    function kill() onlyOwner public{
        selfdestruct(msg.sender);
    }
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
buyPrice 0x8620410b → uint256
decimals 0x313ce567 → uint8
frozenAccount 0xb414d4b6 → bool
isContractFrozen 0x131d2873 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 13 functions

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

approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
approveAndCall 0xcae9ca51
address _spender
uint256 _value
bytes _extraData
returns: bool
burn 0x42966c68
uint256 _value
returns: bool
burnFrom 0x79cc6790
address _from
uint256 _value
returns: bool
freezeAccount 0xe724529c
address target
bool freeze
freezeContract 0x6b4c0789
bool freeze
kill 0x41c0e1b5
No parameters
mintToken 0x79c65068
address target
uint256 mintedAmount
setPrice 0x91b7f5ed
uint256 newBuyPrice
transfer 0xa9059cbb
address _to
uint256 _value
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
withdrawTokens 0x315a095d
uint256 amount

Recent Transactions

No transactions found for this address