Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
316 HKP
Holders
82
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
5 HKPLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
HashKingsPlanet
Compiler Version
v0.4.25+commit.59dbf8f1
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-11-27 */ pragma solidity ^0.4.25; /* ******************** - HashKings Planet - ******************** v1.0 Daniel Pittman - Qwoyn.io *Note: * *Holds all the plots from HashKings *********************************** */ /** * @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) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 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; } } /** * @title Helps contracts guard against reentrancy attacks. * @author Remco Bloemen <remco@2π.com>, Eenae <[email protected]> * @dev If you mark a function `nonReentrant`, you should also * mark it `external`. */ contract ReentrancyGuard { /// @dev counter to allow mutex lock with only one SSTORE operation uint256 private guardCounter = 1; /** * @dev Prevents a contract from calling itself, directly or indirectly. * If you mark a function `nonReentrant`, you should also * mark it `external`. Calling one `nonReentrant` function from * another is not supported. Instead, you can implement a * `private` function doing the actual work, and an `external` * wrapper marked as `nonReentrant`. */ modifier nonReentrant() { guardCounter += 1; uint256 localCounter = guardCounter; _; require(localCounter == guardCounter); } } /** * @title ERC165 * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md */ interface ERC165 { /** * @notice Query if a contract implements an interface * @param _interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function * uses less than 30,000 gas. */ function supportsInterface(bytes4 _interfaceId) external view returns (bool); } /** * @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,address,uint256,bytes)"))`, * which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` */ bytes4 internal constant ERC721_RECEIVED = 0x150b7a02; /** * @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. Return of other than the magic value MUST result in the * transaction being reverted. * Note: the contract address is always the message sender. * @param _operator The address which called `safeTransferFrom` function * @param _from The address which previously owned the token * @param _tokenId The NFT identifier which is being transfered * @param _data Additional data with no specified format * @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` */ function onERC721Received( address _operator, address _from, uint256 _tokenId, bytes _data ) public returns(bytes4); } /** * 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. // solium-disable-next-line security/no-inline-assembly assembly { size := extcodesize(addr) } return size > 0; } } /** * @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 OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() 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 relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } /** * @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 { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal onlyOwner { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } contract Fallback is Ownable { function withdraw() public onlyOwner { owner.transfer(address(this).balance); } } /** * @title SupportsInterfaceWithLookup * @author Matt Condon (@shrugs) * @dev Implements ERC165 using a lookup table. */ contract SupportsInterfaceWithLookup is ERC165 { bytes4 public constant InterfaceId_ERC165 = 0x01ffc9a7; /** * 0x01ffc9a7 === * bytes4(keccak256('supportsInterface(bytes4)')) */ /** * @dev a mapping of interface id to whether or not it's supported */ mapping(bytes4 => bool) internal supportedInterfaces; /** * @dev A contract implementing SupportsInterfaceWithLookup * implement ERC165 itself */ constructor() public { _registerInterface(InterfaceId_ERC165); } /** * @dev implement supportsInterface(bytes4) using a lookup table */ function supportsInterface(bytes4 _interfaceId) external view returns (bool) { return supportedInterfaces[_interfaceId]; } /** * @dev private method for registering an interface */ function _registerInterface(bytes4 _interfaceId) internal { require(_interfaceId != 0xffffffff); supportedInterfaces[_interfaceId] = true; } } /** * @title ERC721 Non-Fungible Token Standard basic interface * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721Basic is ERC165 { event Transfer( address indexed _from, address indexed _to, uint256 indexed _tokenId ); event Approval( address indexed _owner, address indexed _approved, uint256 indexed _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; } /** * @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() external view returns (string _name); function symbol() external 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 { } /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic { bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ * bytes4(keccak256('getApproved(uint256)')) ^ * bytes4(keccak256('setApprovalForAll(address,bool)')) ^ * bytes4(keccak256('isApprovedForAll(address,address)')) ^ * bytes4(keccak256('transferFrom(address,address,uint256)')) ^ * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) ^ * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) */ bytes4 private constant InterfaceId_ERC721Exists = 0x4f558e79; /* * 0x4f558e79 === * bytes4(keccak256('exists(uint256)')) */ using SafeMath for uint256; using AddressUtils for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector` bytes4 private constant ERC721_RECEIVED = 0x150b7a02; // 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)); _; } constructor() public { // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(InterfaceId_ERC721); _registerInterface(InterfaceId_ERC721Exists); } /** * @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 existence 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 * The zero address indicates there is no approved address. * There can only be one approved address per token at a given time. * 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)); 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 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 * 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 * Usage of this method is discouraged, use `safeTransferFrom` whenever possible * 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 * 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,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * * 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 * 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,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * 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); // Disable solium check because of // https://github.com/duaraghav8/Solium/issues/175 // solium-disable-next-line operator-whitespace return ( _spender == owner || getApproved(_tokenId) == _spender || isApprovedForAll(owner, _spender) ); } /** * @dev Internal function to mint a new token * 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 clear current approval of a given token ID * 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); } } /** * @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 * 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( msg.sender, _from, _tokenId, _data); return (retval == ERC721_RECEIVED); } } /** * @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 HashKingsPlanet is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721, Ownable, Fallback { /*** EVENTS ***/ /// The event emitted (useable by web3) when a token is purchased event BoughtToken(address indexed buyer, uint256 tokenId); /*** CONSTANTS ***/ string public constant company = "Qwoyn, LLC "; string public constant contact = "https://qwoyn.io"; string public constant author = "Daniel Pittman"; uint8 constant TITLE_MAX_LENGTH = 64; uint256 constant DESCRIPTION_MAX_LENGTH = 100000; /*** DATA TYPES ***/ /// Price set by contract owner for each token in Wei /// @dev If you'd like a different price for each token type, you will /// need to use a mapping like: `mapping(uint256 => uint256) tokenTypePrices;` uint256 currentPrice = 0; mapping(uint256 => string) tokenTitles; mapping(uint256 => string) tokenDescriptions; constructor(string _name, string _symbol) public { name_ = _name; symbol_ = _symbol; // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(InterfaceId_ERC721Enumerable); _registerInterface(InterfaceId_ERC721Metadata); } /// Requires the amount of Ether be at least or more of the currentPrice /// @dev Creates an instance of an token and mints it to the purchaser /// @param _type The token type as an integer, dappCap and slammers noted here. /// @param _title The short title of the token /// @param _description Description of the token function buyToken ( string _title, string _description ) public onlyOwner { bytes memory _titleBytes = bytes(_title); require(_titleBytes.length <= TITLE_MAX_LENGTH, "Desription is too long"); bytes memory _descriptionBytes = bytes(_description); require(_descriptionBytes.length <= DESCRIPTION_MAX_LENGTH, "Description is too long"); require(msg.value >= currentPrice, "Amount of Ether sent too small"); uint256 index = allTokens.length + 1; _mint(msg.sender, index); tokenTitles[index] = _title; tokenDescriptions[index] = _description; emit BoughtToken(msg.sender, index); } /** * @dev Returns all of the tokens that the user owns * @return An array of token indices */ function myTokens() external view returns ( uint256[] ) { return ownedTokens[msg.sender]; } /// @notice Returns all the relevant information about a specific token /// @param _tokenId The ID of the token of interest function viewTokenMeta(uint256 _tokenId) external view returns ( string tokenTitle_, string tokenDescription_ ) { tokenTitle_ = tokenTitles[_tokenId]; tokenDescription_ = tokenDescriptions[_tokenId]; } /// @notice Allows the owner of this contract to set the currentPrice for each token function setCurrentPrice(uint256 newPrice) public onlyOwner { currentPrice = newPrice; } /// @notice Returns the currentPrice for each token function getCurrentPrice() external view returns ( uint256 price ) { price = currentPrice; } bytes4 private constant InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('tokenByIndex(uint256)')) */ bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f; /** * 0x5b5e139f === * bytes4(keccak256('name()')) ^ * bytes4(keccak256('symbol()')) ^ * bytes4(keccak256('tokenURI(uint256)')) */ // 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 Gets the token name * @return string representing the token name */ function name() external view returns (string) { return name_; } /** * @dev Gets the token symbol * @return string representing the token symbol */ function symbol() external view returns (string) { return symbol_; } /** * @dev Returns an URI for a given token ID * 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 * 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 * 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) public onlyOwner { 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 * 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); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"_uri","type":"string"}],"name":"_setTokenURI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","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":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","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":"newPrice","type":"uint256"}],"name":"setCurrentPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"InterfaceId_ERC165","outputs":[{"name":"","type":"bytes4"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"contact","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"exists","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"company","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","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":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"viewTokenMeta","outputs":[{"name":"tokenTitle_","type":"string"},{"name":"tokenDescription_","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"myTokens","outputs":[{"name":"","type":"uint256[]"}],"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":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"author","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_title","type":"string"},{"name":"_description","type":"string"}],"name":"buyToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentPrice","outputs":[{"name":"price","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":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"}],"name":"BoughtToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"}],"name":"OwnershipRenounced","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":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_approved","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":false,"name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"}]
Contract Creation Code
608060405260006006553480156200001657600080fd5b5060405162001cfa38038062001cfa833981016040528051602082015190820191016200006c7f01ffc9a70000000000000000000000000000000000000000000000000000000064010000000062000182810204565b620000a07f80ac58cd0000000000000000000000000000000000000000000000000000000064010000000062000182810204565b620000d47f4f558e790000000000000000000000000000000000000000000000000000000064010000000062000182810204565b60058054600160a060020a031916331790558151620000fb906009906020850190620001ef565b5080516200011190600a906020840190620001ef565b50620001467f780e9d630000000000000000000000000000000000000000000000000000000064010000000062000182810204565b6200017a7f5b5e139f0000000000000000000000000000000000000000000000000000000064010000000062000182810204565b505062000294565b7fffffffff000000000000000000000000000000000000000000000000000000008082161415620001b257600080fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152602081905260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200023257805160ff191683800117855562000262565b8280016001018555821562000262579182015b828111156200026257825182559160200191906001019062000245565b506200027092915062000274565b5090565b6200029191905b808211156200027057600081556001016200027b565b90565b611a5680620002a46000396000f30060806040526004361061018a5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301538868811461018f57806301ffc9a7146101ef57806306fdde0314610225578063081812fc146102af578063095ea7b3146102e357806318160ddd1461030757806318b200711461032e57806319fa8f501461034657806323b872dd146103785780632f745c59146103a257806333a8c45a146103c65780633ccfd60b146103db57806342842e0e146103f05780634f558e791461041a5780634f6ccce7146104325780636352211e1461044a5780636904c94d1461046257806370a0823114610477578063715018a6146104985780637dd7d32d146104ad5780638da5cb5b146105a3578063949e8acd146105b857806395d89b411461061d578063a22cb46514610632578063a6c3e6b914610658578063ad8b9edc1461066d578063b88d4fde14610704578063c87b56dd14610773578063e985e9c51461078b578063eb91d37e146107b2578063f2fde38b146107c7575b600080fd5b34801561019b57600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526101ed9583359536956044949193909101919081908401838280828437509497506107e89650505050505050565b005b3480156101fb57600080fd5b50610211600160e060020a031960043516610837565b604080519115158252519081900360200190f35b34801561023157600080fd5b5061023a610856565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561027457818101518382015260200161025c565b50505050905090810190601f1680156102a15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102bb57600080fd5b506102c76004356108ed565b60408051600160a060020a039092168252519081900360200190f35b3480156102ef57600080fd5b506101ed600160a060020a0360043516602435610908565b34801561031357600080fd5b5061031c6109be565b60408051918252519081900360200190f35b34801561033a57600080fd5b506101ed6004356109c4565b34801561035257600080fd5b5061035b6109e0565b60408051600160e060020a03199092168252519081900360200190f35b34801561038457600080fd5b506101ed600160a060020a0360043581169060243516604435610a04565b3480156103ae57600080fd5b5061031c600160a060020a0360043516602435610aa9565b3480156103d257600080fd5b5061023a610af6565b3480156103e757600080fd5b506101ed610b2d565b3480156103fc57600080fd5b506101ed600160a060020a0360043581169060243516604435610b81565b34801561042657600080fd5b50610211600435610bb9565b34801561043e57600080fd5b5061031c600435610bd6565b34801561045657600080fd5b506102c7600435610c0b565b34801561046e57600080fd5b5061023a610c35565b34801561048357600080fd5b5061031c600160a060020a0360043516610c6c565b3480156104a457600080fd5b506101ed610c9f565b3480156104b957600080fd5b506104c5600435610d0d565b604051808060200180602001838103835285818151815260200191508051906020019080838360005b838110156105065781810151838201526020016104ee565b50505050905090810190601f1680156105335780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561056657818101518382015260200161054e565b50505050905090810190601f1680156105935780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b3480156105af57600080fd5b506102c7610e4c565b3480156105c457600080fd5b506105cd610e5b565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156106095781810151838201526020016105f1565b505050509050019250505060405180910390f35b34801561062957600080fd5b5061023a610ebb565b34801561063e57600080fd5b506101ed600160a060020a03600435166024351515610f1c565b34801561066457600080fd5b5061023a610fa0565b34801561067957600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101ed94369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610fd79650505050505050565b34801561071057600080fd5b50604080516020601f6064356004818101359283018490048402850184019095528184526101ed94600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506111df9650505050505050565b34801561077f57600080fd5b5061023a60043561121e565b34801561079757600080fd5b50610211600160a060020a03600435811690602435166112d3565b3480156107be57600080fd5b5061031c611301565b3480156107d357600080fd5b506101ed600160a060020a0360043516611307565b600554600160a060020a031633146107ff57600080fd5b61080882610bb9565b151561081357600080fd5b6000828152600f60209081526040909120825161083292840190611972565b505050565b600160e060020a03191660009081526020819052604090205460ff1690565b60098054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108e25780601f106108b7576101008083540402835291602001916108e2565b820191906000526020600020905b8154815290600101906020018083116108c557829003601f168201915b505050505090505b90565b600090815260026020526040902054600160a060020a031690565b600061091382610c0b565b9050600160a060020a03838116908216141561092e57600080fd5b33600160a060020a038216148061094a575061094a81336112d3565b151561095557600080fd5b600082815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600d5490565b600554600160a060020a031633146109db57600080fd5b600655565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081565b80610a0f3382611327565b1515610a1a57600080fd5b600160a060020a0384161515610a2f57600080fd5b600160a060020a0383161515610a4457600080fd5b610a4e8483611386565b610a5884836113f7565b610a628383611530565b8183600160a060020a031685600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b6000610ab483610c6c565b8210610abf57600080fd5b600160a060020a0383166000908152600b60205260409020805483908110610ae357fe5b9060005260206000200154905092915050565b60408051808201909152601081527f68747470733a2f2f71776f796e2e696f00000000000000000000000000000000602082015281565b600554600160a060020a03163314610b4457600080fd5b600554604051600160a060020a0390911690303180156108fc02916000818181858888f19350505050158015610b7e573d6000803e3d6000fd5b50565b80610b8c3382611327565b1515610b9757600080fd5b610bb384848460206040519081016040528060008152506111df565b50505050565b600090815260016020526040902054600160a060020a0316151590565b6000610be06109be565b8210610beb57600080fd5b600d805483908110610bf957fe5b90600052602060002001549050919050565b600081815260016020526040812054600160a060020a0316801515610c2f57600080fd5b92915050565b60408051808201909152600b81527f51776f796e2c204c4c4320000000000000000000000000000000000000000000602082015281565b6000600160a060020a0382161515610c8357600080fd5b50600160a060020a031660009081526003602052604090205490565b600554600160a060020a03163314610cb657600080fd5b600554604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26005805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000818152600760209081526040918290208054835160026001831615610100026000190190921691909104601f81018490048402820184019094528381526060938493919291830182828015610da55780601f10610d7a57610100808354040283529160200191610da5565b820191906000526020600020905b815481529060010190602001808311610d8857829003601f168201915b5050506000868152600860209081526040918290208054835160026001831615610100026000190190921691909104601f81018490048402820184019094528381529597509350909150830182828015610e405780601f10610e1557610100808354040283529160200191610e40565b820191906000526020600020905b815481529060010190602001808311610e2357829003601f168201915b50505050509050915091565b600554600160a060020a031681565b336000908152600b60209081526040918290208054835181840281018401909452808452606093928301828280156108e257602002820191906000526020600020905b815481526020019060010190808311610e9e575050505050905090565b600a8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108e25780601f106108b7576101008083540402835291602001916108e2565b600160a060020a038216331415610f3257600080fd5b336000818152600460209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b60408051808201909152600e81527f44616e69656c20506974746d616e000000000000000000000000000000000000602082015281565b6005546060908190600090600160a060020a03163314610ff657600080fd5b84518593506040101561106a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f44657372697074696f6e20697320746f6f206c6f6e6700000000000000000000604482015290519081900360640190fd5b8351849250620186a010156110e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4465736372697074696f6e20697320746f6f206c6f6e67000000000000000000604482015290519081900360640190fd5b60065434101561115157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f416d6f756e74206f662045746865722073656e7420746f6f20736d616c6c0000604482015290519081900360640190fd5b50600d546001016111623382611579565b6000818152600760209081526040909120865161118192880190611972565b50600081815260086020908152604090912085516111a192870190611972565b5060408051828152905133917f75424253909c2f4460f8a59099700e980f5b484608c4fdd79f600f5162ac88a5919081900360200190a25050505050565b816111ea3382611327565b15156111f557600080fd5b611200858585610a04565b61120c858585856115c8565b151561121757600080fd5b5050505050565b606061122982610bb9565b151561123457600080fd5b6000828152600f602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156112c75780601f1061129c576101008083540402835291602001916112c7565b820191906000526020600020905b8154815290600101906020018083116112aa57829003601f168201915b50505050509050919050565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205460ff1690565b60065490565b600554600160a060020a0316331461131e57600080fd5b610b7e81611735565b60008061133383610c0b565b905080600160a060020a031684600160a060020a0316148061136e575083600160a060020a0316611363846108ed565b600160a060020a0316145b8061137e575061137e81856112d3565b949350505050565b81600160a060020a031661139982610c0b565b600160a060020a0316146113ac57600080fd5b600081815260026020526040902054600160a060020a0316156113f3576000818152600260205260409020805473ffffffffffffffffffffffffffffffffffffffff191690555b5050565b600080600061140685856117ca565b6000848152600c6020908152604080832054600160a060020a0389168452600b9092529091205490935061144190600163ffffffff61186016565b600160a060020a0386166000908152600b602052604090208054919350908390811061146957fe5b9060005260206000200154905080600b600087600160a060020a0316600160a060020a03168152602001908152602001600020848154811015156114a957fe5b6000918252602080832090910192909255600160a060020a0387168152600b909152604081208054849081106114db57fe5b6000918252602080832090910192909255600160a060020a0387168152600b909152604090208054906115129060001983016119f0565b506000938452600c6020526040808520859055908452909220555050565b600061153c8383611872565b50600160a060020a039091166000908152600b6020908152604080832080546001810182559084528284208101859055938352600c909152902055565b6115838282611902565b600d80546000838152600e60205260408120829055600182018355919091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5015550565b6000806115dd85600160a060020a031661195d565b15156115ec576001915061172c565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b8381101561167f578181015183820152602001611667565b50505050905090810190601f1680156116ac5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b1580156116ce57600080fd5b505af11580156116e2573d6000803e3d6000fd5b505050506040513d60208110156116f857600080fd5b5051600160e060020a031981167f150b7a020000000000000000000000000000000000000000000000000000000014925090505b50949350505050565b600554600160a060020a0316331461174c57600080fd5b600160a060020a038116151561176157600080fd5b600554604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b81600160a060020a03166117dd82610c0b565b600160a060020a0316146117f057600080fd5b600160a060020a03821660009081526003602052604090205461181a90600163ffffffff61186016565b600160a060020a03909216600090815260036020908152604080832094909455918152600190915220805473ffffffffffffffffffffffffffffffffffffffff19169055565b60008282111561186c57fe5b50900390565b600081815260016020526040902054600160a060020a03161561189457600080fd5b6000818152600160208181526040808420805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03881690811790915584526003909152909120546118e291611965565b600160a060020a0390921660009081526003602052604090209190915550565b600160a060020a038216151561191757600080fd5b6119218282611530565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000903b1190565b81810182811015610c2f57fe5b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106119b357805160ff19168380011785556119e0565b828001600101855582156119e0579182015b828111156119e05782518255916020019190600101906119c5565b506119ec929150611a10565b5090565b815481835581811115610832576000838152602090206108329181019083015b6108ea91905b808211156119ec5760008155600101611a165600a165627a7a72305820ccd7e5dada4ca1c160d10bb150febeaad0bd231ec6801bf716d4ccead2dc926e002900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000f486173684b696e6773506c616e657400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003484b500000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061018a5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301538868811461018f57806301ffc9a7146101ef57806306fdde0314610225578063081812fc146102af578063095ea7b3146102e357806318160ddd1461030757806318b200711461032e57806319fa8f501461034657806323b872dd146103785780632f745c59146103a257806333a8c45a146103c65780633ccfd60b146103db57806342842e0e146103f05780634f558e791461041a5780634f6ccce7146104325780636352211e1461044a5780636904c94d1461046257806370a0823114610477578063715018a6146104985780637dd7d32d146104ad5780638da5cb5b146105a3578063949e8acd146105b857806395d89b411461061d578063a22cb46514610632578063a6c3e6b914610658578063ad8b9edc1461066d578063b88d4fde14610704578063c87b56dd14610773578063e985e9c51461078b578063eb91d37e146107b2578063f2fde38b146107c7575b600080fd5b34801561019b57600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526101ed9583359536956044949193909101919081908401838280828437509497506107e89650505050505050565b005b3480156101fb57600080fd5b50610211600160e060020a031960043516610837565b604080519115158252519081900360200190f35b34801561023157600080fd5b5061023a610856565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561027457818101518382015260200161025c565b50505050905090810190601f1680156102a15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102bb57600080fd5b506102c76004356108ed565b60408051600160a060020a039092168252519081900360200190f35b3480156102ef57600080fd5b506101ed600160a060020a0360043516602435610908565b34801561031357600080fd5b5061031c6109be565b60408051918252519081900360200190f35b34801561033a57600080fd5b506101ed6004356109c4565b34801561035257600080fd5b5061035b6109e0565b60408051600160e060020a03199092168252519081900360200190f35b34801561038457600080fd5b506101ed600160a060020a0360043581169060243516604435610a04565b3480156103ae57600080fd5b5061031c600160a060020a0360043516602435610aa9565b3480156103d257600080fd5b5061023a610af6565b3480156103e757600080fd5b506101ed610b2d565b3480156103fc57600080fd5b506101ed600160a060020a0360043581169060243516604435610b81565b34801561042657600080fd5b50610211600435610bb9565b34801561043e57600080fd5b5061031c600435610bd6565b34801561045657600080fd5b506102c7600435610c0b565b34801561046e57600080fd5b5061023a610c35565b34801561048357600080fd5b5061031c600160a060020a0360043516610c6c565b3480156104a457600080fd5b506101ed610c9f565b3480156104b957600080fd5b506104c5600435610d0d565b604051808060200180602001838103835285818151815260200191508051906020019080838360005b838110156105065781810151838201526020016104ee565b50505050905090810190601f1680156105335780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561056657818101518382015260200161054e565b50505050905090810190601f1680156105935780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b3480156105af57600080fd5b506102c7610e4c565b3480156105c457600080fd5b506105cd610e5b565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156106095781810151838201526020016105f1565b505050509050019250505060405180910390f35b34801561062957600080fd5b5061023a610ebb565b34801561063e57600080fd5b506101ed600160a060020a03600435166024351515610f1c565b34801561066457600080fd5b5061023a610fa0565b34801561067957600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101ed94369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610fd79650505050505050565b34801561071057600080fd5b50604080516020601f6064356004818101359283018490048402850184019095528184526101ed94600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506111df9650505050505050565b34801561077f57600080fd5b5061023a60043561121e565b34801561079757600080fd5b50610211600160a060020a03600435811690602435166112d3565b3480156107be57600080fd5b5061031c611301565b3480156107d357600080fd5b506101ed600160a060020a0360043516611307565b600554600160a060020a031633146107ff57600080fd5b61080882610bb9565b151561081357600080fd5b6000828152600f60209081526040909120825161083292840190611972565b505050565b600160e060020a03191660009081526020819052604090205460ff1690565b60098054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108e25780601f106108b7576101008083540402835291602001916108e2565b820191906000526020600020905b8154815290600101906020018083116108c557829003601f168201915b505050505090505b90565b600090815260026020526040902054600160a060020a031690565b600061091382610c0b565b9050600160a060020a03838116908216141561092e57600080fd5b33600160a060020a038216148061094a575061094a81336112d3565b151561095557600080fd5b600082815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600d5490565b600554600160a060020a031633146109db57600080fd5b600655565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081565b80610a0f3382611327565b1515610a1a57600080fd5b600160a060020a0384161515610a2f57600080fd5b600160a060020a0383161515610a4457600080fd5b610a4e8483611386565b610a5884836113f7565b610a628383611530565b8183600160a060020a031685600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b6000610ab483610c6c565b8210610abf57600080fd5b600160a060020a0383166000908152600b60205260409020805483908110610ae357fe5b9060005260206000200154905092915050565b60408051808201909152601081527f68747470733a2f2f71776f796e2e696f00000000000000000000000000000000602082015281565b600554600160a060020a03163314610b4457600080fd5b600554604051600160a060020a0390911690303180156108fc02916000818181858888f19350505050158015610b7e573d6000803e3d6000fd5b50565b80610b8c3382611327565b1515610b9757600080fd5b610bb384848460206040519081016040528060008152506111df565b50505050565b600090815260016020526040902054600160a060020a0316151590565b6000610be06109be565b8210610beb57600080fd5b600d805483908110610bf957fe5b90600052602060002001549050919050565b600081815260016020526040812054600160a060020a0316801515610c2f57600080fd5b92915050565b60408051808201909152600b81527f51776f796e2c204c4c4320000000000000000000000000000000000000000000602082015281565b6000600160a060020a0382161515610c8357600080fd5b50600160a060020a031660009081526003602052604090205490565b600554600160a060020a03163314610cb657600080fd5b600554604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26005805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000818152600760209081526040918290208054835160026001831615610100026000190190921691909104601f81018490048402820184019094528381526060938493919291830182828015610da55780601f10610d7a57610100808354040283529160200191610da5565b820191906000526020600020905b815481529060010190602001808311610d8857829003601f168201915b5050506000868152600860209081526040918290208054835160026001831615610100026000190190921691909104601f81018490048402820184019094528381529597509350909150830182828015610e405780601f10610e1557610100808354040283529160200191610e40565b820191906000526020600020905b815481529060010190602001808311610e2357829003601f168201915b50505050509050915091565b600554600160a060020a031681565b336000908152600b60209081526040918290208054835181840281018401909452808452606093928301828280156108e257602002820191906000526020600020905b815481526020019060010190808311610e9e575050505050905090565b600a8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108e25780601f106108b7576101008083540402835291602001916108e2565b600160a060020a038216331415610f3257600080fd5b336000818152600460209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b60408051808201909152600e81527f44616e69656c20506974746d616e000000000000000000000000000000000000602082015281565b6005546060908190600090600160a060020a03163314610ff657600080fd5b84518593506040101561106a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f44657372697074696f6e20697320746f6f206c6f6e6700000000000000000000604482015290519081900360640190fd5b8351849250620186a010156110e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4465736372697074696f6e20697320746f6f206c6f6e67000000000000000000604482015290519081900360640190fd5b60065434101561115157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f416d6f756e74206f662045746865722073656e7420746f6f20736d616c6c0000604482015290519081900360640190fd5b50600d546001016111623382611579565b6000818152600760209081526040909120865161118192880190611972565b50600081815260086020908152604090912085516111a192870190611972565b5060408051828152905133917f75424253909c2f4460f8a59099700e980f5b484608c4fdd79f600f5162ac88a5919081900360200190a25050505050565b816111ea3382611327565b15156111f557600080fd5b611200858585610a04565b61120c858585856115c8565b151561121757600080fd5b5050505050565b606061122982610bb9565b151561123457600080fd5b6000828152600f602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156112c75780601f1061129c576101008083540402835291602001916112c7565b820191906000526020600020905b8154815290600101906020018083116112aa57829003601f168201915b50505050509050919050565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205460ff1690565b60065490565b600554600160a060020a0316331461131e57600080fd5b610b7e81611735565b60008061133383610c0b565b905080600160a060020a031684600160a060020a0316148061136e575083600160a060020a0316611363846108ed565b600160a060020a0316145b8061137e575061137e81856112d3565b949350505050565b81600160a060020a031661139982610c0b565b600160a060020a0316146113ac57600080fd5b600081815260026020526040902054600160a060020a0316156113f3576000818152600260205260409020805473ffffffffffffffffffffffffffffffffffffffff191690555b5050565b600080600061140685856117ca565b6000848152600c6020908152604080832054600160a060020a0389168452600b9092529091205490935061144190600163ffffffff61186016565b600160a060020a0386166000908152600b602052604090208054919350908390811061146957fe5b9060005260206000200154905080600b600087600160a060020a0316600160a060020a03168152602001908152602001600020848154811015156114a957fe5b6000918252602080832090910192909255600160a060020a0387168152600b909152604081208054849081106114db57fe5b6000918252602080832090910192909255600160a060020a0387168152600b909152604090208054906115129060001983016119f0565b506000938452600c6020526040808520859055908452909220555050565b600061153c8383611872565b50600160a060020a039091166000908152600b6020908152604080832080546001810182559084528284208101859055938352600c909152902055565b6115838282611902565b600d80546000838152600e60205260408120829055600182018355919091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5015550565b6000806115dd85600160a060020a031661195d565b15156115ec576001915061172c565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b8381101561167f578181015183820152602001611667565b50505050905090810190601f1680156116ac5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b1580156116ce57600080fd5b505af11580156116e2573d6000803e3d6000fd5b505050506040513d60208110156116f857600080fd5b5051600160e060020a031981167f150b7a020000000000000000000000000000000000000000000000000000000014925090505b50949350505050565b600554600160a060020a0316331461174c57600080fd5b600160a060020a038116151561176157600080fd5b600554604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b81600160a060020a03166117dd82610c0b565b600160a060020a0316146117f057600080fd5b600160a060020a03821660009081526003602052604090205461181a90600163ffffffff61186016565b600160a060020a03909216600090815260036020908152604080832094909455918152600190915220805473ffffffffffffffffffffffffffffffffffffffff19169055565b60008282111561186c57fe5b50900390565b600081815260016020526040902054600160a060020a03161561189457600080fd5b6000818152600160208181526040808420805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03881690811790915584526003909152909120546118e291611965565b600160a060020a0390921660009081526003602052604090209190915550565b600160a060020a038216151561191757600080fd5b6119218282611530565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000903b1190565b81810182811015610c2f57fe5b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106119b357805160ff19168380011785556119e0565b828001600101855582156119e0579182015b828111156119e05782518255916020019190600101906119c5565b506119ec929150611a10565b5090565b815481835581811115610832576000838152602090206108329181019083015b6108ea91905b808211156119ec5760008155600101611a165600a165627a7a72305820ccd7e5dada4ca1c160d10bb150febeaad0bd231ec6801bf716d4ccead2dc926e0029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000f486173684b696e6773506c616e657400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003484b500000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): HashKingsPlanet
Arg [1] : _symbol (string): HKP
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [3] : 486173684b696e6773506c616e65740000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [5] : 484b500000000000000000000000000000000000000000000000000000000000
Swarm Source
bzzr://ccd7e5dada4ca1c160d10bb150febeaad0bd231ec6801bf716d4ccead2dc926e
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.