ETH Price: $3,924.48 (-1.48%)

Contract

0x2665Aa3846EC61e6D28A0d9F76b70047719F3664
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Register Nft175931312023-06-30 15:57:47527 days ago1688140667IN
RARA: Root Registrar
0 ETH0.0047372134.25512907
Register Nft169784212023-04-04 22:20:11614 days ago1680646811IN
RARA: Root Registrar
0 ETH0.0046715335.26481588
Register Nft169783492023-04-04 22:05:47614 days ago1680645947IN
RARA: Root Registrar
0 ETH0.0052114439.34056942
Register Nft169783212023-04-04 21:59:47614 days ago1680645587IN
RARA: Root Registrar
0 ETH0.0042364631.98054054
Register Nft169782602023-04-04 21:47:23614 days ago1680644843IN
RARA: Root Registrar
0 ETH0.0051514538.88774069
Register Nft169782312023-04-04 21:41:35614 days ago1680644495IN
RARA: Root Registrar
0 ETH0.00571743.15698617
Register Nft169782152023-04-04 21:38:11614 days ago1680644291IN
RARA: Root Registrar
0 ETH0.0057475843.38782015
Register Nft169413272023-03-30 16:44:23619 days ago1680194663IN
RARA: Root Registrar
0 ETH0.0046909939.69934937
Register Nft168268442023-03-14 14:40:11635 days ago1678804811IN
RARA: Root Registrar
0 ETH0.0049604242.04751593
Register Nft166937582023-02-23 21:26:47654 days ago1677187607IN
RARA: Root Registrar
0 ETH0.0045422732.67119816
Register Nft163352892023-01-04 18:42:59704 days ago1672857779IN
RARA: Root Registrar
0 ETH0.0026656119.46740017
Register Nft161892642022-12-15 9:41:11724 days ago1671097271IN
RARA: Root Registrar
0 ETH0.0015316213.40273975
Register Nft161770492022-12-13 16:45:11726 days ago1670949911IN
RARA: Root Registrar
0 ETH0.0026857422.88039434
Register Nft161417652022-12-08 18:24:59731 days ago1670523899IN
RARA: Root Registrar
0 ETH0.0020447915.3736167
Register Nft161417572022-12-08 18:23:23731 days ago1670523803IN
RARA: Root Registrar
0 ETH0.0018885114.19864817
Register Nft161417492022-12-08 18:21:47731 days ago1670523707IN
RARA: Root Registrar
0 ETH0.0019770114.86401882
Register Nft161417422022-12-08 18:20:23731 days ago1670523623IN
RARA: Root Registrar
0 ETH0.0021040515.8191155
Register Nft161417002022-12-08 18:11:59731 days ago1670523119IN
RARA: Root Registrar
0 ETH0.0018293513.75382067
Register Nft161416992022-12-08 18:11:47731 days ago1670523107IN
RARA: Root Registrar
0 ETH0.0017774614.20483446
Register Nft161367442022-12-08 1:35:23732 days ago1670463323IN
RARA: Root Registrar
0 ETH0.0016585714.78887435
Register Nft161233322022-12-06 4:21:59734 days ago1670300519IN
RARA: Root Registrar
0 ETH0.0015434313
Register Nft160775892022-11-29 18:58:59740 days ago1669748339IN
RARA: Root Registrar
0 ETH0.0019040713.41330499
Register Nft159946792022-11-18 5:02:23752 days ago1668747743IN
RARA: Root Registrar
0 ETH0.0013406611.86633049
Register Nft159939252022-11-18 2:30:47752 days ago1668738647IN
RARA: Root Registrar
0 ETH0.0016896311.85947812
Register Nft159696142022-11-14 16:57:23755 days ago1668445043IN
RARA: Root Registrar
0 ETH0.0021308518.06821699
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RootRegistrar

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license
File 1 of 13 : RootRegistrar.sol
//SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.9;

import "./FxBaseRootTunnel.sol";
import "../Maker/NftOwnership.sol";
import "../Royalties/Royalties.sol";

/// @dev This contract lives on the L1 and allows NFT owners to register NFTs that live on the L1.
/// Once ownership is verified, it will send a message up to the contracts on the L2 specifying that
/// the NFT has been registered or unregistered.
/// This is not an upgradeable contract and should not be used with a proxy.
contract RootRegistrar is FxBaseRootTunnel {
    bytes32 public constant REGISTER = keccak256("REGISTER");
    bytes32 public constant DE_REGISTER = keccak256("DE_REGISTER");

    /// @dev the address that deployed this contract is the only one that can update the fxRootTunnel
    address public deployer;

    /// @dev the address where the registry royalty is deployed
    address royaltyRegistry;

    /// @param _checkpointManager This is a well known contract deployed by matic that is used to verify messages coming from the L2 down to L1.
    /// @param _fxRoot This is a well known contract deployed by matic that will emit the events going from L1 to L2.
    /// @dev You must call setFxChildTunnel() with the ChildRegistrar address on the L2 after deployment
    constructor(
        address _checkpointManager,
        address _fxRoot,
        address _royaltyRegistry
    ) FxBaseRootTunnel(_checkpointManager, _fxRoot) {
        deployer = msg.sender;
        royaltyRegistry = _royaltyRegistry;
    }

    /// @dev Set fxChildTunnel if not set already
    /// Only the deploying account can update this
    /// Overrides the function in the base contract
    function setFxChildTunnel(address _fxChildTunnel) public override {
        require(deployer == msg.sender, "Only deployer");
        require(fxChildTunnel == address(0x0), "Already set");
        fxChildTunnel = _fxChildTunnel;
    }

    /// @dev Allows a NFT owner to register the NFT in the protocol on L1
    /// Once the ownership is verified a message will be sent to the Child contract
    /// on the L2 chain that will trigger a registration there.
    function registerNft(
        address nftContractAddress,
        uint256 nftId,
        address creatorAddress,
        uint256 creatorSaleBasisPoints,
        uint256 optionBits,
        string memory ipfsMetadataHash
    ) external {
        // Verify ownership
        require(
            NftOwnership._verifyOwnership(
                nftContractAddress,
                nftId,
                msg.sender
            ),
            "NFT not owned"
        );

        // Get the royalties for the creator addresses - use fallback if none set on chain
        (
            address[] memory addressesArray,
            uint256[] memory creatorBasisPointsArray
        ) = Royalties._getRoyaltyOverride(
                royaltyRegistry,
                nftContractAddress,
                nftId,
                creatorAddress,
                creatorSaleBasisPoints
            );

        // REGISTER, encode(owner, chainId, nftContractAddress, nftId, creatorAddress, optionBits, ipfsMetadataHash)
        bytes memory message = abi.encode(
            REGISTER,
            abi.encode(
                msg.sender,
                block.chainid,
                nftContractAddress,
                nftId,
                addressesArray,
                creatorBasisPointsArray,
                optionBits,
                ipfsMetadataHash
            )
        );
        _sendMessageToChild(message);
    }

    /// @dev Allows a NFT owner to de-register the NFT in the protocol on L1
    /// Once the ownership is verified a message will be sent to the Child contract
    /// on the L2 chain that will trigger a desgregistration there.
    function deRegisterNft(address nftContractAddress, uint256 nftId) external {
        // Verify ownership
        require(
            NftOwnership._verifyOwnership(
                nftContractAddress,
                nftId,
                msg.sender
            ),
            "NFT not owned"
        );

        // DERegister, encode(address owner, uint256 chainId, address nftContractAddress, uint256 nftId)
        bytes memory message = abi.encode(
            DE_REGISTER,
            abi.encode(msg.sender, block.chainid, nftContractAddress, nftId)
        );
        _sendMessageToChild(message);
    }

    /// @dev NOOP - No messages come from L2 down to L1
    function _processMessageFromChild(bytes memory data) internal override {}
}

File 2 of 13 : IRoyaltyEngineV1.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

/**
 * @dev Lookup engine interface
 */
interface IRoyaltyEngineV1 is IERC165 {

    /**
     * Get the royalty for a given token (address, id) and value amount.  Does not cache the bps/amounts.  Caches the spec for a given token address
     * 
     * @param tokenAddress - The address of the token
     * @param tokenId      - The id of the token
     * @param value        - The value you wish to get the royalty of
     *
     * returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get
     */
    function getRoyalty(address tokenAddress, uint256 tokenId, uint256 value) external returns(address payable[] memory recipients, uint256[] memory amounts);

    /**
     * View only version of getRoyalty
     * 
     * @param tokenAddress - The address of the token
     * @param tokenId      - The id of the token
     * @param value        - The value you wish to get the royalty of
     *
     * returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get
     */
    function getRoyaltyView(address tokenAddress, uint256 tokenId, uint256 value) external view returns(address payable[] memory recipients, uint256[] memory amounts);
}

File 3 of 13 : ExitPayloadReader.sol
pragma solidity ^0.8.0;

import { RLPReader } from "./RLPReader.sol";

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(uint src, uint dest, uint 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
        uint 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];
    }
}

File 4 of 13 : Merkle.sol
// SPDX-License-Identifier: MIT
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;
    }
}

File 5 of 13 : MerklePatriciaProof.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {RLPReader} from "./RLPReader.sol";

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
            );
    }
}

File 6 of 13 : RLPReader.sol
/*
* @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 {
        uint len;
        uint memPtr;
    }

    struct Iterator {
        RLPItem item;   // Item that's being iterated over.
        uint 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));

        uint ptr = self.nextPtr;
        uint 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) {
        uint 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));

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

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

    /*
    * @param item RLP encoded bytes
    */
    function payloadLen(RLPItem memory item) internal pure returns (uint) {
        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));

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

        uint memPtr = item.memPtr + _payloadOffset(item.memPtr);
        uint dataLen;
        for (uint 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;
        uint 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 (uint, uint) {
        uint offset = _payloadOffset(item.memPtr);
        uint memPtr = item.memPtr + offset;
        uint 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) {
        (uint memPtr, uint 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;
        
        uint 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);
        uint result;
        uint 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 (uint) {
        require(item.len > 0 && item.len <= 33);

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

        uint result;
        uint 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 (uint) {
        // one byte prefix
        require(item.len == 33);

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

        return result;
    }

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

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

        uint 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 (uint) {
        if (item.len == 0) return 0;

        uint count = 0;
        uint currPtr = item.memPtr + _payloadOffset(item.memPtr);
        uint 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(uint memPtr) private pure returns (uint) {
        uint itemLen;
        uint 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(uint memPtr) private pure returns (uint) {
        uint 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(uint src, uint dest, uint 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
        uint 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))
        }
    }
}

File 7 of 13 : IERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155Upgradeable is IERC165Upgradeable {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

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

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
    /**
     * @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 9 of 13 : IERC165Upgradeable.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 IERC165Upgradeable {
    /**
     * @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);
}

File 10 of 13 : 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);
}

File 11 of 13 : FxBaseRootTunnel.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {RLPReader} from "@maticnetwork/fx-portal/contracts/lib/RLPReader.sol";
import {MerklePatriciaProof} from "@maticnetwork/fx-portal/contracts/lib/MerklePatriciaProof.sol";
import {Merkle} from "@maticnetwork/fx-portal/contracts/lib/Merkle.sol";
import "@maticnetwork/fx-portal/contracts/lib/ExitPayloadReader.sol";

/// @title FxBaseRootTunnel
/// @author @maticnetwork
/// @notice This contract is copied from @maticnetwork/fx-portal
/// @dev The only change was to make setFxChildTunnel() virtual

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 virtual {
        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;
}

File 12 of 13 : NftOwnership.sol
//SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.9;

import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";

interface IPunk {
    function punkIndexToAddress(uint256 index) external view returns (address);
}

/// @dev This is a library for other contracts to use that need to verify ownership of an NFT on the current chain.
/// Since this only has internal functions, it will be inlined into the calling contract at
/// compile time and does not need to be separately deployed on chain.
library NftOwnership {
    /// @dev For the specified NFT, verify it is owned by the potential owner
    function _verifyOwnership(
        address nftContractAddress,
        uint256 nftId,
        address potentialOwner
    ) internal view returns (bool) {
        // Try ERC1155
        try
            IERC1155Upgradeable(nftContractAddress).balanceOf(
                potentialOwner,
                nftId
            )
        returns (uint256 balance) {
            return balance > 0;
        } catch {
            // Ignore error
        }

        // Try ERC721
        try IERC721Upgradeable(nftContractAddress).ownerOf(nftId) returns (
            address foundOwner
        ) {
            return foundOwner == potentialOwner;
        } catch {
            // Ignore error
        }

        // Try CryptoPunk
        try IPunk(nftContractAddress).punkIndexToAddress(nftId) returns (
            address foundOwner
        ) {
            return foundOwner == potentialOwner;
        } catch {
            // Ignore error
        }

        return false;
    }
}

File 13 of 13 : Royalties.sol
//SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.9;

import "@manifoldxyz/royalty-registry-solidity/contracts/IRoyaltyEngineV1.sol";

/// @dev This library uses the Royalty Registry to see if royalties are configured for a specified NFT.
/// The Royalty Registry looks at a number of sources to see if the original creator set a royalty
/// configurationon the contract, such as EIP-2981, Manifold, Rarible, etc.
/// See https://royaltyregistry.xyz/ for more details and deployed addresses.
/// The output will be a list of addresses and a value that each should receive.
library Royalties {
    /// @dev Validate royalties addresses and amounts arrays
    function _validateRoyalties(
        address payable[] memory recipients,
        uint256[] memory amounts
    ) internal pure returns (bool) {
        // Verify royalties were found
        if (recipients.length == 0) {
            return false;
        }

        // Verify array lengths match
        if (recipients.length != amounts.length) {
            return false;
        }

        // Calculate the total rewards BP
        uint256 totalRewardsBp = 0;

        // Verify valid addresses and amounts
        for (uint8 i = 0; i < recipients.length; i++) {
            if (recipients[i] == address(0x0)) {
                return false;
            }

            if (amounts[i] == 0 || amounts[i] > 10_000) {
                return false;
            }

            totalRewardsBp += amounts[i];
        }

        // Total rewards across all addresses should not be above 100%
        if (totalRewardsBp > 10_000) {
            return false;
        }

        // No issues found, use them
        return true;
    }

    /// @dev Gets the royalties for a specified NFT and uses the fallback values if none are found
    /// A sale price of 10,000 will be used as the value to query since the protocol uses basis points
    /// to track a percentage of value to send to the creators.  (10k basis points = 100%)
    function _getRoyaltyOverride(
        address royaltyRegistry,
        address nftContractAddress,
        uint256 nftId,
        address fallbackCreator,
        uint256 fallbackCreatorBasisPoints
    )
        internal
        view
        returns (
            address[] memory creators,
            uint256[] memory creatorSaleBasisPoints
        )
    {
        // Query the royalty registry
        if (royaltyRegistry != address(0x0)) {
            // Use 10k to get back basis points
            try
                IRoyaltyEngineV1(royaltyRegistry).getRoyaltyView(
                    nftContractAddress,
                    nftId,
                    10_000
                )
            returns (
                address payable[] memory recipients,
                uint256[] memory amounts
            ) {
                // Check to see if valid results were found
                if (_validateRoyalties(recipients, amounts)) {
                    // Convert to non-payable
                    // https://github.com/ethereum/solidity/issues/5462
                    address[] memory convertedAddresses = new address[](
                        recipients.length
                    );
                    for (uint8 i = 0; i < recipients.length; i++) {
                        convertedAddresses[i] = recipients[i];
                    }

                    // Use the valid royalties
                    return (convertedAddresses, amounts);
                }
            } catch {
                // Ignore an errors
            }
        }
        // None found, use fallback address... address 0x0 means no creator rewards
        address[] memory addressesArray = new address[](1);
        addressesArray[0] = fallbackCreator;

        // Use fallback value, and ensure it is not above 100%
        require(fallbackCreatorBasisPoints <= 10_000, "Invalid bp");
        uint256[] memory creatorBasisPointsArray = new uint256[](1);
        creatorBasisPointsArray[0] = fallbackCreatorBasisPoints;

        return (addressesArray, creatorBasisPointsArray);
    }
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_checkpointManager","type":"address"},{"internalType":"address","name":"_fxRoot","type":"address"},{"internalType":"address","name":"_royaltyRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DE_REGISTER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REGISTER","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":[],"name":"checkpointManager","outputs":[{"internalType":"contract ICheckpointManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nftContractAddress","type":"address"},{"internalType":"uint256","name":"nftId","type":"uint256"}],"name":"deRegisterNft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deployer","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":"bytes32","name":"","type":"bytes32"}],"name":"processedExits","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"inputData","type":"bytes"}],"name":"receiveMessage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nftContractAddress","type":"address"},{"internalType":"uint256","name":"nftId","type":"uint256"},{"internalType":"address","name":"creatorAddress","type":"address"},{"internalType":"uint256","name":"creatorSaleBasisPoints","type":"uint256"},{"internalType":"uint256","name":"optionBits","type":"uint256"},{"internalType":"string","name":"ipfsMetadataHash","type":"string"}],"name":"registerNft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fxChildTunnel","type":"address"}],"name":"setFxChildTunnel","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620041bb380380620041bb8339818101604052810190620000379190620001b1565b828281600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050506200020d565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000179826200014c565b9050919050565b6200018b816200016c565b81146200019757600080fd5b50565b600081519050620001ab8162000180565b92915050565b600080600060608486031215620001cd57620001cc62000147565b5b6000620001dd868287016200019a565b9350506020620001f0868287016200019a565b925050604062000203868287016200019a565b9150509250925092565b613f9e806200021d6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063c0857ba011610071578063c0857ba01461017b578063c679ff9a14610199578063d5f39488146101b5578063de9b771f146101d3578063e8a28dd7146101f1578063f953cec71461020f576100b4565b80630e387de6146100b957806310325264146100d7578063607f2d42146100f5578063972c492814610125578063aea4e49e14610143578063b7d0ee431461015f575b600080fd5b6100c161022b565b6040516100ce91906126de565b60405180910390f35b6100df610252565b6040516100ec91906126de565b60405180910390f35b61010f600480360381019061010a9190612739565b610276565b60405161011c9190612781565b60405180910390f35b61012d610296565b60405161013a91906127dd565b60405180910390f35b61015d60048036038101906101589190612824565b6102bc565b005b61017960048036038101906101749190612887565b610421565b005b6101836104e4565b6040516101909190612926565b60405180910390f35b6101b360048036038101906101ae9190612a87565b61050a565b005b6101bd610611565b6040516101ca91906127dd565b60405180910390f35b6101db610637565b6040516101e89190612b51565b60405180910390f35b6101f961065b565b60405161020691906126de565b60405180910390f35b61022960048036038101906102249190612c0d565b61067f565b005b7f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03660001b81565b7ff98aef635801dfa470eae0492dd6a267cc7e32661957109ef6316bfd8bea371e81565b60036020528060005260406000206000915054906101000a900460ff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b3373ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461034c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034390612cb3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146103dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d490612d1f565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61042c828233610699565b61046b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161046290612d8b565b60405180910390fd5b60007ff98aef635801dfa470eae0492dd6a267cc7e32661957109ef6316bfd8bea371e334685856040516020016104a59493929190612dba565b6040516020818303038152906040526040516020016104c5929190612e87565b60405160208183030381529060405290506104df816108c3565b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610515868633610699565b610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b90612d8b565b60405180910390fd5b600080610586600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1689898989610975565b9150915060007f58cc5acb742fd5eb9df21407aed105abca7d37584645d014636aa13c7b7bc38733468b8b87878b8b6040516020016105cc989796959493929190613077565b6040516020818303038152906040526040516020016105ec929190612e87565b6040516020818303038152906040529050610606816108c3565b505050505050505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f58cc5acb742fd5eb9df21407aed105abca7d37584645d014636aa13c7b7bc38781565b600061068a82610ca6565b905061069581610fab565b5050565b60008373ffffffffffffffffffffffffffffffffffffffff1662fdd58e83856040518363ffffffff1660e01b81526004016106d592919061310a565b60206040518083038186803b1580156106ed57600080fd5b505afa92505050801561071e57506040513d601f19601f8201168201806040525081019061071b9190613148565b60015b61072757610733565b600081119150506108bc565b8373ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161076c9190613175565b60206040518083038186803b15801561078457600080fd5b505afa9250505080156107b557506040513d601f19601f820116820180604052508101906107b291906131a5565b60015b6107be576107f5565b8273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16149150506108bc565b8373ffffffffffffffffffffffffffffffffffffffff166358178168846040518263ffffffff1660e01b815260040161082e9190613175565b60206040518083038186803b15801561084657600080fd5b505afa92505050801561087757506040513d601f19601f8201168201806040525081019061087491906131a5565b60015b610880576108b7565b8273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16149150506108bc565b600090505b9392505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b4720477600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b81526004016109409291906131d2565b600060405180830381600087803b15801561095a57600080fd5b505af115801561096e573d6000803e3d6000fd5b5050505050565b606080600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614610b42578673ffffffffffffffffffffffffffffffffffffffff16633e10401487876127106040518463ffffffff1660e01b81526004016109eb9392919061323d565b60006040518083038186803b158015610a0357600080fd5b505afa925050508015610a3957506040513d6000823e3d601f19601f82011682018060405250810190610a36919061343d565b60015b610a4257610b41565b610a4c8282610fae565b15610b3e576000825167ffffffffffffffff811115610a6e57610a6d61295c565b5b604051908082528060200260200182016040528015610a9c5781602001602082028036833780820191505090505b50905060005b83518160ff161015610b2f57838160ff1681518110610ac457610ac36134b5565b5b6020026020010151828260ff1681518110610ae257610ae16134b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610b2790613520565b915050610aa2565b50808294509450505050610c9c565b50505b5b6000600167ffffffffffffffff811115610b5f57610b5e61295c565b5b604051908082528060200260200182016040528015610b8d5781602001602082028036833780820191505090505b5090508481600081518110610ba557610ba46134b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612710841115610c24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1b90613596565b60405180910390fd5b6000600167ffffffffffffffff811115610c4157610c4061295c565b5b604051908082528060200260200182016040528015610c6f5781602001602082028036833780820191505090505b5090508481600081518110610c8757610c866134b5565b5b60200260200101818152505081819350935050505b9550959350505050565b60606000610cb3836110fa565b90506000610cc08261112e565b90506000610ccd8361115f565b9050600081610cdb84611190565b610ce4866113a6565b604051602001610cf693929190613613565b604051602081830303815290604052805190602001209050600015156003600083815260200190815260200160002060009054906101000a900460ff16151514610d75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6c906136be565b60405180910390fd5b60016003600083815260200190815260200160002060006101000a81548160ff0219169083151502179055506000610dac856113d7565b90506000610db9826114fc565b9050610dc481611573565b73ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4a90613750565b60405180910390fd5b6000610e5e876115a4565b9050610e7c610e6c846115d8565b87610e768a6115e6565b84611617565b610ebb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eb2906137e2565b60405180910390fd5b610ee985610ec88961191d565b610ed18a61194e565b84610edb8c611982565b610ee48d6119b3565b6119e4565b506000610ef583611b3a565b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03660001b610f37610f32600084611b7f90919063ffffffff16565b611bae565b60001b14610f7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f719061384e565b60405180910390fd5b6000610f8584611c31565b806020019051810190610f9891906138de565b9050809950505050505050505050919050565b50565b60008083511415610fc257600090506110f4565b8151835114610fd457600090506110f4565b6000805b84518160ff1610156110d957600073ffffffffffffffffffffffffffffffffffffffff16858260ff1681518110611012576110116134b5565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415611041576000925050506110f4565b6000848260ff1681518110611059576110586134b5565b5b6020026020010151148061108b5750612710848260ff1681518110611081576110806134b5565b5b6020026020010151115b1561109b576000925050506110f4565b838160ff16815181106110b1576110b06134b5565b5b6020026020010151826110c49190613927565b915080806110d190613520565b915050610fd8565b506127108111156110ee5760009150506110f4565b60019150505b92915050565b611102612644565b600061111561111084611c62565b611c90565b9050604051806020016040528082815250915050919050565b6060611158826000015160088151811061114b5761114a6134b5565b5b6020026020010151611da5565b9050919050565b6000611189826000015160028151811061117c5761117b6134b5565b5b6020026020010151611bae565b9050919050565b6060600060405180602001604052806000815250905060008351111561139d576000806111be600086611e5c565b60f81c905060018160ff1614806111d8575060038160ff16145b156112a2576001600286516111ed919061397d565b6111f791906139d7565b67ffffffffffffffff8111156112105761120f61295c565b5b6040519080825280601f01601f1916602001820160405280156112425781602001600182028036833780820191505090505b5092506000611252600187611e5c565b90508084600081518110611269576112686134b5565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600192505061130e565b60028086516112b1919061397d565b6112bb91906139d7565b67ffffffffffffffff8111156112d4576112d361295c565b5b6040519080825280601f01601f1916602001820160405280156113065781602001600182028036833780820191505090505b509250600091505b60008260ff1690505b83518110156113995761134460028460ff168361133491906139d7565b61133e9190613927565b87611e5c565b848281518110611357576113566134b5565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808061139190613a0b565b915050611317565b5050505b80915050919050565b60006113d082600001516009815181106113c3576113c26134b5565b5b6020026020010151611bae565b9050919050565b6113df612657565b61140782600001516006815181106113fa576113f96134b5565b5b6020026020010151611da5565b8160200181905250600061141e8260200151611c62565b905061142981611ef4565b156114445761143781611c90565b82600001819052506114e4565b60008260200151905060006001825161145d91906139d7565b67ffffffffffffffff8111156114765761147561295c565b5b6040519080825280601f01601f1916602001820160405280156114a85781602001600182028036833780820191505090505b5090506000808360210191508260200190506114c682828551611f42565b6114d76114d284611c62565b611c90565b8660000181905250505050505b6114ed836113a6565b82604001818152505050919050565b611504612678565b600061152e8360000151600381518110611521576115206134b5565b5b6020026020010151611c90565b836040015181518110611544576115436134b5565b5b60200260200101519050604051806040016040528082815260200161156883611c90565b815250915050919050565b600061159d82602001516000815181106115905761158f6134b5565b5b6020026020010151611fdf565b9050919050565b60006115ce82600001516005815181106115c1576115c06134b5565b5b6020026020010151611bae565b60001b9050919050565b606081602001519050919050565b60606116108260000151600781518110611603576116026134b5565b5b6020026020010151611da5565b9050919050565b60008061162384611c62565b9050600061163082611c90565b905060608060008690506000806116468b611190565b9050600081511415611662576000975050505050505050611915565b60005b865181101561190c57815183111561168857600098505050505050505050611915565b6116ab87828151811061169e5761169d6134b5565b5b6020026020010151612002565b9550858051906020012084146116cc57600098505050505050505050611915565b6116ef8782815181106116e2576116e16134b5565b5b6020026020010151611c90565b94506011855114156117e257815183141561175f578c8051906020012061173086601081518110611723576117226134b5565b5b6020026020010151611da5565b80519060200120141561174e57600198505050505050505050611915565b600098505050505050505050611915565b6000828481518110611774576117736134b5565b5b602001015160f81c60f81b60f81c905060108160ff1611156117a25760009950505050505050505050611915565b6117c8868260ff16815181106117bb576117ba6134b5565b5b6020026020010151612092565b60001b94506001846117da9190613927565b9350506118f9565b6002855114156118e757600061181c61181587600081518110611808576118076134b5565b5b6020026020010151611da5565b84866120c9565b90508251818561182c9190613927565b141561188f578d8051906020012061185e87600181518110611851576118506134b5565b5b6020026020010151611da5565b80519060200120141561187d5760019950505050505050505050611915565b60009950505050505050505050611915565b60008114156118aa5760009950505050505050505050611915565b80846118b69190613927565b93506118dc866001815181106118cf576118ce6134b5565b5b6020026020010151612092565b60001b9450506118f8565b600098505050505050505050611915565b5b808061190490613a0b565b915050611665565b50505050505050505b949350505050565b6000611947826000015160038151811061193a576119396134b5565b5b6020026020010151611bae565b9050919050565b6000611978826000015160048151811061196b5761196a6134b5565b5b6020026020010151611bae565b60001b9050919050565b60006119ac826000015160008151811061199f5761199e6134b5565b5b6020026020010151611bae565b9050919050565b60606119dd82600001516001815181106119d0576119cf6134b5565b5b6020026020010151611da5565b9050919050565b600080600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166341539d4a876040518263ffffffff1660e01b8152600401611a459190613175565b60a06040518083038186803b158015611a5d57600080fd5b505afa158015611a71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a959190613a69565b5093505092509250611aeb828b611aac91906139d7565b84878d8d8d8d604051602001611ac59493929190613b05565b604051602081830303815290604052805190602001206121ff909392919063ffffffff16565b611b2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2190613b9f565b60405180910390fd5b8093505050509695505050505050565b611b42612698565b6040518060200160405280611b758460200151600181518110611b6857611b676134b5565b5b6020026020010151611c90565b8152509050919050565b611b876126ab565b82600001518281518110611b9e57611b9d6134b5565b5b6020026020010151905092915050565b6000808260000151118015611bc857506021826000015111155b611bd157600080fd5b6000611be08360200151612370565b90506000818460000151611bf491906139d7565b9050600080838660200151611c099190613927565b9050805191506020831015611c2557826020036101000a820491505b81945050505050919050565b6060611c5b8260200151600281518110611c4e57611c4d6134b5565b5b6020026020010151611da5565b9050919050565b611c6a6126ab565b600060208301905060405180604001604052808451815260200182815250915050919050565b6060611c9b82611ef4565b611ca457600080fd5b6000611caf8361242f565b905060008167ffffffffffffffff811115611ccd57611ccc61295c565b5b604051908082528060200260200182016040528015611d0657816020015b611cf36126ab565b815260200190600190039081611ceb5790505b5090506000611d188560200151612370565b8560200151611d279190613927565b9050600080600090505b84811015611d9857611d42836124bd565b9150604051806040016040528083815260200184815250848281518110611d6c57611d6b6134b5565b5b60200260200101819052508183611d839190613927565b92508080611d9090613a0b565b915050611d31565b5082945050505050919050565b60606000826000015111611db857600080fd5b6000611dc78360200151612370565b90506000818460000151611ddb91906139d7565b905060008167ffffffffffffffff811115611df957611df861295c565b5b6040519080825280601f01601f191660200182016040528015611e2b5781602001600182028036833780820191505090505b5090506000816020019050611e50848760200151611e499190613927565b8285612599565b81945050505050919050565b600080600284611e6c9190613bee565b14611eaf57601082600285611e819190613c1f565b81518110611e9257611e916134b5565b5b602001015160f81c60f81b60f81c611eaa9190613c50565b611ee9565b601082600285611ebf9190613c1f565b81518110611ed057611ecf6134b5565b5b602001015160f81c60f81b60f81c611ee89190613c81565b5b60f81b905092915050565b60008082600001511415611f0b5760009050611f3d565b60008083602001519050805160001a915060c060ff168260ff161015611f3657600092505050611f3d565b6001925050505b919050565b6000811415611f5057611fda565b5b602060ff168110611f9b5782518252602060ff1683611f709190613927565b9250602060ff1682611f829190613927565b9150602060ff1681611f9491906139d7565b9050611f51565b6000600182602060ff16611faf91906139d7565b610100611fbc9190613de5565b611fc691906139d7565b905080198451168184511681811785525050505b505050565b60006015826000015114611ff257600080fd5b611ffb82611bae565b9050919050565b60606000826000015167ffffffffffffffff8111156120245761202361295c565b5b6040519080825280601f01601f1916602001820160405280156120565781602001600182028036833780820191505090505b50905060008151141561206c578091505061208d565b60008160200190506120878460200151828660000151612599565b81925050505b919050565b600060218260000151146120a557600080fd5b600080600184602001516120b99190613927565b9050805191508192505050919050565b6000806000905060006120db86611190565b90506000815167ffffffffffffffff8111156120fa576120f961295c565b5b6040519080825280601f01601f19166020018201604052801561212c5781602001600182028036833780820191505090505b50905060008590505b8251866121429190613927565b8110156121cd57600087828151811061215e5761215d6134b5565b5b602001015160f81c60f81b90508083888461217991906139d7565b8151811061218a576121896134b5565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505080806121c590613a0b565b915050612135565b508080519060200120828051906020012014156121ed57815192506121f2565b600092505b8293505050509392505050565b600080602083516122109190613bee565b14612250576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161224790613e7c565b60405180910390fd5b6000602083516122609190613c1f565b905080600261226f9190613de5565b85106122b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122a790613ee8565b60405180910390fd5b6000808790506000602090505b8551811161235f5780860151925060006002896122da9190613bee565b14156123105781836040516020016122f3929190613f08565b60405160208183030381529060405280519060200120915061233c565b8282604051602001612323929190613f08565b6040516020818303038152906040528051906020012091505b6002886123499190613c1f565b97506020816123589190613927565b90506122bd565b508581149350505050949350505050565b600080825160001a9050608060ff1681101561239057600091505061242a565b60b860ff168110806123b5575060c060ff1681101580156123b4575060f860ff1681105b5b156123c457600191505061242a565b60c060ff168110156123ff5760018060b86123df9190613f34565b60ff16826123ed91906139d7565b6123f79190613927565b91505061242a565b60018060f861240e9190613f34565b60ff168261241c91906139d7565b6124269190613927565b9150505b919050565b6000808260000151141561244657600090506124b8565b6000806124568460200151612370565b84602001516124659190613927565b905060008460000151856020015161247d9190613927565b90505b808210156124b157612491826124bd565b8261249c9190613927565b915082806124a990613a0b565b935050612480565b8293505050505b919050565b6000806000835160001a9050608060ff168110156124de576001915061258f565b60b860ff1681101561250d576001608060ff16826124fc91906139d7565b6125069190613927565b915061258e565b60c060ff1681101561253d5760b78103600185019450806020036101000a8551046001820181019350505061258d565b60f860ff1681101561256c57600160c060ff168261255b91906139d7565b6125659190613927565b915061258c565b60f78103600185019450806020036101000a855104600182018101935050505b5b5b5b8192505050919050565b60008114156125a75761263f565b5b602060ff1681106125f25782518252602060ff16836125c79190613927565b9250602060ff16826125d99190613927565b9150602060ff16816125eb91906139d7565b90506125a8565b60008114156126005761263f565b6000600182602060ff1661261491906139d7565b6101006126219190613de5565b61262b91906139d7565b905080198451168184511681811785525050505b505050565b6040518060200160405280606081525090565b60405180606001604052806060815260200160608152602001600081525090565b604051806040016040528061268b6126ab565b8152602001606081525090565b6040518060200160405280606081525090565b604051806040016040528060008152602001600081525090565b6000819050919050565b6126d8816126c5565b82525050565b60006020820190506126f360008301846126cf565b92915050565b6000604051905090565b600080fd5b600080fd5b612716816126c5565b811461272157600080fd5b50565b6000813590506127338161270d565b92915050565b60006020828403121561274f5761274e612703565b5b600061275d84828501612724565b91505092915050565b60008115159050919050565b61277b81612766565b82525050565b60006020820190506127966000830184612772565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006127c78261279c565b9050919050565b6127d7816127bc565b82525050565b60006020820190506127f260008301846127ce565b92915050565b612801816127bc565b811461280c57600080fd5b50565b60008135905061281e816127f8565b92915050565b60006020828403121561283a57612839612703565b5b60006128488482850161280f565b91505092915050565b6000819050919050565b61286481612851565b811461286f57600080fd5b50565b6000813590506128818161285b565b92915050565b6000806040838503121561289e5761289d612703565b5b60006128ac8582860161280f565b92505060206128bd85828601612872565b9150509250929050565b6000819050919050565b60006128ec6128e76128e28461279c565b6128c7565b61279c565b9050919050565b60006128fe826128d1565b9050919050565b6000612910826128f3565b9050919050565b61292081612905565b82525050565b600060208201905061293b6000830184612917565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6129948261294b565b810181811067ffffffffffffffff821117156129b3576129b261295c565b5b80604052505050565b60006129c66126f9565b90506129d2828261298b565b919050565b600067ffffffffffffffff8211156129f2576129f161295c565b5b6129fb8261294b565b9050602081019050919050565b82818337600083830152505050565b6000612a2a612a25846129d7565b6129bc565b905082815260208101848484011115612a4657612a45612946565b5b612a51848285612a08565b509392505050565b600082601f830112612a6e57612a6d612941565b5b8135612a7e848260208601612a17565b91505092915050565b60008060008060008060c08789031215612aa457612aa3612703565b5b6000612ab289828a0161280f565b9650506020612ac389828a01612872565b9550506040612ad489828a0161280f565b9450506060612ae589828a01612872565b9350506080612af689828a01612872565b92505060a087013567ffffffffffffffff811115612b1757612b16612708565b5b612b2389828a01612a59565b9150509295509295509295565b6000612b3b826128f3565b9050919050565b612b4b81612b30565b82525050565b6000602082019050612b666000830184612b42565b92915050565b600067ffffffffffffffff821115612b8757612b8661295c565b5b612b908261294b565b9050602081019050919050565b6000612bb0612bab84612b6c565b6129bc565b905082815260208101848484011115612bcc57612bcb612946565b5b612bd7848285612a08565b509392505050565b600082601f830112612bf457612bf3612941565b5b8135612c04848260208601612b9d565b91505092915050565b600060208284031215612c2357612c22612703565b5b600082013567ffffffffffffffff811115612c4157612c40612708565b5b612c4d84828501612bdf565b91505092915050565b600082825260208201905092915050565b7f4f6e6c79206465706c6f79657200000000000000000000000000000000000000600082015250565b6000612c9d600d83612c56565b9150612ca882612c67565b602082019050919050565b60006020820190508181036000830152612ccc81612c90565b9050919050565b7f416c726561647920736574000000000000000000000000000000000000000000600082015250565b6000612d09600b83612c56565b9150612d1482612cd3565b602082019050919050565b60006020820190508181036000830152612d3881612cfc565b9050919050565b7f4e4654206e6f74206f776e656400000000000000000000000000000000000000600082015250565b6000612d75600d83612c56565b9150612d8082612d3f565b602082019050919050565b60006020820190508181036000830152612da481612d68565b9050919050565b612db481612851565b82525050565b6000608082019050612dcf60008301876127ce565b612ddc6020830186612dab565b612de960408301856127ce565b612df66060830184612dab565b95945050505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612e39578082015181840152602081019050612e1e565b83811115612e48576000848401525b50505050565b6000612e5982612dff565b612e638185612e0a565b9350612e73818560208601612e1b565b612e7c8161294b565b840191505092915050565b6000604082019050612e9c60008301856126cf565b8181036020830152612eae8184612e4e565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612eec816127bc565b82525050565b6000612efe8383612ee3565b60208301905092915050565b6000602082019050919050565b6000612f2282612eb7565b612f2c8185612ec2565b9350612f3783612ed3565b8060005b83811015612f68578151612f4f8882612ef2565b9750612f5a83612f0a565b925050600181019050612f3b565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612faa81612851565b82525050565b6000612fbc8383612fa1565b60208301905092915050565b6000602082019050919050565b6000612fe082612f75565b612fea8185612f80565b9350612ff583612f91565b8060005b8381101561302657815161300d8882612fb0565b975061301883612fc8565b925050600181019050612ff9565b5085935050505092915050565b600081519050919050565b600061304982613033565b6130538185612c56565b9350613063818560208601612e1b565b61306c8161294b565b840191505092915050565b60006101008201905061308d600083018b6127ce565b61309a602083018a612dab565b6130a760408301896127ce565b6130b46060830188612dab565b81810360808301526130c68187612f17565b905081810360a08301526130da8186612fd5565b90506130e960c0830185612dab565b81810360e08301526130fb818461303e565b90509998505050505050505050565b600060408201905061311f60008301856127ce565b61312c6020830184612dab565b9392505050565b6000815190506131428161285b565b92915050565b60006020828403121561315e5761315d612703565b5b600061316c84828501613133565b91505092915050565b600060208201905061318a6000830184612dab565b92915050565b60008151905061319f816127f8565b92915050565b6000602082840312156131bb576131ba612703565b5b60006131c984828501613190565b91505092915050565b60006040820190506131e760008301856127ce565b81810360208301526131f98184612e4e565b90509392505050565b6000819050919050565b600061322761322261321d84613202565b6128c7565b612851565b9050919050565b6132378161320c565b82525050565b600060608201905061325260008301866127ce565b61325f6020830185612dab565b61326c604083018461322e565b949350505050565b600067ffffffffffffffff82111561328f5761328e61295c565b5b602082029050602081019050919050565b600080fd5b60006132b08261279c565b9050919050565b6132c0816132a5565b81146132cb57600080fd5b50565b6000815190506132dd816132b7565b92915050565b60006132f66132f184613274565b6129bc565b90508083825260208201905060208402830185811115613319576133186132a0565b5b835b81811015613342578061332e88826132ce565b84526020840193505060208101905061331b565b5050509392505050565b600082601f83011261336157613360612941565b5b81516133718482602086016132e3565b91505092915050565b600067ffffffffffffffff8211156133955761339461295c565b5b602082029050602081019050919050565b60006133b96133b48461337a565b6129bc565b905080838252602082019050602084028301858111156133dc576133db6132a0565b5b835b8181101561340557806133f18882613133565b8452602084019350506020810190506133de565b5050509392505050565b600082601f83011261342457613423612941565b5b81516134348482602086016133a6565b91505092915050565b6000806040838503121561345457613453612703565b5b600083015167ffffffffffffffff81111561347257613471612708565b5b61347e8582860161334c565b925050602083015167ffffffffffffffff81111561349f5761349e612708565b5b6134ab8582860161340f565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060ff82169050919050565b600061352b82613513565b915060ff82141561353f5761353e6134e4565b5b600182019050919050565b7f496e76616c696420627000000000000000000000000000000000000000000000600082015250565b6000613580600a83612c56565b915061358b8261354a565b602082019050919050565b600060208201905081810360008301526135af81613573565b9050919050565b6000819050919050565b6135d16135cc82612851565b6135b6565b82525050565b600081905092915050565b60006135ed82612dff565b6135f781856135d7565b9350613607818560208601612e1b565b80840191505092915050565b600061361f82866135c0565b60208201915061362f82856135e2565b915061363b82846135c0565b602082019150819050949350505050565b7f4678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434560008201527f5353454400000000000000000000000000000000000000000000000000000000602082015250565b60006136a8602483612c56565b91506136b38261364c565b604082019050919050565b600060208201905081810360008301526136d78161369b565b9050919050565b7f4678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f5460008201527f554e4e454c000000000000000000000000000000000000000000000000000000602082015250565b600061373a602583612c56565b9150613745826136de565b604082019050919050565b600060208201905081810360008301526137698161372d565b9050919050565b7f4678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f505260008201527f4f4f460000000000000000000000000000000000000000000000000000000000602082015250565b60006137cc602383612c56565b91506137d782613770565b604082019050919050565b600060208201905081810360008301526137fb816137bf565b9050919050565b7f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e415455524500600082015250565b6000613838601f83612c56565b915061384382613802565b602082019050919050565b600060208201905081810360008301526138678161382b565b9050919050565b600061388161387c84612b6c565b6129bc565b90508281526020810184848401111561389d5761389c612946565b5b6138a8848285612e1b565b509392505050565b600082601f8301126138c5576138c4612941565b5b81516138d584826020860161386e565b91505092915050565b6000602082840312156138f4576138f3612703565b5b600082015167ffffffffffffffff81111561391257613911612708565b5b61391e848285016138b0565b91505092915050565b600061393282612851565b915061393d83612851565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613972576139716134e4565b5b828201905092915050565b600061398882612851565b915061399383612851565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156139cc576139cb6134e4565b5b828202905092915050565b60006139e282612851565b91506139ed83612851565b925082821015613a00576139ff6134e4565b5b828203905092915050565b6000613a1682612851565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a4957613a486134e4565b5b600182019050919050565b600081519050613a638161270d565b92915050565b600080600080600060a08688031215613a8557613a84612703565b5b6000613a9388828901613a54565b9550506020613aa488828901613133565b9450506040613ab588828901613133565b9350506060613ac688828901613133565b9250506080613ad788828901613190565b9150509295509295909350565b6000819050919050565b613aff613afa826126c5565b613ae4565b82525050565b6000613b1182876135c0565b602082019150613b2182866135c0565b602082019150613b318285613aee565b602082019150613b418284613aee565b60208201915081905095945050505050565b7f4678526f6f7454756e6e656c3a20494e56414c49445f48454144455200000000600082015250565b6000613b89601c83612c56565b9150613b9482613b53565b602082019050919050565b60006020820190508181036000830152613bb881613b7c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613bf982612851565b9150613c0483612851565b925082613c1457613c13613bbf565b5b828206905092915050565b6000613c2a82612851565b9150613c3583612851565b925082613c4557613c44613bbf565b5b828204905092915050565b6000613c5b82613513565b9150613c6683613513565b925082613c7657613c75613bbf565b5b828206905092915050565b6000613c8c82613513565b9150613c9783613513565b925082613ca757613ca6613bbf565b5b828204905092915050565b60008160011c9050919050565b6000808291508390505b6001851115613d0957808604811115613ce557613ce46134e4565b5b6001851615613cf45780820291505b8081029050613d0285613cb2565b9450613cc9565b94509492505050565b600082613d225760019050613dde565b81613d305760009050613dde565b8160018114613d465760028114613d5057613d7f565b6001915050613dde565b60ff841115613d6257613d616134e4565b5b8360020a915084821115613d7957613d786134e4565b5b50613dde565b5060208310610133831016604e8410600b8410161715613db45782820a905083811115613daf57613dae6134e4565b5b613dde565b613dc18484846001613cbf565b92509050818404811115613dd857613dd76134e4565b5b81810290505b9392505050565b6000613df082612851565b9150613dfb83612851565b9250613e287fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484613d12565b905092915050565b7f496e76616c69642070726f6f66206c656e677468000000000000000000000000600082015250565b6000613e66601483612c56565b9150613e7182613e30565b602082019050919050565b60006020820190508181036000830152613e9581613e59565b9050919050565b7f4c65616620696e64657820697320746f6f206269670000000000000000000000600082015250565b6000613ed2601583612c56565b9150613edd82613e9c565b602082019050919050565b60006020820190508181036000830152613f0181613ec5565b9050919050565b6000613f148285613aee565b602082019150613f248284613aee565b6020820191508190509392505050565b6000613f3f82613513565b9150613f4a83613513565b925082821015613f5d57613f5c6134e4565b5b82820390509291505056fea26469706673582212207632d4088aeee4b020a674429d20959bf13acfff284e0c83442f7d002ea2dceb64736f6c6343000809003300000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a20000000000000000000000000385603ab55642cb4dd5de3ae9e306809991804f

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063c0857ba011610071578063c0857ba01461017b578063c679ff9a14610199578063d5f39488146101b5578063de9b771f146101d3578063e8a28dd7146101f1578063f953cec71461020f576100b4565b80630e387de6146100b957806310325264146100d7578063607f2d42146100f5578063972c492814610125578063aea4e49e14610143578063b7d0ee431461015f575b600080fd5b6100c161022b565b6040516100ce91906126de565b60405180910390f35b6100df610252565b6040516100ec91906126de565b60405180910390f35b61010f600480360381019061010a9190612739565b610276565b60405161011c9190612781565b60405180910390f35b61012d610296565b60405161013a91906127dd565b60405180910390f35b61015d60048036038101906101589190612824565b6102bc565b005b61017960048036038101906101749190612887565b610421565b005b6101836104e4565b6040516101909190612926565b60405180910390f35b6101b360048036038101906101ae9190612a87565b61050a565b005b6101bd610611565b6040516101ca91906127dd565b60405180910390f35b6101db610637565b6040516101e89190612b51565b60405180910390f35b6101f961065b565b60405161020691906126de565b60405180910390f35b61022960048036038101906102249190612c0d565b61067f565b005b7f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03660001b81565b7ff98aef635801dfa470eae0492dd6a267cc7e32661957109ef6316bfd8bea371e81565b60036020528060005260406000206000915054906101000a900460ff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b3373ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461034c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034390612cb3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146103dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d490612d1f565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61042c828233610699565b61046b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161046290612d8b565b60405180910390fd5b60007ff98aef635801dfa470eae0492dd6a267cc7e32661957109ef6316bfd8bea371e334685856040516020016104a59493929190612dba565b6040516020818303038152906040526040516020016104c5929190612e87565b60405160208183030381529060405290506104df816108c3565b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610515868633610699565b610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b90612d8b565b60405180910390fd5b600080610586600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1689898989610975565b9150915060007f58cc5acb742fd5eb9df21407aed105abca7d37584645d014636aa13c7b7bc38733468b8b87878b8b6040516020016105cc989796959493929190613077565b6040516020818303038152906040526040516020016105ec929190612e87565b6040516020818303038152906040529050610606816108c3565b505050505050505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f58cc5acb742fd5eb9df21407aed105abca7d37584645d014636aa13c7b7bc38781565b600061068a82610ca6565b905061069581610fab565b5050565b60008373ffffffffffffffffffffffffffffffffffffffff1662fdd58e83856040518363ffffffff1660e01b81526004016106d592919061310a565b60206040518083038186803b1580156106ed57600080fd5b505afa92505050801561071e57506040513d601f19601f8201168201806040525081019061071b9190613148565b60015b61072757610733565b600081119150506108bc565b8373ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161076c9190613175565b60206040518083038186803b15801561078457600080fd5b505afa9250505080156107b557506040513d601f19601f820116820180604052508101906107b291906131a5565b60015b6107be576107f5565b8273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16149150506108bc565b8373ffffffffffffffffffffffffffffffffffffffff166358178168846040518263ffffffff1660e01b815260040161082e9190613175565b60206040518083038186803b15801561084657600080fd5b505afa92505050801561087757506040513d601f19601f8201168201806040525081019061087491906131a5565b60015b610880576108b7565b8273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16149150506108bc565b600090505b9392505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b4720477600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b81526004016109409291906131d2565b600060405180830381600087803b15801561095a57600080fd5b505af115801561096e573d6000803e3d6000fd5b5050505050565b606080600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614610b42578673ffffffffffffffffffffffffffffffffffffffff16633e10401487876127106040518463ffffffff1660e01b81526004016109eb9392919061323d565b60006040518083038186803b158015610a0357600080fd5b505afa925050508015610a3957506040513d6000823e3d601f19601f82011682018060405250810190610a36919061343d565b60015b610a4257610b41565b610a4c8282610fae565b15610b3e576000825167ffffffffffffffff811115610a6e57610a6d61295c565b5b604051908082528060200260200182016040528015610a9c5781602001602082028036833780820191505090505b50905060005b83518160ff161015610b2f57838160ff1681518110610ac457610ac36134b5565b5b6020026020010151828260ff1681518110610ae257610ae16134b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610b2790613520565b915050610aa2565b50808294509450505050610c9c565b50505b5b6000600167ffffffffffffffff811115610b5f57610b5e61295c565b5b604051908082528060200260200182016040528015610b8d5781602001602082028036833780820191505090505b5090508481600081518110610ba557610ba46134b5565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612710841115610c24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1b90613596565b60405180910390fd5b6000600167ffffffffffffffff811115610c4157610c4061295c565b5b604051908082528060200260200182016040528015610c6f5781602001602082028036833780820191505090505b5090508481600081518110610c8757610c866134b5565b5b60200260200101818152505081819350935050505b9550959350505050565b60606000610cb3836110fa565b90506000610cc08261112e565b90506000610ccd8361115f565b9050600081610cdb84611190565b610ce4866113a6565b604051602001610cf693929190613613565b604051602081830303815290604052805190602001209050600015156003600083815260200190815260200160002060009054906101000a900460ff16151514610d75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6c906136be565b60405180910390fd5b60016003600083815260200190815260200160002060006101000a81548160ff0219169083151502179055506000610dac856113d7565b90506000610db9826114fc565b9050610dc481611573565b73ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4a90613750565b60405180910390fd5b6000610e5e876115a4565b9050610e7c610e6c846115d8565b87610e768a6115e6565b84611617565b610ebb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eb2906137e2565b60405180910390fd5b610ee985610ec88961191d565b610ed18a61194e565b84610edb8c611982565b610ee48d6119b3565b6119e4565b506000610ef583611b3a565b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03660001b610f37610f32600084611b7f90919063ffffffff16565b611bae565b60001b14610f7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f719061384e565b60405180910390fd5b6000610f8584611c31565b806020019051810190610f9891906138de565b9050809950505050505050505050919050565b50565b60008083511415610fc257600090506110f4565b8151835114610fd457600090506110f4565b6000805b84518160ff1610156110d957600073ffffffffffffffffffffffffffffffffffffffff16858260ff1681518110611012576110116134b5565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415611041576000925050506110f4565b6000848260ff1681518110611059576110586134b5565b5b6020026020010151148061108b5750612710848260ff1681518110611081576110806134b5565b5b6020026020010151115b1561109b576000925050506110f4565b838160ff16815181106110b1576110b06134b5565b5b6020026020010151826110c49190613927565b915080806110d190613520565b915050610fd8565b506127108111156110ee5760009150506110f4565b60019150505b92915050565b611102612644565b600061111561111084611c62565b611c90565b9050604051806020016040528082815250915050919050565b6060611158826000015160088151811061114b5761114a6134b5565b5b6020026020010151611da5565b9050919050565b6000611189826000015160028151811061117c5761117b6134b5565b5b6020026020010151611bae565b9050919050565b6060600060405180602001604052806000815250905060008351111561139d576000806111be600086611e5c565b60f81c905060018160ff1614806111d8575060038160ff16145b156112a2576001600286516111ed919061397d565b6111f791906139d7565b67ffffffffffffffff8111156112105761120f61295c565b5b6040519080825280601f01601f1916602001820160405280156112425781602001600182028036833780820191505090505b5092506000611252600187611e5c565b90508084600081518110611269576112686134b5565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600192505061130e565b60028086516112b1919061397d565b6112bb91906139d7565b67ffffffffffffffff8111156112d4576112d361295c565b5b6040519080825280601f01601f1916602001820160405280156113065781602001600182028036833780820191505090505b509250600091505b60008260ff1690505b83518110156113995761134460028460ff168361133491906139d7565b61133e9190613927565b87611e5c565b848281518110611357576113566134b5565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808061139190613a0b565b915050611317565b5050505b80915050919050565b60006113d082600001516009815181106113c3576113c26134b5565b5b6020026020010151611bae565b9050919050565b6113df612657565b61140782600001516006815181106113fa576113f96134b5565b5b6020026020010151611da5565b8160200181905250600061141e8260200151611c62565b905061142981611ef4565b156114445761143781611c90565b82600001819052506114e4565b60008260200151905060006001825161145d91906139d7565b67ffffffffffffffff8111156114765761147561295c565b5b6040519080825280601f01601f1916602001820160405280156114a85781602001600182028036833780820191505090505b5090506000808360210191508260200190506114c682828551611f42565b6114d76114d284611c62565b611c90565b8660000181905250505050505b6114ed836113a6565b82604001818152505050919050565b611504612678565b600061152e8360000151600381518110611521576115206134b5565b5b6020026020010151611c90565b836040015181518110611544576115436134b5565b5b60200260200101519050604051806040016040528082815260200161156883611c90565b815250915050919050565b600061159d82602001516000815181106115905761158f6134b5565b5b6020026020010151611fdf565b9050919050565b60006115ce82600001516005815181106115c1576115c06134b5565b5b6020026020010151611bae565b60001b9050919050565b606081602001519050919050565b60606116108260000151600781518110611603576116026134b5565b5b6020026020010151611da5565b9050919050565b60008061162384611c62565b9050600061163082611c90565b905060608060008690506000806116468b611190565b9050600081511415611662576000975050505050505050611915565b60005b865181101561190c57815183111561168857600098505050505050505050611915565b6116ab87828151811061169e5761169d6134b5565b5b6020026020010151612002565b9550858051906020012084146116cc57600098505050505050505050611915565b6116ef8782815181106116e2576116e16134b5565b5b6020026020010151611c90565b94506011855114156117e257815183141561175f578c8051906020012061173086601081518110611723576117226134b5565b5b6020026020010151611da5565b80519060200120141561174e57600198505050505050505050611915565b600098505050505050505050611915565b6000828481518110611774576117736134b5565b5b602001015160f81c60f81b60f81c905060108160ff1611156117a25760009950505050505050505050611915565b6117c8868260ff16815181106117bb576117ba6134b5565b5b6020026020010151612092565b60001b94506001846117da9190613927565b9350506118f9565b6002855114156118e757600061181c61181587600081518110611808576118076134b5565b5b6020026020010151611da5565b84866120c9565b90508251818561182c9190613927565b141561188f578d8051906020012061185e87600181518110611851576118506134b5565b5b6020026020010151611da5565b80519060200120141561187d5760019950505050505050505050611915565b60009950505050505050505050611915565b60008114156118aa5760009950505050505050505050611915565b80846118b69190613927565b93506118dc866001815181106118cf576118ce6134b5565b5b6020026020010151612092565b60001b9450506118f8565b600098505050505050505050611915565b5b808061190490613a0b565b915050611665565b50505050505050505b949350505050565b6000611947826000015160038151811061193a576119396134b5565b5b6020026020010151611bae565b9050919050565b6000611978826000015160048151811061196b5761196a6134b5565b5b6020026020010151611bae565b60001b9050919050565b60006119ac826000015160008151811061199f5761199e6134b5565b5b6020026020010151611bae565b9050919050565b60606119dd82600001516001815181106119d0576119cf6134b5565b5b6020026020010151611da5565b9050919050565b600080600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166341539d4a876040518263ffffffff1660e01b8152600401611a459190613175565b60a06040518083038186803b158015611a5d57600080fd5b505afa158015611a71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a959190613a69565b5093505092509250611aeb828b611aac91906139d7565b84878d8d8d8d604051602001611ac59493929190613b05565b604051602081830303815290604052805190602001206121ff909392919063ffffffff16565b611b2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2190613b9f565b60405180910390fd5b8093505050509695505050505050565b611b42612698565b6040518060200160405280611b758460200151600181518110611b6857611b676134b5565b5b6020026020010151611c90565b8152509050919050565b611b876126ab565b82600001518281518110611b9e57611b9d6134b5565b5b6020026020010151905092915050565b6000808260000151118015611bc857506021826000015111155b611bd157600080fd5b6000611be08360200151612370565b90506000818460000151611bf491906139d7565b9050600080838660200151611c099190613927565b9050805191506020831015611c2557826020036101000a820491505b81945050505050919050565b6060611c5b8260200151600281518110611c4e57611c4d6134b5565b5b6020026020010151611da5565b9050919050565b611c6a6126ab565b600060208301905060405180604001604052808451815260200182815250915050919050565b6060611c9b82611ef4565b611ca457600080fd5b6000611caf8361242f565b905060008167ffffffffffffffff811115611ccd57611ccc61295c565b5b604051908082528060200260200182016040528015611d0657816020015b611cf36126ab565b815260200190600190039081611ceb5790505b5090506000611d188560200151612370565b8560200151611d279190613927565b9050600080600090505b84811015611d9857611d42836124bd565b9150604051806040016040528083815260200184815250848281518110611d6c57611d6b6134b5565b5b60200260200101819052508183611d839190613927565b92508080611d9090613a0b565b915050611d31565b5082945050505050919050565b60606000826000015111611db857600080fd5b6000611dc78360200151612370565b90506000818460000151611ddb91906139d7565b905060008167ffffffffffffffff811115611df957611df861295c565b5b6040519080825280601f01601f191660200182016040528015611e2b5781602001600182028036833780820191505090505b5090506000816020019050611e50848760200151611e499190613927565b8285612599565b81945050505050919050565b600080600284611e6c9190613bee565b14611eaf57601082600285611e819190613c1f565b81518110611e9257611e916134b5565b5b602001015160f81c60f81b60f81c611eaa9190613c50565b611ee9565b601082600285611ebf9190613c1f565b81518110611ed057611ecf6134b5565b5b602001015160f81c60f81b60f81c611ee89190613c81565b5b60f81b905092915050565b60008082600001511415611f0b5760009050611f3d565b60008083602001519050805160001a915060c060ff168260ff161015611f3657600092505050611f3d565b6001925050505b919050565b6000811415611f5057611fda565b5b602060ff168110611f9b5782518252602060ff1683611f709190613927565b9250602060ff1682611f829190613927565b9150602060ff1681611f9491906139d7565b9050611f51565b6000600182602060ff16611faf91906139d7565b610100611fbc9190613de5565b611fc691906139d7565b905080198451168184511681811785525050505b505050565b60006015826000015114611ff257600080fd5b611ffb82611bae565b9050919050565b60606000826000015167ffffffffffffffff8111156120245761202361295c565b5b6040519080825280601f01601f1916602001820160405280156120565781602001600182028036833780820191505090505b50905060008151141561206c578091505061208d565b60008160200190506120878460200151828660000151612599565b81925050505b919050565b600060218260000151146120a557600080fd5b600080600184602001516120b99190613927565b9050805191508192505050919050565b6000806000905060006120db86611190565b90506000815167ffffffffffffffff8111156120fa576120f961295c565b5b6040519080825280601f01601f19166020018201604052801561212c5781602001600182028036833780820191505090505b50905060008590505b8251866121429190613927565b8110156121cd57600087828151811061215e5761215d6134b5565b5b602001015160f81c60f81b90508083888461217991906139d7565b8151811061218a576121896134b5565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505080806121c590613a0b565b915050612135565b508080519060200120828051906020012014156121ed57815192506121f2565b600092505b8293505050509392505050565b600080602083516122109190613bee565b14612250576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161224790613e7c565b60405180910390fd5b6000602083516122609190613c1f565b905080600261226f9190613de5565b85106122b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122a790613ee8565b60405180910390fd5b6000808790506000602090505b8551811161235f5780860151925060006002896122da9190613bee565b14156123105781836040516020016122f3929190613f08565b60405160208183030381529060405280519060200120915061233c565b8282604051602001612323929190613f08565b6040516020818303038152906040528051906020012091505b6002886123499190613c1f565b97506020816123589190613927565b90506122bd565b508581149350505050949350505050565b600080825160001a9050608060ff1681101561239057600091505061242a565b60b860ff168110806123b5575060c060ff1681101580156123b4575060f860ff1681105b5b156123c457600191505061242a565b60c060ff168110156123ff5760018060b86123df9190613f34565b60ff16826123ed91906139d7565b6123f79190613927565b91505061242a565b60018060f861240e9190613f34565b60ff168261241c91906139d7565b6124269190613927565b9150505b919050565b6000808260000151141561244657600090506124b8565b6000806124568460200151612370565b84602001516124659190613927565b905060008460000151856020015161247d9190613927565b90505b808210156124b157612491826124bd565b8261249c9190613927565b915082806124a990613a0b565b935050612480565b8293505050505b919050565b6000806000835160001a9050608060ff168110156124de576001915061258f565b60b860ff1681101561250d576001608060ff16826124fc91906139d7565b6125069190613927565b915061258e565b60c060ff1681101561253d5760b78103600185019450806020036101000a8551046001820181019350505061258d565b60f860ff1681101561256c57600160c060ff168261255b91906139d7565b6125659190613927565b915061258c565b60f78103600185019450806020036101000a855104600182018101935050505b5b5b5b8192505050919050565b60008114156125a75761263f565b5b602060ff1681106125f25782518252602060ff16836125c79190613927565b9250602060ff16826125d99190613927565b9150602060ff16816125eb91906139d7565b90506125a8565b60008114156126005761263f565b6000600182602060ff1661261491906139d7565b6101006126219190613de5565b61262b91906139d7565b905080198451168184511681811785525050505b505050565b6040518060200160405280606081525090565b60405180606001604052806060815260200160608152602001600081525090565b604051806040016040528061268b6126ab565b8152602001606081525090565b6040518060200160405280606081525090565b604051806040016040528060008152602001600081525090565b6000819050919050565b6126d8816126c5565b82525050565b60006020820190506126f360008301846126cf565b92915050565b6000604051905090565b600080fd5b600080fd5b612716816126c5565b811461272157600080fd5b50565b6000813590506127338161270d565b92915050565b60006020828403121561274f5761274e612703565b5b600061275d84828501612724565b91505092915050565b60008115159050919050565b61277b81612766565b82525050565b60006020820190506127966000830184612772565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006127c78261279c565b9050919050565b6127d7816127bc565b82525050565b60006020820190506127f260008301846127ce565b92915050565b612801816127bc565b811461280c57600080fd5b50565b60008135905061281e816127f8565b92915050565b60006020828403121561283a57612839612703565b5b60006128488482850161280f565b91505092915050565b6000819050919050565b61286481612851565b811461286f57600080fd5b50565b6000813590506128818161285b565b92915050565b6000806040838503121561289e5761289d612703565b5b60006128ac8582860161280f565b92505060206128bd85828601612872565b9150509250929050565b6000819050919050565b60006128ec6128e76128e28461279c565b6128c7565b61279c565b9050919050565b60006128fe826128d1565b9050919050565b6000612910826128f3565b9050919050565b61292081612905565b82525050565b600060208201905061293b6000830184612917565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6129948261294b565b810181811067ffffffffffffffff821117156129b3576129b261295c565b5b80604052505050565b60006129c66126f9565b90506129d2828261298b565b919050565b600067ffffffffffffffff8211156129f2576129f161295c565b5b6129fb8261294b565b9050602081019050919050565b82818337600083830152505050565b6000612a2a612a25846129d7565b6129bc565b905082815260208101848484011115612a4657612a45612946565b5b612a51848285612a08565b509392505050565b600082601f830112612a6e57612a6d612941565b5b8135612a7e848260208601612a17565b91505092915050565b60008060008060008060c08789031215612aa457612aa3612703565b5b6000612ab289828a0161280f565b9650506020612ac389828a01612872565b9550506040612ad489828a0161280f565b9450506060612ae589828a01612872565b9350506080612af689828a01612872565b92505060a087013567ffffffffffffffff811115612b1757612b16612708565b5b612b2389828a01612a59565b9150509295509295509295565b6000612b3b826128f3565b9050919050565b612b4b81612b30565b82525050565b6000602082019050612b666000830184612b42565b92915050565b600067ffffffffffffffff821115612b8757612b8661295c565b5b612b908261294b565b9050602081019050919050565b6000612bb0612bab84612b6c565b6129bc565b905082815260208101848484011115612bcc57612bcb612946565b5b612bd7848285612a08565b509392505050565b600082601f830112612bf457612bf3612941565b5b8135612c04848260208601612b9d565b91505092915050565b600060208284031215612c2357612c22612703565b5b600082013567ffffffffffffffff811115612c4157612c40612708565b5b612c4d84828501612bdf565b91505092915050565b600082825260208201905092915050565b7f4f6e6c79206465706c6f79657200000000000000000000000000000000000000600082015250565b6000612c9d600d83612c56565b9150612ca882612c67565b602082019050919050565b60006020820190508181036000830152612ccc81612c90565b9050919050565b7f416c726561647920736574000000000000000000000000000000000000000000600082015250565b6000612d09600b83612c56565b9150612d1482612cd3565b602082019050919050565b60006020820190508181036000830152612d3881612cfc565b9050919050565b7f4e4654206e6f74206f776e656400000000000000000000000000000000000000600082015250565b6000612d75600d83612c56565b9150612d8082612d3f565b602082019050919050565b60006020820190508181036000830152612da481612d68565b9050919050565b612db481612851565b82525050565b6000608082019050612dcf60008301876127ce565b612ddc6020830186612dab565b612de960408301856127ce565b612df66060830184612dab565b95945050505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612e39578082015181840152602081019050612e1e565b83811115612e48576000848401525b50505050565b6000612e5982612dff565b612e638185612e0a565b9350612e73818560208601612e1b565b612e7c8161294b565b840191505092915050565b6000604082019050612e9c60008301856126cf565b8181036020830152612eae8184612e4e565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612eec816127bc565b82525050565b6000612efe8383612ee3565b60208301905092915050565b6000602082019050919050565b6000612f2282612eb7565b612f2c8185612ec2565b9350612f3783612ed3565b8060005b83811015612f68578151612f4f8882612ef2565b9750612f5a83612f0a565b925050600181019050612f3b565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612faa81612851565b82525050565b6000612fbc8383612fa1565b60208301905092915050565b6000602082019050919050565b6000612fe082612f75565b612fea8185612f80565b9350612ff583612f91565b8060005b8381101561302657815161300d8882612fb0565b975061301883612fc8565b925050600181019050612ff9565b5085935050505092915050565b600081519050919050565b600061304982613033565b6130538185612c56565b9350613063818560208601612e1b565b61306c8161294b565b840191505092915050565b60006101008201905061308d600083018b6127ce565b61309a602083018a612dab565b6130a760408301896127ce565b6130b46060830188612dab565b81810360808301526130c68187612f17565b905081810360a08301526130da8186612fd5565b90506130e960c0830185612dab565b81810360e08301526130fb818461303e565b90509998505050505050505050565b600060408201905061311f60008301856127ce565b61312c6020830184612dab565b9392505050565b6000815190506131428161285b565b92915050565b60006020828403121561315e5761315d612703565b5b600061316c84828501613133565b91505092915050565b600060208201905061318a6000830184612dab565b92915050565b60008151905061319f816127f8565b92915050565b6000602082840312156131bb576131ba612703565b5b60006131c984828501613190565b91505092915050565b60006040820190506131e760008301856127ce565b81810360208301526131f98184612e4e565b90509392505050565b6000819050919050565b600061322761322261321d84613202565b6128c7565b612851565b9050919050565b6132378161320c565b82525050565b600060608201905061325260008301866127ce565b61325f6020830185612dab565b61326c604083018461322e565b949350505050565b600067ffffffffffffffff82111561328f5761328e61295c565b5b602082029050602081019050919050565b600080fd5b60006132b08261279c565b9050919050565b6132c0816132a5565b81146132cb57600080fd5b50565b6000815190506132dd816132b7565b92915050565b60006132f66132f184613274565b6129bc565b90508083825260208201905060208402830185811115613319576133186132a0565b5b835b81811015613342578061332e88826132ce565b84526020840193505060208101905061331b565b5050509392505050565b600082601f83011261336157613360612941565b5b81516133718482602086016132e3565b91505092915050565b600067ffffffffffffffff8211156133955761339461295c565b5b602082029050602081019050919050565b60006133b96133b48461337a565b6129bc565b905080838252602082019050602084028301858111156133dc576133db6132a0565b5b835b8181101561340557806133f18882613133565b8452602084019350506020810190506133de565b5050509392505050565b600082601f83011261342457613423612941565b5b81516134348482602086016133a6565b91505092915050565b6000806040838503121561345457613453612703565b5b600083015167ffffffffffffffff81111561347257613471612708565b5b61347e8582860161334c565b925050602083015167ffffffffffffffff81111561349f5761349e612708565b5b6134ab8582860161340f565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060ff82169050919050565b600061352b82613513565b915060ff82141561353f5761353e6134e4565b5b600182019050919050565b7f496e76616c696420627000000000000000000000000000000000000000000000600082015250565b6000613580600a83612c56565b915061358b8261354a565b602082019050919050565b600060208201905081810360008301526135af81613573565b9050919050565b6000819050919050565b6135d16135cc82612851565b6135b6565b82525050565b600081905092915050565b60006135ed82612dff565b6135f781856135d7565b9350613607818560208601612e1b565b80840191505092915050565b600061361f82866135c0565b60208201915061362f82856135e2565b915061363b82846135c0565b602082019150819050949350505050565b7f4678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434560008201527f5353454400000000000000000000000000000000000000000000000000000000602082015250565b60006136a8602483612c56565b91506136b38261364c565b604082019050919050565b600060208201905081810360008301526136d78161369b565b9050919050565b7f4678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f5460008201527f554e4e454c000000000000000000000000000000000000000000000000000000602082015250565b600061373a602583612c56565b9150613745826136de565b604082019050919050565b600060208201905081810360008301526137698161372d565b9050919050565b7f4678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f505260008201527f4f4f460000000000000000000000000000000000000000000000000000000000602082015250565b60006137cc602383612c56565b91506137d782613770565b604082019050919050565b600060208201905081810360008301526137fb816137bf565b9050919050565b7f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e415455524500600082015250565b6000613838601f83612c56565b915061384382613802565b602082019050919050565b600060208201905081810360008301526138678161382b565b9050919050565b600061388161387c84612b6c565b6129bc565b90508281526020810184848401111561389d5761389c612946565b5b6138a8848285612e1b565b509392505050565b600082601f8301126138c5576138c4612941565b5b81516138d584826020860161386e565b91505092915050565b6000602082840312156138f4576138f3612703565b5b600082015167ffffffffffffffff81111561391257613911612708565b5b61391e848285016138b0565b91505092915050565b600061393282612851565b915061393d83612851565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613972576139716134e4565b5b828201905092915050565b600061398882612851565b915061399383612851565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156139cc576139cb6134e4565b5b828202905092915050565b60006139e282612851565b91506139ed83612851565b925082821015613a00576139ff6134e4565b5b828203905092915050565b6000613a1682612851565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a4957613a486134e4565b5b600182019050919050565b600081519050613a638161270d565b92915050565b600080600080600060a08688031215613a8557613a84612703565b5b6000613a9388828901613a54565b9550506020613aa488828901613133565b9450506040613ab588828901613133565b9350506060613ac688828901613133565b9250506080613ad788828901613190565b9150509295509295909350565b6000819050919050565b613aff613afa826126c5565b613ae4565b82525050565b6000613b1182876135c0565b602082019150613b2182866135c0565b602082019150613b318285613aee565b602082019150613b418284613aee565b60208201915081905095945050505050565b7f4678526f6f7454756e6e656c3a20494e56414c49445f48454144455200000000600082015250565b6000613b89601c83612c56565b9150613b9482613b53565b602082019050919050565b60006020820190508181036000830152613bb881613b7c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613bf982612851565b9150613c0483612851565b925082613c1457613c13613bbf565b5b828206905092915050565b6000613c2a82612851565b9150613c3583612851565b925082613c4557613c44613bbf565b5b828204905092915050565b6000613c5b82613513565b9150613c6683613513565b925082613c7657613c75613bbf565b5b828206905092915050565b6000613c8c82613513565b9150613c9783613513565b925082613ca757613ca6613bbf565b5b828204905092915050565b60008160011c9050919050565b6000808291508390505b6001851115613d0957808604811115613ce557613ce46134e4565b5b6001851615613cf45780820291505b8081029050613d0285613cb2565b9450613cc9565b94509492505050565b600082613d225760019050613dde565b81613d305760009050613dde565b8160018114613d465760028114613d5057613d7f565b6001915050613dde565b60ff841115613d6257613d616134e4565b5b8360020a915084821115613d7957613d786134e4565b5b50613dde565b5060208310610133831016604e8410600b8410161715613db45782820a905083811115613daf57613dae6134e4565b5b613dde565b613dc18484846001613cbf565b92509050818404811115613dd857613dd76134e4565b5b81810290505b9392505050565b6000613df082612851565b9150613dfb83612851565b9250613e287fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484613d12565b905092915050565b7f496e76616c69642070726f6f66206c656e677468000000000000000000000000600082015250565b6000613e66601483612c56565b9150613e7182613e30565b602082019050919050565b60006020820190508181036000830152613e9581613e59565b9050919050565b7f4c65616620696e64657820697320746f6f206269670000000000000000000000600082015250565b6000613ed2601583612c56565b9150613edd82613e9c565b602082019050919050565b60006020820190508181036000830152613f0181613ec5565b9050919050565b6000613f148285613aee565b602082019150613f248284613aee565b6020820191508190509392505050565b6000613f3f82613513565b9150613f4a83613513565b925082821015613f5d57613f5c6134e4565b5b82820390509291505056fea26469706673582212207632d4088aeee4b020a674429d20959bf13acfff284e0c83442f7d002ea2dceb64736f6c63430008090033

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

00000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a20000000000000000000000000385603ab55642cb4dd5de3ae9e306809991804f

-----Decoded View---------------
Arg [0] : _checkpointManager (address): 0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287
Arg [1] : _fxRoot (address): 0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2
Arg [2] : _royaltyRegistry (address): 0x0385603ab55642cb4Dd5De3aE9e306809991804f

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287
Arg [1] : 000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a2
Arg [2] : 0000000000000000000000000385603ab55642cb4dd5de3ae9e306809991804f


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.