Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
3,333 KATANA
Holders
1
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
3,333 KATANAValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
KATANA
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {ERC404U16} from "./ERC404U16.sol"; contract KATANA is Ownable, ERC404U16 { string public baseTokenURI; constructor( string memory name_, string memory symbol_, uint8 decimals_, uint256 maxTotalSupplyERC721_, address initialOwner_, address initialMintRecipient_ ) ERC404U16(name_, symbol_, decimals_) Ownable(initialOwner_) { // Do not mint the ERC721s to the initial owner, as it's a waste of gas. _setERC721TransferExempt(initialMintRecipient_, true); _mintERC20(initialMintRecipient_, maxTotalSupplyERC721_ * units); } function setTokenURI(string memory _tokenURI) public onlyOwner { baseTokenURI = _tokenURI; } function tokenURI(uint256 id_) public view override returns (string memory) { return string.concat(baseTokenURI, Strings.toString(id_)); } function setERC721TransferExempt( address account_, bool value_ ) external onlyOwner { _setERC721TransferExempt(account_, value_); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import {IERC721Receiver} from "@openzeppelin/contracts/interfaces/IERC721Receiver.sol"; import {IERC165} from "@openzeppelin/contracts/interfaces/IERC165.sol"; import {IERC404} from "./interfaces/IERC404.sol"; import {PackedDoubleEndedQueue} from "./lib/PackedDoubleEndedQueue.sol"; import {ERC721Events} from "./lib/ERC721Events.sol"; import {ERC20Events} from "./lib/ERC20Events.sol"; /// @dev This is an optimized ERC404 implementation designed to support smaller collections, /// with id's up to a maximum of 65535. abstract contract ERC404U16 is IERC404 { using PackedDoubleEndedQueue for PackedDoubleEndedQueue.Uint16Deque; /// @dev The queue of ERC-721 tokens stored in the contract. PackedDoubleEndedQueue.Uint16Deque private _storedERC721Ids; /// @dev Token name string public name; /// @dev Token symbol string public symbol; /// @dev Decimals for ERC-20 representation uint8 public immutable decimals; /// @dev Units for ERC-20 representation uint256 public immutable units; /// @dev Total supply in ERC-20 representation uint256 public totalSupply; /// @dev Current mint counter which also represents the highest /// minted id, monotonically increasing to ensure accurate ownership uint256 public minted; /// @dev Initial chain id for EIP-2612 support uint256 internal immutable _INITIAL_CHAIN_ID; /// @dev Initial domain separator for EIP-2612 support bytes32 internal immutable _INITIAL_DOMAIN_SEPARATOR; /// @dev Balance of user in ERC-20 representation mapping(address => uint256) public balanceOf; /// @dev Allowance of user in ERC-20 representation mapping(address => mapping(address => uint256)) public allowance; /// @dev Approval in ERC-721 representaion mapping(uint256 => address) public getApproved; /// @dev Approval for all in ERC-721 representation mapping(address => mapping(address => bool)) public isApprovedForAll; /// @dev Packed representation of ownerOf and owned indices mapping(uint256 => uint256) internal _ownedData; /// @dev Array of owned ids in ERC-721 representation mapping(address => uint16[]) internal _owned; /// @dev Addresses that are exempt from ERC-721 transfer, typically for gas savings (pairs, routers, etc) mapping(address => bool) internal _erc721TransferExempt; /// @dev EIP-2612 nonces mapping(address => uint256) public nonces; /// @dev Address bitmask for packed ownership data uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; /// @dev Owned index bitmask for packed ownership data uint256 private constant _BITMASK_OWNED_INDEX = ((1 << 96) - 1) << 160; /// @dev Constant for token id encoding uint256 public constant ID_ENCODING_PREFIX = 1 << 255; constructor(string memory name_, string memory symbol_, uint8 decimals_) { name = name_; symbol = symbol_; if (decimals_ < 18) { revert DecimalsTooLow(); } decimals = decimals_; units = 10 ** decimals; // EIP-2612 initialization _INITIAL_CHAIN_ID = block.chainid; _INITIAL_DOMAIN_SEPARATOR = _computeDomainSeparator(); } /// @notice Function to find owner of a given ERC-721 token function ownerOf( uint256 id_ ) public view virtual returns (address erc721Owner) { erc721Owner = _getOwnerOf(id_); if (!_isValidTokenId(id_)) { revert InvalidTokenId(); } if (erc721Owner == address(0)) { revert NotFound(); } } function owned( address owner_ ) public view virtual returns (uint256[] memory) { uint256[] memory ownedAsU256 = new uint256[](_owned[owner_].length); for (uint256 i = 0; i < _owned[owner_].length; ) { ownedAsU256[i] = ID_ENCODING_PREFIX + _owned[owner_][i]; unchecked { ++i; } } return ownedAsU256; } function erc721BalanceOf( address owner_ ) public view virtual returns (uint256) { return _owned[owner_].length; } function erc20BalanceOf( address owner_ ) public view virtual returns (uint256) { return balanceOf[owner_]; } function erc20TotalSupply() public view virtual returns (uint256) { return totalSupply; } function erc721TotalSupply() public view virtual returns (uint256) { return minted; } function getERC721QueueLength() public view virtual returns (uint256) { return _storedERC721Ids.length(); } function getERC721TokensInQueue( uint256 start_, uint256 count_ ) public view virtual returns (uint256[] memory) { uint256[] memory tokensInQueue = new uint256[](count_); for (uint256 i = start_; i < start_ + count_; ) { tokensInQueue[i - start_] = ID_ENCODING_PREFIX + _storedERC721Ids.at(i); unchecked { ++i; } } return tokensInQueue; } /// @notice tokenURI must be implemented by child contract function tokenURI(uint256 id_) public view virtual returns (string memory); /// @notice Function for token approvals /// @dev This function assumes the operator is attempting to approve an ERC-721 /// if valueOrId is less than the minted count. Unlike setApprovalForAll, /// spender_ must be allowed to be 0x0 so that approval can be revoked. function approve( address spender_, uint256 valueOrId_ ) public virtual returns (bool) { // The ERC-721 tokens are 1-indexed, so 0 is not a valid id and indicates that // operator is attempting to set the ERC-20 allowance to 0. if (_isValidTokenId(valueOrId_)) { erc721Approve(spender_, valueOrId_); } else { return erc20Approve(spender_, valueOrId_); } return true; } function erc721Approve(address spender_, uint256 id_) public virtual { // Intention is to approve as ERC-721 token (id). address erc721Owner = _getOwnerOf(id_); if ( msg.sender != erc721Owner && !isApprovedForAll[erc721Owner][msg.sender] ) { revert Unauthorized(); } getApproved[id_] = spender_; emit ERC721Events.Approval(erc721Owner, spender_, id_); } /// @dev Providing type(uint256).max for approval value results in an /// unlimited approval that is not deducted from on transfers. function erc20Approve( address spender_, uint256 value_ ) public virtual returns (bool) { // Prevent granting 0x0 an ERC-20 allowance. if (spender_ == address(0)) { revert InvalidSpender(); } // Intention is to approve as ERC-20 token (value). allowance[msg.sender][spender_] = value_; emit ERC20Events.Approval(msg.sender, spender_, value_); return true; } /// @notice Function for ERC-721 approvals function setApprovalForAll(address operator_, bool approved_) public virtual { // Prevent approvals to 0x0. if (operator_ == address(0)) { revert InvalidOperator(); } isApprovedForAll[msg.sender][operator_] = approved_; emit ERC721Events.ApprovalForAll(msg.sender, operator_, approved_); } /// @notice Function for mixed transfers from an operator that may be different than 'from'. /// @dev This function assumes the operator is attempting to transfer an ERC-721 /// if valueOrId is less than or equal to current max id. function transferFrom( address from_, address to_, uint256 valueOrId_ ) public virtual returns (bool) { if (_isValidTokenId(valueOrId_)) { erc721TransferFrom(from_, to_, valueOrId_); } else { // Intention is to transfer as ERC-20 token (value). return erc20TransferFrom(from_, to_, valueOrId_); } return true; } /// @notice Function for ERC-721 transfers from. /// @dev This function is recommended for ERC721 transfers function erc721TransferFrom( address from_, address to_, uint256 id_ ) public virtual { // Prevent transferring tokens from 0x0. if (from_ == address(0)) { revert InvalidSender(); } // Prevent burning tokens to 0x0. if (to_ == address(0)) { revert InvalidRecipient(); } if (from_ != _getOwnerOf(id_)) { revert Unauthorized(); } // Check that the operator is either the sender or approved for the transfer. if ( msg.sender != from_ && !isApprovedForAll[from_][msg.sender] && msg.sender != getApproved[id_] ) { revert Unauthorized(); } if (erc721TransferExempt(to_)) { revert RecipientIsERC721TransferExempt(); } // Transfer 1 * units ERC-20 and 1 ERC-721 token. // ERC-721 transfer exemptions handled above. Can't make it to this point if either is transfer exempt. _transferERC20(from_, to_, units); _transferERC721(from_, to_, id_); } /// @notice Function for ERC-20 transfers from. /// @dev This function is recommended for ERC20 transfers function erc20TransferFrom( address from_, address to_, uint256 value_ ) public virtual returns (bool) { // Prevent transferring tokens from 0x0. if (from_ == address(0)) { revert InvalidSender(); } // Prevent burning tokens to 0x0. if (to_ == address(0)) { revert InvalidRecipient(); } // Intention is to transfer as ERC-20 token (value). uint256 allowed = allowance[from_][msg.sender]; // Check that the operator has sufficient allowance. if (allowed != type(uint256).max) { allowance[from_][msg.sender] = allowed - value_; } // Transferring ERC-20s directly requires the _transfer function. // Handles ERC-721 exemptions internally. return _transferERC20WithERC721(from_, to_, value_); } /// @notice Function for ERC-20 transfers. /// @dev This function assumes the operator is attempting to transfer as ERC-20 /// given this function is only supported on the ERC-20 interface. /// Treats even small amounts that are valid ERC-721 ids as ERC-20s. function transfer(address to_, uint256 value_) public virtual returns (bool) { // Prevent burning tokens to 0x0. if (to_ == address(0)) { revert InvalidRecipient(); } // Transferring ERC-20s directly requires the _transfer function. // Handles ERC-721 exemptions internally. return _transferERC20WithERC721(msg.sender, to_, value_); } /// @notice Function for ERC-721 transfers with contract support. /// This function only supports moving valid ERC-721 ids, as it does not exist on the ERC-20 /// spec and will revert otherwise. function safeTransferFrom( address from_, address to_, uint256 id_ ) public virtual { safeTransferFrom(from_, to_, id_, ""); } /// @notice Function for ERC-721 transfers with contract support and callback data. /// This function only supports moving valid ERC-721 ids, as it does not exist on the /// ERC-20 spec and will revert otherwise. function safeTransferFrom( address from_, address to_, uint256 id_, bytes memory data_ ) public virtual { if (!_isValidTokenId(id_)) { revert InvalidTokenId(); } transferFrom(from_, to_, id_); if ( to_.code.length != 0 && IERC721Receiver(to_).onERC721Received(msg.sender, from_, id_, data_) != IERC721Receiver.onERC721Received.selector ) { revert UnsafeRecipient(); } } /// @notice Function for EIP-2612 permits /// @dev Providing type(uint256).max for permit value results in an /// unlimited approval that is not deducted from on transfers. function permit( address owner_, address spender_, uint256 value_, uint256 deadline_, uint8 v_, bytes32 r_, bytes32 s_ ) public virtual { if (deadline_ < block.timestamp) { revert PermitDeadlineExpired(); } if (_isValidTokenId(value_)) { revert InvalidApproval(); } if (spender_ == address(0)) { revert InvalidSpender(); } unchecked { address recoveredAddress = ecrecover( keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner_, spender_, value_, nonces[owner_]++, deadline_ ) ) ) ), v_, r_, s_ ); if (recoveredAddress == address(0) || recoveredAddress != owner_) { revert InvalidSigner(); } allowance[recoveredAddress][spender_] = value_; } emit ERC20Events.Approval(owner_, spender_, value_); } /// @notice Returns domain initial domain separator, or recomputes if chain id is not equal to initial chain id function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == _INITIAL_CHAIN_ID ? _INITIAL_DOMAIN_SEPARATOR : _computeDomainSeparator(); } function supportsInterface( bytes4 interfaceId ) public view virtual returns (bool) { return interfaceId == type(IERC404).interfaceId || interfaceId == type(IERC165).interfaceId; } /// @notice Function for self-exemption function setSelfERC721TransferExempt(bool state_) public virtual { _setERC721TransferExempt(msg.sender, state_); } /// @notice Function to check if address is transfer exempt function erc721TransferExempt( address target_ ) public view virtual returns (bool) { return target_ == address(0) || _erc721TransferExempt[target_]; } /// @notice For a token token id to be considered valid, it just needs /// to fall within the range of possible token ids, it does not /// necessarily have to be minted yet. function _isValidTokenId(uint256 id_) internal pure returns (bool) { return id_ > ID_ENCODING_PREFIX && id_ != type(uint256).max; } /// @notice Internal function to compute domain separator for EIP-2612 permits function _computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /// @notice This is the lowest level ERC-20 transfer function, which /// should be used for both normal ERC-20 transfers as well as minting. /// Note that this function allows transfers to and from 0x0. function _transferERC20( address from_, address to_, uint256 value_ ) internal virtual { // Minting is a special case for which we should not check the balance of // the sender, and we should increase the total supply. if (from_ == address(0)) { totalSupply += value_; } else { // Deduct value from sender's balance. balanceOf[from_] -= value_; } // Update the recipient's balance. // Can be unchecked because on mint, adding to totalSupply is checked, and on transfer balance deduction is checked. unchecked { balanceOf[to_] += value_; } emit ERC20Events.Transfer(from_, to_, value_); } /// @notice Consolidated record keeping function for transferring ERC-721s. /// @dev Assign the token to the new owner, and remove from the old owner. /// Note that this function allows transfers to and from 0x0. /// Does not handle ERC-721 exemptions. function _transferERC721( address from_, address to_, uint256 id_ ) internal virtual { // If this is not a mint, handle record keeping for transfer from previous owner. if (from_ != address(0)) { // On transfer of an NFT, any previous approval is reset. delete getApproved[id_]; uint256 updatedId = ID_ENCODING_PREFIX + _owned[from_][_owned[from_].length - 1]; if (updatedId != id_) { uint256 updatedIndex = _getOwnedIndex(id_); // update _owned for sender _owned[from_][updatedIndex] = uint16(updatedId); // update index for the moved id _setOwnedIndex(updatedId, updatedIndex); } // pop _owned[from_].pop(); } // Check if this is a burn. if (to_ != address(0)) { // If not a burn, update the owner of the token to the new owner. // Update owner of the token to the new owner. _setOwnerOf(id_, to_); // Push token onto the new owner's stack. _owned[to_].push(uint16(id_)); // Update index for new owner's stack. _setOwnedIndex(id_, _owned[to_].length - 1); } else { // If this is a burn, reset the owner of the token to 0x0 by deleting the token from _ownedData. delete _ownedData[id_]; } emit ERC721Events.Transfer(from_, to_, id_); } /// @notice Internal function for ERC-20 transfers. Also handles any ERC-721 transfers that may be required. // Handles ERC-721 exemptions. function _transferERC20WithERC721( address from_, address to_, uint256 value_ ) internal virtual returns (bool) { uint256 erc20BalanceOfSenderBefore = erc20BalanceOf(from_); uint256 erc20BalanceOfReceiverBefore = erc20BalanceOf(to_); _transferERC20(from_, to_, value_); // Preload for gas savings on branches bool isFromERC721TransferExempt = erc721TransferExempt(from_); bool isToERC721TransferExempt = erc721TransferExempt(to_); // Skip _withdrawAndStoreERC721 and/or _retrieveOrMintERC721 for ERC-721 transfer exempt addresses // 1) to save gas // 2) because ERC-721 transfer exempt addresses won't always have/need ERC-721s corresponding to their ERC20s. if (isFromERC721TransferExempt && isToERC721TransferExempt) { // Case 1) Both sender and recipient are ERC-721 transfer exempt. No ERC-721s need to be transferred. // NOOP. } else if (isFromERC721TransferExempt) { // Case 2) The sender is ERC-721 transfer exempt, but the recipient is not. Contract should not attempt // to transfer ERC-721s from the sender, but the recipient should receive ERC-721s // from the bank/minted for any whole number increase in their balance. // Only cares about whole number increments. uint256 tokensToRetrieveOrMint = (balanceOf[to_] / units) - (erc20BalanceOfReceiverBefore / units); for (uint256 i = 0; i < tokensToRetrieveOrMint; ) { _retrieveOrMintERC721(to_); unchecked { ++i; } } } else if (isToERC721TransferExempt) { // Case 3) The sender is not ERC-721 transfer exempt, but the recipient is. Contract should attempt // to withdraw and store ERC-721s from the sender, but the recipient should not // receive ERC-721s from the bank/minted. // Only cares about whole number increments. uint256 tokensToWithdrawAndStore = (erc20BalanceOfSenderBefore / units) - (balanceOf[from_] / units); for (uint256 i = 0; i < tokensToWithdrawAndStore; ) { _withdrawAndStoreERC721(from_); unchecked { ++i; } } } else { // Case 4) Neither the sender nor the recipient are ERC-721 transfer exempt. // Strategy: // 1. First deal with the whole tokens. These are easy and will just be transferred. // 2. Look at the fractional part of the value: // a) If it causes the sender to lose a whole token that was represented by an NFT due to a // fractional part being transferred, withdraw and store an additional NFT from the sender. // b) If it causes the receiver to gain a whole new token that should be represented by an NFT // due to receiving a fractional part that completes a whole token, retrieve or mint an NFT to the recevier. // Whole tokens worth of ERC-20s get transferred as ERC-721s without any burning/minting. uint256 nftsToTransfer = value_ / units; for (uint256 i = 0; i < nftsToTransfer; ) { // Pop from sender's ERC-721 stack and transfer them (LIFO) uint256 indexOfLastToken = _owned[from_].length - 1; uint256 tokenId = ID_ENCODING_PREFIX + _owned[from_][indexOfLastToken]; _transferERC721(from_, to_, tokenId); unchecked { ++i; } } // If the sender's transaction changes their holding from a fractional to a non-fractional // amount (or vice versa), adjust ERC-721s. // // Check if the send causes the sender to lose a whole token that was represented by an ERC-721 // due to a fractional part being transferred. if ( erc20BalanceOfSenderBefore / units - erc20BalanceOf(from_) / units > nftsToTransfer ) { _withdrawAndStoreERC721(from_); } if ( erc20BalanceOf(to_) / units - erc20BalanceOfReceiverBefore / units > nftsToTransfer ) { _retrieveOrMintERC721(to_); } } return true; } /// @notice Internal function for ERC20 minting /// @dev This function will allow minting of new ERC20s. /// If mintCorrespondingERC721s_ is true, and the recipient is not ERC-721 exempt, it will /// also mint the corresponding ERC721s. /// Handles ERC-721 exemptions. function _mintERC20(address to_, uint256 value_) internal virtual { /// You cannot mint to the zero address (you can't mint and immediately burn in the same transfer). if (to_ == address(0)) { revert InvalidRecipient(); } if (totalSupply + value_ > ID_ENCODING_PREFIX) { revert MintLimitReached(); } _transferERC20WithERC721(address(0), to_, value_); } /// @notice Internal function for ERC-721 minting and retrieval from the bank. /// @dev This function will allow minting of new ERC-721s up to the total fractional supply. It will /// first try to pull from the bank, and if the bank is empty, it will mint a new token. /// Does not handle ERC-721 exemptions. function _retrieveOrMintERC721(address to_) internal virtual { if (to_ == address(0)) { revert InvalidRecipient(); } uint256 id; if (!_storedERC721Ids.empty()) { // If there are any tokens in the bank, use those first. // Pop off the end of the queue (FIFO). id = ID_ENCODING_PREFIX + _storedERC721Ids.popBack(); } else { // Otherwise, mint a new token, should not be able to go over the total fractional supply. ++minted; // Reserve max uint256 for approvals if (minted == type(uint256).max) { revert MintLimitReached(); } id = ID_ENCODING_PREFIX + minted; } address erc721Owner = _getOwnerOf(id); // The token should not already belong to anyone besides 0x0 or this contract. // If it does, something is wrong, as this should never happen. if (erc721Owner != address(0)) { revert AlreadyExists(); } // Transfer the token to the recipient, either transferring from the contract's bank or minting. // Does not handle ERC-721 exemptions. _transferERC721(erc721Owner, to_, id); } /// @notice Internal function for ERC-721 deposits to bank (this contract). /// @dev This function will allow depositing of ERC-721s to the bank, which can be retrieved by future minters. // Does not handle ERC-721 exemptions. function _withdrawAndStoreERC721(address from_) internal virtual { if (from_ == address(0)) { revert InvalidSender(); } // Retrieve the latest token added to the owner's stack (LIFO). uint256 id = ID_ENCODING_PREFIX + _owned[from_][_owned[from_].length - 1]; // Transfer to 0x0. // Does not handle ERC-721 exemptions. _transferERC721(from_, address(0), id); // Record the token in the contract's bank queue. _storedERC721Ids.pushFront(uint16(id)); } /// @notice Initialization function to set pairs / etc, saving gas by avoiding mint / burn on unnecessary targets function _setERC721TransferExempt( address target_, bool state_ ) internal virtual { if (target_ == address(0)) { revert InvalidExemption(); } // Adjust the ERC721 balances of the target to respect exemption rules. // Despite this logic, it is still recommended practice to exempt prior to the target // having an active balance. if (state_) { _clearERC721Balance(target_); } else { _reinstateERC721Balance(target_); } _erc721TransferExempt[target_] = state_; } /// @notice Function to reinstate balance on exemption removal function _reinstateERC721Balance(address target_) private { uint256 expectedERC721Balance = erc20BalanceOf(target_) / units; uint256 actualERC721Balance = erc721BalanceOf(target_); for (uint256 i = 0; i < expectedERC721Balance - actualERC721Balance; ) { // Transfer ERC721 balance in from pool _retrieveOrMintERC721(target_); unchecked { ++i; } } } /// @notice Function to clear balance on exemption inclusion function _clearERC721Balance(address target_) private { uint256 erc721Balance = erc721BalanceOf(target_); for (uint256 i = 0; i < erc721Balance; ) { // Transfer out ERC721 balance _withdrawAndStoreERC721(target_); unchecked { ++i; } } } function _getOwnerOf( uint256 id_ ) internal view virtual returns (address ownerOf_) { uint256 data = _ownedData[id_]; assembly { ownerOf_ := and(data, _BITMASK_ADDRESS) } } function _setOwnerOf(uint256 id_, address owner_) internal virtual { uint256 data = _ownedData[id_]; assembly { data := add( and(data, _BITMASK_OWNED_INDEX), and(owner_, _BITMASK_ADDRESS) ) } _ownedData[id_] = data; } function _getOwnedIndex( uint256 id_ ) internal view virtual returns (uint256 ownedIndex_) { uint256 data = _ownedData[id_]; assembly { ownedIndex_ := shr(160, data) } } function _setOwnedIndex(uint256 id_, uint256 index_) internal virtual { uint256 data = _ownedData[id_]; if (index_ > _BITMASK_OWNED_INDEX >> 160) { revert OwnedIndexOverflow(); } assembly { data := add( and(data, _BITMASK_ADDRESS), and(shl(160, index_), _BITMASK_OWNED_INDEX) ) } _ownedData[id_] = data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @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. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(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 virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; library ERC20Events { event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 amount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; library ERC721Events { event ApprovalForAll( address indexed owner, address indexed operator, bool approved ); event Approval( address indexed owner, address indexed spender, uint256 indexed id ); event Transfer(address indexed from, address indexed to, uint256 indexed id); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/DoubleEndedQueue.sol) // Modified by Pandora Labs to support native packed operations pragma solidity ^0.8.20; /** * @dev A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of * the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and * FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that * the existing queue contents are left in storage. * * The struct is called `Uint16Deque`. And is designed for packed uint16 values, though this approach can be * extrapolated to different implementations. This data structure can only be used in storage, and not in memory. * * ```solidity * PackedDoubleEndedQueue.Uint16Deque queue; * ``` */ library PackedDoubleEndedQueue { uint128 constant SLOT_MASK = (1 << 64) - 1; uint128 constant INDEX_MASK = SLOT_MASK << 64; uint256 constant SLOT_DATA_MASK = (1 << 16) - 1; /** * @dev An operation (e.g. {front}) couldn't be completed due to the queue being empty. */ error QueueEmpty(); /** * @dev A push operation couldn't be completed due to the queue being full. */ error QueueFull(); /** * @dev An operation (e.g. {at}) couldn't be completed due to an index being out of bounds. */ error QueueOutOfBounds(); /** * @dev Invalid slot. */ error InvalidSlot(); /** * @dev Indices and slots are 64 bits to fit within a single storage slot. * * Struct members have an underscore prefix indicating that they are "private" and should not be read or written to * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and * lead to unexpected behavior. * * The first item is at data[begin] and the last item is at data[end - 1]. This range can wrap around. */ struct Uint16Deque { uint64 _beginIndex; uint64 _beginSlot; uint64 _endIndex; uint64 _endSlot; mapping(uint64 index => uint256) _data; } /** * @dev Removes the item at the end of the queue and returns it. * * Reverts with {QueueEmpty} if the queue is empty. */ function popBack(Uint16Deque storage deque) internal returns (uint16 value) { unchecked { uint64 backIndex = deque._endIndex; uint64 backSlot = deque._endSlot; if (backIndex == deque._beginIndex && backSlot == deque._beginSlot) revert QueueEmpty(); if (backSlot == 0) { --backIndex; backSlot = 15; } else { --backSlot; } uint256 data = deque._data[backIndex]; value = _getEntry(data, backSlot); deque._data[backIndex] = _setData(data, backSlot, 0); deque._endIndex = backIndex; deque._endSlot = backSlot; } } /** * @dev Inserts an item at the beginning of the queue. * * Reverts with {QueueFull} if the queue is full. */ function pushFront(Uint16Deque storage deque, uint16 value_) internal { unchecked { uint64 frontIndex = deque._beginIndex; uint64 frontSlot = deque._beginSlot; if (frontSlot == 0) { --frontIndex; frontSlot = 15; } else { --frontSlot; } if (frontIndex == deque._endIndex && frontSlot == deque._endSlot) revert QueueFull(); deque._data[frontIndex] = _setData( deque._data[frontIndex], frontSlot, value_ ); deque._beginIndex = frontIndex; deque._beginSlot = frontSlot; } } /** * @dev Return the item at a position in the queue given by `index`, with the first item at 0 and last item at * `length(deque) - 1`. * * Reverts with `QueueOutOfBounds` if the index is out of bounds. */ function at( Uint16Deque storage deque, uint256 index_ ) internal view returns (uint16 value) { if (index_ >= length(deque) * 16) revert QueueOutOfBounds(); unchecked { return _getEntry( deque._data[ deque._beginIndex + uint64(deque._beginSlot + (index_ % 16)) / 16 + uint64(index_ / 16) ], uint64(((deque._beginSlot + index_) % 16)) ); } } /** * @dev Returns the number of items in the queue. */ function length(Uint16Deque storage deque) internal view returns (uint256) { unchecked { return (16 - deque._beginSlot) + deque._endSlot + deque._endIndex * 16 - deque._beginIndex * 16 - 16; } } /** * @dev Returns true if the queue is empty. */ function empty(Uint16Deque storage deque) internal view returns (bool) { return deque._endSlot == deque._beginSlot && deque._endIndex == deque._beginIndex; } function _setData( uint256 data_, uint64 slot_, uint16 value ) private pure returns (uint256) { return (data_ & (~_getSlotMask(slot_))) + (uint256(value) << (16 * slot_)); } function _getEntry(uint256 data, uint64 slot_) private pure returns (uint16) { return uint16((data & _getSlotMask(slot_)) >> (16 * slot_)); } function _getSlotMask(uint64 slot_) private pure returns (uint256) { return SLOT_DATA_MASK << (slot_ * 16); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import {IERC165} from "@openzeppelin/contracts/interfaces/IERC165.sol"; interface IERC404 is IERC165 { error NotFound(); error InvalidTokenId(); error AlreadyExists(); error InvalidRecipient(); error InvalidSender(); error InvalidSpender(); error InvalidOperator(); error UnsafeRecipient(); error RecipientIsERC721TransferExempt(); error Unauthorized(); error InsufficientAllowance(); error DecimalsTooLow(); error PermitDeadlineExpired(); error InvalidSigner(); error InvalidApproval(); error OwnedIndexOverflow(); error MintLimitReached(); error InvalidExemption(); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint256); function erc20TotalSupply() external view returns (uint256); function erc721TotalSupply() external view returns (uint256); function balanceOf(address owner_) external view returns (uint256); function erc721BalanceOf(address owner_) external view returns (uint256); function erc20BalanceOf(address owner_) external view returns (uint256); function erc721TransferExempt(address account_) external view returns (bool); function isApprovedForAll( address owner_, address operator_ ) external view returns (bool); function allowance( address owner_, address spender_ ) external view returns (uint256); function owned(address owner_) external view returns (uint256[] memory); function ownerOf(uint256 id_) external view returns (address erc721Owner); function tokenURI(uint256 id_) external view returns (string memory); function approve( address spender_, uint256 valueOrId_ ) external returns (bool); function erc20Approve( address spender_, uint256 value_ ) external returns (bool); function erc721Approve(address spender_, uint256 id_) external; function setApprovalForAll(address operator_, bool approved_) external; function transferFrom( address from_, address to_, uint256 valueOrId_ ) external returns (bool); function erc20TransferFrom( address from_, address to_, uint256 value_ ) external returns (bool); function erc721TransferFrom(address from_, address to_, uint256 id_) external; function transfer(address to_, uint256 amount_) external returns (bool); function getERC721QueueLength() external view returns (uint256); function getERC721TokensInQueue( uint256 start_, uint256 count_ ) external view returns (uint256[] memory); function setSelfERC721TransferExempt(bool state_) external; function safeTransferFrom(address from_, address to_, uint256 id_) external; function safeTransferFrom( address from_, address to_, uint256 id_, bytes calldata data_ ) external; function DOMAIN_SEPARATOR() external view returns (bytes32); function permit( address owner_, address spender_, uint256 value_, uint256 deadline_, uint8 v_, bytes32 r_, bytes32 s_ ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Receiver.sol) pragma solidity ^0.8.20; import {IERC721Receiver} from "../token/ERC721/IERC721Receiver.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.20; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be * reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * 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 * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * 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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"uint256","name":"maxTotalSupplyERC721_","type":"uint256"},{"internalType":"address","name":"initialOwner_","type":"address"},{"internalType":"address","name":"initialMintRecipient_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyExists","type":"error"},{"inputs":[],"name":"DecimalsTooLow","type":"error"},{"inputs":[],"name":"InsufficientAllowance","type":"error"},{"inputs":[],"name":"InvalidApproval","type":"error"},{"inputs":[],"name":"InvalidExemption","type":"error"},{"inputs":[],"name":"InvalidOperator","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidSender","type":"error"},{"inputs":[],"name":"InvalidSigner","type":"error"},{"inputs":[],"name":"InvalidSpender","type":"error"},{"inputs":[],"name":"InvalidTokenId","type":"error"},{"inputs":[],"name":"MintLimitReached","type":"error"},{"inputs":[],"name":"NotFound","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"OwnedIndexOverflow","type":"error"},{"inputs":[],"name":"PermitDeadlineExpired","type":"error"},{"inputs":[],"name":"QueueEmpty","type":"error"},{"inputs":[],"name":"QueueFull","type":"error"},{"inputs":[],"name":"QueueOutOfBounds","type":"error"},{"inputs":[],"name":"RecipientIsERC721TransferExempt","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"UnsafeRecipient","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","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"},{"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":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","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":"id","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ID_ENCODING_PREFIX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"valueOrId_","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"erc20Approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"erc20BalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc20TotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"erc20TransferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"erc721Approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"erc721BalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc721TotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target_","type":"address"}],"name":"erc721TransferExempt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"erc721TransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getERC721QueueLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"start_","type":"uint256"},{"internalType":"uint256","name":"count_","type":"uint256"}],"name":"getERC721TokensInQueue","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"owned","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"erc721Owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"uint256","name":"deadline_","type":"uint256"},{"internalType":"uint8","name":"v_","type":"uint8"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"s_","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"},{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator_","type":"address"},{"internalType":"bool","name":"approved_","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"bool","name":"value_","type":"bool"}],"name":"setERC721TransferExempt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state_","type":"bool"}],"name":"setSelfERC721TransferExempt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"valueOrId_","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"units","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
61010060405234801562000011575f80fd5b5060405162003ddb38038062003ddb833981016040819052620000349162000f6c565b858585846001600160a01b0381166200006657604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b620000718162000119565b506003620000808482620010a2565b5060046200008f8382620010a2565b5060128160ff161015620000b6576040516398790fd560e01b815260040160405180910390fd5b60ff81166080819052620000cc90600a62001277565b60a0524660c052620000dd62000168565b60e05250620000f29150829050600162000203565b6200010d8160a051856200010791906200128e565b62000278565b505050505050620013df565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60036040516200019b9190620012a8565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6001600160a01b0382166200022b5760405163a41e3d3f60e01b815260040160405180910390fd5b801562000243576200023d82620002e7565b6200024e565b6200024e826200031e565b6001600160a01b03919091165f908152600d60205260409020805460ff1916911515919091179055565b6001600160a01b038216620002a057604051634e46966960e11b815260040160405180910390fd5b600160ff1b81600554620002b5919062001322565b1115620002d55760405163303b682f60e01b815260040160405180910390fd5b620002e25f8383620003a2565b505050565b6001600160a01b0381165f908152600c6020526040812054905b81811015620002e257620003158362000661565b60010162000301565b60a0515f9062000342836001600160a01b03165f9081526007602052604090205490565b6200034e919062001338565b90505f62000370836001600160a01b03165f908152600c602052604090205490565b90505f5b62000380828462001358565b8110156200039c57620003938462000712565b60010162000374565b50505050565b6001600160a01b038381165f90815260076020526040808220549285168252812054909190620003d486868662000806565b5f620003e087620008b4565b90505f620003ee87620008b4565b9050818015620003fb5750805b6200065357811562000474575f60a0518462000418919062001338565b60a0516001600160a01b038a165f908152600760205260409020546200043f919062001338565b6200044b919062001358565b90505f5b818110156200046c57620004638962000712565b6001016200044f565b505062000653565b8015620004df5760a0516001600160a01b0389165f908152600760205260408120549091620004a39162001338565b60a051620004b2908762001338565b620004be919062001358565b90505f5b818110156200046c57620004d68a62000661565b600101620004c2565b5f60a05187620004f0919062001338565b90505f5b818110156200059d576001600160a01b038a165f908152600c6020526040812054620005239060019062001358565b6001600160a01b038c165f908152600c6020526040812080549293509091839081106200055457620005546200136e565b5f91825260209091206010820401546200058391600f166002026101000a900461ffff16600160ff1b62001322565b9050620005928c8c83620008e9565b5050600101620004f4565b5060a0518190620005c28b6001600160a01b03165f9081526007602052604090205490565b620005ce919062001338565b60a051620005dd908862001338565b620005e9919062001358565b1115620005fb57620005fb8962000661565b8060a051856200060c919062001338565b60a0516001600160a01b038b165f9081526007602052604090205462000633919062001338565b6200063f919062001358565b11156200065157620006518862000712565b505b506001979650505050505050565b6001600160a01b0381166200068957604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381165f908152600c602052604081208054620006b09060019062001358565b81548110620006c357620006c36200136e565b5f9182526020909120601082040154620006f291600f166002026101000a900461ffff16600160ff1b62001322565b905062000701825f83620008e9565b6200070e60018262000b4b565b5050565b6001600160a01b0381166200073a57604051634e46966960e11b815260040160405180910390fd5b5f62000747600162000c3d565b620007745762000758600162000c84565b6200076c9061ffff16600160ff1b62001322565b9050620007c2565b60065f8154620007849062001382565b90915550600654600101620007ac5760405163303b682f60e01b815260040160405180910390fd5b600654620007bf90600160ff1b62001322565b90505b5f818152600b60205260409020546001600160a01b03168015620007f95760405163119b4fd360e11b815260040160405180910390fd5b620002e2818484620008e9565b6001600160a01b03831662000834578060055f82825462000828919062001322565b90915550620008639050565b6001600160a01b0383165f90815260076020526040812080548392906200085d90849062001358565b90915550505b6001600160a01b038083165f81815260076020526040908190208054850190555190918516905f8051602062003dbb83398151915290620008a79085815260200190565b60405180910390a3505050565b5f6001600160a01b0382161580620008e357506001600160a01b0382165f908152600d602052604090205460ff165b92915050565b6001600160a01b0383161562000a5e575f81815260096020908152604080832080546001600160a01b03191690556001600160a01b0386168352600c909152812080546200093a9060019062001358565b815481106200094d576200094d6200136e565b5f91825260209091206010820401546200097c91600f166002026101000a900461ffff16600160ff1b62001322565b905081811462000a09575f828152600b602052604081205460a01c6001600160a01b0386165f908152600c602052604090208054919250839183908110620009c857620009c86200136e565b905f5260205f2090601091828204019190066002026101000a81548161ffff021916908361ffff16021790555062000a07828262000d9560201b60201c565b505b6001600160a01b0384165f908152600c6020526040902080548062000a325762000a326200139d565b5f8281526020902060105f1990920191820401805461ffff6002600f8516026101000a02191690559055505b6001600160a01b0382161562000b08575f818152600b6020526040902080546001600160a01b0319166001600160a01b0384160190556001600160a01b0382165f818152600c60209081526040822080546001808201835582855292842060108204018054600f9092166002026101000a61ffff818102199093169288160291909117905592909152905462000b0291839162000afc919062001358565b62000d95565b62000b17565b5f818152600b60205260408120555b80826001600160a01b0316846001600160a01b03165f8051602062003dbb83398151915260405160405180910390a4505050565b81546001600160401b0380821691680100000000000000009004165f81900362000b7b57505f1901600f62000b7f565b5f19015b83546001600160401b03838116600160801b9092041614801562000bb6575083546001600160401b03828116600160c01b90920416145b1562000bd557604051638acb5f2760e01b815260040160405180910390fd5b6001600160401b0382165f90815260018501602052604090205462000bfc90828562000dfb565b6001600160401b039283165f81815260018701602052604090209190915584546001600160801b031916176801000000000000000091909216021790915550565b80545f90600160c01b81046001600160401b039081166801000000000000000090920416148015620008e3575050546001600160401b03808216600160801b909204161490565b80545f906001600160401b03600160801b8204811691600160c01b8104821691168214801562000ccc575083546001600160401b038281166801000000000000000090920416145b1562000ceb576040516375e52f4f60e01b815260040160405180910390fd5b806001600160401b03165f0362000d0857505f1901600f62000d0c565b5f19015b6001600160401b0382165f90815260018501602052604090205462000d32818362000e41565b935062000d4181835f62000dfb565b6001600160401b039384165f81815260018801602052604090209190915585546001600160801b0316600160801b9091026001600160c01b031617600160c01b929093169190910291909117909255919050565b5f828152600b60205260409020546001600160601b0382111562000dcc57604051633f2cd0e360e21b815260040160405180910390fd5b5f928352600b60205260409092206001600160a01b039290921660a09190911b6001600160a01b031916019055565b5f62000e09836010620013b1565b6001600160401b03168261ffff16901b62000e2a8462000e6f60201b60201c565b19851662000e39919062001322565b949350505050565b5f62000e4f826010620013b1565b6001600160401b031662000e638362000e6f565b8416901c905092915050565b5f62000e7d826010620013b1565b6001600160401b031661ffff901b9050919050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f83011262000eb6575f80fd5b81516001600160401b038082111562000ed35762000ed362000e92565b604051601f8301601f19908116603f0116810190828211818310171562000efe5762000efe62000e92565b8160405283815260209250868385880101111562000f1a575f80fd5b5f91505b8382101562000f3d578582018301518183018401529082019062000f1e565b5f93810190920192909252949350505050565b80516001600160a01b038116811462000f67575f80fd5b919050565b5f805f805f8060c0878903121562000f82575f80fd5b86516001600160401b038082111562000f99575f80fd5b62000fa78a838b0162000ea6565b9750602089015191508082111562000fbd575f80fd5b5062000fcc89828a0162000ea6565b955050604087015160ff8116811462000fe3575f80fd5b6060880151909450925062000ffb6080880162000f50565b91506200100b60a0880162000f50565b90509295509295509295565b600181811c908216806200102c57607f821691505b6020821081036200104b57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f821115620002e2575f81815260208120601f850160051c81016020861015620010795750805b601f850160051c820191505b818110156200109a5782815560010162001085565b505050505050565b81516001600160401b03811115620010be57620010be62000e92565b620010d681620010cf845462001017565b8462001051565b602080601f8311600181146200110c575f8415620010f45750858301515b5f19600386901b1c1916600185901b1785556200109a565b5f85815260208120601f198616915b828110156200113c578886015182559484019460019091019084016200111b565b50858210156200115a57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b5f52601160045260245ffd5b600181815b80851115620011be57815f1904821115620011a257620011a26200116a565b80851615620011b057918102915b93841c939080029062001183565b509250929050565b5f82620011d657506001620008e3565b81620011e457505f620008e3565b8160018114620011fd5760028114620012085762001228565b6001915050620008e3565b60ff8411156200121c576200121c6200116a565b50506001821b620008e3565b5060208310610133831016604e8410600b84101617156200124d575081810a620008e3565b6200125983836200117e565b805f19048211156200126f576200126f6200116a565b029392505050565b5f6200128760ff841683620011c6565b9392505050565b8082028115828204841417620008e357620008e36200116a565b5f808354620012b78162001017565b60018281168015620012d25760018114620012e85762001316565b60ff198416875282151583028701945062001316565b875f526020805f205f5b858110156200130d5781548a820152908401908201620012f2565b50505082870194505b50929695505050505050565b80820180821115620008e357620008e36200116a565b5f826200135357634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115620008e357620008e36200116a565b634e487b7160e01b5f52603260045260245ffd5b5f600182016200139657620013966200116a565b5060010190565b634e487b7160e01b5f52603160045260245ffd5b6001600160401b03818116838216028082169190828114620013d757620013d76200116a565b505092915050565b60805160a05160c05160e05161295b620014605f395f6107c201525f61079201525f81816104640152818161105501528181611484015281816114c70152818161153e01528181611568015281816115ba01528181611685015281816116d1015281816117150152818161173c0152611c4b01525f61035b015261295b5ff3fe608060405234801561000f575f80fd5b5060043610610255575f3560e01c80638da5cb5b11610140578063c87b56dd116100bf578063dd63769911610084578063dd6376991461058d578063dfabc033146105a0578063e0df5b6f146105b3578063e985e9c5146105c6578063f2fde38b146105f3578063f780bc1a14610606575f80fd5b8063c87b56dd14610522578063d505accf14610535578063d547cfb714610548578063d96ca0b914610550578063dd62ed3e14610563575f80fd5b8063b1ab931711610105578063b1ab9317146104ac578063b3f9ea34146104cc578063b88d4fde146104f4578063c5ab3ba614610507578063c6e672b91461050f575f80fd5b80638da5cb5b1461044757806395d89b4114610457578063976a84351461045f578063a22cb46514610486578063a9059cbb14610499575f80fd5b80633644e515116101d75780636e8f624b1161019c5780636e8f624b146103db57806370a08231146103e6578063715018a6146104055780637ecebe001461040d57806389fb4c661461042c5780638a696e5014610434575f80fd5b80633644e5151461038f57806342842e0e146103975780634d966072146103ac5780634f02c420146103bf5780636352211e146103c8575f80fd5b806309674eb01161021d57806309674eb01461031f57806309f0ef651461032757806318160ddd1461033a57806323b872dd14610343578063313ce56714610356575f80fd5b806301ffc9a71461025957806302519da31461028157806306fdde03146102b7578063081812fc146102cc578063095ea7b31461030c575b5f80fd5b61026c61026736600461224f565b610619565b60405190151581526020015b60405180910390f35b6102a961028f366004612280565b6001600160a01b03165f9081526007602052604090205490565b604051908152602001610278565b6102bf61064f565b60405161027891906122e6565b6102f46102da3660046122f8565b60096020525f90815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610278565b61026c61031a36600461230f565b6106db565b6102a9610713565b61026c610335366004612280565b610723565b6102a960055481565b61026c610351366004612337565b610753565b61037d7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610278565b6102a961078f565b6103aa6103a5366004612337565b6107e4565b005b61026c6103ba36600461230f565b610803565b6102a960065481565b6102f46103d63660046122f8565b61088e565b6102a9600160ff1b81565b6102a96103f4366004612280565b60076020525f908152604090205481565b6103aa6108f7565b6102a961041b366004612280565b600e6020525f908152604090205481565b6005546102a9565b6103aa61044236600461237f565b61090a565b5f546001600160a01b03166102f4565b6102bf610917565b6102a97f000000000000000000000000000000000000000000000000000000000000000081565b6103aa610494366004612398565b610924565b61026c6104a736600461230f565b6109b6565b6104bf6104ba366004612280565b6109e9565b60405161027891906123c9565b6102a96104da366004612280565b6001600160a01b03165f908152600c602052604090205490565b6103aa610502366004612492565b610aeb565b6006546102a9565b6103aa61051d366004612398565b610bd6565b6102bf6105303660046122f8565b610bec565b6103aa610543366004612508565b610c20565b6102bf610e5d565b61026c61055e366004612337565b610e6a565b6102a9610571366004612575565b600860209081525f928352604080842090915290825290205481565b6103aa61059b366004612337565b610f26565b6103aa6105ae36600461230f565b611084565b6103aa6105c136600461259d565b611146565b61026c6105d4366004612575565b600a60209081525f928352604080842090915290825290205460ff1681565b6103aa610601366004612280565b61115a565b6104bf6106143660046125e1565b611199565b5f6001600160e01b0319821663caf91ff560e01b148061064957506001600160e01b031982166301ffc9a760e01b145b92915050565b6003805461065c90612601565b80601f016020809104026020016040519081016040528092919081815260200182805461068890612601565b80156106d35780601f106106aa576101008083540402835291602001916106d3565b820191905f5260205f20905b8154815290600101906020018083116106b657829003601f168201915b505050505081565b5f6106e582611246565b156106f9576106f48383611084565b61070a565b6107038383610803565b9050610649565b50600192915050565b5f61071e600161125d565b905090565b5f6001600160a01b03821615806106495750506001600160a01b03165f908152600d602052604090205460ff1690565b5f61075d82611246565b156107725761076d848484610f26565b610784565b61077d848484610e6a565b9050610788565b5060015b9392505050565b5f7f000000000000000000000000000000000000000000000000000000000000000046146107bf5761071e6112a0565b507f000000000000000000000000000000000000000000000000000000000000000090565b6107fe83838360405180602001604052805f815250610aeb565b505050565b5f6001600160a01b03831661082b57604051635461585f60e01b815260040160405180910390fd5b335f8181526008602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350600192915050565b5f818152600b60205260409020546001600160a01b03166108ae82611246565b6108cb576040516307ed98ed60e31b815260040160405180910390fd5b6001600160a01b0381166108f25760405163c5723b5160e01b815260040160405180910390fd5b919050565b6108ff611339565b6109085f611365565b565b61091433826113b4565b50565b6004805461065c90612601565b6001600160a01b03821661094b5760405163ccea9e6f60e01b815260040160405180910390fd5b335f818152600a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b5f6001600160a01b0383166109de57604051634e46966960e11b815260040160405180910390fd5b610788338484611422565b6001600160a01b0381165f908152600c6020526040812054606091906001600160401b03811115610a1c57610a1c61240c565b604051908082528060200260200182016040528015610a45578160200160208202803683370190505b5090505f5b6001600160a01b0384165f908152600c6020526040902054811015610ae4576001600160a01b0384165f908152600c60205260409020805482908110610a9257610a92612639565b5f9182526020909120601082040154610abf91600f166002026101000a900461ffff16600160ff1b612661565b828281518110610ad157610ad1612639565b6020908102919091010152600101610a4a565b5092915050565b610af482611246565b610b11576040516307ed98ed60e31b815260040160405180910390fd5b610b1c848484610753565b506001600160a01b0383163b15801590610bb25750604051630a85bd0160e11b808252906001600160a01b0385169063150b7a0290610b65903390899088908890600401612674565b6020604051808303815f875af1158015610b81573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ba591906126b0565b6001600160e01b03191614155b15610bd057604051633da6393160e01b815260040160405180910390fd5b50505050565b610bde611339565b610be882826113b4565b5050565b6060600f610bf9836117ac565b604051602001610c0a92919061273a565b6040516020818303038152906040529050919050565b42841015610c41576040516305787bdf60e01b815260040160405180910390fd5b610c4a85611246565b15610c68576040516303e7c1bd60e31b815260040160405180910390fd5b6001600160a01b038616610c8f57604051635461585f60e01b815260040160405180910390fd5b5f6001610c9a61078f565b6001600160a01b038a81165f818152600e602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610da2573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b0381161580610dd75750876001600160a01b0316816001600160a01b031614155b15610df557604051632057875960e21b815260040160405180910390fd5b6001600160a01b039081165f9081526008602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b600f805461065c90612601565b5f6001600160a01b038416610e9257604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b038316610eb957604051634e46966960e11b815260040160405180910390fd5b6001600160a01b0384165f9081526008602090815260408083203384529091529020545f198114610f1257610eee838261275e565b6001600160a01b0386165f9081526008602090815260408083203384529091529020555b610f1d858585611422565b95945050505050565b6001600160a01b038316610f4d57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b038216610f7457604051634e46966960e11b815260040160405180910390fd5b5f818152600b60205260409020546001600160a01b03848116911614610fac576040516282b42960e81b815260040160405180910390fd5b336001600160a01b03841614801590610fe857506001600160a01b0383165f908152600a6020908152604080832033845290915290205460ff16155b801561100a57505f818152600960205260409020546001600160a01b03163314155b15611027576040516282b42960e81b815260040160405180910390fd5b61103082610723565b1561104e57604051635ce7539760e01b815260040160405180910390fd5b61107983837f000000000000000000000000000000000000000000000000000000000000000061183b565b6107fe8383836118f4565b5f818152600b60205260409020546001600160a01b03163381148015906110ce57506001600160a01b0381165f908152600a6020908152604080832033845290915290205460ff16155b156110eb576040516282b42960e81b815260040160405180910390fd5b5f8281526009602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b61114e611339565b600f610be882826127be565b611162611339565b6001600160a01b03811661119057604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61091481611365565b60605f826001600160401b038111156111b4576111b461240c565b6040519080825280602002602001820160405280156111dd578160200160208202803683370190505b509050835b6111ec8486612661565b81101561123e576111fe600182611b4b565b6112109061ffff16600160ff1b612661565b8261121b878461275e565b8151811061122b5761122b612639565b60209081029190910101526001016111e2565b509392505050565b5f600160ff1b821180156106495750505f19141590565b54600f196001600160401b038083166010908102600160401b850483168203600160c01b8604841601600160801b90950483169091029390930192909203011690565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60036040516112d19190612879565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f546001600160a01b031633146109085760405163118cdaa760e01b8152336004820152602401611187565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0382166113db5760405163a41e3d3f60e01b815260040160405180910390fd5b80156113ef576113ea82611bfa565b6113f8565b6113f882611c2d565b6001600160a01b03919091165f908152600d60205260409020805460ff1916911515919091179055565b6001600160a01b038381165f9081526007602052604080822054928516825281205490919061145286868661183b565b5f61145c87610723565b90505f61146887610723565b90508180156114745750805b61179e57811561151a575f6114a97f000000000000000000000000000000000000000000000000000000000000000085612898565b6001600160a01b0389165f908152600760205260409020546114ec907f000000000000000000000000000000000000000000000000000000000000000090612898565b6114f6919061275e565b90505f5b818110156115135761150b89611cb7565b6001016114fa565b505061179e565b80156115b4576001600160a01b0388165f90815260076020526040812054611563907f000000000000000000000000000000000000000000000000000000000000000090612898565b61158d7f000000000000000000000000000000000000000000000000000000000000000087612898565b611597919061275e565b90505f5b81811015611513576115ac8a611d9a565b60010161159b565b5f6115df7f000000000000000000000000000000000000000000000000000000000000000088612898565b90505f5b81811015611681576001600160a01b038a165f908152600c602052604081205461160f9060019061275e565b6001600160a01b038c165f908152600c60205260408120805492935090918390811061163d5761163d612639565b5f918252602090912060108204015461166a91600f166002026101000a900461ffff16600160ff1b612661565b90506116778c8c836118f4565b50506001016115e3565b50807f00000000000000000000000000000000000000000000000000000000000000006116c28b6001600160a01b03165f9081526007602052604090205490565b6116cc9190612898565b6116f67f000000000000000000000000000000000000000000000000000000000000000088612898565b611700919061275e565b111561170f5761170f89611d9a565b8061173a7f000000000000000000000000000000000000000000000000000000000000000086612898565b7f00000000000000000000000000000000000000000000000000000000000000006117798b6001600160a01b03165f9081526007602052604090205490565b6117839190612898565b61178d919061275e565b111561179c5761179c88611cb7565b505b506001979650505050505050565b60605f6117b883611e3b565b60010190505f816001600160401b038111156117d6576117d661240c565b6040519080825280601f01601f191660200182016040528015611800576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461180a57509392505050565b6001600160a01b038316611865578060055f82825461185a9190612661565b909155506118929050565b6001600160a01b0383165f908152600760205260408120805483929061188c90849061275e565b90915550505b6001600160a01b038083165f81815260076020526040908190208054850190555190918516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906118e79085815260200190565b60405180910390a3505050565b6001600160a01b03831615611a52575f81815260096020908152604080832080546001600160a01b03191690556001600160a01b0386168352600c909152812080546119429060019061275e565b8154811061195257611952612639565b5f918252602090912060108204015461197f91600f166002026101000a900461ffff16600160ff1b612661565b9050818114611a00575f828152600b602052604081205460a01c6001600160a01b0386165f908152600c6020526040902080549192508391839081106119c7576119c7612639565b905f5260205f2090601091828204019190066002026101000a81548161ffff021916908361ffff1602179055506119fe8282611f12565b505b6001600160a01b0384165f908152600c60205260409020805480611a2657611a266128b7565b5f8281526020902060105f1990920191820401805461ffff6002600f8516026101000a02191690559055505b6001600160a01b03821615611af6575f818152600b6020526040902080546001600160a01b0319166001600160a01b0384160190556001600160a01b0382165f818152600c60209081526040822080546001808201835582855292842060108204018054600f9092166002026101000a61ffff8181021990931692881602919091179055929091529054611af1918391611aec919061275e565b611f12565b611b05565b5f818152600b60205260408120555b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b5f611b558361125d565b611b609060106128cb565b8210611b7f5760405163580821e760e01b815260040160405180910390fd5b610788600184015f601085046010808789546001600160401b03600160401b909104811692909106919091011681611bb957611bb9612884565b88549190046001600160401b03808316919091019290920182168352602083019390935260409091015f205491601091600160401b90910416850106611f7c565b6001600160a01b0381165f908152600c6020526040812054905b818110156107fe57611c2583611d9a565b600101611c14565b6001600160a01b0381165f90815260076020526040812054611c70907f000000000000000000000000000000000000000000000000000000000000000090612898565b90505f611c91836001600160a01b03165f908152600c602052604090205490565b90505f5b611c9f828461275e565b811015610bd057611caf84611cb7565b600101611c95565b6001600160a01b038116611cde57604051634e46966960e11b815260040160405180910390fd5b5f611ce96001611fa6565b611d1057611cf76001611fe7565b611d099061ffff16600160ff1b612661565b9050611d59565b60065f8154611d1e906128e2565b90915550600654600101611d455760405163303b682f60e01b815260040160405180910390fd5b600654611d5690600160ff1b612661565b90505b5f818152600b60205260409020546001600160a01b03168015611d8f5760405163119b4fd360e11b815260040160405180910390fd5b6107fe8184846118f4565b6001600160a01b038116611dc157604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381165f908152600c602052604081208054611de69060019061275e565b81548110611df657611df6612639565b5f9182526020909120601082040154611e2391600f166002026101000a900461ffff16600160ff1b612661565b9050611e30825f836118f4565b610be86001826120f4565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611e795772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611ea5576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611ec357662386f26fc10000830492506010015b6305f5e1008310611edb576305f5e100830492506008015b6127108310611eef57612710830492506004015b60648310611f01576064830492506002015b600a83106106495760010192915050565b5f828152600b60205260409020546bffffffffffffffffffffffff821115611f4d57604051633f2cd0e360e21b815260040160405180910390fd5b5f928352600b60205260409092206001600160a01b039290921660a09190911b6001600160a01b031916019055565b5f611f888260106128fa565b6001600160401b0316611f9a836121df565b8416901c905092915050565b80545f90600160c01b81046001600160401b03908116600160401b90920416148015610649575050546001600160401b03808216600160801b909204161490565b80545f906001600160401b03600160801b8204811691600160c01b81048216911682148015612029575083546001600160401b03828116600160401b90920416145b15612047576040516375e52f4f60e01b815260040160405180910390fd5b806001600160401b03165f0361206257505f1901600f612066565b5f19015b6001600160401b0382165f90815260018501602052604090205461208a8183611f7c565b935061209781835f612200565b6001600160401b039384165f81815260018801602052604090209190915585546fffffffffffffffffffffffffffffffff16600160801b9091026001600160c01b031617600160c01b929093169190910291909117909255919050565b81546001600160401b0380821691600160401b9004165f81900361211d57505f1901600f612121565b5f19015b83546001600160401b03838116600160801b90920416148015612157575083546001600160401b03828116600160c01b90920416145b1561217557604051638acb5f2760e01b815260040160405180910390fd5b6001600160401b0382165f90815260018501602052604090205461219a908285612200565b6001600160401b039283165f81815260018701602052604090209190915584546fffffffffffffffffffffffffffffffff191617600160401b91909216021790915550565b5f6121eb8260106128fa565b6001600160401b031661ffff901b9050919050565b5f61220c8360106128fa565b6001600160401b03168261ffff16901b612225846121df565b1985166122329190612661565b949350505050565b6001600160e01b031981168114610914575f80fd5b5f6020828403121561225f575f80fd5b81356107888161223a565b80356001600160a01b03811681146108f2575f80fd5b5f60208284031215612290575f80fd5b6107888261226a565b5f5b838110156122b357818101518382015260200161229b565b50505f910152565b5f81518084526122d2816020860160208601612299565b601f01601f19169290920160200192915050565b602081525f61078860208301846122bb565b5f60208284031215612308575f80fd5b5035919050565b5f8060408385031215612320575f80fd5b6123298361226a565b946020939093013593505050565b5f805f60608486031215612349575f80fd5b6123528461226a565b92506123606020850161226a565b9150604084013590509250925092565b803580151581146108f2575f80fd5b5f6020828403121561238f575f80fd5b61078882612370565b5f80604083850312156123a9575f80fd5b6123b28361226a565b91506123c060208401612370565b90509250929050565b602080825282518282018190525f9190848201906040850190845b81811015612400578351835292840192918401916001016123e4565b50909695505050505050565b634e487b7160e01b5f52604160045260245ffd5b5f6001600160401b03808411156124395761243961240c565b604051601f8501601f19908116603f011681019082821181831017156124615761246161240c565b81604052809350858152868686011115612479575f80fd5b858560208301375f602087830101525050509392505050565b5f805f80608085870312156124a5575f80fd5b6124ae8561226a565b93506124bc6020860161226a565b92506040850135915060608501356001600160401b038111156124dd575f80fd5b8501601f810187136124ed575f80fd5b6124fc87823560208401612420565b91505092959194509250565b5f805f805f805f60e0888a03121561251e575f80fd5b6125278861226a565b96506125356020890161226a565b95506040880135945060608801359350608088013560ff81168114612558575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215612586575f80fd5b61258f8361226a565b91506123c06020840161226a565b5f602082840312156125ad575f80fd5b81356001600160401b038111156125c2575f80fd5b8201601f810184136125d2575f80fd5b61223284823560208401612420565b5f80604083850312156125f2575f80fd5b50508035926020909101359150565b600181811c9082168061261557607f821691505b60208210810361263357634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156106495761064961264d565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f906126a6908301846122bb565b9695505050505050565b5f602082840312156126c0575f80fd5b81516107888161223a565b5f81546126d781612601565b600182811680156126ef576001811461270457612730565b60ff1984168752821515830287019450612730565b855f526020805f205f5b858110156127275781548a82015290840190820161270e565b50505082870194505b5050505092915050565b5f61274582856126cb565b8351612755818360208801612299565b01949350505050565b818103818111156106495761064961264d565b601f8211156107fe575f81815260208120601f850160051c810160208610156127975750805b601f850160051c820191505b818110156127b6578281556001016127a3565b505050505050565b81516001600160401b038111156127d7576127d761240c565b6127eb816127e58454612601565b84612771565b602080601f83116001811461281e575f84156128075750858301515b5f19600386901b1c1916600185901b1785556127b6565b5f85815260208120601f198616915b8281101561284c5788860151825594840194600190910190840161282d565b508582101561286957878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f61078882846126cb565b634e487b7160e01b5f52601260045260245ffd5b5f826128b257634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52603160045260245ffd5b80820281158282048414176106495761064961264d565b5f600182016128f3576128f361264d565b5060010190565b6001600160401b0381811683821602808216919082811461291d5761291d61264d565b50509291505056fea26469706673582212206636dbc9fc14f48f33b82321c81c5cd426cbd5c792a9bf82d9e15e542c33719d64736f6c63430008140033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000d050000000000000000000000003e797c2ab86bc19255237edf3bda6e6d10d1a6ad0000000000000000000000003e797c2ab86bc19255237edf3bda6e6d10d1a6ad00000000000000000000000000000000000000000000000000000000000000064b6174616e61000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064b4154414e410000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610255575f3560e01c80638da5cb5b11610140578063c87b56dd116100bf578063dd63769911610084578063dd6376991461058d578063dfabc033146105a0578063e0df5b6f146105b3578063e985e9c5146105c6578063f2fde38b146105f3578063f780bc1a14610606575f80fd5b8063c87b56dd14610522578063d505accf14610535578063d547cfb714610548578063d96ca0b914610550578063dd62ed3e14610563575f80fd5b8063b1ab931711610105578063b1ab9317146104ac578063b3f9ea34146104cc578063b88d4fde146104f4578063c5ab3ba614610507578063c6e672b91461050f575f80fd5b80638da5cb5b1461044757806395d89b4114610457578063976a84351461045f578063a22cb46514610486578063a9059cbb14610499575f80fd5b80633644e515116101d75780636e8f624b1161019c5780636e8f624b146103db57806370a08231146103e6578063715018a6146104055780637ecebe001461040d57806389fb4c661461042c5780638a696e5014610434575f80fd5b80633644e5151461038f57806342842e0e146103975780634d966072146103ac5780634f02c420146103bf5780636352211e146103c8575f80fd5b806309674eb01161021d57806309674eb01461031f57806309f0ef651461032757806318160ddd1461033a57806323b872dd14610343578063313ce56714610356575f80fd5b806301ffc9a71461025957806302519da31461028157806306fdde03146102b7578063081812fc146102cc578063095ea7b31461030c575b5f80fd5b61026c61026736600461224f565b610619565b60405190151581526020015b60405180910390f35b6102a961028f366004612280565b6001600160a01b03165f9081526007602052604090205490565b604051908152602001610278565b6102bf61064f565b60405161027891906122e6565b6102f46102da3660046122f8565b60096020525f90815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610278565b61026c61031a36600461230f565b6106db565b6102a9610713565b61026c610335366004612280565b610723565b6102a960055481565b61026c610351366004612337565b610753565b61037d7f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff9091168152602001610278565b6102a961078f565b6103aa6103a5366004612337565b6107e4565b005b61026c6103ba36600461230f565b610803565b6102a960065481565b6102f46103d63660046122f8565b61088e565b6102a9600160ff1b81565b6102a96103f4366004612280565b60076020525f908152604090205481565b6103aa6108f7565b6102a961041b366004612280565b600e6020525f908152604090205481565b6005546102a9565b6103aa61044236600461237f565b61090a565b5f546001600160a01b03166102f4565b6102bf610917565b6102a97f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b6103aa610494366004612398565b610924565b61026c6104a736600461230f565b6109b6565b6104bf6104ba366004612280565b6109e9565b60405161027891906123c9565b6102a96104da366004612280565b6001600160a01b03165f908152600c602052604090205490565b6103aa610502366004612492565b610aeb565b6006546102a9565b6103aa61051d366004612398565b610bd6565b6102bf6105303660046122f8565b610bec565b6103aa610543366004612508565b610c20565b6102bf610e5d565b61026c61055e366004612337565b610e6a565b6102a9610571366004612575565b600860209081525f928352604080842090915290825290205481565b6103aa61059b366004612337565b610f26565b6103aa6105ae36600461230f565b611084565b6103aa6105c136600461259d565b611146565b61026c6105d4366004612575565b600a60209081525f928352604080842090915290825290205460ff1681565b6103aa610601366004612280565b61115a565b6104bf6106143660046125e1565b611199565b5f6001600160e01b0319821663caf91ff560e01b148061064957506001600160e01b031982166301ffc9a760e01b145b92915050565b6003805461065c90612601565b80601f016020809104026020016040519081016040528092919081815260200182805461068890612601565b80156106d35780601f106106aa576101008083540402835291602001916106d3565b820191905f5260205f20905b8154815290600101906020018083116106b657829003601f168201915b505050505081565b5f6106e582611246565b156106f9576106f48383611084565b61070a565b6107038383610803565b9050610649565b50600192915050565b5f61071e600161125d565b905090565b5f6001600160a01b03821615806106495750506001600160a01b03165f908152600d602052604090205460ff1690565b5f61075d82611246565b156107725761076d848484610f26565b610784565b61077d848484610e6a565b9050610788565b5060015b9392505050565b5f7f000000000000000000000000000000000000000000000000000000000000000146146107bf5761071e6112a0565b507f4bbc1b6724b395e4d342a51094dbe85495cacb9e278a67f7742baaa56535d63d90565b6107fe83838360405180602001604052805f815250610aeb565b505050565b5f6001600160a01b03831661082b57604051635461585f60e01b815260040160405180910390fd5b335f8181526008602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350600192915050565b5f818152600b60205260409020546001600160a01b03166108ae82611246565b6108cb576040516307ed98ed60e31b815260040160405180910390fd5b6001600160a01b0381166108f25760405163c5723b5160e01b815260040160405180910390fd5b919050565b6108ff611339565b6109085f611365565b565b61091433826113b4565b50565b6004805461065c90612601565b6001600160a01b03821661094b5760405163ccea9e6f60e01b815260040160405180910390fd5b335f818152600a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b5f6001600160a01b0383166109de57604051634e46966960e11b815260040160405180910390fd5b610788338484611422565b6001600160a01b0381165f908152600c6020526040812054606091906001600160401b03811115610a1c57610a1c61240c565b604051908082528060200260200182016040528015610a45578160200160208202803683370190505b5090505f5b6001600160a01b0384165f908152600c6020526040902054811015610ae4576001600160a01b0384165f908152600c60205260409020805482908110610a9257610a92612639565b5f9182526020909120601082040154610abf91600f166002026101000a900461ffff16600160ff1b612661565b828281518110610ad157610ad1612639565b6020908102919091010152600101610a4a565b5092915050565b610af482611246565b610b11576040516307ed98ed60e31b815260040160405180910390fd5b610b1c848484610753565b506001600160a01b0383163b15801590610bb25750604051630a85bd0160e11b808252906001600160a01b0385169063150b7a0290610b65903390899088908890600401612674565b6020604051808303815f875af1158015610b81573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ba591906126b0565b6001600160e01b03191614155b15610bd057604051633da6393160e01b815260040160405180910390fd5b50505050565b610bde611339565b610be882826113b4565b5050565b6060600f610bf9836117ac565b604051602001610c0a92919061273a565b6040516020818303038152906040529050919050565b42841015610c41576040516305787bdf60e01b815260040160405180910390fd5b610c4a85611246565b15610c68576040516303e7c1bd60e31b815260040160405180910390fd5b6001600160a01b038616610c8f57604051635461585f60e01b815260040160405180910390fd5b5f6001610c9a61078f565b6001600160a01b038a81165f818152600e602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f1981840301815282825280516020918201205f84529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610da2573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b0381161580610dd75750876001600160a01b0316816001600160a01b031614155b15610df557604051632057875960e21b815260040160405180910390fd5b6001600160a01b039081165f9081526008602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b600f805461065c90612601565b5f6001600160a01b038416610e9257604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b038316610eb957604051634e46966960e11b815260040160405180910390fd5b6001600160a01b0384165f9081526008602090815260408083203384529091529020545f198114610f1257610eee838261275e565b6001600160a01b0386165f9081526008602090815260408083203384529091529020555b610f1d858585611422565b95945050505050565b6001600160a01b038316610f4d57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b038216610f7457604051634e46966960e11b815260040160405180910390fd5b5f818152600b60205260409020546001600160a01b03848116911614610fac576040516282b42960e81b815260040160405180910390fd5b336001600160a01b03841614801590610fe857506001600160a01b0383165f908152600a6020908152604080832033845290915290205460ff16155b801561100a57505f818152600960205260409020546001600160a01b03163314155b15611027576040516282b42960e81b815260040160405180910390fd5b61103082610723565b1561104e57604051635ce7539760e01b815260040160405180910390fd5b61107983837f0000000000000000000000000000000000000000000000000de0b6b3a764000061183b565b6107fe8383836118f4565b5f818152600b60205260409020546001600160a01b03163381148015906110ce57506001600160a01b0381165f908152600a6020908152604080832033845290915290205460ff16155b156110eb576040516282b42960e81b815260040160405180910390fd5b5f8281526009602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b61114e611339565b600f610be882826127be565b611162611339565b6001600160a01b03811661119057604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61091481611365565b60605f826001600160401b038111156111b4576111b461240c565b6040519080825280602002602001820160405280156111dd578160200160208202803683370190505b509050835b6111ec8486612661565b81101561123e576111fe600182611b4b565b6112109061ffff16600160ff1b612661565b8261121b878461275e565b8151811061122b5761122b612639565b60209081029190910101526001016111e2565b509392505050565b5f600160ff1b821180156106495750505f19141590565b54600f196001600160401b038083166010908102600160401b850483168203600160c01b8604841601600160801b90950483169091029390930192909203011690565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60036040516112d19190612879565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f546001600160a01b031633146109085760405163118cdaa760e01b8152336004820152602401611187565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0382166113db5760405163a41e3d3f60e01b815260040160405180910390fd5b80156113ef576113ea82611bfa565b6113f8565b6113f882611c2d565b6001600160a01b03919091165f908152600d60205260409020805460ff1916911515919091179055565b6001600160a01b038381165f9081526007602052604080822054928516825281205490919061145286868661183b565b5f61145c87610723565b90505f61146887610723565b90508180156114745750805b61179e57811561151a575f6114a97f0000000000000000000000000000000000000000000000000de0b6b3a764000085612898565b6001600160a01b0389165f908152600760205260409020546114ec907f0000000000000000000000000000000000000000000000000de0b6b3a764000090612898565b6114f6919061275e565b90505f5b818110156115135761150b89611cb7565b6001016114fa565b505061179e565b80156115b4576001600160a01b0388165f90815260076020526040812054611563907f0000000000000000000000000000000000000000000000000de0b6b3a764000090612898565b61158d7f0000000000000000000000000000000000000000000000000de0b6b3a764000087612898565b611597919061275e565b90505f5b81811015611513576115ac8a611d9a565b60010161159b565b5f6115df7f0000000000000000000000000000000000000000000000000de0b6b3a764000088612898565b90505f5b81811015611681576001600160a01b038a165f908152600c602052604081205461160f9060019061275e565b6001600160a01b038c165f908152600c60205260408120805492935090918390811061163d5761163d612639565b5f918252602090912060108204015461166a91600f166002026101000a900461ffff16600160ff1b612661565b90506116778c8c836118f4565b50506001016115e3565b50807f0000000000000000000000000000000000000000000000000de0b6b3a76400006116c28b6001600160a01b03165f9081526007602052604090205490565b6116cc9190612898565b6116f67f0000000000000000000000000000000000000000000000000de0b6b3a764000088612898565b611700919061275e565b111561170f5761170f89611d9a565b8061173a7f0000000000000000000000000000000000000000000000000de0b6b3a764000086612898565b7f0000000000000000000000000000000000000000000000000de0b6b3a76400006117798b6001600160a01b03165f9081526007602052604090205490565b6117839190612898565b61178d919061275e565b111561179c5761179c88611cb7565b505b506001979650505050505050565b60605f6117b883611e3b565b60010190505f816001600160401b038111156117d6576117d661240c565b6040519080825280601f01601f191660200182016040528015611800576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461180a57509392505050565b6001600160a01b038316611865578060055f82825461185a9190612661565b909155506118929050565b6001600160a01b0383165f908152600760205260408120805483929061188c90849061275e565b90915550505b6001600160a01b038083165f81815260076020526040908190208054850190555190918516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906118e79085815260200190565b60405180910390a3505050565b6001600160a01b03831615611a52575f81815260096020908152604080832080546001600160a01b03191690556001600160a01b0386168352600c909152812080546119429060019061275e565b8154811061195257611952612639565b5f918252602090912060108204015461197f91600f166002026101000a900461ffff16600160ff1b612661565b9050818114611a00575f828152600b602052604081205460a01c6001600160a01b0386165f908152600c6020526040902080549192508391839081106119c7576119c7612639565b905f5260205f2090601091828204019190066002026101000a81548161ffff021916908361ffff1602179055506119fe8282611f12565b505b6001600160a01b0384165f908152600c60205260409020805480611a2657611a266128b7565b5f8281526020902060105f1990920191820401805461ffff6002600f8516026101000a02191690559055505b6001600160a01b03821615611af6575f818152600b6020526040902080546001600160a01b0319166001600160a01b0384160190556001600160a01b0382165f818152600c60209081526040822080546001808201835582855292842060108204018054600f9092166002026101000a61ffff8181021990931692881602919091179055929091529054611af1918391611aec919061275e565b611f12565b611b05565b5f818152600b60205260408120555b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b5f611b558361125d565b611b609060106128cb565b8210611b7f5760405163580821e760e01b815260040160405180910390fd5b610788600184015f601085046010808789546001600160401b03600160401b909104811692909106919091011681611bb957611bb9612884565b88549190046001600160401b03808316919091019290920182168352602083019390935260409091015f205491601091600160401b90910416850106611f7c565b6001600160a01b0381165f908152600c6020526040812054905b818110156107fe57611c2583611d9a565b600101611c14565b6001600160a01b0381165f90815260076020526040812054611c70907f0000000000000000000000000000000000000000000000000de0b6b3a764000090612898565b90505f611c91836001600160a01b03165f908152600c602052604090205490565b90505f5b611c9f828461275e565b811015610bd057611caf84611cb7565b600101611c95565b6001600160a01b038116611cde57604051634e46966960e11b815260040160405180910390fd5b5f611ce96001611fa6565b611d1057611cf76001611fe7565b611d099061ffff16600160ff1b612661565b9050611d59565b60065f8154611d1e906128e2565b90915550600654600101611d455760405163303b682f60e01b815260040160405180910390fd5b600654611d5690600160ff1b612661565b90505b5f818152600b60205260409020546001600160a01b03168015611d8f5760405163119b4fd360e11b815260040160405180910390fd5b6107fe8184846118f4565b6001600160a01b038116611dc157604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381165f908152600c602052604081208054611de69060019061275e565b81548110611df657611df6612639565b5f9182526020909120601082040154611e2391600f166002026101000a900461ffff16600160ff1b612661565b9050611e30825f836118f4565b610be86001826120f4565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611e795772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611ea5576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611ec357662386f26fc10000830492506010015b6305f5e1008310611edb576305f5e100830492506008015b6127108310611eef57612710830492506004015b60648310611f01576064830492506002015b600a83106106495760010192915050565b5f828152600b60205260409020546bffffffffffffffffffffffff821115611f4d57604051633f2cd0e360e21b815260040160405180910390fd5b5f928352600b60205260409092206001600160a01b039290921660a09190911b6001600160a01b031916019055565b5f611f888260106128fa565b6001600160401b0316611f9a836121df565b8416901c905092915050565b80545f90600160c01b81046001600160401b03908116600160401b90920416148015610649575050546001600160401b03808216600160801b909204161490565b80545f906001600160401b03600160801b8204811691600160c01b81048216911682148015612029575083546001600160401b03828116600160401b90920416145b15612047576040516375e52f4f60e01b815260040160405180910390fd5b806001600160401b03165f0361206257505f1901600f612066565b5f19015b6001600160401b0382165f90815260018501602052604090205461208a8183611f7c565b935061209781835f612200565b6001600160401b039384165f81815260018801602052604090209190915585546fffffffffffffffffffffffffffffffff16600160801b9091026001600160c01b031617600160c01b929093169190910291909117909255919050565b81546001600160401b0380821691600160401b9004165f81900361211d57505f1901600f612121565b5f19015b83546001600160401b03838116600160801b90920416148015612157575083546001600160401b03828116600160c01b90920416145b1561217557604051638acb5f2760e01b815260040160405180910390fd5b6001600160401b0382165f90815260018501602052604090205461219a908285612200565b6001600160401b039283165f81815260018701602052604090209190915584546fffffffffffffffffffffffffffffffff191617600160401b91909216021790915550565b5f6121eb8260106128fa565b6001600160401b031661ffff901b9050919050565b5f61220c8360106128fa565b6001600160401b03168261ffff16901b612225846121df565b1985166122329190612661565b949350505050565b6001600160e01b031981168114610914575f80fd5b5f6020828403121561225f575f80fd5b81356107888161223a565b80356001600160a01b03811681146108f2575f80fd5b5f60208284031215612290575f80fd5b6107888261226a565b5f5b838110156122b357818101518382015260200161229b565b50505f910152565b5f81518084526122d2816020860160208601612299565b601f01601f19169290920160200192915050565b602081525f61078860208301846122bb565b5f60208284031215612308575f80fd5b5035919050565b5f8060408385031215612320575f80fd5b6123298361226a565b946020939093013593505050565b5f805f60608486031215612349575f80fd5b6123528461226a565b92506123606020850161226a565b9150604084013590509250925092565b803580151581146108f2575f80fd5b5f6020828403121561238f575f80fd5b61078882612370565b5f80604083850312156123a9575f80fd5b6123b28361226a565b91506123c060208401612370565b90509250929050565b602080825282518282018190525f9190848201906040850190845b81811015612400578351835292840192918401916001016123e4565b50909695505050505050565b634e487b7160e01b5f52604160045260245ffd5b5f6001600160401b03808411156124395761243961240c565b604051601f8501601f19908116603f011681019082821181831017156124615761246161240c565b81604052809350858152868686011115612479575f80fd5b858560208301375f602087830101525050509392505050565b5f805f80608085870312156124a5575f80fd5b6124ae8561226a565b93506124bc6020860161226a565b92506040850135915060608501356001600160401b038111156124dd575f80fd5b8501601f810187136124ed575f80fd5b6124fc87823560208401612420565b91505092959194509250565b5f805f805f805f60e0888a03121561251e575f80fd5b6125278861226a565b96506125356020890161226a565b95506040880135945060608801359350608088013560ff81168114612558575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b5f8060408385031215612586575f80fd5b61258f8361226a565b91506123c06020840161226a565b5f602082840312156125ad575f80fd5b81356001600160401b038111156125c2575f80fd5b8201601f810184136125d2575f80fd5b61223284823560208401612420565b5f80604083850312156125f2575f80fd5b50508035926020909101359150565b600181811c9082168061261557607f821691505b60208210810361263357634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156106495761064961264d565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f906126a6908301846122bb565b9695505050505050565b5f602082840312156126c0575f80fd5b81516107888161223a565b5f81546126d781612601565b600182811680156126ef576001811461270457612730565b60ff1984168752821515830287019450612730565b855f526020805f205f5b858110156127275781548a82015290840190820161270e565b50505082870194505b5050505092915050565b5f61274582856126cb565b8351612755818360208801612299565b01949350505050565b818103818111156106495761064961264d565b601f8211156107fe575f81815260208120601f850160051c810160208610156127975750805b601f850160051c820191505b818110156127b6578281556001016127a3565b505050505050565b81516001600160401b038111156127d7576127d761240c565b6127eb816127e58454612601565b84612771565b602080601f83116001811461281e575f84156128075750858301515b5f19600386901b1c1916600185901b1785556127b6565b5f85815260208120601f198616915b8281101561284c5788860151825594840194600190910190840161282d565b508582101561286957878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f61078882846126cb565b634e487b7160e01b5f52601260045260245ffd5b5f826128b257634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52603160045260245ffd5b80820281158282048414176106495761064961264d565b5f600182016128f3576128f361264d565b5060010190565b6001600160401b0381811683821602808216919082811461291d5761291d61264d565b50509291505056fea26469706673582212206636dbc9fc14f48f33b82321c81c5cd426cbd5c792a9bf82d9e15e542c33719d64736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000d050000000000000000000000003e797c2ab86bc19255237edf3bda6e6d10d1a6ad0000000000000000000000003e797c2ab86bc19255237edf3bda6e6d10d1a6ad00000000000000000000000000000000000000000000000000000000000000064b6174616e61000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064b4154414e410000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): Katana
Arg [1] : symbol_ (string): KATANA
Arg [2] : decimals_ (uint8): 18
Arg [3] : maxTotalSupplyERC721_ (uint256): 3333
Arg [4] : initialOwner_ (address): 0x3e797c2AB86bC19255237Edf3bDa6e6d10D1a6AD
Arg [5] : initialMintRecipient_ (address): 0x3e797c2AB86bC19255237Edf3bDa6e6d10D1a6AD
-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000d05
Arg [4] : 0000000000000000000000003e797c2ab86bc19255237edf3bda6e6d10d1a6ad
Arg [5] : 0000000000000000000000003e797c2ab86bc19255237edf3bda6e6d10d1a6ad
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [7] : 4b6174616e610000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [9] : 4b4154414e410000000000000000000000000000000000000000000000000000
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.