More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 3,483 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Safe Transfer Fr... | 21053959 | 18 days ago | IN | 0 ETH | 0.00036167 | ||||
Set Approval For... | 21015333 | 23 days ago | IN | 0 ETH | 0.00052322 | ||||
Safe Transfer Fr... | 20957262 | 32 days ago | IN | 0 ETH | 0.00130251 | ||||
Safe Transfer Fr... | 20952878 | 32 days ago | IN | 0 ETH | 0.0008227 | ||||
Safe Transfer Fr... | 20952874 | 32 days ago | IN | 0 ETH | 0.00079909 | ||||
Safe Transfer Fr... | 20952840 | 32 days ago | IN | 0 ETH | 0.00092335 | ||||
Set Approval For... | 20885302 | 42 days ago | IN | 0 ETH | 0.0004445 | ||||
Set Approval For... | 20885211 | 42 days ago | IN | 0 ETH | 0.00033629 | ||||
Safe Transfer Fr... | 20866592 | 44 days ago | IN | 0 ETH | 0.00058402 | ||||
Safe Transfer Fr... | 20841820 | 48 days ago | IN | 0 ETH | 0.0009937 | ||||
Safe Transfer Fr... | 20841567 | 48 days ago | IN | 0 ETH | 0.00093791 | ||||
Transfer From | 20785060 | 56 days ago | IN | 0 ETH | 0.00311554 | ||||
Safe Transfer Fr... | 20785031 | 56 days ago | IN | 0 ETH | 0.00282809 | ||||
Transfer From | 20785030 | 56 days ago | IN | 0 ETH | 0.00272759 | ||||
Transfer From | 20785017 | 56 days ago | IN | 0 ETH | 0.00264522 | ||||
Transfer From | 20784895 | 56 days ago | IN | 0 ETH | 0.002576 | ||||
Transfer From | 20784885 | 56 days ago | IN | 0 ETH | 0.00254056 | ||||
Transfer From | 20784853 | 56 days ago | IN | 0 ETH | 0.00265815 | ||||
Transfer From | 20784849 | 56 days ago | IN | 0 ETH | 0.00267441 | ||||
Transfer From | 20784823 | 56 days ago | IN | 0 ETH | 0.00258953 | ||||
Transfer From | 20784811 | 56 days ago | IN | 0 ETH | 0.00189105 | ||||
Transfer From | 20784782 | 56 days ago | IN | 0 ETH | 0.0020375 | ||||
Set Approval For... | 20776776 | 57 days ago | IN | 0 ETH | 0.00049351 | ||||
Transfer From | 20771145 | 57 days ago | IN | 0 ETH | 0.00197789 | ||||
Transfer From | 20771060 | 58 days ago | IN | 0 ETH | 0.00105174 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
CarToken
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-08-21 */ pragma solidity ^0.4.21; /** * @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 Non-Fungible Token Standard basic interface * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721Basic is ERC165 { bytes4 internal 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 internal constant InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('tokenByIndex(uint256)')) */ bytes4 internal constant InterfaceId_ERC721Metadata = 0x5b5e139f; /** * 0x5b5e139f === * bytes4(keccak256('name()')) ^ * bytes4(keccak256('symbol()')) ^ * bytes4(keccak256('tokenURI(uint256)')) */ 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; } /** * @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 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 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; } } /** * 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 _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; } } /** * @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 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); } /** * @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 { 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; 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 * @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 { 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 = 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 ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 { // Token name string internal name_; // Token symbol string internal symbol_; // Mapping from owner to list of owned token IDs mapping(address => uint256[]) internal ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) internal ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] internal allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) internal allTokensIndex; // Optional mapping for token URIs mapping(uint256 => string) internal tokenURIs; /** * @dev Constructor function */ 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); } /** * @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) internal { require(_exists(_tokenId)); tokenURIs[_tokenId] = _uri; } /** * @dev Internal function to add a token ID to the list of a given address * @param _to address representing the new owner of the given token ID * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address */ function addTokenTo(address _to, uint256 _tokenId) internal { super.addTokenTo(_to, _tokenId); uint256 length = ownedTokens[_to].length; ownedTokens[_to].push(_tokenId); ownedTokensIndex[_tokenId] = length; } /** * @dev Internal function to remove a token ID from the list of a given address * @param _from address representing the previous owner of the given token ID * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function removeTokenFrom(address _from, uint256 _tokenId) internal { super.removeTokenFrom(_from, _tokenId); // 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); // Clear metadata (if any) if (bytes(tokenURIs[_tokenId]).length != 0) { delete tokenURIs[_tokenId]; } // Reorg all tokens array uint256 tokenIndex = allTokensIndex[_tokenId]; uint256 lastTokenIndex = allTokens.length.sub(1); uint256 lastToken = allTokens[lastTokenIndex]; allTokens[tokenIndex] = lastToken; allTokens[lastTokenIndex] = 0; allTokens.length--; allTokensIndex[_tokenId] = 0; allTokensIndex[lastToken] = tokenIndex; } } /** * @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 { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } /* * @title String & slice utility library for Solidity contracts. * @author Nick Johnson <[email protected]> * * @dev Functionality in this library is largely implemented using an * abstraction called a 'slice'. A slice represents a part of a string - * anything from the entire string to a single character, or even no * characters at all (a 0-length slice). Since a slice only has to specify * an offset and a length, copying and manipulating slices is a lot less * expensive than copying and manipulating the strings they reference. * * To further reduce gas costs, most functions on slice that need to return * a slice modify the original one instead of allocating a new one; for * instance, `s.split(".")` will return the text up to the first '.', * modifying s to only contain the remainder of the string after the '.'. * In situations where you do not want to modify the original slice, you * can make a copy first with `.copy()`, for example: * `s.copy().split(".")`. Try and avoid using this idiom in loops; since * Solidity has no memory management, it will result in allocating many * short-lived slices that are later discarded. * * Functions that return two slices come in two versions: a non-allocating * version that takes the second slice as an argument, modifying it in * place, and an allocating version that allocates and returns the second * slice; see `nextRune` for example. * * Functions that have to copy string data will return strings rather than * slices; these can be cast back to slices for further processing if * required. * * For convenience, some functions are provided with non-modifying * variants that create a new slice and return both; for instance, * `s.splitNew('.')` leaves s unmodified, and returns two values * corresponding to the left and right parts of the string. */ library strings { struct slice { uint _len; uint _ptr; } function memcpy(uint dest, uint src, uint len) private pure { // Copy word-length chunks while possible for(; len >= 32; len -= 32) { assembly { mstore(dest, mload(src)) } dest += 32; src += 32; } // Copy remaining bytes uint mask = 256 ** (32 - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) let destpart := and(mload(dest), mask) mstore(dest, or(destpart, srcpart)) } } /* * @dev Returns a slice containing the entire string. * @param self The string to make a slice from. * @return A newly allocated slice containing the entire string. */ function toSlice(string memory self) internal pure returns (slice memory) { uint ptr; assembly { ptr := add(self, 0x20) } return slice(bytes(self).length, ptr); } /* * @dev Returns the length of a null-terminated bytes32 string. * @param self The value to find the length of. * @return The length of the string, from 0 to 32. */ function len(bytes32 self) internal pure returns (uint) { uint ret; if (self == 0) return 0; if (self & 0xffffffffffffffffffffffffffffffff == 0) { ret += 16; self = bytes32(uint(self) / 0x100000000000000000000000000000000); } if (self & 0xffffffffffffffff == 0) { ret += 8; self = bytes32(uint(self) / 0x10000000000000000); } if (self & 0xffffffff == 0) { ret += 4; self = bytes32(uint(self) / 0x100000000); } if (self & 0xffff == 0) { ret += 2; self = bytes32(uint(self) / 0x10000); } if (self & 0xff == 0) { ret += 1; } return 32 - ret; } /* * @dev Returns a slice containing the entire bytes32, interpreted as a * null-terminated utf-8 string. * @param self The bytes32 value to convert to a slice. * @return A new slice containing the value of the input argument up to the * first null. */ function toSliceB32(bytes32 self) internal pure returns (slice memory ret) { // Allocate space for `self` in memory, copy it there, and point ret at it assembly { let ptr := mload(0x40) mstore(0x40, add(ptr, 0x20)) mstore(ptr, self) mstore(add(ret, 0x20), ptr) } ret._len = len(self); } /* * @dev Returns a new slice containing the same data as the current slice. * @param self The slice to copy. * @return A new slice containing the same data as `self`. */ function copy(slice memory self) internal pure returns (slice memory) { return slice(self._len, self._ptr); } /* * @dev Copies a slice to a new string. * @param self The slice to copy. * @return A newly allocated string containing the slice's text. */ function toString(slice memory self) internal pure returns (string memory) { string memory ret = new string(self._len); uint retptr; assembly { retptr := add(ret, 32) } memcpy(retptr, self._ptr, self._len); return ret; } /* * @dev Returns the length in runes of the slice. Note that this operation * takes time proportional to the length of the slice; avoid using it * in loops, and call `slice.empty()` if you only need to know whether * the slice is empty or not. * @param self The slice to operate on. * @return The length of the slice in runes. */ function len(slice memory self) internal pure returns (uint l) { // Starting at ptr-31 means the LSB will be the byte we care about uint ptr = self._ptr - 31; uint end = ptr + self._len; for (l = 0; ptr < end; l++) { uint8 b; assembly { b := and(mload(ptr), 0xFF) } if (b < 0x80) { ptr += 1; } else if(b < 0xE0) { ptr += 2; } else if(b < 0xF0) { ptr += 3; } else if(b < 0xF8) { ptr += 4; } else if(b < 0xFC) { ptr += 5; } else { ptr += 6; } } } /* * @dev Returns true if the slice is empty (has a length of 0). * @param self The slice to operate on. * @return True if the slice is empty, False otherwise. */ function empty(slice memory self) internal pure returns (bool) { return self._len == 0; } /* * @dev Returns a positive number if `other` comes lexicographically after * `self`, a negative number if it comes before, or zero if the * contents of the two slices are equal. Comparison is done per-rune, * on unicode codepoints. * @param self The first slice to compare. * @param other The second slice to compare. * @return The result of the comparison. */ function compare(slice memory self, slice memory other) internal pure returns (int) { uint shortest = self._len; if (other._len < self._len) shortest = other._len; uint selfptr = self._ptr; uint otherptr = other._ptr; for (uint idx = 0; idx < shortest; idx += 32) { uint a; uint b; assembly { a := mload(selfptr) b := mload(otherptr) } if (a != b) { // Mask out irrelevant bytes and check again uint256 mask = uint256(-1); // 0xffff... if(shortest < 32) { mask = ~(2 ** (8 * (32 - shortest + idx)) - 1); } uint256 diff = (a & mask) - (b & mask); if (diff != 0) return int(diff); } selfptr += 32; otherptr += 32; } return int(self._len) - int(other._len); } /* * @dev Returns true if the two slices contain the same text. * @param self The first slice to compare. * @param self The second slice to compare. * @return True if the slices are equal, false otherwise. */ function equals(slice memory self, slice memory other) internal pure returns (bool) { return compare(self, other) == 0; } /* * @dev Extracts the first rune in the slice into `rune`, advancing the * slice to point to the next rune and returning `self`. * @param self The slice to operate on. * @param rune The slice that will contain the first rune. * @return `rune`. */ function nextRune(slice memory self, slice memory rune) internal pure returns (slice memory) { rune._ptr = self._ptr; if (self._len == 0) { rune._len = 0; return rune; } uint l; uint b; // Load the first byte of the rune into the LSBs of b assembly { b := and(mload(sub(mload(add(self, 32)), 31)), 0xFF) } if (b < 0x80) { l = 1; } else if(b < 0xE0) { l = 2; } else if(b < 0xF0) { l = 3; } else { l = 4; } // Check for truncated codepoints if (l > self._len) { rune._len = self._len; self._ptr += self._len; self._len = 0; return rune; } self._ptr += l; self._len -= l; rune._len = l; return rune; } /* * @dev Returns the first rune in the slice, advancing the slice to point * to the next rune. * @param self The slice to operate on. * @return A slice containing only the first rune from `self`. */ function nextRune(slice memory self) internal pure returns (slice memory ret) { nextRune(self, ret); } /* * @dev Returns the number of the first codepoint in the slice. * @param self The slice to operate on. * @return The number of the first codepoint in the slice. */ function ord(slice memory self) internal pure returns (uint ret) { if (self._len == 0) { return 0; } uint word; uint length; uint divisor = 2 ** 248; // Load the rune into the MSBs of b assembly { word:= mload(mload(add(self, 32))) } uint b = word / divisor; if (b < 0x80) { ret = b; length = 1; } else if(b < 0xE0) { ret = b & 0x1F; length = 2; } else if(b < 0xF0) { ret = b & 0x0F; length = 3; } else { ret = b & 0x07; length = 4; } // Check for truncated codepoints if (length > self._len) { return 0; } for (uint i = 1; i < length; i++) { divisor = divisor / 256; b = (word / divisor) & 0xFF; if (b & 0xC0 != 0x80) { // Invalid UTF-8 sequence return 0; } ret = (ret * 64) | (b & 0x3F); } return ret; } /* * @dev Returns the keccak-256 hash of the slice. * @param self The slice to hash. * @return The hash of the slice. */ function keccak(slice memory self) internal pure returns (bytes32 ret) { assembly { ret := keccak256(mload(add(self, 32)), mload(self)) } } /* * @dev Returns true if `self` starts with `needle`. * @param self The slice to operate on. * @param needle The slice to search for. * @return True if the slice starts with the provided text, false otherwise. */ function startsWith(slice memory self, slice memory needle) internal pure returns (bool) { if (self._len < needle._len) { return false; } if (self._ptr == needle._ptr) { return true; } bool equal; assembly { let length := mload(needle) let selfptr := mload(add(self, 0x20)) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } return equal; } /* * @dev If `self` starts with `needle`, `needle` is removed from the * beginning of `self`. Otherwise, `self` is unmodified. * @param self The slice to operate on. * @param needle The slice to search for. * @return `self` */ function beyond(slice memory self, slice memory needle) internal pure returns (slice memory) { if (self._len < needle._len) { return self; } bool equal = true; if (self._ptr != needle._ptr) { assembly { let length := mload(needle) let selfptr := mload(add(self, 0x20)) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } } if (equal) { self._len -= needle._len; self._ptr += needle._len; } return self; } /* * @dev Returns true if the slice ends with `needle`. * @param self The slice to operate on. * @param needle The slice to search for. * @return True if the slice starts with the provided text, false otherwise. */ function endsWith(slice memory self, slice memory needle) internal pure returns (bool) { if (self._len < needle._len) { return false; } uint selfptr = self._ptr + self._len - needle._len; if (selfptr == needle._ptr) { return true; } bool equal; assembly { let length := mload(needle) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } return equal; } /* * @dev If `self` ends with `needle`, `needle` is removed from the * end of `self`. Otherwise, `self` is unmodified. * @param self The slice to operate on. * @param needle The slice to search for. * @return `self` */ function until(slice memory self, slice memory needle) internal pure returns (slice memory) { if (self._len < needle._len) { return self; } uint selfptr = self._ptr + self._len - needle._len; bool equal = true; if (selfptr != needle._ptr) { assembly { let length := mload(needle) let needleptr := mload(add(needle, 0x20)) equal := eq(keccak256(selfptr, length), keccak256(needleptr, length)) } } if (equal) { self._len -= needle._len; } return self; } // Returns the memory address of the first byte of the first occurrence of // `needle` in `self`, or the first byte after `self` if not found. function findPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) { uint ptr = selfptr; uint idx; if (needlelen <= selflen) { if (needlelen <= 32) { bytes32 mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1)); bytes32 needledata; assembly { needledata := and(mload(needleptr), mask) } uint end = selfptr + selflen - needlelen; bytes32 ptrdata; assembly { ptrdata := and(mload(ptr), mask) } while (ptrdata != needledata) { if (ptr >= end) return selfptr + selflen; ptr++; assembly { ptrdata := and(mload(ptr), mask) } } return ptr; } else { // For long needles, use hashing bytes32 hash; assembly { hash := keccak256(needleptr, needlelen) } for (idx = 0; idx <= selflen - needlelen; idx++) { bytes32 testHash; assembly { testHash := keccak256(ptr, needlelen) } if (hash == testHash) return ptr; ptr += 1; } } } return selfptr + selflen; } // Returns the memory address of the first byte after the last occurrence of // `needle` in `self`, or the address of `self` if not found. function rfindPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) { uint ptr; if (needlelen <= selflen) { if (needlelen <= 32) { bytes32 mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1)); bytes32 needledata; assembly { needledata := and(mload(needleptr), mask) } ptr = selfptr + selflen - needlelen; bytes32 ptrdata; assembly { ptrdata := and(mload(ptr), mask) } while (ptrdata != needledata) { if (ptr <= selfptr) return selfptr; ptr--; assembly { ptrdata := and(mload(ptr), mask) } } return ptr + needlelen; } else { // For long needles, use hashing bytes32 hash; assembly { hash := keccak256(needleptr, needlelen) } ptr = selfptr + (selflen - needlelen); while (ptr >= selfptr) { bytes32 testHash; assembly { testHash := keccak256(ptr, needlelen) } if (hash == testHash) return ptr + needlelen; ptr -= 1; } } } return selfptr; } /* * @dev Modifies `self` to contain everything from the first occurrence of * `needle` to the end of the slice. `self` is set to the empty slice * if `needle` is not found. * @param self The slice to search and modify. * @param needle The text to search for. * @return `self`. */ function find(slice memory self, slice memory needle) internal pure returns (slice memory) { uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr); self._len -= ptr - self._ptr; self._ptr = ptr; return self; } /* * @dev Modifies `self` to contain the part of the string from the start of * `self` to the end of the first occurrence of `needle`. If `needle` * is not found, `self` is set to the empty slice. * @param self The slice to search and modify. * @param needle The text to search for. * @return `self`. */ function rfind(slice memory self, slice memory needle) internal pure returns (slice memory) { uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr); self._len = ptr - self._ptr; return self; } /* * @dev Splits the slice, setting `self` to everything after the first * occurrence of `needle`, and `token` to everything before it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and `token` is set to the entirety of `self`. * @param self The slice to split. * @param needle The text to search for in `self`. * @param token An output parameter to which the first token is written. * @return `token`. */ function split(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) { uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr); token._ptr = self._ptr; token._len = ptr - self._ptr; if (ptr == self._ptr + self._len) { // Not found self._len = 0; } else { self._len -= token._len + needle._len; self._ptr = ptr + needle._len; } return token; } /* * @dev Splits the slice, setting `self` to everything after the first * occurrence of `needle`, and returning everything before it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and the entirety of `self` is returned. * @param self The slice to split. * @param needle The text to search for in `self`. * @return The part of `self` up to the first occurrence of `delim`. */ function split(slice memory self, slice memory needle) internal pure returns (slice memory token) { split(self, needle, token); } /* * @dev Splits the slice, setting `self` to everything before the last * occurrence of `needle`, and `token` to everything after it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and `token` is set to the entirety of `self`. * @param self The slice to split. * @param needle The text to search for in `self`. * @param token An output parameter to which the first token is written. * @return `token`. */ function rsplit(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) { uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr); token._ptr = ptr; token._len = self._len - (ptr - self._ptr); if (ptr == self._ptr) { // Not found self._len = 0; } else { self._len -= token._len + needle._len; } return token; } /* * @dev Splits the slice, setting `self` to everything before the last * occurrence of `needle`, and returning everything after it. If * `needle` does not occur in `self`, `self` is set to the empty slice, * and the entirety of `self` is returned. * @param self The slice to split. * @param needle The text to search for in `self`. * @return The part of `self` after the last occurrence of `delim`. */ function rsplit(slice memory self, slice memory needle) internal pure returns (slice memory token) { rsplit(self, needle, token); } /* * @dev Counts the number of nonoverlapping occurrences of `needle` in `self`. * @param self The slice to search. * @param needle The text to search for in `self`. * @return The number of occurrences of `needle` found in `self`. */ function count(slice memory self, slice memory needle) internal pure returns (uint cnt) { uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr) + needle._len; while (ptr <= self._ptr + self._len) { cnt++; ptr = findPtr(self._len - (ptr - self._ptr), ptr, needle._len, needle._ptr) + needle._len; } } /* * @dev Returns True if `self` contains `needle`. * @param self The slice to search. * @param needle The text to search for in `self`. * @return True if `needle` is found in `self`, false otherwise. */ function contains(slice memory self, slice memory needle) internal pure returns (bool) { return rfindPtr(self._len, self._ptr, needle._len, needle._ptr) != self._ptr; } /* * @dev Returns a newly allocated string containing the concatenation of * `self` and `other`. * @param self The first slice to concatenate. * @param other The second slice to concatenate. * @return The concatenation of the two strings. */ function concat(slice memory self, slice memory other) internal pure returns (string memory) { string memory ret = new string(self._len + other._len); uint retptr; assembly { retptr := add(ret, 32) } memcpy(retptr, self._ptr, self._len); memcpy(retptr + self._len, other._ptr, other._len); return ret; } /* * @dev Joins an array of slices, using `self` as a delimiter, returning a * newly allocated string. * @param self The delimiter to use. * @param parts A list of slices to join. * @return A newly allocated string containing all the slices in `parts`, * joined with `self`. */ function join(slice memory self, slice[] memory parts) internal pure returns (string memory) { if (parts.length == 0) return ""; uint length = self._len * (parts.length - 1); for(uint i = 0; i < parts.length; i++) length += parts[i]._len; string memory ret = new string(length); uint retptr; assembly { retptr := add(ret, 32) } for(i = 0; i < parts.length; i++) { memcpy(retptr, parts[i]._ptr, parts[i]._len); retptr += parts[i]._len; if (i < parts.length - 1) { memcpy(retptr, self._ptr, self._len); retptr += self._len; } } return ret; } } contract CarToken is ERC721Token, Ownable { using strings for *; address factory; /* * Car Types: * 0 - Unknown * 1 - SUV * 2 - Truck * 3 - Hovercraft * 4 - Tank * 5 - Lambo * 6 - Buggy * 7 - midgrade type 2 * 8 - midgrade type 3 * 9 - Hatchback * 10 - regular type 2 * 11 - regular type 3 */ uint public constant UNKNOWN_TYPE = 0; uint public constant SUV_TYPE = 1; uint public constant TANKER_TYPE = 2; uint public constant HOVERCRAFT_TYPE = 3; uint public constant TANK_TYPE = 4; uint public constant LAMBO_TYPE = 5; uint public constant DUNE_BUGGY = 6; uint public constant MIDGRADE_TYPE2 = 7; uint public constant MIDGRADE_TYPE3 = 8; uint public constant HATCHBACK = 9; uint public constant REGULAR_TYPE2 = 10; uint public constant REGULAR_TYPE3 = 11; string public constant METADATA_URL = "https://vault.warriders.com/"; //Number of premium type cars uint public PREMIUM_TYPE_COUNT = 5; //Number of midgrade type cars uint public MIDGRADE_TYPE_COUNT = 3; //Number of regular type cars uint public REGULAR_TYPE_COUNT = 3; mapping(uint256 => uint256) public maxBznTankSizeOfPremiumCarWithIndex; mapping(uint256 => uint256) public maxBznTankSizeOfMidGradeCarWithIndex; mapping(uint256 => uint256) public maxBznTankSizeOfRegularCarWithIndex; /** * Whether any given car (tokenId) is special */ mapping(uint256 => bool) public isSpecial; /** * The type of any given car (tokenId) */ mapping(uint256 => uint) public carType; /** * The total supply for any given type (int) */ mapping(uint => uint256) public carTypeTotalSupply; /** * The current supply for any given type (int) */ mapping(uint => uint256) public carTypeSupply; /** * Whether any given type (int) is special */ mapping(uint => bool) public isTypeSpecial; /** * How much BZN any given car (tokenId) can hold */ mapping(uint256 => uint256) public tankSizes; /** * Given any car type (uint), get the max tank size for that type (uint256) */ mapping(uint => uint256) public maxTankSizes; mapping (uint => uint[]) public premiumTotalSupplyForCar; mapping (uint => uint[]) public midGradeTotalSupplyForCar; mapping (uint => uint[]) public regularTotalSupplyForCar; modifier onlyFactory { require(msg.sender == factory, "Not authorized"); _; } constructor(address factoryAddress) public ERC721Token("WarRiders", "WR") { factory = factoryAddress; carTypeTotalSupply[UNKNOWN_TYPE] = 0; //Unknown carTypeTotalSupply[SUV_TYPE] = 20000; //SUV carTypeTotalSupply[TANKER_TYPE] = 9000; //Tanker carTypeTotalSupply[HOVERCRAFT_TYPE] = 600; //Hovercraft carTypeTotalSupply[TANK_TYPE] = 300; //Tank carTypeTotalSupply[LAMBO_TYPE] = 100; //Lambo carTypeTotalSupply[DUNE_BUGGY] = 40000; //migrade type 1 carTypeTotalSupply[MIDGRADE_TYPE2] = 50000; //midgrade type 2 carTypeTotalSupply[MIDGRADE_TYPE3] = 60000; //midgrade type 3 carTypeTotalSupply[HATCHBACK] = 200000; //regular type 1 carTypeTotalSupply[REGULAR_TYPE2] = 300000; //regular type 2 carTypeTotalSupply[REGULAR_TYPE3] = 500000; //regular type 3 maxTankSizes[SUV_TYPE] = 200; //SUV tank size maxTankSizes[TANKER_TYPE] = 450; //Tanker tank size maxTankSizes[HOVERCRAFT_TYPE] = 300; //Hovercraft tank size maxTankSizes[TANK_TYPE] = 200; //Tank tank size maxTankSizes[LAMBO_TYPE] = 250; //Lambo tank size maxTankSizes[DUNE_BUGGY] = 120; //migrade type 1 tank size maxTankSizes[MIDGRADE_TYPE2] = 110; //midgrade type 2 tank size maxTankSizes[MIDGRADE_TYPE3] = 100; //midgrade type 3 tank size maxTankSizes[HATCHBACK] = 90; //regular type 1 tank size maxTankSizes[REGULAR_TYPE2] = 70; //regular type 2 tank size maxTankSizes[REGULAR_TYPE3] = 40; //regular type 3 tank size maxBznTankSizeOfPremiumCarWithIndex[1] = 200; //SUV tank size maxBznTankSizeOfPremiumCarWithIndex[2] = 450; //Tanker tank size maxBznTankSizeOfPremiumCarWithIndex[3] = 300; //Hovercraft tank size maxBznTankSizeOfPremiumCarWithIndex[4] = 200; //Tank tank size maxBznTankSizeOfPremiumCarWithIndex[5] = 250; //Lambo tank size maxBznTankSizeOfMidGradeCarWithIndex[1] = 100; //migrade type 1 tank size maxBznTankSizeOfMidGradeCarWithIndex[2] = 110; //midgrade type 2 tank size maxBznTankSizeOfMidGradeCarWithIndex[3] = 120; //midgrade type 3 tank size maxBznTankSizeOfRegularCarWithIndex[1] = 40; //regular type 1 tank size maxBznTankSizeOfRegularCarWithIndex[2] = 70; //regular type 2 tank size maxBznTankSizeOfRegularCarWithIndex[3] = 90; //regular type 3 tank size isTypeSpecial[HOVERCRAFT_TYPE] = true; isTypeSpecial[TANK_TYPE] = true; isTypeSpecial[LAMBO_TYPE] = true; } function isCarSpecial(uint256 tokenId) public view returns (bool) { return isSpecial[tokenId]; } function getCarType(uint256 tokenId) public view returns (uint) { return carType[tokenId]; } function mint(uint256 _tokenId, string _metadata, uint cType, uint256 tankSize, address newOwner) public onlyFactory { //Since any invalid car type would have a total supply of 0 //This require will also enforce that a valid cType is given require(carTypeSupply[cType] < carTypeTotalSupply[cType], "This type has reached total supply"); //This will enforce the tank size is less than the max require(tankSize <= maxTankSizes[cType], "Tank size provided bigger than max for this type"); if (isPremium(cType)) { premiumTotalSupplyForCar[cType].push(_tokenId); } else if (isMidGrade(cType)) { midGradeTotalSupplyForCar[cType].push(_tokenId); } else { regularTotalSupplyForCar[cType].push(_tokenId); } super._mint(newOwner, _tokenId); super._setTokenURI(_tokenId, _metadata); carType[_tokenId] = cType; isSpecial[_tokenId] = isTypeSpecial[cType]; carTypeSupply[cType] = carTypeSupply[cType] + 1; tankSizes[_tokenId] = tankSize; } function isPremium(uint cType) public pure returns (bool) { return cType == SUV_TYPE || cType == TANKER_TYPE || cType == HOVERCRAFT_TYPE || cType == TANK_TYPE || cType == LAMBO_TYPE; } function isMidGrade(uint cType) public pure returns (bool) { return cType == DUNE_BUGGY || cType == MIDGRADE_TYPE2 || cType == MIDGRADE_TYPE3; } function isRegular(uint cType) public pure returns (bool) { return cType == HATCHBACK || cType == REGULAR_TYPE2 || cType == REGULAR_TYPE3; } function getTotalSupplyForType(uint cType) public view returns (uint256) { return carTypeSupply[cType]; } function getPremiumCarsForVariant(uint variant) public view returns (uint[]) { return premiumTotalSupplyForCar[variant]; } function getMidgradeCarsForVariant(uint variant) public view returns (uint[]) { return midGradeTotalSupplyForCar[variant]; } function getRegularCarsForVariant(uint variant) public view returns (uint[]) { return regularTotalSupplyForCar[variant]; } function getPremiumCarSupply(uint variant) public view returns (uint) { return premiumTotalSupplyForCar[variant].length; } function getMidgradeCarSupply(uint variant) public view returns (uint) { return midGradeTotalSupplyForCar[variant].length; } function getRegularCarSupply(uint variant) public view returns (uint) { return regularTotalSupplyForCar[variant].length; } function exists(uint256 _tokenId) public view returns (bool) { return super._exists(_tokenId); } }
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":"cType","type":"uint256"}],"name":"isPremium","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"maxTankSizes","outputs":[{"name":"","type":"uint256"}],"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":true,"inputs":[{"name":"variant","type":"uint256"}],"name":"getPremiumCarsForVariant","outputs":[{"name":"","type":"uint256[]"}],"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":"MIDGRADE_TYPE3","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"HATCHBACK","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"InterfaceId_ERC165","outputs":[{"name":"","type":"bytes4"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIDGRADE_TYPE_COUNT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"REGULAR_TYPE3","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":"UNKNOWN_TYPE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","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":"TANK_TYPE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"_metadata","type":"string"},{"name":"cType","type":"uint256"},{"name":"tankSize","type":"uint256"},{"name":"newOwner","type":"address"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"carType","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"variant","type":"uint256"}],"name":"getPremiumCarSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"variant","type":"uint256"}],"name":"getMidgradeCarSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LAMBO_TYPE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenId","type":"uint256"}],"name":"isCarSpecial","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":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"REGULAR_TYPE_COUNT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","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":"getCarType","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":"","type":"uint256"}],"name":"carTypeSupply","outputs":[{"name":"","type":"uint256"}],"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":"cType","type":"uint256"}],"name":"isMidGrade","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"variant","type":"uint256"}],"name":"getMidgradeCarsForVariant","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"variant","type":"uint256"}],"name":"getRegularCarsForVariant","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"REGULAR_TYPE2","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SUV_TYPE","outputs":[{"name":"","type":"uint256"}],"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":"","type":"uint256"}],"name":"isTypeSpecial","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"maxBznTankSizeOfRegularCarWithIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIDGRADE_TYPE2","outputs":[{"name":"","type":"uint256"}],"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":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"midGradeTotalSupplyForCar","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"premiumTotalSupplyForCar","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"regularTotalSupplyForCar","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"TANKER_TYPE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"cType","type":"uint256"}],"name":"isRegular","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","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":"cType","type":"uint256"}],"name":"getTotalSupplyForType","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"carTypeTotalSupply","outputs":[{"name":"","type":"uint256"}],"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":"","type":"uint256"}],"name":"isSpecial","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"HOVERCRAFT_TYPE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PREMIUM_TYPE_COUNT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"tankSizes","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DUNE_BUGGY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"variant","type":"uint256"}],"name":"getRegularCarSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"METADATA_URL","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"maxBznTankSizeOfPremiumCarWithIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"maxBznTankSizeOfMidGradeCarWithIndex","outputs":[{"name":"","type":"uint256"}],"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":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"factoryAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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
60806040526005600e556003600f5560036010553480156200002057600080fd5b50604051602080620026dd83398101604081815291518282018352600982527f57617252696465727300000000000000000000000000000000000000000000006020808401919091528351808501909452600284527f57520000000000000000000000000000000000000000000000000000000000009084015291620000cf7f01ffc9a7000000000000000000000000000000000000000000000000000000006401000000006200074a810204565b620001037f80ac58cd000000000000000000000000000000000000000000000000000000006401000000006200074a810204565b815162000118906005906020850190620007b7565b5080516200012e906006906020840190620007b7565b50620001637f780e9d63000000000000000000000000000000000000000000000000000000006401000000006200074a810204565b620001977f5b5e139f000000000000000000000000000000000000000000000000000000006401000000006200074a810204565b5050600c805433600160a060020a031991821617909155600d8054909116600160a060020a039290921691909117905560007f0263c2b778d062355049effc2dece97bc6547ff8a88a3258daa512061c2153dd819055614e207f4c4dc693d7db52f85fe052106f4b4b920e78e8ef37dee82878a60ab8585faf49556123287fcaff291fe014adc6b72a172705750b4cabe8f8667664d2924a166caab2885648556102587ff06d282f967055cb1eee17e04aa005b9682a620f4bbcfaee55ba78607a3d87ae5561012c7fec061709de2491458f4c981032059d7d19b0e55f45018bac6b3e660bdc959a5981905560647f5696377e725b42a372ecc45f0fbdab5e9555865aef54619ad9381892f667bbf0819055619c407fc6a239f207aea309a1b4879cb5411b8facfc2bc1e4cc4717ff2598676c399b5f5561c3507f5c9294642c77fdf0ce4b0f45159c977165b1ec2ef3bb94ee3e2a496634c781e85561ea607f5d722ae86c7aff0f95f426cf86f75793e8cd1a526603df14563c190f75fd2ef35562030d407f650982f08e47212452de30f662e413cf6044e641dedc09b52c1617e804a2611e55620493e07fd5b9797c47f98351da0d9dc8805f06430ade47345ddb9b2bd6f346a04809cc41556207a1207fcfa8b17cfe829ccfb82a1b8bc946a78d914318562253e01c04a5bbac5c20f86b5560c87ff88cd8d612926ebb404e40725c01084b6e9b3ce0344cde068570342cbd448c618190556101c27f4c287b3e2c2cb129ae3ba596d613d760b15affdac7242e12903c37a886ea1c4f8190557f4ac83fca211703e3ddb90093cd219714e5e3715bf0b4fd15b0441390534a24e28490557f06b28f262ad931a15c9e47271fc159a891b2bcb0da2659cac5bbfed4886cf26e82905560fa7f82f07edc09f3a46c1925d02252613a7fcc7be7d03b538b0c268df85f2f13a7ab81905560787fe7513fcd4f864b78baf560f46c15980b6aa41b90911efc4ce7454b83cce613b1819055606e7f2247382acc746a936c6b9b694445e53b16ccce9ebaa44dd1ce1d5f0641b0797b8190557f687151c9c7964c905d515053234445b7256d6eb52f0f0fb698ac00a08a410abf869055605a7f3a9dcd6f76534b067931c1cc4a24cb9c117c7d95c716bce6d59bb4825bc6713381905560467fdbe7ff1220189de7e6173da9d377e212c5f94fd76a3505f188b6c362d3973d9d81905560287fcbecd97c0264932d894d2765644768ec1239a8c0656fd9914fd89b4e0c9317458190557f17bc176d2408558f6e4111feebc3cab4e16b63e967be91cde721f4c8a488b5528890557f08037d7b151cc412d25674a4e66b334d9ae9d2e5517a7feaae5cdb828bf1c628969096557f9bfbaa59f8e10e7868f8b402de9d605a390c45ddaebd8c9de3c6f31e733c87ff989098557f251164fe1d8864fe5e86082eae9c288bc2b58695a4d28538dfe86e9e4f175585959095557fc550213cee30afd5e67ccba7be3d381bbc169034ae08eb3ec9168caca9fe55e7929092557f71a67924699a20698523213e55fe499d539379d7769cd5567e2c45d583f815a3949094557f8e1fee8c88a9e04123b21e90cae2727a7715bf522a1e46eb5934ccd05203a6b2557f0f36ad39aee03e7108cc48f54934702a5f0d4066f10344cebf8198978d86976a929092557f4155c2f711f2cdd34f8262ab8fb9b7020a700fe7b6948222152f7670d1fdf34d919091557f0b9d2c0c271bb30544eb78c59bdaebdae2728e5f65814c07768a0abe90ed1923919091557f0d2a6872ef858a7f8ead18dc4f3f2e8d35c853d47e2816cbb9cdd49202554e0c5560186020527f7a6340a7048c03c55288da75abed74d2ce9194201bafb03be53c0a7cca591495805460ff1990811660019081179092557f5b650d93b25a5c652bc6f9215f522b521daf6d36977dcec1343c2a8310b869d6805482168317905560059092527f2288853b49db4f36075bf4a8cfdae4e5e3b39b7b03937d0a9148b051a6f64c5c80549092161790556200085c565b7fffffffff0000000000000000000000000000000000000000000000000000000080821614156200077a57600080fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152602081905260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620007fa57805160ff19168380011785556200082a565b828001600101855582156200082a579182015b828111156200082a5782518255916020019190600101906200080d565b50620008389291506200083c565b5090565b6200085991905b8082111562000838576000815560010162000843565b90565b611e71806200086c6000396000f3006080604052600436106102ea5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146102ef578063029bca781461032557806306f94c7d1461033d57806306fdde0314610367578063081812fc146103f1578063085ff39a14610425578063095ea7b31461048d5780630f092c44146104b357806311e847b6146104c857806318160ddd146104dd57806319fa8f50146104f25780631dbdd7921461052457806320b748f41461053957806323b872dd1461054e5780632423a088146105785780632f745c591461058d5780632fc60405146105b1578063310f4cdd146105c657806332da45bc1461063a5780633b58d5d7146106525780633c0dabdb1461066a5780633cb3ea68146106825780634060d9f51461069757806342842e0e146106af5780634d6c3427146106d95780634f558e79146106ee5780634f6ccce7146107065780635c9a7a8b1461071e5780636352211e1461073657806368f017461461074e57806370a0823114610766578063715018a61461078757806373d289951461079c5780637444b227146107b45780637c6aafd1146107cc5780637f5ba3cc146107e4578063867befba146107f95780638da5cb5b1461080e57806391bb6f521461082357806395d89b411461083b57806397e28ba514610850578063a22c81ec14610868578063a22cb4651461087d578063a3715d1d146108a3578063a3804052146108be578063ab7faa6e146108d9578063af4e4494146108f4578063b850ae3614610909578063b88d4fde14610921578063c4c68b4414610990578063c5ab6e35146109a8578063c87b56dd146109c0578063cba57e38146109d8578063cf64da7f146109f0578063d2b001fb14610a05578063d748c2e414610a1a578063d99969df14610a32578063dceda27b14610a47578063e1911d7014610a5f578063e84ac26214610a74578063e97ebd3f14610a8c578063e985e9c514610aa4578063f2fde38b14610acb575b600080fd5b3480156102fb57600080fd5b50610311600160e060020a031960043516610aec565b604080519115158252519081900360200190f35b34801561033157600080fd5b50610311600435610b0b565b34801561034957600080fd5b50610355600435610b43565b60408051918252519081900360200190f35b34801561037357600080fd5b5061037c610b55565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103b657818101518382015260200161039e565b50505050905090810190601f1680156103e35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103fd57600080fd5b50610409600435610bec565b60408051600160a060020a039092168252519081900360200190f35b34801561043157600080fd5b5061043d600435610c07565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610479578181015183820152602001610461565b505050509050019250505060405180910390f35b34801561049957600080fd5b506104b1600160a060020a0360043516602435610c69565b005b3480156104bf57600080fd5b50610355610d1f565b3480156104d457600080fd5b50610355610d24565b3480156104e957600080fd5b50610355610d29565b3480156104fe57600080fd5b50610507610d2f565b60408051600160e060020a03199092168252519081900360200190f35b34801561053057600080fd5b50610355610d53565b34801561054557600080fd5b50610355610d59565b34801561055a57600080fd5b506104b1600160a060020a0360043581169060243516604435610d5e565b34801561058457600080fd5b50610355610dec565b34801561059957600080fd5b50610355600160a060020a0360043516602435610df1565b3480156105bd57600080fd5b50610355610e3e565b3480156105d257600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526104b19583359536956044949193909101919081908401838280828437509497505084359550505060208301359260400135600160a060020a03169150610e439050565b34801561064657600080fd5b50610355600435611109565b34801561065e57600080fd5b5061035560043561111b565b34801561067657600080fd5b5061035560043561112d565b34801561068e57600080fd5b5061035561113f565b3480156106a357600080fd5b50610311600435611144565b3480156106bb57600080fd5b506104b1600160a060020a0360043581169060243516604435611159565b3480156106e557600080fd5b5061035561117a565b3480156106fa57600080fd5b50610311600435611180565b34801561071257600080fd5b5061035560043561118b565b34801561072a57600080fd5b506103556004356111c0565b34801561074257600080fd5b506104096004356111d2565b34801561075a57600080fd5b506103556004356111f6565b34801561077257600080fd5b50610355600160a060020a0360043516611208565b34801561079357600080fd5b506104b161123b565b3480156107a857600080fd5b506103116004356112a9565b3480156107c057600080fd5b5061043d6004356112c7565b3480156107d857600080fd5b5061043d600435611327565b3480156107f057600080fd5b50610355611387565b34801561080557600080fd5b5061035561138c565b34801561081a57600080fd5b50610409611391565b34801561082f57600080fd5b506103116004356113a0565b34801561084757600080fd5b5061037c6113b5565b34801561085c57600080fd5b50610355600435611416565b34801561087457600080fd5b50610355611428565b34801561088957600080fd5b506104b1600160a060020a0360043516602435151561142d565b3480156108af57600080fd5b506103556004356024356114b1565b3480156108ca57600080fd5b506103556004356024356114e1565b3480156108e557600080fd5b506103556004356024356114fc565b34801561090057600080fd5b50610355611517565b34801561091557600080fd5b5061031160043561151c565b34801561092d57600080fd5b50604080516020601f6064356004818101359283018490048402850184019095528184526104b194600160a060020a03813581169560248035909216956044359536956084940191819084018382808284375094975061153a9650505050505050565b34801561099c57600080fd5b50610355600435611562565b3480156109b457600080fd5b50610355600435611574565b3480156109cc57600080fd5b5061037c600435611586565b3480156109e457600080fd5b50610311600435611631565b3480156109fc57600080fd5b50610355611646565b348015610a1157600080fd5b5061035561164b565b348015610a2657600080fd5b50610355600435611651565b348015610a3e57600080fd5b50610355611663565b348015610a5357600080fd5b50610355600435611668565b348015610a6b57600080fd5b5061037c61167a565b348015610a8057600080fd5b506103556004356116b1565b348015610a9857600080fd5b506103556004356116c3565b348015610ab057600080fd5b50610311600160a060020a03600435811690602435166116d5565b348015610ad757600080fd5b506104b1600160a060020a0360043516611703565b600160e060020a03191660009081526020819052604090205460ff1690565b60006001821480610b1c5750600282145b80610b275750600382145b80610b325750600482145b80610b3d5750600582145b92915050565b601a6020526000908152604090205481565b60058054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610be15780601f10610bb657610100808354040283529160200191610be1565b820191906000526020600020905b815481529060010190602001808311610bc457829003601f168201915b505050505090505b90565b600090815260026020526040902054600160a060020a031690565b6000818152601b6020908152604091829020805483518184028101840190945280845260609392830182828015610c5d57602002820191906000526020600020905b815481526020019060010190808311610c49575b50505050509050919050565b6000610c74826111d2565b9050600160a060020a038381169082161415610c8f57600080fd5b33600160a060020a0382161480610cab5750610cab81336116d5565b1515610cb657600080fd5b600082815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600881565b600981565b60095490565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081565b600f5481565b600b81565b610d683382611726565b1515610d7357600080fd5b600160a060020a0382161515610d8857600080fd5b610d928382611785565b610d9c83826117f6565b610da682826118fd565b8082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b600081565b6000610dfc83611208565b8210610e0757600080fd5b600160a060020a0383166000908152600760205260409020805483908110610e2b57fe5b9060005260206000200154905092915050565b600481565b600d54600160a060020a03163314610ebc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e6f7420617574686f72697a6564000000000000000000000000000000000000604482015290519081900360640190fd5b60008381526016602090815260408083205460179092529091205410610f6957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f54686973207479706520686173207265616368656420746f74616c207375707060448201527f6c79000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000838152601a602052604090205482111561100c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f54616e6b2073697a652070726f766964656420626967676572207468616e206d60448201527f617820666f722074686973207479706500000000000000000000000000000000606482015290519081900360840190fd5b61101583610b0b565b15611040576000838152601b6020908152604082208054600181018255908352912001859055611096565b611049836112a9565b15611074576000838152601c6020908152604082208054600181018255908352912001859055611096565b6000838152601d60209081526040822080546001810182559083529120018590555b6110a08186611946565b6110aa8585611995565b506000848152601560209081526040808320859055848352601882528083205487845260148352818420805460ff191660ff90921615159190911790559382526017815283822080546001019055948152601990945292209190915550565b60156020526000908152604090205481565b6000908152601b602052604090205490565b6000908152601c602052604090205490565b600581565b60009081526014602052604090205460ff1690565b611175838383602060405190810160405280600081525061153a565b505050565b60105481565b6000610b3d826119c8565b6000611195610d29565b82106111a057600080fd5b60098054839081106111ae57fe5b90600052602060002001549050919050565b60009081526015602052604090205490565b600081815260016020526040812054600160a060020a0316801515610b3d57600080fd5b60176020526000908152604090205481565b6000600160a060020a038216151561121f57600080fd5b50600160a060020a031660009081526003602052604090205490565b600c54600160a060020a0316331461125257600080fd5b600c54604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a2600c805473ffffffffffffffffffffffffffffffffffffffff19169055565b600060068214806112ba5750600782145b80610b3d57505060081490565b6000818152601c6020908152604091829020805483518184028101840190945280845260609392830182828015610c5d5760200282019190600052602060002090815481526020019060010190808311610c495750505050509050919050565b6000818152601d6020908152604091829020805483518184028101840190945280845260609392830182828015610c5d5760200282019190600052602060002090815481526020019060010190808311610c495750505050509050919050565b600a81565b600181565b600c54600160a060020a031681565b60186020526000908152604090205460ff1681565b60068054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610be15780601f10610bb657610100808354040283529160200191610be1565b60136020526000908152604090205481565b600781565b600160a060020a03821633141561144357600080fd5b336000818152600460209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b601c602052816000526040600020818154811015156114cc57fe5b90600052602060002001600091509150505481565b601b602052816000526040600020818154811015156114cc57fe5b601d602052816000526040600020818154811015156114cc57fe5b600281565b6000600982148061152d5750600a82145b80610b3d575050600b1490565b611545848484610d5e565b611551848484846119e5565b151561155c57600080fd5b50505050565b60009081526017602052604090205490565b60166020526000908152604090205481565b6060611591826119c8565b151561159c57600080fd5b6000828152600b602090815260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529091830182828015610c5d5780601f1061160457610100808354040283529160200191610c5d565b820191906000526020600020905b8154815290600101906020018083116116125750939695505050505050565b60146020526000908152604090205460ff1681565b600381565b600e5481565b60196020526000908152604090205481565b600681565b6000908152601d602052604090205490565b60408051808201909152601c81527f68747470733a2f2f7661756c742e7761727269646572732e636f6d2f00000000602082015281565b60116020526000908152604090205481565b60126020526000908152604090205481565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205460ff1690565b600c54600160a060020a0316331461171a57600080fd5b61172381611b52565b50565b600080611732836111d2565b905080600160a060020a031684600160a060020a0316148061176d575083600160a060020a031661176284610bec565b600160a060020a0316145b8061177d575061177d81856116d5565b949350505050565b81600160a060020a0316611798826111d2565b600160a060020a0316146117ab57600080fd5b600081815260026020526040902054600160a060020a0316156117f2576000818152600260205260409020805473ffffffffffffffffffffffffffffffffffffffff191690555b5050565b60008060006118058585611bd0565b600084815260086020908152604080832054600160a060020a038916845260079092529091205490935061184090600163ffffffff611c6616565b600160a060020a03861660009081526007602052604090208054919350908390811061186857fe5b90600052602060002001549050806007600087600160a060020a0316600160a060020a03168152602001908152602001600020848154811015156118a857fe5b6000918252602080832090910192909255600160a060020a03871681526007909152604090208054906118df906000198301611d89565b50600093845260086020526040808520859055908452909220555050565b60006119098383611c7d565b50600160a060020a039091166000908152600760209081526040808320805460018101825590845282842081018590559383526008909152902055565b6119508282611d0d565b600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af015550565b61199e826119c8565b15156119a957600080fd5b6000828152600b60209081526040909120825161117592840190611dad565b600090815260016020526040902054600160a060020a0316151590565b6000806119fa85600160a060020a0316611d68565b1515611a095760019150611b49565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b83811015611a9c578181015183820152602001611a84565b50505050905090810190601f168015611ac95780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015611aeb57600080fd5b505af1158015611aff573d6000803e3d6000fd5b505050506040513d6020811015611b1557600080fd5b5051600160e060020a031981167f150b7a020000000000000000000000000000000000000000000000000000000014925090505b50949350505050565b600160a060020a0381161515611b6757600080fd5b600c54604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600c805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b81600160a060020a0316611be3826111d2565b600160a060020a031614611bf657600080fd5b600160a060020a038216600090815260036020526040902054611c2090600163ffffffff611c6616565b600160a060020a03909216600090815260036020908152604080832094909455918152600190915220805473ffffffffffffffffffffffffffffffffffffffff19169055565b60008083831115611c7657600080fd5b5050900390565b600081815260016020526040902054600160a060020a031615611c9f57600080fd5b6000818152600160208181526040808420805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0388169081179091558452600390915290912054611ced91611d70565b600160a060020a0390921660009081526003602052604090209190915550565b600160a060020a0382161515611d2257600080fd5b611d2c82826118fd565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000903b1190565b600082820183811015611d8257600080fd5b9392505050565b81548183558181111561117557600083815260209020611175918101908301611e2b565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611dee57805160ff1916838001178555611e1b565b82800160010185558215611e1b579182015b82811115611e1b578251825591602001919060010190611e00565b50611e27929150611e2b565b5090565b610be991905b80821115611e275760008155600101611e315600a165627a7a72305820473b9a412b765137470a2795f1072f6b585fb45d4e9ad8b54ba1897071f676880029000000000000000000000000e6963576e14aad7743ef627b1ada417fc4c8d321
Deployed Bytecode
0x6080604052600436106102ea5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146102ef578063029bca781461032557806306f94c7d1461033d57806306fdde0314610367578063081812fc146103f1578063085ff39a14610425578063095ea7b31461048d5780630f092c44146104b357806311e847b6146104c857806318160ddd146104dd57806319fa8f50146104f25780631dbdd7921461052457806320b748f41461053957806323b872dd1461054e5780632423a088146105785780632f745c591461058d5780632fc60405146105b1578063310f4cdd146105c657806332da45bc1461063a5780633b58d5d7146106525780633c0dabdb1461066a5780633cb3ea68146106825780634060d9f51461069757806342842e0e146106af5780634d6c3427146106d95780634f558e79146106ee5780634f6ccce7146107065780635c9a7a8b1461071e5780636352211e1461073657806368f017461461074e57806370a0823114610766578063715018a61461078757806373d289951461079c5780637444b227146107b45780637c6aafd1146107cc5780637f5ba3cc146107e4578063867befba146107f95780638da5cb5b1461080e57806391bb6f521461082357806395d89b411461083b57806397e28ba514610850578063a22c81ec14610868578063a22cb4651461087d578063a3715d1d146108a3578063a3804052146108be578063ab7faa6e146108d9578063af4e4494146108f4578063b850ae3614610909578063b88d4fde14610921578063c4c68b4414610990578063c5ab6e35146109a8578063c87b56dd146109c0578063cba57e38146109d8578063cf64da7f146109f0578063d2b001fb14610a05578063d748c2e414610a1a578063d99969df14610a32578063dceda27b14610a47578063e1911d7014610a5f578063e84ac26214610a74578063e97ebd3f14610a8c578063e985e9c514610aa4578063f2fde38b14610acb575b600080fd5b3480156102fb57600080fd5b50610311600160e060020a031960043516610aec565b604080519115158252519081900360200190f35b34801561033157600080fd5b50610311600435610b0b565b34801561034957600080fd5b50610355600435610b43565b60408051918252519081900360200190f35b34801561037357600080fd5b5061037c610b55565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103b657818101518382015260200161039e565b50505050905090810190601f1680156103e35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103fd57600080fd5b50610409600435610bec565b60408051600160a060020a039092168252519081900360200190f35b34801561043157600080fd5b5061043d600435610c07565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610479578181015183820152602001610461565b505050509050019250505060405180910390f35b34801561049957600080fd5b506104b1600160a060020a0360043516602435610c69565b005b3480156104bf57600080fd5b50610355610d1f565b3480156104d457600080fd5b50610355610d24565b3480156104e957600080fd5b50610355610d29565b3480156104fe57600080fd5b50610507610d2f565b60408051600160e060020a03199092168252519081900360200190f35b34801561053057600080fd5b50610355610d53565b34801561054557600080fd5b50610355610d59565b34801561055a57600080fd5b506104b1600160a060020a0360043581169060243516604435610d5e565b34801561058457600080fd5b50610355610dec565b34801561059957600080fd5b50610355600160a060020a0360043516602435610df1565b3480156105bd57600080fd5b50610355610e3e565b3480156105d257600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526104b19583359536956044949193909101919081908401838280828437509497505084359550505060208301359260400135600160a060020a03169150610e439050565b34801561064657600080fd5b50610355600435611109565b34801561065e57600080fd5b5061035560043561111b565b34801561067657600080fd5b5061035560043561112d565b34801561068e57600080fd5b5061035561113f565b3480156106a357600080fd5b50610311600435611144565b3480156106bb57600080fd5b506104b1600160a060020a0360043581169060243516604435611159565b3480156106e557600080fd5b5061035561117a565b3480156106fa57600080fd5b50610311600435611180565b34801561071257600080fd5b5061035560043561118b565b34801561072a57600080fd5b506103556004356111c0565b34801561074257600080fd5b506104096004356111d2565b34801561075a57600080fd5b506103556004356111f6565b34801561077257600080fd5b50610355600160a060020a0360043516611208565b34801561079357600080fd5b506104b161123b565b3480156107a857600080fd5b506103116004356112a9565b3480156107c057600080fd5b5061043d6004356112c7565b3480156107d857600080fd5b5061043d600435611327565b3480156107f057600080fd5b50610355611387565b34801561080557600080fd5b5061035561138c565b34801561081a57600080fd5b50610409611391565b34801561082f57600080fd5b506103116004356113a0565b34801561084757600080fd5b5061037c6113b5565b34801561085c57600080fd5b50610355600435611416565b34801561087457600080fd5b50610355611428565b34801561088957600080fd5b506104b1600160a060020a0360043516602435151561142d565b3480156108af57600080fd5b506103556004356024356114b1565b3480156108ca57600080fd5b506103556004356024356114e1565b3480156108e557600080fd5b506103556004356024356114fc565b34801561090057600080fd5b50610355611517565b34801561091557600080fd5b5061031160043561151c565b34801561092d57600080fd5b50604080516020601f6064356004818101359283018490048402850184019095528184526104b194600160a060020a03813581169560248035909216956044359536956084940191819084018382808284375094975061153a9650505050505050565b34801561099c57600080fd5b50610355600435611562565b3480156109b457600080fd5b50610355600435611574565b3480156109cc57600080fd5b5061037c600435611586565b3480156109e457600080fd5b50610311600435611631565b3480156109fc57600080fd5b50610355611646565b348015610a1157600080fd5b5061035561164b565b348015610a2657600080fd5b50610355600435611651565b348015610a3e57600080fd5b50610355611663565b348015610a5357600080fd5b50610355600435611668565b348015610a6b57600080fd5b5061037c61167a565b348015610a8057600080fd5b506103556004356116b1565b348015610a9857600080fd5b506103556004356116c3565b348015610ab057600080fd5b50610311600160a060020a03600435811690602435166116d5565b348015610ad757600080fd5b506104b1600160a060020a0360043516611703565b600160e060020a03191660009081526020819052604090205460ff1690565b60006001821480610b1c5750600282145b80610b275750600382145b80610b325750600482145b80610b3d5750600582145b92915050565b601a6020526000908152604090205481565b60058054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610be15780601f10610bb657610100808354040283529160200191610be1565b820191906000526020600020905b815481529060010190602001808311610bc457829003601f168201915b505050505090505b90565b600090815260026020526040902054600160a060020a031690565b6000818152601b6020908152604091829020805483518184028101840190945280845260609392830182828015610c5d57602002820191906000526020600020905b815481526020019060010190808311610c49575b50505050509050919050565b6000610c74826111d2565b9050600160a060020a038381169082161415610c8f57600080fd5b33600160a060020a0382161480610cab5750610cab81336116d5565b1515610cb657600080fd5b600082815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600881565b600981565b60095490565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081565b600f5481565b600b81565b610d683382611726565b1515610d7357600080fd5b600160a060020a0382161515610d8857600080fd5b610d928382611785565b610d9c83826117f6565b610da682826118fd565b8082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b600081565b6000610dfc83611208565b8210610e0757600080fd5b600160a060020a0383166000908152600760205260409020805483908110610e2b57fe5b9060005260206000200154905092915050565b600481565b600d54600160a060020a03163314610ebc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e6f7420617574686f72697a6564000000000000000000000000000000000000604482015290519081900360640190fd5b60008381526016602090815260408083205460179092529091205410610f6957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f54686973207479706520686173207265616368656420746f74616c207375707060448201527f6c79000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000838152601a602052604090205482111561100c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f54616e6b2073697a652070726f766964656420626967676572207468616e206d60448201527f617820666f722074686973207479706500000000000000000000000000000000606482015290519081900360840190fd5b61101583610b0b565b15611040576000838152601b6020908152604082208054600181018255908352912001859055611096565b611049836112a9565b15611074576000838152601c6020908152604082208054600181018255908352912001859055611096565b6000838152601d60209081526040822080546001810182559083529120018590555b6110a08186611946565b6110aa8585611995565b506000848152601560209081526040808320859055848352601882528083205487845260148352818420805460ff191660ff90921615159190911790559382526017815283822080546001019055948152601990945292209190915550565b60156020526000908152604090205481565b6000908152601b602052604090205490565b6000908152601c602052604090205490565b600581565b60009081526014602052604090205460ff1690565b611175838383602060405190810160405280600081525061153a565b505050565b60105481565b6000610b3d826119c8565b6000611195610d29565b82106111a057600080fd5b60098054839081106111ae57fe5b90600052602060002001549050919050565b60009081526015602052604090205490565b600081815260016020526040812054600160a060020a0316801515610b3d57600080fd5b60176020526000908152604090205481565b6000600160a060020a038216151561121f57600080fd5b50600160a060020a031660009081526003602052604090205490565b600c54600160a060020a0316331461125257600080fd5b600c54604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a2600c805473ffffffffffffffffffffffffffffffffffffffff19169055565b600060068214806112ba5750600782145b80610b3d57505060081490565b6000818152601c6020908152604091829020805483518184028101840190945280845260609392830182828015610c5d5760200282019190600052602060002090815481526020019060010190808311610c495750505050509050919050565b6000818152601d6020908152604091829020805483518184028101840190945280845260609392830182828015610c5d5760200282019190600052602060002090815481526020019060010190808311610c495750505050509050919050565b600a81565b600181565b600c54600160a060020a031681565b60186020526000908152604090205460ff1681565b60068054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610be15780601f10610bb657610100808354040283529160200191610be1565b60136020526000908152604090205481565b600781565b600160a060020a03821633141561144357600080fd5b336000818152600460209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b601c602052816000526040600020818154811015156114cc57fe5b90600052602060002001600091509150505481565b601b602052816000526040600020818154811015156114cc57fe5b601d602052816000526040600020818154811015156114cc57fe5b600281565b6000600982148061152d5750600a82145b80610b3d575050600b1490565b611545848484610d5e565b611551848484846119e5565b151561155c57600080fd5b50505050565b60009081526017602052604090205490565b60166020526000908152604090205481565b6060611591826119c8565b151561159c57600080fd5b6000828152600b602090815260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529091830182828015610c5d5780601f1061160457610100808354040283529160200191610c5d565b820191906000526020600020905b8154815290600101906020018083116116125750939695505050505050565b60146020526000908152604090205460ff1681565b600381565b600e5481565b60196020526000908152604090205481565b600681565b6000908152601d602052604090205490565b60408051808201909152601c81527f68747470733a2f2f7661756c742e7761727269646572732e636f6d2f00000000602082015281565b60116020526000908152604090205481565b60126020526000908152604090205481565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205460ff1690565b600c54600160a060020a0316331461171a57600080fd5b61172381611b52565b50565b600080611732836111d2565b905080600160a060020a031684600160a060020a0316148061176d575083600160a060020a031661176284610bec565b600160a060020a0316145b8061177d575061177d81856116d5565b949350505050565b81600160a060020a0316611798826111d2565b600160a060020a0316146117ab57600080fd5b600081815260026020526040902054600160a060020a0316156117f2576000818152600260205260409020805473ffffffffffffffffffffffffffffffffffffffff191690555b5050565b60008060006118058585611bd0565b600084815260086020908152604080832054600160a060020a038916845260079092529091205490935061184090600163ffffffff611c6616565b600160a060020a03861660009081526007602052604090208054919350908390811061186857fe5b90600052602060002001549050806007600087600160a060020a0316600160a060020a03168152602001908152602001600020848154811015156118a857fe5b6000918252602080832090910192909255600160a060020a03871681526007909152604090208054906118df906000198301611d89565b50600093845260086020526040808520859055908452909220555050565b60006119098383611c7d565b50600160a060020a039091166000908152600760209081526040808320805460018101825590845282842081018590559383526008909152902055565b6119508282611d0d565b600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af015550565b61199e826119c8565b15156119a957600080fd5b6000828152600b60209081526040909120825161117592840190611dad565b600090815260016020526040902054600160a060020a0316151590565b6000806119fa85600160a060020a0316611d68565b1515611a095760019150611b49565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b83811015611a9c578181015183820152602001611a84565b50505050905090810190601f168015611ac95780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015611aeb57600080fd5b505af1158015611aff573d6000803e3d6000fd5b505050506040513d6020811015611b1557600080fd5b5051600160e060020a031981167f150b7a020000000000000000000000000000000000000000000000000000000014925090505b50949350505050565b600160a060020a0381161515611b6757600080fd5b600c54604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600c805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b81600160a060020a0316611be3826111d2565b600160a060020a031614611bf657600080fd5b600160a060020a038216600090815260036020526040902054611c2090600163ffffffff611c6616565b600160a060020a03909216600090815260036020908152604080832094909455918152600190915220805473ffffffffffffffffffffffffffffffffffffffff19169055565b60008083831115611c7657600080fd5b5050900390565b600081815260016020526040902054600160a060020a031615611c9f57600080fd5b6000818152600160208181526040808420805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0388169081179091558452600390915290912054611ced91611d70565b600160a060020a0390921660009081526003602052604090209190915550565b600160a060020a0382161515611d2257600080fd5b611d2c82826118fd565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000903b1190565b600082820183811015611d8257600080fd5b9392505050565b81548183558181111561117557600083815260209020611175918101908301611e2b565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611dee57805160ff1916838001178555611e1b565b82800160010185558215611e1b579182015b82811115611e1b578251825591602001919060010190611e00565b50611e27929150611e2b565b5090565b610be991905b80821115611e275760008155600101611e315600a165627a7a72305820473b9a412b765137470a2795f1072f6b585fb45d4e9ad8b54ba1897071f676880029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e6963576e14aad7743ef627b1ada417fc4c8d321
-----Decoded View---------------
Arg [0] : factoryAddress (address): 0xe6963576E14aAD7743ef627B1ADa417Fc4C8d321
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e6963576e14aad7743ef627b1ada417fc4c8d321
Swarm Source
bzzr://473b9a412b765137470a2795f1072f6b585fb45d4e9ad8b54ba1897071f67688
Loading...
Loading
Loading...
Loading
OVERVIEW
War Riders is the MMO game of earning cryptocurrency and blowing up cars. Use your vehicles to mine and attack enemies for Benzene.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.