ETH Price: $2,423.14 (+0.07%)

Contract

0x61DBF87164d33FD3695256DC8Ba74D3B1d304170
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Grant Marketplac...191284212024-01-31 19:03:47227 days ago1706727827IN
0x61DBF871...B1d304170
0 ETH0.0014021527.33676741
Grant Marketplac...180193152023-08-29 9:14:35382 days ago1693300475IN
0x61DBF871...B1d304170
0 ETH0.0010289920.06155793
Set Staking Fee ...180193122023-08-29 9:13:59382 days ago1693300439IN
0x61DBF871...B1d304170
0 ETH0.0006483820.98959467
0x60806040180192872023-08-29 9:08:47382 days ago1693300127IN
 Create: MarketplaceSettingsV3
0 ETH0.0281048920.9004359

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
207544872024-09-15 7:21:3513 mins ago1726384895
0x61DBF871...B1d304170
0 ETH
207544872024-09-15 7:21:3513 mins ago1726384895
0x61DBF871...B1d304170
0 ETH
207544282024-09-15 7:09:4725 mins ago1726384187
0x61DBF871...B1d304170
0 ETH
207544282024-09-15 7:09:4725 mins ago1726384187
0x61DBF871...B1d304170
0 ETH
207543292024-09-15 6:49:5945 mins ago1726382999
0x61DBF871...B1d304170
0 ETH
207543292024-09-15 6:49:5945 mins ago1726382999
0x61DBF871...B1d304170
0 ETH
207543292024-09-15 6:49:5945 mins ago1726382999
0x61DBF871...B1d304170
0 ETH
207542742024-09-15 6:38:4756 mins ago1726382327
0x61DBF871...B1d304170
0 ETH
207542742024-09-15 6:38:4756 mins ago1726382327
0x61DBF871...B1d304170
0 ETH
207542742024-09-15 6:38:4756 mins ago1726382327
0x61DBF871...B1d304170
0 ETH
207542742024-09-15 6:38:4756 mins ago1726382327
0x61DBF871...B1d304170
0 ETH
207542742024-09-15 6:38:4756 mins ago1726382327
0x61DBF871...B1d304170
0 ETH
207542742024-09-15 6:38:4756 mins ago1726382327
0x61DBF871...B1d304170
0 ETH
207542742024-09-15 6:38:4756 mins ago1726382327
0x61DBF871...B1d304170
0 ETH
207542742024-09-15 6:38:4756 mins ago1726382327
0x61DBF871...B1d304170
0 ETH
207540802024-09-15 5:59:351 hr ago1726379975
0x61DBF871...B1d304170
0 ETH
207540802024-09-15 5:59:351 hr ago1726379975
0x61DBF871...B1d304170
0 ETH
207540802024-09-15 5:59:351 hr ago1726379975
0x61DBF871...B1d304170
0 ETH
207540802024-09-15 5:59:351 hr ago1726379975
0x61DBF871...B1d304170
0 ETH
207540802024-09-15 5:59:351 hr ago1726379975
0x61DBF871...B1d304170
0 ETH
207540802024-09-15 5:59:351 hr ago1726379975
0x61DBF871...B1d304170
0 ETH
207540802024-09-15 5:59:351 hr ago1726379975
0x61DBF871...B1d304170
0 ETH
207540802024-09-15 5:59:351 hr ago1726379975
0x61DBF871...B1d304170
0 ETH
207540802024-09-15 5:59:351 hr ago1726379975
0x61DBF871...B1d304170
0 ETH
207540482024-09-15 5:53:111 hr ago1726379591
0x61DBF871...B1d304170
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MarketplaceSettingsV3

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 15 : MarketplaceSettingsV3.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;

import {IMarketplaceSettings} from "./IMarketplaceSettings.sol";
import {MarketplaceSettingsV2} from "./MarketplaceSettingsV2.sol";
import {IStakingSettings} from "./IStakingSettings.sol";
import {AccessControl} from "openzeppelin-contracts/access/AccessControl.sol";
import {IERC721} from "openzeppelin-contracts/token/ERC721/IERC721.sol";
import {EnumerableSet} from "openzeppelin-contracts/utils/structs/EnumerableSet.sol";
import {Ownable} from "openzeppelin-contracts/access/Ownable.sol";

contract MarketplaceSettingsV3 is
    Ownable,
    AccessControl,
    IMarketplaceSettings,
    IStakingSettings
{
    uint8 private stakingFeePercentage;
    bytes32 public constant TOKEN_MARK_ROLE = keccak256("TOKEN_MARK_ROLE");

    // This is meant to be the MarketplaceSettings contract located in the V1 folder
    MarketplaceSettingsV2 private oldMarketplaceSettings;

    // EnumerableSet library method
    using EnumerableSet for EnumerableSet.AddressSet;

    // EnumerableSet of contracts marked sold
    EnumerableSet.AddressSet private contractSold;

    uint256 private maxValue;
    uint256 private minValue;

    uint8 private marketplaceFeePercentage;
    uint8 private primarySaleFeePercentage;

    constructor(address newOwner, address oldSettings) {
        maxValue = 2**254;
        minValue = 1000;
        marketplaceFeePercentage = 3;
        primarySaleFeePercentage = 15;
        stakingFeePercentage = 0;

        require(
            newOwner != address(0),
            "constructor::New owner address cannot be null"
        );

        require(
            oldSettings != address(0),
            "constructor::Old Marketplace Settings address cannot be null"
        );

        _setupRole(AccessControl.DEFAULT_ADMIN_ROLE, newOwner);
        _setupRole(TOKEN_MARK_ROLE, newOwner);
        transferOwnership(newOwner);

        oldMarketplaceSettings = MarketplaceSettingsV2(oldSettings);
    }

    function grantMarketplaceAccess(address _account) external {
        require(
            hasRole(AccessControl.DEFAULT_ADMIN_ROLE, _msgSender()),
            "grantMarketplaceAccess::Must be admin to call method"
        );
        grantRole(TOKEN_MARK_ROLE, _account);
    }

    function getMarketplaceMaxValue() external view override returns (uint256) {
        return maxValue;
    }

    function setPrimarySaleFeePercentage(uint8 _primarySaleFeePercentage)
        external
        onlyOwner
    {
        primarySaleFeePercentage = _primarySaleFeePercentage;
    }

    function setMarketplaceMaxValue(uint256 _maxValue) external onlyOwner {
        maxValue = _maxValue;
    }

    function getMarketplaceMinValue() external view override returns (uint256) {
        return minValue;
    }

    function setMarketplaceMinValue(uint256 _minValue) external onlyOwner {
        minValue = _minValue;
    }

    function getMarketplaceFeePercentage()
        external
        view
        override
        returns (uint8)
    {
        return marketplaceFeePercentage;
    }

    function setMarketplaceFeePercentage(uint8 _percentage) external onlyOwner {
        require(
            _percentage <= 100,
            "setMarketplaceFeePercentage::_percentage must be <= 100"
        );
        marketplaceFeePercentage = _percentage;
    }

    function calculateMarketplaceFee(uint256 _amount)
        external
        view
        override
        returns (uint256)
    {
        return (_amount * marketplaceFeePercentage) / 100;
    }

    function getERC721ContractPrimarySaleFeePercentage(address)
        external
        view
        override
        returns (uint8)
    {
        return primarySaleFeePercentage;
    }

    function setERC721ContractPrimarySaleFeePercentage(
        address _contractAddress,
        uint8 _percentage
    ) external override {}

    function calculatePrimarySaleFee(address, uint256 _amount)
        external
        view
        override
        returns (uint256)
    {
        return (_amount * primarySaleFeePercentage) / 100;
    }

    function hasERC721TokenSold(address _contractAddress, uint256 _tokenId)
        external
        view
        override
        returns (bool)
    {
        bool contractHasSold = contractSold.contains(_contractAddress);

        if (contractHasSold) return true;

        return
            oldMarketplaceSettings.hasERC721TokenSold(
                _contractAddress,
                _tokenId
            );
    }

    function markERC721Token(
        address _contractAddress,
        uint256 _tokenId,
        bool _hasSold
    ) public override {
        require(
            hasRole(TOKEN_MARK_ROLE, msg.sender),
            "markERC721Token::Must have TOKEN_MARK_ROLE role to call method"
        );
        oldMarketplaceSettings.markERC721Token(
            _contractAddress,
            _tokenId,
            _hasSold
        );
    }

    function markTokensAsSold(
        address _originContract,
        uint256[] calldata _tokenIds
    ) external {
        require(
            hasRole(TOKEN_MARK_ROLE, msg.sender),
            "markERC721Token::Must have TOKEN_MARK_ROLE role to call method"
        );
        // limit to batches of 2000
        require(
            _tokenIds.length <= 2000,
            "markTokensAsSold::Attempted to mark more than 2000 tokens as sold"
        );

        // Mark provided tokens as sold.
        for (uint256 i = 0; i < _tokenIds.length; i++) {
            markERC721Token(_originContract, _tokenIds[i], true);
        }
    }

    function markContractAsSold(address _contractAddress)
        external
        returns (bool)
    {
        require(
            hasRole(TOKEN_MARK_ROLE, msg.sender),
            "markContract::Must have TOKEN_MARK_ROLE role to call method"
        );
        return oldMarketplaceSettings.markContractAsSold(_contractAddress);
    }

    function getStakingFeePercentage() external view override returns (uint8) {
        return stakingFeePercentage;
    }

    function setStakingFeePercentage(uint8 _percentage) external onlyOwner {
        require(
            _percentage <= marketplaceFeePercentage,
            "setStakingFeePercentage::_percentage must be <= marketplaceFeePercentage"
        );
        stakingFeePercentage = _percentage;
    }

    function calculateStakingFee(uint256 _amount)
        external
        view
        override
        returns (uint256)
    {
        return (_amount * stakingFeePercentage) / 100;
    }

    function calculateMarketplacePayoutFee(uint256 _amount)
        external
        view
        override
        returns (uint256)
    {
        return
            (_amount * (marketplaceFeePercentage - stakingFeePercentage)) / 100;
    }
}

File 2 of 15 : IMarketplaceSettings.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @title IMarketplaceSettings Settings governing a marketplace.
 */
interface IMarketplaceSettings {
    /////////////////////////////////////////////////////////////////////////
    // Marketplace Min and Max Values
    /////////////////////////////////////////////////////////////////////////
    /**
     * @dev Get the max value to be used with the marketplace.
     * @return uint256 wei value.
     */
    function getMarketplaceMaxValue() external view returns (uint256);

    /**
     * @dev Get the max value to be used with the marketplace.
     * @return uint256 wei value.
     */
    function getMarketplaceMinValue() external view returns (uint256);

    /////////////////////////////////////////////////////////////////////////
    // Marketplace Fee
    /////////////////////////////////////////////////////////////////////////
    /**
     * @dev Get the marketplace fee percentage.
     * @return uint8 wei fee.
     */
    function getMarketplaceFeePercentage() external view returns (uint8);

    /**
     * @dev Utility function for calculating the marketplace fee for given amount of wei.
     * @param _amount uint256 wei amount.
     * @return uint256 wei fee.
     */
    function calculateMarketplaceFee(uint256 _amount)
        external
        view
        returns (uint256);

    /////////////////////////////////////////////////////////////////////////
    // Primary Sale Fee
    /////////////////////////////////////////////////////////////////////////
    /**
     * @dev Get the primary sale fee percentage for a specific ERC721 contract.
     * @param _contractAddress address ERC721Contract address.
     * @return uint8 wei primary sale fee.
     */
    function getERC721ContractPrimarySaleFeePercentage(address _contractAddress)
        external
        view
        returns (uint8);

    /**
     * @dev Utility function for calculating the primary sale fee for given amount of wei
     * @param _contractAddress address ERC721Contract address.
     * @param _amount uint256 wei amount.
     * @return uint256 wei fee.
     */
    function calculatePrimarySaleFee(address _contractAddress, uint256 _amount)
        external
        view
        returns (uint256);

    /**
     * @dev Check whether the ERC721 token has sold at least once.
     * @param _contractAddress address ERC721Contract address.
     * @param _tokenId uint256 token ID.
     * @return bool of whether the token has sold.
     */
    function hasERC721TokenSold(address _contractAddress, uint256 _tokenId)
        external
        view
        returns (bool);

    /**
     * @dev Mark a token as sold.
     * Requirements:
     *
     * - `_contractAddress` cannot be the zero address.
     * @param _contractAddress address ERC721Contract address.
     * @param _tokenId uint256 token ID.
     * @param _hasSold bool of whether the token should be marked sold or not.
     */
    function markERC721Token(
        address _contractAddress,
        uint256 _tokenId,
        bool _hasSold
    ) external;

    function setERC721ContractPrimarySaleFeePercentage(
        address _contractAddress,
        uint8 _percentage
    ) external;
}

File 3 of 15 : MarketplaceSettingsV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IMarketplaceSettings} from "./IMarketplaceSettings.sol";
import {Ownable} from "openzeppelin-contracts/access/Ownable.sol";
import {AccessControl} from "openzeppelin-contracts/access/AccessControl.sol";
import {IERC721} from "openzeppelin-contracts/token/ERC721/IERC721.sol";
import {EnumerableSet} from "openzeppelin-contracts/utils/structs/EnumerableSet.sol";

contract MarketplaceSettingsV2 is Ownable, AccessControl, IMarketplaceSettings {
    bytes32 public constant TOKEN_MARK_ROLE = keccak256("TOKEN_MARK_ROLE");

    // This is meant to be the MarketplaceSettings contract located in the V1 folder
    IMarketplaceSettings private oldMarketplaceSettings;

    // EnumerableSet library method
    using EnumerableSet for EnumerableSet.AddressSet;

    // EnumerableSet of contracts marked sold
    EnumerableSet.AddressSet private contractSold;

    uint256 private maxValue;
    uint256 private minValue;

    uint8 private marketplaceFeePercentage;
    uint8 private primarySaleFeePercentage;

    constructor(address newOwner, address oldSettings) {
        maxValue = 2 ** 254;
        minValue = 1000;
        marketplaceFeePercentage = 3;
        primarySaleFeePercentage = 15;

        require(
            newOwner != address(0),
            "constructor::New owner address cannot be null"
        );

        require(
            oldSettings != address(0),
            "constructor::Old Marketplace Settings address cannot be null"
        );

        _setupRole(AccessControl.DEFAULT_ADMIN_ROLE, newOwner);
        _setupRole(TOKEN_MARK_ROLE, newOwner);
        transferOwnership(newOwner);

        oldMarketplaceSettings = IMarketplaceSettings(oldSettings);
    }

    function grantMarketplaceAccess(address _account) external {
        require(
            hasRole(AccessControl.DEFAULT_ADMIN_ROLE, _msgSender()),
            "grantMarketplaceAccess::Must be admin to call method"
        );
        grantRole(TOKEN_MARK_ROLE, _account);
    }

    function getMarketplaceMaxValue() external view override returns (uint256) {
        return maxValue;
    }

    function setPrimarySaleFeePercentage(
        uint8 _primarySaleFeePercentage
    ) external onlyOwner {
        primarySaleFeePercentage = _primarySaleFeePercentage;
    }

    function setMarketplaceMaxValue(uint256 _maxValue) external onlyOwner {
        maxValue = _maxValue;
    }

    function getMarketplaceMinValue() external view override returns (uint256) {
        return minValue;
    }

    function setMarketplaceMinValue(uint256 _minValue) external onlyOwner {
        minValue = _minValue;
    }

    function getMarketplaceFeePercentage()
        external
        view
        override
        returns (uint8)
    {
        return marketplaceFeePercentage;
    }

    function setMarketplaceFeePercentage(uint8 _percentage) external onlyOwner {
        require(
            _percentage <= 100,
            "setMarketplaceFeePercentage::_percentage must be <= 100"
        );
        marketplaceFeePercentage = _percentage;
    }

    function calculateMarketplaceFee(
        uint256 _amount
    ) external view override returns (uint256) {
        return (_amount * marketplaceFeePercentage) / 100;
    }

    function getERC721ContractPrimarySaleFeePercentage(
        address
    ) external view override returns (uint8) {
        return primarySaleFeePercentage;
    }

    function setERC721ContractPrimarySaleFeePercentage(
        address _contractAddress,
        uint8 _percentage
    ) external override {}

    function calculatePrimarySaleFee(
        address,
        uint256 _amount
    ) external view override returns (uint256) {
        return (_amount * primarySaleFeePercentage) / 100;
    }

    function hasERC721TokenSold(
        address _contractAddress,
        uint256 _tokenId
    ) external view override returns (bool) {
        bool contractHasSold = contractSold.contains(_contractAddress);

        if (contractHasSold) return true;

        return
            oldMarketplaceSettings.hasERC721TokenSold(
                _contractAddress,
                _tokenId
            );
    }

    function markERC721Token(
        address _contractAddress,
        uint256 _tokenId,
        bool _hasSold
    ) public override {
        require(
            hasRole(TOKEN_MARK_ROLE, msg.sender),
            "markERC721Token::Must have TOKEN_MARK_ROLE role to call method"
        );
        oldMarketplaceSettings.markERC721Token(
            _contractAddress,
            _tokenId,
            _hasSold
        );
    }

    function markTokensAsSold(
        address _originContract,
        uint256[] calldata _tokenIds
    ) external {
        require(
            hasRole(TOKEN_MARK_ROLE, msg.sender),
            "markERC721Token::Must have TOKEN_MARK_ROLE role to call method"
        );
        // limit to batches of 2000
        require(
            _tokenIds.length <= 2000,
            "markTokensAsSold::Attempted to mark more than 2000 tokens as sold"
        );

        // Mark provided tokens as sold.
        for (uint256 i = 0; i < _tokenIds.length; i++) {
            markERC721Token(_originContract, _tokenIds[i], true);
        }
    }

    function markContractAsSold(
        address _contractAddress
    ) external returns (bool) {
        require(
            hasRole(TOKEN_MARK_ROLE, msg.sender),
            "markContract::Must have TOKEN_MARK_ROLE role to call method"
        );
        // Prevents contract address from being marked multiple times
        require(
            !contractSold.contains(_contractAddress),
            "markContract::Contract already marked as sold"
        );
        // Adds contract address to set
        return contractSold.add(_contractAddress);
    }
}

File 4 of 15 : IStakingSettings.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @title IStakingSettings Settings governing a staking config for a marketplace.
 */
interface IStakingSettings {
    /**
     * @dev Get the staking percentage.
     * @return uint8 wei staking fee percentage.
     */
    function getStakingFeePercentage() external view returns (uint8);

    /**
     * @dev Utility function for calculating the staking fee for given amount of wei.
     * @param _amount uint256 wei amount.
     * @return uint256 wei fee.
     */
    function calculateStakingFee(uint256 _amount)
        external
        view
        returns (uint256);

    /**
     * @dev Utility function for calculating the marketplace payout fee for given amount of wei. marketplaceFee - stakingFee
     * @param _amount uint256 wei amount.
     * @return uint256 wei fee.
     */
    function calculateMarketplacePayoutFee(uint256 _amount)
        external
        view
        returns (uint256);
}

File 5 of 15 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 6 of 15 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

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

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

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

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

File 7 of 15 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```solidity
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

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

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

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

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

File 9 of 15 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

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

pragma solidity ^0.8.0;

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

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

File 11 of 15 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 12 of 15 : 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 13 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 14 of 15 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 15 of 15 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/ds-test/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "royalty-guard/=lib/royalty-guard/src/royalty-guard/",
    "forge-std/=lib/forge-std/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "solmate/=lib/royalty-guard/lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"address","name":"oldSettings","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_MARK_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"calculateMarketplaceFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"calculateMarketplacePayoutFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"calculatePrimarySaleFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"calculateStakingFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getERC721ContractPrimarySaleFeePercentage","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMarketplaceFeePercentage","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMarketplaceMaxValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMarketplaceMinValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStakingFeePercentage","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"grantMarketplaceAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"hasERC721TokenSold","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddress","type":"address"}],"name":"markContractAsSold","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bool","name":"_hasSold","type":"bool"}],"name":"markERC721Token","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_originContract","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"markTokensAsSold","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":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"uint8","name":"_percentage","type":"uint8"}],"name":"setERC721ContractPrimarySaleFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_percentage","type":"uint8"}],"name":"setMarketplaceFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxValue","type":"uint256"}],"name":"setMarketplaceMaxValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minValue","type":"uint256"}],"name":"setMarketplaceMinValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_primarySaleFeePercentage","type":"uint8"}],"name":"setPrimarySaleFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_percentage","type":"uint8"}],"name":"setStakingFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200180c3803806200180c8339810160408190526200003491620003a9565b6200003f33620001c7565b600160fe1b6005556103e86006556007805461ffff1916610f031790556002805460ff191690556001600160a01b038216620000d85760405162461bcd60e51b815260206004820152602d60248201527f636f6e7374727563746f723a3a4e6577206f776e65722061646472657373206360448201526c185b9b9bdd081899481b9d5b1b609a1b60648201526084015b60405180910390fd5b6001600160a01b038116620001565760405162461bcd60e51b815260206004820152603c60248201527f636f6e7374727563746f723a3a4f6c64204d61726b6574706c6163652053657460448201527f74696e677320616464726573732063616e6e6f74206265206e756c6c000000006064820152608401620000cf565b6200016360008362000217565b6200018f7fe403a42bbb760a8b3610033c6ca9047404adf765af465dfb889617dd2d64bf628362000217565b6200019a8262000227565b600280546001600160a01b0390921661010002610100600160a81b031990921691909117905550620003e1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620002238282620002a6565b5050565b620002316200032e565b6001600160a01b038116620002985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620000cf565b620002a381620001c7565b50565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16620002235760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000546001600160a01b031633146200038a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620000cf565b565b80516001600160a01b0381168114620003a457600080fd5b919050565b60008060408385031215620003bd57600080fd5b620003c8836200038c565b9150620003d8602084016200038c565b90509250929050565b61141b80620003f16000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c8063715018a61161010f578063ae312a97116100a2578063c60870d311610071578063c60870d314610411578063d547741f14610424578063f2fde38b14610437578063f9a23e861461044a57600080fd5b8063ae312a97146103bc578063b28a7bad146103ce578063b60c8135146103eb578063c3fc4952146103fe57600080fd5b80638e1addb2116100de5780638e1addb21461038357806391d14854146103965780639d5fb53c146103a9578063a217fddf146103b457600080fd5b8063715018a61461033457806382ebaa591461033c578063834759211461034f5780638da5cb5b1461036857600080fd5b8063364d6044116101875780635a3c652d116101565780635a3c652d146102f35780635c1b40f11461030657806362029a1b1461030e5780636357f1ac1461032157600080fd5b8063364d6044146102a557806336568abe146102b85780633765628c146102cb578063511bc84c146102e057600080fd5b8063248a9ca3116101c3578063248a9ca3146102485780632b702b5f1461026c5780632cfda2f11461027f5780632f2ff15d1461029257600080fd5b806301ffc9a7146101ea5780630ff77844146102125780631ad99c3714610233575b600080fd5b6101fd6101f8366004610fae565b610452565b60405190151581526020015b60405180910390f35b610225610220366004610fd8565b610489565b604051908152602001610209565b610246610241366004611007565b6104bc565b005b610225610256366004610fd8565b6000908152600160208190526040909120015490565b61024661027a366004611039565b6104e0565b61024661028d366004610fd8565b6105e6565b6102466102a03660046110bf565b6105f3565b6101fd6102b33660046110eb565b61061e565b6102466102c63660046110bf565b610720565b6102256000805160206113c683398151915281565b6101fd6102ee366004611106565b61079a565b61024661030136600461113e565b61083d565b600654610225565b61024661031c366004610fd8565b6108ea565b61022561032f366004611106565b6108f7565b610246610923565b61024661034a3660046110eb565b610937565b60075460ff165b60405160ff9091168152602001610209565b6000546040516001600160a01b039091168152602001610209565b610225610391366004610fd8565b6109c6565b6101fd6103a43660046110bf565b6109dc565b60025460ff16610356565b610225600081565b6102466103ca36600461117e565b5050565b6103566103dc3660046110eb565b50600754610100900460ff1690565b6102466103f9366004611007565b610a07565b61022561040c366004610fd8565b610a9f565b61024661041f366004611007565b610ab5565b6102466104323660046110bf565b610b63565b6102466104453660046110eb565b610b89565b600554610225565b60006001600160e01b03198216637965db0b60e01b148061048357506301ffc9a760e01b6001600160e01b03198316145b92915050565b6002546007546000916064916104a59160ff90811691166111be565b6104b29060ff16846111d7565b61048391906111ee565b6104c4610bff565b6007805460ff9092166101000261ff0019909216919091179055565b6104f86000805160206113c6833981519152336109dc565b61051d5760405162461bcd60e51b815260040161051490611210565b60405180910390fd5b6107d081111561059f5760405162461bcd60e51b815260206004820152604160248201527f6d61726b546f6b656e734173536f6c643a3a417474656d7074656420746f206d60448201527f61726b206d6f7265207468616e203230303020746f6b656e7320617320736f6c6064820152601960fa1b608482015260a401610514565b60005b818110156105e0576105ce848484848181106105c0576105c061126d565b90506020020135600161083d565b806105d881611283565b9150506105a2565b50505050565b6105ee610bff565b600555565b6000828152600160208190526040909120015461060f81610c59565b6106198383610c63565b505050565b60006106386000805160206113c6833981519152336109dc565b6106aa5760405162461bcd60e51b815260206004820152603b60248201527f6d61726b436f6e74726163743a3a4d757374206861766520544f4b454e5f4d4160448201527f524b5f524f4c4520726f6c6520746f2063616c6c206d6574686f6400000000006064820152608401610514565b600254604051630d93581160e21b81526001600160a01b0384811660048301526101009092049091169063364d6044906024016020604051808303816000875af11580156106fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610483919061129c565b6001600160a01b03811633146107905760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610514565b6103ca8282610cce565b6000806107a8600385610d35565b905080156107ba576001915050610483565b600254604051631446f21360e21b81526001600160a01b038681166004830152602482018690526101009092049091169063511bc84c90604401602060405180830381865afa158015610811573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610835919061129c565b949350505050565b6108556000805160206113c6833981519152336109dc565b6108715760405162461bcd60e51b815260040161051490611210565b600254604051635a3c652d60e01b81526001600160a01b03858116600483015260248201859052831515604483015261010090920490911690635a3c652d90606401600060405180830381600087803b1580156108cd57600080fd5b505af11580156108e1573d6000803e3d6000fd5b50505050505050565b6108f2610bff565b600655565b60075460009060649061091290610100900460ff16846111d7565b61091c91906111ee565b9392505050565b61092b610bff565b6109356000610d57565b565b6109426000336109dc565b6109ab5760405162461bcd60e51b815260206004820152603460248201527f6772616e744d61726b6574706c6163654163636573733a3a4d7573742062652060448201527318591b5a5b881d1bc818d85b1b081b595d1a1bd960621b6064820152608401610514565b6109c36000805160206113c6833981519152826105f3565b50565b6002546000906064906104b29060ff16846111d7565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610a0f610bff565b60648160ff161115610a895760405162461bcd60e51b815260206004820152603760248201527f7365744d61726b6574706c61636546656550657263656e746167653a3a5f706560448201527f7263656e74616765206d757374206265203c3d203130300000000000000000006064820152608401610514565b6007805460ff191660ff92909216919091179055565b6007546000906064906104b29060ff16846111d7565b610abd610bff565b60075460ff9081169082161115610b4d5760405162461bcd60e51b815260206004820152604860248201527f7365745374616b696e6746656550657263656e746167653a3a5f70657263656e60448201527f74616765206d757374206265203c3d206d61726b6574706c61636546656550656064820152677263656e7461676560c01b608482015260a401610514565b6002805460ff191660ff92909216919091179055565b60008281526001602081905260409091200154610b7f81610c59565b6106198383610cce565b610b91610bff565b6001600160a01b038116610bf65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610514565b6109c381610d57565b6000546001600160a01b031633146109355760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610514565b6109c38133610da7565b610c6d82826109dc565b6103ca5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610cd882826109dc565b156103ca5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0381166000908152600183016020526040812054151561091c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610db182826109dc565b6103ca57610dbe81610e00565b610dc9836020610e12565b604051602001610dda9291906112dd565b60408051601f198184030181529082905262461bcd60e51b825261051491600401611352565b60606104836001600160a01b03831660145b60606000610e218360026111d7565b610e2c906002611385565b67ffffffffffffffff811115610e4457610e44611398565b6040519080825280601f01601f191660200182016040528015610e6e576020820181803683370190505b509050600360fc1b81600081518110610e8957610e8961126d565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610eb857610eb861126d565b60200101906001600160f81b031916908160001a9053506000610edc8460026111d7565b610ee7906001611385565b90505b6001811115610f5f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610f1b57610f1b61126d565b1a60f81b828281518110610f3157610f3161126d565b60200101906001600160f81b031916908160001a90535060049490941c93610f58816113ae565b9050610eea565b50831561091c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610514565b600060208284031215610fc057600080fd5b81356001600160e01b03198116811461091c57600080fd5b600060208284031215610fea57600080fd5b5035919050565b803560ff8116811461100257600080fd5b919050565b60006020828403121561101957600080fd5b61091c82610ff1565b80356001600160a01b038116811461100257600080fd5b60008060006040848603121561104e57600080fd5b61105784611022565b9250602084013567ffffffffffffffff8082111561107457600080fd5b818601915086601f83011261108857600080fd5b81358181111561109757600080fd5b8760208260051b85010111156110ac57600080fd5b6020830194508093505050509250925092565b600080604083850312156110d257600080fd5b823591506110e260208401611022565b90509250929050565b6000602082840312156110fd57600080fd5b61091c82611022565b6000806040838503121561111957600080fd5b61112283611022565b946020939093013593505050565b80151581146109c357600080fd5b60008060006060848603121561115357600080fd5b61115c84611022565b925060208401359150604084013561117381611130565b809150509250925092565b6000806040838503121561119157600080fd5b61119a83611022565b91506110e260208401610ff1565b634e487b7160e01b600052601160045260246000fd5b60ff8281168282160390811115610483576104836111a8565b8082028115828204841417610483576104836111a8565b60008261120b57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252603e908201527f6d61726b455243373231546f6b656e3a3a4d757374206861766520544f4b454e60408201527f5f4d41524b5f524f4c4520726f6c6520746f2063616c6c206d6574686f640000606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060018201611295576112956111a8565b5060010190565b6000602082840312156112ae57600080fd5b815161091c81611130565b60005b838110156112d45781810151838201526020016112bc565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516113158160178501602088016112b9565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516113468160288401602088016112b9565b01602801949350505050565b60208152600082518060208401526113718160408501602087016112b9565b601f01601f19169190910160400192915050565b80820180821115610483576104836111a8565b634e487b7160e01b600052604160045260246000fd5b6000816113bd576113bd6111a8565b50600019019056fee403a42bbb760a8b3610033c6ca9047404adf765af465dfb889617dd2d64bf62a26469706673582212207664a4ffbd2dac586f8ebc9053c0f4cc2f6f3a4963e9bb5a5ea7b31b3c00d4fb64736f6c634300081200330000000000000000000000000bbf6fbb27645d6e587f63a260917ecd9b19b22f000000000000000000000000ec882716989e12c31e72c8a48924941d2ba5284e

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101e55760003560e01c8063715018a61161010f578063ae312a97116100a2578063c60870d311610071578063c60870d314610411578063d547741f14610424578063f2fde38b14610437578063f9a23e861461044a57600080fd5b8063ae312a97146103bc578063b28a7bad146103ce578063b60c8135146103eb578063c3fc4952146103fe57600080fd5b80638e1addb2116100de5780638e1addb21461038357806391d14854146103965780639d5fb53c146103a9578063a217fddf146103b457600080fd5b8063715018a61461033457806382ebaa591461033c578063834759211461034f5780638da5cb5b1461036857600080fd5b8063364d6044116101875780635a3c652d116101565780635a3c652d146102f35780635c1b40f11461030657806362029a1b1461030e5780636357f1ac1461032157600080fd5b8063364d6044146102a557806336568abe146102b85780633765628c146102cb578063511bc84c146102e057600080fd5b8063248a9ca3116101c3578063248a9ca3146102485780632b702b5f1461026c5780632cfda2f11461027f5780632f2ff15d1461029257600080fd5b806301ffc9a7146101ea5780630ff77844146102125780631ad99c3714610233575b600080fd5b6101fd6101f8366004610fae565b610452565b60405190151581526020015b60405180910390f35b610225610220366004610fd8565b610489565b604051908152602001610209565b610246610241366004611007565b6104bc565b005b610225610256366004610fd8565b6000908152600160208190526040909120015490565b61024661027a366004611039565b6104e0565b61024661028d366004610fd8565b6105e6565b6102466102a03660046110bf565b6105f3565b6101fd6102b33660046110eb565b61061e565b6102466102c63660046110bf565b610720565b6102256000805160206113c683398151915281565b6101fd6102ee366004611106565b61079a565b61024661030136600461113e565b61083d565b600654610225565b61024661031c366004610fd8565b6108ea565b61022561032f366004611106565b6108f7565b610246610923565b61024661034a3660046110eb565b610937565b60075460ff165b60405160ff9091168152602001610209565b6000546040516001600160a01b039091168152602001610209565b610225610391366004610fd8565b6109c6565b6101fd6103a43660046110bf565b6109dc565b60025460ff16610356565b610225600081565b6102466103ca36600461117e565b5050565b6103566103dc3660046110eb565b50600754610100900460ff1690565b6102466103f9366004611007565b610a07565b61022561040c366004610fd8565b610a9f565b61024661041f366004611007565b610ab5565b6102466104323660046110bf565b610b63565b6102466104453660046110eb565b610b89565b600554610225565b60006001600160e01b03198216637965db0b60e01b148061048357506301ffc9a760e01b6001600160e01b03198316145b92915050565b6002546007546000916064916104a59160ff90811691166111be565b6104b29060ff16846111d7565b61048391906111ee565b6104c4610bff565b6007805460ff9092166101000261ff0019909216919091179055565b6104f86000805160206113c6833981519152336109dc565b61051d5760405162461bcd60e51b815260040161051490611210565b60405180910390fd5b6107d081111561059f5760405162461bcd60e51b815260206004820152604160248201527f6d61726b546f6b656e734173536f6c643a3a417474656d7074656420746f206d60448201527f61726b206d6f7265207468616e203230303020746f6b656e7320617320736f6c6064820152601960fa1b608482015260a401610514565b60005b818110156105e0576105ce848484848181106105c0576105c061126d565b90506020020135600161083d565b806105d881611283565b9150506105a2565b50505050565b6105ee610bff565b600555565b6000828152600160208190526040909120015461060f81610c59565b6106198383610c63565b505050565b60006106386000805160206113c6833981519152336109dc565b6106aa5760405162461bcd60e51b815260206004820152603b60248201527f6d61726b436f6e74726163743a3a4d757374206861766520544f4b454e5f4d4160448201527f524b5f524f4c4520726f6c6520746f2063616c6c206d6574686f6400000000006064820152608401610514565b600254604051630d93581160e21b81526001600160a01b0384811660048301526101009092049091169063364d6044906024016020604051808303816000875af11580156106fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610483919061129c565b6001600160a01b03811633146107905760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610514565b6103ca8282610cce565b6000806107a8600385610d35565b905080156107ba576001915050610483565b600254604051631446f21360e21b81526001600160a01b038681166004830152602482018690526101009092049091169063511bc84c90604401602060405180830381865afa158015610811573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610835919061129c565b949350505050565b6108556000805160206113c6833981519152336109dc565b6108715760405162461bcd60e51b815260040161051490611210565b600254604051635a3c652d60e01b81526001600160a01b03858116600483015260248201859052831515604483015261010090920490911690635a3c652d90606401600060405180830381600087803b1580156108cd57600080fd5b505af11580156108e1573d6000803e3d6000fd5b50505050505050565b6108f2610bff565b600655565b60075460009060649061091290610100900460ff16846111d7565b61091c91906111ee565b9392505050565b61092b610bff565b6109356000610d57565b565b6109426000336109dc565b6109ab5760405162461bcd60e51b815260206004820152603460248201527f6772616e744d61726b6574706c6163654163636573733a3a4d7573742062652060448201527318591b5a5b881d1bc818d85b1b081b595d1a1bd960621b6064820152608401610514565b6109c36000805160206113c6833981519152826105f3565b50565b6002546000906064906104b29060ff16846111d7565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610a0f610bff565b60648160ff161115610a895760405162461bcd60e51b815260206004820152603760248201527f7365744d61726b6574706c61636546656550657263656e746167653a3a5f706560448201527f7263656e74616765206d757374206265203c3d203130300000000000000000006064820152608401610514565b6007805460ff191660ff92909216919091179055565b6007546000906064906104b29060ff16846111d7565b610abd610bff565b60075460ff9081169082161115610b4d5760405162461bcd60e51b815260206004820152604860248201527f7365745374616b696e6746656550657263656e746167653a3a5f70657263656e60448201527f74616765206d757374206265203c3d206d61726b6574706c61636546656550656064820152677263656e7461676560c01b608482015260a401610514565b6002805460ff191660ff92909216919091179055565b60008281526001602081905260409091200154610b7f81610c59565b6106198383610cce565b610b91610bff565b6001600160a01b038116610bf65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610514565b6109c381610d57565b6000546001600160a01b031633146109355760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610514565b6109c38133610da7565b610c6d82826109dc565b6103ca5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610cd882826109dc565b156103ca5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0381166000908152600183016020526040812054151561091c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610db182826109dc565b6103ca57610dbe81610e00565b610dc9836020610e12565b604051602001610dda9291906112dd565b60408051601f198184030181529082905262461bcd60e51b825261051491600401611352565b60606104836001600160a01b03831660145b60606000610e218360026111d7565b610e2c906002611385565b67ffffffffffffffff811115610e4457610e44611398565b6040519080825280601f01601f191660200182016040528015610e6e576020820181803683370190505b509050600360fc1b81600081518110610e8957610e8961126d565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610eb857610eb861126d565b60200101906001600160f81b031916908160001a9053506000610edc8460026111d7565b610ee7906001611385565b90505b6001811115610f5f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610f1b57610f1b61126d565b1a60f81b828281518110610f3157610f3161126d565b60200101906001600160f81b031916908160001a90535060049490941c93610f58816113ae565b9050610eea565b50831561091c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610514565b600060208284031215610fc057600080fd5b81356001600160e01b03198116811461091c57600080fd5b600060208284031215610fea57600080fd5b5035919050565b803560ff8116811461100257600080fd5b919050565b60006020828403121561101957600080fd5b61091c82610ff1565b80356001600160a01b038116811461100257600080fd5b60008060006040848603121561104e57600080fd5b61105784611022565b9250602084013567ffffffffffffffff8082111561107457600080fd5b818601915086601f83011261108857600080fd5b81358181111561109757600080fd5b8760208260051b85010111156110ac57600080fd5b6020830194508093505050509250925092565b600080604083850312156110d257600080fd5b823591506110e260208401611022565b90509250929050565b6000602082840312156110fd57600080fd5b61091c82611022565b6000806040838503121561111957600080fd5b61112283611022565b946020939093013593505050565b80151581146109c357600080fd5b60008060006060848603121561115357600080fd5b61115c84611022565b925060208401359150604084013561117381611130565b809150509250925092565b6000806040838503121561119157600080fd5b61119a83611022565b91506110e260208401610ff1565b634e487b7160e01b600052601160045260246000fd5b60ff8281168282160390811115610483576104836111a8565b8082028115828204841417610483576104836111a8565b60008261120b57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252603e908201527f6d61726b455243373231546f6b656e3a3a4d757374206861766520544f4b454e60408201527f5f4d41524b5f524f4c4520726f6c6520746f2063616c6c206d6574686f640000606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060018201611295576112956111a8565b5060010190565b6000602082840312156112ae57600080fd5b815161091c81611130565b60005b838110156112d45781810151838201526020016112bc565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516113158160178501602088016112b9565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516113468160288401602088016112b9565b01602801949350505050565b60208152600082518060208401526113718160408501602087016112b9565b601f01601f19169190910160400192915050565b80820180821115610483576104836111a8565b634e487b7160e01b600052604160045260246000fd5b6000816113bd576113bd6111a8565b50600019019056fee403a42bbb760a8b3610033c6ca9047404adf765af465dfb889617dd2d64bf62a26469706673582212207664a4ffbd2dac586f8ebc9053c0f4cc2f6f3a4963e9bb5a5ea7b31b3c00d4fb64736f6c63430008120033

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

0000000000000000000000000bbf6fbb27645d6e587f63a260917ecd9b19b22f000000000000000000000000ec882716989e12c31e72c8a48924941d2ba5284e

-----Decoded View---------------
Arg [0] : newOwner (address): 0x0bbF6fbB27645d6E587F63a260917EcD9B19b22F
Arg [1] : oldSettings (address): 0xec882716989e12C31e72C8A48924941D2bA5284E

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000bbf6fbb27645d6e587f63a260917ecd9b19b22f
Arg [1] : 000000000000000000000000ec882716989e12c31e72c8a48924941d2ba5284e


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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