More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 30,256 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 21230217 | 3 days ago | IN | 0 ETH | 0.00107257 | ||||
Set Approval For... | 21228506 | 3 days ago | IN | 0 ETH | 0.00043195 | ||||
Set Approval For... | 21193721 | 8 days ago | IN | 0 ETH | 0.00074 | ||||
Set Approval For... | 21193717 | 8 days ago | IN | 0 ETH | 0.00126196 | ||||
Set Approval For... | 21070106 | 25 days ago | IN | 0 ETH | 0.00018114 | ||||
Set Approval For... | 21031735 | 30 days ago | IN | 0 ETH | 0.00014654 | ||||
Set Approval For... | 21031735 | 30 days ago | IN | 0 ETH | 0.00024441 | ||||
Set Approval For... | 21019311 | 32 days ago | IN | 0 ETH | 0.00016786 | ||||
Set Approval For... | 21013523 | 33 days ago | IN | 0 ETH | 0.00031629 | ||||
Set Approval For... | 20956305 | 41 days ago | IN | 0 ETH | 0.0004639 | ||||
Set Approval For... | 20888307 | 50 days ago | IN | 0 ETH | 0.00020209 | ||||
Set Approval For... | 20746094 | 70 days ago | IN | 0 ETH | 0.00009395 | ||||
Set Approval For... | 20644630 | 84 days ago | IN | 0 ETH | 0.0000581 | ||||
Set Approval For... | 20632675 | 86 days ago | IN | 0 ETH | 0.00010103 | ||||
Set Supply Limit | 20583286 | 93 days ago | IN | 0 ETH | 0.00018308 | ||||
Set Approval For... | 20574380 | 94 days ago | IN | 0 ETH | 0.0000274 | ||||
Set Approval For... | 20574379 | 94 days ago | IN | 0 ETH | 0.00002776 | ||||
Set Approval For... | 20574378 | 94 days ago | IN | 0 ETH | 0.00002977 | ||||
Set Approval For... | 20574377 | 94 days ago | IN | 0 ETH | 0.00002969 | ||||
Set Approval For... | 20574376 | 94 days ago | IN | 0 ETH | 0.00002684 | ||||
Set Approval For... | 20567717 | 95 days ago | IN | 0 ETH | 0.00003541 | ||||
Set Approval For... | 20560957 | 96 days ago | IN | 0 ETH | 0.00005244 | ||||
Set Approval For... | 20552019 | 97 days ago | IN | 0 ETH | 0.00004228 | ||||
Set Approval For... | 20488105 | 106 days ago | IN | 0 ETH | 0.00010351 | ||||
Set Approval For... | 20395563 | 119 days ago | IN | 0 ETH | 0.00161987 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
HeroAsset
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-09-20 */ pragma solidity 0.4.24; // File: contracts/lib/openzeppelin-solidity/contracts/access/Roles.sol /** * @title Roles * @dev Library for managing addresses assigned to a Role. */ library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); role.bearer[account] = true; } /** * @dev remove an account's access to this role */ function remove(Role storage role, address account) internal { require(account != address(0)); role.bearer[account] = false; } /** * @dev check if an account has this role * @return bool */ function has(Role storage role, address account) internal view returns (bool) { require(account != address(0)); return role.bearer[account]; } } // File: contracts/lib/openzeppelin-solidity/contracts/access/roles/MinterRole.sol contract MinterRole { using Roles for Roles.Role; event MinterAdded(address indexed account); event MinterRemoved(address indexed account); Roles.Role private minters; constructor() public { minters.add(msg.sender); } modifier onlyMinter() { require(isMinter(msg.sender)); _; } function isMinter(address account) public view returns (bool) { return minters.has(account); } function addMinter(address account) public onlyMinter { minters.add(account); emit MinterAdded(account); } function renounceMinter() public { minters.remove(msg.sender); } function _removeMinter(address account) internal { minters.remove(account); emit MinterRemoved(account); } } // File: contracts/lib/openzeppelin-solidity/contracts/introspection/IERC165.sol /** * @title IERC165 * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md */ interface IERC165 { /** * @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); } // File: contracts/lib/openzeppelin-solidity/contracts/introspection/ERC165.sol /** * @title ERC165 * @author Matt Condon (@shrugs) * @dev Implements ERC165 using a lookup table. */ contract ERC165 is IERC165 { bytes4 private 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; } } // File: contracts/lib/openzeppelin-solidity/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring '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; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts 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 c; } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } // File: contracts/lib/openzeppelin-solidity/contracts/utils/Address.sol /** * Utility library of inline functions on addresses */ library Address { /** * 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 account address of the account to check * @return whether the target address is a contract */ function isContract(address account) 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(account) } return size > 0; } } // File: contracts/lib/openzeppelin-solidity/contracts/token/ERC721/IERC721.sol /** * @title ERC721 Non-Fungible Token Standard basic interface * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract IERC721 is IERC165 { 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 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: contracts/lib/openzeppelin-solidity/contracts/token/ERC721/IERC721Receiver.sol /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ contract IERC721Receiver { /** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a `safeTransfer`. This function MUST return the function selector, * otherwise the caller will revert the transaction. The selector to be * returned can be obtained as `this.onERC721Received.selector`. This * function MAY throw to revert and reject the transfer. * Note: the ERC721 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 transferred * @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); } // File: contracts/lib/openzeppelin-solidity/contracts/token/ERC721/ERC721.sol /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; // Mapping from token ID to owner mapping (uint256 => address) private _tokenOwner; // Mapping from token ID to approved address mapping (uint256 => address) private _tokenApprovals; // Mapping from owner to number of owned token mapping (address => uint256) private _ownedTokensCount; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) private _operatorApprovals; 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)')) */ constructor() public { // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(_InterfaceId_ERC721); } /** * @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 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 * Reverts if the token ID does not exist. * @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) { require(_exists(tokenId)); 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 { require(_isApprovedOrOwner(msg.sender, tokenId)); 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 { // 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 { transferFrom(from, to, tokenId); // solium-disable-next-line arg-overflow require(_checkAndCallSafeTransfer(from, to, tokenId, _data)); } /** * @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) internal view returns (bool) { address owner = _tokenOwner[tokenId]; return owner != address(0); } /** * @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 burn a specific token * 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 * 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 = IERC721Receiver(to).onERC721Received( msg.sender, from, tokenId, _data); return (retval == _ERC721_RECEIVED); } } // File: contracts/lib/openzeppelin-solidity/contracts/token/ERC721/IERC721Enumerable.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 IERC721Enumerable is IERC721 { 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); } // File: contracts/lib/openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol contract ERC721Enumerable is ERC165, ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => uint256[]) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; bytes4 private constant _InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('tokenByIndex(uint256)')) */ /** * @dev Constructor function */ constructor() public { // register the supported interface to conform to ERC721 via ERC165 _registerInterface(_InterfaceId_ERC721Enumerable); } /** * @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 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); // To prevent a gap in the array, we store the last token in the index of the token to delete, and // then delete the last slot. uint256 tokenIndex = _ownedTokensIndex[tokenId]; uint256 lastTokenIndex = _ownedTokens[from].length.sub(1); uint256 lastToken = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastToken; // This also deletes the contents at the last position of the array _ownedTokens[from].length--; // 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 _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); } /** * @dev Internal function to burn a specific token * 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); // 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/lib/openzeppelin-solidity/contracts/token/ERC721/IERC721Metadata.sol /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract IERC721Metadata is IERC721 { function name() external view returns (string); function symbol() external view returns (string); function tokenURI(uint256 tokenId) public view returns (string); } // File: contracts/lib/openzeppelin-solidity/contracts/token/ERC721/ERC721Metadata.sol contract ERC721Metadata is ERC165, ERC721, IERC721Metadata { // Token name string internal _name; // Token symbol string internal _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f; /** * 0x5b5e139f === * bytes4(keccak256('name()')) ^ * bytes4(keccak256('symbol()')) ^ * bytes4(keccak256('tokenURI(uint256)')) */ /** * @dev Constructor function */ constructor(string name, string symbol) public { _name = name; _symbol = symbol; // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(InterfaceId_ERC721Metadata); } /** * @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 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) internal { require(_exists(tokenId)); _tokenURIs[tokenId] = uri; } /** * @dev Internal function to burn a specific token * 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]; } } } // File: contracts/lib/openzeppelin-solidity/contracts/token/ERC721/ERC721Full.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 ERC721Full is ERC721, ERC721Enumerable, ERC721Metadata { constructor(string name, string symbol) ERC721Metadata(name, symbol) public { } } // File: contracts/lib/openzeppelin-solidity/contracts/token/ERC721/ERC721Mintable.sol /** * @title ERC721Mintable * @dev ERC721 minting logic */ contract ERC721Mintable is ERC721Full, MinterRole { event MintingFinished(); bool private _mintingFinished = false; modifier onlyBeforeMintingFinished() { require(!_mintingFinished); _; } /** * @return true if the minting is finished. */ function mintingFinished() public view returns(bool) { return _mintingFinished; } /** * @dev Function to mint tokens * @param to The address that will receive the minted tokens. * @param tokenId The token id to mint. * @return A boolean that indicates if the operation was successful. */ function mint( address to, uint256 tokenId ) public onlyMinter onlyBeforeMintingFinished returns (bool) { _mint(to, tokenId); return true; } function mintWithTokenURI( address to, uint256 tokenId, string tokenURI ) public onlyMinter onlyBeforeMintingFinished returns (bool) { mint(to, tokenId); _setTokenURI(tokenId, tokenURI); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() public onlyMinter onlyBeforeMintingFinished returns (bool) { _mintingFinished = true; emit MintingFinished(); return true; } } // File: contracts/lib/openzeppelin-solidity/contracts/access/roles/PauserRole.sol contract PauserRole { using Roles for Roles.Role; event PauserAdded(address indexed account); event PauserRemoved(address indexed account); Roles.Role private pausers; constructor() public { pausers.add(msg.sender); } modifier onlyPauser() { require(isPauser(msg.sender)); _; } function isPauser(address account) public view returns (bool) { return pausers.has(account); } function addPauser(address account) public onlyPauser { pausers.add(account); emit PauserAdded(account); } function renouncePauser() public { pausers.remove(msg.sender); } function _removePauser(address account) internal { pausers.remove(account); emit PauserRemoved(account); } } // File: contracts/lib/openzeppelin-solidity/contracts/lifecycle/Pausable.sol /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is PauserRole { event Paused(); event Unpaused(); bool private _paused = false; /** * @return true if the contract is paused, false otherwise. */ function paused() public view returns(bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!_paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(_paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyPauser whenNotPaused { _paused = true; emit Paused(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyPauser whenPaused { _paused = false; emit Unpaused(); } } // File: contracts/lib/openzeppelin-solidity/contracts/token/ERC721/ERC721Pausable.sol /** * @title ERC721 Non-Fungible Pausable token * @dev ERC721 modified with pausable transfers. **/ contract ERC721Pausable is ERC721, Pausable { function approve( address to, uint256 tokenId ) public whenNotPaused { super.approve(to, tokenId); } function setApprovalForAll( address to, bool approved ) public whenNotPaused { super.setApprovalForAll(to, approved); } function transferFrom( address from, address to, uint256 tokenId ) public whenNotPaused { super.transferFrom(from, to, tokenId); } } // File: contracts/HeroAsset.sol contract HeroAsset is ERC721Mintable, ERC721Pausable { uint16 public constant HERO_TYPE_OFFSET = 10000; string public tokenURIPrefix = "https://www.mycryptoheroes.net/metadata/hero/"; mapping(uint16 => uint16) private heroTypeToSupplyLimit; constructor() public ERC721Full("MyCryptoHeroes:Hero", "MCHH") {} function setSupplyLimit(uint16 _heroType, uint16 _supplyLimit) external onlyMinter { require(heroTypeToSupplyLimit[_heroType] == 0 || _supplyLimit < heroTypeToSupplyLimit[_heroType], "_supplyLimit is bigger"); heroTypeToSupplyLimit[_heroType] = _supplyLimit; } function setTokenURIPrefix(string _tokenURIPrefix) external onlyMinter { tokenURIPrefix = _tokenURIPrefix; } function getSupplyLimit(uint16 _heroType) public view returns (uint16) { return heroTypeToSupplyLimit[_heroType]; } function mintHeroAsset(address _owner, uint256 _tokenId) public onlyMinter { uint16 _heroType = uint16(_tokenId / HERO_TYPE_OFFSET); uint16 _heroTypeIndex = uint16(_tokenId % HERO_TYPE_OFFSET) - 1; require(_heroTypeIndex < heroTypeToSupplyLimit[_heroType], "supply over"); _mint(_owner, _tokenId); } function tokenURI(uint256 tokenId) public view returns (string) { bytes32 tokenIdBytes; if (tokenId == 0) { tokenIdBytes = "0"; } else { uint256 value = tokenId; while (value > 0) { tokenIdBytes = bytes32(uint256(tokenIdBytes) / (2 ** 8)); tokenIdBytes |= bytes32(((value % 10) + 48) * 2 ** (8 * 31)); value /= 10; } } bytes memory prefixBytes = bytes(tokenURIPrefix); bytes memory tokenURIBytes = new bytes(prefixBytes.length + tokenIdBytes.length); uint8 i; uint8 index = 0; for (i = 0; i < prefixBytes.length; i++) { tokenURIBytes[index] = prefixBytes[i]; index++; } for (i = 0; i < tokenIdBytes.length; i++) { tokenURIBytes[index] = tokenIdBytes[i]; index++; } return string(tokenURIBytes); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"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":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":"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":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"tokenId","type":"uint256"}],"name":"mint","outputs":[{"name":"","type":"bool"}],"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":"account","type":"address"}],"name":"isPauser","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"HERO_TYPE_OFFSET","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"mintHeroAsset","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"tokenId","type":"uint256"},{"name":"tokenURI","type":"string"}],"name":"mintWithTokenURI","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"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":false,"inputs":[],"name":"renouncePauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_heroType","type":"uint16"},{"name":"_supplyLimit","type":"uint16"}],"name":"setSupplyLimit","outputs":[],"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":false,"inputs":[{"name":"account","type":"address"}],"name":"addPauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_heroType","type":"uint16"}],"name":"getSupplyLimit","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addMinter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceMinter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenURIPrefix","type":"string"}],"name":"setTokenURIPrefix","outputs":[],"payable":false,"stateMutability":"nonpayable","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":"account","type":"address"}],"name":"isMinter","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","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":"tokenURIPrefix","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","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"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserRemoved","type":"event"},{"anonymous":false,"inputs":[],"name":"MintingFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"MinterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"MinterRemoved","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
600d805460ff19908116909155600f8054909116905560e0604052602d60808190527f68747470733a2f2f7777772e6d7963727970746f6865726f65732e6e65742f6d60a09081527f657461646174612f6865726f2f0000000000000000000000000000000000000060c0526200007a9160109190620002db565b503480156200008857600080fd5b50604080518082018252601381527f4d7943727970746f4865726f65733a4865726f000000000000000000000000006020808301919091528251808401909352600483527f4d4348480000000000000000000000000000000000000000000000000000000090830152908181620001287f01ffc9a70000000000000000000000000000000000000000000000000000000064010000000062000233810204565b6200015c7f80ac58cd0000000000000000000000000000000000000000000000000000000064010000000062000233810204565b620001907f780e9d630000000000000000000000000000000000000000000000000000000064010000000062000233810204565b8151620001a5906009906020850190620002db565b508051620001bb90600a906020840190620002db565b50620001f07f5b5e139f0000000000000000000000000000000000000000000000000000000064010000000062000233810204565b50620002129250600c9150339050640100000000620013da620002a082021704565b6200022d600e33640100000000620013da620002a082021704565b62000380565b7fffffffff0000000000000000000000000000000000000000000000000000000080821614156200026357600080fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152602081905260409020805460ff19166001179055565b600160a060020a0381161515620002b657600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200031e57805160ff19168380011785556200034e565b828001600101855582156200034e579182015b828111156200034e57825182559160200191906001019062000331565b506200035c92915062000360565b5090565b6200037d91905b808211156200035c576000815560010162000367565b90565b611b4380620003906000396000f3006080604052600436106101b65763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146101bb57806305d2035b1461020657806306fdde031461021b578063081812fc146102a5578063095ea7b3146102d957806318160ddd146102ff57806323b872dd146103265780632f745c59146103505780633f4ba83a1461037457806340c10f191461038957806342842e0e146103ad57806346fbf68e146103d75780634890087f146103f85780634d5b335d146104245780634f6ccce71461044857806350bb4e7f146104605780635c975abb146104c95780636352211e146104de5780636ef8d66d146104f65780636fa23f731461050b57806370a082311461052d5780637d64bcb41461054e57806382dc1ec4146105635780638450b12e146105845780638456cb59146105a057806395d89b41146105b5578063983b2d56146105ca57806398650275146105eb57806399e0dd7c14610600578063a22cb46514610620578063aa271e1a14610646578063b88d4fde14610667578063c0ac9983146106d6578063c87b56dd146106eb578063e985e9c514610703575b600080fd5b3480156101c757600080fd5b506101f27bffffffffffffffffffffffffffffffffffffffffffffffffffffffff196004351661072a565b604080519115158252519081900360200190f35b34801561021257600080fd5b506101f261075e565b34801561022757600080fd5b50610230610768565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561026a578181015183820152602001610252565b50505050905090810190601f1680156102975780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102b157600080fd5b506102bd6004356107fe565b60408051600160a060020a039092168252519081900360200190f35b3480156102e557600080fd5b506102fd600160a060020a0360043516602435610830565b005b34801561030b57600080fd5b5061031461084e565b60408051918252519081900360200190f35b34801561033257600080fd5b506102fd600160a060020a0360043581169060243516604435610854565b34801561035c57600080fd5b50610314600160a060020a0360043516602435610874565b34801561038057600080fd5b506102fd6108c1565b34801561039557600080fd5b506101f2600160a060020a036004351660243561091b565b3480156103b957600080fd5b506102fd600160a060020a0360043581169060243516604435610954565b3480156103e357600080fd5b506101f2600160a060020a0360043516610970565b34801561040457600080fd5b5061040d610989565b6040805161ffff9092168252519081900360200190f35b34801561043057600080fd5b506102fd600160a060020a036004351660243561098f565b34801561045457600080fd5b50610314600435610a53565b34801561046c57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101f2948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610a889650505050505050565b3480156104d557600080fd5b506101f2610acd565b3480156104ea57600080fd5b506102bd600435610ad6565b34801561050257600080fd5b506102fd610afa565b34801561051757600080fd5b506102fd61ffff60043581169060243516610b0d565b34801561053957600080fd5b50610314600160a060020a0360043516610beb565b34801561055a57600080fd5b506101f2610c1e565b34801561056f57600080fd5b506102fd600160a060020a0360043516610c80565b34801561059057600080fd5b5061040d61ffff60043516610cdc565b3480156105ac57600080fd5b506102fd610cf5565b3480156105c157600080fd5b50610230610d51565b3480156105d657600080fd5b506102fd600160a060020a0360043516610db2565b3480156105f757600080fd5b506102fd610e0e565b34801561060c57600080fd5b506102fd6004803560248101910135610e1f565b34801561062c57600080fd5b506102fd600160a060020a03600435166024351515610e3f565b34801561065257600080fd5b506101f2600160a060020a0360043516610e59565b34801561067357600080fd5b50604080516020601f6064356004818101359283018490048402850184019095528184526102fd94600160a060020a038135811695602480359092169560443595369560849401918190840183828082843750949750610e6c9650505050505050565b3480156106e257600080fd5b50610230610e8e565b3480156106f757600080fd5b50610230600435610f1c565b34801561070f57600080fd5b506101f2600160a060020a036004358116906024351661115b565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660009081526020819052604090205460ff1690565b600d5460ff165b90565b60098054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107f45780601f106107c9576101008083540402835291602001916107f4565b820191906000526020600020905b8154815290600101906020018083116107d757829003601f168201915b5050505050905090565b600061080982611189565b151561081457600080fd5b50600090815260026020526040902054600160a060020a031690565b600f5460ff161561084057600080fd5b61084a82826111a6565b5050565b60075490565b600f5460ff161561086457600080fd5b61086f83838361125c565b505050565b600061087f83610beb565b821061088a57600080fd5b600160a060020a03831660009081526005602052604090208054839081106108ae57fe5b9060005260206000200154905092915050565b6108ca33610970565b15156108d557600080fd5b600f5460ff1615156108e657600080fd5b600f805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b600061092633610e59565b151561093157600080fd5b600d5460ff161561094157600080fd5b61094b83836112ea565b50600192915050565b61086f8383836020604051908101604052806000815250610e6c565b6000610983600e8363ffffffff61133916565b92915050565b61271081565b60008061099b33610e59565b15156109a657600080fd5b6127108304915060016127108461ffff80861660009081526011602052604090205492909106929092039250811690821610610a4357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737570706c79206f766572000000000000000000000000000000000000000000604482015290519081900360640190fd5b610a4d84846112ea565b50505050565b6000610a5d61084e565b8210610a6857600080fd5b6007805483908110610a7657fe5b90600052602060002001549050919050565b6000610a9333610e59565b1515610a9e57600080fd5b600d5460ff1615610aae57600080fd5b610ab8848461091b565b50610ac38383611370565b5060019392505050565b600f5460ff1690565b600081815260016020526040812054600160a060020a031680151561098357600080fd5b610b0b600e3363ffffffff6113a316565b565b610b1633610e59565b1515610b2157600080fd5b61ffff808316600090815260116020526040902054161580610b5a575061ffff8083166000908152601160205260409020548116908216105b1515610bc757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f5f737570706c794c696d69742069732062696767657200000000000000000000604482015290519081900360640190fd5b61ffff9182166000908152601160205260409020805461ffff191691909216179055565b6000600160a060020a0382161515610c0257600080fd5b50600160a060020a031660009081526003602052604090205490565b6000610c2933610e59565b1515610c3457600080fd5b600d5460ff1615610c4457600080fd5b600d805460ff191660011790556040517fb828d9b5c78095deeeeff2eca2e5d4fe046ce3feb4c99702624a3fd384ad2dbc90600090a150600190565b610c8933610970565b1515610c9457600080fd5b610ca5600e8263ffffffff6113da16565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b61ffff9081166000908152601160205260409020541690565b610cfe33610970565b1515610d0957600080fd5b600f5460ff1615610d1957600080fd5b600f805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b600a8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107f45780601f106107c9576101008083540402835291602001916107f4565b610dbb33610e59565b1515610dc657600080fd5b610dd7600c8263ffffffff6113da16565b604051600160a060020a038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b610b0b600c3363ffffffff6113a316565b610e2833610e59565b1515610e3357600080fd5b61086f601083836119f1565b600f5460ff1615610e4f57600080fd5b61084a8282611414565b6000610983600c8363ffffffff61133916565b610e77848484610854565b610e8384848484611498565b1515610a4d57600080fd5b6010805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610f145780601f10610ee957610100808354040283529160200191610f14565b820191906000526020600020905b815481529060010190602001808311610ef757829003601f168201915b505050505081565b606060008082808280871515610f54577f30000000000000000000000000000000000000000000000000000000000000009550610f90565b8794505b6000851115610f905761010086049550600a850660300160f860020a0260010286179550600a85811515610f8857fe5b049450610f58565b6010805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156110165780601f10610feb57610100808354040283529160200191611016565b820191906000526020600020905b815481529060010190602001808311610ff957829003601f168201915b50505050509350602060ff168451016040519080825280601f01601f191660200182016040528015611052578160200160208202803883390190505b50925060009050600091505b83518260ff1610156110db57838260ff1681518110151561107b57fe5b90602001015160f860020a900460f860020a02838260ff1681518110151561109f57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506001918201910161105e565b600091505b602060ff8316101561114f578560ff8316602081106110fb57fe5b1a60f860020a02838260ff1681518110151561111357fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600191820191016110e0565b50909695505050505050565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205460ff1690565b600090815260016020526040902054600160a060020a0316151590565b60006111b182610ad6565b9050600160a060020a0383811690821614156111cc57600080fd5b33600160a060020a03821614806111e857506111e8813361115b565b15156111f357600080fd5b600082815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b611266338261161a565b151561127157600080fd5b600160a060020a038216151561128657600080fd5b6112908382611679565b61129a83826116e8565b6112a482826117ef565b8082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6112f48282611838565b600780546000838152600860205260408120829055600182018355919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688015550565b6000600160a060020a038216151561135057600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61137982611189565b151561138457600080fd5b6000828152600b60209081526040909120825161086f92840190611a6f565b600160a060020a03811615156113b857600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a03811615156113ef57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a03821633141561142a57600080fd5b336000818152600460209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b6000806114ad85600160a060020a0316611893565b15156114bc5760019150611611565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b8381101561154f578181015183820152602001611537565b50505050905090810190601f16801561157c5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561159e57600080fd5b505af11580156115b2573d6000803e3d6000fd5b505050506040513d60208110156115c857600080fd5b50517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1981167f150b7a020000000000000000000000000000000000000000000000000000000014925090505b50949350505050565b60008061162683610ad6565b905080600160a060020a031684600160a060020a03161480611661575083600160a060020a0316611656846107fe565b600160a060020a0316145b806116715750611671818561115b565b949350505050565b81600160a060020a031661168c82610ad6565b600160a060020a03161461169f57600080fd5b600081815260026020526040902054600160a060020a03161561084a576000908152600260205260409020805473ffffffffffffffffffffffffffffffffffffffff1916905550565b60008060006116f7858561189b565b600084815260066020908152604080832054600160a060020a038916845260059092529091205490935061173290600163ffffffff61193116565b600160a060020a03861660009081526005602052604090208054919350908390811061175a57fe5b90600052602060002001549050806005600087600160a060020a0316600160a060020a031681526020019081526020016000208481548110151561179a57fe5b6000918252602080832090910192909255600160a060020a03871681526005909152604090208054906117d1906000198301611add565b50600093845260066020526040808520859055908452909220555050565b60006117fb8383611948565b50600160a060020a039091166000908152600560209081526040808320805460018101825590845282842081018590559383526006909152902055565b600160a060020a038216151561184d57600080fd5b61185782826117ef565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000903b1190565b81600160a060020a03166118ae82610ad6565b600160a060020a0316146118c157600080fd5b600160a060020a0382166000908152600360205260409020546118eb90600163ffffffff61193116565b600160a060020a03909216600090815260036020908152604080832094909455918152600190915220805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000808383111561194157600080fd5b5050900390565b600081815260016020526040902054600160a060020a03161561196a57600080fd5b6000818152600160208181526040808420805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03881690811790915584526003909152909120546119b8916119d8565b600160a060020a0390921660009081526003602052604090209190915550565b6000828201838110156119ea57600080fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611a325782800160ff19823516178555611a5f565b82800160010185558215611a5f579182015b82811115611a5f578235825591602001919060010190611a44565b50611a6b929150611afd565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611ab057805160ff1916838001178555611a5f565b82800160010185558215611a5f579182015b82811115611a5f578251825591602001919060010190611ac2565b81548183558181111561086f5760008381526020902061086f9181019083015b61076591905b80821115611a6b5760008155600101611b035600a165627a7a7230582083a458af1fe186f99e02f7ea9f647e58cbef39133bc5ad644300173229de7b5a0029
Deployed Bytecode
0x6080604052600436106101b65763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146101bb57806305d2035b1461020657806306fdde031461021b578063081812fc146102a5578063095ea7b3146102d957806318160ddd146102ff57806323b872dd146103265780632f745c59146103505780633f4ba83a1461037457806340c10f191461038957806342842e0e146103ad57806346fbf68e146103d75780634890087f146103f85780634d5b335d146104245780634f6ccce71461044857806350bb4e7f146104605780635c975abb146104c95780636352211e146104de5780636ef8d66d146104f65780636fa23f731461050b57806370a082311461052d5780637d64bcb41461054e57806382dc1ec4146105635780638450b12e146105845780638456cb59146105a057806395d89b41146105b5578063983b2d56146105ca57806398650275146105eb57806399e0dd7c14610600578063a22cb46514610620578063aa271e1a14610646578063b88d4fde14610667578063c0ac9983146106d6578063c87b56dd146106eb578063e985e9c514610703575b600080fd5b3480156101c757600080fd5b506101f27bffffffffffffffffffffffffffffffffffffffffffffffffffffffff196004351661072a565b604080519115158252519081900360200190f35b34801561021257600080fd5b506101f261075e565b34801561022757600080fd5b50610230610768565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561026a578181015183820152602001610252565b50505050905090810190601f1680156102975780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102b157600080fd5b506102bd6004356107fe565b60408051600160a060020a039092168252519081900360200190f35b3480156102e557600080fd5b506102fd600160a060020a0360043516602435610830565b005b34801561030b57600080fd5b5061031461084e565b60408051918252519081900360200190f35b34801561033257600080fd5b506102fd600160a060020a0360043581169060243516604435610854565b34801561035c57600080fd5b50610314600160a060020a0360043516602435610874565b34801561038057600080fd5b506102fd6108c1565b34801561039557600080fd5b506101f2600160a060020a036004351660243561091b565b3480156103b957600080fd5b506102fd600160a060020a0360043581169060243516604435610954565b3480156103e357600080fd5b506101f2600160a060020a0360043516610970565b34801561040457600080fd5b5061040d610989565b6040805161ffff9092168252519081900360200190f35b34801561043057600080fd5b506102fd600160a060020a036004351660243561098f565b34801561045457600080fd5b50610314600435610a53565b34801561046c57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101f2948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610a889650505050505050565b3480156104d557600080fd5b506101f2610acd565b3480156104ea57600080fd5b506102bd600435610ad6565b34801561050257600080fd5b506102fd610afa565b34801561051757600080fd5b506102fd61ffff60043581169060243516610b0d565b34801561053957600080fd5b50610314600160a060020a0360043516610beb565b34801561055a57600080fd5b506101f2610c1e565b34801561056f57600080fd5b506102fd600160a060020a0360043516610c80565b34801561059057600080fd5b5061040d61ffff60043516610cdc565b3480156105ac57600080fd5b506102fd610cf5565b3480156105c157600080fd5b50610230610d51565b3480156105d657600080fd5b506102fd600160a060020a0360043516610db2565b3480156105f757600080fd5b506102fd610e0e565b34801561060c57600080fd5b506102fd6004803560248101910135610e1f565b34801561062c57600080fd5b506102fd600160a060020a03600435166024351515610e3f565b34801561065257600080fd5b506101f2600160a060020a0360043516610e59565b34801561067357600080fd5b50604080516020601f6064356004818101359283018490048402850184019095528184526102fd94600160a060020a038135811695602480359092169560443595369560849401918190840183828082843750949750610e6c9650505050505050565b3480156106e257600080fd5b50610230610e8e565b3480156106f757600080fd5b50610230600435610f1c565b34801561070f57600080fd5b506101f2600160a060020a036004358116906024351661115b565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660009081526020819052604090205460ff1690565b600d5460ff165b90565b60098054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107f45780601f106107c9576101008083540402835291602001916107f4565b820191906000526020600020905b8154815290600101906020018083116107d757829003601f168201915b5050505050905090565b600061080982611189565b151561081457600080fd5b50600090815260026020526040902054600160a060020a031690565b600f5460ff161561084057600080fd5b61084a82826111a6565b5050565b60075490565b600f5460ff161561086457600080fd5b61086f83838361125c565b505050565b600061087f83610beb565b821061088a57600080fd5b600160a060020a03831660009081526005602052604090208054839081106108ae57fe5b9060005260206000200154905092915050565b6108ca33610970565b15156108d557600080fd5b600f5460ff1615156108e657600080fd5b600f805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b600061092633610e59565b151561093157600080fd5b600d5460ff161561094157600080fd5b61094b83836112ea565b50600192915050565b61086f8383836020604051908101604052806000815250610e6c565b6000610983600e8363ffffffff61133916565b92915050565b61271081565b60008061099b33610e59565b15156109a657600080fd5b6127108304915060016127108461ffff80861660009081526011602052604090205492909106929092039250811690821610610a4357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f737570706c79206f766572000000000000000000000000000000000000000000604482015290519081900360640190fd5b610a4d84846112ea565b50505050565b6000610a5d61084e565b8210610a6857600080fd5b6007805483908110610a7657fe5b90600052602060002001549050919050565b6000610a9333610e59565b1515610a9e57600080fd5b600d5460ff1615610aae57600080fd5b610ab8848461091b565b50610ac38383611370565b5060019392505050565b600f5460ff1690565b600081815260016020526040812054600160a060020a031680151561098357600080fd5b610b0b600e3363ffffffff6113a316565b565b610b1633610e59565b1515610b2157600080fd5b61ffff808316600090815260116020526040902054161580610b5a575061ffff8083166000908152601160205260409020548116908216105b1515610bc757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f5f737570706c794c696d69742069732062696767657200000000000000000000604482015290519081900360640190fd5b61ffff9182166000908152601160205260409020805461ffff191691909216179055565b6000600160a060020a0382161515610c0257600080fd5b50600160a060020a031660009081526003602052604090205490565b6000610c2933610e59565b1515610c3457600080fd5b600d5460ff1615610c4457600080fd5b600d805460ff191660011790556040517fb828d9b5c78095deeeeff2eca2e5d4fe046ce3feb4c99702624a3fd384ad2dbc90600090a150600190565b610c8933610970565b1515610c9457600080fd5b610ca5600e8263ffffffff6113da16565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b61ffff9081166000908152601160205260409020541690565b610cfe33610970565b1515610d0957600080fd5b600f5460ff1615610d1957600080fd5b600f805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b600a8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107f45780601f106107c9576101008083540402835291602001916107f4565b610dbb33610e59565b1515610dc657600080fd5b610dd7600c8263ffffffff6113da16565b604051600160a060020a038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b610b0b600c3363ffffffff6113a316565b610e2833610e59565b1515610e3357600080fd5b61086f601083836119f1565b600f5460ff1615610e4f57600080fd5b61084a8282611414565b6000610983600c8363ffffffff61133916565b610e77848484610854565b610e8384848484611498565b1515610a4d57600080fd5b6010805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610f145780601f10610ee957610100808354040283529160200191610f14565b820191906000526020600020905b815481529060010190602001808311610ef757829003601f168201915b505050505081565b606060008082808280871515610f54577f30000000000000000000000000000000000000000000000000000000000000009550610f90565b8794505b6000851115610f905761010086049550600a850660300160f860020a0260010286179550600a85811515610f8857fe5b049450610f58565b6010805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156110165780601f10610feb57610100808354040283529160200191611016565b820191906000526020600020905b815481529060010190602001808311610ff957829003601f168201915b50505050509350602060ff168451016040519080825280601f01601f191660200182016040528015611052578160200160208202803883390190505b50925060009050600091505b83518260ff1610156110db57838260ff1681518110151561107b57fe5b90602001015160f860020a900460f860020a02838260ff1681518110151561109f57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506001918201910161105e565b600091505b602060ff8316101561114f578560ff8316602081106110fb57fe5b1a60f860020a02838260ff1681518110151561111357fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600191820191016110e0565b50909695505050505050565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205460ff1690565b600090815260016020526040902054600160a060020a0316151590565b60006111b182610ad6565b9050600160a060020a0383811690821614156111cc57600080fd5b33600160a060020a03821614806111e857506111e8813361115b565b15156111f357600080fd5b600082815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b611266338261161a565b151561127157600080fd5b600160a060020a038216151561128657600080fd5b6112908382611679565b61129a83826116e8565b6112a482826117ef565b8082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6112f48282611838565b600780546000838152600860205260408120829055600182018355919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688015550565b6000600160a060020a038216151561135057600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61137982611189565b151561138457600080fd5b6000828152600b60209081526040909120825161086f92840190611a6f565b600160a060020a03811615156113b857600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a03811615156113ef57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a03821633141561142a57600080fd5b336000818152600460209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b6000806114ad85600160a060020a0316611893565b15156114bc5760019150611611565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b8381101561154f578181015183820152602001611537565b50505050905090810190601f16801561157c5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561159e57600080fd5b505af11580156115b2573d6000803e3d6000fd5b505050506040513d60208110156115c857600080fd5b50517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1981167f150b7a020000000000000000000000000000000000000000000000000000000014925090505b50949350505050565b60008061162683610ad6565b905080600160a060020a031684600160a060020a03161480611661575083600160a060020a0316611656846107fe565b600160a060020a0316145b806116715750611671818561115b565b949350505050565b81600160a060020a031661168c82610ad6565b600160a060020a03161461169f57600080fd5b600081815260026020526040902054600160a060020a03161561084a576000908152600260205260409020805473ffffffffffffffffffffffffffffffffffffffff1916905550565b60008060006116f7858561189b565b600084815260066020908152604080832054600160a060020a038916845260059092529091205490935061173290600163ffffffff61193116565b600160a060020a03861660009081526005602052604090208054919350908390811061175a57fe5b90600052602060002001549050806005600087600160a060020a0316600160a060020a031681526020019081526020016000208481548110151561179a57fe5b6000918252602080832090910192909255600160a060020a03871681526005909152604090208054906117d1906000198301611add565b50600093845260066020526040808520859055908452909220555050565b60006117fb8383611948565b50600160a060020a039091166000908152600560209081526040808320805460018101825590845282842081018590559383526006909152902055565b600160a060020a038216151561184d57600080fd5b61185782826117ef565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000903b1190565b81600160a060020a03166118ae82610ad6565b600160a060020a0316146118c157600080fd5b600160a060020a0382166000908152600360205260409020546118eb90600163ffffffff61193116565b600160a060020a03909216600090815260036020908152604080832094909455918152600190915220805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000808383111561194157600080fd5b5050900390565b600081815260016020526040902054600160a060020a03161561196a57600080fd5b6000818152600160208181526040808420805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03881690811790915584526003909152909120546119b8916119d8565b600160a060020a0390921660009081526003602052604090209190915550565b6000828201838110156119ea57600080fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611a325782800160ff19823516178555611a5f565b82800160010185558215611a5f579182015b82811115611a5f578235825591602001919060010190611a44565b50611a6b929150611afd565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611ab057805160ff1916838001178555611a5f565b82800160010185558215611a5f579182015b82811115611a5f578251825591602001919060010190611ac2565b81548183558181111561086f5760008381526020902061086f9181019083015b61076591905b80821115611a6b5760008155600101611b035600a165627a7a7230582083a458af1fe186f99e02f7ea9f647e58cbef39133bc5ad644300173229de7b5a0029
Swarm Source
bzzr://83a458af1fe186f99e02f7ea9f647e58cbef39133bc5ad644300173229de7b5a
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.