Sepolia Testnet

Contract

0xaCCbd3fde9d7f6e899B85003120A460d78b0707A

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
0x60a0604050489772024-01-08 21:09:36192 days ago1704748176IN
 Create: RoyaltyEngineV1
0 ETH0.1065844333.37373566

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RoyaltyEngineV1

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 1337000 runs

Other Settings:
shanghai EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 21 : RoyaltyEngineV1.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import { ERC165, IERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import { ERC165Checker } from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import { AddressUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";

import { SuperRareContracts } from "./libraries/SuperRareContracts.sol";

import { IManifold } from "./specs/IManifold.sol";
import { IRaribleV1, IRaribleV2 } from "./specs/IRarible.sol";
import { IFoundation } from "./specs/IFoundation.sol";
import { ISuperRareRegistry } from "./specs/ISuperRare.sol";
import { IEIP2981 } from "./specs/IEIP2981.sol";
import { IZoraOverride } from "./specs/IZoraOverride.sol";
import { IArtBlocksOverride } from "./specs/IArtBlocksOverride.sol";
import { IKODAV2Override } from "./specs/IKODAV2Override.sol";
import { IRoyaltyEngineV1 } from "./IRoyaltyEngineV1.sol";
import { IRoyaltyRegistry } from "./IRoyaltyRegistry.sol";
import { IRoyaltySplitter, Recipient } from "./overrides/IRoyaltySplitter.sol";
import { IFallbackRegistry } from "./overrides/IFallbackRegistry.sol";
/**
 * @dev Engine to lookup royalty configurations
 */

contract RoyaltyEngineV1 is ERC165, OwnableUpgradeable, IRoyaltyEngineV1 {
    using AddressUpgradeable for address;

    // Use int16 for specs to support future spec additions
    // When we add a spec, we also decrement the NONE value
    // Anything > NONE and <= NOT_CONFIGURED is considered not configured
    int16 private constant NONE = -1;
    int16 private constant NOT_CONFIGURED = 0;
    int16 private constant MANIFOLD = 1;
    int16 private constant RARIBLEV1 = 2;
    int16 private constant RARIBLEV2 = 3;
    int16 private constant FOUNDATION = 4;
    int16 private constant EIP2981 = 5;
    int16 private constant SUPERRARE = 6;
    int16 private constant ZORA = 7;
    int16 private constant ARTBLOCKS = 8;
    int16 private constant KNOWNORIGINV2 = 9;
    int16 private constant ROYALTY_SPLITTER = 10;
    int16 private constant FALLBACK = type(int16).max;

    mapping(address => int16) _specCache;

    address public royaltyRegistry;
    IFallbackRegistry public immutable FALLBACK_REGISTRY;

    constructor(address fallbackRegistry) {
        FALLBACK_REGISTRY = IFallbackRegistry(fallbackRegistry);
    }

    function initialize(address _initialOwner, address royaltyRegistry_) public initializer {
        _transferOwnership(_initialOwner);
        require(ERC165Checker.supportsInterface(royaltyRegistry_, type(IRoyaltyRegistry).interfaceId));
        royaltyRegistry = royaltyRegistry_;
    }

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

    /**
     * @dev Invalidate the cached spec (useful for situations where tooken royalty implementation changes to a different spec)
     */
    function invalidateCachedRoyaltySpec(address tokenAddress) public {
        address royaltyAddress = IRoyaltyRegistry(royaltyRegistry).getRoyaltyLookupAddress(tokenAddress);
        delete _specCache[royaltyAddress];
    }

    /**
     * @dev View function to get the cached spec of a token
     */
    function getCachedRoyaltySpec(address tokenAddress) public view returns (int16) {
        address royaltyAddress = IRoyaltyRegistry(royaltyRegistry).getRoyaltyLookupAddress(tokenAddress);
        return _specCache[royaltyAddress];
    }

    /**
     * @dev See {IRoyaltyEngineV1-getRoyalty}
     */
    function getRoyalty(address tokenAddress, uint256 tokenId, uint256 value)
        public
        override
        returns (address payable[] memory recipients, uint256[] memory amounts)
    {
        // External call to limit gas
        try this._getRoyaltyAndSpec{gas: 100000}(tokenAddress, tokenId, value) returns (
            address payable[] memory _recipients,
            uint256[] memory _amounts,
            int16 spec,
            address royaltyAddress,
            bool addToCache
        ) {
            if (addToCache) _specCache[royaltyAddress] = spec;
            return (_recipients, _amounts);
        } catch {
            revert("Invalid royalty amount");
        }
    }

    /**
     * @dev See {IRoyaltyEngineV1-getRoyaltyView}.
     */
    function getRoyaltyView(address tokenAddress, uint256 tokenId, uint256 value)
        public
        view
        override
        returns (address payable[] memory recipients, uint256[] memory amounts)
    {
        // External call to limit gas
        try this._getRoyaltyAndSpec{gas: 100000}(tokenAddress, tokenId, value) returns (
            address payable[] memory _recipients, uint256[] memory _amounts, int16, address, bool
        ) {
            return (_recipients, _amounts);
        } catch {
            revert("Invalid royalty amount");
        }
    }

    /**
     * @dev Get the royalty and royalty spec for a given token
     *
     * returns recipients array, amounts array, royalty spec, royalty address, whether or not to add to cache
     */
    function _getRoyaltyAndSpec(address tokenAddress, uint256 tokenId, uint256 value)
        external
        view
        returns (
            address payable[] memory recipients,
            uint256[] memory amounts,
            int16 spec,
            address royaltyAddress,
            bool addToCache
        )
    {
        require(msg.sender == address(this), "Only Engine");

        royaltyAddress = IRoyaltyRegistry(royaltyRegistry).getRoyaltyLookupAddress(tokenAddress);
        spec = _specCache[royaltyAddress];

        if (spec <= NOT_CONFIGURED && spec > NONE) {
            // No spec configured yet, so we need to detect the spec
            addToCache = true;

            // SuperRare handling
            if (tokenAddress == SuperRareContracts.SUPERRARE_V1 || tokenAddress == SuperRareContracts.SUPERRARE_V2) {
                try ISuperRareRegistry(SuperRareContracts.SUPERRARE_REGISTRY).tokenCreator(tokenAddress, tokenId)
                returns (address payable creator) {
                    try ISuperRareRegistry(SuperRareContracts.SUPERRARE_REGISTRY).calculateRoyaltyFee(
                        tokenAddress, tokenId, value
                    ) returns (uint256 amount) {
                        recipients = new address payable[](1);
                        amounts = new uint256[](1);
                        recipients[0] = creator;
                        amounts[0] = amount;
                        return (recipients, amounts, SUPERRARE, royaltyAddress, addToCache);
                    } catch { }
                } catch { }
            }
            try IEIP2981(royaltyAddress).royaltyInfo(tokenId, value) returns (address recipient, uint256 amount) {
                require(amount < value, "Invalid royalty amount");
                uint32 recipientSize;
                assembly {
                    recipientSize := extcodesize(recipient)
                }
                if (recipientSize > 0) {
                    try IRoyaltySplitter(recipient).getRecipients() returns (Recipient[] memory splitRecipients) {
                        recipients = new address payable[](splitRecipients.length);
                        amounts = new uint256[](splitRecipients.length);
                        uint256 sum = 0;
                        uint256 splitRecipientsLength = splitRecipients.length;
                        for (uint256 i = 0; i < splitRecipientsLength;) {
                            Recipient memory splitRecipient = splitRecipients[i];
                            recipients[i] = payable(splitRecipient.recipient);
                            uint256 splitAmount = splitRecipient.bps * amount / 10000;
                            amounts[i] = splitAmount;
                            sum += splitAmount;
                            unchecked {
                                ++i;
                            }
                        }
                        // sum can be less than amount, otherwise small-value listings can break
                        require(sum <= amount, "Invalid split");

                        return (recipients, amounts, ROYALTY_SPLITTER, royaltyAddress, addToCache);
                    } catch { }
                }
                // Supports EIP2981.  Return amounts
                recipients = new address payable[](1);
                amounts = new uint256[](1);
                recipients[0] = payable(recipient);
                amounts[0] = amount;
                return (recipients, amounts, EIP2981, royaltyAddress, addToCache);
            } catch { }
            try IManifold(royaltyAddress).getRoyalties(tokenId) returns (
                address payable[] memory recipients_, uint256[] memory bps
            ) {
                // Supports manifold interface.  Compute amounts
                require(recipients_.length == bps.length);
                return (recipients_, _computeAmounts(value, bps), MANIFOLD, royaltyAddress, addToCache);
            } catch { }
            try IRaribleV2(royaltyAddress).getRaribleV2Royalties(tokenId) returns (IRaribleV2.Part[] memory royalties) {
                // Supports rarible v2 interface. Compute amounts
                recipients = new address payable[](royalties.length);
                amounts = new uint256[](royalties.length);
                uint256 totalAmount;
                for (uint256 i = 0; i < royalties.length; i++) {
                    recipients[i] = royalties[i].account;
                    amounts[i] = value * royalties[i].value / 10000;
                    totalAmount += amounts[i];
                }
                require(totalAmount < value, "Invalid royalty amount");
                return (recipients, amounts, RARIBLEV2, royaltyAddress, addToCache);
            } catch { }
            try IRaribleV1(royaltyAddress).getFeeRecipients(tokenId) returns (address payable[] memory recipients_) {
                // Supports rarible v1 interface. Compute amounts
                recipients_ = IRaribleV1(royaltyAddress).getFeeRecipients(tokenId);
                try IRaribleV1(royaltyAddress).getFeeBps(tokenId) returns (uint256[] memory bps) {
                    require(recipients_.length == bps.length);
                    return (recipients_, _computeAmounts(value, bps), RARIBLEV1, royaltyAddress, addToCache);
                } catch { }
            } catch { }
            try IFoundation(royaltyAddress).getFees(tokenId) returns (
                address payable[] memory recipients_, uint256[] memory bps
            ) {
                // Supports foundation interface.  Compute amounts
                require(recipients_.length == bps.length);
                return (recipients_, _computeAmounts(value, bps), FOUNDATION, royaltyAddress, addToCache);
            } catch { }
            try IZoraOverride(royaltyAddress).convertBidShares(tokenAddress, tokenId) returns (
                address payable[] memory recipients_, uint256[] memory bps
            ) {
                // Support Zora override
                require(recipients_.length == bps.length);
                return (recipients_, _computeAmounts(value, bps), ZORA, royaltyAddress, addToCache);
            } catch { }
            try IArtBlocksOverride(royaltyAddress).getRoyalties(tokenAddress, tokenId) returns (
                address payable[] memory recipients_, uint256[] memory bps
            ) {
                // Support Art Blocks override
                require(recipients_.length == bps.length);
                return (recipients_, _computeAmounts(value, bps), ARTBLOCKS, royaltyAddress, addToCache);
            } catch { }
            try IKODAV2Override(royaltyAddress).getKODAV2RoyaltyInfo(tokenAddress, tokenId, value) returns (
                address payable[] memory _recipients, uint256[] memory _amounts
            ) {
                // Support KODA V2 override
                require(_recipients.length == _amounts.length);
                return (_recipients, _amounts, KNOWNORIGINV2, royaltyAddress, addToCache);
            } catch { }

            try FALLBACK_REGISTRY.getRecipients(tokenAddress) returns (Recipient[] memory _recipients) {
                uint256 recipientsLength = _recipients.length;
                if (recipientsLength > 0) {
                    return _calculateFallback(_recipients, recipientsLength, value, royaltyAddress, addToCache);
                }
            } catch { }

            // No supported royalties configured
            return (recipients, amounts, NONE, royaltyAddress, addToCache);
        } else {
            // Spec exists, just execute the appropriate one
            addToCache = false;
            if (spec == NONE) {
                return (recipients, amounts, spec, royaltyAddress, addToCache);
            } else if (spec == FALLBACK) {
                Recipient[] memory _recipients = FALLBACK_REGISTRY.getRecipients(tokenAddress);
                return _calculateFallback(_recipients, _recipients.length, value, royaltyAddress, addToCache);
            } else if (spec == MANIFOLD) {
                // Manifold spec
                uint256[] memory bps;
                (recipients, bps) = IManifold(royaltyAddress).getRoyalties(tokenId);
                require(recipients.length == bps.length);
                return (recipients, _computeAmounts(value, bps), spec, royaltyAddress, addToCache);
            } else if (spec == RARIBLEV2) {
                // Rarible v2 spec
                IRaribleV2.Part[] memory royalties;
                royalties = IRaribleV2(royaltyAddress).getRaribleV2Royalties(tokenId);
                recipients = new address payable[](royalties.length);
                amounts = new uint256[](royalties.length);
                uint256 totalAmount;
                for (uint256 i = 0; i < royalties.length; i++) {
                    recipients[i] = royalties[i].account;
                    amounts[i] = value * royalties[i].value / 10000;
                    totalAmount += amounts[i];
                }
                require(totalAmount < value, "Invalid royalty amount");
                return (recipients, amounts, spec, royaltyAddress, addToCache);
            } else if (spec == RARIBLEV1) {
                // Rarible v1 spec
                uint256[] memory bps;
                recipients = IRaribleV1(royaltyAddress).getFeeRecipients(tokenId);
                bps = IRaribleV1(royaltyAddress).getFeeBps(tokenId);
                require(recipients.length == bps.length);
                return (recipients, _computeAmounts(value, bps), spec, royaltyAddress, addToCache);
            } else if (spec == FOUNDATION) {
                // Foundation spec
                uint256[] memory bps;
                (recipients, bps) = IFoundation(royaltyAddress).getFees(tokenId);
                require(recipients.length == bps.length);
                return (recipients, _computeAmounts(value, bps), spec, royaltyAddress, addToCache);
            } else if (spec == EIP2981 || spec == ROYALTY_SPLITTER) {
                // EIP2981 spec
                (address recipient, uint256 amount) = IEIP2981(royaltyAddress).royaltyInfo(tokenId, value);
                require(amount < value, "Invalid royalty amount");
                if (spec == ROYALTY_SPLITTER) {
                    Recipient[] memory splitRecipients = IRoyaltySplitter(recipient).getRecipients();
                    recipients = new address payable[](splitRecipients.length);
                    amounts = new uint256[](splitRecipients.length);
                    uint256 sum = 0;
                    uint256 splitRecipientsLength = splitRecipients.length;
                    for (uint256 i = 0; i < splitRecipientsLength;) {
                        Recipient memory splitRecipient = splitRecipients[i];
                        recipients[i] = payable(splitRecipient.recipient);
                        uint256 splitAmount = splitRecipient.bps * amount / 10000;
                        amounts[i] = splitAmount;
                        sum += splitAmount;
                        unchecked {
                            ++i;
                        }
                    }
                    // sum can be less than amount, otherwise small-value listings can break
                    require(sum <= value, "Invalid split");

                    return (recipients, amounts, spec, royaltyAddress, addToCache);
                }
                recipients = new address payable[](1);
                amounts = new uint256[](1);
                recipients[0] = payable(recipient);
                amounts[0] = amount;
                return (recipients, amounts, spec, royaltyAddress, addToCache);
            } else if (spec == SUPERRARE) {
                // SUPERRARE spec
                address payable creator =
                    ISuperRareRegistry(SuperRareContracts.SUPERRARE_REGISTRY).tokenCreator(tokenAddress, tokenId);
                uint256 amount = ISuperRareRegistry(SuperRareContracts.SUPERRARE_REGISTRY).calculateRoyaltyFee(
                    tokenAddress, tokenId, value
                );
                recipients = new address payable[](1);
                amounts = new uint256[](1);
                recipients[0] = creator;
                amounts[0] = amount;
                return (recipients, amounts, spec, royaltyAddress, addToCache);
            } else if (spec == ZORA) {
                // Zora spec
                uint256[] memory bps;
                (recipients, bps) = IZoraOverride(royaltyAddress).convertBidShares(tokenAddress, tokenId);
                require(recipients.length == bps.length);
                return (recipients, _computeAmounts(value, bps), spec, royaltyAddress, addToCache);
            } else if (spec == ARTBLOCKS) {
                // Art Blocks spec
                uint256[] memory bps;
                (recipients, bps) = IArtBlocksOverride(royaltyAddress).getRoyalties(tokenAddress, tokenId);
                require(recipients.length == bps.length);
                return (recipients, _computeAmounts(value, bps), spec, royaltyAddress, addToCache);
            } else if (spec == KNOWNORIGINV2) {
                // KnownOrigin.io V2 spec (V3 falls under EIP2981)
                (recipients, amounts) =
                    IKODAV2Override(royaltyAddress).getKODAV2RoyaltyInfo(tokenAddress, tokenId, value);
                require(recipients.length == amounts.length);
                return (recipients, amounts, spec, royaltyAddress, addToCache);
            }
        }
    }

    function _calculateFallback(
        Recipient[] memory _recipients,
        uint256 recipientsLength,
        uint256 value,
        address royaltyAddress,
        bool addToCache
    )
        internal
        pure
        returns (
            address payable[] memory recipients,
            uint256[] memory amounts,
            int16 spec,
            address _royaltyAddress,
            bool _addToCache
        )
    {
        recipients = new address payable[](recipientsLength);
        amounts = new uint256[](recipientsLength);
        uint256 totalAmount;
        for (uint256 i = 0; i < recipientsLength;) {
            Recipient memory recipient = _recipients[i];
            recipients[i] = payable(recipient.recipient);
            uint256 amount = value * recipient.bps / 10_000;
            amounts[i] = amount;
            totalAmount += amount;
            unchecked {
                ++i;
            }
        }
        require(totalAmount < value, "Invalid royalty amount");
        return (recipients, amounts, FALLBACK, royaltyAddress, addToCache);
    }

    /**
     * Compute royalty amounts
     */
    function _computeAmounts(uint256 value, uint256[] memory bps) private pure returns (uint256[] memory amounts) {
        amounts = new uint256[](bps.length);
        uint256 totalAmount;
        for (uint256 i = 0; i < bps.length; i++) {
            amounts[i] = value * bps[i] / 10000;
            totalAmount += amounts[i];
        }
        require(totalAmount < value, "Invalid royalty amount");
        return amounts;
    }
}

File 2 of 21 : 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 21 : IRoyaltyRegistry.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

/**
 * @dev Royalty registry interface
 */
interface IRoyaltyRegistry is IERC165 {
    event RoyaltyOverride(address owner, address tokenAddress, address royaltyAddress);

    /**
     * Override the location of where to look up royalty information for a given token contract.
     * Allows for backwards compatibility and implementation of royalty logic for contracts that did not previously support them.
     *
     * @param tokenAddress    - The token address you wish to override
     * @param royaltyAddress  - The royalty override address
     */
    function setRoyaltyLookupAddress(address tokenAddress, address royaltyAddress) external returns (bool);

    /**
     * Returns royalty address location.  Returns the tokenAddress by default, or the override if it exists
     *
     * @param tokenAddress    - The token address you are looking up the royalty for
     */
    function getRoyaltyLookupAddress(address tokenAddress) external view returns (address);

    /**
     * Whether or not the message sender can override the royalty address for the given token address
     *
     * @param tokenAddress    - The token address you are looking up the royalty for
     */
    function overrideAllowed(address tokenAddress) external view returns (bool);
}

File 4 of 21 : SuperRareContracts.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library SuperRareContracts {
    address public constant SUPERRARE_REGISTRY = 0x17B0C8564E53f22364A6C8de6F7ca5CE9BEa4e5D;
    address public constant SUPERRARE_V1 = 0x41A322b28D0fF354040e2CbC676F0320d8c8850d;
    address public constant SUPERRARE_V2 = 0xb932a70A57673d89f4acfFBE830E8ed7f75Fb9e0;
}

File 5 of 21 : IFallbackRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import { Recipient } from "./IRoyaltySplitter.sol";

interface IFallbackRegistry {
    /**
     * @dev Get total recipients for token fees. Note that recipient bps is of gross amount, not share of fee amount,
     *      ie, recipients' BPS will not sum to 10_000, but to the total fee BPS for an order.
     */
    function getRecipients(address tokenAddress) external view returns (Recipient[] memory);
}

File 6 of 21 : IRoyaltySplitter.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

struct Recipient {
    address payable recipient;
    uint16 bps;
}

interface IRoyaltySplitter is IERC165 {
    /**
     * @dev Set the splitter recipients. Total bps must total 10000.
     */
    function setRecipients(Recipient[] calldata recipients) external;

    /**
     * @dev Get the splitter recipients;
     */
    function getRecipients() external view returns (Recipient[] memory);
}

File 7 of 21 : IArtBlocksOverride.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 *  Interface for an Art Blocks override
 */
interface IArtBlocksOverride {
    /**
     * @dev Get royalites of a token at a given tokenAddress.
     *      Returns array of receivers and basisPoints.
     *
     *  bytes4(keccak256('getRoyalties(address,uint256)')) == 0x9ca7dc7a
     *
     *  => 0x9ca7dc7a = 0x9ca7dc7a
     */
    function getRoyalties(address tokenAddress, uint256 tokenId)
        external
        view
        returns (address payable[] memory, uint256[] memory);
}

File 8 of 21 : IEIP2981.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * EIP-2981
 */
interface IEIP2981 {
    /**
     * bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a
     *
     * => 0x2a55205a = 0x2a55205a
     */
    function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address, uint256);
}

File 9 of 21 : IFoundation.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IFoundation {
    /*
     *  bytes4(keccak256('getFees(uint256)')) == 0xd5a06d4c
     *
     *  => 0xd5a06d4c = 0xd5a06d4c
     */
    function getFees(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);
}

interface IFoundationTreasuryNode {
    function getFoundationTreasury() external view returns (address payable);
}

interface IFoundationTreasury {
    function isAdmin(address account) external view returns (bool);
}

File 10 of 21 : IKODAV2Override.sol
// SPDX-License-Identifier: MIT

/// @author: knownorigin.io

pragma solidity ^0.8.0;

interface IKODAV2 {
    function editionOfTokenId(uint256 _tokenId) external view returns (uint256 _editionNumber);

    function artistCommission(uint256 _editionNumber)
        external
        view
        returns (address _artistAccount, uint256 _artistCommission);

    function editionOptionalCommission(uint256 _editionNumber)
        external
        view
        returns (uint256 _rate, address _recipient);
}

interface IKODAV2Override {
    /// @notice Emitted when the royalties fee changes
    event CreatorRoyaltiesFeeUpdated(uint256 _oldCreatorRoyaltiesFee, uint256 _newCreatorRoyaltiesFee);

    /// @notice For the given KO NFT and token ID, return the addresses and the amounts to pay
    function getKODAV2RoyaltyInfo(address _tokenAddress, uint256 _id, uint256 _amount)
        external
        view
        returns (address payable[] memory, uint256[] memory);

    /// @notice Allows the owner() to update the creator royalties
    function updateCreatorRoyalties(uint256 _creatorRoyaltiesFee) external;
}

File 11 of 21 : IManifold.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

/**
 * @dev Royalty interface for creator core classes
 */
interface IManifold {
    /**
     * @dev Get royalites of a token.  Returns list of receivers and basisPoints
     *
     *  bytes4(keccak256('getRoyalties(uint256)')) == 0xbb3bafd6
     *
     *  => 0xbb3bafd6 = 0xbb3bafd6
     */
    function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);
}

File 12 of 21 : IRarible.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IRaribleV1 {
    /*
     * bytes4(keccak256('getFeeBps(uint256)')) == 0x0ebd4c7f
     * bytes4(keccak256('getFeeRecipients(uint256)')) == 0xb9c4d9fb
     *
     * => 0x0ebd4c7f ^ 0xb9c4d9fb == 0xb7799584
     */
    function getFeeBps(uint256 id) external view returns (uint256[] memory);
    function getFeeRecipients(uint256 id) external view returns (address payable[] memory);
}

interface IRaribleV2 {
    /*
     *  bytes4(keccak256('getRaribleV2Royalties(uint256)')) == 0xcad96cca
     */
    struct Part {
        address payable account;
        uint96 value;
    }

    function getRaribleV2Royalties(uint256 id) external view returns (Part[] memory);
}

File 13 of 21 : ISuperRare.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface ISuperRareRegistry {
    /**
     * @dev Get the royalty fee percentage for a specific ERC721 contract.
     * @param _contractAddress address ERC721Contract address.
     * @param _tokenId uint256 token ID.
     * @return uint8 wei royalty fee.
     */
    function getERC721TokenRoyaltyPercentage(address _contractAddress, uint256 _tokenId)
        external
        view
        returns (uint8);

    /**
     * @dev Utililty function to calculate the royalty fee for a token.
     * @param _contractAddress address ERC721Contract address.
     * @param _tokenId uint256 token ID.
     * @param _amount uint256 wei amount.
     * @return uint256 wei fee.
     */
    function calculateRoyaltyFee(address _contractAddress, uint256 _tokenId, uint256 _amount)
        external
        view
        returns (uint256);

    /**
     * @dev Get the token creator which will receive royalties of the given token
     * @param _contractAddress address ERC721Contract address.
     * @param _tokenId uint256 token ID.
     */
    function tokenCreator(address _contractAddress, uint256 _tokenId) external view returns (address payable);
}

File 14 of 21 : IZoraOverride.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * Paired down version of the Zora Market interface
 */
interface IZoraMarket {
    struct ZoraDecimal {
        uint256 value;
    }

    struct ZoraBidShares {
        // % of sale value that goes to the _previous_ owner of the nft
        ZoraDecimal prevOwner;
        // % of sale value that goes to the original creator of the nft
        ZoraDecimal creator;
        // % of sale value that goes to the seller (current owner) of the nft
        ZoraDecimal owner;
    }

    function bidSharesForToken(uint256 tokenId) external view returns (ZoraBidShares memory);
}

/**
 * Paired down version of the Zora Media interface
 */
interface IZoraMedia {
    /**
     * Auto-generated accessors of public variables
     */
    function marketContract() external view returns (address);
    function previousTokenOwners(uint256 tokenId) external view returns (address);
    function tokenCreators(uint256 tokenId) external view returns (address);

    /**
     * ERC721 function
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);
}

/**
 * Interface for a Zora media override
 */
interface IZoraOverride {
    /**
     * @dev Convert bid share configuration of a Zora Media token into an array of receivers and bps values
     *      Does not support prevOwner and sell-on amounts as that is specific to Zora marketplace implementation
     *      and requires updates on the Zora Media and Marketplace to update the sell-on amounts/previous owner values.
     *      An off-Zora marketplace sale will break the sell-on functionality.
     */
    function convertBidShares(address media, uint256 tokenId)
        external
        view
        returns (address payable[] memory, uint256[] memory);
}

File 15 of 21 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 16 of 21 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized != type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

File 17 of 21 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 18 of 21 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.0;
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 20 of 21 : ERC165Checker.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Library used to query support of an interface declared via {IERC165}.
 *
 * Note that these functions return the actual result of the query: they do not
 * `revert` if an interface is not supported. It is up to the caller to decide
 * what to do in these cases.
 */
library ERC165Checker {
    // As per the EIP-165 spec, no interface should ever match 0xffffffff
    bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;

    /**
     * @dev Returns true if `account` supports the {IERC165} interface.
     */
    function supportsERC165(address account) internal view returns (bool) {
        // Any contract that implements ERC165 must explicitly indicate support of
        // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid
        return
            supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) &&
            !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);
    }

    /**
     * @dev Returns true if `account` supports the interface defined by
     * `interfaceId`. Support for {IERC165} itself is queried automatically.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {
        // query support of both ERC165 as per the spec and support of _interfaceId
        return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);
    }

    /**
     * @dev Returns a boolean array where each value corresponds to the
     * interfaces passed in and whether they're supported or not. This allows
     * you to batch check interfaces for a contract where your expectation
     * is that some interfaces may not be supported.
     *
     * See {IERC165-supportsInterface}.
     *
     * _Available since v3.4._
     */
    function getSupportedInterfaces(
        address account,
        bytes4[] memory interfaceIds
    ) internal view returns (bool[] memory) {
        // an array of booleans corresponding to interfaceIds and whether they're supported or not
        bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);

        // query support of ERC165 itself
        if (supportsERC165(account)) {
            // query support of each interface in interfaceIds
            for (uint256 i = 0; i < interfaceIds.length; i++) {
                interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);
            }
        }

        return interfaceIdsSupported;
    }

    /**
     * @dev Returns true if `account` supports all the interfaces defined in
     * `interfaceIds`. Support for {IERC165} itself is queried automatically.
     *
     * Batch-querying can lead to gas savings by skipping repeated checks for
     * {IERC165} support.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {
        // query support of ERC165 itself
        if (!supportsERC165(account)) {
            return false;
        }

        // query support of each interface in interfaceIds
        for (uint256 i = 0; i < interfaceIds.length; i++) {
            if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {
                return false;
            }
        }

        // all interfaces supported
        return true;
    }

    /**
     * @notice Query if a contract implements an interface, does not check ERC165 support
     * @param account The address of the contract to query for support of an interface
     * @param interfaceId The interface identifier, as specified in ERC-165
     * @return true if the contract at account indicates support of the interface with
     * identifier interfaceId, false otherwise
     * @dev Assumes that account contains a contract that supports ERC165, otherwise
     * the behavior of this method is undefined. This precondition can be checked
     * with {supportsERC165}.
     *
     * Some precompiled contracts will falsely indicate support for a given interface, so caution
     * should be exercised when using this function.
     *
     * Interface identification is specified in ERC-165.
     */
    function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {
        // prepare call
        bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);

        // perform static call
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly {
            success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0x00)
        }

        return success && returnSize >= 0x20 && returnValue > 0;
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"fallbackRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"FALLBACK_REGISTRY","outputs":[{"internalType":"contract IFallbackRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"_getRoyaltyAndSpec","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"int16","name":"spec","type":"int16"},{"internalType":"address","name":"royaltyAddress","type":"address"},{"internalType":"bool","name":"addToCache","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"getCachedRoyaltySpec","outputs":[{"internalType":"int16","name":"","type":"int16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"getRoyalty","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"getRoyaltyView","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_initialOwner","type":"address"},{"internalType":"address","name":"royaltyRegistry_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"invalidateCachedRoyaltySpec","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405234801562000010575f80fd5b50604051620039b5380380620039b5833981016040819052620000339162000045565b6001600160a01b031660805262000074565b5f6020828403121562000056575f80fd5b81516001600160a01b03811681146200006d575f80fd5b9392505050565b60805161391a6200009b5f395f818161020d015281816117e1015261193a015261391a5ff3fe608060405234801561000f575f80fd5b50600436106100cf575f3560e01c80637dec6f2e1161007d578063f2fde38b11610058578063f2fde38b146101f5578063f356dc2e14610208578063f533b8021461022f575f80fd5b80637dec6f2e146101835780638da5cb5b14610196578063a11b0712146101d5575f80fd5b806371100f52116100ad57806371100f5214610131578063715018a6146101555780637488f1211461015d575f80fd5b806301ffc9a7146100d35780633e104014146100fb578063485cc9551461011c575b5f80fd5b6100e66100e1366004613151565b610242565b60405190151581526020015b60405180910390f35b61010e6101093660046131b1565b6102da565b6040516100f2929190613262565b61012f61012a36600461328f565b61041c565b005b61014461013f3660046131b1565b61061d565b6040516100f29594939291906132c6565b61012f612802565b61017061016b366004613323565b612815565b60405160019190910b81526020016100f2565b61012f610191366004613323565b6128d8565b60335473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f2565b6066546101b09073ffffffffffffffffffffffffffffffffffffffff1681565b61012f610203366004613323565b6129b7565b6101b07f000000000000000000000000000000000000000000000000000000000000000081565b61010e61023d3660046131b1565b612a6e565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fcb23f8160000000000000000000000000000000000000000000000000000000014806102d457507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6040517f71100f5200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810183905260448101829052606090819030906371100f5290620186a0906064015f604051808303818786fa9350505050801561039a57506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261039791908101906134d7565b60015b610405576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064015b60405180910390fd5b50929450909250610414915050565b935093915050565b5f54610100900460ff161580801561043a57505f54600160ff909116105b806104535750303b15801561045357505f5460ff166001145b6104df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016103fc565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561053b575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b61054483612bf9565b61056e827f880963ac00000000000000000000000000000000000000000000000000000000612c6f565b610576575f80fd5b606680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84161790558015610618575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6060805f808033301461068c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f4f6e6c7920456e67696e6500000000000000000000000000000000000000000060448201526064016103fc565b6066546040517fde5488af00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a811660048301529091169063de5488af90602401602060405180830381865afa1580156106fa573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061071e919061357a565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526065602052604081205460010b9450909250831380159061077d57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600184900b135b156118bb5750600173ffffffffffffffffffffffffffffffffffffffff88167341a322b28d0ff354040e2cbc676f0320d8c8850d14806107e6575073ffffffffffffffffffffffffffffffffffffffff881673b932a70a57673d89f4acffbe830e8ed7f75fb9e0145b15610a33576040517fb85ed7e400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89166004820152602481018890527317b0c8564e53f22364a6c8de6f7ca5ce9bea4e5d9063b85ed7e490604401602060405180830381865afa9250505080156108aa575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526108a79181019061357a565b60015b15610a33576040517f860110f500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a16600482015260248101899052604481018890527317b0c8564e53f22364a6c8de6f7ca5ce9bea4e5d9063860110f590606401602060405180830381865afa925050508015610975575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261097291810190613595565b60015b15610a31576040805160018082528183019092529060208083019080368337505060408051600180825281830190925292995090506020808301908036833701905050955081875f815181106109cd576109cd6135ac565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080865f81518110610a1a57610a1a6135ac565b602090810291909101015250600693506127f79050565b505b6040517f2a55205a000000000000000000000000000000000000000000000000000000008152600481018890526024810187905273ffffffffffffffffffffffffffffffffffffffff831690632a55205a906044016040805180830381865afa925050508015610ade575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610adb918101906135d9565b60015b15610e7d57878110610b4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064016103fc565b813b63ffffffff811615610dc5578273ffffffffffffffffffffffffffffffffffffffff1663d78d610b6040518163ffffffff1660e01b81526004015f60405180830381865afa925050508015610be257506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610bdf9190810190613605565b60015b15610dc557805167ffffffffffffffff811115610c0157610c0161333e565b604051908082528060200260200182016040528015610c2a578160200160208202803683370190505b509850805167ffffffffffffffff811115610c4757610c4761333e565b604051908082528060200260200182016040528015610c70578160200160208202803683370190505b5081519098505f90815b81811015610d4a575f848281518110610c9557610c956135ac565b60200260200101519050805f01518d8381518110610cb557610cb56135ac565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505f61271088836020015161ffff16610d0791906136ef565b610d119190613706565b9050808d8481518110610d2657610d266135ac565b6020908102919091010152610d3b818661373e565b94508260010192505050610c7a565b5084821115610db5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642073706c69740000000000000000000000000000000000000060448201526064016103fc565b50600a97506127f7945050505050565b60408051600180825281830190925290602080830190803683375050604080516001808252818301909252929a5090506020808301908036833701905050965082885f81518110610e1857610e186135ac565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505081875f81518110610e6557610e656135ac565b602090810291909101015250600594506127f7915050565b6040517fbb3bafd60000000000000000000000000000000000000000000000000000000081526004810188905273ffffffffffffffffffffffffffffffffffffffff83169063bb3bafd6906024015f60405180830381865afa925050508015610f2557506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610f229190810190613751565b60015b15610f51578051825114610f37575f80fd5b81610f428983612c91565b600196509650965050506127f7565b6040517fcad96cca0000000000000000000000000000000000000000000000000000000081526004810188905273ffffffffffffffffffffffffffffffffffffffff83169063cad96cca906024015f60405180830381865afa925050508015610ff957506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610ff691908101906137b1565b60015b1561120657805167ffffffffffffffff8111156110185761101861333e565b604051908082528060200260200182016040528015611041578160200160208202803683370190505b509550805167ffffffffffffffff81111561105e5761105e61333e565b604051908082528060200260200182016040528015611087578160200160208202803683370190505b5094505f805b8251811015611190578281815181106110a8576110a86135ac565b60200260200101515f01518882815181106110c5576110c56135ac565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612710838281518110611114576111146135ac565b6020026020010151602001516bffffffffffffffffffffffff168a61113991906136ef565b6111439190613706565b878281518110611155576111556135ac565b602002602001018181525050868181518110611173576111736135ac565b602002602001015182611186919061373e565b915060010161108d565b508781106111fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064016103fc565b50600393506127f79050565b6040517fb9c4d9fb0000000000000000000000000000000000000000000000000000000081526004810188905273ffffffffffffffffffffffffffffffffffffffff83169063b9c4d9fb906024015f60405180830381865afa9250505080156112ae57506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526112ab9190810190613878565b60015b15611439576040517fb9c4d9fb0000000000000000000000000000000000000000000000000000000081526004810189905273ffffffffffffffffffffffffffffffffffffffff84169063b9c4d9fb906024015f60405180830381865afa15801561131b573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526113609190810190613878565b6040517f0ebd4c7f000000000000000000000000000000000000000000000000000000008152600481018a905290915073ffffffffffffffffffffffffffffffffffffffff841690630ebd4c7f906024015f60405180830381865afa92505050801561140b57506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261140891908101906138b2565b60015b1561143757805182511461141d575f80fd5b816114288983612c91565b600296509650965050506127f7565b505b6040517fd5a06d4c0000000000000000000000000000000000000000000000000000000081526004810188905273ffffffffffffffffffffffffffffffffffffffff83169063d5a06d4c906024015f60405180830381865afa9250505080156114e157506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526114de9190810190613751565b60015b1561150d5780518251146114f3575f80fd5b816114fe8983612c91565b600496509650965050506127f7565b6040517ff662207400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301526024820189905283169063f6622074906044015f60405180830381865afa9250505080156115bd57506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526115ba9190810190613751565b60015b156115e95780518251146115cf575f80fd5b816115da8983612c91565b600796509650965050506127f7565b6040517f9ca7dc7a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff898116600483015260248201899052831690639ca7dc7a906044015f60405180830381865afa92505050801561169957506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526116969190810190613751565b60015b156116c55780518251146116ab575f80fd5b816116b68983612c91565b600896509650965050506127f7565b6040517ffbda03ab00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152602482018990526044820188905283169063fbda03ab906064015f60405180830381865afa92505050801561177c57506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526117799190810190613751565b60015b1561179c57805182511461178e575f80fd5b9095509350600992506127f7565b6040517f20eda6d500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301527f000000000000000000000000000000000000000000000000000000000000000016906320eda6d5906024015f60405180830381865afa92505050801561186557506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526118629190810190613605565b60015b1561189357805180156118905761187f82828a8787612dd5565b9650965096509650965050506127f7565b50505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92506127f7565b505f600183810b01156127f7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8001600184900b016119e5576040517f20eda6d500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906320eda6d5906024015f60405180830381865afa158015611980573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526119c59190810190613605565b90506119d5818251898686612dd5565b95509550955095509550506127f7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600184900b01611ae9576040517fbb3bafd60000000000000000000000000000000000000000000000000000000081526004810188905260609073ffffffffffffffffffffffffffffffffffffffff84169063bb3bafd6906024015b5f60405180830381865afa158015611a7c573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611ac19190810190613751565b8051825192985090925014611ad4575f80fd5b85611adf8883612c91565b95509550506127f7565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd600184900b01611dc9576040517fcad96cca0000000000000000000000000000000000000000000000000000000081526004810188905260609073ffffffffffffffffffffffffffffffffffffffff84169063cad96cca906024015f60405180830381865afa158015611b7f573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611bc491908101906137b1565b9050805167ffffffffffffffff811115611be057611be061333e565b604051908082528060200260200182016040528015611c09578160200160208202803683370190505b509550805167ffffffffffffffff811115611c2657611c2661333e565b604051908082528060200260200182016040528015611c4f578160200160208202803683370190505b5094505f805b8251811015611d5857828181518110611c7057611c706135ac565b60200260200101515f0151888281518110611c8d57611c8d6135ac565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612710838281518110611cdc57611cdc6135ac565b6020026020010151602001516bffffffffffffffffffffffff168a611d0191906136ef565b611d0b9190613706565b878281518110611d1d57611d1d6135ac565b602002602001018181525050868181518110611d3b57611d3b6135ac565b602002602001015182611d4e919061373e565b9150600101611c55565b50878110611dc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064016103fc565b50506127f7565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe600184900b01611f63576040517fb9c4d9fb0000000000000000000000000000000000000000000000000000000081526004810188905260609073ffffffffffffffffffffffffffffffffffffffff84169063b9c4d9fb906024015f60405180830381865afa158015611e5f573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611ea49190810190613878565b6040517f0ebd4c7f000000000000000000000000000000000000000000000000000000008152600481018a905290965073ffffffffffffffffffffffffffffffffffffffff841690630ebd4c7f906024015f60405180830381865afa158015611f0f573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611f5491908101906138b2565b90508051865114611ad4575f80fd5b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc600184900b01611fe4576040517fd5a06d4c0000000000000000000000000000000000000000000000000000000081526004810188905260609073ffffffffffffffffffffffffffffffffffffffff84169063d5a06d4c90602401611a62565b600183900b60051480611ffb5750600183900b600a145b15612459576040517f2a55205a00000000000000000000000000000000000000000000000000000000815260048101889052602481018790525f90819073ffffffffffffffffffffffffffffffffffffffff851690632a55205a906044016040805180830381865afa158015612073573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061209791906135d9565b91509150878110612104576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064016103fc565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6600186900b01612397575f8273ffffffffffffffffffffffffffffffffffffffff1663d78d610b6040518163ffffffff1660e01b81526004015f60405180830381865afa158015612178573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526121bd9190810190613605565b9050805167ffffffffffffffff8111156121d9576121d961333e565b604051908082528060200260200182016040528015612202578160200160208202803683370190505b509750805167ffffffffffffffff81111561221f5761221f61333e565b604051908082528060200260200182016040528015612248578160200160208202803683370190505b5081519097505f90815b81811015612322575f84828151811061226d5761226d6135ac565b60200260200101519050805f01518c838151811061228d5761228d6135ac565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505f61271087836020015161ffff166122df91906136ef565b6122e99190613706565b9050808c84815181106122fe576122fe6135ac565b6020908102919091010152612313818661373e565b94508260010192505050612252565b508a82111561238d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642073706c69740000000000000000000000000000000000000060448201526064016103fc565b50505050506127f7565b60015b6040519080825280602002602001820160405280156123c3578160200160208202803683370190505b506040805160018082528183019092529198506020808301908036833701905050955081875f815181106123f9576123f96135ac565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080865f81518110612446576124466135ac565b60200260200101818152505050506127f7565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600184900b016125e9576040517fb85ed7e400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89166004820152602481018890525f907317b0c8564e53f22364a6c8de6f7ca5ce9bea4e5d9063b85ed7e490604401602060405180830381865afa158015612509573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061252d919061357a565b6040517f860110f500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b166004820152602481018a9052604481018990529091505f907317b0c8564e53f22364a6c8de6f7ca5ce9bea4e5d9063860110f590606401602060405180830381865afa1580156125bc573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125e09190613595565b9050600161239a565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9600184900b01612673576040517ff662207400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152602482018990526060919084169063f662207490604401611a62565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8600184900b016126fd576040517f9ca7dc7a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301526024820189905260609190841690639ca7dc7a90604401611a62565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7600184900b016127f7576040517ffbda03ab00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152602482018990526044820188905283169063fbda03ab906064015f60405180830381865afa15801561279f573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526127e49190810190613751565b80518251929750909550146127f7575f80fd5b939792965093509350565b61280a612fa1565b6128135f612bf9565b565b6066546040517fde5488af00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f92839291169063de5488af90602401602060405180830381865afa158015612886573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128aa919061357a565b73ffffffffffffffffffffffffffffffffffffffff165f9081526065602052604090205460010b9392505050565b6066546040517fde5488af00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f92169063de5488af90602401602060405180830381865afa158015612946573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061296a919061357a565b73ffffffffffffffffffffffffffffffffffffffff165f90815260656020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001690555050565b6129bf612fa1565b73ffffffffffffffffffffffffffffffffffffffff8116612a62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103fc565b612a6b81612bf9565b50565b6040517f71100f5200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810183905260448101829052606090819030906371100f5290620186a0906064015f604051808303818786fa93505050508015612b2e57506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052612b2b91908101906134d7565b60015b612b94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064016103fc565b8015610405575073ffffffffffffffffffffffffffffffffffffffff165f90815260656020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff929092169190911790559092509050610414565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f612c7983613022565b8015612c8a5750612c8a8383613085565b9392505050565b6060815167ffffffffffffffff811115612cad57612cad61333e565b604051908082528060200260200182016040528015612cd6578160200160208202803683370190505b5090505f805b8351811015612d6457612710848281518110612cfa57612cfa6135ac565b602002602001015186612d0d91906136ef565b612d179190613706565b838281518110612d2957612d296135ac565b602002602001018181525050828181518110612d4757612d476135ac565b602002602001015182612d5a919061373e565b9150600101612cdc565b50838110612dce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064016103fc565b5092915050565b6060805f805f8867ffffffffffffffff811115612df457612df461333e565b604051908082528060200260200182016040528015612e1d578160200160208202803683370190505b5094508867ffffffffffffffff811115612e3957612e3961333e565b604051908082528060200260200182016040528015612e62578160200160208202803683370190505b5093505f805b8a811015612f21575f8c8281518110612e8357612e836135ac565b60200260200101519050805f0151888381518110612ea357612ea36135ac565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091018201528101515f9061271090612ede9061ffff168e6136ef565b612ee89190613706565b905080888481518110612efd57612efd6135ac565b6020908102919091010152612f12818561373e565b93508260010192505050612e68565b50888110612f8b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064016103fc565b509399929850617fff9750949550929350915050565b60335473ffffffffffffffffffffffffffffffffffffffff163314612813576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103fc565b5f61304d827f01ffc9a700000000000000000000000000000000000000000000000000000000613085565b80156102d4575061307e827fffffffff00000000000000000000000000000000000000000000000000000000613085565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a70000000000000000000000000000000000000000000000000000000017815282515f9392849283928392918391908a617530fa92503d91505f51905082801561313b575060208210155b801561314657505f81115b979650505050505050565b5f60208284031215613161575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612c8a575f80fd5b73ffffffffffffffffffffffffffffffffffffffff81168114612a6b575f80fd5b5f805f606084860312156131c3575f80fd5b83356131ce81613190565b95602085013595506040909401359392505050565b5f815180845260208085019450602084015f5b8381101561322857815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016131f6565b509495945050505050565b5f815180845260208085019450602084015f5b8381101561322857815187529582019590820190600101613246565b604081525f61327460408301856131e3565b82810360208401526132868185613233565b95945050505050565b5f80604083850312156132a0575f80fd5b82356132ab81613190565b915060208301356132bb81613190565b809150509250929050565b60a081525f6132d860a08301886131e3565b82810360208401526132ea8188613233565b60019690960b6040840152505073ffffffffffffffffffffffffffffffffffffffff929092166060830152151560809091015292915050565b5f60208284031215613333575f80fd5b8135612c8a81613190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff8111828210171561338e5761338e61333e565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156133db576133db61333e565b604052919050565b5f67ffffffffffffffff8211156133fc576133fc61333e565b5060051b60200190565b5f82601f830112613415575f80fd5b8151602061342a613425836133e3565b613394565b8083825260208201915060208460051b87010193508684111561344b575f80fd5b602086015b8481101561347057805161346381613190565b8352918301918301613450565b509695505050505050565b5f82601f83011261348a575f80fd5b8151602061349a613425836133e3565b8083825260208201915060208460051b8701019350868411156134bb575f80fd5b602086015b8481101561347057805183529183019183016134c0565b5f805f805f60a086880312156134eb575f80fd5b855167ffffffffffffffff80821115613502575f80fd5b61350e89838a01613406565b96506020880151915080821115613523575f80fd5b506135308882890161347b565b94505060408601518060010b8114613546575f80fd5b606087015190935061355781613190565b6080870151909250801515811461356c575f80fd5b809150509295509295909350565b5f6020828403121561358a575f80fd5b8151612c8a81613190565b5f602082840312156135a5575f80fd5b5051919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f80604083850312156135ea575f80fd5b82516135f581613190565b6020939093015192949293505050565b5f6020808385031215613616575f80fd5b825167ffffffffffffffff81111561362c575f80fd5b8301601f8101851361363c575f80fd5b805161364a613425826133e3565b81815260069190911b82018301908381019087831115613668575f80fd5b928401925b828410156131465760408489031215613684575f80fd5b61368c61336b565b845161369781613190565b81528486015161ffff811681146136ac575f80fd5b818701528252604093909301929084019061366d565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820281158282048414176102d4576102d46136c2565b5f82613739577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b808201808211156102d4576102d46136c2565b5f8060408385031215613762575f80fd5b825167ffffffffffffffff80821115613779575f80fd5b61378586838701613406565b9350602085015191508082111561379a575f80fd5b506137a78582860161347b565b9150509250929050565b5f60208083850312156137c2575f80fd5b825167ffffffffffffffff8111156137d8575f80fd5b8301601f810185136137e8575f80fd5b80516137f6613425826133e3565b81815260069190911b82018301908381019087831115613814575f80fd5b928401925b828410156131465760408489031215613830575f80fd5b61383861336b565b845161384381613190565b8152848601516bffffffffffffffffffffffff81168114613862575f80fd5b8187015282526040939093019290840190613819565b5f60208284031215613888575f80fd5b815167ffffffffffffffff81111561389e575f80fd5b6138aa84828501613406565b949350505050565b5f602082840312156138c2575f80fd5b815167ffffffffffffffff8111156138d8575f80fd5b6138aa8482850161347b56fea2646970667358221220e684cfa680f34abdb2357c16cafd160d57f81420843e24b87ea424029005aaf264736f6c634300081700330000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561000f575f80fd5b50600436106100cf575f3560e01c80637dec6f2e1161007d578063f2fde38b11610058578063f2fde38b146101f5578063f356dc2e14610208578063f533b8021461022f575f80fd5b80637dec6f2e146101835780638da5cb5b14610196578063a11b0712146101d5575f80fd5b806371100f52116100ad57806371100f5214610131578063715018a6146101555780637488f1211461015d575f80fd5b806301ffc9a7146100d35780633e104014146100fb578063485cc9551461011c575b5f80fd5b6100e66100e1366004613151565b610242565b60405190151581526020015b60405180910390f35b61010e6101093660046131b1565b6102da565b6040516100f2929190613262565b61012f61012a36600461328f565b61041c565b005b61014461013f3660046131b1565b61061d565b6040516100f29594939291906132c6565b61012f612802565b61017061016b366004613323565b612815565b60405160019190910b81526020016100f2565b61012f610191366004613323565b6128d8565b60335473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f2565b6066546101b09073ffffffffffffffffffffffffffffffffffffffff1681565b61012f610203366004613323565b6129b7565b6101b07f000000000000000000000000000000000000000000000000000000000000000081565b61010e61023d3660046131b1565b612a6e565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fcb23f8160000000000000000000000000000000000000000000000000000000014806102d457507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6040517f71100f5200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810183905260448101829052606090819030906371100f5290620186a0906064015f604051808303818786fa9350505050801561039a57506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261039791908101906134d7565b60015b610405576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064015b60405180910390fd5b50929450909250610414915050565b935093915050565b5f54610100900460ff161580801561043a57505f54600160ff909116105b806104535750303b15801561045357505f5460ff166001145b6104df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016103fc565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561053b575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b61054483612bf9565b61056e827f880963ac00000000000000000000000000000000000000000000000000000000612c6f565b610576575f80fd5b606680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84161790558015610618575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6060805f808033301461068c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f4f6e6c7920456e67696e6500000000000000000000000000000000000000000060448201526064016103fc565b6066546040517fde5488af00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a811660048301529091169063de5488af90602401602060405180830381865afa1580156106fa573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061071e919061357a565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526065602052604081205460010b9450909250831380159061077d57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600184900b135b156118bb5750600173ffffffffffffffffffffffffffffffffffffffff88167341a322b28d0ff354040e2cbc676f0320d8c8850d14806107e6575073ffffffffffffffffffffffffffffffffffffffff881673b932a70a57673d89f4acffbe830e8ed7f75fb9e0145b15610a33576040517fb85ed7e400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89166004820152602481018890527317b0c8564e53f22364a6c8de6f7ca5ce9bea4e5d9063b85ed7e490604401602060405180830381865afa9250505080156108aa575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526108a79181019061357a565b60015b15610a33576040517f860110f500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a16600482015260248101899052604481018890527317b0c8564e53f22364a6c8de6f7ca5ce9bea4e5d9063860110f590606401602060405180830381865afa925050508015610975575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261097291810190613595565b60015b15610a31576040805160018082528183019092529060208083019080368337505060408051600180825281830190925292995090506020808301908036833701905050955081875f815181106109cd576109cd6135ac565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080865f81518110610a1a57610a1a6135ac565b602090810291909101015250600693506127f79050565b505b6040517f2a55205a000000000000000000000000000000000000000000000000000000008152600481018890526024810187905273ffffffffffffffffffffffffffffffffffffffff831690632a55205a906044016040805180830381865afa925050508015610ade575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610adb918101906135d9565b60015b15610e7d57878110610b4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064016103fc565b813b63ffffffff811615610dc5578273ffffffffffffffffffffffffffffffffffffffff1663d78d610b6040518163ffffffff1660e01b81526004015f60405180830381865afa925050508015610be257506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610bdf9190810190613605565b60015b15610dc557805167ffffffffffffffff811115610c0157610c0161333e565b604051908082528060200260200182016040528015610c2a578160200160208202803683370190505b509850805167ffffffffffffffff811115610c4757610c4761333e565b604051908082528060200260200182016040528015610c70578160200160208202803683370190505b5081519098505f90815b81811015610d4a575f848281518110610c9557610c956135ac565b60200260200101519050805f01518d8381518110610cb557610cb56135ac565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505f61271088836020015161ffff16610d0791906136ef565b610d119190613706565b9050808d8481518110610d2657610d266135ac565b6020908102919091010152610d3b818661373e565b94508260010192505050610c7a565b5084821115610db5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642073706c69740000000000000000000000000000000000000060448201526064016103fc565b50600a97506127f7945050505050565b60408051600180825281830190925290602080830190803683375050604080516001808252818301909252929a5090506020808301908036833701905050965082885f81518110610e1857610e186135ac565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505081875f81518110610e6557610e656135ac565b602090810291909101015250600594506127f7915050565b6040517fbb3bafd60000000000000000000000000000000000000000000000000000000081526004810188905273ffffffffffffffffffffffffffffffffffffffff83169063bb3bafd6906024015f60405180830381865afa925050508015610f2557506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610f229190810190613751565b60015b15610f51578051825114610f37575f80fd5b81610f428983612c91565b600196509650965050506127f7565b6040517fcad96cca0000000000000000000000000000000000000000000000000000000081526004810188905273ffffffffffffffffffffffffffffffffffffffff83169063cad96cca906024015f60405180830381865afa925050508015610ff957506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610ff691908101906137b1565b60015b1561120657805167ffffffffffffffff8111156110185761101861333e565b604051908082528060200260200182016040528015611041578160200160208202803683370190505b509550805167ffffffffffffffff81111561105e5761105e61333e565b604051908082528060200260200182016040528015611087578160200160208202803683370190505b5094505f805b8251811015611190578281815181106110a8576110a86135ac565b60200260200101515f01518882815181106110c5576110c56135ac565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612710838281518110611114576111146135ac565b6020026020010151602001516bffffffffffffffffffffffff168a61113991906136ef565b6111439190613706565b878281518110611155576111556135ac565b602002602001018181525050868181518110611173576111736135ac565b602002602001015182611186919061373e565b915060010161108d565b508781106111fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064016103fc565b50600393506127f79050565b6040517fb9c4d9fb0000000000000000000000000000000000000000000000000000000081526004810188905273ffffffffffffffffffffffffffffffffffffffff83169063b9c4d9fb906024015f60405180830381865afa9250505080156112ae57506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526112ab9190810190613878565b60015b15611439576040517fb9c4d9fb0000000000000000000000000000000000000000000000000000000081526004810189905273ffffffffffffffffffffffffffffffffffffffff84169063b9c4d9fb906024015f60405180830381865afa15801561131b573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526113609190810190613878565b6040517f0ebd4c7f000000000000000000000000000000000000000000000000000000008152600481018a905290915073ffffffffffffffffffffffffffffffffffffffff841690630ebd4c7f906024015f60405180830381865afa92505050801561140b57506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261140891908101906138b2565b60015b1561143757805182511461141d575f80fd5b816114288983612c91565b600296509650965050506127f7565b505b6040517fd5a06d4c0000000000000000000000000000000000000000000000000000000081526004810188905273ffffffffffffffffffffffffffffffffffffffff83169063d5a06d4c906024015f60405180830381865afa9250505080156114e157506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526114de9190810190613751565b60015b1561150d5780518251146114f3575f80fd5b816114fe8983612c91565b600496509650965050506127f7565b6040517ff662207400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301526024820189905283169063f6622074906044015f60405180830381865afa9250505080156115bd57506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526115ba9190810190613751565b60015b156115e95780518251146115cf575f80fd5b816115da8983612c91565b600796509650965050506127f7565b6040517f9ca7dc7a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff898116600483015260248201899052831690639ca7dc7a906044015f60405180830381865afa92505050801561169957506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526116969190810190613751565b60015b156116c55780518251146116ab575f80fd5b816116b68983612c91565b600896509650965050506127f7565b6040517ffbda03ab00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152602482018990526044820188905283169063fbda03ab906064015f60405180830381865afa92505050801561177c57506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526117799190810190613751565b60015b1561179c57805182511461178e575f80fd5b9095509350600992506127f7565b6040517f20eda6d500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301527f000000000000000000000000000000000000000000000000000000000000000016906320eda6d5906024015f60405180830381865afa92505050801561186557506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526118629190810190613605565b60015b1561189357805180156118905761187f82828a8787612dd5565b9650965096509650965050506127f7565b50505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92506127f7565b505f600183810b01156127f7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8001600184900b016119e5576040517f20eda6d500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906320eda6d5906024015f60405180830381865afa158015611980573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526119c59190810190613605565b90506119d5818251898686612dd5565b95509550955095509550506127f7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600184900b01611ae9576040517fbb3bafd60000000000000000000000000000000000000000000000000000000081526004810188905260609073ffffffffffffffffffffffffffffffffffffffff84169063bb3bafd6906024015b5f60405180830381865afa158015611a7c573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611ac19190810190613751565b8051825192985090925014611ad4575f80fd5b85611adf8883612c91565b95509550506127f7565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd600184900b01611dc9576040517fcad96cca0000000000000000000000000000000000000000000000000000000081526004810188905260609073ffffffffffffffffffffffffffffffffffffffff84169063cad96cca906024015f60405180830381865afa158015611b7f573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611bc491908101906137b1565b9050805167ffffffffffffffff811115611be057611be061333e565b604051908082528060200260200182016040528015611c09578160200160208202803683370190505b509550805167ffffffffffffffff811115611c2657611c2661333e565b604051908082528060200260200182016040528015611c4f578160200160208202803683370190505b5094505f805b8251811015611d5857828181518110611c7057611c706135ac565b60200260200101515f0151888281518110611c8d57611c8d6135ac565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612710838281518110611cdc57611cdc6135ac565b6020026020010151602001516bffffffffffffffffffffffff168a611d0191906136ef565b611d0b9190613706565b878281518110611d1d57611d1d6135ac565b602002602001018181525050868181518110611d3b57611d3b6135ac565b602002602001015182611d4e919061373e565b9150600101611c55565b50878110611dc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064016103fc565b50506127f7565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe600184900b01611f63576040517fb9c4d9fb0000000000000000000000000000000000000000000000000000000081526004810188905260609073ffffffffffffffffffffffffffffffffffffffff84169063b9c4d9fb906024015f60405180830381865afa158015611e5f573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611ea49190810190613878565b6040517f0ebd4c7f000000000000000000000000000000000000000000000000000000008152600481018a905290965073ffffffffffffffffffffffffffffffffffffffff841690630ebd4c7f906024015f60405180830381865afa158015611f0f573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611f5491908101906138b2565b90508051865114611ad4575f80fd5b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc600184900b01611fe4576040517fd5a06d4c0000000000000000000000000000000000000000000000000000000081526004810188905260609073ffffffffffffffffffffffffffffffffffffffff84169063d5a06d4c90602401611a62565b600183900b60051480611ffb5750600183900b600a145b15612459576040517f2a55205a00000000000000000000000000000000000000000000000000000000815260048101889052602481018790525f90819073ffffffffffffffffffffffffffffffffffffffff851690632a55205a906044016040805180830381865afa158015612073573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061209791906135d9565b91509150878110612104576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064016103fc565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6600186900b01612397575f8273ffffffffffffffffffffffffffffffffffffffff1663d78d610b6040518163ffffffff1660e01b81526004015f60405180830381865afa158015612178573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526121bd9190810190613605565b9050805167ffffffffffffffff8111156121d9576121d961333e565b604051908082528060200260200182016040528015612202578160200160208202803683370190505b509750805167ffffffffffffffff81111561221f5761221f61333e565b604051908082528060200260200182016040528015612248578160200160208202803683370190505b5081519097505f90815b81811015612322575f84828151811061226d5761226d6135ac565b60200260200101519050805f01518c838151811061228d5761228d6135ac565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505f61271087836020015161ffff166122df91906136ef565b6122e99190613706565b9050808c84815181106122fe576122fe6135ac565b6020908102919091010152612313818661373e565b94508260010192505050612252565b508a82111561238d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642073706c69740000000000000000000000000000000000000060448201526064016103fc565b50505050506127f7565b60015b6040519080825280602002602001820160405280156123c3578160200160208202803683370190505b506040805160018082528183019092529198506020808301908036833701905050955081875f815181106123f9576123f96135ac565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080865f81518110612446576124466135ac565b60200260200101818152505050506127f7565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600184900b016125e9576040517fb85ed7e400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89166004820152602481018890525f907317b0c8564e53f22364a6c8de6f7ca5ce9bea4e5d9063b85ed7e490604401602060405180830381865afa158015612509573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061252d919061357a565b6040517f860110f500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b166004820152602481018a9052604481018990529091505f907317b0c8564e53f22364a6c8de6f7ca5ce9bea4e5d9063860110f590606401602060405180830381865afa1580156125bc573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125e09190613595565b9050600161239a565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9600184900b01612673576040517ff662207400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152602482018990526060919084169063f662207490604401611a62565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8600184900b016126fd576040517f9ca7dc7a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301526024820189905260609190841690639ca7dc7a90604401611a62565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7600184900b016127f7576040517ffbda03ab00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152602482018990526044820188905283169063fbda03ab906064015f60405180830381865afa15801561279f573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526127e49190810190613751565b80518251929750909550146127f7575f80fd5b939792965093509350565b61280a612fa1565b6128135f612bf9565b565b6066546040517fde5488af00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f92839291169063de5488af90602401602060405180830381865afa158015612886573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128aa919061357a565b73ffffffffffffffffffffffffffffffffffffffff165f9081526065602052604090205460010b9392505050565b6066546040517fde5488af00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f92169063de5488af90602401602060405180830381865afa158015612946573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061296a919061357a565b73ffffffffffffffffffffffffffffffffffffffff165f90815260656020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001690555050565b6129bf612fa1565b73ffffffffffffffffffffffffffffffffffffffff8116612a62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103fc565b612a6b81612bf9565b50565b6040517f71100f5200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810183905260448101829052606090819030906371100f5290620186a0906064015f604051808303818786fa93505050508015612b2e57506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052612b2b91908101906134d7565b60015b612b94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064016103fc565b8015610405575073ffffffffffffffffffffffffffffffffffffffff165f90815260656020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff929092169190911790559092509050610414565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f612c7983613022565b8015612c8a5750612c8a8383613085565b9392505050565b6060815167ffffffffffffffff811115612cad57612cad61333e565b604051908082528060200260200182016040528015612cd6578160200160208202803683370190505b5090505f805b8351811015612d6457612710848281518110612cfa57612cfa6135ac565b602002602001015186612d0d91906136ef565b612d179190613706565b838281518110612d2957612d296135ac565b602002602001018181525050828181518110612d4757612d476135ac565b602002602001015182612d5a919061373e565b9150600101612cdc565b50838110612dce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064016103fc565b5092915050565b6060805f805f8867ffffffffffffffff811115612df457612df461333e565b604051908082528060200260200182016040528015612e1d578160200160208202803683370190505b5094508867ffffffffffffffff811115612e3957612e3961333e565b604051908082528060200260200182016040528015612e62578160200160208202803683370190505b5093505f805b8a811015612f21575f8c8281518110612e8357612e836135ac565b60200260200101519050805f0151888381518110612ea357612ea36135ac565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091018201528101515f9061271090612ede9061ffff168e6136ef565b612ee89190613706565b905080888481518110612efd57612efd6135ac565b6020908102919091010152612f12818561373e565b93508260010192505050612e68565b50888110612f8b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c696420726f79616c747920616d6f756e740000000000000000000060448201526064016103fc565b509399929850617fff9750949550929350915050565b60335473ffffffffffffffffffffffffffffffffffffffff163314612813576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103fc565b5f61304d827f01ffc9a700000000000000000000000000000000000000000000000000000000613085565b80156102d4575061307e827fffffffff00000000000000000000000000000000000000000000000000000000613085565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a70000000000000000000000000000000000000000000000000000000017815282515f9392849283928392918391908a617530fa92503d91505f51905082801561313b575060208210155b801561314657505f81115b979650505050505050565b5f60208284031215613161575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612c8a575f80fd5b73ffffffffffffffffffffffffffffffffffffffff81168114612a6b575f80fd5b5f805f606084860312156131c3575f80fd5b83356131ce81613190565b95602085013595506040909401359392505050565b5f815180845260208085019450602084015f5b8381101561322857815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016131f6565b509495945050505050565b5f815180845260208085019450602084015f5b8381101561322857815187529582019590820190600101613246565b604081525f61327460408301856131e3565b82810360208401526132868185613233565b95945050505050565b5f80604083850312156132a0575f80fd5b82356132ab81613190565b915060208301356132bb81613190565b809150509250929050565b60a081525f6132d860a08301886131e3565b82810360208401526132ea8188613233565b60019690960b6040840152505073ffffffffffffffffffffffffffffffffffffffff929092166060830152151560809091015292915050565b5f60208284031215613333575f80fd5b8135612c8a81613190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff8111828210171561338e5761338e61333e565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156133db576133db61333e565b604052919050565b5f67ffffffffffffffff8211156133fc576133fc61333e565b5060051b60200190565b5f82601f830112613415575f80fd5b8151602061342a613425836133e3565b613394565b8083825260208201915060208460051b87010193508684111561344b575f80fd5b602086015b8481101561347057805161346381613190565b8352918301918301613450565b509695505050505050565b5f82601f83011261348a575f80fd5b8151602061349a613425836133e3565b8083825260208201915060208460051b8701019350868411156134bb575f80fd5b602086015b8481101561347057805183529183019183016134c0565b5f805f805f60a086880312156134eb575f80fd5b855167ffffffffffffffff80821115613502575f80fd5b61350e89838a01613406565b96506020880151915080821115613523575f80fd5b506135308882890161347b565b94505060408601518060010b8114613546575f80fd5b606087015190935061355781613190565b6080870151909250801515811461356c575f80fd5b809150509295509295909350565b5f6020828403121561358a575f80fd5b8151612c8a81613190565b5f602082840312156135a5575f80fd5b5051919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f80604083850312156135ea575f80fd5b82516135f581613190565b6020939093015192949293505050565b5f6020808385031215613616575f80fd5b825167ffffffffffffffff81111561362c575f80fd5b8301601f8101851361363c575f80fd5b805161364a613425826133e3565b81815260069190911b82018301908381019087831115613668575f80fd5b928401925b828410156131465760408489031215613684575f80fd5b61368c61336b565b845161369781613190565b81528486015161ffff811681146136ac575f80fd5b818701528252604093909301929084019061366d565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820281158282048414176102d4576102d46136c2565b5f82613739577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b808201808211156102d4576102d46136c2565b5f8060408385031215613762575f80fd5b825167ffffffffffffffff80821115613779575f80fd5b61378586838701613406565b9350602085015191508082111561379a575f80fd5b506137a78582860161347b565b9150509250929050565b5f60208083850312156137c2575f80fd5b825167ffffffffffffffff8111156137d8575f80fd5b8301601f810185136137e8575f80fd5b80516137f6613425826133e3565b81815260069190911b82018301908381019087831115613814575f80fd5b928401925b828410156131465760408489031215613830575f80fd5b61383861336b565b845161384381613190565b8152848601516bffffffffffffffffffffffff81168114613862575f80fd5b8187015282526040939093019290840190613819565b5f60208284031215613888575f80fd5b815167ffffffffffffffff81111561389e575f80fd5b6138aa84828501613406565b949350505050565b5f602082840312156138c2575f80fd5b815167ffffffffffffffff8111156138d8575f80fd5b6138aa8482850161347b56fea2646970667358221220e684cfa680f34abdb2357c16cafd160d57f81420843e24b87ea424029005aaf264736f6c63430008170033

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

0000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : fallbackRegistry (address): 0x0000000000000000000000000000000000000000

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.