ERC-721
Overview
Max Total Supply
75,825 CARD
Holders
762
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
5 CARDLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Cards
Compiler Version
v0.5.11+commit.c082d0b4
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-10-28 */ pragma solidity 0.5.11; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functions to restrict their use to * the owner. */ contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return msg.sender == _owner; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * > Note: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot 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-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } } contract InscribableToken is Ownable { mapping(bytes32 => bytes32) public properties; event ClassPropertySet(bytes32 indexed key, bytes32 value); event TokenPropertySet(uint indexed id, bytes32 indexed key, bytes32 value); function _setProperty(uint _id, bytes32 _key, bytes32 _value) internal { properties[getTokenKey(_id, _key)] = _value; emit TokenPropertySet(_id, _key, _value); } function getProperty(uint _id, bytes32 _key) public view returns (bytes32 _value) { return properties[getTokenKey(_id, _key)]; } function _setClassProperty(bytes32 _key, bytes32 _value) internal { emit ClassPropertySet(_key, _value); properties[getClassKey(_key)] = _value; } function getTokenKey(uint _tokenId, bytes32 _key) public pure returns (bytes32) { // one prefix to prevent collisions return keccak256(abi.encodePacked(uint(1), _tokenId, _key)); } function getClassKey(bytes32 _key) public pure returns (bytes32) { // zero prefix to prevent collisions return keccak256(abi.encodePacked(uint(0), _key)); } function getClassProperty(bytes32 _key) public view returns (bytes32) { return properties[getClassKey(_key)]; } } // solium-disable security/no-inline-assembly library StorageWrite { using SafeMath for uint256; function _getStorageArraySlot(uint _dest, uint _index) internal view returns (uint result) { uint slot = _getArraySlot(_dest, _index); assembly { result := sload(slot) } } function _getArraySlot(uint _dest, uint _index) internal pure returns (uint slot) { assembly { let free := mload(0x40) mstore(free, _dest) slot := add(keccak256(free, 32), _index) } } function _setArraySlot(uint _dest, uint _index, uint _value) internal { uint slot = _getArraySlot(_dest, _index); assembly { sstore(slot, _value) } } function _loadSlots(uint _slot, uint _offset, uint _perSlot, uint _length) internal view returns (uint[] memory slots) { uint slotCount = _slotCount(_offset, _perSlot, _length); slots = new uint[](slotCount); // top and tail the slots uint firstPos = _pos(_offset, _perSlot); // _offset.div(_perSlot); slots[0] = _getStorageArraySlot(_slot, firstPos); if (slotCount > 1) { uint lastPos = _pos(_offset.add(_length), _perSlot); // .div(_perSlot); slots[slotCount-1] = _getStorageArraySlot(_slot, lastPos); } } function _pos(uint items, uint perPage) internal pure returns (uint) { return items / perPage; } function _slotCount(uint _offset, uint _perSlot, uint _length) internal pure returns (uint) { uint start = _offset / _perSlot; uint end = (_offset + _length) / _perSlot; return (end - start) + 1; } function _saveSlots(uint _slot, uint _offset, uint _size, uint[] memory _slots) internal { uint offset = _offset.div((256/_size)); for (uint i = 0; i < _slots.length; i++) { _setArraySlot(_slot, offset + i, _slots[i]); } } function _write(uint[] memory _slots, uint _offset, uint _size, uint _index, uint _value) internal pure { uint perSlot = 256 / _size; uint initialOffset = _offset % perSlot; uint slotPosition = (initialOffset + _index) / perSlot; uint withinSlot = ((_index + _offset) % perSlot) * _size; // evil bit shifting magic for (uint q = 0; q < _size; q += 8) { _slots[slotPosition] |= ((_value >> q) & 0xFF) << (withinSlot + q); } } function repeatUint16(uint _slot, uint _offset, uint _length, uint16 _item) internal { uint[] memory slots = _loadSlots(_slot, _offset, 16, _length); for (uint i = 0; i < _length; i++) { _write(slots, _offset, 16, i, _item); } _saveSlots(_slot, _offset, 16, slots); } function uint16s(uint _slot, uint _offset, uint16[] memory _items) internal { uint[] memory slots = _loadSlots(_slot, _offset, 16, _items.length); for (uint i = 0; i < _items.length; i++) { _write(slots, _offset, 16, i, _items[i]); } _saveSlots(_slot, _offset, 16, slots); } function uint8s(uint _slot, uint _offset, uint8[] memory _items) internal { uint[] memory slots = _loadSlots(_slot, _offset, 32, _items.length); for (uint i = 0; i < _items.length; i++) { _write(slots, _offset, 8, i, _items[i]); } _saveSlots(_slot, _offset, 8, slots); } } library String { /** * @dev Converts a `uint256` to a `string`. * via OraclizeAPI - MIT licence * https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol */ function fromUint(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); uint256 index = digits - 1; temp = value; while (temp != 0) { buffer[index--] = byte(uint8(48 + temp % 10)); temp /= 10; } return string(buffer); } bytes constant alphabet = "0123456789abcdef"; function fromAddress(address _addr) internal pure returns(string memory) { bytes32 value = bytes32(uint256(_addr)); bytes memory str = new bytes(42); str[0] = '0'; str[1] = 'x'; for (uint i = 0; i < 20; i++) { str[2+i*2] = alphabet[uint(uint8(value[i + 12] >> 4))]; str[3+i*2] = alphabet[uint(uint8(value[i + 12] & 0x0F))]; } return string(str); } } /** * @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 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` */ function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data) public returns (bytes4); } /** * @dev Collection of functions related to the address type, */ library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * > It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the SafeMath * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never * directly accessed. */ library Counters { using SafeMath for uint256; struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { counter._value += 1; } function decrement(Counter storage counter) internal { counter._value = counter._value.sub(1); } } /** * @dev Interface of the ERC165 standard, as defined in the * [EIP](https://eips.ethereum.org/EIPS/eip-165). * * Implementers can declare support of contract interfaces, which can then be * queried by others (`ERC165Checker`). * * For an implementation, see `ERC165`. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } contract ImmutableToken { string public constant baseURI = "https://api.immutable.com/token/"; function tokenURI(uint256 tokenId) external view returns (string memory) { return string(abi.encodePacked( baseURI, String.fromAddress(address(this)), "/", String.fromUint(tokenId) )); } } /** * @dev Required interface of an ERC721 compliant contract. */ 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); /** * @dev Returns the number of NFTs in `owner`'s account. */ function balanceOf(address owner) public view returns (uint256 balance); /** * @dev Returns the owner of the NFT specified by `tokenId`. */ function ownerOf(uint256 tokenId) public view returns (address owner); /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * * * Requirements: * - `from`, `to` cannot be zero. * - `tokenId` must be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this * NFT by either `approve` or `setApproveForAll`. */ function safeTransferFrom(address from, address to, uint256 tokenId) public; /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * Requirements: * - If the caller is not `from`, it must be approved to move this NFT by * either `approve` or `setApproveForAll`. */ function transferFrom(address from, address to, uint256 tokenId) public; 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 safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public; } /** * @dev Implementation of the `IERC165` interface. * * Contracts may inherit from this and call `_registerInterface` to declare * their support of an interface. */ contract ERC165 is IERC165 { /* * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 */ bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; constructor () internal { // Derived contracts need only register support for their own interfaces, // we register support for ERC165 itself here _registerInterface(_INTERFACE_ID_ERC165); } /** * @dev See `IERC165.supportsInterface`. * * Time complexity O(1), guaranteed to always use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool) { return _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See `IERC165.supportsInterface`. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } } /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ contract IERC721Metadata is IERC721 { function name() external view returns (string memory); function symbol() external view returns (string memory); function tokenURI(uint256 tokenId) external view returns (string memory); } contract ICards is IERC721 { function getDetails(uint tokenId) public view returns (uint16 proto, uint8 quality); function setQuality(uint tokenId, uint8 quality) public; function burn(uint tokenId) public; function batchMintCards(address to, uint16[] memory _protos, uint8[] memory _qualities) public returns (uint); function mintCards(address to, uint16[] memory _protos, uint8[] memory _qualities) public returns (uint); function mintCard(address to, uint16 _proto, uint8 _quality) public returns (uint); function batchSize() public view returns (uint); } /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */ contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // 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 => Counters.Counter) private _ownedTokensCount; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) private _operatorApprovals; /* * bytes4(keccak256('balanceOf(address)')) == 0x70a08231 * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3 * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde * * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^ * 0xa22cb465 ^ 0xe985e9c ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd */ bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; constructor () public { // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(_INTERFACE_ID_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), "ERC721: balance query for the zero address"); return _ownedTokensCount[owner].current(); } /** * @dev Gets the owner of the specified token ID. * @param tokenId uint256 ID of the token to query the owner of * @return 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), "ERC721: owner query for nonexistent token"); 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, "ERC721: approval to current owner"); require(msg.sender == owner || isApprovedForAll(owner, msg.sender), "ERC721: approve caller is not owner nor approved for all" ); _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), "ERC721: approved query for nonexistent token"); 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, "ERC721: approve to caller"); _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 { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(msg.sender, tokenId), "ERC721: transfer caller is not owner nor approved"); _transferFrom(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 { 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 memory _data) public { transferFrom(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether the specified token exists. * @param tokenId uint256 ID of the token to query the existence of * @return bool 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) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ownerOf(tokenId); 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 */ function _mint(address to, uint256 tokenId) internal { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _tokenOwner[tokenId] = to; _ownedTokensCount[to].increment(); emit Transfer(address(0), to, tokenId); } /** * @dev Internal function to burn a specific token. * Reverts if the token does not exist. * Deprecated, use _burn(uint256) instead. * @param owner owner of the token to burn * @param tokenId uint256 ID of the token being burned */ function _burn(address owner, uint256 tokenId) internal { require(ownerOf(tokenId) == owner, "ERC721: burn of token that is not own"); _clearApproval(tokenId); _ownedTokensCount[owner].decrement(); _tokenOwner[tokenId] = address(0); emit Transfer(owner, address(0), 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 */ function _burn(uint256 tokenId) internal { _burn(ownerOf(tokenId), tokenId); } /** * @dev Internal function to transfer ownership of a given token ID to another address. * As opposed to transferFrom, this imposes no restrictions on msg.sender. * @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) internal { require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _clearApproval(tokenId); _ownedTokensCount[from].decrement(); _ownedTokensCount[to].increment(); _tokenOwner[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Internal function to invoke `onERC721Received` on a target address. * The call is not executed if the target address is not a contract. * * This function is deprecated. * @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 bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _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. * @param tokenId uint256 ID of the token to be transferred */ function _clearApproval(uint256 tokenId) private { 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(keccak256('name()')) == 0x06fdde03 * bytes4(keccak256('symbol()')) == 0x95d89b41 * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd * * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f */ bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /** * @dev Constructor function */ constructor (string memory name, string memory symbol) public { _name = name; _symbol = symbol; // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(_INTERFACE_ID_ERC721_METADATA); } /** * @dev Gets the token name. * @return string representing the token name */ function name() external view returns (string memory) { return _name; } /** * @dev Gets the token symbol. * @return string representing the token symbol */ function symbol() external view returns (string memory) { 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 memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); 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 memory uri) internal { require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); _tokenURIs[tokenId] = uri; } /** * @dev Internal function to burn a specific token. * Reverts if the token does not exist. * Deprecated, use _burn(uint256) instead. * @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]; } } } contract MultiTransfer is ERC721 { function transferBatch(address from, address to, uint256 start, uint256 end) public { for (uint i = start; i < end; i++) { transferFrom(from, to, i); } } function transferAllFrom(address from, address to, uint256[] memory tokenIDs) public { for (uint i = 0; i < tokenIDs.length; i++) { transferFrom(from, to, tokenIDs[i]); } } function safeTransferBatch(address from, address to, uint256 start, uint256 end) public { for (uint i = start; i < end; i++) { safeTransferFrom(from, to, i); } } function safeTransferAllFrom(address from, address to, uint256[] memory tokenIDs) public { for (uint i = 0; i < tokenIDs.length; i++) { safeTransferFrom(from, to, tokenIDs[i]); } } } contract BatchToken is ERC721Metadata { using SafeMath for uint256; struct Batch { uint48 userID; uint16 size; } mapping(uint48 => address) public userIDToAddress; mapping(address => uint48) public addressToUserID; uint256 public batchSize; uint256 public nextBatch; uint256 public tokenCount; uint48[] internal ownerIDs; uint48[] internal approvedIDs; Batch[] public batches; uint48 internal userCount = 1; uint256 public firstFree = 0; mapping (address => uint) internal _ownedTokensCount; uint256 internal constant MAX_LENGTH = uint(2**256 - 1); constructor(uint256 _batchSize, string memory name, string memory symbol) public ERC721Metadata(name, symbol) { batchSize = _batchSize; batches.length = MAX_LENGTH; ownerIDs.length = MAX_LENGTH; approvedIDs.length = MAX_LENGTH; } function _sequentialMint(address to, uint16 size) internal returns (uint) { uint256 id = firstFree; uint256 end = id + size; uint48 uID = _getUserID(to); for (uint256 i = id; i < end; i++) { emit Transfer(address(0), to, i); ownerIDs[i] = uID; } firstFree += size; _ownedTokensCount[to] += size; tokenCount += size; return id; } function _getUserID(address to) internal returns (uint48) { if (to == address(0)) { return 0; } uint48 uID = addressToUserID[to]; if (uID == 0) { require(userCount + 1 > userCount, "must not overflow"); uID = userCount++; userIDToAddress[uID] = to; addressToUserID[to] = uID; } return uID; } function _getNextBatch() internal returns (uint) { if (firstFree > nextBatch) { nextBatch = _pageCount(firstFree, batchSize).mul(batchSize); } return nextBatch; } function _pageCount(uint256 items, uint256 perPage) internal pure returns (uint){ return ((items - 1) / perPage) + 1; } function _batchMint(address to, uint16 size) internal returns (uint) { require(to != address(0), "must not be null"); require(size > 0 && size <= batchSize, "size must be within limits"); uint256 start = _getNextBatch(); uint48 uID = _getUserID(to); batches[start] = Batch({ userID: uID, size: size }); uint256 end = start + size; for (uint256 i = start; i < end; i++) { emit Transfer(address(0), to, i); } nextBatch += batchSize; _ownedTokensCount[to] += size; tokenCount += size; return start; } function getBatchStart(uint256 tokenId) public view returns (uint) { return tokenId.div(batchSize).mul(batchSize); } function getBatch(uint256 index) public view returns (uint48 userID, uint16 size) { return (batches[index].userID, batches[index].size); } // Overridden ERC721 functions // @OZ: please stop making variables/functions private function ownerOf(uint256 tokenId) public view returns (address) { uint48 uID = ownerIDs[tokenId]; if (uID == 0) { uint256 start = getBatchStart(tokenId); Batch memory b = batches[start]; require(start + b.size > tokenId, "token does not exist"); uID = b.userID; } return userIDToAddress[uID]; } function transferFrom(address from, address to, uint256 tokenId) public { require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); require(_isApprovedOrOwner(msg.sender, tokenId), "ERC721: caller is not owner nor approved"); if (approvedIDs[tokenId] != 0) { approvedIDs[tokenId] = 0; } _ownedTokensCount[from]--; _ownedTokensCount[to]++; ownerIDs[tokenId] = _getUserID(to); emit Transfer(from, to, tokenId); } function burn(uint256 tokenId) public { require(_isApprovedOrOwner(msg.sender, tokenId), "caller is not owner nor approved"); if (approvedIDs[tokenId] != 0) { approvedIDs[tokenId] = 0; } address owner = ownerOf(tokenId); _ownedTokensCount[owner]--; ownerIDs[tokenId] = 0; tokenCount--; emit Transfer(owner, address(0), tokenId); } function approve(address to, uint256 tokenId) public { address owner = ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require(msg.sender == owner || isApprovedForAll(owner, msg.sender), "ERC721: approve caller is not owner nor approved for all" ); approvedIDs[tokenId] = _getUserID(to); emit Approval(owner, to, tokenId); } function _exists(uint256 tokenId) internal view returns (bool) { return ownerOf(tokenId) != address(0); } function getApproved(uint256 tokenId) public view returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return userIDToAddress[approvedIDs[tokenId]]; } function totalSupply() public view returns (uint) { return tokenCount; } function balanceOf(address _owner) public view returns (uint256) { return _ownedTokensCount[_owner]; } } // solium-disable security/no-inline-assembly contract Cards is Ownable, MultiTransfer, BatchToken, ImmutableToken, InscribableToken { uint16[] public cardProtos; uint8[] public cardQualities; struct Season { uint16 high; uint16 low; } struct Proto { bool locked; bool exists; uint8 god; uint8 cardType; uint8 rarity; uint8 mana; uint8 attack; uint8 health; uint8 tribe; } event ProtoUpdated(uint16 indexed id); event SeasonStarted(uint16 indexed id, string name, uint16 indexed low, uint16 indexed high); event QualityChanged(uint256 indexed tokenId, uint8 quality, address factory); uint16[] public protoToSeason; address public propertyManager; Proto[] public protos; Season[] public seasons; mapping(uint256 => bool) public seasonTradable; mapping(address => mapping(uint256 => bool)) public factoryApproved; mapping(uint16 => bool) public mythicCreated; uint16 public constant MYTHIC_THRESHOLD = 65000; constructor(uint256 _batchSize, string memory _name, string memory _symbol) public BatchToken(_batchSize, _name, _symbol) { cardProtos.length = MAX_LENGTH; cardQualities.length = MAX_LENGTH; protoToSeason.length = MAX_LENGTH; protos.length = MAX_LENGTH; propertyManager = msg.sender; } function getDetails(uint256 tokenId) public view returns (uint16 proto, uint8 quality) { return (cardProtos[tokenId], cardQualities[tokenId]); } function mintCard(address to, uint16 _proto, uint8 _quality) external returns (uint) { uint256 start = _sequentialMint(to, 1); _validateProto(_proto); cardProtos[start] = _proto; cardQualities[start] = _quality; } function mintCards(address to, uint16[] calldata _protos, uint8[] calldata _qualities) external returns (uint) { require(_protos.length > 0, "must be some protos"); require(_protos.length == _qualities.length, "must be the same number of protos/qualities"); uint256 start = _sequentialMint(to, uint16(_protos.length)); _validateAndSaveDetails(start, _protos, _qualities); } function batchMintCards(address to, uint16[] calldata _protos, uint8[] calldata _qualities) external returns (uint) { require(_protos.length > 0, "must be some protos"); require(_protos.length == _qualities.length, "must be the same number of protos/qualities"); uint256 start = _batchMint(to, uint16(_protos.length)); _validateAndSaveDetails(start, _protos, _qualities); return start; } function addFactory(address _factory, uint256 _season) public onlyOwner { require(seasons.length >= _season, "season must exist"); require(_season > 0, "season must not be 0"); require(!factoryApproved[_factory][_season], "this factory is already approved"); require(!seasonTradable[_season], "season must not be tradable"); factoryApproved[_factory][_season] = true; } function unlockTrading(uint256 _season) public onlyOwner { require(!seasonTradable[_season], "season must not be tradable"); seasonTradable[_season] = true; } function transferFrom(address from, address to, uint256 tokenId) public { require(isTradable(tokenId), "not yet tradable"); super.transferFrom(from, to, tokenId); } function burn(uint256 _tokenId) public { require(isTradable(_tokenId), "not yet tradable"); super.burn(_tokenId); } function burnAll(uint256[] memory tokenIDs) public { for (uint256 i = 0; i < tokenIDs.length; i++) { burn(tokenIDs[i]); } } function isTradable(uint256 _tokenId) public view returns (bool) { return seasonTradable[protoToSeason[cardProtos[_tokenId]]]; } function startSeason(string memory name, uint16 low, uint16 high) public onlyOwner returns (uint) { require(low > 0, "must not be zero proto"); require(high > low, "must be a valid range"); require(seasons.length == 0 || low > seasons[seasons.length - 1].high, "seasons cannot overlap"); // seasons start at 1 uint16 id = uint16(seasons.push(Season({ high: high, low: low }))); uint256 cp; assembly { cp := protoToSeason_slot } StorageWrite.repeatUint16(cp, low, (high - low) + 1, id); emit SeasonStarted(id, name, low, high); return id; } function updateProtos( uint16[] memory _ids, uint8[] memory _gods, uint8[] memory _cardTypes, uint8[] memory _rarities, uint8[] memory _manas, uint8[] memory _attacks, uint8[] memory _healths, uint8[] memory _tribes ) public onlyOwner { for (uint256 i = 0; i < _ids.length; i++) { uint16 id = _ids[i]; require(id > 0, "proto must not be zero"); Proto memory proto = protos[id]; require(!proto.locked, "proto is locked"); protos[id] = Proto({ locked: false, exists: true, god: _gods[i], cardType: _cardTypes[i], rarity: _rarities[i], mana: _manas[i], attack: _attacks[i], health: _healths[i], tribe: _tribes[i] }); emit ProtoUpdated(id); } } function lockProtos(uint16[] memory _ids) public onlyOwner { require(_ids.length > 0, "must lock some"); for (uint256 i = 0; i < _ids.length; i++) { uint16 id = _ids[i]; require(id > 0, "proto must not be zero"); Proto storage proto = protos[id]; require(!proto.locked, "proto is locked"); require(proto.exists, "proto must exist"); proto.locked = true; emit ProtoUpdated(id); } } function _validateAndSaveDetails(uint256 start, uint16[] memory _protos, uint8[] memory _qualities) internal { _validateProtos(_protos); uint256 cp; assembly { cp := cardProtos_slot } StorageWrite.uint16s(cp, start, _protos); uint256 cq; assembly { cq := cardQualities_slot } StorageWrite.uint8s(cq, start, _qualities); } uint16 private constant MAX_UINT16 = 2**16 - 1; function _validateProto(uint16 proto) internal { if (proto >= MYTHIC_THRESHOLD) { require(!mythicCreated[proto], "mythic has already been created"); mythicCreated[proto] = true; } else { uint256 season = protoToSeason[proto]; require(season != 0, "must have season set"); require(factoryApproved[msg.sender][season], "must be approved factory for this season"); } } function _validateProtos(uint16[] memory _protos) internal { uint16 maxProto = 0; uint16 minProto = MAX_UINT16; for (uint256 i = 0; i < _protos.length; i++) { uint16 proto = _protos[i]; if (proto >= MYTHIC_THRESHOLD) { require(!mythicCreated[proto], "mythic has already been created"); mythicCreated[proto] = true; } else { if (proto > maxProto) { maxProto = proto; } if (minProto > proto) { minProto = proto; } } } if (maxProto != 0) { uint256 season = protoToSeason[maxProto]; // cards must be from the same season require(season != 0, "must have season set"); require(season == protoToSeason[minProto], "can only create cards from the same season"); require(factoryApproved[msg.sender][season], "must be approved factory for this season"); } } function setQuality(uint256 _tokenId, uint8 _quality) public { uint16 proto = cardProtos[_tokenId]; uint256 season = protoToSeason[proto]; require(factoryApproved[msg.sender][season], "factory can't change quality of this season"); cardQualities[_quality] = _quality; emit QualityChanged(_tokenId, _quality, msg.sender); } function setPropertyManager(address _manager) public onlyOwner { propertyManager = _manager; } function setProperty(uint256 _id, bytes32 _key, bytes32 _value) public { require(msg.sender == propertyManager, "must be property manager"); _setProperty(_id, _key, _value); } function setClassProperty(bytes32 _key, bytes32 _value) public { require(msg.sender == propertyManager, "must be property manager"); _setClassProperty(_key, _value); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"cardQualities","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIDs","type":"uint256[]"}],"name":"transferAllFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256[]","name":"tokenIDs","type":"uint256[]"}],"name":"burnAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint16[]","name":"_ids","type":"uint16[]"},{"internalType":"uint8[]","name":"_gods","type":"uint8[]"},{"internalType":"uint8[]","name":"_cardTypes","type":"uint8[]"},{"internalType":"uint8[]","name":"_rarities","type":"uint8[]"},{"internalType":"uint8[]","name":"_manas","type":"uint8[]"},{"internalType":"uint8[]","name":"_attacks","type":"uint8[]"},{"internalType":"uint8[]","name":"_healths","type":"uint8[]"},{"internalType":"uint8[]","name":"_tribes","type":"uint8[]"}],"name":"updateProtos","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_manager","type":"address"}],"name":"setPropertyManager","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressToUserID","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"factoryApproved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MYTHIC_THRESHOLD","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint16[]","name":"_ids","type":"uint16[]"}],"name":"lockProtos","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"getTokenKey","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"getClassKey","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"bytes32","name":"_key","type":"bytes32"},{"internalType":"bytes32","name":"_value","type":"bytes32"}],"name":"setProperty","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getBatch","outputs":[{"internalType":"uint48","name":"userID","type":"uint48"},{"internalType":"uint16","name":"size","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint16","name":"_proto","type":"uint16"},{"internalType":"uint8","name":"_quality","type":"uint8"}],"name":"mintCard","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint48","name":"","type":"uint48"}],"name":"userIDToAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIDs","type":"uint256[]"}],"name":"safeTransferAllFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getBatchStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint16","name":"low","type":"uint16"},{"internalType":"uint16","name":"high","type":"uint16"}],"name":"startSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint16[]","name":"_protos","type":"uint16[]"},{"internalType":"uint8[]","name":"_qualities","type":"uint8[]"}],"name":"batchMintCards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"getClassProperty","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"},{"internalType":"bytes32","name":"_value","type":"bytes32"}],"name":"setClassProperty","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"protos","outputs":[{"internalType":"bool","name":"locked","type":"bool"},{"internalType":"bool","name":"exists","type":"bool"},{"internalType":"uint8","name":"god","type":"uint8"},{"internalType":"uint8","name":"cardType","type":"uint8"},{"internalType":"uint8","name":"rarity","type":"uint8"},{"internalType":"uint8","name":"mana","type":"uint8"},{"internalType":"uint8","name":"attack","type":"uint8"},{"internalType":"uint8","name":"health","type":"uint8"},{"internalType":"uint8","name":"tribe","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"safeTransferBatch","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seasonTradable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"batches","outputs":[{"internalType":"uint48","name":"userID","type":"uint48"},{"internalType":"uint16","name":"size","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"firstFree","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"protoToSeason","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getDetails","outputs":[{"internalType":"uint16","name":"proto","type":"uint16"},{"internalType":"uint8","name":"quality","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"unlockTrading","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"properties","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"transferBatch","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint16[]","name":"_protos","type":"uint16[]"},{"internalType":"uint8[]","name":"_qualities","type":"uint8[]"}],"name":"mintCards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"getProperty","outputs":[{"internalType":"bytes32","name":"_value","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"mythicCreated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isTradable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint8","name":"_quality","type":"uint8"}],"name":"setQuality","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"propertyManager","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextBatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"addFactory","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"cardProtos","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"batchSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seasons","outputs":[{"internalType":"uint16","name":"high","type":"uint16"},{"internalType":"uint16","name":"low","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_batchSize","type":"uint256"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"id","type":"uint16"}],"name":"ProtoUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"id","type":"uint16"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":true,"internalType":"uint16","name":"low","type":"uint16"},{"indexed":true,"internalType":"uint16","name":"high","type":"uint16"}],"name":"SeasonStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"quality","type":"uint8"},{"indexed":false,"internalType":"address","name":"factory","type":"address"}],"name":"QualityChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"value","type":"bytes32"}],"name":"ClassPropertySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"value","type":"bytes32"}],"name":"TokenPropertySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"}]
Contract Creation Code
60806040526011805465ffffffffffff1916600117905560006012553480156200002857600080fd5b506040516200533038038062005330833981810160405260608110156200004e57600080fd5b8151602083018051604051929492938301929190846401000000008211156200007657600080fd5b9083019060208201858111156200008c57600080fd5b8251640100000000811182820188101715620000a757600080fd5b82525081516020918201929091019080838360005b83811015620000d6578181015183820152602001620000bc565b50505050905090810190601f168015620001045780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200012857600080fd5b9083019060208201858111156200013e57600080fd5b82516401000000008111828201881017156200015957600080fd5b82525081516020918201929091019080838360005b83811015620001885781810151838201526020016200016e565b50505050905090810190601f168015620001b65780820380516001836020036101000a031916815260200191505b5060405250849150839050828181620001f87f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b036200037716565b6200022c7f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b036200037716565b600580546001600160a01b0319163317908190556040516001600160a01b0391909116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a381516200028d90600690602085019062000446565b508051620002a390600790602084019062000446565b50620002d87f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b036200037716565b5050600b839055600019620002ef601082620004cb565b5060001962000300600e82620004f7565b5060001962000311600f82620004f7565b505050506000196015816200032791906200052e565b506000196200033860168262000565565b50600019620003496017826200052e565b506000196200035a6019826200059c565b5050601880546001600160a01b0319163317905550620006319050565b7fffffffff0000000000000000000000000000000000000000000000000000000080821614156200040957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152602081905260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200048957805160ff1916838001178555620004b9565b82800160010185558215620004b9579182015b82811115620004b95782518255916020019190600101906200049c565b50620004c7929150620005c3565b5090565b815481835581811115620004f257600083815260209020620004f2918101908301620005e3565b505050565b815481835581811115620004f2576004016005900481600401600590048360005260206000209182019101620004f29190620005c3565b815481835581811115620004f257600f016010900481600f01601090048360005260206000209182019101620004f29190620005c3565b815481835581811115620004f257601f016020900481601f01602090048360005260206000209182019101620004f29190620005c3565b815481835581811115620004f257600083815260209020620004f29181019083016200060a565b620005e091905b80821115620004c75760008155600101620005ca565b90565b620005e091905b80821115620004c75780546001600160401b0319168155600101620005ea565b620005e091905b80821115620004c75780546001600160481b031916815560010162000611565b614cef80620006416000396000f3fe608060405234801561001057600080fd5b50600436106103c55760003560e01c80638e08fc96116101ff578063bd1562731161011a578063e7356cb5116100ad578063f2fde38b1161007c578063f2fde38b1461153f578063f3beae6b14611565578063f4daaba114611582578063f5d709a11461158a576103c5565b8063e7356cb5146114d5578063e7c51f1b146114dd578063e985e9c5146114e5578063ef42259b14611513576103c5565b8063cdc2cfe2116100e9578063cdc2cfe21461144e578063e0c931df14611471578063e27aa1d814611492578063e3fb1ac6146114af576103c5565b8063bd1562731461130a578063c5f4127a14611327578063c87b56dd14611363578063c8be6b9b14611380576103c5565b8063b0c4297c11610192578063b76e8d0111610161578063b76e8d01146111cf578063b88d4fde146111ec578063b93a89f7146112b0578063bc048525146112ed576103c5565b8063b0c4297c14611151578063b309c36b1461118d578063b32c4d8d146111aa578063b4654a43146111c7576103c5565b8063a138e44e116101ce578063a138e44e14611073578063a22cb46514611090578063a9c1a200146110be578063ab17d040146110e1576103c5565b80638e08fc9614610f8d5780638f32d59b1461105b57806395d89b41146110635780639f181b5e1461106b576103c5565b806337514295116102ef5780636602eaf9116102825780637962d59b116102515780637962d59b14610df9578063815d9fa014610eb3578063856516c314610ed05780638da5cb5b14610f85576103c5565b80636602eaf914610d9e5780636c0360eb14610dc357806370a0823114610dcb578063715018a614610df1576103c5565b806358895f62116102be57806358895f6214610cdd5780635ac4428214610d065780635b65afe914610d485780636352211e14610d81576103c5565b80633751429514610c4a5780633af0725614610c6d57806342842e0e14610c8a57806342966c6814610cc0576103c5565b806318160ddd1161036757806323b872dd1161033657806323b872dd14610b285780632488508714610b5e57806324a01da114610b8a5780632fa438a314610ba9576103c5565b806318160ddd146106775780631e41613c146106915780631e50739314610ac15780631fe25e4f14610ae7576103c5565b8063081812fc116103a3578063081812fc146104b5578063095ea7b3146104ee5780630bbe0ee31461051c578063100cdd91146105d6576103c5565b806301ffc9a7146103ca57806302b19cea1461040557806306fdde0314610438575b600080fd5b6103f1600480360360208110156103e057600080fd5b50356001600160e01b0319166115c8565b604080519115158252519081900360200190f35b6104226004803603602081101561041b57600080fd5b50356115eb565b6040805160ff9092168252519081900360200190f35b61044061161c565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561047a578181015183820152602001610462565b50505050905090810190601f1680156104a75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104d2600480360360208110156104cb57600080fd5b50356116b2565b604080516001600160a01b039092168252519081900360200190f35b61051a6004803603604081101561050457600080fd5b506001600160a01b03813516906020013561174d565b005b61051a6004803603606081101561053257600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561056557600080fd5b82018360208201111561057757600080fd5b803590602001918460208302840111600160201b8311171561059857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611895945050505050565b61051a600480360360208110156105ec57600080fd5b810190602081018135600160201b81111561060657600080fd5b82018360208201111561061857600080fd5b803590602001918460208302840111600160201b8311171561063957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506118cd945050505050565b61067f611901565b60408051918252519081900360200190f35b61051a60048036036101008110156106a857600080fd5b810190602081018135600160201b8111156106c257600080fd5b8201836020820111156106d457600080fd5b803590602001918460208302840111600160201b831117156106f557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561074457600080fd5b82018360208201111561075657600080fd5b803590602001918460208302840111600160201b8311171561077757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156107c657600080fd5b8201836020820111156107d857600080fd5b803590602001918460208302840111600160201b831117156107f957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561084857600080fd5b82018360208201111561085a57600080fd5b803590602001918460208302840111600160201b8311171561087b57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156108ca57600080fd5b8201836020820111156108dc57600080fd5b803590602001918460208302840111600160201b831117156108fd57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561094c57600080fd5b82018360208201111561095e57600080fd5b803590602001918460208302840111600160201b8311171561097f57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156109ce57600080fd5b8201836020820111156109e057600080fd5b803590602001918460208302840111600160201b83111715610a0157600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610a5057600080fd5b820183602082011115610a6257600080fd5b803590602001918460208302840111600160201b83111715610a8357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611907945050505050565b61051a60048036036020811015610ad757600080fd5b50356001600160a01b0316611d2b565b610b0d60048036036020811015610afd57600080fd5b50356001600160a01b0316611d94565b6040805165ffffffffffff9092168252519081900360200190f35b61051a60048036036060811015610b3e57600080fd5b506001600160a01b03813581169160208101359091169060400135611dae565b6103f160048036036040811015610b7457600080fd5b506001600160a01b038135169060200135611e0b565b610b92611e2b565b6040805161ffff9092168252519081900360200190f35b61051a60048036036020811015610bbf57600080fd5b810190602081018135600160201b811115610bd957600080fd5b820183602082011115610beb57600080fd5b803590602001918460208302840111600160201b83111715610c0c57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611e31945050505050565b61067f60048036036040811015610c6057600080fd5b5080359060200135612031565b61067f60048036036020811015610c8357600080fd5b503561206c565b61051a60048036036060811015610ca057600080fd5b506001600160a01b0381358116916020810135909116906040013561209b565b61051a60048036036020811015610cd657600080fd5b50356120b6565b61051a60048036036060811015610cf357600080fd5b508035906020810135906040013561210f565b610d2360048036036020811015610d1c57600080fd5b5035612174565b6040805165ffffffffffff909316835261ffff90911660208301528051918290030190f35b61067f60048036036060811015610d5e57600080fd5b5080356001600160a01b031690602081013561ffff16906040013560ff166121ca565b6104d260048036036020811015610d9757600080fd5b5035612260565b6104d260048036036020811015610db457600080fd5b503565ffffffffffff1661237a565b610440612395565b61067f60048036036020811015610de157600080fd5b50356001600160a01b03166123ce565b61051a6123e9565b61051a60048036036060811015610e0f57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b811115610e4257600080fd5b820183602082011115610e5457600080fd5b803590602001918460208302840111600160201b83111715610e7557600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061247a945050505050565b61067f60048036036020811015610ec957600080fd5b50356124ac565b61067f60048036036060811015610ee657600080fd5b810190602081018135600160201b811115610f0057600080fd5b820183602082011115610f1257600080fd5b803590602001918460018302840111600160201b83111715610f3357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505061ffff83358116945060209093013590921691506124d29050565b6104d261278a565b61067f60048036036060811015610fa357600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610fcd57600080fd5b820183602082011115610fdf57600080fd5b803590602001918460208302840111600160201b8311171561100057600080fd5b919390929091602081019035600160201b81111561101d57600080fd5b82018360208201111561102f57600080fd5b803590602001918460208302840111600160201b8311171561105057600080fd5b509092509050612799565b6103f16128a7565b6104406128b8565b61067f612919565b61067f6004803603602081101561108957600080fd5b503561291f565b61051a600480360360408110156110a657600080fd5b506001600160a01b0381351690602001351515612944565b61051a600480360360408110156110d457600080fd5b5080359060200135612a10565b6110fe600480360360208110156110f757600080fd5b5035612a74565b604080519915158a5297151560208a015260ff968716898901529486166060890152928516608088015290841660a0870152831660c0860152821660e08501521661010083015251908190036101200190f35b61051a6004803603608081101561116757600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135612ae4565b6103f1600480360360208110156111a357600080fd5b5035612b08565b610d23600480360360208110156111c057600080fd5b5035612b1d565b61067f612b4f565b610b92600480360360208110156111e557600080fd5b5035612b55565b61051a6004803603608081101561120257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561123c57600080fd5b82018360208201111561124e57600080fd5b803590602001918460018302840111600160201b8311171561126f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612b8a945050505050565b6112cd600480360360208110156112c657600080fd5b5035612bdc565b6040805161ffff909316835260ff90911660208301528051918290030190f35b61051a6004803603602081101561130357600080fd5b5035612c46565b61067f6004803603602081101561132057600080fd5b5035612d0c565b61051a6004803603608081101561133d57600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135612d1e565b6104406004803603602081101561137957600080fd5b5035612d3b565b61067f6004803603606081101561139657600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156113c057600080fd5b8201836020820111156113d257600080fd5b803590602001918460208302840111600160201b831117156113f357600080fd5b919390929091602081019035600160201b81111561141057600080fd5b82018360208201111561142257600080fd5b803590602001918460208302840111600160201b8311171561144357600080fd5b509092509050612e95565b61067f6004803603604081101561146457600080fd5b5080359060200135612fa3565b6103f16004803603602081101561148757600080fd5b503561ffff16612fca565b6103f1600480360360208110156114a857600080fd5b5035612fdf565b61051a600480360360408110156114c557600080fd5b508035906020013560ff16613060565b6104d26131a5565b61067f6131b4565b6103f1600480360360408110156114fb57600080fd5b506001600160a01b03813581169160200135166131ba565b61051a6004803603604081101561152957600080fd5b506001600160a01b0381351690602001356131e8565b61051a6004803603602081101561155557600080fd5b50356001600160a01b03166133d3565b610b926004803603602081101561157b57600080fd5b5035613423565b61067f613430565b6115a7600480360360208110156115a057600080fd5b5035613436565b6040805161ffff938416815291909216602082015281519081900390910190f35b6001600160e01b0319811660009081526020819052604090205460ff165b919050565b601681815481106115f857fe5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156116a85780601f1061167d576101008083540402835291602001916116a8565b820191906000526020600020905b81548152906001019060200180831161168b57829003601f168201915b5050505050905090565b60006116bd82613462565b6116f85760405162461bcd60e51b815260040180806020018281038252602c815260200180614baf602c913960400191505060405180910390fd5b60096000600f848154811061170957fe5b6000918252602080832060058084049091015492066006026101000a90910465ffffffffffff1683528201929092526040019020546001600160a01b031692915050565b600061175882612260565b9050806001600160a01b0316836001600160a01b031614156117ab5760405162461bcd60e51b8152600401808060200182810382526021815260200180614c446021913960400191505060405180910390fd5b336001600160a01b03821614806117c757506117c781336131ba565b6118025760405162461bcd60e51b8152600401808060200182810382526038815260200180614b2e6038913960400191505060405180910390fd5b61180b8361347f565b600f838154811061181857fe5b90600052602060002090600591828204019190066006026101000a81548165ffffffffffff021916908365ffffffffffff16021790555081836001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b60005b81518110156118c7576118bf84848484815181106118b257fe5b6020026020010151611dae565b600101611898565b50505050565b60005b81518110156118fd576118f58282815181106118e857fe5b60200260200101516120b6565b6001016118d0565b5050565b600d5490565b61190f6128a7565b61194e576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b60005b8851811015611d2057600089828151811061196857fe5b6020026020010151905060008161ffff16116119c4576040805162461bcd60e51b815260206004820152601660248201527570726f746f206d757374206e6f74206265207a65726f60501b604482015290519081900360640190fd5b6119cc6149d0565b60198261ffff16815481106119dd57fe5b60009182526020918290206040805161012081018252929091015460ff808216158015855261010080840483161515968601969096526201000083048216938501939093526301000000820481166060850152600160201b820481166080850152650100000000008204811660a0850152600160301b8204811660c0850152600160381b8204811660e0850152600160401b90910416928201929092529150611abf576040805162461bcd60e51b815260206004820152600f60248201526e1c1c9bdd1bc81a5cc81b1bd8dad959608a1b604482015290519081900360640190fd5b6040518061012001604052806000151581526020016001151581526020018b8581518110611ae957fe5b602002602001015160ff1681526020018a8581518110611b0557fe5b602002602001015160ff168152602001898581518110611b2157fe5b602002602001015160ff168152602001888581518110611b3d57fe5b602002602001015160ff168152602001878581518110611b5957fe5b602002602001015160ff168152602001868581518110611b7557fe5b602002602001015160ff168152602001858581518110611b9157fe5b602002602001015160ff1681525060198361ffff1681548110611bb057fe5b9060005260206000200160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548160ff02191690831515021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff16021790555060808201518160000160046101000a81548160ff021916908360ff16021790555060a08201518160000160056101000a81548160ff021916908360ff16021790555060c08201518160000160066101000a81548160ff021916908360ff16021790555060e08201518160000160076101000a81548160ff021916908360ff1602179055506101008201518160000160086101000a81548160ff021916908360ff1602179055509050508161ffff167fe5d944d271f23cc2929e365ddfb8aa53de16aeb0e3c43908c454fc1110ceed7f60405160405180910390a25050600101611951565b505050505050505050565b611d336128a7565b611d72576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b601880546001600160a01b0319166001600160a01b0392909216919091179055565b600a6020526000908152604090205465ffffffffffff1681565b611db781612fdf565b611dfb576040805162461bcd60e51b815260206004820152601060248201526f6e6f7420796574207472616461626c6560801b604482015290519081900360640190fd5b611e06838383613582565b505050565b601c60209081526000928352604080842090915290825290205460ff1681565b61fde881565b611e396128a7565b611e78576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b6000815111611ebf576040805162461bcd60e51b815260206004820152600e60248201526d6d757374206c6f636b20736f6d6560901b604482015290519081900360640190fd5b60005b81518110156118fd576000828281518110611ed957fe5b6020026020010151905060008161ffff1611611f35576040805162461bcd60e51b815260206004820152601660248201527570726f746f206d757374206e6f74206265207a65726f60501b604482015290519081900360640190fd5b600060198261ffff1681548110611f4857fe5b6000918252602090912001805490915060ff1615611f9f576040805162461bcd60e51b815260206004820152600f60248201526e1c1c9bdd1bc81a5cc81b1bd8dad959608a1b604482015290519081900360640190fd5b8054610100900460ff16611fed576040805162461bcd60e51b815260206004820152601060248201526f1c1c9bdd1bc81b5d5cdd08195e1a5cdd60821b604482015290519081900360640190fd5b805460ff1916600117815560405161ffff8316907fe5d944d271f23cc2929e365ddfb8aa53de16aeb0e3c43908c454fc1110ceed7f90600090a25050600101611ec2565b604080516001602080830191909152818301859052606080830185905283518084039091018152608090920190925280519101205b92915050565b604080516000602080830191909152818301939093528151808203830181526060909101909152805191012090565b611e0683838360405180602001604052806000815250612b8a565b6120bf81612fdf565b612103576040805162461bcd60e51b815260206004820152601060248201526f6e6f7420796574207472616461626c6560801b604482015290519081900360640190fd5b61210c8161379f565b50565b6018546001600160a01b03163314612169576040805162461bcd60e51b815260206004820152601860248201527736bab9ba10313290383937b832b93a3c9036b0b730b3b2b960411b604482015290519081900360640190fd5b611e0683838361392d565b6000806010838154811061218457fe5b6000918252602090912001546010805465ffffffffffff90921691859081106121a957fe5b6000918252602090912001549094600160301b90910461ffff169350915050565b6000806121d885600161398c565b90506121e384613a67565b83601582815481106121f157fe5b90600052602060002090601091828204019190066002026101000a81548161ffff021916908361ffff160217905550826016828154811061222e57fe5b90600052602060002090602091828204019190066101000a81548160ff021916908360ff160217905550509392505050565b600080600e838154811061227057fe5b90600052602060002090600591828204019190066006029054906101000a900465ffffffffffff1690508065ffffffffffff16600014156123545760006122b6846124ac565b90506122c0614a1c565b601082815481106122cd57fe5b60009182526020918290206040805180820190915291015465ffffffffffff81168252600160301b900461ffff1691810182905291508201851061234f576040805162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b604482015290519081900360640190fd5b519150505b65ffffffffffff166000908152600960205260409020546001600160a01b031692915050565b6009602052600090815260409020546001600160a01b031681565b6040518060400160405280602081526020017f68747470733a2f2f6170692e696d6d757461626c652e636f6d2f746f6b656e2f81525081565b6001600160a01b031660009081526013602052604090205490565b6123f16128a7565b612430576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b6005546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600580546001600160a01b0319169055565b60005b81518110156118c7576124a4848484848151811061249757fe5b602002602001015161209b565b60010161247d565b600b54600090612066906124c6848263ffffffff613bd916565b9063ffffffff613c4316565b60006124dc6128a7565b61251b576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b60008361ffff161161256d576040805162461bcd60e51b81526020600482015260166024820152756d757374206e6f74206265207a65726f2070726f746f60501b604482015290519081900360640190fd5b8261ffff168261ffff16116125c1576040805162461bcd60e51b81526020600482015260156024820152746d75737420626520612076616c69642072616e676560581b604482015290519081900360640190fd5b601a5415806125f45750601a805460001981019081106125dd57fe5b60009182526020909120015461ffff908116908416115b61263e576040805162461bcd60e51b81526020600482015260166024820152750736561736f6e732063616e6e6f74206f7665726c61760541b604482015290519081900360640190fd5b6040805180820190915261ffff808416825284811660208301818152601a8054600181810180845560009390935295517f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e909101805493518616620100000263ffff00001992871661ffff19909516949094179190911692909217909155926017926126d592849290918989039091011685613ca3565b8361ffff168561ffff168361ffff167f894c7f27fb3eb8728566da10c21ff64cffafe6700bf22074e653fcd20acc8bba896040518080602001828103825283818151815260200191508051906020019080838360005b8381101561274357818101518382015260200161272b565b50505050905090810190601f1680156127705780820380516001836020036101000a031916815260200191505b509250505060405180910390a45061ffff16949350505050565b6005546001600160a01b031690565b6000836127e3576040805162461bcd60e51b81526020600482015260136024820152726d75737420626520736f6d652070726f746f7360681b604482015290519081900360640190fd5b8382146128215760405162461bcd60e51b815260040180806020018281038252602b815260200180614c90602b913960400191505060405180910390fd5b600061282d8786613ce7565b905061289d8187878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a925089918291850190849080828437600092019190915250613eaf92505050565b9695505050505050565b6005546001600160a01b0316331490565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156116a85780601f1061167d576101008083540402835291602001916116a8565b600d5481565b60006014600061292e8461206c565b8152602001908152602001600020549050919050565b6001600160a01b0382163314156129a2576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b6018546001600160a01b03163314612a6a576040805162461bcd60e51b815260206004820152601860248201527736bab9ba10313290383937b832b93a3c9036b0b730b3b2b960411b604482015290519081900360640190fd5b6118fd8282613ed2565b60198181548110612a8157fe5b60009182526020909120015460ff8082169250610100820481169162010000810482169163010000008204811691600160201b8104821691650100000000008204811691600160301b8104821691600160381b8204811691600160401b90041689565b815b81811015612b0157612af985858361209b565b600101612ae6565b5050505050565b601b6020526000908152604090205460ff1681565b60108181548110612b2a57fe5b60009182526020909120015465ffffffffffff81169150600160301b900461ffff1682565b60125481565b60178181548110612b6257fe5b9060005260206000209060109182820401919006600202915054906101000a900461ffff1681565b612b95848484611dae565b612ba184848484613f2b565b6118c75760405162461bcd60e51b8152600401808060200182810382526032815260200180614a346032913960400191505060405180910390fd5b60008060158381548110612bec57fe5b90600052602060002090601091828204019190066002029054906101000a900461ffff1660168481548110612c1d57fe5b90600052602060002090602091828204019190069054906101000a900460ff1691509150915091565b612c4e6128a7565b612c8d576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b6000818152601b602052604090205460ff1615612cf1576040805162461bcd60e51b815260206004820152601b60248201527f736561736f6e206d757374206e6f74206265207472616461626c650000000000604482015290519081900360640190fd5b6000908152601b60205260409020805460ff19166001179055565b60146020526000908152604090205481565b815b81811015612b0157612d33858583611dae565b600101612d20565b60606040518060400160405280602081526020017f68747470733a2f2f6170692e696d6d757461626c652e636f6d2f746f6b656e2f815250612d7c3061405f565b612d8584614205565b6040516020018084805190602001908083835b60208310612db75780518252601f199092019160209182019101612d98565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b60208310612dff5780518252601f199092019160209182019101612de0565b6001836020036101000a03801982511681845116808217855250505050505090500180602f60f81b81525060010182805190602001908083835b60208310612e585780518252601f199092019160209182019101612e39565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040529050919050565b600083612edf576040805162461bcd60e51b81526020600482015260136024820152726d75737420626520736f6d652070726f746f7360681b604482015290519081900360640190fd5b838214612f1d5760405162461bcd60e51b815260040180806020018281038252602b815260200180614c90602b913960400191505060405180910390fd5b6000612f29878661398c565b9050612f998187878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a925089918291850190849080828437600092019190915250613eaf92505050565b5095945050505050565b600060146000612fb38585612031565b815260200190815260200160002054905092915050565b601d6020526000908152604090205460ff1681565b6000601b6000601760158581548110612ff457fe5b90600052602060002090601091828204019190066002029054906101000a900461ffff1661ffff168154811061302657fe5b60009182526020808320601083040154600f9092166002026101000a90910461ffff16835282019290925260400190205460ff1692915050565b60006015838154811061306f57fe5b90600052602060002090601091828204019190066002029054906101000a900461ffff169050600060178261ffff16815481106130a857fe5b60009182526020808320601083040154338452601c82526040808520600f9094166002026101000a90910461ffff16808552929091529091205490915060ff166131235760405162461bcd60e51b815260040180806020018281038252602b815260200180614c65602b913960400191505060405180910390fd5b8260168460ff168154811061313457fe5b600091825260209182902082820401805460ff948516601f9093166101000a92830292850219169190911790556040805192861683523391830191909152805186927f892269e637adec3404715b55a46b36fba9383a540f8f5859b364909469fcd04d92908290030190a250505050565b6018546001600160a01b031681565b600c5481565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6131f06128a7565b61322f576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b601a5481111561327a576040805162461bcd60e51b81526020600482015260116024820152701cd9585cdbdb881b5d5cdd08195e1a5cdd607a1b604482015290519081900360640190fd5b600081116132c6576040805162461bcd60e51b81526020600482015260146024820152730736561736f6e206d757374206e6f7420626520360641b604482015290519081900360640190fd5b6001600160a01b0382166000908152601c6020908152604080832084845290915290205460ff161561333f576040805162461bcd60e51b815260206004820181905260248201527f7468697320666163746f727920697320616c726561647920617070726f766564604482015290519081900360640190fd5b6000818152601b602052604090205460ff16156133a3576040805162461bcd60e51b815260206004820152601b60248201527f736561736f6e206d757374206e6f74206265207472616461626c650000000000604482015290519081900360640190fd5b6001600160a01b039091166000908152601c6020908152604080832093835292905220805460ff19166001179055565b6133db6128a7565b61341a576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b61210c816142c9565b60158181548110612b6257fe5b600b5481565b601a818154811061344357fe5b60009182526020909120015461ffff8082169250620100009091041682565b60008061346e83612260565b6001600160a01b0316141592915050565b60006001600160a01b038216613497575060006115e6565b6001600160a01b0382166000908152600a602052604090205465ffffffffffff16806120665760115465ffffffffffff9081166001810190911611613517576040805162461bcd60e51b81526020600482015260116024820152706d757374206e6f74206f766572666c6f7760781b604482015290519081900360640190fd5b506011805465ffffffffffff8082166001810190911665ffffffffffff1992831617909255600082815260096020908152604080832080546001600160a01b0389166001600160a01b031990911681179091558352600a909152902080549091168217905592915050565b826001600160a01b031661359582612260565b6001600160a01b0316146135da5760405162461bcd60e51b8152600401808060200182810382526029815260200180614bfb6029913960400191505060405180910390fd5b6001600160a01b03821661361f5760405162461bcd60e51b8152600401808060200182810382526024815260200180614a8c6024913960400191505060405180910390fd5b613629338261436a565b6136645760405162461bcd60e51b8152600401808060200182810382526028815260200180614b876028913960400191505060405180910390fd5b600f818154811061367157fe5b90600052602060002090600591828204019190066006029054906101000a900465ffffffffffff1665ffffffffffff166000146136ef576000600f82815481106136b757fe5b90600052602060002090600591828204019190066006026101000a81548165ffffffffffff021916908365ffffffffffff1602179055505b6001600160a01b038084166000908152601360205260408082208054600019019055918416815220805460010190556137278261347f565b600e828154811061373457fe5b90600052602060002090600591828204019190066006026101000a81548165ffffffffffff021916908365ffffffffffff16021790555080826001600160a01b0316846001600160a01b0316600080516020614c2483398151915260405160405180910390a4505050565b6137a9338261436a565b6137fa576040805162461bcd60e51b815260206004820181905260248201527f63616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564604482015290519081900360640190fd5b600f818154811061380757fe5b90600052602060002090600591828204019190066006029054906101000a900465ffffffffffff1665ffffffffffff16600014613885576000600f828154811061384d57fe5b90600052602060002090600591828204019190066006026101000a81548165ffffffffffff021916908365ffffffffffff1602179055505b600061389082612260565b6001600160a01b03811660009081526013602052604081208054600019019055600e80549293509091849081106138c357fe5b60009182526020822060058083049091018054919092066006026101000a65ffffffffffff81810219909216949091160292909217909155600d80546000190190556040518391906001600160a01b03841690600080516020614c24833981519152908390a45050565b806014600061393c8686612031565b81526020019081526020016000208190555081837fe437ad402a50c14d9de944e1d68d9708776aaccb860bd49a6e875a64e7d0b22a836040518082815260200191505060405180910390a3505050565b60125460009061ffff83168101826139a38661347f565b9050825b82811015613a275760405181906001600160a01b03891690600090600080516020614c24833981519152908290a481600e82815481106139e357fe5b90600052602060002090600591828204019190066006026101000a81548165ffffffffffff021916908365ffffffffffff16021790555080806001019150506139a7565b50506012805461ffff959095169485019055506001600160a01b0393909316600090815260136020526040902080548301905550600d8054909101905590565b61fde861ffff821610613b005761ffff81166000908152601d602052604090205460ff1615613add576040805162461bcd60e51b815260206004820152601f60248201527f6d79746869632068617320616c7265616479206265656e206372656174656400604482015290519081900360640190fd5b61ffff81166000908152601d60205260409020805460ff1916600117905561210c565b600060178261ffff1681548110613b1357fe5b60009182526020909120601082040154600f9091166002026101000a900461ffff16905080613b80576040805162461bcd60e51b81526020600482015260146024820152731b5d5cdd081a185d99481cd9585cdbdb881cd95d60621b604482015290519081900360640190fd5b336000908152601c6020908152604080832084845290915290205460ff166118fd5760405162461bcd60e51b8152600401808060200182810382526028815260200180614b066028913960400191505060405180910390fd5b6000808211613c2f576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b6000828481613c3a57fe5b04949350505050565b600082613c5257506000612066565b82820282848281613c5f57fe5b0414613c9c5760405162461bcd60e51b8152600401808060200182810382526021815260200180614b666021913960400191505060405180910390fd5b9392505050565b6060613cb28585601086614406565b905060005b83811015613cd957613cd182866010848761ffff166144cc565b600101613cb7565b50612b018585601084614554565b60006001600160a01b038316613d37576040805162461bcd60e51b815260206004820152601060248201526f1b5d5cdd081b9bdd081899481b9d5b1b60821b604482015290519081900360640190fd5b60008261ffff16118015613d515750600b548261ffff1611155b613da2576040805162461bcd60e51b815260206004820152601a60248201527f73697a65206d7573742062652077697468696e206c696d697473000000000000604482015290519081900360640190fd5b6000613dac6145b1565b90506000613db98561347f565b905060405180604001604052808265ffffffffffff1681526020018561ffff1681525060108381548110613de957fe5b6000918252602091829020835191018054939092015165ffffffffffff1990931665ffffffffffff9091161767ffff0000000000001916600160301b61ffff9384160217905584168201825b81811015613e6b5760405181906001600160a01b03891690600090600080516020614c24833981519152908290a4600101613e35565b5050600b54600c80549091019055506001600160a01b03939093166000908152601360205260409020805461ffff93909316928301905550600d8054909101905590565b613eb8826145de565b6015613ec5818585614828565b6016612b01818685614881565b60408051828152905183917fa065fb8968d66241513c49df78364990dc9917fcd41ede326cef2c15e82f4aec919081900360200190a28060146000613f168561206c565b81526020810191909152604001600020555050565b6000613f3f846001600160a01b03166148d9565b613f4b57506001614057565b604051630a85bd0160e11b815233600482018181526001600160a01b03888116602485015260448401879052608060648501908152865160848601528651600095928a169463150b7a029490938c938b938b939260a4019060208501908083838e5b83811015613fc5578181015183820152602001613fad565b50505050905090810190601f168015613ff25780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561401457600080fd5b505af1158015614028573d6000803e3d6000fd5b505050506040513d602081101561403e57600080fd5b50516001600160e01b031916630a85bd0160e11b149150505b949350505050565b60408051602a80825260608281019093526001600160a01b038416918391602082018180388339019050509050600360fc1b8160008151811061409e57fe5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106140c757fe5b60200101906001600160f81b031916908160001a90535060005b60148110156141fd576040518060400160405280601081526020016f181899199a1a9b1b9c1cb0b131b232b360811b81525060048483600c016020811061412457fe5b1a60f81b6001600160f81b031916901c60f81c60ff168151811061414457fe5b602001015160f81c60f81b82826002026002018151811061416157fe5b60200101906001600160f81b031916908160001a9053506040518060400160405280601081526020016f181899199a1a9b1b9c1cb0b131b232b360811b8152508382600c01602081106141b057fe5b825191901a600f169081106141c157fe5b602001015160f81c60f81b8282600202600301815181106141de57fe5b60200101906001600160f81b031916908160001a9053506001016140e1565b509392505050565b60608161422a57506040805180820190915260018152600360fc1b60208201526115e6565b8160005b811561424257600101600a8204915061422e565b6060816040519080825280601f01601f19166020018201604052801561426f576020820181803883390190505b50859350905060001982015b83156142c057600a840660300160f81b8282806001900393508151811061429e57fe5b60200101906001600160f81b031916908160001a905350600a8404935061427b565b50949350505050565b6001600160a01b03811661430e5760405162461bcd60e51b8152600401808060200182810382526026815260200180614a666026913960400191505060405180910390fd5b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b600061437582613462565b6143b05760405162461bcd60e51b815260040180806020018281038252602c815260200180614ab0602c913960400191505060405180910390fd5b60006143bb83612260565b9050806001600160a01b0316846001600160a01b031614806143f65750836001600160a01b03166143eb846116b2565b6001600160a01b0316145b80614057575061405781856131ba565b606060006144158585856148df565b905080604051908082528060200260200182016040528015614441578160200160208202803883390190505b5091506000614450868661490f565b905061445c8782614922565b8360008151811061446957fe5b60200260200101818152505060018211156144c2576000614499614493888763ffffffff61493816565b8761490f565b90506144a58882614922565b8460018503815181106144b457fe5b602002602001018181525050505b5050949350505050565b600083610100816144d957fe5b04905060008186816144e757fe5b069050600082858301816144f757fe5b049050600086848988018161450857fe5b0602905060005b87811015614548578082018187901c60ff16901b8a848151811061452f57fe5b602090810291909101018051909117905260080161450f565b50505050505050505050565b6000614573836101008161456457fe5b8691900463ffffffff613bd916565b905060005b82518110156145a9576145a18682840185848151811061459457fe5b6020026020010151614992565b600101614578565b505050505050565b6000600c5460125411156145d7576145d3600b546124c6601254600b546149a7565b600c555b50600c5490565b600061ffff815b83518110156146d45760008482815181106145fc57fe5b6020026020010151905061fde861ffff168161ffff16106146a35761ffff81166000908152601d602052604090205460ff1615614680576040805162461bcd60e51b815260206004820152601f60248201527f6d79746869632068617320616c7265616479206265656e206372656174656400604482015290519081900360640190fd5b61ffff81166000908152601d60205260409020805460ff191660011790556146cb565b8361ffff168161ffff1611156146b7578093505b8061ffff168361ffff1611156146cb578092505b506001016145e5565b5061ffff821615611e0657600060178361ffff16815481106146f257fe5b60009182526020909120601082040154600f9091166002026101000a900461ffff1690508061475f576040805162461bcd60e51b81526020600482015260146024820152731b5d5cdd081a185d99481cd9585cdbdb881cd95d60621b604482015290519081900360640190fd5b60178261ffff168154811061477057fe5b60009182526020909120601082040154600f9091166002026101000a900461ffff1681146147cf5760405162461bcd60e51b815260040180806020018281038252602a815260200180614adc602a913960400191505060405180910390fd5b336000908152601c6020908152604080832084845290915290205460ff166118c75760405162461bcd60e51b8152600401808060200182810382526028815260200180614b066028913960400191505060405180910390fd5b6060614838848460108551614406565b905060005b82518110156148735761486b828560108487868151811061485a57fe5b602002602001015161ffff166144cc565b60010161483d565b506118c78484601084614554565b6060614891848460208551614406565b905060005b82518110156148cb576148c382856008848786815181106148b357fe5b602002602001015160ff166144cc565b600101614896565b506118c78484600884614554565b3b151590565b6000808385816148eb57fe5b049050600084848701816148fb57fe5b049050818103600101925050509392505050565b600081838161491a57fe5b049392505050565b60008061492f84846149c1565b54949350505050565b600082820183811015613c9c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061499e84846149c1565b91909155505050565b60008160018403816149b557fe5b04600101905092915050565b60405191825260209091200190565b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081019190915290565b60408051808201909152600080825260208201529056fe4552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e63616e206f6e6c79206372656174652063617264732066726f6d207468652073616d6520736561736f6e6d75737420626520617070726f76656420666163746f727920666f72207468697320736561736f6e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776eddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef4552433732313a20617070726f76616c20746f2063757272656e74206f776e6572666163746f72792063616e2774206368616e6765207175616c697479206f66207468697320736561736f6e6d757374206265207468652073616d65206e756d626572206f662070726f746f732f7175616c6974696573a265627a7a723158203ce802971423cc4f6c7c6ff35cab96695c1bd5056c810083f86d668b708bb23a64736f6c634300050b003200000000000000000000000000000000000000000000000000000000000004e3000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000014476f647320556e636861696e656420436172647300000000000000000000000000000000000000000000000000000000000000000000000000000000000000044341524400000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103c55760003560e01c80638e08fc96116101ff578063bd1562731161011a578063e7356cb5116100ad578063f2fde38b1161007c578063f2fde38b1461153f578063f3beae6b14611565578063f4daaba114611582578063f5d709a11461158a576103c5565b8063e7356cb5146114d5578063e7c51f1b146114dd578063e985e9c5146114e5578063ef42259b14611513576103c5565b8063cdc2cfe2116100e9578063cdc2cfe21461144e578063e0c931df14611471578063e27aa1d814611492578063e3fb1ac6146114af576103c5565b8063bd1562731461130a578063c5f4127a14611327578063c87b56dd14611363578063c8be6b9b14611380576103c5565b8063b0c4297c11610192578063b76e8d0111610161578063b76e8d01146111cf578063b88d4fde146111ec578063b93a89f7146112b0578063bc048525146112ed576103c5565b8063b0c4297c14611151578063b309c36b1461118d578063b32c4d8d146111aa578063b4654a43146111c7576103c5565b8063a138e44e116101ce578063a138e44e14611073578063a22cb46514611090578063a9c1a200146110be578063ab17d040146110e1576103c5565b80638e08fc9614610f8d5780638f32d59b1461105b57806395d89b41146110635780639f181b5e1461106b576103c5565b806337514295116102ef5780636602eaf9116102825780637962d59b116102515780637962d59b14610df9578063815d9fa014610eb3578063856516c314610ed05780638da5cb5b14610f85576103c5565b80636602eaf914610d9e5780636c0360eb14610dc357806370a0823114610dcb578063715018a614610df1576103c5565b806358895f62116102be57806358895f6214610cdd5780635ac4428214610d065780635b65afe914610d485780636352211e14610d81576103c5565b80633751429514610c4a5780633af0725614610c6d57806342842e0e14610c8a57806342966c6814610cc0576103c5565b806318160ddd1161036757806323b872dd1161033657806323b872dd14610b285780632488508714610b5e57806324a01da114610b8a5780632fa438a314610ba9576103c5565b806318160ddd146106775780631e41613c146106915780631e50739314610ac15780631fe25e4f14610ae7576103c5565b8063081812fc116103a3578063081812fc146104b5578063095ea7b3146104ee5780630bbe0ee31461051c578063100cdd91146105d6576103c5565b806301ffc9a7146103ca57806302b19cea1461040557806306fdde0314610438575b600080fd5b6103f1600480360360208110156103e057600080fd5b50356001600160e01b0319166115c8565b604080519115158252519081900360200190f35b6104226004803603602081101561041b57600080fd5b50356115eb565b6040805160ff9092168252519081900360200190f35b61044061161c565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561047a578181015183820152602001610462565b50505050905090810190601f1680156104a75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104d2600480360360208110156104cb57600080fd5b50356116b2565b604080516001600160a01b039092168252519081900360200190f35b61051a6004803603604081101561050457600080fd5b506001600160a01b03813516906020013561174d565b005b61051a6004803603606081101561053257600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561056557600080fd5b82018360208201111561057757600080fd5b803590602001918460208302840111600160201b8311171561059857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611895945050505050565b61051a600480360360208110156105ec57600080fd5b810190602081018135600160201b81111561060657600080fd5b82018360208201111561061857600080fd5b803590602001918460208302840111600160201b8311171561063957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506118cd945050505050565b61067f611901565b60408051918252519081900360200190f35b61051a60048036036101008110156106a857600080fd5b810190602081018135600160201b8111156106c257600080fd5b8201836020820111156106d457600080fd5b803590602001918460208302840111600160201b831117156106f557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561074457600080fd5b82018360208201111561075657600080fd5b803590602001918460208302840111600160201b8311171561077757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156107c657600080fd5b8201836020820111156107d857600080fd5b803590602001918460208302840111600160201b831117156107f957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561084857600080fd5b82018360208201111561085a57600080fd5b803590602001918460208302840111600160201b8311171561087b57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156108ca57600080fd5b8201836020820111156108dc57600080fd5b803590602001918460208302840111600160201b831117156108fd57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561094c57600080fd5b82018360208201111561095e57600080fd5b803590602001918460208302840111600160201b8311171561097f57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156109ce57600080fd5b8201836020820111156109e057600080fd5b803590602001918460208302840111600160201b83111715610a0157600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610a5057600080fd5b820183602082011115610a6257600080fd5b803590602001918460208302840111600160201b83111715610a8357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611907945050505050565b61051a60048036036020811015610ad757600080fd5b50356001600160a01b0316611d2b565b610b0d60048036036020811015610afd57600080fd5b50356001600160a01b0316611d94565b6040805165ffffffffffff9092168252519081900360200190f35b61051a60048036036060811015610b3e57600080fd5b506001600160a01b03813581169160208101359091169060400135611dae565b6103f160048036036040811015610b7457600080fd5b506001600160a01b038135169060200135611e0b565b610b92611e2b565b6040805161ffff9092168252519081900360200190f35b61051a60048036036020811015610bbf57600080fd5b810190602081018135600160201b811115610bd957600080fd5b820183602082011115610beb57600080fd5b803590602001918460208302840111600160201b83111715610c0c57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611e31945050505050565b61067f60048036036040811015610c6057600080fd5b5080359060200135612031565b61067f60048036036020811015610c8357600080fd5b503561206c565b61051a60048036036060811015610ca057600080fd5b506001600160a01b0381358116916020810135909116906040013561209b565b61051a60048036036020811015610cd657600080fd5b50356120b6565b61051a60048036036060811015610cf357600080fd5b508035906020810135906040013561210f565b610d2360048036036020811015610d1c57600080fd5b5035612174565b6040805165ffffffffffff909316835261ffff90911660208301528051918290030190f35b61067f60048036036060811015610d5e57600080fd5b5080356001600160a01b031690602081013561ffff16906040013560ff166121ca565b6104d260048036036020811015610d9757600080fd5b5035612260565b6104d260048036036020811015610db457600080fd5b503565ffffffffffff1661237a565b610440612395565b61067f60048036036020811015610de157600080fd5b50356001600160a01b03166123ce565b61051a6123e9565b61051a60048036036060811015610e0f57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b811115610e4257600080fd5b820183602082011115610e5457600080fd5b803590602001918460208302840111600160201b83111715610e7557600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061247a945050505050565b61067f60048036036020811015610ec957600080fd5b50356124ac565b61067f60048036036060811015610ee657600080fd5b810190602081018135600160201b811115610f0057600080fd5b820183602082011115610f1257600080fd5b803590602001918460018302840111600160201b83111715610f3357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505061ffff83358116945060209093013590921691506124d29050565b6104d261278a565b61067f60048036036060811015610fa357600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610fcd57600080fd5b820183602082011115610fdf57600080fd5b803590602001918460208302840111600160201b8311171561100057600080fd5b919390929091602081019035600160201b81111561101d57600080fd5b82018360208201111561102f57600080fd5b803590602001918460208302840111600160201b8311171561105057600080fd5b509092509050612799565b6103f16128a7565b6104406128b8565b61067f612919565b61067f6004803603602081101561108957600080fd5b503561291f565b61051a600480360360408110156110a657600080fd5b506001600160a01b0381351690602001351515612944565b61051a600480360360408110156110d457600080fd5b5080359060200135612a10565b6110fe600480360360208110156110f757600080fd5b5035612a74565b604080519915158a5297151560208a015260ff968716898901529486166060890152928516608088015290841660a0870152831660c0860152821660e08501521661010083015251908190036101200190f35b61051a6004803603608081101561116757600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135612ae4565b6103f1600480360360208110156111a357600080fd5b5035612b08565b610d23600480360360208110156111c057600080fd5b5035612b1d565b61067f612b4f565b610b92600480360360208110156111e557600080fd5b5035612b55565b61051a6004803603608081101561120257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561123c57600080fd5b82018360208201111561124e57600080fd5b803590602001918460018302840111600160201b8311171561126f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612b8a945050505050565b6112cd600480360360208110156112c657600080fd5b5035612bdc565b6040805161ffff909316835260ff90911660208301528051918290030190f35b61051a6004803603602081101561130357600080fd5b5035612c46565b61067f6004803603602081101561132057600080fd5b5035612d0c565b61051a6004803603608081101561133d57600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135612d1e565b6104406004803603602081101561137957600080fd5b5035612d3b565b61067f6004803603606081101561139657600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156113c057600080fd5b8201836020820111156113d257600080fd5b803590602001918460208302840111600160201b831117156113f357600080fd5b919390929091602081019035600160201b81111561141057600080fd5b82018360208201111561142257600080fd5b803590602001918460208302840111600160201b8311171561144357600080fd5b509092509050612e95565b61067f6004803603604081101561146457600080fd5b5080359060200135612fa3565b6103f16004803603602081101561148757600080fd5b503561ffff16612fca565b6103f1600480360360208110156114a857600080fd5b5035612fdf565b61051a600480360360408110156114c557600080fd5b508035906020013560ff16613060565b6104d26131a5565b61067f6131b4565b6103f1600480360360408110156114fb57600080fd5b506001600160a01b03813581169160200135166131ba565b61051a6004803603604081101561152957600080fd5b506001600160a01b0381351690602001356131e8565b61051a6004803603602081101561155557600080fd5b50356001600160a01b03166133d3565b610b926004803603602081101561157b57600080fd5b5035613423565b61067f613430565b6115a7600480360360208110156115a057600080fd5b5035613436565b6040805161ffff938416815291909216602082015281519081900390910190f35b6001600160e01b0319811660009081526020819052604090205460ff165b919050565b601681815481106115f857fe5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156116a85780601f1061167d576101008083540402835291602001916116a8565b820191906000526020600020905b81548152906001019060200180831161168b57829003601f168201915b5050505050905090565b60006116bd82613462565b6116f85760405162461bcd60e51b815260040180806020018281038252602c815260200180614baf602c913960400191505060405180910390fd5b60096000600f848154811061170957fe5b6000918252602080832060058084049091015492066006026101000a90910465ffffffffffff1683528201929092526040019020546001600160a01b031692915050565b600061175882612260565b9050806001600160a01b0316836001600160a01b031614156117ab5760405162461bcd60e51b8152600401808060200182810382526021815260200180614c446021913960400191505060405180910390fd5b336001600160a01b03821614806117c757506117c781336131ba565b6118025760405162461bcd60e51b8152600401808060200182810382526038815260200180614b2e6038913960400191505060405180910390fd5b61180b8361347f565b600f838154811061181857fe5b90600052602060002090600591828204019190066006026101000a81548165ffffffffffff021916908365ffffffffffff16021790555081836001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b60005b81518110156118c7576118bf84848484815181106118b257fe5b6020026020010151611dae565b600101611898565b50505050565b60005b81518110156118fd576118f58282815181106118e857fe5b60200260200101516120b6565b6001016118d0565b5050565b600d5490565b61190f6128a7565b61194e576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b60005b8851811015611d2057600089828151811061196857fe5b6020026020010151905060008161ffff16116119c4576040805162461bcd60e51b815260206004820152601660248201527570726f746f206d757374206e6f74206265207a65726f60501b604482015290519081900360640190fd5b6119cc6149d0565b60198261ffff16815481106119dd57fe5b60009182526020918290206040805161012081018252929091015460ff808216158015855261010080840483161515968601969096526201000083048216938501939093526301000000820481166060850152600160201b820481166080850152650100000000008204811660a0850152600160301b8204811660c0850152600160381b8204811660e0850152600160401b90910416928201929092529150611abf576040805162461bcd60e51b815260206004820152600f60248201526e1c1c9bdd1bc81a5cc81b1bd8dad959608a1b604482015290519081900360640190fd5b6040518061012001604052806000151581526020016001151581526020018b8581518110611ae957fe5b602002602001015160ff1681526020018a8581518110611b0557fe5b602002602001015160ff168152602001898581518110611b2157fe5b602002602001015160ff168152602001888581518110611b3d57fe5b602002602001015160ff168152602001878581518110611b5957fe5b602002602001015160ff168152602001868581518110611b7557fe5b602002602001015160ff168152602001858581518110611b9157fe5b602002602001015160ff1681525060198361ffff1681548110611bb057fe5b9060005260206000200160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548160ff02191690831515021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff16021790555060808201518160000160046101000a81548160ff021916908360ff16021790555060a08201518160000160056101000a81548160ff021916908360ff16021790555060c08201518160000160066101000a81548160ff021916908360ff16021790555060e08201518160000160076101000a81548160ff021916908360ff1602179055506101008201518160000160086101000a81548160ff021916908360ff1602179055509050508161ffff167fe5d944d271f23cc2929e365ddfb8aa53de16aeb0e3c43908c454fc1110ceed7f60405160405180910390a25050600101611951565b505050505050505050565b611d336128a7565b611d72576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b601880546001600160a01b0319166001600160a01b0392909216919091179055565b600a6020526000908152604090205465ffffffffffff1681565b611db781612fdf565b611dfb576040805162461bcd60e51b815260206004820152601060248201526f6e6f7420796574207472616461626c6560801b604482015290519081900360640190fd5b611e06838383613582565b505050565b601c60209081526000928352604080842090915290825290205460ff1681565b61fde881565b611e396128a7565b611e78576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b6000815111611ebf576040805162461bcd60e51b815260206004820152600e60248201526d6d757374206c6f636b20736f6d6560901b604482015290519081900360640190fd5b60005b81518110156118fd576000828281518110611ed957fe5b6020026020010151905060008161ffff1611611f35576040805162461bcd60e51b815260206004820152601660248201527570726f746f206d757374206e6f74206265207a65726f60501b604482015290519081900360640190fd5b600060198261ffff1681548110611f4857fe5b6000918252602090912001805490915060ff1615611f9f576040805162461bcd60e51b815260206004820152600f60248201526e1c1c9bdd1bc81a5cc81b1bd8dad959608a1b604482015290519081900360640190fd5b8054610100900460ff16611fed576040805162461bcd60e51b815260206004820152601060248201526f1c1c9bdd1bc81b5d5cdd08195e1a5cdd60821b604482015290519081900360640190fd5b805460ff1916600117815560405161ffff8316907fe5d944d271f23cc2929e365ddfb8aa53de16aeb0e3c43908c454fc1110ceed7f90600090a25050600101611ec2565b604080516001602080830191909152818301859052606080830185905283518084039091018152608090920190925280519101205b92915050565b604080516000602080830191909152818301939093528151808203830181526060909101909152805191012090565b611e0683838360405180602001604052806000815250612b8a565b6120bf81612fdf565b612103576040805162461bcd60e51b815260206004820152601060248201526f6e6f7420796574207472616461626c6560801b604482015290519081900360640190fd5b61210c8161379f565b50565b6018546001600160a01b03163314612169576040805162461bcd60e51b815260206004820152601860248201527736bab9ba10313290383937b832b93a3c9036b0b730b3b2b960411b604482015290519081900360640190fd5b611e0683838361392d565b6000806010838154811061218457fe5b6000918252602090912001546010805465ffffffffffff90921691859081106121a957fe5b6000918252602090912001549094600160301b90910461ffff169350915050565b6000806121d885600161398c565b90506121e384613a67565b83601582815481106121f157fe5b90600052602060002090601091828204019190066002026101000a81548161ffff021916908361ffff160217905550826016828154811061222e57fe5b90600052602060002090602091828204019190066101000a81548160ff021916908360ff160217905550509392505050565b600080600e838154811061227057fe5b90600052602060002090600591828204019190066006029054906101000a900465ffffffffffff1690508065ffffffffffff16600014156123545760006122b6846124ac565b90506122c0614a1c565b601082815481106122cd57fe5b60009182526020918290206040805180820190915291015465ffffffffffff81168252600160301b900461ffff1691810182905291508201851061234f576040805162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b604482015290519081900360640190fd5b519150505b65ffffffffffff166000908152600960205260409020546001600160a01b031692915050565b6009602052600090815260409020546001600160a01b031681565b6040518060400160405280602081526020017f68747470733a2f2f6170692e696d6d757461626c652e636f6d2f746f6b656e2f81525081565b6001600160a01b031660009081526013602052604090205490565b6123f16128a7565b612430576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b6005546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600580546001600160a01b0319169055565b60005b81518110156118c7576124a4848484848151811061249757fe5b602002602001015161209b565b60010161247d565b600b54600090612066906124c6848263ffffffff613bd916565b9063ffffffff613c4316565b60006124dc6128a7565b61251b576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b60008361ffff161161256d576040805162461bcd60e51b81526020600482015260166024820152756d757374206e6f74206265207a65726f2070726f746f60501b604482015290519081900360640190fd5b8261ffff168261ffff16116125c1576040805162461bcd60e51b81526020600482015260156024820152746d75737420626520612076616c69642072616e676560581b604482015290519081900360640190fd5b601a5415806125f45750601a805460001981019081106125dd57fe5b60009182526020909120015461ffff908116908416115b61263e576040805162461bcd60e51b81526020600482015260166024820152750736561736f6e732063616e6e6f74206f7665726c61760541b604482015290519081900360640190fd5b6040805180820190915261ffff808416825284811660208301818152601a8054600181810180845560009390935295517f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e909101805493518616620100000263ffff00001992871661ffff19909516949094179190911692909217909155926017926126d592849290918989039091011685613ca3565b8361ffff168561ffff168361ffff167f894c7f27fb3eb8728566da10c21ff64cffafe6700bf22074e653fcd20acc8bba896040518080602001828103825283818151815260200191508051906020019080838360005b8381101561274357818101518382015260200161272b565b50505050905090810190601f1680156127705780820380516001836020036101000a031916815260200191505b509250505060405180910390a45061ffff16949350505050565b6005546001600160a01b031690565b6000836127e3576040805162461bcd60e51b81526020600482015260136024820152726d75737420626520736f6d652070726f746f7360681b604482015290519081900360640190fd5b8382146128215760405162461bcd60e51b815260040180806020018281038252602b815260200180614c90602b913960400191505060405180910390fd5b600061282d8786613ce7565b905061289d8187878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a925089918291850190849080828437600092019190915250613eaf92505050565b9695505050505050565b6005546001600160a01b0316331490565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156116a85780601f1061167d576101008083540402835291602001916116a8565b600d5481565b60006014600061292e8461206c565b8152602001908152602001600020549050919050565b6001600160a01b0382163314156129a2576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b6018546001600160a01b03163314612a6a576040805162461bcd60e51b815260206004820152601860248201527736bab9ba10313290383937b832b93a3c9036b0b730b3b2b960411b604482015290519081900360640190fd5b6118fd8282613ed2565b60198181548110612a8157fe5b60009182526020909120015460ff8082169250610100820481169162010000810482169163010000008204811691600160201b8104821691650100000000008204811691600160301b8104821691600160381b8204811691600160401b90041689565b815b81811015612b0157612af985858361209b565b600101612ae6565b5050505050565b601b6020526000908152604090205460ff1681565b60108181548110612b2a57fe5b60009182526020909120015465ffffffffffff81169150600160301b900461ffff1682565b60125481565b60178181548110612b6257fe5b9060005260206000209060109182820401919006600202915054906101000a900461ffff1681565b612b95848484611dae565b612ba184848484613f2b565b6118c75760405162461bcd60e51b8152600401808060200182810382526032815260200180614a346032913960400191505060405180910390fd5b60008060158381548110612bec57fe5b90600052602060002090601091828204019190066002029054906101000a900461ffff1660168481548110612c1d57fe5b90600052602060002090602091828204019190069054906101000a900460ff1691509150915091565b612c4e6128a7565b612c8d576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b6000818152601b602052604090205460ff1615612cf1576040805162461bcd60e51b815260206004820152601b60248201527f736561736f6e206d757374206e6f74206265207472616461626c650000000000604482015290519081900360640190fd5b6000908152601b60205260409020805460ff19166001179055565b60146020526000908152604090205481565b815b81811015612b0157612d33858583611dae565b600101612d20565b60606040518060400160405280602081526020017f68747470733a2f2f6170692e696d6d757461626c652e636f6d2f746f6b656e2f815250612d7c3061405f565b612d8584614205565b6040516020018084805190602001908083835b60208310612db75780518252601f199092019160209182019101612d98565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b60208310612dff5780518252601f199092019160209182019101612de0565b6001836020036101000a03801982511681845116808217855250505050505090500180602f60f81b81525060010182805190602001908083835b60208310612e585780518252601f199092019160209182019101612e39565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040529050919050565b600083612edf576040805162461bcd60e51b81526020600482015260136024820152726d75737420626520736f6d652070726f746f7360681b604482015290519081900360640190fd5b838214612f1d5760405162461bcd60e51b815260040180806020018281038252602b815260200180614c90602b913960400191505060405180910390fd5b6000612f29878661398c565b9050612f998187878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a925089918291850190849080828437600092019190915250613eaf92505050565b5095945050505050565b600060146000612fb38585612031565b815260200190815260200160002054905092915050565b601d6020526000908152604090205460ff1681565b6000601b6000601760158581548110612ff457fe5b90600052602060002090601091828204019190066002029054906101000a900461ffff1661ffff168154811061302657fe5b60009182526020808320601083040154600f9092166002026101000a90910461ffff16835282019290925260400190205460ff1692915050565b60006015838154811061306f57fe5b90600052602060002090601091828204019190066002029054906101000a900461ffff169050600060178261ffff16815481106130a857fe5b60009182526020808320601083040154338452601c82526040808520600f9094166002026101000a90910461ffff16808552929091529091205490915060ff166131235760405162461bcd60e51b815260040180806020018281038252602b815260200180614c65602b913960400191505060405180910390fd5b8260168460ff168154811061313457fe5b600091825260209182902082820401805460ff948516601f9093166101000a92830292850219169190911790556040805192861683523391830191909152805186927f892269e637adec3404715b55a46b36fba9383a540f8f5859b364909469fcd04d92908290030190a250505050565b6018546001600160a01b031681565b600c5481565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6131f06128a7565b61322f576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b601a5481111561327a576040805162461bcd60e51b81526020600482015260116024820152701cd9585cdbdb881b5d5cdd08195e1a5cdd607a1b604482015290519081900360640190fd5b600081116132c6576040805162461bcd60e51b81526020600482015260146024820152730736561736f6e206d757374206e6f7420626520360641b604482015290519081900360640190fd5b6001600160a01b0382166000908152601c6020908152604080832084845290915290205460ff161561333f576040805162461bcd60e51b815260206004820181905260248201527f7468697320666163746f727920697320616c726561647920617070726f766564604482015290519081900360640190fd5b6000818152601b602052604090205460ff16156133a3576040805162461bcd60e51b815260206004820152601b60248201527f736561736f6e206d757374206e6f74206265207472616461626c650000000000604482015290519081900360640190fd5b6001600160a01b039091166000908152601c6020908152604080832093835292905220805460ff19166001179055565b6133db6128a7565b61341a576040805162461bcd60e51b81526020600482018190526024820152600080516020614bdb833981519152604482015290519081900360640190fd5b61210c816142c9565b60158181548110612b6257fe5b600b5481565b601a818154811061344357fe5b60009182526020909120015461ffff8082169250620100009091041682565b60008061346e83612260565b6001600160a01b0316141592915050565b60006001600160a01b038216613497575060006115e6565b6001600160a01b0382166000908152600a602052604090205465ffffffffffff16806120665760115465ffffffffffff9081166001810190911611613517576040805162461bcd60e51b81526020600482015260116024820152706d757374206e6f74206f766572666c6f7760781b604482015290519081900360640190fd5b506011805465ffffffffffff8082166001810190911665ffffffffffff1992831617909255600082815260096020908152604080832080546001600160a01b0389166001600160a01b031990911681179091558352600a909152902080549091168217905592915050565b826001600160a01b031661359582612260565b6001600160a01b0316146135da5760405162461bcd60e51b8152600401808060200182810382526029815260200180614bfb6029913960400191505060405180910390fd5b6001600160a01b03821661361f5760405162461bcd60e51b8152600401808060200182810382526024815260200180614a8c6024913960400191505060405180910390fd5b613629338261436a565b6136645760405162461bcd60e51b8152600401808060200182810382526028815260200180614b876028913960400191505060405180910390fd5b600f818154811061367157fe5b90600052602060002090600591828204019190066006029054906101000a900465ffffffffffff1665ffffffffffff166000146136ef576000600f82815481106136b757fe5b90600052602060002090600591828204019190066006026101000a81548165ffffffffffff021916908365ffffffffffff1602179055505b6001600160a01b038084166000908152601360205260408082208054600019019055918416815220805460010190556137278261347f565b600e828154811061373457fe5b90600052602060002090600591828204019190066006026101000a81548165ffffffffffff021916908365ffffffffffff16021790555080826001600160a01b0316846001600160a01b0316600080516020614c2483398151915260405160405180910390a4505050565b6137a9338261436a565b6137fa576040805162461bcd60e51b815260206004820181905260248201527f63616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564604482015290519081900360640190fd5b600f818154811061380757fe5b90600052602060002090600591828204019190066006029054906101000a900465ffffffffffff1665ffffffffffff16600014613885576000600f828154811061384d57fe5b90600052602060002090600591828204019190066006026101000a81548165ffffffffffff021916908365ffffffffffff1602179055505b600061389082612260565b6001600160a01b03811660009081526013602052604081208054600019019055600e80549293509091849081106138c357fe5b60009182526020822060058083049091018054919092066006026101000a65ffffffffffff81810219909216949091160292909217909155600d80546000190190556040518391906001600160a01b03841690600080516020614c24833981519152908390a45050565b806014600061393c8686612031565b81526020019081526020016000208190555081837fe437ad402a50c14d9de944e1d68d9708776aaccb860bd49a6e875a64e7d0b22a836040518082815260200191505060405180910390a3505050565b60125460009061ffff83168101826139a38661347f565b9050825b82811015613a275760405181906001600160a01b03891690600090600080516020614c24833981519152908290a481600e82815481106139e357fe5b90600052602060002090600591828204019190066006026101000a81548165ffffffffffff021916908365ffffffffffff16021790555080806001019150506139a7565b50506012805461ffff959095169485019055506001600160a01b0393909316600090815260136020526040902080548301905550600d8054909101905590565b61fde861ffff821610613b005761ffff81166000908152601d602052604090205460ff1615613add576040805162461bcd60e51b815260206004820152601f60248201527f6d79746869632068617320616c7265616479206265656e206372656174656400604482015290519081900360640190fd5b61ffff81166000908152601d60205260409020805460ff1916600117905561210c565b600060178261ffff1681548110613b1357fe5b60009182526020909120601082040154600f9091166002026101000a900461ffff16905080613b80576040805162461bcd60e51b81526020600482015260146024820152731b5d5cdd081a185d99481cd9585cdbdb881cd95d60621b604482015290519081900360640190fd5b336000908152601c6020908152604080832084845290915290205460ff166118fd5760405162461bcd60e51b8152600401808060200182810382526028815260200180614b066028913960400191505060405180910390fd5b6000808211613c2f576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b6000828481613c3a57fe5b04949350505050565b600082613c5257506000612066565b82820282848281613c5f57fe5b0414613c9c5760405162461bcd60e51b8152600401808060200182810382526021815260200180614b666021913960400191505060405180910390fd5b9392505050565b6060613cb28585601086614406565b905060005b83811015613cd957613cd182866010848761ffff166144cc565b600101613cb7565b50612b018585601084614554565b60006001600160a01b038316613d37576040805162461bcd60e51b815260206004820152601060248201526f1b5d5cdd081b9bdd081899481b9d5b1b60821b604482015290519081900360640190fd5b60008261ffff16118015613d515750600b548261ffff1611155b613da2576040805162461bcd60e51b815260206004820152601a60248201527f73697a65206d7573742062652077697468696e206c696d697473000000000000604482015290519081900360640190fd5b6000613dac6145b1565b90506000613db98561347f565b905060405180604001604052808265ffffffffffff1681526020018561ffff1681525060108381548110613de957fe5b6000918252602091829020835191018054939092015165ffffffffffff1990931665ffffffffffff9091161767ffff0000000000001916600160301b61ffff9384160217905584168201825b81811015613e6b5760405181906001600160a01b03891690600090600080516020614c24833981519152908290a4600101613e35565b5050600b54600c80549091019055506001600160a01b03939093166000908152601360205260409020805461ffff93909316928301905550600d8054909101905590565b613eb8826145de565b6015613ec5818585614828565b6016612b01818685614881565b60408051828152905183917fa065fb8968d66241513c49df78364990dc9917fcd41ede326cef2c15e82f4aec919081900360200190a28060146000613f168561206c565b81526020810191909152604001600020555050565b6000613f3f846001600160a01b03166148d9565b613f4b57506001614057565b604051630a85bd0160e11b815233600482018181526001600160a01b03888116602485015260448401879052608060648501908152865160848601528651600095928a169463150b7a029490938c938b938b939260a4019060208501908083838e5b83811015613fc5578181015183820152602001613fad565b50505050905090810190601f168015613ff25780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561401457600080fd5b505af1158015614028573d6000803e3d6000fd5b505050506040513d602081101561403e57600080fd5b50516001600160e01b031916630a85bd0160e11b149150505b949350505050565b60408051602a80825260608281019093526001600160a01b038416918391602082018180388339019050509050600360fc1b8160008151811061409e57fe5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106140c757fe5b60200101906001600160f81b031916908160001a90535060005b60148110156141fd576040518060400160405280601081526020016f181899199a1a9b1b9c1cb0b131b232b360811b81525060048483600c016020811061412457fe5b1a60f81b6001600160f81b031916901c60f81c60ff168151811061414457fe5b602001015160f81c60f81b82826002026002018151811061416157fe5b60200101906001600160f81b031916908160001a9053506040518060400160405280601081526020016f181899199a1a9b1b9c1cb0b131b232b360811b8152508382600c01602081106141b057fe5b825191901a600f169081106141c157fe5b602001015160f81c60f81b8282600202600301815181106141de57fe5b60200101906001600160f81b031916908160001a9053506001016140e1565b509392505050565b60608161422a57506040805180820190915260018152600360fc1b60208201526115e6565b8160005b811561424257600101600a8204915061422e565b6060816040519080825280601f01601f19166020018201604052801561426f576020820181803883390190505b50859350905060001982015b83156142c057600a840660300160f81b8282806001900393508151811061429e57fe5b60200101906001600160f81b031916908160001a905350600a8404935061427b565b50949350505050565b6001600160a01b03811661430e5760405162461bcd60e51b8152600401808060200182810382526026815260200180614a666026913960400191505060405180910390fd5b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b600061437582613462565b6143b05760405162461bcd60e51b815260040180806020018281038252602c815260200180614ab0602c913960400191505060405180910390fd5b60006143bb83612260565b9050806001600160a01b0316846001600160a01b031614806143f65750836001600160a01b03166143eb846116b2565b6001600160a01b0316145b80614057575061405781856131ba565b606060006144158585856148df565b905080604051908082528060200260200182016040528015614441578160200160208202803883390190505b5091506000614450868661490f565b905061445c8782614922565b8360008151811061446957fe5b60200260200101818152505060018211156144c2576000614499614493888763ffffffff61493816565b8761490f565b90506144a58882614922565b8460018503815181106144b457fe5b602002602001018181525050505b5050949350505050565b600083610100816144d957fe5b04905060008186816144e757fe5b069050600082858301816144f757fe5b049050600086848988018161450857fe5b0602905060005b87811015614548578082018187901c60ff16901b8a848151811061452f57fe5b602090810291909101018051909117905260080161450f565b50505050505050505050565b6000614573836101008161456457fe5b8691900463ffffffff613bd916565b905060005b82518110156145a9576145a18682840185848151811061459457fe5b6020026020010151614992565b600101614578565b505050505050565b6000600c5460125411156145d7576145d3600b546124c6601254600b546149a7565b600c555b50600c5490565b600061ffff815b83518110156146d45760008482815181106145fc57fe5b6020026020010151905061fde861ffff168161ffff16106146a35761ffff81166000908152601d602052604090205460ff1615614680576040805162461bcd60e51b815260206004820152601f60248201527f6d79746869632068617320616c7265616479206265656e206372656174656400604482015290519081900360640190fd5b61ffff81166000908152601d60205260409020805460ff191660011790556146cb565b8361ffff168161ffff1611156146b7578093505b8061ffff168361ffff1611156146cb578092505b506001016145e5565b5061ffff821615611e0657600060178361ffff16815481106146f257fe5b60009182526020909120601082040154600f9091166002026101000a900461ffff1690508061475f576040805162461bcd60e51b81526020600482015260146024820152731b5d5cdd081a185d99481cd9585cdbdb881cd95d60621b604482015290519081900360640190fd5b60178261ffff168154811061477057fe5b60009182526020909120601082040154600f9091166002026101000a900461ffff1681146147cf5760405162461bcd60e51b815260040180806020018281038252602a815260200180614adc602a913960400191505060405180910390fd5b336000908152601c6020908152604080832084845290915290205460ff166118c75760405162461bcd60e51b8152600401808060200182810382526028815260200180614b066028913960400191505060405180910390fd5b6060614838848460108551614406565b905060005b82518110156148735761486b828560108487868151811061485a57fe5b602002602001015161ffff166144cc565b60010161483d565b506118c78484601084614554565b6060614891848460208551614406565b905060005b82518110156148cb576148c382856008848786815181106148b357fe5b602002602001015160ff166144cc565b600101614896565b506118c78484600884614554565b3b151590565b6000808385816148eb57fe5b049050600084848701816148fb57fe5b049050818103600101925050509392505050565b600081838161491a57fe5b049392505050565b60008061492f84846149c1565b54949350505050565b600082820183811015613c9c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061499e84846149c1565b91909155505050565b60008160018403816149b557fe5b04600101905092915050565b60405191825260209091200190565b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081019190915290565b60408051808201909152600080825260208201529056fe4552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e63616e206f6e6c79206372656174652063617264732066726f6d207468652073616d6520736561736f6e6d75737420626520617070726f76656420666163746f727920666f72207468697320736561736f6e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665644552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776eddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef4552433732313a20617070726f76616c20746f2063757272656e74206f776e6572666163746f72792063616e2774206368616e6765207175616c697479206f66207468697320736561736f6e6d757374206265207468652073616d65206e756d626572206f662070726f746f732f7175616c6974696573a265627a7a723158203ce802971423cc4f6c7c6ff35cab96695c1bd5056c810083f86d668b708bb23a64736f6c634300050b0032
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000004e3000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000014476f647320556e636861696e656420436172647300000000000000000000000000000000000000000000000000000000000000000000000000000000000000044341524400000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _batchSize (uint256): 1251
Arg [1] : _name (string): Gods Unchained Cards
Arg [2] : _symbol (string): CARD
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000004e3
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [4] : 476f647320556e636861696e6564204361726473000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [6] : 4341524400000000000000000000000000000000000000000000000000000000
Swarm Source
bzzr://3ce802971423cc4f6c7c6ff35cab96695c1bd5056c810083f86d668b708bb23a
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.