ETH Price: $2,789.26 (+2.92%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...188823702023-12-28 6:36:59404 days ago1703745419IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0017052627.91942184
Set Approval For...184774662023-11-01 13:11:23461 days ago1698844283IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0017701128.98128397
Set Approval For...179524992023-08-20 0:50:59534 days ago1692492659IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0007625612.48508704
Safe Transfer Fr...176375142023-07-06 21:36:11578 days ago1688679371IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0015003729.21469618
Set Approval For...176053172023-07-02 9:04:35583 days ago1688288675IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0008120413.29526517
Set Approval For...173675802023-05-29 22:22:47616 days ago1685398967IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0015778625.83355998
Safe Transfer Fr...171301002023-04-26 11:27:59650 days ago1682508479IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0013374334.24324283
Safe Transfer Fr...171218772023-04-25 7:45:11651 days ago1682408711IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0012026735.10751825
Safe Transfer Fr...171218562023-04-25 7:40:59651 days ago1682408459IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0011448733.4202408
Safe Transfer Fr...171218532023-04-25 7:40:23651 days ago1682408423IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0012326635.99543836
Safe Transfer Fr...171218232023-04-25 7:34:11651 days ago1682408051IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0010899931.82944414
Safe Transfer Fr...171217992023-04-25 7:29:23651 days ago1682407763IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0010993232.10178592
Set Approval For...170597672023-04-16 13:33:47660 days ago1681652027IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0015044224.63127688
Set Approval For...170449262023-04-14 10:47:47662 days ago1681469267IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0016003126.20117305
Set Approval For...170312052023-04-12 10:01:35664 days ago1681293695IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0016256326.61580153
Set Approval For...169505372023-03-31 23:46:35675 days ago1680306395IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0011325218.54231292
Set Approval For...169354692023-03-29 21:00:35677 days ago1680123635IN
0xe47C2B9d...0B39EeEF5
0 ETH0.00183129.97811398
Set Approval For...169202352023-03-27 17:33:59679 days ago1679938439IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0026358843.15610885
Set Approval For...169173152023-03-27 7:44:23680 days ago1679903063IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0010861717.78332688
Set Approval For...169050862023-03-25 14:31:11682 days ago1679754671IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0011995419.63961443
Set Approval For...169048722023-03-25 13:47:59682 days ago1679752079IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0012606120.63947695
Set Approval For...169004192023-03-24 22:47:47682 days ago1679698067IN
0xe47C2B9d...0B39EeEF5
0 ETH0.00133521.85740335
Set Approval For...168991632023-03-24 18:32:35682 days ago1679682755IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0014945124.4689667
Set Approval For...168942522023-03-24 2:00:11683 days ago1679623211IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0008384213.7271016
Set Approval For...168929322023-03-23 21:32:47683 days ago1679607167IN
0xe47C2B9d...0B39EeEF5
0 ETH0.0014562523.84255464
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RedNight

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 19 : RedNight.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.17;

import {ERC1155Base} from "./ERC1155Base.sol";
import {RED_NIGHT_ID} from "./Constants.sol";
import {IRedNight} from "./interfaces/IRedNight.sol";

/**
 * @author Fount Gallery
 * @title  Tormius 23: "Red Night"
 * @notice
 * Features:
 *   - Red Night Open Edition
 *   - Shared metadata contract with the 1/1 from the same collection
 *   - On-chain royalties standard (EIP-2981)
 *   - Support for OpenSea's Operator Filterer to allow royalties
 */
contract RedNight is IRedNight, ERC1155Base {
    /* ------------------------------------------------------------------------
       I N I T
    ------------------------------------------------------------------------ */

    /**
     * @param owner_ The owner of the contract
     * @param payments_ The address where payments should be sent
     * @param royaltiesAmount_ The royalty percentage with two decimals (10,000 = 100%)
     * @param metadata_ The initial metadata contract address
     */
    constructor(
        address owner_,
        address payments_,
        uint256 royaltiesAmount_,
        address metadata_
    ) ERC1155Base(owner_, payments_, royaltiesAmount_, metadata_) {}

    /* ------------------------------------------------------------------------
       M I N T
    ------------------------------------------------------------------------ */

    /**
     * @notice Mints an edition of "Red Night"
     * @dev Only approved addresses can mint, for example the sale contract
     * @param to The address to mint to
     */
    function mintRedNight(address to) external {
        require(approvedMinters[msg.sender], "Only approved addresses can mint");
        _mint(to, RED_NIGHT_ID, 1, "");
    }
}

File 2 of 19 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @notice Optimized and flexible operator filterer to abide to OpenSea's
/// mandatory on-chain royalty enforcement in order for new collections to
/// receive royalties.
/// For more information, see:
/// See: https://github.com/ProjectOpenSea/operator-filter-registry
abstract contract OperatorFilterer {
    /// @dev The default OpenSea operator blocklist subscription.
    address internal constant _DEFAULT_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;

    /// @dev The OpenSea operator filter registry.
    address internal constant _OPERATOR_FILTER_REGISTRY = 0x000000000000AAeB6D7670E522A718067333cd4E;

    /// @dev Registers the current contract to OpenSea's operator filter,
    /// and subscribe to the default OpenSea operator blocklist.
    /// Note: Will not revert nor update existing settings for repeated registration.
    function _registerForOperatorFiltering() internal virtual {
        _registerForOperatorFiltering(_DEFAULT_SUBSCRIPTION, true);
    }

    /// @dev Registers the current contract to OpenSea's operator filter.
    /// Note: Will not revert nor update existing settings for repeated registration.
    function _registerForOperatorFiltering(address subscriptionOrRegistrantToCopy, bool subscribe)
        internal
        virtual
    {
        /// @solidity memory-safe-assembly
        assembly {
            let functionSelector := 0x7d3e3dbe // `registerAndSubscribe(address,address)`.

            // Clean the upper 96 bits of `subscriptionOrRegistrantToCopy` in case they are dirty.
            subscriptionOrRegistrantToCopy := shr(96, shl(96, subscriptionOrRegistrantToCopy))

            for {} iszero(subscribe) {} {
                if iszero(subscriptionOrRegistrantToCopy) {
                    functionSelector := 0x4420e486 // `register(address)`.
                    break
                }
                functionSelector := 0xa0af2903 // `registerAndCopyEntries(address,address)`.
                break
            }
            // Store the function selector.
            mstore(0x00, shl(224, functionSelector))
            // Store the `address(this)`.
            mstore(0x04, address())
            // Store the `subscriptionOrRegistrantToCopy`.
            mstore(0x24, subscriptionOrRegistrantToCopy)
            // Register into the registry.
            if iszero(call(gas(), _OPERATOR_FILTER_REGISTRY, 0, 0x00, 0x44, 0x00, 0x04)) {
                // If the function selector has not been overwritten,
                // it is an out-of-gas error.
                if eq(shr(224, mload(0x00)), functionSelector) {
                    // To prevent gas under-estimation.
                    revert(0, 0)
                }
            }
            // Restore the part of the free memory pointer that was overwritten,
            // which is guaranteed to be zero, because of Solidity's memory size limits.
            mstore(0x24, 0)
        }
    }

    /// @dev Modifier to guard a function and revert if the caller is a blocked operator.
    modifier onlyAllowedOperator(address from) virtual {
        if (from != msg.sender) {
            if (!_isPriorityOperator(msg.sender)) {
                if (_operatorFilteringEnabled()) _revertIfBlocked(msg.sender);
            }
        }
        _;
    }

    /// @dev Modifier to guard a function from approving a blocked operator..
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        if (!_isPriorityOperator(operator)) {
            if (_operatorFilteringEnabled()) _revertIfBlocked(operator);
        }
        _;
    }

    /// @dev Helper function that reverts if the `operator` is blocked by the registry.
    function _revertIfBlocked(address operator) private view {
        /// @solidity memory-safe-assembly
        assembly {
            // Store the function selector of `isOperatorAllowed(address,address)`,
            // shifted left by 6 bytes, which is enough for 8tb of memory.
            // We waste 6-3 = 3 bytes to save on 6 runtime gas (PUSH1 0x224 SHL).
            mstore(0x00, 0xc6171134001122334455)
            // Store the `address(this)`.
            mstore(0x1a, address())
            // Store the `operator`.
            mstore(0x3a, operator)

            // `isOperatorAllowed` always returns true if it does not revert.
            if iszero(staticcall(gas(), _OPERATOR_FILTER_REGISTRY, 0x16, 0x44, 0x00, 0x00)) {
                // Bubble up the revert if the staticcall reverts.
                returndatacopy(0x00, 0x00, returndatasize())
                revert(0x00, returndatasize())
            }

            // We'll skip checking if `from` is inside the blacklist.
            // Even though that can block transferring out of wrapper contracts,
            // we don't want tokens to be stuck.

            // Restore the part of the free memory pointer that was overwritten,
            // which is guaranteed to be zero, if less than 8tb of memory is used.
            mstore(0x3a, 0)
        }
    }

    /// @dev For deriving contracts to override, so that operator filtering
    /// can be turned on / off.
    /// Returns true by default.
    function _operatorFilteringEnabled() internal view virtual returns (bool) {
        return true;
    }

    /// @dev For deriving contracts to override, so that preferred marketplaces can
    /// skip operator filtering, helping users save gas.
    /// Returns false for all inputs by default.
    function _isPriorityOperator(address) internal view virtual returns (bool) {
        return false;
    }
}

File 3 of 19 : FountCardCheck.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.15;

import "openzeppelin/token/ERC1155/IERC1155.sol";

/**
 * @author Sam King (samkingstudio.eth) for Fount Gallery
 * @title  Fount Gallery Card Check
 * @notice Utility functions to check ownership of a Fount Gallery Patron Card NFT
 */
contract FountCardCheck {
    /// @dev Address of the Fount Gallery Patron Card contract
    IERC1155 internal _fountCard;

    /// @dev Does not own a Fount Gallery Patron Card
    error NotFountCardHolder();

    /**
     * @dev Does not own enough Fount Gallery Patron Cards
     * @param required The minimum amount of cards that need to be owned
     * @param owned The actualy amount of cards owned
     */
    error DoesNotHoldEnoughFountCards(uint256 required, uint256 owned);

    /**
     * @dev Init with the Fount Gallery Patron Card contract address
     * @param fountCard The Fount Gallery Patron Card contract address
     */
    constructor(address fountCard) {
        _fountCard = IERC1155(fountCard);
    }

    /**
     * @dev Modifier that only allows the caller to do something if they hold
     * a Fount Gallery Patron Card
     */
    modifier onlyWhenFountCardHolder() {
        if (_getFountCardBalance(msg.sender) < 1) revert NotFountCardHolder();
        _;
    }

    /**
     * @dev Modifier that only allows the caller to do something if they hold
     * at least a specific amount Fount Gallery Patron Cards
     * @param minAmount The minimum amount of cards that need to be owned
     */
    modifier onlyWhenHoldingMinFountCards(uint256 minAmount) {
        uint256 balance = _getFountCardBalance(msg.sender);
        if (minAmount > balance) revert DoesNotHoldEnoughFountCards(minAmount, balance);
        _;
    }

    /**
     * @dev Get the number of Fount Gallery Patron Cards an address owns
     * @param owner The owner address to query
     * @return balance The balance of the owner
     */
    function _getFountCardBalance(address owner) internal view returns (uint256 balance) {
        balance = _fountCard.balanceOf(owner, 1);
    }

    /**
     * @dev Check if an address holds at least one Fount Gallery Patron Card
     * @param owner The owner address to query
     * @return isHolder If the owner holds at least one card
     */
    function _isFountCardHolder(address owner) internal view returns (bool isHolder) {
        isHolder = _getFountCardBalance(owner) > 0;
    }
}

File 4 of 19 : SwappableMetadata.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.15;

/**
 * @author Sam King (samkingstudio.eth) for Fount Gallery
 * @title  Swappable metadata module
 * @notice Allows the use of a separate and swappable metadata contract
 */
abstract contract SwappableMetadata {
    /* ------------------------------------------------------------------------
                                   S T O R A G E
    ------------------------------------------------------------------------ */

    /// @notice Address of metadata contract
    address public metadata;

    /// @notice Flag for whether the metadata address can be updated or not
    bool public isMetadataLocked;

    /* ------------------------------------------------------------------------
                                    E R R O R S
    ------------------------------------------------------------------------ */

    error MetadataLocked();

    /* ------------------------------------------------------------------------
                                    E V E N T S
    ------------------------------------------------------------------------ */

    /**
     * @dev When the metadata contract has been set
     * @param metadataContract The new metadata contract address
     */
    event MetadataContractSet(address indexed metadataContract);

    /**
     * @dev When the metadata contract has been locked and is no longer swappable
     * @param metadataContract The final locked metadata contract address
     */
    event MetadataContractLocked(address indexed metadataContract);

    /* ------------------------------------------------------------------------
                                      I N I T
    ------------------------------------------------------------------------ */

    /**
     * @param metadata_ The address of the initial metadata contract
     */
    constructor(address metadata_) {
        metadata = metadata_;
        emit MetadataContractSet(metadata_);
    }

    /* ------------------------------------------------------------------------
                                     A D M I N
    ------------------------------------------------------------------------ */

    /**
     * @notice Sets the metadata address
     * @param metadata_ The new address of the metadata contract
     */
    function _setMetadataAddress(address metadata_) internal {
        if (isMetadataLocked) revert MetadataLocked();
        metadata = metadata_;
        emit MetadataContractSet(metadata_);
    }

    /**
     * @notice Sets the metadata address
     * @param metadata The new address of the metadata contract
     */
    function setMetadataAddress(address metadata) public virtual;

    /**
     * @dev Locks the metadata address preventing further updates
     */
    function _lockMetadata() internal {
        isMetadataLocked = true;
        emit MetadataContractLocked(metadata);
    }
}

File 5 of 19 : Royalties.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.15;

import "openzeppelin/interfaces/IERC2981.sol";

/**
 * @author Sam King (samkingstudio.eth) for Fount Gallery
 * @title  Royalty payments
 * @notice Support for the royalty standard (ERC-2981)
 */
abstract contract Royalties is IERC2981 {
    /* ------------------------------------------------------------------------
                                   S T O R A G E
    ------------------------------------------------------------------------ */

    /// @dev Store information about token royalties
    struct RoyaltyInfo {
        address receiver;
        uint96 amount;
    }

    /// @dev The current royalty information
    RoyaltyInfo internal _royaltyInfo;

    /// @dev Interface id for the royalty information standard
    /// bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a
    bytes4 internal constant ROYALTY_INTERFACE_ID = 0x2a55205a;

    /* ------------------------------------------------------------------------
                                    E R R O R S
    ------------------------------------------------------------------------ */

    error MoreThanOneHundredPercentRoyalty();

    /* ------------------------------------------------------------------------
                                    E V E N T S
    ------------------------------------------------------------------------ */

    event RoyaltyInfoSet(address indexed receiver, uint256 indexed amount);
    event RoyaltyInfoUpdated(address indexed receiver, uint256 indexed amount);

    /* ------------------------------------------------------------------------
                                      I N I T
    ------------------------------------------------------------------------ */

    /**
     * @param royaltiesReceiver The receiver of royalty payments
     * @param royaltiesAmount The royalty percentage with two decimals (10,000 = 100%)
     */
    constructor(address royaltiesReceiver, uint256 royaltiesAmount) {
        _royaltyInfo = RoyaltyInfo(royaltiesReceiver, uint96(royaltiesAmount));
        emit RoyaltyInfoSet(royaltiesReceiver, royaltiesAmount);
    }

    /* ------------------------------------------------------------------------
                                  E R C 2 9 8 1
    ------------------------------------------------------------------------ */

    /// @notice EIP-2981 royalty standard for on-chain royalties
    function royaltyInfo(uint256, uint256 salePrice)
        public
        view
        virtual
        returns (address receiver, uint256 royaltyAmount)
    {
        receiver = _royaltyInfo.receiver;
        royaltyAmount = (salePrice * _royaltyInfo.amount) / 100_00;
    }

    /* ------------------------------------------------------------------------
                                     A D M I N
    ------------------------------------------------------------------------ */

    /**
     * @dev Internal function to set the royalty information
     * @param receiver The receiver of royalty payments
     * @param amount The royalty percentage with two decimals (10,000 = 100%)
     */
    function _setRoyaltyInfo(address receiver, uint256 amount) internal {
        if (amount > 100_00) revert MoreThanOneHundredPercentRoyalty();
        _royaltyInfo = RoyaltyInfo(receiver, uint24(amount));
        emit RoyaltyInfoUpdated(receiver, amount);
    }
}

File 6 of 19 : Withdraw.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.15;

import "openzeppelin/token/ERC20/IERC20.sol";
import "openzeppelin/token/ERC721/IERC721.sol";
import "openzeppelin/token/ERC1155/IERC1155.sol";

/**
 * @author Sam King (samkingstudio.eth) for Fount Gallery
 * @title  Withdraw ETH and tokens module
 * @notice Allows the withdrawal of ETH, ERC20, ERC721, an ERC1155 tokens
 */
abstract contract Withdraw {
    /* ------------------------------------------------------------------------
                                    E R R O R S
    ------------------------------------------------------------------------ */

    error CannotWithdrawToZeroAddress();
    error WithdrawFailed();
    error BalanceTooLow();
    error ZeroBalance();

    /* ------------------------------------------------------------------------
                                  W I T H D R A W
    ------------------------------------------------------------------------ */

    function _withdrawETH(address to) internal {
        // Prevent withdrawing to the zero address
        if (to == address(0)) revert CannotWithdrawToZeroAddress();

        // Check there is eth to withdraw
        uint256 balance = address(this).balance;
        if (balance == 0) revert ZeroBalance();

        // Transfer funds
        (bool success, ) = payable(to).call{value: balance}("");
        if (!success) revert WithdrawFailed();
    }

    function _withdrawToken(address tokenAddress, address to) internal {
        // Prevent withdrawing to the zero address
        if (to == address(0)) revert CannotWithdrawToZeroAddress();

        // Check there are tokens to withdraw
        uint256 balance = IERC20(tokenAddress).balanceOf(address(this));
        if (balance == 0) revert ZeroBalance();

        // Transfer tokens
        bool success = IERC20(tokenAddress).transfer(to, balance);
        if (!success) revert WithdrawFailed();
    }

    function _withdrawERC721Token(
        address tokenAddress,
        uint256 id,
        address to
    ) internal {
        // Prevent withdrawing to the zero address
        if (to == address(0)) revert CannotWithdrawToZeroAddress();

        // Check the NFT is in this contract
        address owner = IERC721(tokenAddress).ownerOf(id);
        if (owner != address(this)) revert ZeroBalance();

        // Transfer NFT
        IERC721(tokenAddress).transferFrom(address(this), to, id);
    }

    function _withdrawERC1155Token(
        address tokenAddress,
        uint256 id,
        uint256 amount,
        address to
    ) internal {
        // Prevent withdrawing to the zero address
        if (to == address(0)) revert CannotWithdrawToZeroAddress();

        // Check the tokens are owned by this contract, and there's at least `amount`
        uint256 balance = IERC1155(tokenAddress).balanceOf(address(this), id);
        if (balance == 0) revert ZeroBalance();
        if (amount > balance) revert BalanceTooLow();

        // Transfer tokens
        IERC1155(tokenAddress).safeTransferFrom(address(this), to, id, amount, "");
    }
}

File 7 of 19 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

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

File 8 of 19 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 9 of 19 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

File 10 of 19 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 11 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

    /**
     * @dev 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 12 of 19 : 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 13 of 19 : Owned.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Simple single owner authorization mixin.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol)
abstract contract Owned {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event OwnerUpdated(address indexed user, address indexed newOwner);

    /*//////////////////////////////////////////////////////////////
                            OWNERSHIP STORAGE
    //////////////////////////////////////////////////////////////*/

    address public owner;

    modifier onlyOwner() virtual {
        require(msg.sender == owner, "UNAUTHORIZED");

        _;
    }

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(address _owner) {
        owner = _owner;

        emit OwnerUpdated(address(0), _owner);
    }

    /*//////////////////////////////////////////////////////////////
                             OWNERSHIP LOGIC
    //////////////////////////////////////////////////////////////*/

    function setOwner(address newOwner) public virtual onlyOwner {
        owner = newOwner;

        emit OwnerUpdated(msg.sender, newOwner);
    }
}

File 14 of 19 : ERC1155.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Minimalist and gas efficient standard ERC1155 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC1155.sol)
abstract contract ERC1155 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event TransferSingle(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256 id,
        uint256 amount
    );

    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] amounts
    );

    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    event URI(string value, uint256 indexed id);

    /*//////////////////////////////////////////////////////////////
                             ERC1155 STORAGE
    //////////////////////////////////////////////////////////////*/

    mapping(address => mapping(uint256 => uint256)) public balanceOf;

    mapping(address => mapping(address => bool)) public isApprovedForAll;

    /*//////////////////////////////////////////////////////////////
                             METADATA LOGIC
    //////////////////////////////////////////////////////////////*/

    function uri(uint256 id) public view virtual returns (string memory);

    /*//////////////////////////////////////////////////////////////
                              ERC1155 LOGIC
    //////////////////////////////////////////////////////////////*/

    function setApprovalForAll(address operator, bool approved) public virtual {
        isApprovedForAll[msg.sender][operator] = approved;

        emit ApprovalForAll(msg.sender, operator, approved);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) public virtual {
        require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED");

        balanceOf[from][id] -= amount;
        balanceOf[to][id] += amount;

        emit TransferSingle(msg.sender, from, to, id, amount);

        require(
            to.code.length == 0
                ? to != address(0)
                : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, from, id, amount, data) ==
                    ERC1155TokenReceiver.onERC1155Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) public virtual {
        require(ids.length == amounts.length, "LENGTH_MISMATCH");

        require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED");

        // Storing these outside the loop saves ~15 gas per iteration.
        uint256 id;
        uint256 amount;

        for (uint256 i = 0; i < ids.length; ) {
            id = ids[i];
            amount = amounts[i];

            balanceOf[from][id] -= amount;
            balanceOf[to][id] += amount;

            // An array can't have a total length
            // larger than the max uint256 value.
            unchecked {
                ++i;
            }
        }

        emit TransferBatch(msg.sender, from, to, ids, amounts);

        require(
            to.code.length == 0
                ? to != address(0)
                : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, from, ids, amounts, data) ==
                    ERC1155TokenReceiver.onERC1155BatchReceived.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    function balanceOfBatch(address[] calldata owners, uint256[] calldata ids)
        public
        view
        virtual
        returns (uint256[] memory balances)
    {
        require(owners.length == ids.length, "LENGTH_MISMATCH");

        balances = new uint256[](owners.length);

        // Unchecked because the only math done is incrementing
        // the array index counter which cannot possibly overflow.
        unchecked {
            for (uint256 i = 0; i < owners.length; ++i) {
                balances[i] = balanceOf[owners[i]][ids[i]];
            }
        }
    }

    /*//////////////////////////////////////////////////////////////
                              ERC165 LOGIC
    //////////////////////////////////////////////////////////////*/

    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return
            interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165
            interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155
            interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        balanceOf[to][id] += amount;

        emit TransferSingle(msg.sender, address(0), to, id, amount);

        require(
            to.code.length == 0
                ? to != address(0)
                : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, address(0), id, amount, data) ==
                    ERC1155TokenReceiver.onERC1155Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    function _batchMint(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        uint256 idsLength = ids.length; // Saves MLOADs.

        require(idsLength == amounts.length, "LENGTH_MISMATCH");

        for (uint256 i = 0; i < idsLength; ) {
            balanceOf[to][ids[i]] += amounts[i];

            // An array can't have a total length
            // larger than the max uint256 value.
            unchecked {
                ++i;
            }
        }

        emit TransferBatch(msg.sender, address(0), to, ids, amounts);

        require(
            to.code.length == 0
                ? to != address(0)
                : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, address(0), ids, amounts, data) ==
                    ERC1155TokenReceiver.onERC1155BatchReceived.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    function _batchBurn(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        uint256 idsLength = ids.length; // Saves MLOADs.

        require(idsLength == amounts.length, "LENGTH_MISMATCH");

        for (uint256 i = 0; i < idsLength; ) {
            balanceOf[from][ids[i]] -= amounts[i];

            // An array can't have a total length
            // larger than the max uint256 value.
            unchecked {
                ++i;
            }
        }

        emit TransferBatch(msg.sender, from, address(0), ids, amounts);
    }

    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        balanceOf[from][id] -= amount;

        emit TransferSingle(msg.sender, from, address(0), id, amount);
    }
}

/// @notice A generic interface for a contract which properly accepts ERC1155 tokens.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC1155.sol)
abstract contract ERC1155TokenReceiver {
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes calldata
    ) external virtual returns (bytes4) {
        return ERC1155TokenReceiver.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] calldata,
        uint256[] calldata,
        bytes calldata
    ) external virtual returns (bytes4) {
        return ERC1155TokenReceiver.onERC1155BatchReceived.selector;
    }
}

File 15 of 19 : Constants.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.17;

uint256 constant CIRCULAR_TENSION_ID = 1;
uint256 constant FALLEN_ANGEL_ID = 2;
uint256 constant RED_NIGHT_ID = 3;

File 16 of 19 : ERC1155Base.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.17;

import {ERC1155} from "solmate/tokens/ERC1155.sol";
import {Owned} from "solmate/auth/Owned.sol";
import {FountCardCheck} from "fount-contracts/community/FountCardCheck.sol";
import {SwappableMetadata} from "fount-contracts/extensions/SwappableMetadata.sol";
import {Royalties} from "fount-contracts/utils/Royalties.sol";
import {OperatorFilterer} from "closedsea/OperatorFilterer.sol";
import {Withdraw} from "fount-contracts/utils/Withdraw.sol";
import {IPayments} from "./interfaces/IPayments.sol";
import {IERC20} from "openzeppelin/token/ERC20/IERC20.sol";
import {IERC165} from "openzeppelin/interfaces/IERC165.sol";
import {IMetadata} from "./interfaces/IMetadata.sol";

/**
 * @author Fount Gallery
 * @title  ERC1155Base
 * @notice Base contract for Tormius 23 to inherit from
 *
 * Features:
 *   - Swappable metadata contract
 *   - On-chain royalties standard (EIP-2981)
 *   - Support for OpenSea's Operator Filterer to allow royalties
 */
abstract contract ERC1155Base is
    ERC1155,
    Owned,
    SwappableMetadata,
    Royalties,
    OperatorFilterer,
    Withdraw
{
    /* ------------------------------------------------------------------------
       S T O R A G E
    ------------------------------------------------------------------------ */

    string public name = "Tormius 23";
    string public symbol = "TOR23";

    /// @notice Contract information
    string public contractURI;

    /// @notice Approved minting addresses
    mapping(address => bool) public approvedMinters;

    /// @notice If operator filtering is applied
    bool public operatorFilteringEnabled;

    /// @notice Address where royalties/stuck funds should be sent
    address public payments;

    /* ------------------------------------------------------------------------
       E R R O R S
    ------------------------------------------------------------------------ */

    error CannotSetPaymentAddressToZero();

    /* ------------------------------------------------------------------------
       E V E N T S
    ------------------------------------------------------------------------ */

    event Init();

    /* ------------------------------------------------------------------------
       I N I T
    ------------------------------------------------------------------------ */

    /**
     * @param owner_ The owner of the contract
     * @param payments_ The admin of the contract
     * @param royaltiesAmount_ The royalty percentage with two decimals (10,000 = 100%)
     * @param metadata_ The initial metadata contract address
     */
    constructor(
        address owner_,
        address payments_,
        uint256 royaltiesAmount_,
        address metadata_
    ) ERC1155() Owned(owner_) SwappableMetadata(metadata_) Royalties(payments_, royaltiesAmount_) {
        payments = payments_;
        _registerForOperatorFiltering();
        operatorFilteringEnabled = true;
        emit Init();
    }

    /* ------------------------------------------------------------------------
       A D M I N
    ------------------------------------------------------------------------ */

    /** MINTERS ------------------------------------------------------------ */

    /**
     * @notice Admin function to set a minter address
     * @param minter The address of the new minter
     * @param approved If the minter is approved
     */
    function setMinter(address minter, bool approved) external onlyOwner {
        approvedMinters[minter] = approved;
    }

    /** METADATA ----------------------------------------------------------- */

    /**
     * @notice Admin function to set the metadata contract address
     * @param metadata The new metadata contract address
     */
    function setMetadataAddress(address metadata) public override onlyOwner {
        _setMetadataAddress(metadata);
    }

    /**
     * @notice Admin function to set the contract URI for marketplaces
     * @param contractURI_ The new contract URI
     */
    function setContractURI(string memory contractURI_) external onlyOwner {
        contractURI = contractURI_;
    }

    /** ROYALTIES ---------------------------------------------------------- */

    /**
     * @notice Admin function to set the royalty information
     * @param receiver The receiver of royalty payments
     * @param amount The royalty percentage with two decimals (10,000 = 100%)
     */
    function setRoyaltyInfo(address receiver, uint256 amount) external onlyOwner {
        _setRoyaltyInfo(receiver, amount);
    }

    /**
     * @notice Admin function to set whether OpenSea's Operator Filtering should be enabled
     * @param enabled If the operator filtering should be enabled
     */
    function setOperatorFilteringEnabled(bool enabled) external onlyOwner {
        operatorFilteringEnabled = enabled;
    }

    function registerForOperatorFiltering(
        address subscriptionOrRegistrantToCopy,
        bool subscribe
    ) external onlyOwner {
        _registerForOperatorFiltering(subscriptionOrRegistrantToCopy, subscribe);
    }

    /** PAYMENTS ----------------------------------------------------------- */

    /**
     * @notice Admin function to set the payment address for withdrawing stuck funds
     * @param paymentAddress The new address where payments should be sent upon withdrawal
     */
    function setPaymentAddress(address paymentAddress) external onlyOwner {
        if (paymentAddress == address(0)) revert CannotSetPaymentAddressToZero();
        payments = paymentAddress;
    }

    /* ------------------------------------------------------------------------
       R O T A L T I E S
    ------------------------------------------------------------------------ */

    /**
     * @notice Add interface for on-chain royalty standard
     */
    function supportsInterface(
        bytes4 interfaceId
    ) public view override(ERC1155, IERC165) returns (bool) {
        return interfaceId == ROYALTY_INTERFACE_ID || super.supportsInterface(interfaceId);
    }

    /**
     * @notice Repeats the OpenSea Operator Filtering registration
     */
    function repeatRegistration() public {
        _registerForOperatorFiltering();
    }

    /**
     * @notice Override ERC-1155 `setApprovalForAll` to support OpenSea Operator Filtering
     */
    function setApprovalForAll(
        address operator,
        bool approved
    ) public override onlyAllowedOperatorApproval(operator) {
        super.setApprovalForAll(operator, approved);
    }

    /**
     * @notice Override ERC-1155 `safeTransferFrom` to support OpenSea Operator Filtering
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) public override onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @notice Override ERC-1155 `safeTransferFrom` to support OpenSea Operator Filtering
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) public virtual override onlyAllowedOperator(from) {
        super.safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Override `OperatorFilterer._operatorFilteringEnabled` to return whether
     * the operator filtering is enabled in this contract.
     */
    function _operatorFilteringEnabled() internal view virtual override returns (bool) {
        return operatorFilteringEnabled;
    }

    /* ------------------------------------------------------------------------
       W I T H D R A W
    ------------------------------------------------------------------------ */

    /**
     * @notice Admin function to withdraw stuck ETH
     * @dev Withdraws to the `payments` address. Reverts if the payments address is set to zero.
     */
    function withdrawETH() public {
        _withdrawETH(payments);
    }

    /**
     * @notice Admin function to withdraw stuck ERC-20 tokens
     * @dev Withdraws to the `payments` address. Reverts if the payments address is set to zero.
     */
    function withdrawTokens(address tokenAddress) public {
        _withdrawToken(tokenAddress, payments);
    }

    /* ------------------------------------------------------------------------
       E R C 1 1 5 5
    ------------------------------------------------------------------------ */

    /**
     * @notice Returns the token metadata
     * @return id The token id to get metadata for
     */
    function uri(uint256 id) public view override returns (string memory) {
        return IMetadata(metadata).tokenURI(id);
    }

    /**
     * @notice Burn a token. You can only burn tokens you own.
     * @param id The token id to burn
     * @param amount The amount to burn
     */
    function burn(uint256 id, uint256 amount) external {
        require(balanceOf[msg.sender][id] >= amount, "CANNOT_BURN");
        _burn(msg.sender, id, amount);
    }
}

File 17 of 19 : IMetadata.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.17;

interface IMetadata {
    function tokenURI(uint256 id) external view returns (string memory);
}

File 18 of 19 : IPayments.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.17;

interface IPayments {
    function releaseAllETH() external;

    function releaseAllToken(address tokenAddress) external;
}

File 19 of 19 : IRedNight.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.17;

interface IRedNight {
    function mintRedNight(address to) external;
}

Settings
{
  "remappings": [
    "closedsea/=packages/contracts/lib/closedsea/src/",
    "ds-test/=packages/contracts/lib/ds-test/src/",
    "erc4626-tests/=packages/contracts/lib/closedsea/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "erc721a-upgradeable/=packages/contracts/lib/closedsea/lib/erc721a-upgradeable/contracts/",
    "erc721a/=packages/contracts/lib/closedsea/lib/erc721a/contracts/",
    "ethier/=packages/contracts/lib/fount-contracts/lib/ethier/",
    "forge-std/=packages/contracts/lib/forge-std/src/",
    "fount-23/=packages/contracts/src/",
    "fount-contracts/=packages/contracts/lib/fount-contracts/src/",
    "openzeppelin-contracts-upgradeable/=packages/contracts/lib/closedsea/lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=packages/contracts/lib/openzeppelin-contracts/",
    "openzeppelin/=packages/contracts/lib/openzeppelin-contracts/contracts/",
    "operator-filter-registry/=packages/contracts/lib/closedsea/lib/operator-filter-registry/",
    "solmate/=packages/contracts/lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "none"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"payments_","type":"address"},{"internalType":"uint256","name":"royaltiesAmount_","type":"uint256"},{"internalType":"address","name":"metadata_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BalanceTooLow","type":"error"},{"inputs":[],"name":"CannotSetPaymentAddressToZero","type":"error"},{"inputs":[],"name":"CannotWithdrawToZeroAddress","type":"error"},{"inputs":[],"name":"MetadataLocked","type":"error"},{"inputs":[],"name":"MoreThanOneHundredPercentRoyalty","type":"error"},{"inputs":[],"name":"WithdrawFailed","type":"error"},{"inputs":[],"name":"ZeroBalance","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[],"name":"Init","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"metadataContract","type":"address"}],"name":"MetadataContractLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"metadataContract","type":"address"}],"name":"MetadataContractSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RoyaltyInfoSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RoyaltyInfoUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedMinters","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"owners","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"balances","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMetadataLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadata","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mintRedNight","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorFilteringEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payments","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"subscriptionOrRegistrantToCopy","type":"address"},{"internalType":"bool","name":"subscribe","type":"bool"}],"name":"registerForOperatorFiltering","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"repeatRegistration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractURI_","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"metadata","type":"address"}],"name":"setMetadataAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setOperatorFilteringEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paymentAddress","type":"address"}],"name":"setPaymentAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052600a608090815269546f726d69757320323360b01b60a0526005906200002b90826200033c565b50604080518082019091526005815264544f52323360d81b60208201526006906200005790826200033c565b503480156200006557600080fd5b50604051620024a4380380620024a4833981016040819052620000889162000425565b600280546001600160a01b0319166001600160a01b038616908117909155604051859185918591859184918491849188916000907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76908290a350600380546001600160a01b0319166001600160a01b0383169081179091556040517f0713c9f4b0c5db294e61505e6819f6ad0cccf782df1a544939dc55d13fe7fc1c90600090a2506040805180820182526001600160a01b0384168082526001600160601b0384166020909201829052600160a01b909102811760045590518291907f984cbbb47b413608120ad6b444ea0004fe19b6f88a5c0992e612b97fd3cb631e90600090a3505060098054610100600160a81b0319166101006001600160a01b03861602179055620001b6620001fa565b6009805460ff191660011790556040517f57a86f7d14ccde89e22870afe839e3011216827daa9b24e18629f0a1e9d6cc1490600090a1505050505050505062000479565b6200021b733cc6cdda760b79bafa08df41ecfa224f810dceb660016200021d565b565b6001600160a01b0390911690637d3e3dbe816200024d5782620002465750634420e4866200024d565b5063a0af29035b8060e01b60005230600452826024526004600060446000806daaeb6d7670e522a718067333cd4e5af16200028d578060005160e01c036200028d57600080fd5b5060006024525050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620002c257607f821691505b602082108103620002e357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200033757600081815260208120601f850160051c81016020861015620003125750805b601f850160051c820191505b8181101562000333578281556001016200031e565b5050505b505050565b81516001600160401b0381111562000358576200035862000297565b6200037081620003698454620002ad565b84620002e9565b602080601f831160018114620003a857600084156200038f5750858301515b600019600386901b1c1916600185901b17855562000333565b600085815260208120601f198616915b82811015620003d957888601518255948401946001909101908401620003b8565b5085821015620003f85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80516001600160a01b03811681146200042057600080fd5b919050565b600080600080608085870312156200043c57600080fd5b620004478562000408565b9350620004576020860162000408565b9250604085015191506200046e6060860162000408565b905092959194509250565b61201b80620004896000396000f3fe608060405234801561001057600080fd5b50600436106101e45760003560e01c8063938e3d7b1161010f578063d7e45cd7116100a2578063e8a3d48511610071578063e8a3d4851461045f578063e985e9c514610467578063f242432a14610495578063fb796e6c146104a857600080fd5b8063d7e45cd71461041d578063e086e5ec14610431578063e17b25af14610439578063e2e784d51461044c57600080fd5b8063a8b5e6ea116100de578063a8b5e6ea146103c1578063b390c0ab146103e4578063b7c0b8e8146103f7578063cf456ae71461040a57600080fd5b8063938e3d7b1461037b57806395d89b411461038e578063a22cb46514610396578063a6d23e10146103a957600080fd5b8063392f37e9116101875780635e1c0746116101565780635e1c07461461033a5780635e1e1004146103425780636d36ad7e146103555780638da5cb5b1461036857600080fd5b8063392f37e9146102c957806346d8efad146102f457806349df728c146103075780634e1273f41461031a57600080fd5b80630e89341c116101c35780630e89341c1461025c57806313af40351461026f5780632a55205a146102845780632eb2c2d6146102b657600080fd5b8062fdd58e146101e957806301ffc9a71461022457806306fdde0314610247575b600080fd5b6102116101f73660046116ae565b600060208181529281526040808220909352908152205481565b6040519081526020015b60405180910390f35b6102376102323660046116ee565b6104b5565b604051901515815260200161021b565b61024f6104e0565b60405161021b9190611762565b61024f61026a366004611775565b61056e565b61028261027d36600461178e565b6105e0565b005b6102976102923660046117a9565b61065f565b604080516001600160a01b03909316835260208301919091520161021b565b6102826102c4366004611859565b6106a6565b6003546102dc906001600160a01b031681565b6040516001600160a01b03909116815260200161021b565b610282610302366004611922565b6106e6565b61028261031536600461178e565b61071e565b61032d610328366004611959565b61073d565b60405161021b91906119c5565b610282610872565b61028261035036600461178e565b61087c565b61028261036336600461178e565b6108f5565b6002546102dc906001600160a01b031681565b610282610389366004611a78565b610971565b61024f6109a7565b6102826103a4366004611922565b6109b4565b6009546102dc9061010090046001600160a01b031681565b6102376103cf36600461178e565b60086020526000908152604090205460ff1681565b6102826103f23660046117a9565b6109d8565b610282610405366004611af8565b610a39565b610282610418366004611922565b610a76565b60035461023790600160a01b900460ff1681565b610282610acb565b61028261044736600461178e565b610ae5565b61028261045a3660046116ae565b610b18565b61024f610b4c565b610237610475366004611b15565b600160209081526000928352604080842090915290825290205460ff1681565b6102826104a3366004611b3f565b610b59565b6009546102379060ff1681565b60006001600160e01b0319821663152a902d60e11b14806104da57506104da82610b95565b92915050565b600580546104ed90611bb7565b80601f016020809104026020016040519081016040528092919081815260200182805461051990611bb7565b80156105665780601f1061053b57610100808354040283529160200191610566565b820191906000526020600020905b81548152906001019060200180831161054957829003601f168201915b505050505081565b60035460405163c87b56dd60e01b8152600481018390526060916001600160a01b03169063c87b56dd90602401600060405180830381865afa1580156105b8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104da9190810190611bf1565b6002546001600160a01b031633146106135760405162461bcd60e51b815260040161060a90611c68565b60405180910390fd5b600280546001600160a01b0319166001600160a01b03831690811790915560405133907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a350565b6004546001600160a01b038116906000906127109061069390600160a01b90046bffffffffffffffffffffffff1685611ca4565b61069d9190611cbb565b90509250929050565b876001600160a01b03811633146106cb5760095460ff16156106cb576106cb33610be3565b6106db8989898989898989610c27565b505050505050505050565b6002546001600160a01b031633146107105760405162461bcd60e51b815260040161060a90611c68565b61071a8282610eca565b5050565b60095461073a90829061010090046001600160a01b0316610f3f565b50565b60608382146107805760405162461bcd60e51b815260206004820152600f60248201526e0988a9c8ea890be9a92a69a82a8869608b1b604482015260640161060a565b8367ffffffffffffffff81111561079957610799611a09565b6040519080825280602002602001820160405280156107c2578160200160208202803683370190505b50905060005b84811015610869576000808787848181106107e5576107e5611cdd565b90506020020160208101906107fa919061178e565b6001600160a01b03166001600160a01b03168152602001908152602001600020600085858481811061082e5761082e611cdd565b9050602002013581526020019081526020016000205482828151811061085657610856611cdd565b60209081029190910101526001016107c8565b50949350505050565b61087a611091565b565b6002546001600160a01b031633146108a65760405162461bcd60e51b815260040161060a90611c68565b6001600160a01b0381166108cd57604051631f4c499760e01b815260040160405180910390fd5b600980546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b3360009081526008602052604090205460ff166109545760405162461bcd60e51b815260206004820181905260248201527f4f6e6c7920617070726f766564206164647265737365732063616e206d696e74604482015260640161060a565b61073a8160036001604051806020016040528060008152506110b0565b6002546001600160a01b0316331461099b5760405162461bcd60e51b815260040161060a90611c68565b600761071a8282611d39565b600680546104ed90611bb7565b8160095460ff16156109c9576109c981610be3565b6109d383836111f2565b505050565b33600090815260208181526040808320858452909152902054811115610a2e5760405162461bcd60e51b815260206004820152600b60248201526a21a0a72727aa2fa12aa92760a91b604482015260640161060a565b61071a33838361125e565b6002546001600160a01b03163314610a635760405162461bcd60e51b815260040161060a90611c68565b6009805460ff1916911515919091179055565b6002546001600160a01b03163314610aa05760405162461bcd60e51b815260040161060a90611c68565b6001600160a01b03919091166000908152600860205260409020805460ff1916911515919091179055565b60095461087a9061010090046001600160a01b03166112e2565b6002546001600160a01b03163314610b0f5760405162461bcd60e51b815260040161060a90611c68565b61073a816113a0565b6002546001600160a01b03163314610b425760405162461bcd60e51b815260040161060a90611c68565b61071a8282611415565b600780546104ed90611bb7565b856001600160a01b0381163314610b7e5760095460ff1615610b7e57610b7e33610be3565b610b8c878787878787611498565b50505050505050565b60006301ffc9a760e01b6001600160e01b031983161480610bc65750636cdb3d1360e11b6001600160e01b03198316145b806104da5750506001600160e01b0319166303a24d0760e21b1490565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa610c1f573d6000803e3d6000fd5b6000603a5250565b848314610c685760405162461bcd60e51b815260206004820152600f60248201526e0988a9c8ea890be9a92a69a82a8869608b1b604482015260640161060a565b336001600160a01b0389161480610ca257506001600160a01b038816600090815260016020908152604080832033845290915290205460ff165b610cdf5760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015260640161060a565b60008060005b87811015610d9a57888882818110610cff57610cff611cdd565b905060200201359250868682818110610d1a57610d1a611cdd565b6001600160a01b038e1660009081526020818152604080832089845282528220805493909102949094013595508593925090610d57908490611df9565b90915550506001600160a01b038a1660009081526020818152604080832086845290915281208054849290610d8d908490611e0c565b9091555050600101610ce5565b50886001600160a01b03168a6001600160a01b0316336001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8b8b8b8b604051610dee9493929190611e51565b60405180910390a46001600160a01b0389163b15610e955760405163bc197c8160e01b808252906001600160a01b038b169063bc197c8190610e429033908f908e908e908e908e908e908e90600401611eac565b6020604051808303816000875af1158015610e61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e859190611f10565b6001600160e01b03191614610ea2565b6001600160a01b03891615155b610ebe5760405162461bcd60e51b815260040161060a90611f2d565b50505050505050505050565b6001600160a01b0390911690637d3e3dbe81610ef75782610ef05750634420e486610ef7565b5063a0af29035b8060e01b60005230600452826024526004600060446000806daaeb6d7670e522a718067333cd4e5af1610f35578060005160e01c03610f3557600080fd5b5060006024525050565b6001600160a01b038116610f665760405163172fe2d160e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015610fad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd19190611f57565b905080600003610ff45760405163334ab3f560e11b815260040160405180910390fd5b60405163a9059cbb60e01b81526001600160a01b038381166004830152602482018390526000919085169063a9059cbb906044016020604051808303816000875af1158015611047573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106b9190611f70565b90508061108b57604051631d42c86760e21b815260040160405180910390fd5b50505050565b61087a733cc6cdda760b79bafa08df41ecfa224f810dceb66001610eca565b6001600160a01b038416600090815260208181526040808320868452909152812080548492906110e1908490611e0c565b909155505060408051848152602081018490526001600160a01b0386169160009133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46001600160a01b0384163b156111c95760405163f23a6e6160e01b808252906001600160a01b0386169063f23a6e6190611176903390600090899089908990600401611f8d565b6020604051808303816000875af1158015611195573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b99190611f10565b6001600160e01b031916146111d6565b6001600160a01b03841615155b61108b5760405162461bcd60e51b815260040161060a90611f2d565b3360008181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b0383166000908152602081815260408083208584529091528120805483929061128f908490611df9565b909155505060408051838152602081018390526000916001600160a01b0386169133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4505050565b6001600160a01b0381166113095760405163172fe2d160e01b815260040160405180910390fd5b47600081900361132c5760405163334ab3f560e11b815260040160405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611379576040519150601f19603f3d011682016040523d82523d6000602084013e61137e565b606091505b50509050806109d357604051631d42c86760e21b815260040160405180910390fd5b600354600160a01b900460ff16156113cb576040516313ef243160e11b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517f0713c9f4b0c5db294e61505e6819f6ad0cccf782df1a544939dc55d13fe7fc1c90600090a250565b612710811115611438576040516303c799a760e61b815260040160405180910390fd5b6040805180820182526001600160a01b03841680825262ffffff84166020909201829052600160a01b909102811760045590518291907ff21fccf4d64d86d532c4e4eb86c007b6ad57a460c27d724188625e755ec6cf6d90600090a35050565b336001600160a01b03871614806114d257506001600160a01b038616600090815260016020908152604080832033845290915290205460ff165b61150f5760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015260640161060a565b6001600160a01b03861660009081526020818152604080832087845290915281208054859290611540908490611df9565b90915550506001600160a01b03851660009081526020818152604080832087845290915281208054859290611576908490611e0c565b909155505060408051858152602081018590526001600160a01b03808816929089169133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46001600160a01b0385163b156116615760405163f23a6e6160e01b808252906001600160a01b0387169063f23a6e619061160e9033908b908a908a908a908a90600401611fc7565b6020604051808303816000875af115801561162d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116519190611f10565b6001600160e01b0319161461166e565b6001600160a01b03851615155b61168a5760405162461bcd60e51b815260040161060a90611f2d565b505050505050565b80356001600160a01b03811681146116a957600080fd5b919050565b600080604083850312156116c157600080fd5b6116ca83611692565b946020939093013593505050565b6001600160e01b03198116811461073a57600080fd5b60006020828403121561170057600080fd5b813561170b816116d8565b9392505050565b60005b8381101561172d578181015183820152602001611715565b50506000910152565b6000815180845261174e816020860160208601611712565b601f01601f19169290920160200192915050565b60208152600061170b6020830184611736565b60006020828403121561178757600080fd5b5035919050565b6000602082840312156117a057600080fd5b61170b82611692565b600080604083850312156117bc57600080fd5b50508035926020909101359150565b60008083601f8401126117dd57600080fd5b50813567ffffffffffffffff8111156117f557600080fd5b6020830191508360208260051b850101111561181057600080fd5b9250929050565b60008083601f84011261182957600080fd5b50813567ffffffffffffffff81111561184157600080fd5b60208301915083602082850101111561181057600080fd5b60008060008060008060008060a0898b03121561187557600080fd5b61187e89611692565b975061188c60208a01611692565b9650604089013567ffffffffffffffff808211156118a957600080fd5b6118b58c838d016117cb565b909850965060608b01359150808211156118ce57600080fd5b6118da8c838d016117cb565b909650945060808b01359150808211156118f357600080fd5b506119008b828c01611817565b999c989b5096995094979396929594505050565b801515811461073a57600080fd5b6000806040838503121561193557600080fd5b61193e83611692565b9150602083013561194e81611914565b809150509250929050565b6000806000806040858703121561196f57600080fd5b843567ffffffffffffffff8082111561198757600080fd5b611993888389016117cb565b909650945060208701359150808211156119ac57600080fd5b506119b9878288016117cb565b95989497509550505050565b6020808252825182820181905260009190848201906040850190845b818110156119fd578351835292840192918401916001016119e1565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a4857611a48611a09565b604052919050565b600067ffffffffffffffff821115611a6a57611a6a611a09565b50601f01601f191660200190565b600060208284031215611a8a57600080fd5b813567ffffffffffffffff811115611aa157600080fd5b8201601f81018413611ab257600080fd5b8035611ac5611ac082611a50565b611a1f565b818152856020838501011115611ada57600080fd5b81602084016020830137600091810160200191909152949350505050565b600060208284031215611b0a57600080fd5b813561170b81611914565b60008060408385031215611b2857600080fd5b611b3183611692565b915061069d60208401611692565b60008060008060008060a08789031215611b5857600080fd5b611b6187611692565b9550611b6f60208801611692565b94506040870135935060608701359250608087013567ffffffffffffffff811115611b9957600080fd5b611ba589828a01611817565b979a9699509497509295939492505050565b600181811c90821680611bcb57607f821691505b602082108103611beb57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611c0357600080fd5b815167ffffffffffffffff811115611c1a57600080fd5b8201601f81018413611c2b57600080fd5b8051611c39611ac082611a50565b818152856020838501011115611c4e57600080fd5b611c5f826020830160208601611712565b95945050505050565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176104da576104da611c8e565b600082611cd857634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b601f8211156109d357600081815260208120601f850160051c81016020861015611d1a5750805b601f850160051c820191505b8181101561168a57828155600101611d26565b815167ffffffffffffffff811115611d5357611d53611a09565b611d6781611d618454611bb7565b84611cf3565b602080601f831160018114611d9c5760008415611d845750858301515b600019600386901b1c1916600185901b17855561168a565b600085815260208120601f198616915b82811015611dcb57888601518255948401946001909101908401611dac565b5085821015611de95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b818103818111156104da576104da611c8e565b808201808211156104da576104da611c8e565b81835260006001600160fb1b03831115611e3857600080fd5b8260051b80836020870137939093016020019392505050565b604081526000611e65604083018688611e1f565b8281036020840152611e78818587611e1f565b979650505050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b0389811682528816602082015260a060408201819052600090611ed9908301888a611e1f565b8281036060840152611eec818789611e1f565b90508281036080840152611f01818587611e83565b9b9a5050505050505050505050565b600060208284031215611f2257600080fd5b815161170b816116d8565b60208082526010908201526f155394d0519157d49150d2541251539560821b604082015260600190565b600060208284031215611f6957600080fd5b5051919050565b600060208284031215611f8257600080fd5b815161170b81611914565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611e7890830184611736565b6001600160a01b03878116825286166020820152604081018590526060810184905260a0608082018190526000906120029083018486611e83565b9897505050505050505056fea164736f6c6343000811000a0000000000000000000000003b1bd4c99c059ed58155240fd01d6fc86a430d4d0000000000000000000000005757022e14da07175baf0e19549aaee26ae19fb300000000000000000000000000000000000000000000000000000000000002ee0000000000000000000000008842e0b0de8c6b008da21a96bad9bced7d2b6140

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101e45760003560e01c8063938e3d7b1161010f578063d7e45cd7116100a2578063e8a3d48511610071578063e8a3d4851461045f578063e985e9c514610467578063f242432a14610495578063fb796e6c146104a857600080fd5b8063d7e45cd71461041d578063e086e5ec14610431578063e17b25af14610439578063e2e784d51461044c57600080fd5b8063a8b5e6ea116100de578063a8b5e6ea146103c1578063b390c0ab146103e4578063b7c0b8e8146103f7578063cf456ae71461040a57600080fd5b8063938e3d7b1461037b57806395d89b411461038e578063a22cb46514610396578063a6d23e10146103a957600080fd5b8063392f37e9116101875780635e1c0746116101565780635e1c07461461033a5780635e1e1004146103425780636d36ad7e146103555780638da5cb5b1461036857600080fd5b8063392f37e9146102c957806346d8efad146102f457806349df728c146103075780634e1273f41461031a57600080fd5b80630e89341c116101c35780630e89341c1461025c57806313af40351461026f5780632a55205a146102845780632eb2c2d6146102b657600080fd5b8062fdd58e146101e957806301ffc9a71461022457806306fdde0314610247575b600080fd5b6102116101f73660046116ae565b600060208181529281526040808220909352908152205481565b6040519081526020015b60405180910390f35b6102376102323660046116ee565b6104b5565b604051901515815260200161021b565b61024f6104e0565b60405161021b9190611762565b61024f61026a366004611775565b61056e565b61028261027d36600461178e565b6105e0565b005b6102976102923660046117a9565b61065f565b604080516001600160a01b03909316835260208301919091520161021b565b6102826102c4366004611859565b6106a6565b6003546102dc906001600160a01b031681565b6040516001600160a01b03909116815260200161021b565b610282610302366004611922565b6106e6565b61028261031536600461178e565b61071e565b61032d610328366004611959565b61073d565b60405161021b91906119c5565b610282610872565b61028261035036600461178e565b61087c565b61028261036336600461178e565b6108f5565b6002546102dc906001600160a01b031681565b610282610389366004611a78565b610971565b61024f6109a7565b6102826103a4366004611922565b6109b4565b6009546102dc9061010090046001600160a01b031681565b6102376103cf36600461178e565b60086020526000908152604090205460ff1681565b6102826103f23660046117a9565b6109d8565b610282610405366004611af8565b610a39565b610282610418366004611922565b610a76565b60035461023790600160a01b900460ff1681565b610282610acb565b61028261044736600461178e565b610ae5565b61028261045a3660046116ae565b610b18565b61024f610b4c565b610237610475366004611b15565b600160209081526000928352604080842090915290825290205460ff1681565b6102826104a3366004611b3f565b610b59565b6009546102379060ff1681565b60006001600160e01b0319821663152a902d60e11b14806104da57506104da82610b95565b92915050565b600580546104ed90611bb7565b80601f016020809104026020016040519081016040528092919081815260200182805461051990611bb7565b80156105665780601f1061053b57610100808354040283529160200191610566565b820191906000526020600020905b81548152906001019060200180831161054957829003601f168201915b505050505081565b60035460405163c87b56dd60e01b8152600481018390526060916001600160a01b03169063c87b56dd90602401600060405180830381865afa1580156105b8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104da9190810190611bf1565b6002546001600160a01b031633146106135760405162461bcd60e51b815260040161060a90611c68565b60405180910390fd5b600280546001600160a01b0319166001600160a01b03831690811790915560405133907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a350565b6004546001600160a01b038116906000906127109061069390600160a01b90046bffffffffffffffffffffffff1685611ca4565b61069d9190611cbb565b90509250929050565b876001600160a01b03811633146106cb5760095460ff16156106cb576106cb33610be3565b6106db8989898989898989610c27565b505050505050505050565b6002546001600160a01b031633146107105760405162461bcd60e51b815260040161060a90611c68565b61071a8282610eca565b5050565b60095461073a90829061010090046001600160a01b0316610f3f565b50565b60608382146107805760405162461bcd60e51b815260206004820152600f60248201526e0988a9c8ea890be9a92a69a82a8869608b1b604482015260640161060a565b8367ffffffffffffffff81111561079957610799611a09565b6040519080825280602002602001820160405280156107c2578160200160208202803683370190505b50905060005b84811015610869576000808787848181106107e5576107e5611cdd565b90506020020160208101906107fa919061178e565b6001600160a01b03166001600160a01b03168152602001908152602001600020600085858481811061082e5761082e611cdd565b9050602002013581526020019081526020016000205482828151811061085657610856611cdd565b60209081029190910101526001016107c8565b50949350505050565b61087a611091565b565b6002546001600160a01b031633146108a65760405162461bcd60e51b815260040161060a90611c68565b6001600160a01b0381166108cd57604051631f4c499760e01b815260040160405180910390fd5b600980546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b3360009081526008602052604090205460ff166109545760405162461bcd60e51b815260206004820181905260248201527f4f6e6c7920617070726f766564206164647265737365732063616e206d696e74604482015260640161060a565b61073a8160036001604051806020016040528060008152506110b0565b6002546001600160a01b0316331461099b5760405162461bcd60e51b815260040161060a90611c68565b600761071a8282611d39565b600680546104ed90611bb7565b8160095460ff16156109c9576109c981610be3565b6109d383836111f2565b505050565b33600090815260208181526040808320858452909152902054811115610a2e5760405162461bcd60e51b815260206004820152600b60248201526a21a0a72727aa2fa12aa92760a91b604482015260640161060a565b61071a33838361125e565b6002546001600160a01b03163314610a635760405162461bcd60e51b815260040161060a90611c68565b6009805460ff1916911515919091179055565b6002546001600160a01b03163314610aa05760405162461bcd60e51b815260040161060a90611c68565b6001600160a01b03919091166000908152600860205260409020805460ff1916911515919091179055565b60095461087a9061010090046001600160a01b03166112e2565b6002546001600160a01b03163314610b0f5760405162461bcd60e51b815260040161060a90611c68565b61073a816113a0565b6002546001600160a01b03163314610b425760405162461bcd60e51b815260040161060a90611c68565b61071a8282611415565b600780546104ed90611bb7565b856001600160a01b0381163314610b7e5760095460ff1615610b7e57610b7e33610be3565b610b8c878787878787611498565b50505050505050565b60006301ffc9a760e01b6001600160e01b031983161480610bc65750636cdb3d1360e11b6001600160e01b03198316145b806104da5750506001600160e01b0319166303a24d0760e21b1490565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa610c1f573d6000803e3d6000fd5b6000603a5250565b848314610c685760405162461bcd60e51b815260206004820152600f60248201526e0988a9c8ea890be9a92a69a82a8869608b1b604482015260640161060a565b336001600160a01b0389161480610ca257506001600160a01b038816600090815260016020908152604080832033845290915290205460ff165b610cdf5760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015260640161060a565b60008060005b87811015610d9a57888882818110610cff57610cff611cdd565b905060200201359250868682818110610d1a57610d1a611cdd565b6001600160a01b038e1660009081526020818152604080832089845282528220805493909102949094013595508593925090610d57908490611df9565b90915550506001600160a01b038a1660009081526020818152604080832086845290915281208054849290610d8d908490611e0c565b9091555050600101610ce5565b50886001600160a01b03168a6001600160a01b0316336001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8b8b8b8b604051610dee9493929190611e51565b60405180910390a46001600160a01b0389163b15610e955760405163bc197c8160e01b808252906001600160a01b038b169063bc197c8190610e429033908f908e908e908e908e908e908e90600401611eac565b6020604051808303816000875af1158015610e61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e859190611f10565b6001600160e01b03191614610ea2565b6001600160a01b03891615155b610ebe5760405162461bcd60e51b815260040161060a90611f2d565b50505050505050505050565b6001600160a01b0390911690637d3e3dbe81610ef75782610ef05750634420e486610ef7565b5063a0af29035b8060e01b60005230600452826024526004600060446000806daaeb6d7670e522a718067333cd4e5af1610f35578060005160e01c03610f3557600080fd5b5060006024525050565b6001600160a01b038116610f665760405163172fe2d160e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015610fad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd19190611f57565b905080600003610ff45760405163334ab3f560e11b815260040160405180910390fd5b60405163a9059cbb60e01b81526001600160a01b038381166004830152602482018390526000919085169063a9059cbb906044016020604051808303816000875af1158015611047573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106b9190611f70565b90508061108b57604051631d42c86760e21b815260040160405180910390fd5b50505050565b61087a733cc6cdda760b79bafa08df41ecfa224f810dceb66001610eca565b6001600160a01b038416600090815260208181526040808320868452909152812080548492906110e1908490611e0c565b909155505060408051848152602081018490526001600160a01b0386169160009133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46001600160a01b0384163b156111c95760405163f23a6e6160e01b808252906001600160a01b0386169063f23a6e6190611176903390600090899089908990600401611f8d565b6020604051808303816000875af1158015611195573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b99190611f10565b6001600160e01b031916146111d6565b6001600160a01b03841615155b61108b5760405162461bcd60e51b815260040161060a90611f2d565b3360008181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b0383166000908152602081815260408083208584529091528120805483929061128f908490611df9565b909155505060408051838152602081018390526000916001600160a01b0386169133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4505050565b6001600160a01b0381166113095760405163172fe2d160e01b815260040160405180910390fd5b47600081900361132c5760405163334ab3f560e11b815260040160405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611379576040519150601f19603f3d011682016040523d82523d6000602084013e61137e565b606091505b50509050806109d357604051631d42c86760e21b815260040160405180910390fd5b600354600160a01b900460ff16156113cb576040516313ef243160e11b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517f0713c9f4b0c5db294e61505e6819f6ad0cccf782df1a544939dc55d13fe7fc1c90600090a250565b612710811115611438576040516303c799a760e61b815260040160405180910390fd5b6040805180820182526001600160a01b03841680825262ffffff84166020909201829052600160a01b909102811760045590518291907ff21fccf4d64d86d532c4e4eb86c007b6ad57a460c27d724188625e755ec6cf6d90600090a35050565b336001600160a01b03871614806114d257506001600160a01b038616600090815260016020908152604080832033845290915290205460ff165b61150f5760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015260640161060a565b6001600160a01b03861660009081526020818152604080832087845290915281208054859290611540908490611df9565b90915550506001600160a01b03851660009081526020818152604080832087845290915281208054859290611576908490611e0c565b909155505060408051858152602081018590526001600160a01b03808816929089169133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46001600160a01b0385163b156116615760405163f23a6e6160e01b808252906001600160a01b0387169063f23a6e619061160e9033908b908a908a908a908a90600401611fc7565b6020604051808303816000875af115801561162d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116519190611f10565b6001600160e01b0319161461166e565b6001600160a01b03851615155b61168a5760405162461bcd60e51b815260040161060a90611f2d565b505050505050565b80356001600160a01b03811681146116a957600080fd5b919050565b600080604083850312156116c157600080fd5b6116ca83611692565b946020939093013593505050565b6001600160e01b03198116811461073a57600080fd5b60006020828403121561170057600080fd5b813561170b816116d8565b9392505050565b60005b8381101561172d578181015183820152602001611715565b50506000910152565b6000815180845261174e816020860160208601611712565b601f01601f19169290920160200192915050565b60208152600061170b6020830184611736565b60006020828403121561178757600080fd5b5035919050565b6000602082840312156117a057600080fd5b61170b82611692565b600080604083850312156117bc57600080fd5b50508035926020909101359150565b60008083601f8401126117dd57600080fd5b50813567ffffffffffffffff8111156117f557600080fd5b6020830191508360208260051b850101111561181057600080fd5b9250929050565b60008083601f84011261182957600080fd5b50813567ffffffffffffffff81111561184157600080fd5b60208301915083602082850101111561181057600080fd5b60008060008060008060008060a0898b03121561187557600080fd5b61187e89611692565b975061188c60208a01611692565b9650604089013567ffffffffffffffff808211156118a957600080fd5b6118b58c838d016117cb565b909850965060608b01359150808211156118ce57600080fd5b6118da8c838d016117cb565b909650945060808b01359150808211156118f357600080fd5b506119008b828c01611817565b999c989b5096995094979396929594505050565b801515811461073a57600080fd5b6000806040838503121561193557600080fd5b61193e83611692565b9150602083013561194e81611914565b809150509250929050565b6000806000806040858703121561196f57600080fd5b843567ffffffffffffffff8082111561198757600080fd5b611993888389016117cb565b909650945060208701359150808211156119ac57600080fd5b506119b9878288016117cb565b95989497509550505050565b6020808252825182820181905260009190848201906040850190845b818110156119fd578351835292840192918401916001016119e1565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a4857611a48611a09565b604052919050565b600067ffffffffffffffff821115611a6a57611a6a611a09565b50601f01601f191660200190565b600060208284031215611a8a57600080fd5b813567ffffffffffffffff811115611aa157600080fd5b8201601f81018413611ab257600080fd5b8035611ac5611ac082611a50565b611a1f565b818152856020838501011115611ada57600080fd5b81602084016020830137600091810160200191909152949350505050565b600060208284031215611b0a57600080fd5b813561170b81611914565b60008060408385031215611b2857600080fd5b611b3183611692565b915061069d60208401611692565b60008060008060008060a08789031215611b5857600080fd5b611b6187611692565b9550611b6f60208801611692565b94506040870135935060608701359250608087013567ffffffffffffffff811115611b9957600080fd5b611ba589828a01611817565b979a9699509497509295939492505050565b600181811c90821680611bcb57607f821691505b602082108103611beb57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611c0357600080fd5b815167ffffffffffffffff811115611c1a57600080fd5b8201601f81018413611c2b57600080fd5b8051611c39611ac082611a50565b818152856020838501011115611c4e57600080fd5b611c5f826020830160208601611712565b95945050505050565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176104da576104da611c8e565b600082611cd857634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b601f8211156109d357600081815260208120601f850160051c81016020861015611d1a5750805b601f850160051c820191505b8181101561168a57828155600101611d26565b815167ffffffffffffffff811115611d5357611d53611a09565b611d6781611d618454611bb7565b84611cf3565b602080601f831160018114611d9c5760008415611d845750858301515b600019600386901b1c1916600185901b17855561168a565b600085815260208120601f198616915b82811015611dcb57888601518255948401946001909101908401611dac565b5085821015611de95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b818103818111156104da576104da611c8e565b808201808211156104da576104da611c8e565b81835260006001600160fb1b03831115611e3857600080fd5b8260051b80836020870137939093016020019392505050565b604081526000611e65604083018688611e1f565b8281036020840152611e78818587611e1f565b979650505050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b0389811682528816602082015260a060408201819052600090611ed9908301888a611e1f565b8281036060840152611eec818789611e1f565b90508281036080840152611f01818587611e83565b9b9a5050505050505050505050565b600060208284031215611f2257600080fd5b815161170b816116d8565b60208082526010908201526f155394d0519157d49150d2541251539560821b604082015260600190565b600060208284031215611f6957600080fd5b5051919050565b600060208284031215611f8257600080fd5b815161170b81611914565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611e7890830184611736565b6001600160a01b03878116825286166020820152604081018590526060810184905260a0608082018190526000906120029083018486611e83565b9897505050505050505056fea164736f6c6343000811000a

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

0000000000000000000000003b1bd4c99c059ed58155240fd01d6fc86a430d4d0000000000000000000000005757022e14da07175baf0e19549aaee26ae19fb300000000000000000000000000000000000000000000000000000000000002ee0000000000000000000000008842e0b0de8c6b008da21a96bad9bced7d2b6140

-----Decoded View---------------
Arg [0] : owner_ (address): 0x3B1Bd4C99c059ED58155240FD01D6fC86A430D4D
Arg [1] : payments_ (address): 0x5757022E14DA07175bAf0E19549aAeE26aE19Fb3
Arg [2] : royaltiesAmount_ (uint256): 750
Arg [3] : metadata_ (address): 0x8842e0B0de8c6B008da21a96Bad9BcED7d2b6140

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000003b1bd4c99c059ed58155240fd01d6fc86a430d4d
Arg [1] : 0000000000000000000000005757022e14da07175baf0e19549aaee26ae19fb3
Arg [2] : 00000000000000000000000000000000000000000000000000000000000002ee
Arg [3] : 0000000000000000000000008842e0b0de8c6b008da21a96bad9bced7d2b6140


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.