ETH Price: $3,161.05 (+4.02%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Mint With Metada...62086632018-08-25 2:54:312662 days ago1535165671IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086592018-08-25 2:53:422662 days ago1535165622IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086552018-08-25 2:53:082662 days ago1535165588IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086532018-08-25 2:52:462662 days ago1535165566IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086502018-08-25 2:52:142662 days ago1535165534IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086502018-08-25 2:52:142662 days ago1535165534IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086502018-08-25 2:52:142662 days ago1535165534IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086462018-08-25 2:50:352662 days ago1535165435IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086422018-08-25 2:50:132662 days ago1535165413IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086402018-08-25 2:49:292662 days ago1535165369IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086402018-08-25 2:49:292662 days ago1535165369IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086382018-08-25 2:48:322662 days ago1535165312IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086362018-08-25 2:48:132662 days ago1535165293IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086362018-08-25 2:48:132662 days ago1535165293IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086362018-08-25 2:48:132662 days ago1535165293IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086332018-08-25 2:47:362662 days ago1535165256IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086332018-08-25 2:47:362662 days ago1535165256IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086332018-08-25 2:47:362662 days ago1535165256IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086312018-08-25 2:47:172662 days ago1535165237IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086242018-08-25 2:45:232662 days ago1535165123IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086142018-08-25 2:43:062662 days ago1535164986IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086142018-08-25 2:43:062662 days ago1535164986IN
0x88339B62...8BD176a4e
0 ETH0.000290541.8
Mint With Metada...62086092018-08-25 2:41:592662 days ago1535164919IN
0x88339B62...8BD176a4e
0 ETH0.000322822
Mint With Metada...62086052018-08-25 2:40:222662 days ago1535164822IN
0x88339B62...8BD176a4e
0 ETH0.000322822
Mint With Metada...62086032018-08-25 2:39:272662 days ago1535164767IN
0x88339B62...8BD176a4e
0 ETH0.000322822
View all transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
View All Internal Transactions
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Cryptopixel

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-08-25
*/

pragma solidity 0.4.24;

contract Cryptopixel {

    // Name of token
    string constant public name = "CryptoPixel";
    // Symbol of Cryptopixel token
  	string constant public symbol = "CPX";


    using SafeMath for uint256;

    /////////////////////////
    // Variables
    /////////////////////////
    // Total number of stored artworks
    uint256 public totalSupply;
    // Group of artwork - 52 is limit
    address[limitChrt] internal artworkGroup;
    // Number of total artworks
    uint constant private limitChrt = 52;
    // This is address of artwork creator
    address constant private creatorAddr = 0x174B3C5f95c9F27Da6758C8Ca941b8FFbD01d330;

    
    // Basic references
    mapping(uint => address) internal tokenIdToOwner;
    mapping(address => uint[]) internal listOfOwnerTokens;
    mapping(uint => string) internal referencedMetadata;
    
    // Events
    event Minted(address indexed _to, uint256 indexed _tokenId);

    // Modifier
    modifier onlyNonexistentToken(uint _tokenId) {
        require(tokenIdToOwner[_tokenId] == address(0));
        _;
    }


    /////////////////////////
    // Viewer Functions
    /////////////////////////
    // Get and returns the address currently marked as the owner of _tokenID. 
    function ownerOf(uint256 _tokenId) public view returns (address _owner)
    {
        return tokenIdToOwner[_tokenId];
    }
    
    // Get and return the total supply of token held by this contract. 
    function totalSupply() public view returns (uint256 _totalSupply)
    {
        return totalSupply;
    }
    
    //Get and return the balance of token held by _owner. 
    function balanceOf(address _owner) public view returns (uint _balance)
    {
        return listOfOwnerTokens[_owner].length;
    }

    // Get and returns a metadata of _tokenId
    function tokenMetadata(uint _tokenId) public view returns (string _metadata)
    {
        return referencedMetadata[_tokenId];
    }
    
    // Retrive artworkGroup
    function getArtworkGroup() public view returns (address[limitChrt]) {
        return artworkGroup;
    }
    
    
    /////////////////////////
    // Update Functions
    /////////////////////////
    /**
     * @dev Public function to mint a new token with metadata
     * @dev Reverts if the given token ID already exists
     * @param _owner The address that will own the minted token
     * @param _tokenId uint256 ID of the token to be minted by the msg.sender(creator)
     * @param _metadata string of meta data, IPFS hash
     */
    function mintWithMetadata(address _owner, uint256 _tokenId, string _metadata) public onlyNonexistentToken (_tokenId)
    {
        require(totalSupply < limitChrt);
        require(creatorAddr == _owner);
        
        _setTokenOwner(_tokenId, _owner);
        _addTokenToOwnersList(_owner, _tokenId);
        _insertTokenMetadata(_tokenId, _metadata);

        artworkGroup[_tokenId] = _owner;
        totalSupply = totalSupply.add(1);
        emit Minted(_owner, _tokenId);
    }

    /**
     * @dev Public function to add created token id in group
     * @param _owner The address that will own the minted token
     * @param _tokenId uint256 ID of the token to be minted by the msg.sender(creator)
     * @return _tokenId uint256 ID of the token 
     */
    function group(address _owner, uint _tokenId) public returns (uint) {
        require(_tokenId >= 0 && _tokenId <= limitChrt);
        artworkGroup[_tokenId] = _owner;    
        return _tokenId;
    }

    
    /////////////////////////
    // Internal, helper functions
    /////////////////////////
    function _setTokenOwner(uint _tokenId, address _owner) internal
    {
        tokenIdToOwner[_tokenId] = _owner;
    }

    function _addTokenToOwnersList(address _owner, uint _tokenId) internal
    {
        listOfOwnerTokens[_owner].push(_tokenId);
    }

    function _insertTokenMetadata(uint _tokenId, string _metadata) internal
    {
        referencedMetadata[_tokenId] = _metadata;
    }
    
}

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
    if (a == 0) {
      return 0;
    }
    c = a * b;
    assert(c / a == b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  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 a / b;
  }

  /**
  * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
    c = a + b;
    assert(c >= a);
    return c;
  }
}

Contract Security Audit

Contract ABI

API
[{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"group","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"_totalSupply","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_tokenId","type":"uint256"},{"name":"_metadata","type":"string"}],"name":"mintWithMetadata","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"_owner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"tokenMetadata","outputs":[{"name":"_metadata","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"_balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getArtworkGroup","outputs":[{"name":"","type":"address[52]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_to","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Minted","type":"event"}]

608060405234801561001057600080fd5b50610aeb806100206000396000f300608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063041b8c3e1461009e57806306fdde03146100ff57806318160ddd1461018f5780632d63f728146101ba5780636352211e1461024d5780636914db60146102ba57806370a08231146103605780638b833318146103b757806395d89b411461040a575b600080fd5b3480156100aa57600080fd5b506100e9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061049a565b6040518082815260200191505060405180910390f35b34801561010b57600080fd5b50610114610510565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610154578082015181840152602081019050610139565b50505050905090810190601f1680156101815780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019b57600080fd5b506101a4610549565b6040518082815260200191505060405180910390f35b3480156101c657600080fd5b5061024b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610552565b005b34801561025957600080fd5b50610278600480360381019080803590602001909291905050506106f3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102c657600080fd5b506102e560048036038101908080359060200190929190505050610730565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561032557808201518184015260208101905061030a565b50505050905090810190601f1680156103525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561036c57600080fd5b506103a1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107e5565b6040518082815260200191505060405180910390f35b3480156103c357600080fd5b506103cc610831565b6040518082603460200280838360005b838110156103f75780820151818401526020810190506103dc565b5050505090500191505060405180910390f35b34801561041657600080fd5b5061041f6108b2565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561045f578082015181840152602081019050610444565b50505050905090810190601f16801561048c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60008082101580156104ad575060348211155b15156104b857600080fd5b826001836034811015156104c857fe5b0160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081905092915050565b6040805190810160405280600b81526020017f43727970746f506978656c00000000000000000000000000000000000000000081525081565b60008054905090565b81600073ffffffffffffffffffffffffffffffffffffffff166035600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156105c157600080fd5b60346000541015156105d257600080fd5b8373ffffffffffffffffffffffffffffffffffffffff1673174b3c5f95c9f27da6758c8ca941b8ffbd01d33073ffffffffffffffffffffffffffffffffffffffff1614151561062057600080fd5b61062a83856108eb565b6106348484610941565b61063e83836109ae565b8360018460348110151561064e57fe5b0160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506106a360016000546109da90919063ffffffff16565b600081905550828473ffffffffffffffffffffffffffffffffffffffff167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe60405160405180910390a350505050565b60006035600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6060603760008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107d95780601f106107ae576101008083540402835291602001916107d9565b820191906000526020600020905b8154815290600101906020018083116107bc57829003601f168201915b50505050509050919050565b6000603660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b6108396109f6565b60016034806020026040519081016040528092919082603480156108a8576020028201915b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161085e575b5050505050905090565b6040805190810160405280600381526020017f435058000000000000000000000000000000000000000000000000000000000081525081565b806035600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b603660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190806001815401808255809150509060018203906000526020600020016000909192909190915055505050565b806037600084815260200190815260200160002090805190602001906109d5929190610a1a565b505050565b600081830190508281101515156109ed57fe5b80905092915050565b61068060405190810160405280603490602082028038833980820191505090505090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610a5b57805160ff1916838001178555610a89565b82800160010185558215610a89579182015b82811115610a88578251825591602001919060010190610a6d565b5b509050610a969190610a9a565b5090565b610abc91905b80821115610ab8576000816000905550600101610aa0565b5090565b905600a165627a7a723058202bb333ea74720518a43f0693e497dd5424b0560e8ea25a374801646e046200280029

Deployed Bytecode

0x608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063041b8c3e1461009e57806306fdde03146100ff57806318160ddd1461018f5780632d63f728146101ba5780636352211e1461024d5780636914db60146102ba57806370a08231146103605780638b833318146103b757806395d89b411461040a575b600080fd5b3480156100aa57600080fd5b506100e9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061049a565b6040518082815260200191505060405180910390f35b34801561010b57600080fd5b50610114610510565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610154578082015181840152602081019050610139565b50505050905090810190601f1680156101815780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019b57600080fd5b506101a4610549565b6040518082815260200191505060405180910390f35b3480156101c657600080fd5b5061024b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610552565b005b34801561025957600080fd5b50610278600480360381019080803590602001909291905050506106f3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102c657600080fd5b506102e560048036038101908080359060200190929190505050610730565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561032557808201518184015260208101905061030a565b50505050905090810190601f1680156103525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561036c57600080fd5b506103a1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107e5565b6040518082815260200191505060405180910390f35b3480156103c357600080fd5b506103cc610831565b6040518082603460200280838360005b838110156103f75780820151818401526020810190506103dc565b5050505090500191505060405180910390f35b34801561041657600080fd5b5061041f6108b2565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561045f578082015181840152602081019050610444565b50505050905090810190601f16801561048c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60008082101580156104ad575060348211155b15156104b857600080fd5b826001836034811015156104c857fe5b0160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081905092915050565b6040805190810160405280600b81526020017f43727970746f506978656c00000000000000000000000000000000000000000081525081565b60008054905090565b81600073ffffffffffffffffffffffffffffffffffffffff166035600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156105c157600080fd5b60346000541015156105d257600080fd5b8373ffffffffffffffffffffffffffffffffffffffff1673174b3c5f95c9f27da6758c8ca941b8ffbd01d33073ffffffffffffffffffffffffffffffffffffffff1614151561062057600080fd5b61062a83856108eb565b6106348484610941565b61063e83836109ae565b8360018460348110151561064e57fe5b0160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506106a360016000546109da90919063ffffffff16565b600081905550828473ffffffffffffffffffffffffffffffffffffffff167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe60405160405180910390a350505050565b60006035600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6060603760008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107d95780601f106107ae576101008083540402835291602001916107d9565b820191906000526020600020905b8154815290600101906020018083116107bc57829003601f168201915b50505050509050919050565b6000603660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b6108396109f6565b60016034806020026040519081016040528092919082603480156108a8576020028201915b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161085e575b5050505050905090565b6040805190810160405280600381526020017f435058000000000000000000000000000000000000000000000000000000000081525081565b806035600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b603660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190806001815401808255809150509060018203906000526020600020016000909192909190915055505050565b806037600084815260200190815260200160002090805190602001906109d5929190610a1a565b505050565b600081830190508281101515156109ed57fe5b80905092915050565b61068060405190810160405280603490602082028038833980820191505090505090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610a5b57805160ff1916838001178555610a89565b82800160010185558215610a89579182015b82811115610a88578251825591602001919060010190610a6d565b5b509050610a969190610a9a565b5090565b610abc91905b80821115610ab8576000816000905550600101610aa0565b5090565b905600a165627a7a723058202bb333ea74720518a43f0693e497dd5424b0560e8ea25a374801646e046200280029

Swarm Source

bzzr://2bb333ea74720518a43f0693e497dd5424b0560e8ea25a374801646e04620028

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.