Overview
TokenID
283
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ITTicket
Compiler Version
v0.4.25+commit.59dbf8f1
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-12-03 */ pragma solidity ^0.4.25; // https://github.com/OpenZeppelin/zeppelin-solidity /** * @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) { // Solidity only automatically asserts when dividing by 0 require(b > 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; } /** * @dev gives square root of given x. */ function sqrt(uint256 x) internal pure returns (uint256 y) { uint256 z = ((add(x, 1)) / 2); y = x; while (z < y) { y = z; z = ((add((x / z), z)) / 2); } } /** * @dev gives square. multiplies x by x */ function sq(uint256 x) internal pure returns (uint256) { return (mul(x, x)); } /** * @dev x to the power of y */ function pwr(uint256 x, uint256 y) internal pure returns (uint256) { if (x == 0) { return (0); } else if (y == 0) { return 1; } else { uint256 z = x; for (uint256 i = 1; i < y; i++) { z = mul(z, x); } return z; } } } /** * Utility library of inline functions on addresses */ library Address { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check * @return whether the target address is a contract */ function isContract(address account) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details about how this works. // TODO Check this again before the Serenity release, because all addresses will be // contracts then. // solium-disable-next-line security/no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } /** * @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 private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } /** * @return the address of the owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner()); _; } /** * @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns (bool) { return 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 OwnershipTransferred(_owner, address(0)); _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 Roles * @dev Library for managing addresses assigned to a Role. */ library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; } /** * @dev remove an account's access to this role */ function remove(Role storage role, address account) internal { require(account != address(0)); require(has(role, account)); role.bearer[account] = false; } /** * @dev check if an account has this role * @return bool */ function has(Role storage role, address account) internal view returns (bool) { require(account != address(0)); return role.bearer[account]; } } contract MinterRole is Ownable { using Roles for Roles.Role; event MinterAdded(address indexed account); event MinterRemoved(address indexed account); Roles.Role private _minters; constructor () internal { _addMinter(msg.sender); } modifier onlyMinter() { require(isMinter(msg.sender)); _; } function isMinter(address account) public view returns (bool) { return _minters.has(account); } function addMinter(address account) public onlyOwner { _addMinter(account); } function removeMinter(address account) public onlyOwner { _removeMinter(account); } function renounceMinter() public { _removeMinter(msg.sender); } function _addMinter(address account) internal { _minters.add(account); emit MinterAdded(account); } function _removeMinter(address account) internal { _minters.remove(account); emit MinterRemoved(account); } } contract PauserRole is Ownable { using Roles for Roles.Role; event PauserAdded(address indexed account); event PauserRemoved(address indexed account); Roles.Role private _pausers; constructor () internal { _addPauser(msg.sender); } modifier onlyPauser() { require(isPauser(msg.sender)); _; } function isPauser(address account) public view returns (bool) { return _pausers.has(account); } function addPauser(address account) public onlyOwner { _addPauser(account); } function removePauser(address account) public onlyOwner { _removePauser(account); } function renouncePauser() public { _removePauser(msg.sender); } function _addPauser(address account) internal { _pausers.add(account); emit PauserAdded(account); } function _removePauser(address account) internal { _pausers.remove(account); emit PauserRemoved(account); } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is PauserRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor () internal { _paused = false; } /** * @return true if the contract is paused, false otherwise. */ function paused() public view returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!_paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(_paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyPauser whenNotPaused { _paused = true; emit Paused(msg.sender); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyPauser whenPaused { _paused = false; emit Unpaused(msg.sender); } } contract AdminRole is Ownable { using Roles for Roles.Role; event AdminAdded(address indexed account); event AdminRemoved(address indexed account); Roles.Role private _admins; constructor () internal { _addAdmin(msg.sender); } modifier onlyAdmin() { require(isAdmin(msg.sender)); _; } function isAdmin(address account) public view returns (bool) { return _admins.has(account); } function addAdmin(address account) public onlyOwner { _addAdmin(account); } function removeAdmin(address account) public onlyOwner { _removeAdmin(account); } function renounceAdmin() public { _removeAdmin(msg.sender); } function _addAdmin(address account) internal { _admins.add(account); emit AdminAdded(account); } function _removeAdmin(address account) internal { _admins.remove(account); emit AdminRemoved(account); } } contract CommonConfig { uint32 constant public SECONDS_PER_DAY = 5 * 60; //fix me 测试时间修改为5分钟 //86400; uint32 constant public BASE_RATIO = 10000; } /** * @title IERC165 * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md */ interface IERC165 { /** * @notice Query if a contract implements an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function * uses less than 30,000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } /** * @title ERC165 * @author Matt Condon (@shrugs) * @dev Implements ERC165 using a lookup table. */ contract ERC165 is IERC165 { bytes4 private constant _InterfaceId_ERC165 = 0x01ffc9a7; /** * 0x01ffc9a7 === * bytes4(keccak256('supportsInterface(bytes4)')) */ /** * @dev a mapping of interface id to whether or not it's supported */ mapping(bytes4 => bool) private _supportedInterfaces; /** * @dev A contract implementing SupportsInterfaceWithLookup * implement ERC165 itself */ constructor () internal { _registerInterface(_InterfaceId_ERC165); } /** * @dev implement supportsInterface(bytes4) using a lookup table */ function supportsInterface(bytes4 interfaceId) external view returns (bool) { return _supportedInterfaces[interfaceId]; } /** * @dev internal method for registering an interface */ function _registerInterface(bytes4 interfaceId) internal { require(interfaceId != 0xffffffff); _supportedInterfaces[interfaceId] = true; } } /** * @title ERC721 Non-Fungible Token Standard basic interface * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) public view returns (uint256 balance); function ownerOf(uint256 tokenId) public view returns (address owner); function approve(address to, uint256 tokenId) public; function getApproved(uint256 tokenId) public view returns (address operator); function setApprovalForAll(address operator, bool _approved) public; function isApprovedForAll(address owner, address operator) public view returns (bool); function transferFrom(address from, address to, uint256 tokenId) public; function safeTransferFrom(address from, address to, uint256 tokenId) public; function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) public; } /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ contract IERC721Receiver { /** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a `safeTransfer`. This function MUST return the function selector, * otherwise the caller will revert the transaction. The selector to be * returned can be obtained as `this.onERC721Received.selector`. This * function MAY throw to revert and reject the transfer. * Note: the ERC721 contract address is always the message sender. * @param operator The address which called `safeTransferFrom` function * @param from The address which previously owned the token * @param tokenId The NFT identifier which is being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` */ function onERC721Received(address operator, address from, uint256 tokenId, bytes data) public returns (bytes4); } contract ERC721Holder is IERC721Receiver { function onERC721Received(address, address, uint256, bytes) public returns (bytes4) { return this.onERC721Received.selector; } } /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract IERC721Enumerable is IERC721 { function totalSupply() public view returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256 tokenId); function tokenByIndex(uint256 index) public view returns (uint256); } /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract IERC721Metadata is IERC721 { function name() external view returns (string); function symbol() external view returns (string); function tokenURI(uint256 tokenId) external 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 IERC721Full is IERC721, IERC721Enumerable, IERC721Metadata { } /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; // Mapping from token ID to owner mapping (uint256 => address) private _tokenOwner; // Mapping from token ID to approved address mapping (uint256 => address) private _tokenApprovals; // Mapping from owner to number of owned token mapping (address => uint256) private _ownedTokensCount; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) private _operatorApprovals; bytes4 private constant _InterfaceId_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ * bytes4(keccak256('getApproved(uint256)')) ^ * bytes4(keccak256('setApprovalForAll(address,bool)')) ^ * bytes4(keccak256('isApprovedForAll(address,address)')) ^ * bytes4(keccak256('transferFrom(address,address,uint256)')) ^ * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) ^ * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) */ constructor () public { // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(_InterfaceId_ERC721); } /** * @dev Gets the balance of the specified address * @param owner address to query the balance of * @return uint256 representing the amount owned by the passed address */ function balanceOf(address owner) public view returns (uint256) { require(owner != address(0)); return _ownedTokensCount[owner]; } /** * @dev Gets the owner of the specified token ID * @param tokenId uint256 ID of the token to query the owner of * @return owner address currently marked as the owner of the given token ID */ function ownerOf(uint256 tokenId) public view returns (address) { address owner = _tokenOwner[tokenId]; require(owner != address(0)); return owner; } /** * @dev Approves another address to transfer the given token ID * The zero address indicates there is no approved address. * There can only be one approved address per token at a given time. * Can only be called by the token owner or an approved operator. * @param to address to be approved for the given token ID * @param tokenId uint256 ID of the token to be approved */ function approve(address to, uint256 tokenId) public { address owner = ownerOf(tokenId); require(to != owner); require(msg.sender == owner || isApprovedForAll(owner, msg.sender)); _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Gets the approved address for a token ID, or zero if no address set * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to query the approval of * @return address currently approved for the given token ID */ function getApproved(uint256 tokenId) public view returns (address) { require(_exists(tokenId)); return _tokenApprovals[tokenId]; } /** * @dev Sets or unsets the approval of a given operator * An operator is allowed to transfer all tokens of the sender on their behalf * @param to operator address to set the approval * @param approved representing the status of the approval to be set */ function setApprovalForAll(address to, bool approved) public { require(to != msg.sender); _operatorApprovals[msg.sender][to] = approved; emit ApprovalForAll(msg.sender, to, approved); } /** * @dev Tells whether an operator is approved by a given owner * @param owner owner address which you want to query the approval of * @param operator operator address which you want to query the approval of * @return bool whether the given operator is approved by the given owner */ function isApprovedForAll(address owner, address operator) public view returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Transfers the ownership of a given token ID to another address * Usage of this method is discouraged, use `safeTransferFrom` whenever possible * Requires the msg sender to be the owner, approved, or operator * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred */ function transferFrom(address from, address to, uint256 tokenId) public { require(_isApprovedOrOwner(msg.sender, tokenId)); require(to != address(0)); _clearApproval(from, tokenId); _removeTokenFrom(from, tokenId); _addTokenTo(to, tokenId); emit Transfer(from, to, tokenId); } /** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * * Requires the msg sender to be the owner, approved, or operator * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred */ function safeTransferFrom(address from, address to, uint256 tokenId) public { // solium-disable-next-line arg-overflow safeTransferFrom(from, to, tokenId, ""); } /** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * Requires the msg sender to be the owner, approved, or operator * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred * @param _data bytes data to send along with a safe transfer check */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes _data) public { transferFrom(from, to, tokenId); // solium-disable-next-line arg-overflow require(_checkOnERC721Received(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 add a token ID to the list of a given address * Note that this function is left internal to make ERC721Enumerable possible, but is not * intended to be called by custom derived contracts: in particular, it emits no Transfer event. * @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 * Note that this function is left internal to make ERC721Enumerable possible, but is not * intended to be called by custom derived contracts: in particular, it emits no Transfer event, * and doesn't clear approvals. * @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 _checkOnERC721Received(address from, address to, uint256 tokenId, bytes _data) internal returns (bool) { if (!to.isContract()) { return true; } bytes4 retval = IERC721Receiver(to).onERC721Received(msg.sender, from, tokenId, _data); return (retval == _ERC721_RECEIVED); } /** * @dev Private 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) private { require(ownerOf(tokenId) == owner); if (_tokenApprovals[tokenId] != address(0)) { _tokenApprovals[tokenId] = address(0); } } } contract ERC721Metadata is ERC165, ERC721, IERC721Metadata { // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f; /** * 0x5b5e139f === * bytes4(keccak256('name()')) ^ * bytes4(keccak256('symbol()')) ^ * bytes4(keccak256('tokenURI(uint256)')) */ /** * @dev Constructor function */ constructor (string name, string symbol) public { _name = name; _symbol = symbol; // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(InterfaceId_ERC721Metadata); } /** * @dev Gets the token name * @return string representing the token name */ function name() external view returns (string) { return _name; } /** * @dev Gets the token symbol * @return string representing the token symbol */ function symbol() external view returns (string) { return _symbol; } /** * @dev Returns an URI for a given token ID * Throws if the token ID does not exist. May return an empty string. * @param tokenId uint256 ID of the token to query */ function tokenURI(uint256 tokenId) external view returns (string) { require(_exists(tokenId)); return _tokenURIs[tokenId]; } /** * @dev Internal function to set the token URI for a given token * Reverts if the token ID does not exist * @param tokenId uint256 ID of the token to set its URI * @param uri string URI to assign */ function _setTokenURI(uint256 tokenId, string uri) internal { require(_exists(tokenId)); _tokenURIs[tokenId] = uri; } /** * @dev Internal function to burn a specific token * Reverts if the token does not exist * @param owner owner of the token to burn * @param tokenId uint256 ID of the token being burned by the msg.sender */ function _burn(address owner, uint256 tokenId) internal { super._burn(owner, tokenId); // Clear metadata (if any) if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } } /** * @title ERC-721 Non-Fungible Token with optional enumeration extension logic * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721Enumerable is ERC165, ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => uint256[]) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; bytes4 private constant _InterfaceId_ERC721Enumerable = 0x780e9d63; /** * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('tokenByIndex(uint256)')) */ /** * @dev Constructor function */ constructor () public { // register the supported interface to conform to ERC721 via ERC165 _registerInterface(_InterfaceId_ERC721Enumerable); } /** * @dev Gets the token ID at a given index of the tokens list of the requested owner * @param owner address owning the tokens list to be accessed * @param index uint256 representing the index to be accessed of the requested tokens list * @return uint256 token ID at the given index of the tokens list owned by the requested address */ function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) { require(index < balanceOf(owner)); return _ownedTokens[owner][index]; } /** * @dev Gets the total amount of tokens stored by the contract * @return uint256 representing the total amount of tokens */ function totalSupply() public view returns (uint256) { return _allTokens.length; } /** * @dev Gets the token ID at a given index of all the tokens in this contract * Reverts if the index is greater or equal to the total number of tokens * @param index uint256 representing the index to be accessed of the tokens list * @return uint256 token ID at the given index of the tokens list */ function tokenByIndex(uint256 index) public view returns (uint256) { require(index < totalSupply()); return _allTokens[index]; } /** * @dev Internal function to add a token ID to the list of a given address * This function is internal due to language limitations, see the note in ERC721.sol. * It is not intended to be called by custom derived contracts: in particular, it emits no Transfer event. * @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 * This function is internal due to language limitations, see the note in ERC721.sol. * It is not intended to be called by custom derived contracts: in particular, it emits no Transfer event, * and doesn't clear approvals. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFrom(address from, uint256 tokenId) internal { super._removeTokenFrom(from, tokenId); // To prevent a gap in the array, we store the last token in the index of the token to delete, and // then delete the last slot. uint256 tokenIndex = _ownedTokensIndex[tokenId]; uint256 lastTokenIndex = _ownedTokens[from].length.sub(1); uint256 lastToken = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastToken; // This also deletes the contents at the last position of the array _ownedTokens[from].length--; // Note that this will handle single-element arrays. In that case, both tokenIndex and lastTokenIndex are going to // be zero. Then we can make sure that we will remove tokenId from the ownedTokens list since we are first swapping // the lastToken to the first position, and then dropping the element placed in the last position of the list _ownedTokensIndex[tokenId] = 0; _ownedTokensIndex[lastToken] = tokenIndex; } /** * @dev Internal function to mint a new token * Reverts if the given token ID already exists * @param to address the beneficiary that will own the minted token * @param tokenId uint256 ID of the token to be minted by the msg.sender */ function _mint(address to, uint256 tokenId) internal { super._mint(to, tokenId); _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Internal function to burn a specific token * Reverts if the token does not exist * @param owner owner of the token to burn * @param tokenId uint256 ID of the token being burned by the msg.sender */ function _burn(address owner, uint256 tokenId) internal { super._burn(owner, tokenId); // Reorg all tokens array uint256 tokenIndex = _allTokensIndex[tokenId]; uint256 lastTokenIndex = _allTokens.length.sub(1); uint256 lastToken = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastToken; _allTokens[lastTokenIndex] = 0; _allTokens.length--; _allTokensIndex[tokenId] = 0; _allTokensIndex[lastToken] = tokenIndex; } } /** * @title Full ERC721 Token * This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ contract ERC721Full is ERC721, ERC721Enumerable, ERC721Metadata { constructor (string name, string symbol) ERC721Metadata(name, symbol) public {} } contract ITTicket is ERC721Full, AdminRole, Pausable { using SafeMath for uint256; using SafeMath for uint32; using Address for address; enum TICKET_TYPE { TICKET_TYPE_NULL, TICKET_TYPE_NORMAL, TICKET_TYPE_RARE, TICKET_TYPE_LEGENDARY } struct TicketHashInfo { address key; TICKET_TYPE ticketType; bool exchange; } struct TicketInfo { TICKET_TYPE ticketType; uint8 ticketFlag; } mapping(uint256 => TicketHashInfo) public _ticketHashMap; mapping(uint256 => TicketInfo) public _ticketMap; uint256 public _curTicketId; uint256 public _normalPrice; uint256 public _rarePrice; uint256 public _legendaryPrice; uint32 public _sellNormalTicketCount; uint32 public _rareTicketCount; uint32 public _legendaryTicketCount; uint32 public _baseAddRatio; uint32 public _rareAddCount; uint32 public _legendaryAddCount; uint8 public _ticketFlag; constructor() ERC721Full("ImperialThrone Ticket", "ITTK") public { _curTicketId = 1; _normalPrice = 0.01 ether; _rarePrice = 0.1 ether; _legendaryPrice = 1 ether; _rareTicketCount = 90; _legendaryTicketCount = 10; _baseAddRatio = 90; _rareAddCount = 9; _legendaryAddCount = 1; _ticketFlag = 1; } function setNormalTicketPrice(uint256 price) external onlyAdmin { _normalPrice = price; } function setRareTicketPrice(uint256 price) external onlyAdmin { _rarePrice = price; } function setLegendaryTicketPrice(uint256 price) external onlyAdmin { _legendaryPrice = price; } function setRareTicketCount(uint32 count) external onlyAdmin { _rareTicketCount = count; } function setLegendaryTicketCount(uint32 count) external onlyAdmin { _legendaryTicketCount = count; } function setBaseAddRatio(uint32 ratio) external onlyAdmin { _baseAddRatio = ratio; } function setRareAddCount(uint32 count) external onlyAdmin { _rareAddCount = count; } function setLegendaryAddCount(uint32 count) external onlyAdmin { _legendaryAddCount = count; } function setTicketFlag(uint8 flag) external onlyAdmin { _ticketFlag = flag; } function getHashExchangeState(uint256 id) external view returns(bool) { TicketHashInfo storage hashInfo = _ticketHashMap[id]; return hashInfo.exchange; } function getTicketInfo(uint256 ticketId) external view returns(TICKET_TYPE ticketType, uint8 ticketFlag) { TicketInfo storage ticketInfo = _ticketMap[ticketId]; ticketType = ticketInfo.ticketType; ticketFlag = ticketInfo.ticketFlag; } event AddTicketHash(uint256 id); function _addTicketHash(uint256 id, address key, TICKET_TYPE ticketType) internal { require(ticketType >= TICKET_TYPE.TICKET_TYPE_NORMAL && ticketType <= TICKET_TYPE.TICKET_TYPE_LEGENDARY); TicketHashInfo storage hashInfo = _ticketHashMap[id]; require(hashInfo.ticketType == TICKET_TYPE.TICKET_TYPE_NULL); hashInfo.key = key; hashInfo.ticketType = ticketType; hashInfo.exchange = false; emit AddTicketHash(id); } function addTicketHashList(uint256[] idList, address[] keyList, TICKET_TYPE[] ticketTypeList) external onlyAdmin { require(idList.length == keyList.length); require(idList.length == ticketTypeList.length); for(uint32 i = 0; i < idList.length; ++i) { _addTicketHash(idList[i], keyList[i], ticketTypeList[i]); } } function addTicketHash(uint256 id, address key, TICKET_TYPE ticketType) external onlyAdmin { _addTicketHash(id, key, ticketType); } function verifyOwnerTicket(uint256 id, uint8 v, bytes32 r, bytes32 s) external view returns(bool) { TicketHashInfo storage hashInfo = _ticketHashMap[id]; require(hashInfo.ticketType >= TICKET_TYPE.TICKET_TYPE_NORMAL && hashInfo.ticketType <= TICKET_TYPE.TICKET_TYPE_LEGENDARY); require(hashInfo.exchange == false); require(ecrecover(keccak256(abi.encodePacked(msg.sender)), v, r, s) == hashInfo.key); require(_ticketMap[_curTicketId].ticketType == TICKET_TYPE.TICKET_TYPE_NULL); return true; } event ExchangeOwnerTicket(uint8 indexed channelId, address owner, uint256 id, uint256 ticketId, TICKET_TYPE ticketType); function _addOwnerTicket(uint8 channelId, address owner, uint256 id, uint8 v, bytes32 r, bytes32 s) internal { TicketHashInfo storage hashInfo = _ticketHashMap[id]; require(hashInfo.ticketType >= TICKET_TYPE.TICKET_TYPE_NORMAL && hashInfo.ticketType <= TICKET_TYPE.TICKET_TYPE_LEGENDARY); require(hashInfo.exchange == false); require(ecrecover(keccak256(abi.encodePacked(owner)), v, r, s) == hashInfo.key); require(_ticketMap[_curTicketId].ticketType == TICKET_TYPE.TICKET_TYPE_NULL); //add ticket _mint(owner, _curTicketId); hashInfo.exchange = true; _ticketMap[_curTicketId].ticketType = hashInfo.ticketType; emit ExchangeOwnerTicket(channelId, owner, id, _curTicketId, hashInfo.ticketType); _curTicketId++; } function exchangeOwnerTicket(uint8 channelId, uint256 id, uint8 v, bytes32 r, bytes32 s) external { _addOwnerTicket(channelId, msg.sender, id, v, r, s); } event BuyTicket(uint8 indexed channelId, address owner, TICKET_TYPE ticket_type); function buyTicket(uint8 channelId, TICKET_TYPE ticketType) public payable whenNotPaused { require(ticketType >= TICKET_TYPE.TICKET_TYPE_NORMAL && ticketType <= TICKET_TYPE.TICKET_TYPE_LEGENDARY); if(ticketType == TICKET_TYPE.TICKET_TYPE_NORMAL) { require(msg.value == _normalPrice); _sellNormalTicketCount++; if(_sellNormalTicketCount.div(_baseAddRatio) > 0 && _sellNormalTicketCount % _baseAddRatio == 0) { _rareTicketCount = uint32(_rareTicketCount.add(_rareAddCount)); _legendaryTicketCount = uint32(_legendaryTicketCount.add(_legendaryAddCount)); } } else if(ticketType == TICKET_TYPE.TICKET_TYPE_RARE) { require(_rareTicketCount > 0); require(msg.value == _rarePrice); _rareTicketCount--; } else if(ticketType == TICKET_TYPE.TICKET_TYPE_LEGENDARY) { require(_legendaryTicketCount > 0); require(msg.value == _legendaryPrice); _legendaryTicketCount--; } //add ticket _mint(msg.sender, _curTicketId); _ticketMap[_curTicketId].ticketType = ticketType; _ticketMap[_curTicketId].ticketFlag = _ticketFlag; _curTicketId++; emit BuyTicket(channelId, msg.sender, ticketType); } function withdrawETH(uint256 count) external onlyOwner { require(count <= address(this).balance); msg.sender.transfer(count); } }
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":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_legendaryTicketCount","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"count","type":"uint32"}],"name":"setLegendaryTicketCount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"_ticketHashMap","outputs":[{"name":"key","type":"address"},{"name":"ticketType","type":"uint8"},{"name":"exchange","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"removeAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_rarePrice","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":"account","type":"address"}],"name":"isAdmin","outputs":[{"name":"","type":"bool"}],"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":"id","type":"uint256"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"verifyOwnerTicket","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"count","type":"uint32"}],"name":"setRareAddCount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isPauser","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"getHashExchangeState","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":false,"inputs":[{"name":"count","type":"uint32"}],"name":"setLegendaryAddCount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_ticketFlag","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"price","type":"uint256"}],"name":"setNormalTicketPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"count","type":"uint32"}],"name":"setRareTicketCount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"ratio","type":"uint32"}],"name":"setBaseAddRatio","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"removePauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renouncePauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"channelId","type":"uint8"},{"name":"ticketType","type":"uint8"}],"name":"buyTicket","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"channelId","type":"uint8"},{"name":"id","type":"uint256"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"exchangeOwnerTicket","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"_rareAddCount","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addPauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"flag","type":"uint8"}],"name":"setTicketFlag","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"idList","type":"uint256[]"},{"name":"keyList","type":"address[]"},{"name":"ticketTypeList","type":"uint8[]"}],"name":"addTicketHashList","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_normalPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_legendaryAddCount","outputs":[{"name":"","type":"uint32"}],"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":"_ticketMap","outputs":[{"name":"ticketType","type":"uint8"},{"name":"ticketFlag","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_curTicketId","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":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"price","type":"uint256"}],"name":"setRareTicketPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"_legendaryPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"price","type":"uint256"}],"name":"setLegendaryTicketPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_sellNormalTicketCount","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_baseAddRatio","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_rareTicketCount","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"key","type":"address"},{"name":"ticketType","type":"uint8"}],"name":"addTicketHash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"count","type":"uint256"}],"name":"withdrawETH","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"ticketId","type":"uint256"}],"name":"getTicketInfo","outputs":[{"name":"ticketType","type":"uint8"},{"name":"ticketFlag","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"uint256"}],"name":"AddTicketHash","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"channelId","type":"uint8"},{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"id","type":"uint256"},{"indexed":false,"name":"ticketId","type":"uint256"},{"indexed":false,"name":"ticketType","type":"uint8"}],"name":"ExchangeOwnerTicket","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"channelId","type":"uint8"},{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"ticket_type","type":"uint8"}],"name":"BuyTicket","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"AdminAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"AdminRemoved","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
60806040523480156200001157600080fd5b50604080518082018252601581527f496d70657269616c5468726f6e65205469636b657400000000000000000000006020808301919091528251808401909352600483527f4954544b0000000000000000000000000000000000000000000000000000000090830152908181620000b17f01ffc9a700000000000000000000000000000000000000000000000000000000640100000000620002e3810204565b620000e57f80ac58cd00000000000000000000000000000000000000000000000000000000640100000000620002e3810204565b620001197f780e9d6300000000000000000000000000000000000000000000000000000000640100000000620002e3810204565b81516200012e90600990602085019062000487565b5080516200014490600a90602084019062000487565b50620001797f5b5e139f00000000000000000000000000000000000000000000000000000000640100000000620002e3810204565b5050600c8054600160a060020a031916331790819055604051600160a060020a03919091169250600091507f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3620001dd3364010000000062000350810204565b620001f133640100000000620003a2810204565b600f805460ff191690556001601255662386f26fc1000060135567016345785d8a0000601455670de0b6b3a76400006015556016805478010000000000000000000000000000000000000000000000007401000000000000000000000000000000000000000067ffffffff0000000019909216645a0000000017604060020a63ffffffff021916680a000000000000000017606060020a63ffffffff0219166c5a00000000000000000000000017608060020a63ffffffff0219167009000000000000000000000000000000001760a060020a63ffffffff0219169190911760c060020a60ff0219161790556200052c565b7fffffffff0000000000000000000000000000000000000000000000000000000080821614156200031357600080fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152602081905260409020805460ff19166001179055565b6200036b600d8264010000000062002781620003f482021704565b604051600160a060020a038216907f44d6d25963f097ad14f29f06854a01f575648a1ef82f30e562ccd3889717e33990600090a250565b620003bd600e8264010000000062002781620003f482021704565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a03811615156200040a57600080fd5b6200041f82826401000000006200044f810204565b156200042a57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a03821615156200046757600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004ca57805160ff1916838001178555620004fa565b82800160010185558215620004fa579182015b82811115620004fa578251825591602001919060010190620004dd565b50620005089291506200050c565b5090565b6200052991905b8082111562000508576000815560010162000513565b90565b612840806200053c6000396000f3006080604052600436106102d45763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146102d957806306fdde0314610324578063080c7f72146103ae578063081812fc146103dc578063095ea7b3146104105780630f6d5e121461043657806310cb4765146104545780631785f53c146104a857806318160ddd146104c95780632168a82e146104f057806323b872dd1461050557806324d7806c1461052f5780632f745c591461055057806337584061146105745780633aa209ac146105985780633f4ba83a146105b657806342842e0e146105cb57806346fbf68e146105f557806349dc4d2c146106165780634f6ccce71461062e5780635022653d146106465780635c975abb146106645780635f452307146106795780636352211e146106a4578063641c2889146106bc57806366bb8f01146106d457806368de03b9146106f25780636b2c0f55146107105780636ef8d66d14610731578063700662cd14610746578063704802751461075a57806370a082311461077b578063715018a61461079c5780637e320921146107b157806382cdb10e146107dc57806382dc1ec4146107f15780638456cb59146108125780638bad0c0a146108275780638da5cb5b1461083c5780638f32d59b14610851578063930c06b814610866578063934f8f431461088157806395d89b41146108b95780639b7d2851146108ce578063a20e8fdf146108e3578063a22cb465146108f8578063ac6dfbc11461091e578063b789ec3d14610967578063b88d4fde1461097c578063b90bece9146109eb578063c4efaf7814610a03578063c5fec09414610a18578063c87b56dd14610a30578063cc9f2e0c14610a48578063e8d1be6114610a5d578063e985e9c514610a72578063e9b201ad14610a99578063eb1a03a514610aae578063f14210a614610ad8578063f2fde38b14610af0578063ff99a06314610b11575b600080fd5b3480156102e557600080fd5b506103107bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1960043516610b29565b604080519115158252519081900360200190f35b34801561033057600080fd5b50610339610b5d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561037357818101518382015260200161035b565b50505050905090810190601f1680156103a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103ba57600080fd5b506103c3610bf4565b6040805163ffffffff9092168252519081900360200190f35b3480156103e857600080fd5b506103f4600435610c0c565b60408051600160a060020a039092168252519081900360200190f35b34801561041c57600080fd5b50610434600160a060020a0360043516602435610c3e565b005b34801561044257600080fd5b5061043463ffffffff60043516610ce7565b34801561046057600080fd5b5061046c600435610d2b565b604051600160a060020a03841681526020810183600381111561048b57fe5b60ff16815291151560208301525060408051918290030192509050f35b3480156104b457600080fd5b50610434600160a060020a0360043516610d5c565b3480156104d557600080fd5b506104de610d7b565b60408051918252519081900360200190f35b3480156104fc57600080fd5b506104de610d81565b34801561051157600080fd5b50610434600160a060020a0360043581169060243516604435610d87565b34801561053b57600080fd5b50610310600160a060020a0360043516610e15565b34801561055c57600080fd5b506104de600160a060020a0360043516602435610e2e565b34801561058057600080fd5b5061031060043560ff60243516604435606435610e7b565b3480156105a457600080fd5b5061043463ffffffff60043516611028565b3480156105c257600080fd5b5061043461107c565b3480156105d757600080fd5b50610434600160a060020a03600435811690602435166044356110e0565b34801561060157600080fd5b50610310600160a060020a0360043516611101565b34801561062257600080fd5b50610310600435611114565b34801561063a57600080fd5b506104de600435611130565b34801561065257600080fd5b5061043463ffffffff60043516611165565b34801561067057600080fd5b506103106111b0565b34801561068557600080fd5b5061068e6111b9565b6040805160ff9092168252519081900360200190f35b3480156106b057600080fd5b506103f46004356111de565b3480156106c857600080fd5b50610434600435611202565b3480156106e057600080fd5b5061043463ffffffff6004351661121b565b3480156106fe57600080fd5b5061043463ffffffff60043516611257565b34801561071c57600080fd5b50610434600160a060020a03600435166112a3565b34801561073d57600080fd5b506104346112bf565b61043460ff600435811690602435166112ca565b34801561076657600080fd5b50610434600160a060020a036004351661161a565b34801561078757600080fd5b506104de600160a060020a0360043516611636565b3480156107a857600080fd5b50610434611669565b3480156107bd57600080fd5b5061043460ff60043581169060243590604435166064356084356116c6565b3480156107e857600080fd5b506103c36116db565b3480156107fd57600080fd5b50610434600160a060020a03600435166116fb565b34801561081e57600080fd5b50610434611717565b34801561083357600080fd5b5061043461177d565b34801561084857600080fd5b506103f4611786565b34801561085d57600080fd5b50610310611795565b34801561087257600080fd5b5061043460ff600435166117a6565b34801561088d57600080fd5b506104346024600480358281019290820135918135808301929082013591604435918201910135611804565b3480156108c557600080fd5b506103396118c5565b3480156108da57600080fd5b506104de611926565b3480156108ef57600080fd5b506103c361192c565b34801561090457600080fd5b50610434600160a060020a0360043516602435151561193f565b34801561092a57600080fd5b506109366004356119c3565b6040518083600381111561094657fe5b60ff1681526020018260ff1660ff1681526020019250505060405180910390f35b34801561097357600080fd5b506104de6119e1565b34801561098857600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261043494600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506119e79650505050505050565b3480156109f757600080fd5b50610434600435611a0f565b348015610a0f57600080fd5b506104de611a28565b348015610a2457600080fd5b50610434600435611a2e565b348015610a3c57600080fd5b50610339600435611a47565b348015610a5457600080fd5b506103c3611afc565b348015610a6957600080fd5b506103c3611b08565b348015610a7e57600080fd5b50610310600160a060020a0360043581169060243516611b24565b348015610aa557600080fd5b506103c3611b52565b348015610aba57600080fd5b50610434600435600160a060020a036024351660ff60443516611b66565b348015610ae457600080fd5b50610434600435611b85565b348015610afc57600080fd5b50610434600160a060020a0360043516611bd7565b348015610b1d57600080fd5b50610936600435611bf3565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660009081526020819052604090205460ff1690565b60098054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610be95780601f10610bbe57610100808354040283529160200191610be9565b820191906000526020600020905b815481529060010190602001808311610bcc57829003601f168201915b505050505090505b90565b60165468010000000000000000900463ffffffff1681565b6000610c1782611c12565b1515610c2257600080fd5b50600090815260026020526040902054600160a060020a031690565b6000610c49826111de565b9050600160a060020a038381169082161415610c6457600080fd5b33600160a060020a0382161480610c805750610c808133611b24565b1515610c8b57600080fd5b6000828152600260205260408082208054600160a060020a031916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610cf033610e15565b1515610cfb57600080fd5b6016805463ffffffff90921668010000000000000000026bffffffff000000000000000019909216919091179055565b601060205260009081526040902054600160a060020a0381169060ff60a060020a820481169160a860020a90041683565b610d64611795565b1515610d6f57600080fd5b610d7881611c2f565b50565b60075490565b60145481565b610d913382611c77565b1515610d9c57600080fd5b600160a060020a0382161515610db157600080fd5b610dbb8382611cd6565b610dc58382611d38565b610dcf8282611e3f565b8082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000610e28600d8363ffffffff611e8816565b92915050565b6000610e3983611636565b8210610e4457600080fd5b600160a060020a0383166000908152600560205260409020805483908110610e6857fe5b9060005260206000200154905092915050565b60008481526010602052604081206001815460a060020a900460ff166003811115610ea257fe5b10158015610ec757506003815460a060020a900460ff166003811115610ec457fe5b11155b1515610ed257600080fd5b805460a860020a900460ff1615610ee857600080fd5b8054604080516c010000000000000000000000003302602080830191909152825180830360140181526034909201928390528151600160a060020a0390941693600193918291908401908083835b60208310610f555780518252601f199092019160209182019101610f36565b51815160209384036101000a60001901801990921691161790526040805192909401829003822060008084528383018087529190915260ff8e1683860152606083018d9052608083018c9052935160a08084019750919550601f1981019492819003909101925090865af1158015610fd1573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610ff057600080fd5b60125460009081526011602052604081205460ff16600381111561101057fe5b1461101a57600080fd5b600191505b50949350505050565b61103133610e15565b151561103c57600080fd5b6016805463ffffffff9092167001000000000000000000000000000000000273ffffffff0000000000000000000000000000000019909216919091179055565b61108533611101565b151561109057600080fd5b600f5460ff1615156110a157600080fd5b600f805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b6110fc83838360206040519081016040528060008152506119e7565b505050565b6000610e28600e8363ffffffff611e8816565b60009081526010602052604090205460a860020a900460ff1690565b600061113a610d7b565b821061114557600080fd5b600780548390811061115357fe5b90600052602060002001549050919050565b61116e33610e15565b151561117957600080fd5b6016805463ffffffff90921660a060020a0277ffffffff000000000000000000000000000000000000000019909216919091179055565b600f5460ff1690565b6016547801000000000000000000000000000000000000000000000000900460ff1681565b600081815260016020526040812054600160a060020a0316801515610e2857600080fd5b61120b33610e15565b151561121657600080fd5b601355565b61122433610e15565b151561122f57600080fd5b6016805463ffffffff9092166401000000000267ffffffff0000000019909216919091179055565b61126033610e15565b151561126b57600080fd5b6016805463ffffffff9092166c01000000000000000000000000026fffffffff00000000000000000000000019909216919091179055565b6112ab611795565b15156112b657600080fd5b610d7881611ebf565b6112c833611ebf565b565b600f5460ff16156112da57600080fd5b60018160038111156112e857fe5b10158015611302575060038160038111156112ff57fe5b11155b151561130d57600080fd5b600181600381111561131b57fe5b141561144e57601354341461132f57600080fd5b6016805463ffffffff198116600163ffffffff928316018216179182905560009161137191818116916c010000000000000000000000009004811690611f0716565b1180156113a9575060165463ffffffff6c0100000000000000000000000082048116911681151561139e57fe5b0663ffffffff166000145b15611449576016546113e29063ffffffff64010000000082048116917001000000000000000000000000000000009004811690611f2a16565b6016805467ffffffff00000000191664010000000063ffffffff9384160217908190556114289168010000000000000000820481169160a060020a9004811690611f2a16565b601660086101000a81548163ffffffff021916908363ffffffff1602179055505b61153a565b600281600381111561145c57fe5b14156114c057601654600064010000000090910463ffffffff161161148057600080fd5b601454341461148e57600080fd5b6016805460001963ffffffff640100000000808404821692909201160267ffffffff000000001990911617905561153a565b60038160038111156114ce57fe5b141561153a5760165460006801000000000000000090910463ffffffff16116114f657600080fd5b601554341461150457600080fd5b6016805460001963ffffffff6801000000000000000080840482169290920116026bffffffff0000000000000000199091161790555b61154633601254611f43565b6012546000908152601160205260409020805482919060ff1916600183600381111561156e57fe5b021790555060165460128054600090815260116020908152604091829020805460ff780100000000000000000000000000000000000000000000000090960486166101000261ff001990911617905582546001019092555133808252928516927fe645d62f5ce95c40ef0ed49325a0a29aa1e8821dd852d0cfa87e02c221e27a5d9290918591810182600381111561160257fe5b60ff1681526020019250505060405180910390a25050565b611622611795565b151561162d57600080fd5b610d7881611f92565b6000600160a060020a038216151561164d57600080fd5b50600160a060020a031660009081526003602052604090205490565b611671611795565b151561167c57600080fd5b600c54604051600091600160a060020a0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600c8054600160a060020a0319169055565b6116d4853386868686611fda565b5050505050565b601654700100000000000000000000000000000000900463ffffffff1681565b611703611795565b151561170e57600080fd5b610d7881612279565b61172033611101565b151561172b57600080fd5b600f5460ff161561173b57600080fd5b600f805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b6112c833611c2f565b600c54600160a060020a031690565b600c54600160a060020a0316331490565b6117af33610e15565b15156117ba57600080fd5b6016805460ff90921678010000000000000000000000000000000000000000000000000278ff00000000000000000000000000000000000000000000000019909216919091179055565b600061180f33610e15565b151561181a57600080fd5b85841461182657600080fd5b85821461183257600080fd5b5060005b63ffffffff81168611156118bc576118b4878763ffffffff841681811061185957fe5b9050602002013586868463ffffffff16818110151561187457fe5b90506020020135600160a060020a031685858563ffffffff16818110151561189857fe5b905060200201356003811180156118ae57600080fd5b506122c1565b600101611836565b50505050505050565b600a8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610be95780601f10610bbe57610100808354040283529160200191610be9565b60135481565b60165460a060020a900463ffffffff1681565b600160a060020a03821633141561195557600080fd5b336000818152600460209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b60116020526000908152604090205460ff8082169161010090041682565b60125481565b6119f2848484610d87565b6119fe848484846123c9565b1515611a0957600080fd5b50505050565b611a1833610e15565b1515611a2357600080fd5b601455565b60155481565b611a3733610e15565b1515611a4257600080fd5b601555565b6060611a5282611c12565b1515611a5d57600080fd5b6000828152600b602090815260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529091830182828015611af05780601f10611ac557610100808354040283529160200191611af0565b820191906000526020600020905b815481529060010190602001808311611ad357829003601f168201915b50505050509050919050565b60165463ffffffff1681565b6016546c01000000000000000000000000900463ffffffff1681565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205460ff1690565b601654640100000000900463ffffffff1681565b611b6f33610e15565b1515611b7a57600080fd5b6110fc8383836122c1565b611b8d611795565b1515611b9857600080fd5b3031811115611ba657600080fd5b604051339082156108fc029083906000818181858888f19350505050158015611bd3573d6000803e3d6000fd5b5050565b611bdf611795565b1515611bea57600080fd5b610d7881612546565b60009081526011602052604090205460ff808216926101009092041690565b600090815260016020526040902054600160a060020a0316151590565b611c40600d8263ffffffff6125b716565b604051600160a060020a038216907fa3b62bc36326052d97ea62d63c3d60308ed4c3ea8ac079dd8499f1e9c4f80c0f90600090a250565b600080611c83836111de565b905080600160a060020a031684600160a060020a03161480611cbe575083600160a060020a0316611cb384610c0c565b600160a060020a0316145b80611cce5750611cce8185611b24565b949350505050565b81600160a060020a0316611ce9826111de565b600160a060020a031614611cfc57600080fd5b600081815260026020526040902054600160a060020a031615611bd35760009081526002602052604090208054600160a060020a031916905550565b6000806000611d478585612603565b600084815260066020908152604080832054600160a060020a0389168452600590925290912054909350611d8290600163ffffffff61268c16565b600160a060020a038616600090815260056020526040902080549193509083908110611daa57fe5b90600052602060002001549050806005600087600160a060020a0316600160a060020a0316815260200190815260200160002084815481101515611dea57fe5b6000918252602080832090910192909255600160a060020a0387168152600590915260409020805490611e219060001983016127d7565b50600093845260066020526040808520859055908452909220555050565b6000611e4b83836126a3565b50600160a060020a039091166000908152600560209081526040808320805460018101825590845282842081018590559383526006909152902055565b6000600160a060020a0382161515611e9f57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b611ed0600e8263ffffffff6125b716565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b600080808311611f1657600080fd5b8284811515611f2157fe5b04949350505050565b600082820183811015611f3c57600080fd5b9392505050565b611f4d8282612726565b600780546000838152600860205260408120829055600182018355919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688015550565b611fa3600d8263ffffffff61278116565b604051600160a060020a038216907f44d6d25963f097ad14f29f06854a01f575648a1ef82f30e562ccd3889717e33990600090a250565b60008481526010602052604090206001815460a060020a900460ff16600381111561200157fe5b1015801561202657506003815460a060020a900460ff16600381111561202357fe5b11155b151561203157600080fd5b805460a860020a900460ff161561204757600080fd5b805460408051600160a060020a038981166c010000000000000000000000000260208084019190915283516014818503018152603490930193849052825191909416936001939182918401908083835b602083106120b65780518252601f199092019160209182019101612097565b51815160209384036101000a60001901801990921691161790526040805192909401829003822060008084528383018087529190915260ff8d1683860152606083018c9052608083018b9052935160a08084019750919550601f1981019492819003909101925090865af1158015612132573d6000803e3d6000fd5b50505060206040510351600160a060020a031614151561215157600080fd5b60125460009081526011602052604081205460ff16600381111561217157fe5b1461217b57600080fd5b61218786601254611f43565b805475ff000000000000000000000000000000000000000000191660a860020a178082556012546000908152601160205260409020805460a060020a90920460ff169160ff191660018360038111156121dc57fe5b02179055508660ff167f4f545f6bcf62eb2ffc046617d0a42b6ec21df1f850aaba8e45acdea984c7593887876012548560000160149054906101000a900460ff166040518085600160a060020a0316600160a060020a0316815260200184815260200183815260200182600381111561225157fe5b60ff16815260200194505050505060405180910390a250506012805460010190555050505050565b61228a600e8263ffffffff61278116565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600060018260038111156122d157fe5b101580156122eb575060038260038111156122e857fe5b11155b15156122f657600080fd5b50600083815260106020526040812090815460a060020a900460ff16600381111561231d57fe5b1461232757600080fd5b8054600160a060020a031916600160a060020a038416178082558290829074ff0000000000000000000000000000000000000000191660a060020a83600381111561236e57fe5b0217905550805475ff000000000000000000000000000000000000000000191681556040805185815290517f2b18c29869c3611bc6ecbb90c579823fa067924192d0db836b8e87afee77bc2c9181900360200190a150505050565b6000806123de85600160a060020a03166127cf565b15156123ed576001915061101f565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b83811015612480578181015183820152602001612468565b50505050905090810190601f1680156124ad5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b1580156124cf57600080fd5b505af11580156124e3573d6000803e3d6000fd5b505050506040513d60208110156124f957600080fd5b50517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f150b7a0200000000000000000000000000000000000000000000000000000000149695505050505050565b600160a060020a038116151561255b57600080fd5b600c54604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600c8054600160a060020a031916600160a060020a0392909216919091179055565b600160a060020a03811615156125cc57600080fd5b6125d68282611e88565b15156125e157600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b81600160a060020a0316612616826111de565b600160a060020a03161461262957600080fd5b600160a060020a03821660009081526003602052604090205461265390600163ffffffff61268c16565b600160a060020a039092166000908152600360209081526040808320949094559181526001909152208054600160a060020a0319169055565b6000808383111561269c57600080fd5b5050900390565b600081815260016020526040902054600160a060020a0316156126c557600080fd5b60008181526001602081815260408084208054600160a060020a031916600160a060020a038816908117909155845260039091529091205461270691611f2a565b600160a060020a0390921660009081526003602052604090209190915550565b600160a060020a038216151561273b57600080fd5b6127458282611e3f565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600160a060020a038116151561279657600080fd5b6127a08282611e88565b156127aa57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000903b1190565b8154818355818111156110fc576000838152602090206110fc918101908301610bf191905b8082111561281057600081556001016127fc565b50905600a165627a7a72305820359e324db349e2f69a3b8b8b98275de5f8da7bd40bc122b52131321c0a704f020029
Deployed Bytecode
0x6080604052600436106102d45763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146102d957806306fdde0314610324578063080c7f72146103ae578063081812fc146103dc578063095ea7b3146104105780630f6d5e121461043657806310cb4765146104545780631785f53c146104a857806318160ddd146104c95780632168a82e146104f057806323b872dd1461050557806324d7806c1461052f5780632f745c591461055057806337584061146105745780633aa209ac146105985780633f4ba83a146105b657806342842e0e146105cb57806346fbf68e146105f557806349dc4d2c146106165780634f6ccce71461062e5780635022653d146106465780635c975abb146106645780635f452307146106795780636352211e146106a4578063641c2889146106bc57806366bb8f01146106d457806368de03b9146106f25780636b2c0f55146107105780636ef8d66d14610731578063700662cd14610746578063704802751461075a57806370a082311461077b578063715018a61461079c5780637e320921146107b157806382cdb10e146107dc57806382dc1ec4146107f15780638456cb59146108125780638bad0c0a146108275780638da5cb5b1461083c5780638f32d59b14610851578063930c06b814610866578063934f8f431461088157806395d89b41146108b95780639b7d2851146108ce578063a20e8fdf146108e3578063a22cb465146108f8578063ac6dfbc11461091e578063b789ec3d14610967578063b88d4fde1461097c578063b90bece9146109eb578063c4efaf7814610a03578063c5fec09414610a18578063c87b56dd14610a30578063cc9f2e0c14610a48578063e8d1be6114610a5d578063e985e9c514610a72578063e9b201ad14610a99578063eb1a03a514610aae578063f14210a614610ad8578063f2fde38b14610af0578063ff99a06314610b11575b600080fd5b3480156102e557600080fd5b506103107bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1960043516610b29565b604080519115158252519081900360200190f35b34801561033057600080fd5b50610339610b5d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561037357818101518382015260200161035b565b50505050905090810190601f1680156103a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103ba57600080fd5b506103c3610bf4565b6040805163ffffffff9092168252519081900360200190f35b3480156103e857600080fd5b506103f4600435610c0c565b60408051600160a060020a039092168252519081900360200190f35b34801561041c57600080fd5b50610434600160a060020a0360043516602435610c3e565b005b34801561044257600080fd5b5061043463ffffffff60043516610ce7565b34801561046057600080fd5b5061046c600435610d2b565b604051600160a060020a03841681526020810183600381111561048b57fe5b60ff16815291151560208301525060408051918290030192509050f35b3480156104b457600080fd5b50610434600160a060020a0360043516610d5c565b3480156104d557600080fd5b506104de610d7b565b60408051918252519081900360200190f35b3480156104fc57600080fd5b506104de610d81565b34801561051157600080fd5b50610434600160a060020a0360043581169060243516604435610d87565b34801561053b57600080fd5b50610310600160a060020a0360043516610e15565b34801561055c57600080fd5b506104de600160a060020a0360043516602435610e2e565b34801561058057600080fd5b5061031060043560ff60243516604435606435610e7b565b3480156105a457600080fd5b5061043463ffffffff60043516611028565b3480156105c257600080fd5b5061043461107c565b3480156105d757600080fd5b50610434600160a060020a03600435811690602435166044356110e0565b34801561060157600080fd5b50610310600160a060020a0360043516611101565b34801561062257600080fd5b50610310600435611114565b34801561063a57600080fd5b506104de600435611130565b34801561065257600080fd5b5061043463ffffffff60043516611165565b34801561067057600080fd5b506103106111b0565b34801561068557600080fd5b5061068e6111b9565b6040805160ff9092168252519081900360200190f35b3480156106b057600080fd5b506103f46004356111de565b3480156106c857600080fd5b50610434600435611202565b3480156106e057600080fd5b5061043463ffffffff6004351661121b565b3480156106fe57600080fd5b5061043463ffffffff60043516611257565b34801561071c57600080fd5b50610434600160a060020a03600435166112a3565b34801561073d57600080fd5b506104346112bf565b61043460ff600435811690602435166112ca565b34801561076657600080fd5b50610434600160a060020a036004351661161a565b34801561078757600080fd5b506104de600160a060020a0360043516611636565b3480156107a857600080fd5b50610434611669565b3480156107bd57600080fd5b5061043460ff60043581169060243590604435166064356084356116c6565b3480156107e857600080fd5b506103c36116db565b3480156107fd57600080fd5b50610434600160a060020a03600435166116fb565b34801561081e57600080fd5b50610434611717565b34801561083357600080fd5b5061043461177d565b34801561084857600080fd5b506103f4611786565b34801561085d57600080fd5b50610310611795565b34801561087257600080fd5b5061043460ff600435166117a6565b34801561088d57600080fd5b506104346024600480358281019290820135918135808301929082013591604435918201910135611804565b3480156108c557600080fd5b506103396118c5565b3480156108da57600080fd5b506104de611926565b3480156108ef57600080fd5b506103c361192c565b34801561090457600080fd5b50610434600160a060020a0360043516602435151561193f565b34801561092a57600080fd5b506109366004356119c3565b6040518083600381111561094657fe5b60ff1681526020018260ff1660ff1681526020019250505060405180910390f35b34801561097357600080fd5b506104de6119e1565b34801561098857600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261043494600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506119e79650505050505050565b3480156109f757600080fd5b50610434600435611a0f565b348015610a0f57600080fd5b506104de611a28565b348015610a2457600080fd5b50610434600435611a2e565b348015610a3c57600080fd5b50610339600435611a47565b348015610a5457600080fd5b506103c3611afc565b348015610a6957600080fd5b506103c3611b08565b348015610a7e57600080fd5b50610310600160a060020a0360043581169060243516611b24565b348015610aa557600080fd5b506103c3611b52565b348015610aba57600080fd5b50610434600435600160a060020a036024351660ff60443516611b66565b348015610ae457600080fd5b50610434600435611b85565b348015610afc57600080fd5b50610434600160a060020a0360043516611bd7565b348015610b1d57600080fd5b50610936600435611bf3565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660009081526020819052604090205460ff1690565b60098054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610be95780601f10610bbe57610100808354040283529160200191610be9565b820191906000526020600020905b815481529060010190602001808311610bcc57829003601f168201915b505050505090505b90565b60165468010000000000000000900463ffffffff1681565b6000610c1782611c12565b1515610c2257600080fd5b50600090815260026020526040902054600160a060020a031690565b6000610c49826111de565b9050600160a060020a038381169082161415610c6457600080fd5b33600160a060020a0382161480610c805750610c808133611b24565b1515610c8b57600080fd5b6000828152600260205260408082208054600160a060020a031916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610cf033610e15565b1515610cfb57600080fd5b6016805463ffffffff90921668010000000000000000026bffffffff000000000000000019909216919091179055565b601060205260009081526040902054600160a060020a0381169060ff60a060020a820481169160a860020a90041683565b610d64611795565b1515610d6f57600080fd5b610d7881611c2f565b50565b60075490565b60145481565b610d913382611c77565b1515610d9c57600080fd5b600160a060020a0382161515610db157600080fd5b610dbb8382611cd6565b610dc58382611d38565b610dcf8282611e3f565b8082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000610e28600d8363ffffffff611e8816565b92915050565b6000610e3983611636565b8210610e4457600080fd5b600160a060020a0383166000908152600560205260409020805483908110610e6857fe5b9060005260206000200154905092915050565b60008481526010602052604081206001815460a060020a900460ff166003811115610ea257fe5b10158015610ec757506003815460a060020a900460ff166003811115610ec457fe5b11155b1515610ed257600080fd5b805460a860020a900460ff1615610ee857600080fd5b8054604080516c010000000000000000000000003302602080830191909152825180830360140181526034909201928390528151600160a060020a0390941693600193918291908401908083835b60208310610f555780518252601f199092019160209182019101610f36565b51815160209384036101000a60001901801990921691161790526040805192909401829003822060008084528383018087529190915260ff8e1683860152606083018d9052608083018c9052935160a08084019750919550601f1981019492819003909101925090865af1158015610fd1573d6000803e3d6000fd5b50505060206040510351600160a060020a0316141515610ff057600080fd5b60125460009081526011602052604081205460ff16600381111561101057fe5b1461101a57600080fd5b600191505b50949350505050565b61103133610e15565b151561103c57600080fd5b6016805463ffffffff9092167001000000000000000000000000000000000273ffffffff0000000000000000000000000000000019909216919091179055565b61108533611101565b151561109057600080fd5b600f5460ff1615156110a157600080fd5b600f805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b6110fc83838360206040519081016040528060008152506119e7565b505050565b6000610e28600e8363ffffffff611e8816565b60009081526010602052604090205460a860020a900460ff1690565b600061113a610d7b565b821061114557600080fd5b600780548390811061115357fe5b90600052602060002001549050919050565b61116e33610e15565b151561117957600080fd5b6016805463ffffffff90921660a060020a0277ffffffff000000000000000000000000000000000000000019909216919091179055565b600f5460ff1690565b6016547801000000000000000000000000000000000000000000000000900460ff1681565b600081815260016020526040812054600160a060020a0316801515610e2857600080fd5b61120b33610e15565b151561121657600080fd5b601355565b61122433610e15565b151561122f57600080fd5b6016805463ffffffff9092166401000000000267ffffffff0000000019909216919091179055565b61126033610e15565b151561126b57600080fd5b6016805463ffffffff9092166c01000000000000000000000000026fffffffff00000000000000000000000019909216919091179055565b6112ab611795565b15156112b657600080fd5b610d7881611ebf565b6112c833611ebf565b565b600f5460ff16156112da57600080fd5b60018160038111156112e857fe5b10158015611302575060038160038111156112ff57fe5b11155b151561130d57600080fd5b600181600381111561131b57fe5b141561144e57601354341461132f57600080fd5b6016805463ffffffff198116600163ffffffff928316018216179182905560009161137191818116916c010000000000000000000000009004811690611f0716565b1180156113a9575060165463ffffffff6c0100000000000000000000000082048116911681151561139e57fe5b0663ffffffff166000145b15611449576016546113e29063ffffffff64010000000082048116917001000000000000000000000000000000009004811690611f2a16565b6016805467ffffffff00000000191664010000000063ffffffff9384160217908190556114289168010000000000000000820481169160a060020a9004811690611f2a16565b601660086101000a81548163ffffffff021916908363ffffffff1602179055505b61153a565b600281600381111561145c57fe5b14156114c057601654600064010000000090910463ffffffff161161148057600080fd5b601454341461148e57600080fd5b6016805460001963ffffffff640100000000808404821692909201160267ffffffff000000001990911617905561153a565b60038160038111156114ce57fe5b141561153a5760165460006801000000000000000090910463ffffffff16116114f657600080fd5b601554341461150457600080fd5b6016805460001963ffffffff6801000000000000000080840482169290920116026bffffffff0000000000000000199091161790555b61154633601254611f43565b6012546000908152601160205260409020805482919060ff1916600183600381111561156e57fe5b021790555060165460128054600090815260116020908152604091829020805460ff780100000000000000000000000000000000000000000000000090960486166101000261ff001990911617905582546001019092555133808252928516927fe645d62f5ce95c40ef0ed49325a0a29aa1e8821dd852d0cfa87e02c221e27a5d9290918591810182600381111561160257fe5b60ff1681526020019250505060405180910390a25050565b611622611795565b151561162d57600080fd5b610d7881611f92565b6000600160a060020a038216151561164d57600080fd5b50600160a060020a031660009081526003602052604090205490565b611671611795565b151561167c57600080fd5b600c54604051600091600160a060020a0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600c8054600160a060020a0319169055565b6116d4853386868686611fda565b5050505050565b601654700100000000000000000000000000000000900463ffffffff1681565b611703611795565b151561170e57600080fd5b610d7881612279565b61172033611101565b151561172b57600080fd5b600f5460ff161561173b57600080fd5b600f805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b6112c833611c2f565b600c54600160a060020a031690565b600c54600160a060020a0316331490565b6117af33610e15565b15156117ba57600080fd5b6016805460ff90921678010000000000000000000000000000000000000000000000000278ff00000000000000000000000000000000000000000000000019909216919091179055565b600061180f33610e15565b151561181a57600080fd5b85841461182657600080fd5b85821461183257600080fd5b5060005b63ffffffff81168611156118bc576118b4878763ffffffff841681811061185957fe5b9050602002013586868463ffffffff16818110151561187457fe5b90506020020135600160a060020a031685858563ffffffff16818110151561189857fe5b905060200201356003811180156118ae57600080fd5b506122c1565b600101611836565b50505050505050565b600a8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610be95780601f10610bbe57610100808354040283529160200191610be9565b60135481565b60165460a060020a900463ffffffff1681565b600160a060020a03821633141561195557600080fd5b336000818152600460209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b60116020526000908152604090205460ff8082169161010090041682565b60125481565b6119f2848484610d87565b6119fe848484846123c9565b1515611a0957600080fd5b50505050565b611a1833610e15565b1515611a2357600080fd5b601455565b60155481565b611a3733610e15565b1515611a4257600080fd5b601555565b6060611a5282611c12565b1515611a5d57600080fd5b6000828152600b602090815260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529091830182828015611af05780601f10611ac557610100808354040283529160200191611af0565b820191906000526020600020905b815481529060010190602001808311611ad357829003601f168201915b50505050509050919050565b60165463ffffffff1681565b6016546c01000000000000000000000000900463ffffffff1681565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205460ff1690565b601654640100000000900463ffffffff1681565b611b6f33610e15565b1515611b7a57600080fd5b6110fc8383836122c1565b611b8d611795565b1515611b9857600080fd5b3031811115611ba657600080fd5b604051339082156108fc029083906000818181858888f19350505050158015611bd3573d6000803e3d6000fd5b5050565b611bdf611795565b1515611bea57600080fd5b610d7881612546565b60009081526011602052604090205460ff808216926101009092041690565b600090815260016020526040902054600160a060020a0316151590565b611c40600d8263ffffffff6125b716565b604051600160a060020a038216907fa3b62bc36326052d97ea62d63c3d60308ed4c3ea8ac079dd8499f1e9c4f80c0f90600090a250565b600080611c83836111de565b905080600160a060020a031684600160a060020a03161480611cbe575083600160a060020a0316611cb384610c0c565b600160a060020a0316145b80611cce5750611cce8185611b24565b949350505050565b81600160a060020a0316611ce9826111de565b600160a060020a031614611cfc57600080fd5b600081815260026020526040902054600160a060020a031615611bd35760009081526002602052604090208054600160a060020a031916905550565b6000806000611d478585612603565b600084815260066020908152604080832054600160a060020a0389168452600590925290912054909350611d8290600163ffffffff61268c16565b600160a060020a038616600090815260056020526040902080549193509083908110611daa57fe5b90600052602060002001549050806005600087600160a060020a0316600160a060020a0316815260200190815260200160002084815481101515611dea57fe5b6000918252602080832090910192909255600160a060020a0387168152600590915260409020805490611e219060001983016127d7565b50600093845260066020526040808520859055908452909220555050565b6000611e4b83836126a3565b50600160a060020a039091166000908152600560209081526040808320805460018101825590845282842081018590559383526006909152902055565b6000600160a060020a0382161515611e9f57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b611ed0600e8263ffffffff6125b716565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b600080808311611f1657600080fd5b8284811515611f2157fe5b04949350505050565b600082820183811015611f3c57600080fd5b9392505050565b611f4d8282612726565b600780546000838152600860205260408120829055600182018355919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688015550565b611fa3600d8263ffffffff61278116565b604051600160a060020a038216907f44d6d25963f097ad14f29f06854a01f575648a1ef82f30e562ccd3889717e33990600090a250565b60008481526010602052604090206001815460a060020a900460ff16600381111561200157fe5b1015801561202657506003815460a060020a900460ff16600381111561202357fe5b11155b151561203157600080fd5b805460a860020a900460ff161561204757600080fd5b805460408051600160a060020a038981166c010000000000000000000000000260208084019190915283516014818503018152603490930193849052825191909416936001939182918401908083835b602083106120b65780518252601f199092019160209182019101612097565b51815160209384036101000a60001901801990921691161790526040805192909401829003822060008084528383018087529190915260ff8d1683860152606083018c9052608083018b9052935160a08084019750919550601f1981019492819003909101925090865af1158015612132573d6000803e3d6000fd5b50505060206040510351600160a060020a031614151561215157600080fd5b60125460009081526011602052604081205460ff16600381111561217157fe5b1461217b57600080fd5b61218786601254611f43565b805475ff000000000000000000000000000000000000000000191660a860020a178082556012546000908152601160205260409020805460a060020a90920460ff169160ff191660018360038111156121dc57fe5b02179055508660ff167f4f545f6bcf62eb2ffc046617d0a42b6ec21df1f850aaba8e45acdea984c7593887876012548560000160149054906101000a900460ff166040518085600160a060020a0316600160a060020a0316815260200184815260200183815260200182600381111561225157fe5b60ff16815260200194505050505060405180910390a250506012805460010190555050505050565b61228a600e8263ffffffff61278116565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600060018260038111156122d157fe5b101580156122eb575060038260038111156122e857fe5b11155b15156122f657600080fd5b50600083815260106020526040812090815460a060020a900460ff16600381111561231d57fe5b1461232757600080fd5b8054600160a060020a031916600160a060020a038416178082558290829074ff0000000000000000000000000000000000000000191660a060020a83600381111561236e57fe5b0217905550805475ff000000000000000000000000000000000000000000191681556040805185815290517f2b18c29869c3611bc6ecbb90c579823fa067924192d0db836b8e87afee77bc2c9181900360200190a150505050565b6000806123de85600160a060020a03166127cf565b15156123ed576001915061101f565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b83811015612480578181015183820152602001612468565b50505050905090810190601f1680156124ad5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b1580156124cf57600080fd5b505af11580156124e3573d6000803e3d6000fd5b505050506040513d60208110156124f957600080fd5b50517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f150b7a0200000000000000000000000000000000000000000000000000000000149695505050505050565b600160a060020a038116151561255b57600080fd5b600c54604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600c8054600160a060020a031916600160a060020a0392909216919091179055565b600160a060020a03811615156125cc57600080fd5b6125d68282611e88565b15156125e157600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b81600160a060020a0316612616826111de565b600160a060020a03161461262957600080fd5b600160a060020a03821660009081526003602052604090205461265390600163ffffffff61268c16565b600160a060020a039092166000908152600360209081526040808320949094559181526001909152208054600160a060020a0319169055565b6000808383111561269c57600080fd5b5050900390565b600081815260016020526040902054600160a060020a0316156126c557600080fd5b60008181526001602081815260408084208054600160a060020a031916600160a060020a038816908117909155845260039091529091205461270691611f2a565b600160a060020a0390921660009081526003602052604090209190915550565b600160a060020a038216151561273b57600080fd5b6127458282611e3f565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600160a060020a038116151561279657600080fd5b6127a08282611e88565b156127aa57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000903b1190565b8154818355818111156110fc576000838152602090206110fc918101908301610bf191905b8082111561281057600081556001016127fc565b50905600a165627a7a72305820359e324db349e2f69a3b8b8b98275de5f8da7bd40bc122b52131321c0a704f020029
Swarm Source
bzzr://359e324db349e2f69a3b8b8b98275de5f8da7bd40bc122b52131321c0a704f02
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.