ETH Price: $3,444.73 (+4.00%)

Token

FLOOR (FLOOR)
 

Overview

Max Total Supply

288 FLOOR

Holders

109

Total Transfers

-

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

FLOOR plays an integral role in the MOCA ROOMs ecosystem. They are blueprint NFTs with a single attribute: Slots. For example, if a FLOOR has 8 slots, it can be redeemed for a ROOM that also contains 8 NFT Slots.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
FloorToken

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 20000 runs

Other Settings:
default evmVersion
File 1 of 17 : FloorToken.sol
// SPDX-License-Identifier: GPL-3.0

// SPDX-License-Identifier: MIT
/*
 * @author Hamdi Allam [email protected]
 * Please reach out with any questions or concerns
 */
pragma solidity ^0.8.0;

library RLPReader {
    uint8 constant STRING_SHORT_START = 0x80;
    uint8 constant STRING_LONG_START = 0xb8;
    uint8 constant LIST_SHORT_START = 0xc0;
    uint8 constant LIST_LONG_START = 0xf8;
    uint8 constant WORD_SIZE = 32;

    struct RLPItem {
        uint256 len;
        uint256 memPtr;
    }

    struct Iterator {
        RLPItem item; // Item that's being iterated over.
        uint256 nextPtr; // Position of the next item in the list.
    }

    /*
     * @dev Returns the next element in the iteration. Reverts if it has not next element.
     * @param self The iterator.
     * @return The next element in the iteration.
     */
    function next(Iterator memory self) internal pure returns (RLPItem memory) {
        require(hasNext(self));

        uint256 ptr = self.nextPtr;
        uint256 itemLength = _itemLength(ptr);
        self.nextPtr = ptr + itemLength;

        return RLPItem(itemLength, ptr);
    }

    /*
     * @dev Returns true if the iteration has more elements.
     * @param self The iterator.
     * @return true if the iteration has more elements.
     */
    function hasNext(Iterator memory self) internal pure returns (bool) {
        RLPItem memory item = self.item;
        return self.nextPtr < item.memPtr + item.len;
    }

    /*
     * @param item RLP encoded bytes
     */
    function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) {
        uint256 memPtr;
        assembly {
            memPtr := add(item, 0x20)
        }

        return RLPItem(item.length, memPtr);
    }

    /*
     * @dev Create an iterator. Reverts if item is not a list.
     * @param self The RLP item.
     * @return An 'Iterator' over the item.
     */
    function iterator(RLPItem memory self) internal pure returns (Iterator memory) {
        require(isList(self));

        uint256 ptr = self.memPtr + _payloadOffset(self.memPtr);
        return Iterator(self, ptr);
    }

    /*
     * @param item RLP encoded bytes
     */
    function rlpLen(RLPItem memory item) internal pure returns (uint256) {
        return item.len;
    }

    /*
     * @param item RLP encoded bytes
     */
    function payloadLen(RLPItem memory item) internal pure returns (uint256) {
        return item.len - _payloadOffset(item.memPtr);
    }

    /*
     * @param item RLP encoded list in bytes
     */
    function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) {
        require(isList(item));

        uint256 items = numItems(item);
        RLPItem[] memory result = new RLPItem[](items);

        uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr);
        uint256 dataLen;
        for (uint256 i = 0; i < items; i++) {
            dataLen = _itemLength(memPtr);
            result[i] = RLPItem(dataLen, memPtr);
            memPtr = memPtr + dataLen;
        }

        return result;
    }

    // @return indicator whether encoded payload is a list. negate this function call for isData.
    function isList(RLPItem memory item) internal pure returns (bool) {
        if (item.len == 0) return false;

        uint8 byte0;
        uint256 memPtr = item.memPtr;
        assembly {
            byte0 := byte(0, mload(memPtr))
        }

        if (byte0 < LIST_SHORT_START) return false;
        return true;
    }

    /*
     * @dev A cheaper version of keccak256(toRlpBytes(item)) that avoids copying memory.
     * @return keccak256 hash of RLP encoded bytes.
     */
    function rlpBytesKeccak256(RLPItem memory item) internal pure returns (bytes32) {
        uint256 ptr = item.memPtr;
        uint256 len = item.len;
        bytes32 result;
        assembly {
            result := keccak256(ptr, len)
        }
        return result;
    }

    function payloadLocation(RLPItem memory item) internal pure returns (uint256, uint256) {
        uint256 offset = _payloadOffset(item.memPtr);
        uint256 memPtr = item.memPtr + offset;
        uint256 len = item.len - offset; // data length
        return (memPtr, len);
    }

    /*
     * @dev A cheaper version of keccak256(toBytes(item)) that avoids copying memory.
     * @return keccak256 hash of the item payload.
     */
    function payloadKeccak256(RLPItem memory item) internal pure returns (bytes32) {
        (uint256 memPtr, uint256 len) = payloadLocation(item);
        bytes32 result;
        assembly {
            result := keccak256(memPtr, len)
        }
        return result;
    }

    /** RLPItem conversions into data types **/

    // @returns raw rlp encoding in bytes
    function toRlpBytes(RLPItem memory item) internal pure returns (bytes memory) {
        bytes memory result = new bytes(item.len);
        if (result.length == 0) return result;

        uint256 ptr;
        assembly {
            ptr := add(0x20, result)
        }

        copy(item.memPtr, ptr, item.len);
        return result;
    }

    // any non-zero byte is considered true
    function toBoolean(RLPItem memory item) internal pure returns (bool) {
        require(item.len == 1);
        uint256 result;
        uint256 memPtr = item.memPtr;
        assembly {
            result := byte(0, mload(memPtr))
        }

        return result == 0 ? false : true;
    }

    function toAddress(RLPItem memory item) internal pure returns (address) {
        // 1 byte for the length prefix
        require(item.len == 21);

        return address(uint160(toUint(item)));
    }

    function toUint(RLPItem memory item) internal pure returns (uint256) {
        require(item.len > 0 && item.len <= 33);

        uint256 offset = _payloadOffset(item.memPtr);
        uint256 len = item.len - offset;

        uint256 result;
        uint256 memPtr = item.memPtr + offset;
        assembly {
            result := mload(memPtr)

            // shfit to the correct location if neccesary
            if lt(len, 32) {
                result := div(result, exp(256, sub(32, len)))
            }
        }

        return result;
    }

    // enforces 32 byte length
    function toUintStrict(RLPItem memory item) internal pure returns (uint256) {
        // one byte prefix
        require(item.len == 33);

        uint256 result;
        uint256 memPtr = item.memPtr + 1;
        assembly {
            result := mload(memPtr)
        }

        return result;
    }

    function toBytes(RLPItem memory item) internal pure returns (bytes memory) {
        require(item.len > 0);

        uint256 offset = _payloadOffset(item.memPtr);
        uint256 len = item.len - offset; // data length
        bytes memory result = new bytes(len);

        uint256 destPtr;
        assembly {
            destPtr := add(0x20, result)
        }

        copy(item.memPtr + offset, destPtr, len);
        return result;
    }

    /*
     * Private Helpers
     */

    // @return number of payload items inside an encoded list.
    function numItems(RLPItem memory item) private pure returns (uint256) {
        if (item.len == 0) return 0;

        uint256 count = 0;
        uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr);
        uint256 endPtr = item.memPtr + item.len;
        while (currPtr < endPtr) {
            currPtr = currPtr + _itemLength(currPtr); // skip over an item
            count++;
        }

        return count;
    }

    // @return entire rlp item byte length
    function _itemLength(uint256 memPtr) private pure returns (uint256) {
        uint256 itemLen;
        uint256 byte0;
        assembly {
            byte0 := byte(0, mload(memPtr))
        }

        if (byte0 < STRING_SHORT_START) itemLen = 1;
        else if (byte0 < STRING_LONG_START) itemLen = byte0 - STRING_SHORT_START + 1;
        else if (byte0 < LIST_SHORT_START) {
            assembly {
                let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is
                memPtr := add(memPtr, 1) // skip over the first byte
                /* 32 byte word size */
                let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len
                itemLen := add(dataLen, add(byteLen, 1))
            }
        } else if (byte0 < LIST_LONG_START) {
            itemLen = byte0 - LIST_SHORT_START + 1;
        } else {
            assembly {
                let byteLen := sub(byte0, 0xf7)
                memPtr := add(memPtr, 1)

                let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length
                itemLen := add(dataLen, add(byteLen, 1))
            }
        }

        return itemLen;
    }

    // @return number of bytes until the data
    function _payloadOffset(uint256 memPtr) private pure returns (uint256) {
        uint256 byte0;
        assembly {
            byte0 := byte(0, mload(memPtr))
        }

        if (byte0 < STRING_SHORT_START) return 0;
        else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)) return 1;
        else if (byte0 < LIST_SHORT_START)
            // being explicit
            return byte0 - (STRING_LONG_START - 1) + 1;
        else return byte0 - (LIST_LONG_START - 1) + 1;
    }

    /*
     * @param src Pointer to source
     * @param dest Pointer to destination
     * @param len Amount of memory to copy from the source
     */
    function copy(
        uint256 src,
        uint256 dest,
        uint256 len
    ) private pure {
        if (len == 0) return;

        // copy as many word sizes as possible
        for (; len >= WORD_SIZE; len -= WORD_SIZE) {
            assembly {
                mstore(dest, mload(src))
            }

            src += WORD_SIZE;
            dest += WORD_SIZE;
        }

        if (len == 0) return;

        // left over bytes. Mask is used to remove unwanted bytes from the word
        uint256 mask = 256**(WORD_SIZE - len) - 1;

        assembly {
            let srcpart := and(mload(src), not(mask)) // zero out src
            let destpart := and(mload(dest), mask) // retrieve the bytes
            mstore(dest, or(destpart, srcpart))
        }
    }
}


pragma solidity ^0.8.0;

library MerklePatriciaProof {
    /*
     * @dev Verifies a merkle patricia proof.
     * @param value The terminating value in the trie.
     * @param encodedPath The path in the trie leading to value.
     * @param rlpParentNodes The rlp encoded stack of nodes.
     * @param root The root hash of the trie.
     * @return The boolean validity of the proof.
     */
    function verify(
        bytes memory value,
        bytes memory encodedPath,
        bytes memory rlpParentNodes,
        bytes32 root
    ) internal pure returns (bool) {
        RLPReader.RLPItem memory item = RLPReader.toRlpItem(rlpParentNodes);
        RLPReader.RLPItem[] memory parentNodes = RLPReader.toList(item);

        bytes memory currentNode;
        RLPReader.RLPItem[] memory currentNodeList;

        bytes32 nodeKey = root;
        uint256 pathPtr = 0;

        bytes memory path = _getNibbleArray(encodedPath);
        if (path.length == 0) {
            return false;
        }

        for (uint256 i = 0; i < parentNodes.length; i++) {
            if (pathPtr > path.length) {
                return false;
            }

            currentNode = RLPReader.toRlpBytes(parentNodes[i]);
            if (nodeKey != keccak256(currentNode)) {
                return false;
            }
            currentNodeList = RLPReader.toList(parentNodes[i]);

            if (currentNodeList.length == 17) {
                if (pathPtr == path.length) {
                    if (keccak256(RLPReader.toBytes(currentNodeList[16])) == keccak256(value)) {
                        return true;
                    } else {
                        return false;
                    }
                }

                uint8 nextPathNibble = uint8(path[pathPtr]);
                if (nextPathNibble > 16) {
                    return false;
                }
                nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[nextPathNibble]));
                pathPtr += 1;
            } else if (currentNodeList.length == 2) {
                uint256 traversed = _nibblesToTraverse(RLPReader.toBytes(currentNodeList[0]), path, pathPtr);
                if (pathPtr + traversed == path.length) {
                    //leaf node
                    if (keccak256(RLPReader.toBytes(currentNodeList[1])) == keccak256(value)) {
                        return true;
                    } else {
                        return false;
                    }
                }

                //extension node
                if (traversed == 0) {
                    return false;
                }

                pathPtr += traversed;
                nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[1]));
            } else {
                return false;
            }
        }
    }

    function _nibblesToTraverse(
        bytes memory encodedPartialPath,
        bytes memory path,
        uint256 pathPtr
    ) private pure returns (uint256) {
        uint256 len = 0;
        // encodedPartialPath has elements that are each two hex characters (1 byte), but partialPath
        // and slicedPath have elements that are each one hex character (1 nibble)
        bytes memory partialPath = _getNibbleArray(encodedPartialPath);
        bytes memory slicedPath = new bytes(partialPath.length);

        // pathPtr counts nibbles in path
        // partialPath.length is a number of nibbles
        for (uint256 i = pathPtr; i < pathPtr + partialPath.length; i++) {
            bytes1 pathNibble = path[i];
            slicedPath[i - pathPtr] = pathNibble;
        }

        if (keccak256(partialPath) == keccak256(slicedPath)) {
            len = partialPath.length;
        } else {
            len = 0;
        }
        return len;
    }

    // bytes b must be hp encoded
    function _getNibbleArray(bytes memory b) internal pure returns (bytes memory) {
        bytes memory nibbles = "";
        if (b.length > 0) {
            uint8 offset;
            uint8 hpNibble = uint8(_getNthNibbleOfBytes(0, b));
            if (hpNibble == 1 || hpNibble == 3) {
                nibbles = new bytes(b.length * 2 - 1);
                bytes1 oddNibble = _getNthNibbleOfBytes(1, b);
                nibbles[0] = oddNibble;
                offset = 1;
            } else {
                nibbles = new bytes(b.length * 2 - 2);
                offset = 0;
            }

            for (uint256 i = offset; i < nibbles.length; i++) {
                nibbles[i] = _getNthNibbleOfBytes(i - offset + 2, b);
            }
        }
        return nibbles;
    }

    function _getNthNibbleOfBytes(uint256 n, bytes memory str) private pure returns (bytes1) {
        return bytes1(n % 2 == 0 ? uint8(str[n / 2]) / 0x10 : uint8(str[n / 2]) % 0x10);
    }
}


pragma solidity ^0.8.0;

library Merkle {
    function checkMembership(
        bytes32 leaf,
        uint256 index,
        bytes32 rootHash,
        bytes memory proof
    ) internal pure returns (bool) {
        require(proof.length % 32 == 0, "Invalid proof length");
        uint256 proofHeight = proof.length / 32;
        // Proof of size n means, height of the tree is n+1.
        // In a tree of height n+1, max #leafs possible is 2 ^ n
        require(index < 2**proofHeight, "Leaf index is too big");

        bytes32 proofElement;
        bytes32 computedHash = leaf;
        for (uint256 i = 32; i <= proof.length; i += 32) {
            assembly {
                proofElement := mload(add(proof, i))
            }

            if (index % 2 == 0) {
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }

            index = index / 2;
        }
        return computedHash == rootHash;
    }
}


pragma solidity ^0.8.0;

library ExitPayloadReader {
    using RLPReader for bytes;
    using RLPReader for RLPReader.RLPItem;

    uint8 constant WORD_SIZE = 32;

    struct ExitPayload {
        RLPReader.RLPItem[] data;
    }

    struct Receipt {
        RLPReader.RLPItem[] data;
        bytes raw;
        uint256 logIndex;
    }

    struct Log {
        RLPReader.RLPItem data;
        RLPReader.RLPItem[] list;
    }

    struct LogTopics {
        RLPReader.RLPItem[] data;
    }

    // copy paste of private copy() from RLPReader to avoid changing of existing contracts
    function copy(
        uint256 src,
        uint256 dest,
        uint256 len
    ) private pure {
        if (len == 0) return;

        // copy as many word sizes as possible
        for (; len >= WORD_SIZE; len -= WORD_SIZE) {
            assembly {
                mstore(dest, mload(src))
            }

            src += WORD_SIZE;
            dest += WORD_SIZE;
        }

        // left over bytes. Mask is used to remove unwanted bytes from the word
        uint256 mask = 256**(WORD_SIZE - len) - 1;
        assembly {
            let srcpart := and(mload(src), not(mask)) // zero out src
            let destpart := and(mload(dest), mask) // retrieve the bytes
            mstore(dest, or(destpart, srcpart))
        }
    }

    function toExitPayload(bytes memory data) internal pure returns (ExitPayload memory) {
        RLPReader.RLPItem[] memory payloadData = data.toRlpItem().toList();

        return ExitPayload(payloadData);
    }

    function getHeaderNumber(ExitPayload memory payload) internal pure returns (uint256) {
        return payload.data[0].toUint();
    }

    function getBlockProof(ExitPayload memory payload) internal pure returns (bytes memory) {
        return payload.data[1].toBytes();
    }

    function getBlockNumber(ExitPayload memory payload) internal pure returns (uint256) {
        return payload.data[2].toUint();
    }

    function getBlockTime(ExitPayload memory payload) internal pure returns (uint256) {
        return payload.data[3].toUint();
    }

    function getTxRoot(ExitPayload memory payload) internal pure returns (bytes32) {
        return bytes32(payload.data[4].toUint());
    }

    function getReceiptRoot(ExitPayload memory payload) internal pure returns (bytes32) {
        return bytes32(payload.data[5].toUint());
    }

    function getReceipt(ExitPayload memory payload) internal pure returns (Receipt memory receipt) {
        receipt.raw = payload.data[6].toBytes();
        RLPReader.RLPItem memory receiptItem = receipt.raw.toRlpItem();

        if (receiptItem.isList()) {
            // legacy tx
            receipt.data = receiptItem.toList();
        } else {
            // pop first byte before parsting receipt
            bytes memory typedBytes = receipt.raw;
            bytes memory result = new bytes(typedBytes.length - 1);
            uint256 srcPtr;
            uint256 destPtr;
            assembly {
                srcPtr := add(33, typedBytes)
                destPtr := add(0x20, result)
            }

            copy(srcPtr, destPtr, result.length);
            receipt.data = result.toRlpItem().toList();
        }

        receipt.logIndex = getReceiptLogIndex(payload);
        return receipt;
    }

    function getReceiptProof(ExitPayload memory payload) internal pure returns (bytes memory) {
        return payload.data[7].toBytes();
    }

    function getBranchMaskAsBytes(ExitPayload memory payload) internal pure returns (bytes memory) {
        return payload.data[8].toBytes();
    }

    function getBranchMaskAsUint(ExitPayload memory payload) internal pure returns (uint256) {
        return payload.data[8].toUint();
    }

    function getReceiptLogIndex(ExitPayload memory payload) internal pure returns (uint256) {
        return payload.data[9].toUint();
    }

    // Receipt methods
    function toBytes(Receipt memory receipt) internal pure returns (bytes memory) {
        return receipt.raw;
    }

    function getLog(Receipt memory receipt) internal pure returns (Log memory) {
        RLPReader.RLPItem memory logData = receipt.data[3].toList()[receipt.logIndex];
        return Log(logData, logData.toList());
    }

    // Log methods
    function getEmitter(Log memory log) internal pure returns (address) {
        return RLPReader.toAddress(log.list[0]);
    }

    function getTopics(Log memory log) internal pure returns (LogTopics memory) {
        return LogTopics(log.list[1].toList());
    }

    function getData(Log memory log) internal pure returns (bytes memory) {
        return log.list[2].toBytes();
    }

    function toRlpBytes(Log memory log) internal pure returns (bytes memory) {
        return log.data.toRlpBytes();
    }

    // LogTopics methods
    function getField(LogTopics memory topics, uint256 index) internal pure returns (RLPReader.RLPItem memory) {
        return topics.data[index];
    }
}


pragma solidity ^0.8.0;

interface IFxStateSender {
    function sendMessageToChild(address _receiver, bytes calldata _data) external;
}

contract ICheckpointManager {
    struct HeaderBlock {
        bytes32 root;
        uint256 start;
        uint256 end;
        uint256 createdAt;
        address proposer;
    }

    /**
     * @notice mapping of checkpoint header numbers to block details
     * @dev These checkpoints are submited by plasma contracts
     */
    mapping(uint256 => HeaderBlock) public headerBlocks;
}

abstract contract FxBaseRootTunnel {
    using RLPReader for RLPReader.RLPItem;
    using Merkle for bytes32;
    using ExitPayloadReader for bytes;
    using ExitPayloadReader for ExitPayloadReader.ExitPayload;
    using ExitPayloadReader for ExitPayloadReader.Log;
    using ExitPayloadReader for ExitPayloadReader.LogTopics;
    using ExitPayloadReader for ExitPayloadReader.Receipt;

    // keccak256(MessageSent(bytes))
    bytes32 public constant SEND_MESSAGE_EVENT_SIG = 0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036;

    // state sender contract
    IFxStateSender public fxRoot;
    // root chain manager
    ICheckpointManager public checkpointManager;
    // child tunnel contract which receives and sends messages
    address public fxChildTunnel;

    // storage to avoid duplicate exits
    mapping(bytes32 => bool) public processedExits;

    constructor(address _checkpointManager, address _fxRoot) {
        checkpointManager = ICheckpointManager(_checkpointManager);
        fxRoot = IFxStateSender(_fxRoot);
    }

    // set fxChildTunnel if not set already
    function setFxChildTunnel(address _fxChildTunnel) public {
        require(fxChildTunnel == address(0x0), "FxBaseRootTunnel: CHILD_TUNNEL_ALREADY_SET");
        fxChildTunnel = _fxChildTunnel;
    }

    /**
     * @notice Send bytes message to Child Tunnel
     * @param message bytes message that will be sent to Child Tunnel
     * some message examples -
     *   abi.encode(tokenId);
     *   abi.encode(tokenId, tokenMetadata);
     *   abi.encode(messageType, messageData);
     */
    function _sendMessageToChild(bytes memory message) internal {
        fxRoot.sendMessageToChild(fxChildTunnel, message);
    }

    function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) {
        ExitPayloadReader.ExitPayload memory payload = inputData.toExitPayload();

        bytes memory branchMaskBytes = payload.getBranchMaskAsBytes();
        uint256 blockNumber = payload.getBlockNumber();
        // checking if exit has already been processed
        // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)
        bytes32 exitHash = keccak256(
            abi.encodePacked(
                blockNumber,
                // first 2 nibbles are dropped while generating nibble array
                // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)
                // so converting to nibble array and then hashing it
                MerklePatriciaProof._getNibbleArray(branchMaskBytes),
                payload.getReceiptLogIndex()
            )
        );
        require(processedExits[exitHash] == false, "FxRootTunnel: EXIT_ALREADY_PROCESSED");
        processedExits[exitHash] = true;

        ExitPayloadReader.Receipt memory receipt = payload.getReceipt();
        ExitPayloadReader.Log memory log = receipt.getLog();

        // check child tunnel
        require(fxChildTunnel == log.getEmitter(), "FxRootTunnel: INVALID_FX_CHILD_TUNNEL");

        bytes32 receiptRoot = payload.getReceiptRoot();
        // verify receipt inclusion
        require(
            MerklePatriciaProof.verify(receipt.toBytes(), branchMaskBytes, payload.getReceiptProof(), receiptRoot),
            "FxRootTunnel: INVALID_RECEIPT_PROOF"
        );

        // verify checkpoint inclusion
        _checkBlockMembershipInCheckpoint(
            blockNumber,
            payload.getBlockTime(),
            payload.getTxRoot(),
            receiptRoot,
            payload.getHeaderNumber(),
            payload.getBlockProof()
        );

        ExitPayloadReader.LogTopics memory topics = log.getTopics();

        require(
            bytes32(topics.getField(0).toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig
            "FxRootTunnel: INVALID_SIGNATURE"
        );

        // received message data
        bytes memory message = abi.decode(log.getData(), (bytes)); // event decodes params again, so decoding bytes to get message
        return message;
    }

    function _checkBlockMembershipInCheckpoint(
        uint256 blockNumber,
        uint256 blockTime,
        bytes32 txRoot,
        bytes32 receiptRoot,
        uint256 headerNumber,
        bytes memory blockProof
    ) private view returns (uint256) {
        (bytes32 headerRoot, uint256 startBlock, , uint256 createdAt, ) = checkpointManager.headerBlocks(headerNumber);

        require(
            keccak256(abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)).checkMembership(
                blockNumber - startBlock,
                headerRoot,
                blockProof
            ),
            "FxRootTunnel: INVALID_HEADER"
        );
        return createdAt;
    }

    /**
     * @notice receive message from  L2 to L1, validated by proof
     * @dev This function verifies if the transaction actually happened on child chain
     *
     * @param inputData RLP encoded data of the reference tx containing following list of fields
     *  0 - headerNumber - Checkpoint header block number containing the reference tx
     *  1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root
     *  2 - blockNumber - Block number containing the reference tx on child chain
     *  3 - blockTime - Reference tx block time
     *  4 - txRoot - Transactions root of block
     *  5 - receiptRoot - Receipts root of block
     *  6 - receipt - Receipt of the reference transaction
     *  7 - receiptProof - Merkle proof of the reference receipt
     *  8 - branchMask - 32 bits denoting the path of receipt in merkle tree
     *  9 - receiptLogIndex - Log Index to read from the receipt
     */
    function receiveMessage(bytes memory inputData) public virtual {
        bytes memory message = _validateAndExtractMessage(inputData);
        _processMessageFromChild(message);
    }

    /**
     * @notice Process message received from Child Tunnel
     * @dev function needs to be implemented to handle message as per requirement
     * This is called by onStateReceive function.
     * Since it is called via a system call, any event will not be emitted during its execution.
     * @param message bytes message that was sent from Child Tunnel
     */
    function _processMessageFromChild(bytes memory message) internal virtual;
}

/// @title The FLOOR ERC-721 token

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*                                                            *
*    8888888888 888      .d88888b.   .d88888b.  8888888b.    *
*    888        888     d88P" "Y88b d88P" "Y88b 888   Y88b   *
*    888        888     888     888 888     888 888    888   *
*    8888888    888     888     888 888     888 888   d88P   *
*    888        888     888     888 888     888 8888888P"    *
*    888        888     888     888 888     888 888 T88b     *
*    888        888     Y88b. .d88P Y88b. .d88P 888  T88b    *
*    888        88888888 "Y88888P"   "Y88888P"  888   T88b   *
*                                                            *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

pragma solidity ^0.8.6;

import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol';
import { ERC721Checkpointable } from './base/ERC721Checkpointable.sol';
import { IFloorDescriptor } from './interfaces/IFloorDescriptor.sol';
import { IFloorToken } from './interfaces/IFloorToken.sol';
import { ERC721 } from './base/ERC721.sol';
import { IERC721 } from '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import { IProxyRegistry } from './external/opensea/IProxyRegistry.sol';

contract FloorToken is IFloorToken, Ownable, ERC721Checkpointable, FxBaseRootTunnel {
    // The DAO address
    address public floorsDAO;

    // An address who has permissions to mint Floor
    address public minter;

    // An address who has permissions to mint Floor
    address public predicate;

    // The Floor token URI descriptor
    IFloorDescriptor public descriptor;

    // Whether the minter can be updated
    bool public isMinterLocked;

    // Whether the descriptor can be updated
    bool public isDescriptorLocked;

    // The internal floor ID tracker
    uint256 private _currentFloorId;

    // IPFS content hash of contract-level metadata
    string private _contractURIHash = 'QmYuMm7YikekmHC3oQcvBP3fZErJPoPiPAdhDfvCt3jsSH';

    mapping(uint256 => uint16) public sizes;

    mapping (uint256 => bool) public withdrawnTokens;

    // OpenSea's Proxy Registry
    IProxyRegistry public immutable proxyRegistry;

    /**
     * @notice Require that the minter has not been locked.
     */
    modifier whenMinterNotLocked() {
        require(!isMinterLocked, 'Minter is locked');
        _;
    }

    /**
     * @notice Require that the descriptor has not been locked.
     */
    modifier whenDescriptorNotLocked() {
        require(!isDescriptorLocked, 'Descriptor is locked');
        _;
    }

    /**
     * @notice Require that the sender is the DAO.
     */
    modifier onlyFloorsDAO() {
        require(msg.sender == floorsDAO, 'Sender is not the DAO');
        _;
    }

    /**
     * @notice Require that the sender is the minter.
     */
    modifier onlyMinter() {
        require(msg.sender == minter, 'Sender is not the minter');
        _;
    }

    /**
     * @notice Require that the sender is the predicate.
     */
    modifier onlyPredicate() {
        require(msg.sender == predicate, 'Sender is not the predicate');
        _;
    }

    constructor(
        address _floorsDAO,
        address _minter,
        address _predicate,
        IFloorDescriptor _descriptor,
        IProxyRegistry _proxyRegistry,
        address _checkpointManager,
        address _fxRoot
    )
        ERC721('FLOOR', 'FLOOR')
        FxBaseRootTunnel(_checkpointManager, _fxRoot)
    {
        descriptor = _descriptor;
        predicate = _predicate;
        floorsDAO = _floorsDAO;
        minter = _minter;
        proxyRegistry = _proxyRegistry;
    }

    /**
     * @notice Generate a pseudo-random number using the previous blockhash and floor ID.
     */
    function randNumber(uint256 floorId) private view returns(uint256) {
        uint256 pseudorandomness = uint256(
            keccak256(abi.encodePacked(blockhash(block.number - 1), floorId))
        );

        return (pseudorandomness - ((pseudorandomness / 10000) * 10000));
    }

    /**
     * @notice Generate a pseudo-random floor size based on pseudo-random number.
     * Distribution of Sizes: 8 slots (11%), 16 slots (50%), 32 slots (13%), 64 slots (9%), 128 slots (7%), 256 slots (5%), 1 slots (5%), 3 slots (5%), 7 slots (5%), 33 slots (1%), 69 slots (1%), 420 slots (0.5%)
     */
    function generateSize(uint256 floorId) private view returns(uint16) {
        uint256 x = randNumber(floorId);
        if (x < 50)     return 420;
        if (x < 100)    return 69;
        if (x < 200)    return 33;
        if (x < 300)    return 7;
        if (x < 400)    return 3;
        if (x < 500)    return 1;
        if (x < 1000)   return 256;
        if (x < 1700)   return 128;
        if (x < 2600)   return 64;
        if (x < 3900)   return 32;
        if (x < 8900)   return 16;
        if (x < 10000)  return 8;

        return 0;
    }

    /**
     * @notice The IPFS URI of contract-level metadata.
     */
    function contractURI() public view returns (string memory) {
        return string(abi.encodePacked('ipfs://', _contractURIHash));
    }

    /**
     * @notice Set the _contractURIHash.
     * @dev Only callable by the owner.
     */
    function setContractURIHash(string memory newContractURIHash) external onlyOwner {
        _contractURIHash = newContractURIHash;
    }

    /**
     * @notice Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
     */
    function isApprovedForAll(address owner, address operator) public view override(IERC721, ERC721) returns (bool) {
        // Whitelist OpenSea proxy contract for easy trading.
        if (proxyRegistry.proxies(owner) == operator) {
            return true;
        }
        return super.isApprovedForAll(owner, operator);
    }

    /**
     * @notice Mint a Floor to the minter.
     * Minted every 10 Floors, starting at 0,
     * until 110 Floors have been minted (3 years w/ 24 hour auctions).
     * @dev Call _mintTo with the to address(es).
     */
    function mint() public override onlyMinter returns (uint256) {
        if (_currentFloorId <= 1092 && _currentFloorId % 10 == 0) {
            _mintTo(floorsDAO, _currentFloorId++);
        }
        return _mintTo(minter, _currentFloorId++);
    }

    /**
     * @notice Burn a floor.
     */
    function burn(uint256 floorId) override public onlyMinter {
        _burn(floorId);
        emit FloorBurned(floorId);
    }

    /**
     * @notice A distinct Uniform Resource Identifier (URI) for a given asset.
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        require(_exists(tokenId), 'FLOOR: URI query for nonexistent token');
        return descriptor.tokenURI(tokenId, sizes[tokenId]);
    }

    /**
     * @notice Similar to `tokenURI`, but always serves a base64 encoded data URI
     * with the JSON contents directly inlined.
     */
    function dataURI(uint256 tokenId) public view override returns (string memory) {
        require(_exists(tokenId), 'FLOOR: URI query for nonexistent token');
        return descriptor.dataURI(tokenId, sizes[tokenId]);
    }

    /**
     * @notice Set the token URI descriptor.
     * @dev Only callable by the owner when not locked.
     */
    function setDescriptor(IFloorDescriptor _descriptor) external override onlyOwner whenDescriptorNotLocked {
        descriptor = _descriptor;

        emit DescriptorUpdated(_descriptor);
    }

    /**
     * @notice Lock the descriptor.
     * @dev This cannot be reversed and is only callable by the owner when not locked.
     */
    function lockDescriptor() external override onlyOwner whenDescriptorNotLocked {
        isDescriptorLocked = true;

        emit DescriptorLocked();
    }

    /**
     * @notice Set the DAO.
     * @dev Only callable by the DAO when not locked.
     */
    function setFloorsDAO(address _floorsDAO) override external onlyFloorsDAO {
        floorsDAO = _floorsDAO;

        emit FloorsDAOUpdated(_floorsDAO);
    }

    /**
     * @notice Set the token minter.
     * @dev Only callable by the owner when not locked.
     */
    function setMinter(address _minter) override external onlyOwner whenMinterNotLocked {
        minter = _minter;

        emit MinterUpdated(_minter);
    }

    /**
     * @notice Lock the minter.
     * @dev This cannot be reversed and is only callable by the owner when not locked.
     */
    function lockMinter() override external onlyOwner whenMinterNotLocked {
        isMinterLocked = true;

        emit MinterLocked();
    }

    /**
     * @notice Mint a Floor with `floorId` to the provided `to` address.
     */
    function _mintTo(address to, uint256 floorId) internal returns (uint256) {
        sizes[floorId] = generateSize(floorId);
        _mint(owner(), to, floorId);
        sendMessageToChild(abi.encode(floorId, sizes[floorId], tokenURI(floorId)));
        emit FloorCreated(floorId, sizes[floorId]);

        return floorId;
    }

    // L1 <> L2
    function mint(address user, uint256 tokenId) external onlyPredicate {
        _mint(address(0), user, tokenId);
    }

    function exists(uint256 tokenId) external view returns (bool) {
        return _exists(tokenId);
    }

    // Fx-Portal
    function _processMessageFromChild(bytes memory data) internal override {
        // NOTHING TO DO HERE
    }

    function sendMessageToChild(bytes memory message) private {
        _sendMessageToChild(message);
    }

    function updateMetadata(uint256 floorId) external onlyOwner {
        sendMessageToChild(abi.encode(floorId, sizes[floorId], tokenURI(floorId)));
    }
}

File 2 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../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.
 *
 * By default, the owner account will be the one that deploys the contract. 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;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public 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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _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);
    }
}

File 3 of 17 : ERC721Checkpointable.sol
// SPDX-License-Identifier: BSD-3-Clause

/// @title Vote checkpointing for an ERC-721 token

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*                                                            *
*    8888888888 888      .d88888b.   .d88888b.  8888888b.    *
*    888        888     d88P" "Y88b d88P" "Y88b 888   Y88b   *
*    888        888     888     888 888     888 888    888   *
*    8888888    888     888     888 888     888 888   d88P   *
*    888        888     888     888 888     888 8888888P"    *
*    888        888     888     888 888     888 888 T88b     *
*    888        888     Y88b. .d88P Y88b. .d88P 888  T88b    *
*    888        88888888 "Y88888P"   "Y88888P"  888   T88b   *
*                                                            *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

// LICENSE
// ERC721Checkpointable.sol uses and modifies part of Compound Lab's Comp.sol:
// https://github.com/compound-finance/compound-protocol/blob/ae4388e780a8d596d97619d9704a931a2752c2bc/contracts/Governance/Comp.sol
//
// Comp.sol source code Copyright 2020 Compound Labs, Inc. licensed under the BSD-3-Clause license.
// With modifications by MOCA.
//
// Additional conditions of BSD-3-Clause can be found here: https://opensource.org/licenses/BSD-3-Clause
//
// MODIFICATIONS
// Checkpointing logic from Comp.sol has been used with the following modifications:
// - `delegates` is renamed to `_delegates` and is set to private
// - `delegates` is a public function that uses the `_delegates` mapping look-up, but unlike
//   Comp.sol, returns the delegator's own address if there is no delegate.
//   This avoids the delegator needing to "delegate to self" with an additional transaction
// - `_transferTokens()` is renamed `_beforeTokenTransfer()` and adapted to hook into OpenZeppelin's ERC721 hooks.

pragma solidity ^0.8.6;

import './ERC721Enumerable.sol';

abstract contract ERC721Checkpointable is ERC721Enumerable {
    /// @notice Defines decimals as per ERC-20 convention to make integrations with 3rd party governance platforms easier
    uint8 public constant decimals = 0;

    /// @notice A record of each accounts delegate
    mapping(address => address) private _delegates;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint96 votes;
    }

    /// @notice A record of votes checkpoints for each account, by index
    mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping(address => uint32) public numCheckpoints;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH =
        keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
    bytes32 public constant DELEGATION_TYPEHASH =
        keccak256('Delegation(address delegatee,uint256 nonce,uint256 expiry)');

    /// @notice A record of states for signing / validating signatures
    mapping(address => uint256) public nonces;

    /// @notice An event thats emitted when an account changes its delegate
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);

    /**
     * @notice The votes a delegator can delegate, which is the current balance of the delegator.
     * @dev Used when calling `_delegate()`
     */
    function votesToDelegate(address delegator) public view returns (uint96) {
        return safe96(balanceOf(delegator), 'ERC721Checkpointable::votesToDelegate: amount exceeds 96 bits');
    }

    /**
     * @notice Overrides the standard `Comp.sol` delegates mapping to return
     * the delegator's own address if they haven't delegated.
     * This avoids having to delegate to oneself.
     */
    function delegates(address delegator) public view returns (address) {
        address current = _delegates[delegator];
        return current == address(0) ? delegator : current;
    }

    /**
     * @notice Adapted from `_transferTokens()` in `Comp.sol` to update delegate votes.
     * @dev hooks into OpenZeppelin's `ERC721._transfer`
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal override {
        super._beforeTokenTransfer(from, to, tokenId);

        /// @notice Differs from `_transferTokens()` to use `delegates` override method to simulate auto-delegation
        _moveDelegates(delegates(from), delegates(to), 1);
    }

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegatee The address to delegate votes to
     */
    function delegate(address delegatee) public {
        if (delegatee == address(0)) delegatee = msg.sender;
        return _delegate(msg.sender, delegatee);
    }

    /**
     * @notice Delegates votes from signatory to `delegatee`
     * @param delegatee The address to delegate votes to
     * @param nonce The contract state required to match the signature
     * @param expiry The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function delegateBySig(
        address delegatee,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public {
        bytes32 domainSeparator = keccak256(
            abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this))
        );
        bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));
        bytes32 digest = keccak256(abi.encodePacked('\x19\x01', domainSeparator, structHash));
        address signatory = ecrecover(digest, v, r, s);
        require(signatory != address(0), 'ERC721Checkpointable::delegateBySig: invalid signature');
        require(nonce == nonces[signatory]++, 'ERC721Checkpointable::delegateBySig: invalid nonce');
        require(block.timestamp <= expiry, 'ERC721Checkpointable::delegateBySig: signature expired');
        return _delegate(signatory, delegatee);
    }

    /**
     * @notice Gets the current votes balance for `account`
     * @param account The address to get votes balance
     * @return The number of current votes for `account`
     */
    function getCurrentVotes(address account) external view returns (uint96) {
        uint32 nCheckpoints = numCheckpoints[account];
        return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
    }

    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint256 blockNumber) public view returns (uint96) {
        require(blockNumber < block.number, 'ERC721Checkpointable::getPriorVotes: not yet determined');

        uint32 nCheckpoints = numCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[account][lower].votes;
    }

    function _delegate(address delegator, address delegatee) internal {
        /// @notice differs from `_delegate()` in `Comp.sol` to use `delegates` override method to simulate auto-delegation
        address currentDelegate = delegates(delegator);

        _delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        uint96 amount = votesToDelegate(delegator);

        _moveDelegates(currentDelegate, delegatee, amount);
    }

    function _moveDelegates(
        address srcRep,
        address dstRep,
        uint96 amount
    ) internal {
        if (srcRep != dstRep && amount > 0) {
            if (srcRep != address(0)) {
                uint32 srcRepNum = numCheckpoints[srcRep];
                uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;
                uint96 srcRepNew = sub96(srcRepOld, amount, 'ERC721Checkpointable::_moveDelegates: amount underflows');
                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }

            if (dstRep != address(0)) {
                uint32 dstRepNum = numCheckpoints[dstRep];
                uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;
                uint96 dstRepNew = add96(dstRepOld, amount, 'ERC721Checkpointable::_moveDelegates: amount overflows');
                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
        }
    }

    function _writeCheckpoint(
        address delegatee,
        uint32 nCheckpoints,
        uint96 oldVotes,
        uint96 newVotes
    ) internal {
        uint32 blockNumber = safe32(
            block.number,
            'ERC721Checkpointable::_writeCheckpoint: block number exceeds 32 bits'
        );

        if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
            checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
        } else {
            checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
            numCheckpoints[delegatee] = nCheckpoints + 1;
        }

        emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

    function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }

    function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {
        require(n < 2**96, errorMessage);
        return uint96(n);
    }

    function add96(
        uint96 a,
        uint96 b,
        string memory errorMessage
    ) internal pure returns (uint96) {
        uint96 c = a + b;
        require(c >= a, errorMessage);
        return c;
    }

    function sub96(
        uint96 a,
        uint96 b,
        string memory errorMessage
    ) internal pure returns (uint96) {
        require(b <= a, errorMessage);
        return a - b;
    }

    function getChainId() internal view returns (uint256) {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }
        return chainId;
    }
}

File 4 of 17 : IFloorDescriptor.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for FloorDescriptor

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*                                                            *
*    8888888888 888      .d88888b.   .d88888b.  8888888b.    *
*    888        888     d88P" "Y88b d88P" "Y88b 888   Y88b   *
*    888        888     888     888 888     888 888    888   *
*    8888888    888     888     888 888     888 888   d88P   *
*    888        888     888     888 888     888 8888888P"    *
*    888        888     888     888 888     888 888 T88b     *
*    888        888     Y88b. .d88P Y88b. .d88P 888  T88b    *
*    888        88888888 "Y88888P"   "Y88888P"  888   T88b   *
*                                                            *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

pragma solidity ^0.8.6;

interface IFloorDescriptor {
    event BaseURIUpdated(string baseURI);

    event ImageURIUpdated(string imageURI);

    event ExtUpdated(string ext);

    event DataURIToggled(bool enabled);

    function isDataURIEnabled() external returns (bool);

    function baseURI() external returns (string memory);

    function imageURI() external returns (string memory);

    function ext() external returns (string memory);

    function toggleDataURIEnabled() external;

    function setBaseURI(string calldata baseURI) external;

    function setImageURI(string calldata imageURI) external;

    function setExt(string calldata ext) external;

    function tokenURI(uint256 tokenId, uint16 size) external view returns (string memory);

    function dataURI(uint256 tokenId, uint16 size) external view returns (string memory);
}

File 5 of 17 : IFloorToken.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for FloorToken

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*                                                            *
*    8888888888 888      .d88888b.   .d88888b.  8888888b.    *
*    888        888     d88P" "Y88b d88P" "Y88b 888   Y88b   *
*    888        888     888     888 888     888 888    888   *
*    8888888    888     888     888 888     888 888   d88P   *
*    888        888     888     888 888     888 8888888P"    *
*    888        888     888     888 888     888 888 T88b     *
*    888        888     Y88b. .d88P Y88b. .d88P 888  T88b    *
*    888        88888888 "Y88888P"   "Y88888P"  888   T88b   *
*                                                            *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

pragma solidity ^0.8.6;

import { IERC721 } from '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import { IFloorDescriptor } from './IFloorDescriptor.sol';

interface IFloorToken is IERC721 {
    event DataURIToggled(bool enabled);

    event FloorCreated(uint256 indexed tokenId, uint16 size);

    event FloorBurned(uint256 indexed tokenId);

    event FloorsDAOUpdated(address floorsDAO);

    event MinterUpdated(address minter);

    event MinterLocked();

    event DescriptorUpdated(IFloorDescriptor descriptor);

    event DescriptorLocked();

    function mint() external returns (uint256);

    function burn(uint256 tokenId) external;

    function dataURI(uint256 tokenId) external returns (string memory);

    function setFloorsDAO(address floorsDAO) external;

    function setMinter(address minter) external;

    function setDescriptor(IFloorDescriptor descriptor) external;

    function lockDescriptor() external;

    function lockMinter() external;
}

File 6 of 17 : ERC721.sol
// SPDX-License-Identifier: MIT

/// @title ERC721 Token Implementation

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*                                                            *
*    8888888888 888      .d88888b.   .d88888b.  8888888b.    *
*    888        888     d88P" "Y88b d88P" "Y88b 888   Y88b   *
*    888        888     888     888 888     888 888    888   *
*    8888888    888     888     888 888     888 888   d88P   *
*    888        888     888     888 888     888 8888888P"    *
*    888        888     888     888 888     888 888 T88b     *
*    888        888     Y88b. .d88P Y88b. .d88P 888  T88b    *
*    888        88888888 "Y88888P"   "Y88888P"  888   T88b   *
*                                                            *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

// LICENSE
// ERC721.sol modifies OpenZeppelin's ERC721.sol:
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/6618f9f18424ade44116d0221719f4c93be6a078/contracts/token/ERC721/ERC721.sol
//
// ERC721.sol source code copyright OpenZeppelin licensed under the MIT License.
// With modifications by MOCA.
//
//
// MODIFICATIONS:
// `_safeMint` and `_mint` contain an additional `creator` argument and
// emit two `Transfer` logs, rather than one. The first log displays the
// transfer (mint) from `address(0)` to the `creator`. The second displays the
// transfer from the `creator` to the `to` address. This enables correct
// attribution on various NFT marketplaces.

pragma solidity ^0.8.6;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), 'ERC721: balance query for the zero address');
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), 'ERC721: owner query for nonexistent token');
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), 'ERC721Metadata: URI query for nonexistent token');

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : '';
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, 'ERC721: approval to current owner');

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            'ERC721: approve caller is not owner nor approved for all'
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), 'ERC721: approved query for nonexistent token');

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), 'ERC721: approve to caller');

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), 'ERC721: transfer caller is not owner nor approved');

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), 'ERC721: transfer caller is not owner nor approved');
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), 'ERC721: transfer to non ERC721Receiver implementer');
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), 'ERC721: operator query for nonexistent token');
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId`, transfers it to `to`, and emits two log events -
     * 1. Credits the `minter` with the mint.
     * 2. Shows transfer from the `minter` to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address creator,
        address to,
        uint256 tokenId
    ) internal virtual {
        _safeMint(creator, to, tokenId, '');
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address creator,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(creator, to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            'ERC721: transfer to non ERC721Receiver implementer'
        );
    }

    /**
     * @dev Mints `tokenId`, transfers it to `to`, and emits two log events -
     * 1. Credits the `creator` with the mint.
     * 2. Shows transfer from the `creator` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(
        address creator,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(to != address(0), 'ERC721: mint to the zero address');
        require(!_exists(tokenId), 'ERC721: token already minted');

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), creator, tokenId);
        emit Transfer(creator, to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, 'ERC721: transfer of token that is not own');
        require(to != address(0), 'ERC721: transfer to the zero address');

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert('ERC721: transfer to non ERC721Receiver implementer');
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 7 of 17 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 8 of 17 : IProxyRegistry.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

interface IProxyRegistry {
    function proxies(address) external view returns (address);
}

File 9 of 17 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @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;
    }
}

File 10 of 17 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

/// @title ERC721 Enumerable Extension

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*                                                            *
*    8888888888 888      .d88888b.   .d88888b.  8888888b.    *
*    888        888     d88P" "Y88b d88P" "Y88b 888   Y88b   *
*    888        888     888     888 888     888 888    888   *
*    8888888    888     888     888 888     888 888   d88P   *
*    888        888     888     888 888     888 8888888P"    *
*    888        888     888     888 888     888 888 T88b     *
*    888        888     Y88b. .d88P Y88b. .d88P 888  T88b    *
*    888        88888888 "Y88888P"   "Y88888P"  888   T88b   *
*                                                            *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

// LICENSE
// ERC721.sol modifies OpenZeppelin's ERC721Enumerable.sol:
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/6618f9f18424ade44116d0221719f4c93be6a078/contracts/token/ERC721/extensions/ERC721Enumerable.sol
//
// ERC721Enumerable.sol source code copyright OpenZeppelin licensed under the MIT License.
// With modifications by MOCA.
//
// MODIFICATIONS:
// Consumes modified `ERC721` contract. See notes in `ERC721.sol`.

pragma solidity ^0.8.0;

import './ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol';

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
        return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), 'ERC721Enumerable: owner index out of bounds');
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), 'ERC721Enumerable: global index out of bounds');
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 11 of 17 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 12 of 17 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 13 of 17 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 14 of 17 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 15 of 17 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        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_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 16 of 17 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 17 of 17 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @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);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 20000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_floorsDAO","type":"address"},{"internalType":"address","name":"_minter","type":"address"},{"internalType":"address","name":"_predicate","type":"address"},{"internalType":"contract IFloorDescriptor","name":"_descriptor","type":"address"},{"internalType":"contract IProxyRegistry","name":"_proxyRegistry","type":"address"},{"internalType":"address","name":"_checkpointManager","type":"address"},{"internalType":"address","name":"_fxRoot","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"DataURIToggled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"DescriptorLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IFloorDescriptor","name":"descriptor","type":"address"}],"name":"DescriptorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"FloorBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"size","type":"uint16"}],"name":"FloorCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"floorsDAO","type":"address"}],"name":"FloorsDAOUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"MinterLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"}],"name":"MinterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SEND_MESSAGE_EVENT_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"floorId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkpointManager","outputs":[{"internalType":"contract ICheckpointManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint96","name":"votes","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"dataURI","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":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegator","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"descriptor","outputs":[{"internalType":"contract IFloorDescriptor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"floorsDAO","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fxChildTunnel","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fxRoot","outputs":[{"internalType":"contract IFxStateSender","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCurrentVotes","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isDescriptorLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMinterLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockDescriptor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"predicate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"processedExits","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxyRegistry","outputs":[{"internalType":"contract IProxyRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"inputData","type":"bytes"}],"name":"receiveMessage","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":"tokenId","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":"tokenId","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":"string","name":"newContractURIHash","type":"string"}],"name":"setContractURIHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IFloorDescriptor","name":"_descriptor","type":"address"}],"name":"setDescriptor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_floorsDAO","type":"address"}],"name":"setFloorsDAO","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fxChildTunnel","type":"address"}],"name":"setFxChildTunnel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"sizes","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","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":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"floorId","type":"uint256"}],"name":"updateMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegator","type":"address"}],"name":"votesToDelegate","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"withdrawnTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

610100604052602e60a0818152906200613d60c03980516200002a91601891602090910190620001bd565b503480156200003857600080fd5b506040516200616b3803806200616b8339810160408190526200005b9162000263565b818160405180604001604052806005815260200164232627a7a960d91b81525060405180604001604052806005815260200164232627a7a960d91b815250620000b3620000ad6200016960201b60201c565b6200016d565b8151620000c8906001906020850190620001bd565b508051620000de906002906020840190620001bd565b5050601080546001600160a01b03199081166001600160a01b0395861617909155600f8054821693851693909317909255506016805482169683169690961790955560158054861696821696909617909555505060138054831695841695909517909455601480549091169290911691909117905560601b6001600160601b03191660805262000364565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620001cb906200030e565b90600052602060002090601f016020900481019282620001ef57600085556200023a565b82601f106200020a57805160ff19168380011785556200023a565b828001600101855582156200023a579182015b828111156200023a5782518255916020019190600101906200021d565b50620002489291506200024c565b5090565b5b808211156200024857600081556001016200024d565b600080600080600080600060e0888a0312156200027f57600080fd5b87516200028c816200034b565b60208901519097506200029f816200034b565b6040890151909650620002b2816200034b565b6060890151909550620002c5816200034b565b6080890151909450620002d8816200034b565b60a0890151909350620002eb816200034b565b60c0890151909250620002fe816200034b565b8091505092959891949750929550565b600181811c908216806200032357607f821691505b602082108114156200034557634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b03811681146200036157600080fd5b50565b60805160601c615db36200038a6000396000818161077a015261231e0152615db36000f3fe608060405234801561001057600080fd5b50600436106103a45760003560e01c8063715018a6116101e9578063c0857ba01161010f578063e7a324dc116100ad578063f1127ed81161007c578063f1127ed8146108d3578063f2fde38b14610945578063f953cec714610958578063fca3b5aa1461096b57600080fd5b8063e7a324dc1461087e578063e8a3d485146108a5578063e9580e91146108ad578063e985e9c5146108c057600080fd5b8063c87b56dd116100e9578063c87b56dd1461080e578063d9a9b0c614610821578063de9b771f14610858578063e61987051461086b57600080fd5b8063c0857ba0146107c2578063c1b8e4e1146107d5578063c3cda520146107fb57600080fd5b80639c09628d11610187578063b4b5ea5711610156578063b4b5ea5714610762578063b50cbd9f14610775578063b88d4fde1461079c578063baedc1c4146107af57600080fd5b80639c09628d14610716578063a22cb46514610729578063a65c970c1461073c578063aea4e49e1461074f57600080fd5b80637ecebe00116101c35780637ecebe00146106ca5780638da5cb5b146106ea57806395d89b41146106fb578063972c49281461070357600080fd5b8063715018a61461068a57806376daebe114610692578063782d6fe11461069a57600080fd5b8063303e74df116102ce5780634f6ccce71161026c578063607f2d421161023b578063607f2d42146106065780636352211e146106295780636fcfff451461063c57806370a082311461067757600080fd5b80634f6ccce7146105ba578063587cde1e146105cd5780635ac1e3bb146105e05780635c19a95c146105f357600080fd5b806341b5d0de116102a857806341b5d0de1461057957806342842e0e1461058157806342966c68146105945780634f558e79146105a757600080fd5b8063303e74df14610539578063313ce5671461054c57806340c10f191461056657600080fd5b8063095ea7b3116103465780631e688e10116103155780631e688e10146104c757806320606b70146104ec57806323b872dd146105135780632f745c591461052657600080fd5b8063095ea7b31461046f5780630e387de6146104825780631249c58b146104b757806318160ddd146104bf57600080fd5b806306fdde031161038257806306fdde03146103f9578063075461721461040e57806307a974fc14610439578063081812fc1461045c57600080fd5b806301b9a397146103a957806301ffc9a7146103be578063034934d6146103e6575b600080fd5b6103bc6103b73660046151a6565b61097e565b005b6103d16103cc366004615424565b610ab6565b60405190151581526020015b60405180910390f35b6103bc6103f43660046151a6565b610b12565b610401610bd2565b6040516103dd91906156fc565b601454610421906001600160a01b031681565b6040516001600160a01b0390911681526020016103dd565b6103d16104473660046153be565b601a6020526000908152604090205460ff1681565b61042161046a3660046153be565b610c64565b6103bc61047d3660046152f9565b610d0a565b6104a97f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03681565b6040519081526020016103dd565b6104a9610e3c565b6009546104a9565b6016546103d19074010000000000000000000000000000000000000000900460ff1681565b6104a97f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6103bc610521366004615219565b610f0e565b6104a96105343660046152f9565b610f95565b601654610421906001600160a01b031681565b610554600081565b60405160ff90911681526020016103dd565b6103bc6105743660046152f9565b61103d565b6103bc6110a7565b6103bc61058f366004615219565b6111d8565b6103bc6105a23660046153be565b6111f3565b6103d16105b53660046153be565b611284565b6104a96105c83660046153be565b6112a3565b6104216105db3660046151a6565b611347565b6104016105ee3660046153be565b611379565b6103bc6106013660046151a6565b6114d9565b6103d16106143660046153be565b60126020526000908152604090205460ff1681565b6104216106373660046153be565b6114f7565b61066261064a3660046151a6565b600d6020526000908152604090205463ffffffff1681565b60405163ffffffff90911681526020016103dd565b6104a96106853660046151a6565b611582565b6103bc61161c565b6103bc611682565b6106ad6106a83660046152f9565b6117b1565b6040516bffffffffffffffffffffffff90911681526020016103dd565b6104a96106d83660046151a6565b600e6020526000908152604090205481565b6000546001600160a01b0316610421565b610401611a60565b601154610421906001600160a01b031681565b6103bc6107243660046153be565b611a6f565b6103bc6107373660046152c6565b611b11565b601354610421906001600160a01b031681565b6103bc61075d3660046151a6565b611bf4565b6106ad6107703660046151a6565b611cad565b6104217f000000000000000000000000000000000000000000000000000000000000000081565b6103bc6107aa36600461525a565b611d30565b6103bc6107bd3660046154dc565b611dbe565b601054610421906001600160a01b031681565b6016546103d1907501000000000000000000000000000000000000000000900460ff1681565b6103bc610809366004615325565b611e2b565b61040161081c3660046153be565b612199565b61084561082f3660046153be565b60196020526000908152604090205461ffff1681565b60405161ffff90911681526020016103dd565b600f54610421906001600160a01b031681565b601554610421906001600160a01b031681565b6104a97fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b61040161228b565b6106ad6108bb3660046151a6565b6122b3565b6103d16108ce3660046151e0565b6122df565b61091c6108e1366004615387565b600c60209081526000928352604080842090915290825290205463ffffffff81169064010000000090046bffffffffffffffffffffffff1682565b6040805163ffffffff90931683526bffffffffffffffffffffffff9091166020830152016103dd565b6103bc6109533660046151a6565b6123dd565b6103bc61096636600461545e565b6124bc565b6103bc6109793660046151a6565b6124c7565b6000546001600160a01b031633146109dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6016547501000000000000000000000000000000000000000000900460ff1615610a495760405162461bcd60e51b815260206004820152601460248201527f44657363726970746f72206973206c6f636b656400000000000000000000000060448201526064016109d4565b601680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f6e66ab22238a5471005895947c8f57db923c2a9c9c73180eff80864c21295c1b906020015b60405180910390a150565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610b0c5750610b0c826125f2565b92915050565b6013546001600160a01b03163314610b6c5760405162461bcd60e51b815260206004820152601560248201527f53656e646572206973206e6f74207468652044414f000000000000000000000060448201526064016109d4565b601380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fa976d6cce8c0e1e275a5d0c9b06ec02a2c7d38fc14c15247fd20244a8992f39f90602001610aab565b606060018054610be190615aa4565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0d90615aa4565b8015610c5a5780601f10610c2f57610100808354040283529160200191610c5a565b820191906000526020600020905b815481529060010190602001808311610c3d57829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b0316610cee5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109d4565b506000908152600560205260409020546001600160a01b031690565b6000610d15826114f7565b9050806001600160a01b0316836001600160a01b03161415610d9f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016109d4565b336001600160a01b0382161480610dbb5750610dbb81336122df565b610e2d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109d4565b610e3783836126d5565b505050565b6014546000906001600160a01b03163314610e995760405162461bcd60e51b815260206004820152601860248201527f53656e646572206973206e6f7420746865206d696e746572000000000000000060448201526064016109d4565b61044460175411158015610eb95750600a601754610eb79190615b2b565b155b15610ee95760135460178054610ee7926001600160a01b0316916000610ede83615af2565b9190505561275b565b505b60145460178054610f09926001600160a01b0316916000610ede83615af2565b905090565b610f18338261282d565b610f8a5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016109d4565b610e37838383612915565b6000610fa083611582565b82106110145760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e647300000000000000000000000000000000000000000060648201526084016109d4565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6015546001600160a01b031633146110975760405162461bcd60e51b815260206004820152601b60248201527f53656e646572206973206e6f742074686520707265646963617465000000000060448201526064016109d4565b6110a360008383612b05565b5050565b6000546001600160a01b031633146111015760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d4565b6016547501000000000000000000000000000000000000000000900460ff161561116d5760405162461bcd60e51b815260206004820152601460248201527f44657363726970746f72206973206c6f636b656400000000000000000000000060448201526064016109d4565b601680547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790556040517f593e31e306c198bef259d839f7c6dc4ff7fc10c07f76fab193a210b03704105f90600090a1565b610e3783838360405180602001604052806000815250611d30565b6014546001600160a01b0316331461124d5760405162461bcd60e51b815260206004820152601860248201527f53656e646572206973206e6f7420746865206d696e746572000000000000000060448201526064016109d4565b61125681612cb3565b60405181907f505c5847cc2bc8644df94b9b7029cf870d4f43e5b8ba5b67144268facff041a890600090a250565b6000818152600360205260408120546001600160a01b03161515610b0c565b60006112ae60095490565b82106113225760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e6473000000000000000000000000000000000000000060648201526084016109d4565b6009828154811061133557611335615bee565b90600052602060002001549050919050565b6001600160a01b038082166000908152600b602052604081205490911680156113705780611372565b825b9392505050565b6000818152600360205260409020546060906001600160a01b03166114065760405162461bcd60e51b815260206004820152602660248201527f464c4f4f523a2055524920717565727920666f72206e6f6e6578697374656e7460448201527f20746f6b656e000000000000000000000000000000000000000000000000000060648201526084016109d4565b601654600083815260196020526040908190205490517fe68a6bc10000000000000000000000000000000000000000000000000000000081526004810185905261ffff90911660248201526001600160a01b039091169063e68a6bc1906044015b60006040518083038186803b15801561147f57600080fd5b505afa158015611493573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610b0c9190810190615493565b6001600160a01b0381166114ea5750335b6114f43382612d72565b50565b6000818152600360205260408120546001600160a01b031680610b0c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016109d4565b60006001600160a01b0382166116005760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f20616464726573730000000000000000000000000000000000000000000060648201526084016109d4565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b031633146116765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d4565b6116806000612e0a565b565b6000546001600160a01b031633146116dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d4565b60165474010000000000000000000000000000000000000000900460ff16156117475760405162461bcd60e51b815260206004820152601060248201527f4d696e746572206973206c6f636b65640000000000000000000000000000000060448201526064016109d4565b601680547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790556040517f192417b3f16b1ce69e0c59b0376549666650245ffc05e4b2569089dda8589b6690600090a1565b60004382106118285760405162461bcd60e51b815260206004820152603760248201527f455243373231436865636b706f696e7461626c653a3a6765745072696f72566f60448201527f7465733a206e6f74207965742064657465726d696e656400000000000000000060648201526084016109d4565b6001600160a01b0383166000908152600d602052604090205463ffffffff1680611856576000915050610b0c565b6001600160a01b0384166000908152600c60205260408120849161187b600185615a0b565b63ffffffff908116825260208201929092526040016000205416116118f4576001600160a01b0384166000908152600c60205260408120906118be600184615a0b565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff169150610b0c9050565b6001600160a01b0384166000908152600c6020908152604080832083805290915290205463ffffffff1683101561192f576000915050610b0c565b60008061193d600184615a0b565b90505b8163ffffffff168163ffffffff161115611a1557600060026119628484615a0b565b61196c919061584b565b6119769083615a0b565b6001600160a01b0388166000908152600c6020908152604080832063ffffffff8581168552908352928190208151808301909252549283168082526401000000009093046bffffffffffffffffffffffff16918101919091529192508714156119e957602001519450610b0c9350505050565b805163ffffffff16871115611a0057819350611a0e565b611a0b600183615a0b565b92505b5050611940565b506001600160a01b0385166000908152600c6020908152604080832063ffffffff909416835292905220546bffffffffffffffffffffffff6401000000009091041691505092915050565b606060028054610be190615aa4565b6000546001600160a01b03163314611ac95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d4565b6000818152601960205260409020546114f490829061ffff16611aeb82612199565b604051602001611afd9392919061570f565b604051602081830303815290604052612e72565b6001600160a01b038216331415611b6a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109d4565b3360008181526006602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6011546001600160a01b031615611c735760405162461bcd60e51b815260206004820152602a60248201527f467842617365526f6f7454756e6e656c3a204348494c445f54554e4e454c5f4160448201527f4c52454144595f5345540000000000000000000000000000000000000000000060648201526084016109d4565b601180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6001600160a01b0381166000908152600d602052604081205463ffffffff1680611cd8576000611372565b6001600160a01b0383166000908152600c6020526040812090611cfc600184615a0b565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff169392505050565b611d3a338361282d565b611dac5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016109d4565b611db884848484612e7b565b50505050565b6000546001600160a01b03163314611e185760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d4565b80516110a390601890602084019061507f565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866611e56610bd2565b80519060200120611e644690565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a9052825180850390910181526101408401909252815191909301207f1901000000000000000000000000000000000000000000000000000000000000610160830152610162820183905261018282018190529192506000906101a201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa158015611fc9573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001519150506001600160a01b0381166120705760405162461bcd60e51b815260206004820152603660248201527f455243373231436865636b706f696e7461626c653a3a64656c6567617465427960448201527f5369673a20696e76616c6964207369676e61747572650000000000000000000060648201526084016109d4565b6001600160a01b0381166000908152600e6020526040812080549161209483615af2565b91905055891461210c5760405162461bcd60e51b815260206004820152603260248201527f455243373231436865636b706f696e7461626c653a3a64656c6567617465427960448201527f5369673a20696e76616c6964206e6f6e6365000000000000000000000000000060648201526084016109d4565b874211156121825760405162461bcd60e51b815260206004820152603660248201527f455243373231436865636b706f696e7461626c653a3a64656c6567617465427960448201527f5369673a207369676e617475726520657870697265640000000000000000000060648201526084016109d4565b61218c818b612d72565b505050505b505050505050565b6000818152600360205260409020546060906001600160a01b03166122265760405162461bcd60e51b815260206004820152602660248201527f464c4f4f523a2055524920717565727920666f72206e6f6e6578697374656e7460448201527f20746f6b656e000000000000000000000000000000000000000000000000000060648201526084016109d4565b601654600083815260196020526040908190205490517fd606f2140000000000000000000000000000000000000000000000000000000081526004810185905261ffff90911660248201526001600160a01b039091169063d606f21490604401611467565b6060601860405160200161229f919061556f565b604051602081830303815290604052905090565b6000610b0c6122c183611582565b6040518060600160405280603d8152602001615d0a603d9139612f04565b6040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152600091818416917f0000000000000000000000000000000000000000000000000000000000000000169063c45527919060240160206040518083038186803b15801561236057600080fd5b505afa158015612374573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061239891906151c3565b6001600160a01b031614156123af57506001610b0c565b6001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff16611372565b6000546001600160a01b031633146124375760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d4565b6001600160a01b0381166124b35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109d4565b6114f481612e0a565b6000610e3782612f3c565b6000546001600160a01b031633146125215760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d4565b60165474010000000000000000000000000000000000000000900460ff161561258c5760405162461bcd60e51b815260206004820152601060248201527f4d696e746572206973206c6f636b65640000000000000000000000000000000060448201526064016109d4565b601480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fad0f299ec81a386c98df0ac27dae11dd020ed1b56963c53a7292e7a3a314539a90602001610aab565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061268557507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610b0c57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610b0c565b600081815260056020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091558190612722826114f7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000612766826132a9565b600083815260196020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff9390931692909217909155546127bb906001600160a01b03168484612b05565b6000828152601960205260409020546127dd90839061ffff16611aeb82612199565b60008281526019602090815260409182902054915161ffff909216825283917fba423747cad5fa57830fd779a833292c34fa989a678478b19df0fe540c821130910160405180910390a250919050565b6000818152600360205260408120546001600160a01b03166128b75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109d4565b60006128c2836114f7565b9050806001600160a01b0316846001600160a01b031614806128fd5750836001600160a01b03166128f284610c64565b6001600160a01b0316145b8061290d575061290d81856122df565b949350505050565b826001600160a01b0316612928826114f7565b6001600160a01b0316146129a45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e000000000000000000000000000000000000000000000060648201526084016109d4565b6001600160a01b038216612a1f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016109d4565b612a2a8383836133a3565b612a356000826126d5565b6001600160a01b0383166000908152600460205260408120805460019290612a5e9084906159f4565b90915550506001600160a01b0382166000908152600460205260408120805460019290612a8c9084906157d0565b909155505060008181526003602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038216612b5b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109d4565b6000818152600360205260409020546001600160a01b031615612bc05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109d4565b612bcc600083836133a3565b6001600160a01b0382166000908152600460205260408120805460019290612bf59084906157d0565b909155505060008181526003602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03868116919091179091559051839291861691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000612cbe826114f7565b9050612ccc816000846133a3565b612cd76000836126d5565b6001600160a01b0381166000908152600460205260408120805460019290612d009084906159f4565b909155505060008281526003602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000612d7d83611347565b6001600160a01b038481166000818152600b602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016888616908117909155905194955093928516927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46000612dfd846122b3565b9050611db88284836133c6565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6114f481613583565b612e86848484612915565b612e9284848484613607565b611db85760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109d4565b6000816c010000000000000000000000008410612f345760405162461bcd60e51b81526004016109d491906156fc565b509192915050565b60606000612f49836137d2565b90506000612f5682613831565b90506000612f638361385a565b9050600081612f7184613883565b612f7a86613a71565b604051602001612f8c93929190615671565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152601290935291205490915060ff16156130475760405162461bcd60e51b8152602060048201526024808201527f4678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434560448201527f535345440000000000000000000000000000000000000000000000000000000060648201526084016109d4565b600081815260126020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561308785613a8d565b9050600061309482613bd7565b905061309f81613c67565b6011546001600160a01b039081169116146131225760405162461bcd60e51b815260206004820152602560248201527f4678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f5460448201527f554e4e454c00000000000000000000000000000000000000000000000000000060648201526084016109d4565b600061312d87613c90565b905061314d61313d846020015190565b876131478a613cac565b84613cc8565b6131bf5760405162461bcd60e51b815260206004820152602360248201527f4678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f505260448201527f4f4f46000000000000000000000000000000000000000000000000000000000060648201526084016109d4565b6131ed856131cc89613f7e565b6131d58a613f9a565b846131df8c613fb6565b6131e88d613fd2565b613fee565b5060006131f98361413c565b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03661322f61322a836000614178565b6141b0565b1461327c5760405162461bcd60e51b815260206004820152601f60248201527f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e41545552450060448201526064016109d4565b60006132878461422b565b80602001905181019061329a9190615493565b9b9a5050505050505050505050565b6000806132b583614247565b905060328110156132ca57506101a492915050565b60648110156132dc5750604592915050565b60c88110156132ee5750602192915050565b61012c8110156133015750600792915050565b6101908110156133145750600392915050565b6101f48110156133275750600192915050565b6103e881101561333b575061010092915050565b6106a481101561334e5750608092915050565b610a288110156133615750604092915050565b610f3c8110156133745750602092915050565b6122c48110156133875750601092915050565b61271081101561339a5750600892915050565b50600092915050565b6133ae8383836142c2565b610e376133ba84611347565b6133c384611347565b60015b816001600160a01b0316836001600160a01b0316141580156133f657506000816bffffffffffffffffffffffff16115b15610e37576001600160a01b038316156134c1576001600160a01b0383166000908152600d602052604081205463ffffffff169081613436576000613488565b6001600160a01b0385166000908152600c602052604081209061345a600185615a0b565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff165b905060006134af8285604051806060016040528060378152602001615d476037913961437a565b90506134bd868484846143c6565b5050505b6001600160a01b03821615610e37576001600160a01b0382166000908152600d602052604081205463ffffffff1690816134fc57600061354e565b6001600160a01b0384166000908152600c6020526040812090613520600185615a0b565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff165b905060006135758285604051806060016040528060368152602001615c9060369139614608565b9050612191858484846143c6565b600f546011546040517fb47204770000000000000000000000000000000000000000000000000000000081526001600160a01b039283169263b4720477926135d29291169085906004016156da565b600060405180830381600087803b1580156135ec57600080fd5b505af1158015613600573d6000803e3d6000fd5b5050505050565b60006001600160a01b0384163b156137c7576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a029061366490339089908890889060040161569e565b602060405180830381600087803b15801561367e57600080fd5b505af19250505080156136cc575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526136c991810190615441565b60015b61377c573d8080156136fa576040519150601f19603f3d011682016040523d82523d6000602084013e6136ff565b606091505b5080516137745760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109d4565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061290d565b506001949350505050565b604080516020810190915260608152600061381c6138178460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b614656565b60408051602081019091529081529392505050565b6060610b0c826000015160088151811061384d5761384d615bee565b602002602001015161476c565b6000610b0c826000015160028151811061387657613876615bee565b60200260200101516141b0565b60408051602081019091526000815281516060919015610b0c576000806138ab600086614809565b60f81c905060018114806138c257508060ff166003145b15613982576001855160026138d791906159b7565b6138e191906159f4565b67ffffffffffffffff8111156138f9576138f9615c1d565b6040519080825280601f01601f191660200182016040528015613923576020820181803683370190505b5092506000613933600187614809565b9050808460008151811061394957613949615bee565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060019250506139e6565b60028551600261399291906159b7565b61399c91906159f4565b67ffffffffffffffff8111156139b4576139b4615c1d565b6040519080825280601f01601f1916602001820160405280156139de576020820181803683370190505b509250600091505b60ff82165b8351811015613a6857613a15613a0460ff8516836159f4565b613a0f9060026157d0565b87614809565b848281518110613a2757613a27615bee565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080613a6081615af2565b9150506139eb565b50505092915050565b6000610b0c826000015160098151811061387657613876615bee565b613ab160405180606001604052806060815260200160608152602001600081525090565b613acb826000015160068151811061384d5761384d615bee565b602082810182905260408051808201825260008082529083015280518082019091528251815291810190820152613b018161488a565b15613b1657613b0f81614656565b8252613bc3565b60208201518051600090613b2c906001906159f4565b67ffffffffffffffff811115613b4457613b44615c1d565b6040519080825280601f01601f191660200182016040528015613b6e576020820181803683370190505b509050600080836021019150826020019050613b8c828285516148c3565b604080518082018252600080825260209182015281518083019092528451825280850190820152613bbc90614656565b8652505050505b613bcc83613a71565b604083015250919050565b604080516080810182526000918101828152606080830193909352815260208101919091526000613c258360000151600381518110613c1857613c18615bee565b6020026020010151614656565b836040015181518110613c3a57613c3a615bee565b602002602001015190506040518060400160405280828152602001613c5e83614656565b90529392505050565b6000610b0c8260200151600081518110613c8357613c83615bee565b602002602001015161493e565b6000610b0c826000015160058151811061387657613876615bee565b6060610b0c826000015160078151811061384d5761384d615bee565b600080613cfc8460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b90506000613d0982614656565b905060608085600080613d1b8b613883565b9050805160001415613d3757600097505050505050505061290d565b60005b8651811015613f6e578151831115613d5d5760009850505050505050505061290d565b613d7f878281518110613d7257613d72615bee565b6020026020010151614958565b955085805190602001208414613da05760009850505050505050505061290d565b613db5878281518110613c1857613c18615bee565b9450845160111415613e8a578151831415613e17578c80519060200120613de88660108151811061384d5761384d615bee565b805190602001201415613e065760019850505050505050505061290d565b60009850505050505050505061290d565b6000828481518110613e2b57613e2b615bee565b016020015160f81c90506010811115613e50576000995050505050505050505061290d565b613e75868260ff1681518110613e6857613e68615bee565b60200260200101516149d8565b9450613e826001856157d0565b935050613f5c565b845160021415613e06576000613eb6613eaf8760008151811061384d5761384d615bee565b8486614a06565b8351909150613ec582866157d0565b1415613f1a578d80519060200120613ee98760018151811061384d5761384d615bee565b805190602001201415613f08576001995050505050505050505061290d565b6000995050505050505050505061290d565b80613f31576000995050505050505050505061290d565b613f3b81856157d0565b9350613f5386600181518110613e6857613e68615bee565b9450613f5c9050565b80613f6681615af2565b915050613d3a565b5050505050505050949350505050565b6000610b0c826000015160038151811061387657613876615bee565b6000610b0c826000015160048151811061387657613876615bee565b6000610b0c826000015160008151811061387657613876615bee565b6060610b0c826000015160018151811061384d5761384d615bee565b6010546040517f41539d4a000000000000000000000000000000000000000000000000000000008152600481018490526000918291829182916001600160a01b03909116906341539d4a9060240160a06040518083038186803b15801561405457600080fd5b505afa158015614068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061408c91906153d7565b50935050925092506140e3828b6140a391906159f4565b6040805160208082018f90528183018e9052606082018d905260808083018d90528351808403909101815260a09092019092528051910120908588614b3f565b61412f5760405162461bcd60e51b815260206004820152601c60248201527f4678526f6f7454756e6e656c3a20494e56414c49445f4845414445520000000060448201526064016109d4565b9998505050505050505050565b60408051602081019091526060815260405180602001604052806141708460200151600181518110613c1857613c18615bee565b905292915050565b604080518082019091526000808252602082015282518051839081106141a0576141a0615bee565b6020026020010151905092915050565b8051600090158015906141c557508151602110155b6141ce57600080fd5b60006141dd8360200151614cb5565b905060008184600001516141f191906159f4565b905060008083866020015161420691906157d0565b905080519150602083101561422257826020036101000a820491505b50949350505050565b6060610b0c826020015160028151811061384d5761384d615bee565b6000806142556001436159f4565b60408051914060208301528101849052606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012090506142ac61271082615837565b6142b8906127106159b7565b61137290826159f4565b6001600160a01b03831661431d5761431881600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b614340565b816001600160a01b0316836001600160a01b031614614340576143408382614d36565b6001600160a01b03821661435757610e3781614dd3565b826001600160a01b0316826001600160a01b031614610e3757610e378282614e82565b6000836bffffffffffffffffffffffff16836bffffffffffffffffffffffff16111582906143bb5760405162461bcd60e51b81526004016109d491906156fc565b5061290d8385615a53565b60006143ea43604051806080016040528060448152602001615cc660449139614ec6565b905060008463ffffffff1611801561444457506001600160a01b0385166000908152600c6020526040812063ffffffff831691614428600188615a0b565b63ffffffff908116825260208201929092526040016000205416145b156144cd576001600160a01b0385166000908152600c60205260408120839161446e600188615a0b565b63ffffffff168152602081019190915260400160002080546bffffffffffffffffffffffff92909216640100000000027fffffffffffffffffffffffffffffffff000000000000000000000000ffffffff9092169190911790556145ae565b60408051808201825263ffffffff80841682526bffffffffffffffffffffffff80861660208085019182526001600160a01b038b166000908152600c82528681208b8616825290915294909420925183549451909116640100000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009094169116179190911790556145628460016157e8565b6001600160a01b0386166000908152600d6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff929092169190911790555b604080516bffffffffffffffffffffffff8086168252841660208201526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b6000806146158486615810565b9050846bffffffffffffffffffffffff16816bffffffffffffffffffffffff16101583906142225760405162461bcd60e51b81526004016109d491906156fc565b60606146618261488a565b61466a57600080fd5b600061467583614eee565b905060008167ffffffffffffffff81111561469257614692615c1d565b6040519080825280602002602001820160405280156146d757816020015b60408051808201909152600080825260208201528152602001906001900390816146b05790505b50905060006146e98560200151614cb5565b85602001516146f891906157d0565b90506000805b848110156147615761470f83614f71565b915060405180604001604052808381526020018481525084828151811061473857614738615bee565b602090810291909101015261474d82846157d0565b92508061475981615af2565b9150506146fe565b509195945050505050565b805160609061477a57600080fd5b60006147898360200151614cb5565b9050600081846000015161479d91906159f4565b905060008167ffffffffffffffff8111156147ba576147ba615c1d565b6040519080825280601f01601f1916602001820160405280156147e4576020820181803683370190505b509050600081602001905061422284876020015161480291906157d0565b8285615033565b6000614816600284615b2b565b1561485057601082614829600286615837565b8151811061483957614839615bee565b016020015161484b919060f81c615b3f565b614880565b60108261485e600286615837565b8151811061486e5761486e615bee565b0160200151614880919060f81c61586e565b60f81b9392505050565b805160009061489b57506000919050565b6020820151805160001a9060c08210156148b9575060009392505050565b5060019392505050565b806148cd57505050565b6020811061490557825182526148e46020846157d0565b92506148f16020836157d0565b91506148fe6020826159f4565b90506148cd565b600060016149148360206159f4565b614920906101006158f1565b61492a91906159f4565b935183518516941916939093179091525050565b805160009060151461494f57600080fd5b610b0c826141b0565b60606000826000015167ffffffffffffffff81111561497957614979615c1d565b6040519080825280601f01601f1916602001820160405280156149a3576020820181803683370190505b5090508051600014156149b65792915050565b60008160200190506149d18460200151828660000151615033565b5092915050565b80516000906021146149e957600080fd5b600080836020015160016149fd91906157d0565b51949350505050565b60008080614a1386613883565b90506000815167ffffffffffffffff811115614a3157614a31615c1d565b6040519080825280601f01601f191660200182016040528015614a5b576020820181803683370190505b509050845b8251614a6c90876157d0565b811015614b0f576000878281518110614a8757614a87615bee565b01602001517fff000000000000000000000000000000000000000000000000000000000000001690508083614abc89856159f4565b81518110614acc57614acc615bee565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350508080614b0790615af2565b915050614a60565b50808051906020012082805190602001201415614b2f5781519250614b34565b600092505b509095945050505050565b600060208251614b4f9190615b2b565b15614b9c5760405162461bcd60e51b815260206004820152601460248201527f496e76616c69642070726f6f66206c656e67746800000000000000000000000060448201526064016109d4565b600060208351614bac9190615837565b9050614bb98160026158f1565b8510614c075760405162461bcd60e51b815260206004820152601560248201527f4c65616620696e64657820697320746f6f20626967000000000000000000000060448201526064016109d4565b60008660205b85518111614ca757858101519250614c26600289615b2b565b614c5b576040805160208101849052908101849052606001604051602081830303815290604052805190602001209150614c88565b60408051602081018590529081018390526060016040516020818303038152906040528051906020012091505b614c93600289615837565b9750614ca06020826157d0565b9050614c0d565b509094149695505050505050565b8051600090811a6080811015614cce5750600092915050565b60b8811080614ce9575060c08110801590614ce9575060f881105b15614cf75750600192915050565b60c0811015614d2457614d0c600160b8615a30565b614d199060ff16826159f4565b6113729060016157d0565b614d0c600160f8615a30565b50919050565b60006001614d4384611582565b614d4d91906159f4565b600083815260086020526040902054909150808214614da0576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b600954600090614de5906001906159f4565b6000838152600a602052604081205460098054939450909284908110614e0d57614e0d615bee565b906000526020600020015490508060098381548110614e2e57614e2e615bee565b6000918252602080832090910192909255828152600a90915260408082208490558582528120556009805480614e6657614e66615bbf565b6001900381819060005260206000200160009055905550505050565b6000614e8d83611582565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b6000816401000000008410612f345760405162461bcd60e51b81526004016109d491906156fc565b8051600090614eff57506000919050565b600080614f0f8460200151614cb5565b8460200151614f1e91906157d0565b9050600084600001518560200151614f3691906157d0565b90505b80821015614f6857614f4a82614f71565b614f5490836157d0565b915082614f6081615af2565b935050614f39565b50909392505050565b80516000908190811a6080811015614f8c57600191506149d1565b60b8811015614fb257614fa06080826159f4565b614fab9060016157d0565b91506149d1565b60c0811015614fdf5760b78103600185019450806020036101000a855104600182018101935050506149d1565b60f8811015614ff357614fa060c0826159f4565b60019390930151602084900360f7016101000a90049092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0a0192915050565b8061503d57505050565b6020811061507557825182526150546020846157d0565b92506150616020836157d0565b915061506e6020826159f4565b905061503d565b8061490557505050565b82805461508b90615aa4565b90600052602060002090601f0160209004810192826150ad57600085556150f3565b82601f106150c657805160ff19168380011785556150f3565b828001600101855582156150f3579182015b828111156150f35782518255916020019190600101906150d8565b506150ff929150615103565b5090565b5b808211156150ff5760008155600101615104565b600061512b6151268461578a565b61573b565b905082815283838301111561513f57600080fd5b828260208301376000602084830101529392505050565b60006151646151268461578a565b905082815283838301111561517857600080fd5b611372836020830184615a78565b600082601f83011261519757600080fd5b61137283833560208501615118565b6000602082840312156151b857600080fd5b813561137281615c4c565b6000602082840312156151d557600080fd5b815161137281615c4c565b600080604083850312156151f357600080fd5b82356151fe81615c4c565b9150602083013561520e81615c4c565b809150509250929050565b60008060006060848603121561522e57600080fd5b833561523981615c4c565b9250602084013561524981615c4c565b929592945050506040919091013590565b6000806000806080858703121561527057600080fd5b843561527b81615c4c565b9350602085013561528b81615c4c565b925060408501359150606085013567ffffffffffffffff8111156152ae57600080fd5b6152ba87828801615186565b91505092959194509250565b600080604083850312156152d957600080fd5b82356152e481615c4c565b91506020830135801515811461520e57600080fd5b6000806040838503121561530c57600080fd5b823561531781615c4c565b946020939093013593505050565b60008060008060008060c0878903121561533e57600080fd5b863561534981615c4c565b95506020870135945060408701359350606087013560ff8116811461536d57600080fd5b9598949750929560808101359460a0909101359350915050565b6000806040838503121561539a57600080fd5b82356153a581615c4c565b9150602083013563ffffffff8116811461520e57600080fd5b6000602082840312156153d057600080fd5b5035919050565b600080600080600060a086880312156153ef57600080fd5b85519450602086015193506040860151925060608601519150608086015161541681615c4c565b809150509295509295909350565b60006020828403121561543657600080fd5b813561137281615c61565b60006020828403121561545357600080fd5b815161137281615c61565b60006020828403121561547057600080fd5b813567ffffffffffffffff81111561548757600080fd5b61290d84828501615186565b6000602082840312156154a557600080fd5b815167ffffffffffffffff8111156154bc57600080fd5b8201601f810184136154cd57600080fd5b61290d84825160208401615156565b6000602082840312156154ee57600080fd5b813567ffffffffffffffff81111561550557600080fd5b8201601f8101841361551657600080fd5b61290d84823560208401615118565b6000815180845261553d816020860160208601615a78565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7f697066733a2f2f000000000000000000000000000000000000000000000000008152600060076000845481600182811c9150808316806155b157607f831692505b60208084108214156155ea577f4e487b710000000000000000000000000000000000000000000000000000000086526022600452602486fd5b8180156155fe576001811461563157615662565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008616888b015287858b01019650615662565b60008b81526020902060005b868110156156585781548c82018b015290850190830161563d565b505087858b010196505b50949998505050505050505050565b83815260008351615689816020850160208801615a78565b60209201918201929092526040019392505050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526156d06080830184615525565b9695505050505050565b6001600160a01b038316815260406020820152600061290d6040830184615525565b6020815260006113726020830184615525565b83815261ffff831660208201526060604082015260006157326060830184615525565b95945050505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561578257615782615c1d565b604052919050565b600067ffffffffffffffff8211156157a4576157a4615c1d565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082198211156157e3576157e3615b61565b500190565b600063ffffffff80831681851680830382111561580757615807615b61565b01949350505050565b60006bffffffffffffffffffffffff80831681851680830382111561580757615807615b61565b60008261584657615846615b90565b500490565b600063ffffffff8084168061586257615862615b90565b92169190910492915050565b600060ff83168061588157615881615b90565b8060ff84160491505092915050565b600181815b808511156158e957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156158cf576158cf615b61565b808516156158dc57918102915b93841c9390800290615895565b509250929050565b6000611372838360008261590757506001610b0c565b8161591457506000610b0c565b816001811461592a576002811461593457615950565b6001915050610b0c565b60ff84111561594557615945615b61565b50506001821b610b0c565b5060208310610133831016604e8410600b8410161715615973575081810a610b0c565b61597d8383615890565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156159af576159af615b61565b029392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156159ef576159ef615b61565b500290565b600082821015615a0657615a06615b61565b500390565b600063ffffffff83811690831681811015615a2857615a28615b61565b039392505050565b600060ff821660ff841680821015615a4a57615a4a615b61565b90039392505050565b60006bffffffffffffffffffffffff83811690831681811015615a2857615a28615b61565b60005b83811015615a93578181015183820152602001615a7b565b83811115611db85750506000910152565b600181811c90821680615ab857607f821691505b60208210811415614d30577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615b2457615b24615b61565b5060010190565b600082615b3a57615b3a615b90565b500690565b600060ff831680615b5257615b52615b90565b8060ff84160691505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6001600160a01b03811681146114f457600080fd5b7fffffffff00000000000000000000000000000000000000000000000000000000811681146114f457600080fdfe455243373231436865636b706f696e7461626c653a3a5f6d6f766544656c6567617465733a20616d6f756e74206f766572666c6f7773455243373231436865636b706f696e7461626c653a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473455243373231436865636b706f696e7461626c653a3a766f746573546f44656c65676174653a20616d6f756e7420657863656564732039362062697473455243373231436865636b706f696e7461626c653a3a5f6d6f766544656c6567617465733a20616d6f756e7420756e646572666c6f7773a2646970667358221220b715de68d0913b5691d09cfeae11cbd13bae33200ddd1044779ca2319ad3e01b64736f6c63430008060033516d59754d6d3759696b656b6d4843336f516376425033665a45724a506f5069504164684466764374336a735348000000000000000000000000d0eebb983bef54882ce1700db8761acfef22dc6a000000000000000000000000500b5d5ca03b11ddbb8094722502a505187bae0d000000000000000000000000932532aa4c0174b8453839a6e44ee09cc615f2b7000000000000000000000000a7a01ad15675161dd16ba9005db571ce9a2b38dd000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a2

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103a45760003560e01c8063715018a6116101e9578063c0857ba01161010f578063e7a324dc116100ad578063f1127ed81161007c578063f1127ed8146108d3578063f2fde38b14610945578063f953cec714610958578063fca3b5aa1461096b57600080fd5b8063e7a324dc1461087e578063e8a3d485146108a5578063e9580e91146108ad578063e985e9c5146108c057600080fd5b8063c87b56dd116100e9578063c87b56dd1461080e578063d9a9b0c614610821578063de9b771f14610858578063e61987051461086b57600080fd5b8063c0857ba0146107c2578063c1b8e4e1146107d5578063c3cda520146107fb57600080fd5b80639c09628d11610187578063b4b5ea5711610156578063b4b5ea5714610762578063b50cbd9f14610775578063b88d4fde1461079c578063baedc1c4146107af57600080fd5b80639c09628d14610716578063a22cb46514610729578063a65c970c1461073c578063aea4e49e1461074f57600080fd5b80637ecebe00116101c35780637ecebe00146106ca5780638da5cb5b146106ea57806395d89b41146106fb578063972c49281461070357600080fd5b8063715018a61461068a57806376daebe114610692578063782d6fe11461069a57600080fd5b8063303e74df116102ce5780634f6ccce71161026c578063607f2d421161023b578063607f2d42146106065780636352211e146106295780636fcfff451461063c57806370a082311461067757600080fd5b80634f6ccce7146105ba578063587cde1e146105cd5780635ac1e3bb146105e05780635c19a95c146105f357600080fd5b806341b5d0de116102a857806341b5d0de1461057957806342842e0e1461058157806342966c68146105945780634f558e79146105a757600080fd5b8063303e74df14610539578063313ce5671461054c57806340c10f191461056657600080fd5b8063095ea7b3116103465780631e688e10116103155780631e688e10146104c757806320606b70146104ec57806323b872dd146105135780632f745c591461052657600080fd5b8063095ea7b31461046f5780630e387de6146104825780631249c58b146104b757806318160ddd146104bf57600080fd5b806306fdde031161038257806306fdde03146103f9578063075461721461040e57806307a974fc14610439578063081812fc1461045c57600080fd5b806301b9a397146103a957806301ffc9a7146103be578063034934d6146103e6575b600080fd5b6103bc6103b73660046151a6565b61097e565b005b6103d16103cc366004615424565b610ab6565b60405190151581526020015b60405180910390f35b6103bc6103f43660046151a6565b610b12565b610401610bd2565b6040516103dd91906156fc565b601454610421906001600160a01b031681565b6040516001600160a01b0390911681526020016103dd565b6103d16104473660046153be565b601a6020526000908152604090205460ff1681565b61042161046a3660046153be565b610c64565b6103bc61047d3660046152f9565b610d0a565b6104a97f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03681565b6040519081526020016103dd565b6104a9610e3c565b6009546104a9565b6016546103d19074010000000000000000000000000000000000000000900460ff1681565b6104a97f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6103bc610521366004615219565b610f0e565b6104a96105343660046152f9565b610f95565b601654610421906001600160a01b031681565b610554600081565b60405160ff90911681526020016103dd565b6103bc6105743660046152f9565b61103d565b6103bc6110a7565b6103bc61058f366004615219565b6111d8565b6103bc6105a23660046153be565b6111f3565b6103d16105b53660046153be565b611284565b6104a96105c83660046153be565b6112a3565b6104216105db3660046151a6565b611347565b6104016105ee3660046153be565b611379565b6103bc6106013660046151a6565b6114d9565b6103d16106143660046153be565b60126020526000908152604090205460ff1681565b6104216106373660046153be565b6114f7565b61066261064a3660046151a6565b600d6020526000908152604090205463ffffffff1681565b60405163ffffffff90911681526020016103dd565b6104a96106853660046151a6565b611582565b6103bc61161c565b6103bc611682565b6106ad6106a83660046152f9565b6117b1565b6040516bffffffffffffffffffffffff90911681526020016103dd565b6104a96106d83660046151a6565b600e6020526000908152604090205481565b6000546001600160a01b0316610421565b610401611a60565b601154610421906001600160a01b031681565b6103bc6107243660046153be565b611a6f565b6103bc6107373660046152c6565b611b11565b601354610421906001600160a01b031681565b6103bc61075d3660046151a6565b611bf4565b6106ad6107703660046151a6565b611cad565b6104217f000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c181565b6103bc6107aa36600461525a565b611d30565b6103bc6107bd3660046154dc565b611dbe565b601054610421906001600160a01b031681565b6016546103d1907501000000000000000000000000000000000000000000900460ff1681565b6103bc610809366004615325565b611e2b565b61040161081c3660046153be565b612199565b61084561082f3660046153be565b60196020526000908152604090205461ffff1681565b60405161ffff90911681526020016103dd565b600f54610421906001600160a01b031681565b601554610421906001600160a01b031681565b6104a97fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b61040161228b565b6106ad6108bb3660046151a6565b6122b3565b6103d16108ce3660046151e0565b6122df565b61091c6108e1366004615387565b600c60209081526000928352604080842090915290825290205463ffffffff81169064010000000090046bffffffffffffffffffffffff1682565b6040805163ffffffff90931683526bffffffffffffffffffffffff9091166020830152016103dd565b6103bc6109533660046151a6565b6123dd565b6103bc61096636600461545e565b6124bc565b6103bc6109793660046151a6565b6124c7565b6000546001600160a01b031633146109dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6016547501000000000000000000000000000000000000000000900460ff1615610a495760405162461bcd60e51b815260206004820152601460248201527f44657363726970746f72206973206c6f636b656400000000000000000000000060448201526064016109d4565b601680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f6e66ab22238a5471005895947c8f57db923c2a9c9c73180eff80864c21295c1b906020015b60405180910390a150565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610b0c5750610b0c826125f2565b92915050565b6013546001600160a01b03163314610b6c5760405162461bcd60e51b815260206004820152601560248201527f53656e646572206973206e6f74207468652044414f000000000000000000000060448201526064016109d4565b601380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fa976d6cce8c0e1e275a5d0c9b06ec02a2c7d38fc14c15247fd20244a8992f39f90602001610aab565b606060018054610be190615aa4565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0d90615aa4565b8015610c5a5780601f10610c2f57610100808354040283529160200191610c5a565b820191906000526020600020905b815481529060010190602001808311610c3d57829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b0316610cee5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109d4565b506000908152600560205260409020546001600160a01b031690565b6000610d15826114f7565b9050806001600160a01b0316836001600160a01b03161415610d9f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016109d4565b336001600160a01b0382161480610dbb5750610dbb81336122df565b610e2d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109d4565b610e3783836126d5565b505050565b6014546000906001600160a01b03163314610e995760405162461bcd60e51b815260206004820152601860248201527f53656e646572206973206e6f7420746865206d696e746572000000000000000060448201526064016109d4565b61044460175411158015610eb95750600a601754610eb79190615b2b565b155b15610ee95760135460178054610ee7926001600160a01b0316916000610ede83615af2565b9190505561275b565b505b60145460178054610f09926001600160a01b0316916000610ede83615af2565b905090565b610f18338261282d565b610f8a5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016109d4565b610e37838383612915565b6000610fa083611582565b82106110145760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e647300000000000000000000000000000000000000000060648201526084016109d4565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6015546001600160a01b031633146110975760405162461bcd60e51b815260206004820152601b60248201527f53656e646572206973206e6f742074686520707265646963617465000000000060448201526064016109d4565b6110a360008383612b05565b5050565b6000546001600160a01b031633146111015760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d4565b6016547501000000000000000000000000000000000000000000900460ff161561116d5760405162461bcd60e51b815260206004820152601460248201527f44657363726970746f72206973206c6f636b656400000000000000000000000060448201526064016109d4565b601680547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790556040517f593e31e306c198bef259d839f7c6dc4ff7fc10c07f76fab193a210b03704105f90600090a1565b610e3783838360405180602001604052806000815250611d30565b6014546001600160a01b0316331461124d5760405162461bcd60e51b815260206004820152601860248201527f53656e646572206973206e6f7420746865206d696e746572000000000000000060448201526064016109d4565b61125681612cb3565b60405181907f505c5847cc2bc8644df94b9b7029cf870d4f43e5b8ba5b67144268facff041a890600090a250565b6000818152600360205260408120546001600160a01b03161515610b0c565b60006112ae60095490565b82106113225760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e6473000000000000000000000000000000000000000060648201526084016109d4565b6009828154811061133557611335615bee565b90600052602060002001549050919050565b6001600160a01b038082166000908152600b602052604081205490911680156113705780611372565b825b9392505050565b6000818152600360205260409020546060906001600160a01b03166114065760405162461bcd60e51b815260206004820152602660248201527f464c4f4f523a2055524920717565727920666f72206e6f6e6578697374656e7460448201527f20746f6b656e000000000000000000000000000000000000000000000000000060648201526084016109d4565b601654600083815260196020526040908190205490517fe68a6bc10000000000000000000000000000000000000000000000000000000081526004810185905261ffff90911660248201526001600160a01b039091169063e68a6bc1906044015b60006040518083038186803b15801561147f57600080fd5b505afa158015611493573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610b0c9190810190615493565b6001600160a01b0381166114ea5750335b6114f43382612d72565b50565b6000818152600360205260408120546001600160a01b031680610b0c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016109d4565b60006001600160a01b0382166116005760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f20616464726573730000000000000000000000000000000000000000000060648201526084016109d4565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b031633146116765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d4565b6116806000612e0a565b565b6000546001600160a01b031633146116dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d4565b60165474010000000000000000000000000000000000000000900460ff16156117475760405162461bcd60e51b815260206004820152601060248201527f4d696e746572206973206c6f636b65640000000000000000000000000000000060448201526064016109d4565b601680547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790556040517f192417b3f16b1ce69e0c59b0376549666650245ffc05e4b2569089dda8589b6690600090a1565b60004382106118285760405162461bcd60e51b815260206004820152603760248201527f455243373231436865636b706f696e7461626c653a3a6765745072696f72566f60448201527f7465733a206e6f74207965742064657465726d696e656400000000000000000060648201526084016109d4565b6001600160a01b0383166000908152600d602052604090205463ffffffff1680611856576000915050610b0c565b6001600160a01b0384166000908152600c60205260408120849161187b600185615a0b565b63ffffffff908116825260208201929092526040016000205416116118f4576001600160a01b0384166000908152600c60205260408120906118be600184615a0b565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff169150610b0c9050565b6001600160a01b0384166000908152600c6020908152604080832083805290915290205463ffffffff1683101561192f576000915050610b0c565b60008061193d600184615a0b565b90505b8163ffffffff168163ffffffff161115611a1557600060026119628484615a0b565b61196c919061584b565b6119769083615a0b565b6001600160a01b0388166000908152600c6020908152604080832063ffffffff8581168552908352928190208151808301909252549283168082526401000000009093046bffffffffffffffffffffffff16918101919091529192508714156119e957602001519450610b0c9350505050565b805163ffffffff16871115611a0057819350611a0e565b611a0b600183615a0b565b92505b5050611940565b506001600160a01b0385166000908152600c6020908152604080832063ffffffff909416835292905220546bffffffffffffffffffffffff6401000000009091041691505092915050565b606060028054610be190615aa4565b6000546001600160a01b03163314611ac95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d4565b6000818152601960205260409020546114f490829061ffff16611aeb82612199565b604051602001611afd9392919061570f565b604051602081830303815290604052612e72565b6001600160a01b038216331415611b6a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109d4565b3360008181526006602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6011546001600160a01b031615611c735760405162461bcd60e51b815260206004820152602a60248201527f467842617365526f6f7454756e6e656c3a204348494c445f54554e4e454c5f4160448201527f4c52454144595f5345540000000000000000000000000000000000000000000060648201526084016109d4565b601180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6001600160a01b0381166000908152600d602052604081205463ffffffff1680611cd8576000611372565b6001600160a01b0383166000908152600c6020526040812090611cfc600184615a0b565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff169392505050565b611d3a338361282d565b611dac5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016109d4565b611db884848484612e7b565b50505050565b6000546001600160a01b03163314611e185760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d4565b80516110a390601890602084019061507f565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866611e56610bd2565b80519060200120611e644690565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a9052825180850390910181526101408401909252815191909301207f1901000000000000000000000000000000000000000000000000000000000000610160830152610162820183905261018282018190529192506000906101a201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa158015611fc9573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001519150506001600160a01b0381166120705760405162461bcd60e51b815260206004820152603660248201527f455243373231436865636b706f696e7461626c653a3a64656c6567617465427960448201527f5369673a20696e76616c6964207369676e61747572650000000000000000000060648201526084016109d4565b6001600160a01b0381166000908152600e6020526040812080549161209483615af2565b91905055891461210c5760405162461bcd60e51b815260206004820152603260248201527f455243373231436865636b706f696e7461626c653a3a64656c6567617465427960448201527f5369673a20696e76616c6964206e6f6e6365000000000000000000000000000060648201526084016109d4565b874211156121825760405162461bcd60e51b815260206004820152603660248201527f455243373231436865636b706f696e7461626c653a3a64656c6567617465427960448201527f5369673a207369676e617475726520657870697265640000000000000000000060648201526084016109d4565b61218c818b612d72565b505050505b505050505050565b6000818152600360205260409020546060906001600160a01b03166122265760405162461bcd60e51b815260206004820152602660248201527f464c4f4f523a2055524920717565727920666f72206e6f6e6578697374656e7460448201527f20746f6b656e000000000000000000000000000000000000000000000000000060648201526084016109d4565b601654600083815260196020526040908190205490517fd606f2140000000000000000000000000000000000000000000000000000000081526004810185905261ffff90911660248201526001600160a01b039091169063d606f21490604401611467565b6060601860405160200161229f919061556f565b604051602081830303815290604052905090565b6000610b0c6122c183611582565b6040518060600160405280603d8152602001615d0a603d9139612f04565b6040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152600091818416917f000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1169063c45527919060240160206040518083038186803b15801561236057600080fd5b505afa158015612374573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061239891906151c3565b6001600160a01b031614156123af57506001610b0c565b6001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff16611372565b6000546001600160a01b031633146124375760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d4565b6001600160a01b0381166124b35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109d4565b6114f481612e0a565b6000610e3782612f3c565b6000546001600160a01b031633146125215760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d4565b60165474010000000000000000000000000000000000000000900460ff161561258c5760405162461bcd60e51b815260206004820152601060248201527f4d696e746572206973206c6f636b65640000000000000000000000000000000060448201526064016109d4565b601480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fad0f299ec81a386c98df0ac27dae11dd020ed1b56963c53a7292e7a3a314539a90602001610aab565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061268557507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610b0c57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610b0c565b600081815260056020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091558190612722826114f7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000612766826132a9565b600083815260196020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff9390931692909217909155546127bb906001600160a01b03168484612b05565b6000828152601960205260409020546127dd90839061ffff16611aeb82612199565b60008281526019602090815260409182902054915161ffff909216825283917fba423747cad5fa57830fd779a833292c34fa989a678478b19df0fe540c821130910160405180910390a250919050565b6000818152600360205260408120546001600160a01b03166128b75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109d4565b60006128c2836114f7565b9050806001600160a01b0316846001600160a01b031614806128fd5750836001600160a01b03166128f284610c64565b6001600160a01b0316145b8061290d575061290d81856122df565b949350505050565b826001600160a01b0316612928826114f7565b6001600160a01b0316146129a45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e000000000000000000000000000000000000000000000060648201526084016109d4565b6001600160a01b038216612a1f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016109d4565b612a2a8383836133a3565b612a356000826126d5565b6001600160a01b0383166000908152600460205260408120805460019290612a5e9084906159f4565b90915550506001600160a01b0382166000908152600460205260408120805460019290612a8c9084906157d0565b909155505060008181526003602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038216612b5b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109d4565b6000818152600360205260409020546001600160a01b031615612bc05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109d4565b612bcc600083836133a3565b6001600160a01b0382166000908152600460205260408120805460019290612bf59084906157d0565b909155505060008181526003602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03868116919091179091559051839291861691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000612cbe826114f7565b9050612ccc816000846133a3565b612cd76000836126d5565b6001600160a01b0381166000908152600460205260408120805460019290612d009084906159f4565b909155505060008281526003602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000612d7d83611347565b6001600160a01b038481166000818152600b602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016888616908117909155905194955093928516927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46000612dfd846122b3565b9050611db88284836133c6565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6114f481613583565b612e86848484612915565b612e9284848484613607565b611db85760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109d4565b6000816c010000000000000000000000008410612f345760405162461bcd60e51b81526004016109d491906156fc565b509192915050565b60606000612f49836137d2565b90506000612f5682613831565b90506000612f638361385a565b9050600081612f7184613883565b612f7a86613a71565b604051602001612f8c93929190615671565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152601290935291205490915060ff16156130475760405162461bcd60e51b8152602060048201526024808201527f4678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434560448201527f535345440000000000000000000000000000000000000000000000000000000060648201526084016109d4565b600081815260126020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561308785613a8d565b9050600061309482613bd7565b905061309f81613c67565b6011546001600160a01b039081169116146131225760405162461bcd60e51b815260206004820152602560248201527f4678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f5460448201527f554e4e454c00000000000000000000000000000000000000000000000000000060648201526084016109d4565b600061312d87613c90565b905061314d61313d846020015190565b876131478a613cac565b84613cc8565b6131bf5760405162461bcd60e51b815260206004820152602360248201527f4678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f505260448201527f4f4f46000000000000000000000000000000000000000000000000000000000060648201526084016109d4565b6131ed856131cc89613f7e565b6131d58a613f9a565b846131df8c613fb6565b6131e88d613fd2565b613fee565b5060006131f98361413c565b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03661322f61322a836000614178565b6141b0565b1461327c5760405162461bcd60e51b815260206004820152601f60248201527f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e41545552450060448201526064016109d4565b60006132878461422b565b80602001905181019061329a9190615493565b9b9a5050505050505050505050565b6000806132b583614247565b905060328110156132ca57506101a492915050565b60648110156132dc5750604592915050565b60c88110156132ee5750602192915050565b61012c8110156133015750600792915050565b6101908110156133145750600392915050565b6101f48110156133275750600192915050565b6103e881101561333b575061010092915050565b6106a481101561334e5750608092915050565b610a288110156133615750604092915050565b610f3c8110156133745750602092915050565b6122c48110156133875750601092915050565b61271081101561339a5750600892915050565b50600092915050565b6133ae8383836142c2565b610e376133ba84611347565b6133c384611347565b60015b816001600160a01b0316836001600160a01b0316141580156133f657506000816bffffffffffffffffffffffff16115b15610e37576001600160a01b038316156134c1576001600160a01b0383166000908152600d602052604081205463ffffffff169081613436576000613488565b6001600160a01b0385166000908152600c602052604081209061345a600185615a0b565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff165b905060006134af8285604051806060016040528060378152602001615d476037913961437a565b90506134bd868484846143c6565b5050505b6001600160a01b03821615610e37576001600160a01b0382166000908152600d602052604081205463ffffffff1690816134fc57600061354e565b6001600160a01b0384166000908152600c6020526040812090613520600185615a0b565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff165b905060006135758285604051806060016040528060368152602001615c9060369139614608565b9050612191858484846143c6565b600f546011546040517fb47204770000000000000000000000000000000000000000000000000000000081526001600160a01b039283169263b4720477926135d29291169085906004016156da565b600060405180830381600087803b1580156135ec57600080fd5b505af1158015613600573d6000803e3d6000fd5b5050505050565b60006001600160a01b0384163b156137c7576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a029061366490339089908890889060040161569e565b602060405180830381600087803b15801561367e57600080fd5b505af19250505080156136cc575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526136c991810190615441565b60015b61377c573d8080156136fa576040519150601f19603f3d011682016040523d82523d6000602084013e6136ff565b606091505b5080516137745760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109d4565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061290d565b506001949350505050565b604080516020810190915260608152600061381c6138178460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b614656565b60408051602081019091529081529392505050565b6060610b0c826000015160088151811061384d5761384d615bee565b602002602001015161476c565b6000610b0c826000015160028151811061387657613876615bee565b60200260200101516141b0565b60408051602081019091526000815281516060919015610b0c576000806138ab600086614809565b60f81c905060018114806138c257508060ff166003145b15613982576001855160026138d791906159b7565b6138e191906159f4565b67ffffffffffffffff8111156138f9576138f9615c1d565b6040519080825280601f01601f191660200182016040528015613923576020820181803683370190505b5092506000613933600187614809565b9050808460008151811061394957613949615bee565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060019250506139e6565b60028551600261399291906159b7565b61399c91906159f4565b67ffffffffffffffff8111156139b4576139b4615c1d565b6040519080825280601f01601f1916602001820160405280156139de576020820181803683370190505b509250600091505b60ff82165b8351811015613a6857613a15613a0460ff8516836159f4565b613a0f9060026157d0565b87614809565b848281518110613a2757613a27615bee565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080613a6081615af2565b9150506139eb565b50505092915050565b6000610b0c826000015160098151811061387657613876615bee565b613ab160405180606001604052806060815260200160608152602001600081525090565b613acb826000015160068151811061384d5761384d615bee565b602082810182905260408051808201825260008082529083015280518082019091528251815291810190820152613b018161488a565b15613b1657613b0f81614656565b8252613bc3565b60208201518051600090613b2c906001906159f4565b67ffffffffffffffff811115613b4457613b44615c1d565b6040519080825280601f01601f191660200182016040528015613b6e576020820181803683370190505b509050600080836021019150826020019050613b8c828285516148c3565b604080518082018252600080825260209182015281518083019092528451825280850190820152613bbc90614656565b8652505050505b613bcc83613a71565b604083015250919050565b604080516080810182526000918101828152606080830193909352815260208101919091526000613c258360000151600381518110613c1857613c18615bee565b6020026020010151614656565b836040015181518110613c3a57613c3a615bee565b602002602001015190506040518060400160405280828152602001613c5e83614656565b90529392505050565b6000610b0c8260200151600081518110613c8357613c83615bee565b602002602001015161493e565b6000610b0c826000015160058151811061387657613876615bee565b6060610b0c826000015160078151811061384d5761384d615bee565b600080613cfc8460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b90506000613d0982614656565b905060608085600080613d1b8b613883565b9050805160001415613d3757600097505050505050505061290d565b60005b8651811015613f6e578151831115613d5d5760009850505050505050505061290d565b613d7f878281518110613d7257613d72615bee565b6020026020010151614958565b955085805190602001208414613da05760009850505050505050505061290d565b613db5878281518110613c1857613c18615bee565b9450845160111415613e8a578151831415613e17578c80519060200120613de88660108151811061384d5761384d615bee565b805190602001201415613e065760019850505050505050505061290d565b60009850505050505050505061290d565b6000828481518110613e2b57613e2b615bee565b016020015160f81c90506010811115613e50576000995050505050505050505061290d565b613e75868260ff1681518110613e6857613e68615bee565b60200260200101516149d8565b9450613e826001856157d0565b935050613f5c565b845160021415613e06576000613eb6613eaf8760008151811061384d5761384d615bee565b8486614a06565b8351909150613ec582866157d0565b1415613f1a578d80519060200120613ee98760018151811061384d5761384d615bee565b805190602001201415613f08576001995050505050505050505061290d565b6000995050505050505050505061290d565b80613f31576000995050505050505050505061290d565b613f3b81856157d0565b9350613f5386600181518110613e6857613e68615bee565b9450613f5c9050565b80613f6681615af2565b915050613d3a565b5050505050505050949350505050565b6000610b0c826000015160038151811061387657613876615bee565b6000610b0c826000015160048151811061387657613876615bee565b6000610b0c826000015160008151811061387657613876615bee565b6060610b0c826000015160018151811061384d5761384d615bee565b6010546040517f41539d4a000000000000000000000000000000000000000000000000000000008152600481018490526000918291829182916001600160a01b03909116906341539d4a9060240160a06040518083038186803b15801561405457600080fd5b505afa158015614068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061408c91906153d7565b50935050925092506140e3828b6140a391906159f4565b6040805160208082018f90528183018e9052606082018d905260808083018d90528351808403909101815260a09092019092528051910120908588614b3f565b61412f5760405162461bcd60e51b815260206004820152601c60248201527f4678526f6f7454756e6e656c3a20494e56414c49445f4845414445520000000060448201526064016109d4565b9998505050505050505050565b60408051602081019091526060815260405180602001604052806141708460200151600181518110613c1857613c18615bee565b905292915050565b604080518082019091526000808252602082015282518051839081106141a0576141a0615bee565b6020026020010151905092915050565b8051600090158015906141c557508151602110155b6141ce57600080fd5b60006141dd8360200151614cb5565b905060008184600001516141f191906159f4565b905060008083866020015161420691906157d0565b905080519150602083101561422257826020036101000a820491505b50949350505050565b6060610b0c826020015160028151811061384d5761384d615bee565b6000806142556001436159f4565b60408051914060208301528101849052606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012090506142ac61271082615837565b6142b8906127106159b7565b61137290826159f4565b6001600160a01b03831661431d5761431881600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b614340565b816001600160a01b0316836001600160a01b031614614340576143408382614d36565b6001600160a01b03821661435757610e3781614dd3565b826001600160a01b0316826001600160a01b031614610e3757610e378282614e82565b6000836bffffffffffffffffffffffff16836bffffffffffffffffffffffff16111582906143bb5760405162461bcd60e51b81526004016109d491906156fc565b5061290d8385615a53565b60006143ea43604051806080016040528060448152602001615cc660449139614ec6565b905060008463ffffffff1611801561444457506001600160a01b0385166000908152600c6020526040812063ffffffff831691614428600188615a0b565b63ffffffff908116825260208201929092526040016000205416145b156144cd576001600160a01b0385166000908152600c60205260408120839161446e600188615a0b565b63ffffffff168152602081019190915260400160002080546bffffffffffffffffffffffff92909216640100000000027fffffffffffffffffffffffffffffffff000000000000000000000000ffffffff9092169190911790556145ae565b60408051808201825263ffffffff80841682526bffffffffffffffffffffffff80861660208085019182526001600160a01b038b166000908152600c82528681208b8616825290915294909420925183549451909116640100000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009094169116179190911790556145628460016157e8565b6001600160a01b0386166000908152600d6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff929092169190911790555b604080516bffffffffffffffffffffffff8086168252841660208201526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b6000806146158486615810565b9050846bffffffffffffffffffffffff16816bffffffffffffffffffffffff16101583906142225760405162461bcd60e51b81526004016109d491906156fc565b60606146618261488a565b61466a57600080fd5b600061467583614eee565b905060008167ffffffffffffffff81111561469257614692615c1d565b6040519080825280602002602001820160405280156146d757816020015b60408051808201909152600080825260208201528152602001906001900390816146b05790505b50905060006146e98560200151614cb5565b85602001516146f891906157d0565b90506000805b848110156147615761470f83614f71565b915060405180604001604052808381526020018481525084828151811061473857614738615bee565b602090810291909101015261474d82846157d0565b92508061475981615af2565b9150506146fe565b509195945050505050565b805160609061477a57600080fd5b60006147898360200151614cb5565b9050600081846000015161479d91906159f4565b905060008167ffffffffffffffff8111156147ba576147ba615c1d565b6040519080825280601f01601f1916602001820160405280156147e4576020820181803683370190505b509050600081602001905061422284876020015161480291906157d0565b8285615033565b6000614816600284615b2b565b1561485057601082614829600286615837565b8151811061483957614839615bee565b016020015161484b919060f81c615b3f565b614880565b60108261485e600286615837565b8151811061486e5761486e615bee565b0160200151614880919060f81c61586e565b60f81b9392505050565b805160009061489b57506000919050565b6020820151805160001a9060c08210156148b9575060009392505050565b5060019392505050565b806148cd57505050565b6020811061490557825182526148e46020846157d0565b92506148f16020836157d0565b91506148fe6020826159f4565b90506148cd565b600060016149148360206159f4565b614920906101006158f1565b61492a91906159f4565b935183518516941916939093179091525050565b805160009060151461494f57600080fd5b610b0c826141b0565b60606000826000015167ffffffffffffffff81111561497957614979615c1d565b6040519080825280601f01601f1916602001820160405280156149a3576020820181803683370190505b5090508051600014156149b65792915050565b60008160200190506149d18460200151828660000151615033565b5092915050565b80516000906021146149e957600080fd5b600080836020015160016149fd91906157d0565b51949350505050565b60008080614a1386613883565b90506000815167ffffffffffffffff811115614a3157614a31615c1d565b6040519080825280601f01601f191660200182016040528015614a5b576020820181803683370190505b509050845b8251614a6c90876157d0565b811015614b0f576000878281518110614a8757614a87615bee565b01602001517fff000000000000000000000000000000000000000000000000000000000000001690508083614abc89856159f4565b81518110614acc57614acc615bee565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350508080614b0790615af2565b915050614a60565b50808051906020012082805190602001201415614b2f5781519250614b34565b600092505b509095945050505050565b600060208251614b4f9190615b2b565b15614b9c5760405162461bcd60e51b815260206004820152601460248201527f496e76616c69642070726f6f66206c656e67746800000000000000000000000060448201526064016109d4565b600060208351614bac9190615837565b9050614bb98160026158f1565b8510614c075760405162461bcd60e51b815260206004820152601560248201527f4c65616620696e64657820697320746f6f20626967000000000000000000000060448201526064016109d4565b60008660205b85518111614ca757858101519250614c26600289615b2b565b614c5b576040805160208101849052908101849052606001604051602081830303815290604052805190602001209150614c88565b60408051602081018590529081018390526060016040516020818303038152906040528051906020012091505b614c93600289615837565b9750614ca06020826157d0565b9050614c0d565b509094149695505050505050565b8051600090811a6080811015614cce5750600092915050565b60b8811080614ce9575060c08110801590614ce9575060f881105b15614cf75750600192915050565b60c0811015614d2457614d0c600160b8615a30565b614d199060ff16826159f4565b6113729060016157d0565b614d0c600160f8615a30565b50919050565b60006001614d4384611582565b614d4d91906159f4565b600083815260086020526040902054909150808214614da0576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b600954600090614de5906001906159f4565b6000838152600a602052604081205460098054939450909284908110614e0d57614e0d615bee565b906000526020600020015490508060098381548110614e2e57614e2e615bee565b6000918252602080832090910192909255828152600a90915260408082208490558582528120556009805480614e6657614e66615bbf565b6001900381819060005260206000200160009055905550505050565b6000614e8d83611582565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b6000816401000000008410612f345760405162461bcd60e51b81526004016109d491906156fc565b8051600090614eff57506000919050565b600080614f0f8460200151614cb5565b8460200151614f1e91906157d0565b9050600084600001518560200151614f3691906157d0565b90505b80821015614f6857614f4a82614f71565b614f5490836157d0565b915082614f6081615af2565b935050614f39565b50909392505050565b80516000908190811a6080811015614f8c57600191506149d1565b60b8811015614fb257614fa06080826159f4565b614fab9060016157d0565b91506149d1565b60c0811015614fdf5760b78103600185019450806020036101000a855104600182018101935050506149d1565b60f8811015614ff357614fa060c0826159f4565b60019390930151602084900360f7016101000a90049092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0a0192915050565b8061503d57505050565b6020811061507557825182526150546020846157d0565b92506150616020836157d0565b915061506e6020826159f4565b905061503d565b8061490557505050565b82805461508b90615aa4565b90600052602060002090601f0160209004810192826150ad57600085556150f3565b82601f106150c657805160ff19168380011785556150f3565b828001600101855582156150f3579182015b828111156150f35782518255916020019190600101906150d8565b506150ff929150615103565b5090565b5b808211156150ff5760008155600101615104565b600061512b6151268461578a565b61573b565b905082815283838301111561513f57600080fd5b828260208301376000602084830101529392505050565b60006151646151268461578a565b905082815283838301111561517857600080fd5b611372836020830184615a78565b600082601f83011261519757600080fd5b61137283833560208501615118565b6000602082840312156151b857600080fd5b813561137281615c4c565b6000602082840312156151d557600080fd5b815161137281615c4c565b600080604083850312156151f357600080fd5b82356151fe81615c4c565b9150602083013561520e81615c4c565b809150509250929050565b60008060006060848603121561522e57600080fd5b833561523981615c4c565b9250602084013561524981615c4c565b929592945050506040919091013590565b6000806000806080858703121561527057600080fd5b843561527b81615c4c565b9350602085013561528b81615c4c565b925060408501359150606085013567ffffffffffffffff8111156152ae57600080fd5b6152ba87828801615186565b91505092959194509250565b600080604083850312156152d957600080fd5b82356152e481615c4c565b91506020830135801515811461520e57600080fd5b6000806040838503121561530c57600080fd5b823561531781615c4c565b946020939093013593505050565b60008060008060008060c0878903121561533e57600080fd5b863561534981615c4c565b95506020870135945060408701359350606087013560ff8116811461536d57600080fd5b9598949750929560808101359460a0909101359350915050565b6000806040838503121561539a57600080fd5b82356153a581615c4c565b9150602083013563ffffffff8116811461520e57600080fd5b6000602082840312156153d057600080fd5b5035919050565b600080600080600060a086880312156153ef57600080fd5b85519450602086015193506040860151925060608601519150608086015161541681615c4c565b809150509295509295909350565b60006020828403121561543657600080fd5b813561137281615c61565b60006020828403121561545357600080fd5b815161137281615c61565b60006020828403121561547057600080fd5b813567ffffffffffffffff81111561548757600080fd5b61290d84828501615186565b6000602082840312156154a557600080fd5b815167ffffffffffffffff8111156154bc57600080fd5b8201601f810184136154cd57600080fd5b61290d84825160208401615156565b6000602082840312156154ee57600080fd5b813567ffffffffffffffff81111561550557600080fd5b8201601f8101841361551657600080fd5b61290d84823560208401615118565b6000815180845261553d816020860160208601615a78565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7f697066733a2f2f000000000000000000000000000000000000000000000000008152600060076000845481600182811c9150808316806155b157607f831692505b60208084108214156155ea577f4e487b710000000000000000000000000000000000000000000000000000000086526022600452602486fd5b8180156155fe576001811461563157615662565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008616888b015287858b01019650615662565b60008b81526020902060005b868110156156585781548c82018b015290850190830161563d565b505087858b010196505b50949998505050505050505050565b83815260008351615689816020850160208801615a78565b60209201918201929092526040019392505050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526156d06080830184615525565b9695505050505050565b6001600160a01b038316815260406020820152600061290d6040830184615525565b6020815260006113726020830184615525565b83815261ffff831660208201526060604082015260006157326060830184615525565b95945050505050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561578257615782615c1d565b604052919050565b600067ffffffffffffffff8211156157a4576157a4615c1d565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082198211156157e3576157e3615b61565b500190565b600063ffffffff80831681851680830382111561580757615807615b61565b01949350505050565b60006bffffffffffffffffffffffff80831681851680830382111561580757615807615b61565b60008261584657615846615b90565b500490565b600063ffffffff8084168061586257615862615b90565b92169190910492915050565b600060ff83168061588157615881615b90565b8060ff84160491505092915050565b600181815b808511156158e957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156158cf576158cf615b61565b808516156158dc57918102915b93841c9390800290615895565b509250929050565b6000611372838360008261590757506001610b0c565b8161591457506000610b0c565b816001811461592a576002811461593457615950565b6001915050610b0c565b60ff84111561594557615945615b61565b50506001821b610b0c565b5060208310610133831016604e8410600b8410161715615973575081810a610b0c565b61597d8383615890565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156159af576159af615b61565b029392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156159ef576159ef615b61565b500290565b600082821015615a0657615a06615b61565b500390565b600063ffffffff83811690831681811015615a2857615a28615b61565b039392505050565b600060ff821660ff841680821015615a4a57615a4a615b61565b90039392505050565b60006bffffffffffffffffffffffff83811690831681811015615a2857615a28615b61565b60005b83811015615a93578181015183820152602001615a7b565b83811115611db85750506000910152565b600181811c90821680615ab857607f821691505b60208210811415614d30577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615b2457615b24615b61565b5060010190565b600082615b3a57615b3a615b90565b500690565b600060ff831680615b5257615b52615b90565b8060ff84160691505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6001600160a01b03811681146114f457600080fd5b7fffffffff00000000000000000000000000000000000000000000000000000000811681146114f457600080fdfe455243373231436865636b706f696e7461626c653a3a5f6d6f766544656c6567617465733a20616d6f756e74206f766572666c6f7773455243373231436865636b706f696e7461626c653a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473455243373231436865636b706f696e7461626c653a3a766f746573546f44656c65676174653a20616d6f756e7420657863656564732039362062697473455243373231436865636b706f696e7461626c653a3a5f6d6f766544656c6567617465733a20616d6f756e7420756e646572666c6f7773a2646970667358221220b715de68d0913b5691d09cfeae11cbd13bae33200ddd1044779ca2319ad3e01b64736f6c63430008060033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000d0eebb983bef54882ce1700db8761acfef22dc6a000000000000000000000000500b5d5ca03b11ddbb8094722502a505187bae0d000000000000000000000000932532aa4c0174b8453839a6e44ee09cc615f2b7000000000000000000000000a7a01ad15675161dd16ba9005db571ce9a2b38dd000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a2

-----Decoded View---------------
Arg [0] : _floorsDAO (address): 0xD0EeBb983beF54882cE1700dB8761ACfeF22Dc6a
Arg [1] : _minter (address): 0x500b5D5Ca03b11DDbb8094722502a505187baE0d
Arg [2] : _predicate (address): 0x932532aA4c0174b8453839A6E44eE09Cc615F2b7
Arg [3] : _descriptor (address): 0xa7A01Ad15675161Dd16ba9005DB571cE9a2b38DD
Arg [4] : _proxyRegistry (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
Arg [5] : _checkpointManager (address): 0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287
Arg [6] : _fxRoot (address): 0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000d0eebb983bef54882ce1700db8761acfef22dc6a
Arg [1] : 000000000000000000000000500b5d5ca03b11ddbb8094722502a505187bae0d
Arg [2] : 000000000000000000000000932532aa4c0174b8453839a6e44ee09cc615f2b7
Arg [3] : 000000000000000000000000a7a01ad15675161dd16ba9005db571ce9a2b38dd
Arg [4] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [5] : 00000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287
Arg [6] : 000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a2


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.