Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
160,674 COLR
Holders
243
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 0 Decimals)
Balance
19 COLRValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Color
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-08-30 */ pragma solidity ^0.4.21; // File: openzeppelin-solidity/contracts/ownership/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: openzeppelin-solidity/contracts/token/ERC721/ERC721Basic.sol /** * @title ERC721 Non-Fungible Token Standard basic interface * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721Basic { event Transfer(address indexed _from, address indexed _to, uint256 _tokenId); event Approval(address indexed _owner, address indexed _approved, uint256 _tokenId); event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); function balanceOf(address _owner) public view returns (uint256 _balance); function ownerOf(uint256 _tokenId) public view returns (address _owner); function exists(uint256 _tokenId) public view returns (bool _exists); function approve(address _to, uint256 _tokenId) public; function getApproved(uint256 _tokenId) public view returns (address _operator); function setApprovalForAll(address _operator, bool _approved) public; function isApprovedForAll(address _owner, address _operator) public view returns (bool); function transferFrom(address _from, address _to, uint256 _tokenId) public; function safeTransferFrom(address _from, address _to, uint256 _tokenId) public; function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes _data ) public; } // File: openzeppelin-solidity/contracts/token/ERC721/ERC721.sol /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721Enumerable is ERC721Basic { function totalSupply() public view returns (uint256); function tokenOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256 _tokenId); function tokenByIndex(uint256 _index) public view returns (uint256); } /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721Metadata is ERC721Basic { function name() public view returns (string _name); function symbol() public view returns (string _symbol); function tokenURI(uint256 _tokenId) public view returns (string); } /** * @title ERC-721 Non-Fungible Token Standard, full implementation interface * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721 is ERC721Basic, ERC721Enumerable, ERC721Metadata { } // File: openzeppelin-solidity/contracts/AddressUtils.sol /** * Utility library of inline functions on addresses */ library AddressUtils { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param addr address to check * @return whether the target address is a contract */ function isContract(address addr) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details about how this works. // TODO Check this again before the Serenity release, because all addresses will be // contracts then. assembly { size := extcodesize(addr) } // solium-disable-line security/no-inline-assembly return size > 0; } } // File: openzeppelin-solidity/contracts/math/SafeMath.sol /** * @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; } } // File: openzeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ contract ERC721Receiver { /** * @dev Magic value to be returned upon successful reception of an NFT * Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`, * which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` */ bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; /** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a `safetransfer`. This function MAY throw to revert and reject the * transfer. This function MUST use 50,000 gas or less. Return of other * than the magic value MUST result in the transaction being reverted. * Note: the contract address is always the message sender. * @param _from The sending address * @param _tokenId The NFT identifier which is being transfered * @param _data Additional data with no specified format * @return `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` */ function onERC721Received(address _from, uint256 _tokenId, bytes _data) public returns(bytes4); } // File: openzeppelin-solidity/contracts/token/ERC721/ERC721BasicToken.sol /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721BasicToken is ERC721Basic { using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 constant ERC721_RECEIVED = 0xf0b9e5ba; // Mapping from token ID to owner mapping (uint256 => address) internal tokenOwner; // Mapping from token ID to approved address mapping (uint256 => address) internal tokenApprovals; // Mapping from owner to number of owned token mapping (address => uint256) internal ownedTokensCount; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) internal operatorApprovals; /** * @dev Guarantees msg.sender is owner of the given token * @param _tokenId uint256 ID of the token to validate its ownership belongs to msg.sender */ modifier onlyOwnerOf(uint256 _tokenId) { require(ownerOf(_tokenId) == msg.sender); _; } /** * @dev Checks msg.sender can transfer a token, by being owner, approved, or operator * @param _tokenId uint256 ID of the token to validate */ modifier canTransfer(uint256 _tokenId) { require(isApprovedOrOwner(msg.sender, _tokenId)); _; } /** * @dev Gets the balance of the specified address * @param _owner address to query the balance of * @return uint256 representing the amount owned by the passed address */ function balanceOf(address _owner) public view returns (uint256) { require(_owner != address(0)); return ownedTokensCount[_owner]; } /** * @dev Gets the owner of the specified token ID * @param _tokenId uint256 ID of the token to query the owner of * @return owner address currently marked as the owner of the given token ID */ function ownerOf(uint256 _tokenId) public view returns (address) { address owner = tokenOwner[_tokenId]; require(owner != address(0)); return owner; } /** * @dev Returns whether the specified token exists * @param _tokenId uint256 ID of the token to query the existance of * @return whether the token exists */ function exists(uint256 _tokenId) public view returns (bool) { address owner = tokenOwner[_tokenId]; return owner != address(0); } /** * @dev Approves another address to transfer the given token ID * @dev The zero address indicates there is no approved address. * @dev There can only be one approved address per token at a given time. * @dev Can only be called by the token owner or an approved operator. * @param _to address to be approved for the given token ID * @param _tokenId uint256 ID of the token to be approved */ function approve(address _to, uint256 _tokenId) public { address owner = ownerOf(_tokenId); require(_to != owner); require(msg.sender == owner || isApprovedForAll(owner, msg.sender)); if (getApproved(_tokenId) != address(0) || _to != address(0)) { tokenApprovals[_tokenId] = _to; emit Approval(owner, _to, _tokenId); } } /** * @dev Gets the approved address for a token ID, or zero if no address set * @param _tokenId uint256 ID of the token to query the approval of * @return address currently approved for a the given token ID */ function getApproved(uint256 _tokenId) public view returns (address) { return tokenApprovals[_tokenId]; } /** * @dev Sets or unsets the approval of a given operator * @dev An operator is allowed to transfer all tokens of the sender on their behalf * @param _to operator address to set the approval * @param _approved representing the status of the approval to be set */ function setApprovalForAll(address _to, bool _approved) public { require(_to != msg.sender); operatorApprovals[msg.sender][_to] = _approved; emit ApprovalForAll(msg.sender, _to, _approved); } /** * @dev Tells whether an operator is approved by a given owner * @param _owner owner address which you want to query the approval of * @param _operator operator address which you want to query the approval of * @return bool whether the given operator is approved by the given owner */ function isApprovedForAll(address _owner, address _operator) public view returns (bool) { return operatorApprovals[_owner][_operator]; } /** * @dev Transfers the ownership of a given token ID to another address * @dev Usage of this method is discouraged, use `safeTransferFrom` whenever possible * @dev Requires the msg sender to be the owner, approved, or operator * @param _from current owner of the token * @param _to address to receive the ownership of the given token ID * @param _tokenId uint256 ID of the token to be transferred */ function transferFrom(address _from, address _to, uint256 _tokenId) public canTransfer(_tokenId) { require(_from != address(0)); require(_to != address(0)); clearApproval(_from, _tokenId); removeTokenFrom(_from, _tokenId); addTokenTo(_to, _tokenId); emit Transfer(_from, _to, _tokenId); } /** * @dev Safely transfers the ownership of a given token ID to another address * @dev If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * @dev Requires the msg sender to be the owner, approved, or operator * @param _from current owner of the token * @param _to address to receive the ownership of the given token ID * @param _tokenId uint256 ID of the token to be transferred */ function safeTransferFrom( address _from, address _to, uint256 _tokenId ) public canTransfer(_tokenId) { // solium-disable-next-line arg-overflow safeTransferFrom(_from, _to, _tokenId, ""); } /** * @dev Safely transfers the ownership of a given token ID to another address * @dev If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * @dev Requires the msg sender to be the owner, approved, or operator * @param _from current owner of the token * @param _to address to receive the ownership of the given token ID * @param _tokenId uint256 ID of the token to be transferred * @param _data bytes data to send along with a safe transfer check */ function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes _data ) public canTransfer(_tokenId) { transferFrom(_from, _to, _tokenId); // solium-disable-next-line arg-overflow require(checkAndCallSafeTransfer(_from, _to, _tokenId, _data)); } /** * @dev Returns whether the given spender can transfer a given token ID * @param _spender address of the spender to query * @param _tokenId uint256 ID of the token to be transferred * @return bool whether the msg.sender is approved for the given token ID, * is an operator of the owner, or is the owner of the token */ function isApprovedOrOwner(address _spender, uint256 _tokenId) internal view returns (bool) { address owner = ownerOf(_tokenId); return _spender == owner || getApproved(_tokenId) == _spender || isApprovedForAll(owner, _spender); } /** * @dev Internal function to mint a new token * @dev Reverts if the given token ID already exists * @param _to The address that will own the minted token * @param _tokenId uint256 ID of the token to be minted by the msg.sender */ function _mint(address _to, uint256 _tokenId) internal { require(_to != address(0)); addTokenTo(_to, _tokenId); emit Transfer(address(0), _to, _tokenId); } /** * @dev Internal function to burn a specific token * @dev Reverts if the token does not exist * @param _tokenId uint256 ID of the token being burned by the msg.sender */ function _burn(address _owner, uint256 _tokenId) internal { clearApproval(_owner, _tokenId); removeTokenFrom(_owner, _tokenId); emit Transfer(_owner, address(0), _tokenId); } /** * @dev Internal function to clear current approval of a given token ID * @dev Reverts if the given address is not indeed the owner of the token * @param _owner owner of the token * @param _tokenId uint256 ID of the token to be transferred */ function clearApproval(address _owner, uint256 _tokenId) internal { require(ownerOf(_tokenId) == _owner); if (tokenApprovals[_tokenId] != address(0)) { tokenApprovals[_tokenId] = address(0); emit Approval(_owner, address(0), _tokenId); } } /** * @dev Internal function to add a token ID to the list of a given address * @param _to address representing the new owner of the given token ID * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address */ function addTokenTo(address _to, uint256 _tokenId) internal { require(tokenOwner[_tokenId] == address(0)); tokenOwner[_tokenId] = _to; ownedTokensCount[_to] = ownedTokensCount[_to].add(1); } /** * @dev Internal function to remove a token ID from the list of a given address * @param _from address representing the previous owner of the given token ID * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function removeTokenFrom(address _from, uint256 _tokenId) internal { require(ownerOf(_tokenId) == _from); ownedTokensCount[_from] = ownedTokensCount[_from].sub(1); tokenOwner[_tokenId] = address(0); } /** * @dev Internal function to invoke `onERC721Received` on a target address * @dev The call is not executed if the target address is not a contract * @param _from address representing the previous owner of the given token ID * @param _to target address that will receive the tokens * @param _tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function checkAndCallSafeTransfer( address _from, address _to, uint256 _tokenId, bytes _data ) internal returns (bool) { if (!_to.isContract()) { return true; } bytes4 retval = ERC721Receiver(_to).onERC721Received(_from, _tokenId, _data); return (retval == ERC721_RECEIVED); } } // File: openzeppelin-solidity/contracts/token/ERC721/ERC721Token.sol /** * @title Full ERC721 Token * This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721Token is ERC721, ERC721BasicToken { // Token name string internal name_; // Token symbol string internal symbol_; // Mapping from owner to list of owned token IDs mapping (address => uint256[]) internal ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) internal ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] internal allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) internal allTokensIndex; // Optional mapping for token URIs mapping(uint256 => string) internal tokenURIs; /** * @dev Constructor function */ function ERC721Token(string _name, string _symbol) public { name_ = _name; symbol_ = _symbol; } /** * @dev Gets the token name * @return string representing the token name */ function name() public view returns (string) { return name_; } /** * @dev Gets the token symbol * @return string representing the token symbol */ function symbol() public view returns (string) { return symbol_; } /** * @dev Returns an URI for a given token ID * @dev Throws if the token ID does not exist. May return an empty string. * @param _tokenId uint256 ID of the token to query */ function tokenURI(uint256 _tokenId) public view returns (string) { require(exists(_tokenId)); return tokenURIs[_tokenId]; } /** * @dev Gets the token ID at a given index of the tokens list of the requested owner * @param _owner address owning the tokens list to be accessed * @param _index uint256 representing the index to be accessed of the requested tokens list * @return uint256 token ID at the given index of the tokens list owned by the requested address */ function tokenOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256) { require(_index < balanceOf(_owner)); return ownedTokens[_owner][_index]; } /** * @dev Gets the total amount of tokens stored by the contract * @return uint256 representing the total amount of tokens */ function totalSupply() public view returns (uint256) { return allTokens.length; } /** * @dev Gets the token ID at a given index of all the tokens in this contract * @dev Reverts if the index is greater or equal to the total number of tokens * @param _index uint256 representing the index to be accessed of the tokens list * @return uint256 token ID at the given index of the tokens list */ function tokenByIndex(uint256 _index) public view returns (uint256) { require(_index < totalSupply()); return allTokens[_index]; } /** * @dev Internal function to set the token URI for a given token * @dev Reverts if the token ID does not exist * @param _tokenId uint256 ID of the token to set its URI * @param _uri string URI to assign */ function _setTokenURI(uint256 _tokenId, string _uri) internal { require(exists(_tokenId)); tokenURIs[_tokenId] = _uri; } /** * @dev Internal function to add a token ID to the list of a given address * @param _to address representing the new owner of the given token ID * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address */ function addTokenTo(address _to, uint256 _tokenId) internal { super.addTokenTo(_to, _tokenId); uint256 length = ownedTokens[_to].length; ownedTokens[_to].push(_tokenId); ownedTokensIndex[_tokenId] = length; } /** * @dev Internal function to remove a token ID from the list of a given address * @param _from address representing the previous owner of the given token ID * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function removeTokenFrom(address _from, uint256 _tokenId) internal { super.removeTokenFrom(_from, _tokenId); uint256 tokenIndex = ownedTokensIndex[_tokenId]; uint256 lastTokenIndex = ownedTokens[_from].length.sub(1); uint256 lastToken = ownedTokens[_from][lastTokenIndex]; ownedTokens[_from][tokenIndex] = lastToken; ownedTokens[_from][lastTokenIndex] = 0; // Note that this will handle single-element arrays. In that case, both tokenIndex and lastTokenIndex are going to // be zero. Then we can make sure that we will remove _tokenId from the ownedTokens list since we are first swapping // the lastToken to the first position, and then dropping the element placed in the last position of the list ownedTokens[_from].length--; ownedTokensIndex[_tokenId] = 0; ownedTokensIndex[lastToken] = tokenIndex; } /** * @dev Internal function to mint a new token * @dev Reverts if the given token ID already exists * @param _to address the beneficiary that will own the minted token * @param _tokenId uint256 ID of the token to be minted by the msg.sender */ function _mint(address _to, uint256 _tokenId) internal { super._mint(_to, _tokenId); allTokensIndex[_tokenId] = allTokens.length; allTokens.push(_tokenId); } /** * @dev Internal function to burn a specific token * @dev Reverts if the token does not exist * @param _owner owner of the token to burn * @param _tokenId uint256 ID of the token being burned by the msg.sender */ function _burn(address _owner, uint256 _tokenId) internal { super._burn(_owner, _tokenId); // Clear metadata (if any) if (bytes(tokenURIs[_tokenId]).length != 0) { delete tokenURIs[_tokenId]; } // Reorg all tokens array uint256 tokenIndex = allTokensIndex[_tokenId]; uint256 lastTokenIndex = allTokens.length.sub(1); uint256 lastToken = allTokens[lastTokenIndex]; allTokens[tokenIndex] = lastToken; allTokens[lastTokenIndex] = 0; allTokens.length--; allTokensIndex[_tokenId] = 0; allTokensIndex[lastToken] = tokenIndex; } } // File: contracts/Parcel.sol library String { /* From https://ethereum.stackexchange.com/questions/10811/solidity-concatenate-uint-into-a-string */ function appendUintToString(string inStr, uint v) internal pure returns (string str) { uint maxlength = 100; bytes memory reversed = new bytes(maxlength); uint i = 0; while (v != 0) { uint remainder = v % 10; v = v / 10; reversed[i++] = byte(48 + remainder); } bytes memory inStrb = bytes(inStr); bytes memory s = new bytes(inStrb.length + i); uint j; for (j = 0; j < inStrb.length; j++) { s[j] = inStrb[j]; } for (j = 0; j < i; j++) { s[j + inStrb.length] = reversed[i - 1 - j]; } str = string(s); } } contract Parcel is ERC721Token, Ownable { struct BoundingBox { int16 x1; int16 y1; int16 z1; int16 x2; int16 y2; int16 z2; } mapping(uint256 => BoundingBox) internal boundingBoxes; mapping(uint256 => string) internal contentURIs; mapping(uint256 => uint256) internal tokenPrice; address internal creator; event SetPrice(uint256 _tokenId, uint256 _price); constructor () public ERC721Token('Cryptovoxels Parcel', 'CVPA') { creator = msg.sender; } function takeOwnership() public { require(msg.sender == creator); emit OwnershipTransferred(owner, creator); owner = creator; } function mint(address _to, uint256 _tokenId, int16 x1, int16 y1, int16 z1, int16 x2, int16 y2, int16 z2, uint256 _price) public onlyOwner { super._mint(_to, _tokenId); // Set bounds boundingBoxes[_tokenId] = BoundingBox(x1, y1, z1, x2, y2, z2); // Set price tokenPrice[_tokenId] = _price; if (_price > 0) { emit SetPrice(_tokenId, _price); } } function tokenURI(uint256 _tokenId) public view returns (string) { return (String.appendUintToString("https://www.cryptovoxels.com/p/", _tokenId)); } function burn(uint256 _tokenId) public onlyOwner { super._burn(ownerOf(_tokenId), _tokenId); // Delete bounding box metadata delete boundingBoxes[_tokenId]; // Delete content uri metadata if (bytes(contentURIs[_tokenId]).length != 0) { delete contentURIs[_tokenId]; } } // Set the price of the token function setPrice (uint256 _tokenId, uint256 _price) public onlyOwner { // Token must exist require(exists(_tokenId)); // Must be owned by the creator address tokenOwner = ownerOf(_tokenId); require(tokenOwner == creator); // Set price tokenPrice[_tokenId] = _price; emit SetPrice(_tokenId, _price); } // Get the price of the token function getPrice (uint256 _tokenId) public view returns (uint256) { require(exists(_tokenId)); address tokenOwner = ownerOf(_tokenId); if (tokenOwner == creator) { return tokenPrice[_tokenId]; } else { return 0; } } // Buy the token from the owner function buy (uint256 _tokenId) public payable { // Token must exist require(exists(_tokenId)); // Token must be owned by creator address tokenOwner = ownerOf(_tokenId); require(tokenOwner == creator); // Price must be non zero uint256 price = tokenPrice[_tokenId]; require(price > 0); require(msg.value == price); // Do transfer address _from = tokenOwner; address _to = msg.sender; // From #transferFrom clearApproval(_from, _tokenId); removeTokenFrom(_from, _tokenId); addTokenTo(_to, _tokenId); emit Transfer(tokenOwner, _to, _tokenId); // Check transfer worked require(checkAndCallSafeTransfer(_from, _to, _tokenId, "")); // Set price to 0 tokenPrice[_tokenId] = 0; } // Get the bounding box (in metres) of this parcel function getBoundingBox(uint256 _tokenId) public view returns (int16, int16, int16, int16, int16, int16) { require(exists(_tokenId)); return ( boundingBoxes[_tokenId].x1, boundingBoxes[_tokenId].y1, boundingBoxes[_tokenId].z1, boundingBoxes[_tokenId].x2, boundingBoxes[_tokenId].y2, boundingBoxes[_tokenId].z2 ); } // Set a URL to load this scene from. Is normally empty for loading // from the cryptovoxels.com servers. function setContentURI(uint256 _tokenId, string _uri) public { require(exists(_tokenId)); require(ownerOf(_tokenId) == msg.sender); contentURIs[_tokenId] = _uri; } function contentURI(uint256 _tokenId) public view returns (string) { require(exists(_tokenId)); return contentURIs[_tokenId]; } } // File: openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: openzeppelin-solidity/contracts/token/ERC20/BasicToken.sol /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } // File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ 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); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ 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); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } // File: contracts/Color.sol /** * @title Color token */ contract Color is StandardToken, Ownable { string public constant name = "Cryptovoxels Color"; string public constant symbol = "COLR"; uint8 public constant decimals = 0; event Mint(address indexed to, uint256 amount); event MintFinished(); event Burn(address indexed burner, uint256 value); event Staked(address indexed to, uint256 value, uint256 _tokenId); event Withdrawn(address indexed to, uint256 value, uint256 _tokenId); Parcel parcelContract; bool public mintingFinished = false; mapping(uint256 => uint256) internal parcelBalance; address internal creator; modifier canMint() { require(!mintingFinished); _; } modifier hasMintPermission() { require(msg.sender == owner); _; } // 0x79986aF15539de2db9A5086382daEdA917A9CF0C constructor () public { creator = msg.sender; owner = msg.sender; parcelContract = Parcel(0x79986aF15539de2db9A5086382daEdA917A9CF0C); } function takeOwnership() public { require(msg.sender == creator); emit OwnershipTransferred(owner, creator); owner = creator; } function getStake(uint256 _parcel) public view returns (uint256) { return parcelBalance[_parcel]; } function _burn(address _who, uint256 _value) internal { require(_value <= balances[_who]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure balances[_who] = balances[_who].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(_who, _value); emit Transfer(_who, address(0), _value); } /** * @dev Assigns an amount of tokens to a parcel * @param _from address The address which you want to send tokens from * @param _value uint256 The amount of token to be burned * @param _tokenId uint256 The token id of the parcel to send to */ function stake(address _from, uint256 _value, uint256 _tokenId) public { require(_from == msg.sender); _burn(_from, _value); parcelBalance[_tokenId] += _value; emit Staked(_from, _value, _tokenId); } /** * @dev Withdraw tokens from a parcel * @param _to The address that will receive the tokens. * @param _amount The amount of tokens to transfer from parcel. * @param _tokenId The token id of the parcel to retrieve tokens from. * @return A boolean that indicates if the operation was successful. */ function withdraw( address _to, uint256 _amount, uint256 _tokenId ) public canMint returns (bool) { // The sender is the parcel owner address tokenOwner = parcelContract.ownerOf(_tokenId); require(msg.sender == tokenOwner); // The right balance exists require(parcelBalance[_tokenId] > 0); require(parcelBalance[_tokenId] >= _amount); // Decrement the balance parcelBalance[_tokenId] -= _amount; // Mint the tokens totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); emit Withdrawn(_to, _amount, _tokenId); return true; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint( address _to, uint256 _amount ) public hasMintPermission canMint returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() public onlyOwner canMint returns (bool) { mintingFinished = true; emit MintFinished(); return true; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"mintingFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_value","type":"uint256"},{"name":"_tokenId","type":"uint256"}],"name":"stake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"mint","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"takeOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finishMinting","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_tokenId","type":"uint256"}],"name":"withdraw","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_parcel","type":"uint256"}],"name":"getStake","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[],"name":"MintFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"burner","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"_tokenId","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"_tokenId","type":"uint256"}],"name":"Withdrawn","type":"event"},{"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":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]
Contract Creation Code
60806040526004805460a060020a60ff021916905534801561002057600080fd5b506003805460068054600160a060020a0319908116339081179092559182168117821617909155600480549091167379986af15539de2db9a5086382daeda917a9cf0c179055610fda806100756000396000f3006080604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b811461011657806306fdde031461013f578063095ea7b3146101c95780630c51b88f146101ed57806318160ddd1461021657806323b872dd1461023d578063313ce5671461026757806340c10f191461029257806360536172146102b657806366188463146102cb57806370a08231146102ef5780637d64bcb4146103105780638da5cb5b1461032557806395d89b4114610356578063a9059cbb1461036b578063b5c5f6721461038f578063ce325bf8146103b6578063d73dd623146103ce578063dd62ed3e146103f2578063f2fde38b14610419575b600080fd5b34801561012257600080fd5b5061012b61043a565b604080519115158252519081900360200190f35b34801561014b57600080fd5b5061015461044a565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561018e578181015183820152602001610176565b50505050905090810190601f1680156101bb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101d557600080fd5b5061012b600160a060020a0360043516602435610481565b3480156101f957600080fd5b50610214600160a060020a03600435166024356044356104e7565b005b34801561022257600080fd5b5061022b610563565b60408051918252519081900360200190f35b34801561024957600080fd5b5061012b600160a060020a0360043581169060243516604435610569565b34801561027357600080fd5b5061027c6106ce565b6040805160ff9092168252519081900360200190f35b34801561029e57600080fd5b5061012b600160a060020a03600435166024356106d3565b3480156102c257600080fd5b506102146107cb565b3480156102d757600080fd5b5061012b600160a060020a0360043516602435610852565b3480156102fb57600080fd5b5061022b600160a060020a0360043516610942565b34801561031c57600080fd5b5061012b61095d565b34801561033157600080fd5b5061033a6109e1565b60408051600160a060020a039092168252519081900360200190f35b34801561036257600080fd5b506101546109f0565b34801561037757600080fd5b5061012b600160a060020a0360043516602435610a27565b34801561039b57600080fd5b5061012b600160a060020a0360043516602435604435610af6565b3480156103c257600080fd5b5061022b600435610d0f565b3480156103da57600080fd5b5061012b600160a060020a0360043516602435610d21565b3480156103fe57600080fd5b5061022b600160a060020a0360043581169060243516610dba565b34801561042557600080fd5b50610214600160a060020a0360043516610de5565b60045460a060020a900460ff1681565b60408051808201909152601281527f43727970746f766f78656c7320436f6c6f720000000000000000000000000000602082015281565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600160a060020a03831633146104fc57600080fd5b6105068383610e7a565b60008181526005602090815260409182902080548501905581518481529081018390528151600160a060020a038616927f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90928290030190a2505050565b60015490565b6000600160a060020a038316151561058057600080fd5b600160a060020a0384166000908152602081905260409020548211156105a557600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156105d557600080fd5b600160a060020a0384166000908152602081905260409020546105fe908363ffffffff610f6916565b600160a060020a038086166000908152602081905260408082209390935590851681522054610633908363ffffffff610f7b16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610675908363ffffffff610f6916565b600160a060020a0380861660008181526002602090815260408083203384528252918290209490945580518681529051928716939192600080516020610f8f833981519152929181900390910190a35060019392505050565b600081565b600354600090600160a060020a031633146106ed57600080fd5b60045460a060020a900460ff161561070457600080fd5b600154610717908363ffffffff610f7b16565b600155600160a060020a038316600090815260208190526040902054610743908363ffffffff610f7b16565b600160a060020a03841660008181526020818152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a03851691600091600080516020610f8f8339815191529181900360200190a350600192915050565b600654600160a060020a031633146107e257600080fd5b600654600354604051600160a060020a0392831692909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36006546003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156108a757336000908152600260209081526040808320600160a060020a03881684529091528120556108dc565b6108b7818463ffffffff610f6916565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600090600160a060020a0316331461097757600080fd5b60045460a060020a900460ff161561098e57600080fd5b6004805474ff0000000000000000000000000000000000000000191660a060020a1790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a150600190565b600354600160a060020a031681565b60408051808201909152600481527f434f4c5200000000000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a0383161515610a3e57600080fd5b33600090815260208190526040902054821115610a5a57600080fd5b33600090815260208190526040902054610a7a908363ffffffff610f6916565b3360009081526020819052604080822092909255600160a060020a03851681522054610aac908363ffffffff610f7b16565b600160a060020a03841660008181526020818152604091829020939093558051858152905191923392600080516020610f8f8339815191529281900390910190a350600192915050565b600454600090819060a060020a900460ff1615610b1257600080fd5b60048054604080517f6352211e00000000000000000000000000000000000000000000000000000000815292830186905251600160a060020a0390911691636352211e9160248083019260209291908290030181600087803b158015610b7757600080fd5b505af1158015610b8b573d6000803e3d6000fd5b505050506040513d6020811015610ba157600080fd5b5051905033600160a060020a03821614610bba57600080fd5b60008381526005602052604081205411610bd357600080fd5b600083815260056020526040902054841115610bee57600080fd5b600083815260056020526040902080548590039055600154610c16908563ffffffff610f7b16565b600155600160a060020a038516600090815260208190526040902054610c42908563ffffffff610f7b16565b600160a060020a03861660008181526020818152604091829020939093558051878152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518581529051600160a060020a03871691600091600080516020610f8f8339815191529181900360200190a360408051858152602081018590528151600160a060020a038816927f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6928290030190a2506001949350505050565b60009081526005602052604090205490565b336000908152600260209081526040808320600160a060020a0386168452909152812054610d55908363ffffffff610f7b16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a03163314610dfc57600080fd5b600160a060020a0381161515610e1157600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a038216600090815260208190526040902054811115610e9f57600080fd5b600160a060020a038216600090815260208190526040902054610ec8908263ffffffff610f6916565b600160a060020a038316600090815260208190526040902055600154610ef4908263ffffffff610f6916565b600155604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a2604080518281529051600091600160a060020a03851691600080516020610f8f8339815191529181900360200190a35050565b600082821115610f7557fe5b50900390565b81810182811015610f8857fe5b929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058205aaf6052a0119ed5929d8ffeb4af06a3c0c2b1289d0a5c129c60017e455f6b0f0029
Deployed Bytecode
0x6080604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b811461011657806306fdde031461013f578063095ea7b3146101c95780630c51b88f146101ed57806318160ddd1461021657806323b872dd1461023d578063313ce5671461026757806340c10f191461029257806360536172146102b657806366188463146102cb57806370a08231146102ef5780637d64bcb4146103105780638da5cb5b1461032557806395d89b4114610356578063a9059cbb1461036b578063b5c5f6721461038f578063ce325bf8146103b6578063d73dd623146103ce578063dd62ed3e146103f2578063f2fde38b14610419575b600080fd5b34801561012257600080fd5b5061012b61043a565b604080519115158252519081900360200190f35b34801561014b57600080fd5b5061015461044a565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561018e578181015183820152602001610176565b50505050905090810190601f1680156101bb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101d557600080fd5b5061012b600160a060020a0360043516602435610481565b3480156101f957600080fd5b50610214600160a060020a03600435166024356044356104e7565b005b34801561022257600080fd5b5061022b610563565b60408051918252519081900360200190f35b34801561024957600080fd5b5061012b600160a060020a0360043581169060243516604435610569565b34801561027357600080fd5b5061027c6106ce565b6040805160ff9092168252519081900360200190f35b34801561029e57600080fd5b5061012b600160a060020a03600435166024356106d3565b3480156102c257600080fd5b506102146107cb565b3480156102d757600080fd5b5061012b600160a060020a0360043516602435610852565b3480156102fb57600080fd5b5061022b600160a060020a0360043516610942565b34801561031c57600080fd5b5061012b61095d565b34801561033157600080fd5b5061033a6109e1565b60408051600160a060020a039092168252519081900360200190f35b34801561036257600080fd5b506101546109f0565b34801561037757600080fd5b5061012b600160a060020a0360043516602435610a27565b34801561039b57600080fd5b5061012b600160a060020a0360043516602435604435610af6565b3480156103c257600080fd5b5061022b600435610d0f565b3480156103da57600080fd5b5061012b600160a060020a0360043516602435610d21565b3480156103fe57600080fd5b5061022b600160a060020a0360043581169060243516610dba565b34801561042557600080fd5b50610214600160a060020a0360043516610de5565b60045460a060020a900460ff1681565b60408051808201909152601281527f43727970746f766f78656c7320436f6c6f720000000000000000000000000000602082015281565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600160a060020a03831633146104fc57600080fd5b6105068383610e7a565b60008181526005602090815260409182902080548501905581518481529081018390528151600160a060020a038616927f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90928290030190a2505050565b60015490565b6000600160a060020a038316151561058057600080fd5b600160a060020a0384166000908152602081905260409020548211156105a557600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156105d557600080fd5b600160a060020a0384166000908152602081905260409020546105fe908363ffffffff610f6916565b600160a060020a038086166000908152602081905260408082209390935590851681522054610633908363ffffffff610f7b16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610675908363ffffffff610f6916565b600160a060020a0380861660008181526002602090815260408083203384528252918290209490945580518681529051928716939192600080516020610f8f833981519152929181900390910190a35060019392505050565b600081565b600354600090600160a060020a031633146106ed57600080fd5b60045460a060020a900460ff161561070457600080fd5b600154610717908363ffffffff610f7b16565b600155600160a060020a038316600090815260208190526040902054610743908363ffffffff610f7b16565b600160a060020a03841660008181526020818152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a03851691600091600080516020610f8f8339815191529181900360200190a350600192915050565b600654600160a060020a031633146107e257600080fd5b600654600354604051600160a060020a0392831692909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36006546003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156108a757336000908152600260209081526040808320600160a060020a03881684529091528120556108dc565b6108b7818463ffffffff610f6916565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600090600160a060020a0316331461097757600080fd5b60045460a060020a900460ff161561098e57600080fd5b6004805474ff0000000000000000000000000000000000000000191660a060020a1790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a150600190565b600354600160a060020a031681565b60408051808201909152600481527f434f4c5200000000000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a0383161515610a3e57600080fd5b33600090815260208190526040902054821115610a5a57600080fd5b33600090815260208190526040902054610a7a908363ffffffff610f6916565b3360009081526020819052604080822092909255600160a060020a03851681522054610aac908363ffffffff610f7b16565b600160a060020a03841660008181526020818152604091829020939093558051858152905191923392600080516020610f8f8339815191529281900390910190a350600192915050565b600454600090819060a060020a900460ff1615610b1257600080fd5b60048054604080517f6352211e00000000000000000000000000000000000000000000000000000000815292830186905251600160a060020a0390911691636352211e9160248083019260209291908290030181600087803b158015610b7757600080fd5b505af1158015610b8b573d6000803e3d6000fd5b505050506040513d6020811015610ba157600080fd5b5051905033600160a060020a03821614610bba57600080fd5b60008381526005602052604081205411610bd357600080fd5b600083815260056020526040902054841115610bee57600080fd5b600083815260056020526040902080548590039055600154610c16908563ffffffff610f7b16565b600155600160a060020a038516600090815260208190526040902054610c42908563ffffffff610f7b16565b600160a060020a03861660008181526020818152604091829020939093558051878152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518581529051600160a060020a03871691600091600080516020610f8f8339815191529181900360200190a360408051858152602081018590528151600160a060020a038816927f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6928290030190a2506001949350505050565b60009081526005602052604090205490565b336000908152600260209081526040808320600160a060020a0386168452909152812054610d55908363ffffffff610f7b16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a03163314610dfc57600080fd5b600160a060020a0381161515610e1157600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a038216600090815260208190526040902054811115610e9f57600080fd5b600160a060020a038216600090815260208190526040902054610ec8908263ffffffff610f6916565b600160a060020a038316600090815260208190526040902055600154610ef4908263ffffffff610f6916565b600155604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a2604080518281529051600091600160a060020a03851691600080516020610f8f8339815191529181900360200190a35050565b600082821115610f7557fe5b50900390565b81810182811015610f8857fe5b929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058205aaf6052a0119ed5929d8ffeb4af06a3c0c2b1289d0a5c129c60017e455f6b0f0029
Swarm Source
bzzr://5aaf6052a0119ed5929d8ffeb4af06a3c0c2b1289d0a5c129c60017e455f6b0f
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.