Contract 0x658365026d06f00965b5bb570727100e821e6508 4

 

Contract Overview

Treasure DAO: Legions (Common)
Balance:
0 ETH

ETH Value:
$0.00
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x0a87bc72fcea01b364b889b87bb619fc9a6f5448c6c0615cbcc5bc71378d411eSet Approval For...374623642022-11-12 9:42:4716 days 11 hrs ago0xb76ad89f64e3e4dfb82043e65bafeee66768bdef IN  Treasure DAO: Legions (Common)0 ETH0.00002341
0x6db8ca8da57c14841fc1a9a7563ed7de55db0e0ba32b58ac18de37bd4ee79865Set Approval For...348378892022-11-03 1:29:1925 days 19 hrs ago0x52c23e0415561605cfb5263bbc16bcad2f60bb76 IN  Treasure DAO: Legions (Common)0 ETH0.00002269
0x080e45e9b2ead538483cf307226e9ca1375a9a1c74816067e28063147600a5b5Set Approval For...257464962022-09-21 18:00:3768 days 3 hrs ago0xa2917120c698fb5f2a03e3fd3524bda85a3eaef6 IN  Treasure DAO: Legions (Common)0 ETH0.00003952
0xea37a5ea668597ad524835b77c8882a56ba86c12d6c99df68d9c61920817a549Set Approval For...249651692022-09-17 3:57:1472 days 17 hrs ago0x184b8165e747817551eac977cf93d7dd4cbe18c4 IN  Treasure DAO: Legions (Common)0 ETH0.00000905
0xdaaf7da90a4bfc65f59ebe27f987b7fa53107a9a08429f4276498b8e0aeb3840Set Approval For...201746462022-08-13 18:16:39107 days 3 hrs ago0x7f5ccfb50d9087a572a80ec2585bde8e0377625c IN  Treasure DAO: Legions (Common)0 ETH0.000071324572 ETH
0xf38f9275fe25b4d045be07d520f49adbaa58762bc64683d5dc2345f5d61e96a8Set Approval For...184611422022-07-24 17:15:35127 days 4 hrs ago0x9fb470ae1278be58fe7511f465812d44696f98f1 IN  Treasure DAO: Legions (Common)0 ETH0.00005401367 ETH
0xab7bd10211e9ed95c629a9080f8cfb981dad087134815a889e7775b1cc9b0e99Set Approval For...184611162022-07-24 17:15:35127 days 4 hrs ago0x9fb470ae1278be58fe7511f465812d44696f98f1 IN  Treasure DAO: Legions (Common)0 ETH0.000054325134 ETH
0x0bf40e42a7fc5cfb426537ede29530f35ade60bcf01974051f8e83f652f15237Set Approval For...180561152022-07-19 23:44:41131 days 21 hrs ago0x251d14ea6929fc5163db5de098f82bed3710bb32 IN  Treasure DAO: Legions (Common)0 ETH0.000150610141 ETH
0xe2f7dc7d9bbfd7972394afed4dd8389f71816527d1857ceed06b94459ae0be32Set Approval For...178300032022-07-17 12:27:40134 days 8 hrs ago0x8792f37ed02088f58f3eef6a56acd9ccd444ea79 IN  Treasure DAO: Legions (Common)0 ETH0.000073590967 ETH
0xfd6cfad7c76bef948e43d009b7810c0acdb5a4afaa8611a36721ce43fda2586bSet Approval For...178299882022-07-17 12:27:40134 days 8 hrs ago0x8792f37ed02088f58f3eef6a56acd9ccd444ea79 IN  Treasure DAO: Legions (Common)0 ETH0.00007380147 ETH
0xeddccf1acc488bd6d24f02bfb2a281090829fb2a178badcb11fb1aa329e128b5Set Approval For...178275442022-07-17 11:50:54134 days 9 hrs ago0x3727220a0062dc00c08cc53186ca2d1cd3babe2f IN  Treasure DAO: Legions (Common)0 ETH0.000075429636 ETH
0x0501ddf3fcffce4ebd9ffce9b1c920f4715eaeb2d0a2e575bab387c3af6e62deSet Approval For...168348962022-07-02 16:23:44149 days 4 hrs ago0x31331ec182777b3e3cf127f4709a8aaa8f76e549 IN  Treasure DAO: Legions (Common)0 ETH0.00008562935 ETH
0x5cf113660abec1cb938b788de685c2bb9760f5edb107462b6865c89bf0b84d9aSet Approval For...144343622022-06-12 20:07:28169 days 1 hr ago0x1f83cfd5fca32b215c1c066e21237eacb28355dd IN  Treasure DAO: Legions (Common)0 ETH0.000176711599 ETH
0x18abfbc5e1c1c0c0934d240f6acc56def66cfb6d9de1f2d82116642eede3d3b8Set Approval For...119742872022-05-13 11:38:58199 days 9 hrs ago0xbab84de5f42e363d340cb9c870bded8e58c38b77 IN  Treasure DAO: Legions (Common)0 ETH0.00059585515 ETH
0x42bcd5b33a2d83eeeec7d422ccd162eb1f509577564a63840f110954b302c56bSet Approval For...111903452022-05-04 16:50:44208 days 4 hrs ago0xf11648b0ac91e0e9f7d1fc17e2c1de911f7df93d IN  Treasure DAO: Legions (Common)0 ETH0.000254758207 ETH
0x882e1c91bc82212b1ce033faed364c031db60a50698405c99b8f83efbbd85f7aSet Approval For...108278302022-04-29 13:51:14213 days 7 hrs ago0x67a6009424cb2daeaaa9bcb414b48dea4befc265 IN  Treasure DAO: Legions (Common)0 ETH0.000218034096 ETH
0x6c8c839a46c4a654f997df889524fd082d19c59ef39159d5058123aeb1b1f033Set Approval For...108278142022-04-29 13:50:22213 days 7 hrs ago0x67a6009424cb2daeaaa9bcb414b48dea4befc265 IN  Treasure DAO: Legions (Common)0 ETH0.000219296296 ETH
0x4ed804b89d518769e44c3e40fcc274838a1759d80cdd542e737cf134cb165cebSet Approval For...106525302022-04-27 11:28:20215 days 9 hrs ago0x23de05d1ba1021f71972d473bdaaa573c4b49127 IN  Treasure DAO: Legions (Common)0 ETH0.000221020349 ETH
0x0ca9f2a700d6fb9a93ff47207e6a5dc1aaa1c13894b641f75c003a9395d5794bSet Approval For...105767452022-04-26 11:59:05216 days 9 hrs ago0x7fe81534050fa6d648a6f5a33fed3136cbde3424 IN  Treasure DAO: Legions (Common)0 ETH0.000217219448 ETH
0x6015ec1039e76fc69ba0812fb5df5dc1f8a5e1dea5c218a99cccd4b8d27a565eSet Approval For...97663222022-04-14 0:57:49228 days 20 hrs ago0x0a2fac010be2e44aff96b6b58e5a35507122786b IN  Treasure DAO: Legions (Common)0 ETH0.00024459537 ETH
0xbcdc23741d2f18113dcda6e4795734d48942e8b6a333ca2a643d11eade3e695fSet Approval For...93583972022-04-05 19:59:14237 days 1 hr ago0x9566e577d78a7b21d8c71e3220d8275fb835c1f3 IN  Treasure DAO: Legions (Common)0 ETH0.000412446572 ETH
0x6e4dc9d271ab530cdcfaf57935595e13b3ecbf8ed0e6dc214b160f2a706d7f1fSet Approval For...93536972022-04-05 17:24:16237 days 3 hrs ago0xadc8f4bd423e12ce815762f3d76ec574a22fda0d IN  Treasure DAO: Legions (Common)0 ETH0.000344270606 ETH
0x8448682884d65f6af2435a75e60cd5b711d80ca7768a4baf0562fcccaf0c5386Set Approval For...93533492022-04-05 17:14:53237 days 4 hrs ago0xd54a547961b4f1ab6a61639713787402694c9212 IN  Treasure DAO: Legions (Common)0 ETH0.000344267352 ETH
0xaca55167e3183fd42a836c09197aa355c6a91165edb9d054e3a04861fddbbb91Set Approval For...93502982022-04-05 16:09:27237 days 5 hrs ago0x1020f21c49f97588c4582b0e31399e0649c07844 IN  Treasure DAO: Legions (Common)0 ETH0.000343227309 ETH
0x0374b8105deff8c9a744082b36e9d174966dcc2f78db214aa79d55ce314de249Safe Transfer Fr...88365652022-03-29 15:29:44244 days 5 hrs ago0xfb95f4f6eb028f1cd37843cecb6c6c033a18e073 IN  Treasure DAO: Legions (Common)0 ETH0.000391727417 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x0a87bc72fcea01b364b889b87bb619fc9a6f5448c6c0615cbcc5bc71378d411e374623642022-11-12 9:42:4716 days 11 hrs ago Treasure DAO: Legions (Common) 0x19d0cd1ebe1d93e352e49a0c126e1365081266220 ETH
0x6db8ca8da57c14841fc1a9a7563ed7de55db0e0ba32b58ac18de37bd4ee79865348378892022-11-03 1:29:1925 days 19 hrs ago Treasure DAO: Legions (Common) 0x19d0cd1ebe1d93e352e49a0c126e1365081266220 ETH
0x080e45e9b2ead538483cf307226e9ca1375a9a1c74816067e28063147600a5b5257464962022-09-21 18:00:3768 days 3 hrs ago Treasure DAO: Legions (Common) 0x19d0cd1ebe1d93e352e49a0c126e1365081266220 ETH
0xea37a5ea668597ad524835b77c8882a56ba86c12d6c99df68d9c61920817a549249651692022-09-17 3:57:1472 days 17 hrs ago Treasure DAO: Legions (Common) 0x19d0cd1ebe1d93e352e49a0c126e1365081266220 ETH
0xdaaf7da90a4bfc65f59ebe27f987b7fa53107a9a08429f4276498b8e0aeb3840201746462022-08-13 18:16:39107 days 3 hrs ago Treasure DAO: Legions (Common) 0x19d0cd1ebe1d93e352e49a0c126e1365081266220 ETH
0xf38f9275fe25b4d045be07d520f49adbaa58762bc64683d5dc2345f5d61e96a8184611422022-07-24 17:15:35127 days 4 hrs ago Treasure DAO: Legions (Common) 0x19d0cd1ebe1d93e352e49a0c126e1365081266220 ETH
0xab7bd10211e9ed95c629a9080f8cfb981dad087134815a889e7775b1cc9b0e99184611162022-07-24 17:15:35127 days 4 hrs ago Treasure DAO: Legions (Common) 0x19d0cd1ebe1d93e352e49a0c126e1365081266220 ETH
0x0bf40e42a7fc5cfb426537ede29530f35ade60bcf01974051f8e83f652f15237180561152022-07-19 23:44:41131 days 21 hrs ago Treasure DAO: Legions (Common) 0x19d0cd1ebe1d93e352e49a0c126e1365081266220 ETH
0xe2f7dc7d9bbfd7972394afed4dd8389f71816527d1857ceed06b94459ae0be32178300032022-07-17 12:27:40134 days 8 hrs ago Treasure DAO: Legions (Common) 0x19d0cd1ebe1d93e352e49a0c126e1365081266220 ETH
0xfd6cfad7c76bef948e43d009b7810c0acdb5a4afaa8611a36721ce43fda2586b178299882022-07-17 12:27:40134 days 8 hrs ago Treasure DAO: Legions (Common) 0x19d0cd1ebe1d93e352e49a0c126e1365081266220 ETH
0xeddccf1acc488bd6d24f02bfb2a281090829fb2a178badcb11fb1aa329e128b5178275442022-07-17 11:50:54134 days 9 hrs ago Treasure DAO: Legions (Common) 0x19d0cd1ebe1d93e352e49a0c126e1365081266220 ETH
0x0501ddf3fcffce4ebd9ffce9b1c920f4715eaeb2d0a2e575bab387c3af6e62de168348962022-07-02 16:23:44149 days 4 hrs ago Treasure DAO: Legions (Common) 0x19d0cd1ebe1d93e352e49a0c126e1365081266220 ETH
0x85f8f8ffe7857c1876649d8c4f620bab5fda6cf0b0a4629fdeb7624574846637144343782022-06-12 20:07:28169 days 1 hr ago Treasure DAO: Legions (Common) 0xd661a18e824c8d2edf3badf75aedda5b7d1424480 ETH
0x85f8f8ffe7857c1876649d8c4f620bab5fda6cf0b0a4629fdeb7624574846637144343782022-06-12 20:07:28169 days 1 hr ago Treasure DAO: Legions (Common) 0x19d0cd1ebe1d93e352e49a0c126e1365081266220 ETH
0x85f8f8ffe7857c1876649d8c4f620bab5fda6cf0b0a4629fdeb7624574846637144343782022-06-12 20:07:28169 days 1 hr ago 0xd661a18e824c8d2edf3badf75aedda5b7d142448 Treasure DAO: Legions (Common)0 ETH
0x5cf113660abec1cb938b788de685c2bb9760f5edb107462b6865c89bf0b84d9a144343622022-06-12 20:07:28169 days 1 hr ago Treasure DAO: Legions (Common) 0x19d0cd1ebe1d93e352e49a0c126e1365081266220 ETH
0x03539aad07b16a67fde8dc239cff4b461ba47383e03c2e65ae2575d2966c7838144340362022-06-12 20:01:44169 days 1 hr ago Treasure DAO: Legions (Common) 0x2e26f63ecaf995ee770e4952f9a15a55abdad87f0 ETH
0x03539aad07b16a67fde8dc239cff4b461ba47383e03c2e65ae2575d2966c7838144340362022-06-12 20:01:44169 days 1 hr ago 0xd0ed73b33789111807bd64ae2a6e1e6f92f986f5 Treasure DAO: Legions (Common)0 ETH
0xc10bfe14960c1d34e30a305814bee24a0eb070b96749d92638880628fef70d8e121679842022-05-15 23:37:37196 days 21 hrs ago 0x09986b4e255b3c548041a30a2ee312fe176731c2 Treasure DAO: Legions (Common)0 ETH
0xc10bfe14960c1d34e30a305814bee24a0eb070b96749d92638880628fef70d8e121679842022-05-15 23:37:37196 days 21 hrs ago 0x09986b4e255b3c548041a30a2ee312fe176731c2 Treasure DAO: Legions (Common)0 ETH
0x9342f87c59ff6304fd1aa687b292e80ade03e8dbfde7d0c29619d4714f91acdf97663482022-04-14 0:59:15228 days 20 hrs ago Treasure DAO: Legions (Common) 0x695efd2568a673a6ccda47c24e2af2c2e7392a3a0 ETH
0x9342f87c59ff6304fd1aa687b292e80ade03e8dbfde7d0c29619d4714f91acdf97663482022-04-14 0:59:15228 days 20 hrs ago Treasure DAO: Legions (Common) 0xd661a18e824c8d2edf3badf75aedda5b7d1424480 ETH
0x9342f87c59ff6304fd1aa687b292e80ade03e8dbfde7d0c29619d4714f91acdf97663482022-04-14 0:59:15228 days 20 hrs ago 0xd661a18e824c8d2edf3badf75aedda5b7d142448 Treasure DAO: Legions (Common)0 ETH
0xae213d3588fc074f22d687fab70d501e52d9fb7acc3f5d858e991d9aac8445d597662672022-04-14 0:56:53228 days 20 hrs ago 0xd0ed73b33789111807bd64ae2a6e1e6f92f986f5 Treasure DAO: Legions (Common)0 ETH
0x649d3dff29041fbbfe2344f6c257358a4fd7fd01e8a607926c798d6dd1c82bd693584102022-04-05 19:59:14237 days 1 hr ago Treasure DAO: Legions (Common) 0x695efd2568a673a6ccda47c24e2af2c2e7392a3a0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CardsProxy

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 24 : CardsProxy.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import '@solidstate/contracts/introspection/ERC165Storage.sol';
import '@solidstate/contracts/proxy/diamond/Diamond.sol';
import '@solidstate/contracts/token/ERC1155/IERC1155.sol';
import '@solidstate/contracts/token/ERC1155/metadata/ERC1155MetadataStorage.sol';

import './CardsMintStorage.sol';

contract CardsProxy is Diamond {
    using ERC165Storage for ERC165Storage.Layout;

    constructor(address merkleProofClaim, string memory baseURI) {
        ERC165Storage.layout().setSupportedInterface(
            type(IERC1155).interfaceId,
            true
        );
        CardsMintStorage.layout().minters[merkleProofClaim] = true;
        ERC1155MetadataStorage.layout().baseURI = baseURI;
    }
}

File 2 of 24 : ERC165Storage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library ERC165Storage {
    struct Layout {
        mapping(bytes4 => bool) supportedInterfaces;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256('solidstate.contracts.storage.ERC165');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }

    function isSupportedInterface(Layout storage l, bytes4 interfaceId)
        internal
        view
        returns (bool)
    {
        return l.supportedInterfaces[interfaceId];
    }

    function setSupportedInterface(
        Layout storage l,
        bytes4 interfaceId,
        bool status
    ) internal {
        require(interfaceId != 0xffffffff, 'ERC165: invalid interface id');
        l.supportedInterfaces[interfaceId] = status;
    }
}

File 3 of 24 : Diamond.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { SafeOwnable, OwnableStorage, Ownable } from '../../access/SafeOwnable.sol';
import { IERC173 } from '../../access/IERC173.sol';
import { ERC165, IERC165, ERC165Storage } from '../../introspection/ERC165.sol';
import { DiamondBase, DiamondBaseStorage } from './DiamondBase.sol';
import { DiamondCuttable, IDiamondCuttable } from './DiamondCuttable.sol';
import { DiamondLoupe, IDiamondLoupe } from './DiamondLoupe.sol';

/**
 * @notice SolidState "Diamond" proxy reference implementation
 */
abstract contract Diamond is
    DiamondBase,
    DiamondCuttable,
    DiamondLoupe,
    SafeOwnable,
    ERC165
{
    using DiamondBaseStorage for DiamondBaseStorage.Layout;
    using ERC165Storage for ERC165Storage.Layout;
    using OwnableStorage for OwnableStorage.Layout;

    constructor() {
        ERC165Storage.Layout storage erc165 = ERC165Storage.layout();
        bytes4[] memory selectors = new bytes4[](12);

        // register DiamondCuttable

        selectors[0] = IDiamondCuttable.diamondCut.selector;

        erc165.setSupportedInterface(type(IDiamondCuttable).interfaceId, true);

        // register DiamondLoupe

        selectors[1] = IDiamondLoupe.facets.selector;
        selectors[2] = IDiamondLoupe.facetFunctionSelectors.selector;
        selectors[3] = IDiamondLoupe.facetAddresses.selector;
        selectors[4] = IDiamondLoupe.facetAddress.selector;

        erc165.setSupportedInterface(type(IDiamondLoupe).interfaceId, true);

        // register ERC165

        selectors[5] = IERC165.supportsInterface.selector;

        erc165.setSupportedInterface(type(IERC165).interfaceId, true);

        // register SafeOwnable

        selectors[6] = Ownable.owner.selector;
        selectors[7] = SafeOwnable.nomineeOwner.selector;
        selectors[8] = SafeOwnable.transferOwnership.selector;
        selectors[9] = SafeOwnable.acceptOwnership.selector;

        erc165.setSupportedInterface(type(IERC173).interfaceId, true);

        // register Diamond

        selectors[10] = Diamond.getFallbackAddress.selector;
        selectors[11] = Diamond.setFallbackAddress.selector;

        // diamond cut

        FacetCut[] memory facetCuts = new FacetCut[](1);

        facetCuts[0] = FacetCut({
            target: address(this),
            action: IDiamondCuttable.FacetCutAction.ADD,
            selectors: selectors
        });

        DiamondBaseStorage.layout().diamondCut(facetCuts, address(0), '');

        // set owner

        OwnableStorage.layout().setOwner(msg.sender);
    }

    receive() external payable {}

    /**
     * @notice get the address of the fallback contract
     * @return fallback address
     */
    function getFallbackAddress() external view returns (address) {
        return DiamondBaseStorage.layout().fallbackAddress;
    }

    /**
     * @notice set the address of the fallback contract
     * @param fallbackAddress fallback address
     */
    function setFallbackAddress(address fallbackAddress) external onlyOwner {
        DiamondBaseStorage.layout().fallbackAddress = fallbackAddress;
    }
}

File 4 of 24 : IERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IERC1155Internal } from './IERC1155Internal.sol';
import { IERC165 } from '../../introspection/IERC165.sol';

/**
 * @notice ERC1155 interface
 * @dev see https://github.com/ethereum/EIPs/issues/1155
 */
interface IERC1155 is IERC1155Internal, IERC165 {
    /**
     * @notice query the balance of given token held by given address
     * @param account address to query
     * @param id token to query
     * @return token balance
     */
    function balanceOf(address account, uint256 id)
        external
        view
        returns (uint256);

    /**
     * @notice query the balances of given tokens held by given addresses
     * @param accounts addresss to query
     * @param ids tokens to query
     * @return token balances
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @notice query approval status of given operator with respect to given address
     * @param account address to query for approval granted
     * @param operator address to query for approval received
     * @return whether operator is approved to spend tokens held by account
     */
    function isApprovedForAll(address account, address operator)
        external
        view
        returns (bool);

    /**
     * @notice grant approval to or revoke approval from given operator to spend held tokens
     * @param operator address whose approval status to update
     * @param status whether operator should be considered approved
     */
    function setApprovalForAll(address operator, bool status) external;

    /**
     * @notice transfer tokens between given addresses, checking for ERC1155Receiver implementation if applicable
     * @param from sender of tokens
     * @param to receiver of tokens
     * @param id token ID
     * @param amount quantity of tokens to transfer
     * @param data data payload
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @notice transfer batch of tokens between given addresses, checking for ERC1155Receiver implementation if applicable
     * @param from sender of tokens
     * @param to receiver of tokens
     * @param ids list of token IDs
     * @param amounts list of quantities of tokens to transfer
     * @param data data payload
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 5 of 24 : ERC1155MetadataStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @notice ERC1155 metadata extensions
 */
library ERC1155MetadataStorage {
    bytes32 internal constant STORAGE_SLOT =
        keccak256('solidstate.contracts.storage.ERC1155Metadata');

    struct Layout {
        string baseURI;
        mapping(uint256 => string) tokenURIs;
    }

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 6 of 24 : CardsMintStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library CardsMintStorage {
    struct Layout {
        mapping(address => bool) minters;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256('treasure.contracts.storage.CardsMint');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 7 of 24 : SafeOwnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { Ownable, OwnableStorage } from './Ownable.sol';
import { SafeOwnableInternal } from './SafeOwnableInternal.sol';
import { SafeOwnableStorage } from './SafeOwnableStorage.sol';

/**
 * @title Ownership access control based on ERC173 with ownership transfer safety check
 */
abstract contract SafeOwnable is Ownable, SafeOwnableInternal {
    using OwnableStorage for OwnableStorage.Layout;
    using SafeOwnableStorage for SafeOwnableStorage.Layout;

    function nomineeOwner() public view virtual returns (address) {
        return SafeOwnableStorage.layout().nomineeOwner;
    }

    /**
     * @inheritdoc Ownable
     * @dev ownership transfer must be accepted by beneficiary before transfer is complete
     */
    function transferOwnership(address account)
        public
        virtual
        override
        onlyOwner
    {
        SafeOwnableStorage.layout().setNomineeOwner(account);
    }

    /**
     * @notice accept transfer of contract ownership
     */
    function acceptOwnership() public virtual onlyNomineeOwner {
        OwnableStorage.Layout storage l = OwnableStorage.layout();
        emit OwnershipTransferred(l.owner, msg.sender);
        l.setOwner(msg.sender);
        SafeOwnableStorage.layout().setNomineeOwner(address(0));
    }
}

File 8 of 24 : IERC173.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title Contract ownership standard interface
 * @dev see https://eips.ethereum.org/EIPS/eip-173
 */
interface IERC173 {
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );

    /**
     * @notice get the ERC173 contract owner
     * @return conract owner
     */
    function owner() external view returns (address);

    /**
     * @notice transfer contract ownership to new account
     * @param account address of new owner
     */
    function transferOwnership(address account) external;
}

File 9 of 24 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IERC165 } from './IERC165.sol';
import { ERC165Storage } from './ERC165Storage.sol';

/**
 * @title ERC165 implementation
 */
abstract contract ERC165 is IERC165 {
    using ERC165Storage for ERC165Storage.Layout;

    /**
     * @inheritdoc IERC165
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        override
        returns (bool)
    {
        return ERC165Storage.layout().isSupportedInterface(interfaceId);
    }
}

File 10 of 24 : DiamondBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { Proxy } from '../Proxy.sol';
import { DiamondBaseStorage } from './DiamondBaseStorage.sol';
import { IDiamondLoupe } from './IDiamondLoupe.sol';
import { IDiamondCuttable } from './IDiamondCuttable.sol';

/**
 * @title EIP-2535 "Diamond" proxy base contract
 * @dev see https://eips.ethereum.org/EIPS/eip-2535
 */
abstract contract DiamondBase is Proxy {
    /**
     * @inheritdoc Proxy
     */
    function _getImplementation() internal view override returns (address) {
        // inline storage layout retrieval uses less gas
        DiamondBaseStorage.Layout storage l;
        bytes32 slot = DiamondBaseStorage.STORAGE_SLOT;
        assembly {
            l.slot := slot
        }

        address implementation = address(bytes20(l.facets[msg.sig]));

        if (implementation == address(0)) {
            implementation = l.fallbackAddress;
            require(
                implementation != address(0),
                'DiamondBase: no facet found for function signature'
            );
        }

        return implementation;
    }
}

File 11 of 24 : DiamondCuttable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { OwnableInternal } from '../../access/OwnableInternal.sol';
import { IDiamondCuttable } from './IDiamondCuttable.sol';
import { DiamondBaseStorage } from './DiamondBaseStorage.sol';

/**
 * @title EIP-2535 "Diamond" proxy update contract
 */
abstract contract DiamondCuttable is IDiamondCuttable, OwnableInternal {
    using DiamondBaseStorage for DiamondBaseStorage.Layout;

    /**
     * @notice update functions callable on Diamond proxy
     * @param facetCuts array of structured Diamond facet update data
     * @param target optional recipient of initialization delegatecall
     * @param data optional initialization call data
     */
    function diamondCut(
        FacetCut[] calldata facetCuts,
        address target,
        bytes calldata data
    ) external override onlyOwner {
        DiamondBaseStorage.layout().diamondCut(facetCuts, target, data);
    }
}

File 12 of 24 : DiamondLoupe.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { DiamondBaseStorage } from './DiamondBaseStorage.sol';
import { IDiamondLoupe } from './IDiamondLoupe.sol';

/**
 * @title EIP-2535 "Diamond" proxy introspection contract
 * @dev derived from https://github.com/mudgen/diamond-2 (MIT license)
 */
abstract contract DiamondLoupe is IDiamondLoupe {
    /**
     * @inheritdoc IDiamondLoupe
     */
    function facets()
        external
        view
        override
        returns (Facet[] memory diamondFacets)
    {
        DiamondBaseStorage.Layout storage l = DiamondBaseStorage.layout();

        diamondFacets = new Facet[](l.selectorCount);

        uint8[] memory numFacetSelectors = new uint8[](l.selectorCount);
        uint256 numFacets;
        uint256 selectorIndex;

        // loop through function selectors
        for (uint256 slotIndex; selectorIndex < l.selectorCount; slotIndex++) {
            bytes32 slot = l.selectorSlots[slotIndex];

            for (
                uint256 selectorSlotIndex;
                selectorSlotIndex < 8;
                selectorSlotIndex++
            ) {
                selectorIndex++;

                if (selectorIndex > l.selectorCount) {
                    break;
                }

                bytes4 selector = bytes4(slot << (selectorSlotIndex << 5));
                address facet = address(bytes20(l.facets[selector]));

                bool continueLoop;

                for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {
                    if (diamondFacets[facetIndex].target == facet) {
                        diamondFacets[facetIndex].selectors[
                            numFacetSelectors[facetIndex]
                        ] = selector;
                        // probably will never have more than 256 functions from one facet contract
                        require(numFacetSelectors[facetIndex] < 255);
                        numFacetSelectors[facetIndex]++;
                        continueLoop = true;
                        break;
                    }
                }

                if (continueLoop) {
                    continue;
                }

                diamondFacets[numFacets].target = facet;
                diamondFacets[numFacets].selectors = new bytes4[](
                    l.selectorCount
                );
                diamondFacets[numFacets].selectors[0] = selector;
                numFacetSelectors[numFacets] = 1;
                numFacets++;
            }
        }

        for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {
            uint256 numSelectors = numFacetSelectors[facetIndex];
            bytes4[] memory selectors = diamondFacets[facetIndex].selectors;

            // setting the number of selectors
            assembly {
                mstore(selectors, numSelectors)
            }
        }

        // setting the number of facets
        assembly {
            mstore(diamondFacets, numFacets)
        }
    }

    /**
     * @inheritdoc IDiamondLoupe
     */
    function facetFunctionSelectors(address facet)
        external
        view
        override
        returns (bytes4[] memory selectors)
    {
        DiamondBaseStorage.Layout storage l = DiamondBaseStorage.layout();

        selectors = new bytes4[](l.selectorCount);

        uint256 numSelectors;
        uint256 selectorIndex;

        // loop through function selectors
        for (uint256 slotIndex; selectorIndex < l.selectorCount; slotIndex++) {
            bytes32 slot = l.selectorSlots[slotIndex];

            for (
                uint256 selectorSlotIndex;
                selectorSlotIndex < 8;
                selectorSlotIndex++
            ) {
                selectorIndex++;

                if (selectorIndex > l.selectorCount) {
                    break;
                }

                bytes4 selector = bytes4(slot << (selectorSlotIndex << 5));

                if (facet == address(bytes20(l.facets[selector]))) {
                    selectors[numSelectors] = selector;
                    numSelectors++;
                }
            }
        }

        // set the number of selectors in the array
        assembly {
            mstore(selectors, numSelectors)
        }
    }

    /**
     * @inheritdoc IDiamondLoupe
     */
    function facetAddresses()
        external
        view
        override
        returns (address[] memory addresses)
    {
        DiamondBaseStorage.Layout storage l = DiamondBaseStorage.layout();

        addresses = new address[](l.selectorCount);
        uint256 numFacets;
        uint256 selectorIndex;

        for (uint256 slotIndex; selectorIndex < l.selectorCount; slotIndex++) {
            bytes32 slot = l.selectorSlots[slotIndex];

            for (
                uint256 selectorSlotIndex;
                selectorSlotIndex < 8;
                selectorSlotIndex++
            ) {
                selectorIndex++;

                if (selectorIndex > l.selectorCount) {
                    break;
                }

                bytes4 selector = bytes4(slot << (selectorSlotIndex << 5));
                address facet = address(bytes20(l.facets[selector]));

                bool continueLoop;

                for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {
                    if (facet == addresses[facetIndex]) {
                        continueLoop = true;
                        break;
                    }
                }

                if (continueLoop) {
                    continue;
                }

                addresses[numFacets] = facet;
                numFacets++;
            }
        }

        // set the number of facet addresses in the array
        assembly {
            mstore(addresses, numFacets)
        }
    }

    /**
     * @inheritdoc IDiamondLoupe
     */
    function facetAddress(bytes4 selector)
        external
        view
        override
        returns (address facet)
    {
        facet = address(bytes20(DiamondBaseStorage.layout().facets[selector]));
    }
}

File 13 of 24 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IERC173 } from './IERC173.sol';
import { OwnableInternal } from './OwnableInternal.sol';
import { OwnableStorage } from './OwnableStorage.sol';

/**
 * @title Ownership access control based on ERC173
 */
abstract contract Ownable is IERC173, OwnableInternal {
    using OwnableStorage for OwnableStorage.Layout;

    /**
     * @inheritdoc IERC173
     */
    function owner() public view virtual override returns (address) {
        return OwnableStorage.layout().owner;
    }

    /**
     * @inheritdoc IERC173
     */
    function transferOwnership(address account)
        public
        virtual
        override
        onlyOwner
    {
        OwnableStorage.layout().setOwner(account);
        emit OwnershipTransferred(msg.sender, account);
    }
}

File 14 of 24 : SafeOwnableInternal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { SafeOwnableStorage } from './SafeOwnableStorage.sol';

abstract contract SafeOwnableInternal {
    using SafeOwnableStorage for SafeOwnableStorage.Layout;

    modifier onlyNomineeOwner() {
        require(
            msg.sender == SafeOwnableStorage.layout().nomineeOwner,
            'SafeOwnable: sender must be nominee owner'
        );
        _;
    }
}

File 15 of 24 : SafeOwnableStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library SafeOwnableStorage {
    struct Layout {
        address nomineeOwner;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256('solidstate.contracts.storage.SafeOwnable');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }

    function setNomineeOwner(Layout storage l, address nomineeOwner) internal {
        l.nomineeOwner = nomineeOwner;
    }
}

File 16 of 24 : OwnableInternal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { OwnableStorage } from './OwnableStorage.sol';

abstract contract OwnableInternal {
    using OwnableStorage for OwnableStorage.Layout;

    modifier onlyOwner() {
        require(
            msg.sender == OwnableStorage.layout().owner,
            'Ownable: sender must be owner'
        );
        _;
    }
}

File 17 of 24 : OwnableStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library OwnableStorage {
    struct Layout {
        address owner;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256('solidstate.contracts.storage.Ownable');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }

    function setOwner(Layout storage l, address owner) internal {
        l.owner = owner;
    }
}

File 18 of 24 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title ERC165 interface registration interface
 * @dev see https://eips.ethereum.org/EIPS/eip-165
 */
interface IERC165 {
    /**
     * @notice query whether contract has registered support for given interface
     * @param interfaceId interface id
     * @return bool whether interface is supported
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 19 of 24 : Proxy.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { AddressUtils } from '../utils/AddressUtils.sol';

/**
 * @title Base proxy contract
 */
abstract contract Proxy {
    using AddressUtils for address;

    /**
     * @notice delegate all calls to implementation contract
     * @dev reverts if implementation address contains no code, for compatibility with metamorphic contracts
     * @dev memory location in use by assembly may be unsafe in other contexts
     */
    fallback() external payable virtual {
        address implementation = _getImplementation();

        require(
            implementation.isContract(),
            'Proxy: implementation must be contract'
        );

        assembly {
            calldatacopy(0, 0, calldatasize())
            let result := delegatecall(
                gas(),
                implementation,
                0,
                calldatasize(),
                0,
                0
            )
            returndatacopy(0, 0, returndatasize())

            switch result
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }

    /**
     * @notice get logic implementation address
     * @return implementation address
     */
    function _getImplementation() internal virtual returns (address);
}

File 20 of 24 : DiamondBaseStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { AddressUtils } from '../../utils/AddressUtils.sol';
import { IDiamondCuttable } from './IDiamondCuttable.sol';

/**
 * @dev derived from https://github.com/mudgen/diamond-2 (MIT license)
 */
library DiamondBaseStorage {
    using AddressUtils for address;
    using DiamondBaseStorage for DiamondBaseStorage.Layout;

    struct Layout {
        // function selector => (facet address, selector slot position)
        mapping(bytes4 => bytes32) facets;
        // total number of selectors registered
        uint16 selectorCount;
        // array of selector slots with 8 selectors per slot
        mapping(uint256 => bytes32) selectorSlots;
        address fallbackAddress;
    }

    bytes32 constant CLEAR_ADDRESS_MASK =
        bytes32(uint256(0xffffffffffffffffffffffff));
    bytes32 constant CLEAR_SELECTOR_MASK = bytes32(uint256(0xffffffff << 224));

    bytes32 internal constant STORAGE_SLOT =
        keccak256('solidstate.contracts.storage.DiamondBase');

    event DiamondCut(
        IDiamondCuttable.FacetCut[] facetCuts,
        address target,
        bytes data
    );

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }

    /**
     * @notice update functions callable on Diamond proxy
     * @param l storage layout
     * @param facetCuts array of structured Diamond facet update data
     * @param target optional recipient of initialization delegatecall
     * @param data optional initialization call data
     */
    function diamondCut(
        Layout storage l,
        IDiamondCuttable.FacetCut[] memory facetCuts,
        address target,
        bytes memory data
    ) internal {
        unchecked {
            uint256 originalSelectorCount = l.selectorCount;
            uint256 selectorCount = originalSelectorCount;
            bytes32 selectorSlot;

            // Check if last selector slot is not full
            if (selectorCount & 7 > 0) {
                // get last selectorSlot
                selectorSlot = l.selectorSlots[selectorCount >> 3];
            }

            for (uint256 i; i < facetCuts.length; i++) {
                IDiamondCuttable.FacetCut memory facetCut = facetCuts[i];
                IDiamondCuttable.FacetCutAction action = facetCut.action;

                require(
                    facetCut.selectors.length > 0,
                    'DiamondBase: no selectors specified'
                );

                if (action == IDiamondCuttable.FacetCutAction.ADD) {
                    (selectorCount, selectorSlot) = l.addFacetSelectors(
                        selectorCount,
                        selectorSlot,
                        facetCut
                    );
                } else if (action == IDiamondCuttable.FacetCutAction.REMOVE) {
                    (selectorCount, selectorSlot) = l.removeFacetSelectors(
                        selectorCount,
                        selectorSlot,
                        facetCut
                    );
                } else if (action == IDiamondCuttable.FacetCutAction.REPLACE) {
                    l.replaceFacetSelectors(facetCut);
                }
            }

            if (selectorCount != originalSelectorCount) {
                l.selectorCount = uint16(selectorCount);
            }

            // If last selector slot is not full
            if (selectorCount & 7 > 0) {
                l.selectorSlots[selectorCount >> 3] = selectorSlot;
            }

            emit DiamondCut(facetCuts, target, data);
            initialize(target, data);
        }
    }

    function addFacetSelectors(
        Layout storage l,
        uint256 selectorCount,
        bytes32 selectorSlot,
        IDiamondCuttable.FacetCut memory facetCut
    ) internal returns (uint256, bytes32) {
        unchecked {
            require(
                facetCut.target == address(this) ||
                    facetCut.target.isContract(),
                'DiamondBase: ADD target has no code'
            );

            for (uint256 i; i < facetCut.selectors.length; i++) {
                bytes4 selector = facetCut.selectors[i];
                bytes32 oldFacet = l.facets[selector];

                require(
                    address(bytes20(oldFacet)) == address(0),
                    'DiamondBase: selector already added'
                );

                // add facet for selector
                l.facets[selector] =
                    bytes20(facetCut.target) |
                    bytes32(selectorCount);
                uint256 selectorInSlotPosition = (selectorCount & 7) << 5;

                // clear selector position in slot and add selector
                selectorSlot =
                    (selectorSlot &
                        ~(CLEAR_SELECTOR_MASK >> selectorInSlotPosition)) |
                    (bytes32(selector) >> selectorInSlotPosition);

                // if slot is full then write it to storage
                if (selectorInSlotPosition == 224) {
                    l.selectorSlots[selectorCount >> 3] = selectorSlot;
                    selectorSlot = 0;
                }

                selectorCount++;
            }

            return (selectorCount, selectorSlot);
        }
    }

    function removeFacetSelectors(
        Layout storage l,
        uint256 selectorCount,
        bytes32 selectorSlot,
        IDiamondCuttable.FacetCut memory facetCut
    ) internal returns (uint256, bytes32) {
        unchecked {
            require(
                facetCut.target == address(0),
                'DiamondBase: REMOVE target must be zero address'
            );

            uint256 selectorSlotCount = selectorCount >> 3;
            uint256 selectorInSlotIndex = selectorCount & 7;

            for (uint256 i; i < facetCut.selectors.length; i++) {
                bytes4 selector = facetCut.selectors[i];
                bytes32 oldFacet = l.facets[selector];

                require(
                    address(bytes20(oldFacet)) != address(0),
                    'DiamondBase: selector not found'
                );

                require(
                    address(bytes20(oldFacet)) != address(this),
                    'DiamondBase: selector is immutable'
                );

                if (selectorSlot == 0) {
                    selectorSlotCount--;
                    selectorSlot = l.selectorSlots[selectorSlotCount];
                    selectorInSlotIndex = 7;
                } else {
                    selectorInSlotIndex--;
                }

                bytes4 lastSelector;
                uint256 oldSelectorsSlotCount;
                uint256 oldSelectorInSlotPosition;

                // adding a block here prevents stack too deep error
                {
                    // replace selector with last selector in l.facets
                    lastSelector = bytes4(
                        selectorSlot << (selectorInSlotIndex << 5)
                    );

                    if (lastSelector != selector) {
                        // update last selector slot position info
                        l.facets[lastSelector] =
                            (oldFacet & CLEAR_ADDRESS_MASK) |
                            bytes20(l.facets[lastSelector]);
                    }

                    delete l.facets[selector];
                    uint256 oldSelectorCount = uint16(uint256(oldFacet));
                    oldSelectorsSlotCount = oldSelectorCount >> 3;
                    oldSelectorInSlotPosition = (oldSelectorCount & 7) << 5;
                }

                if (oldSelectorsSlotCount != selectorSlotCount) {
                    bytes32 oldSelectorSlot = l.selectorSlots[
                        oldSelectorsSlotCount
                    ];

                    // clears the selector we are deleting and puts the last selector in its place.
                    oldSelectorSlot =
                        (oldSelectorSlot &
                            ~(CLEAR_SELECTOR_MASK >>
                                oldSelectorInSlotPosition)) |
                        (bytes32(lastSelector) >> oldSelectorInSlotPosition);

                    // update storage with the modified slot
                    l.selectorSlots[oldSelectorsSlotCount] = oldSelectorSlot;
                } else {
                    // clears the selector we are deleting and puts the last selector in its place.
                    selectorSlot =
                        (selectorSlot &
                            ~(CLEAR_SELECTOR_MASK >>
                                oldSelectorInSlotPosition)) |
                        (bytes32(lastSelector) >> oldSelectorInSlotPosition);
                }

                if (selectorInSlotIndex == 0) {
                    delete l.selectorSlots[selectorSlotCount];
                    selectorSlot = 0;
                }
            }

            selectorCount = (selectorSlotCount << 3) | selectorInSlotIndex;

            return (selectorCount, selectorSlot);
        }
    }

    function replaceFacetSelectors(
        Layout storage l,
        IDiamondCuttable.FacetCut memory facetCut
    ) internal {
        unchecked {
            require(
                facetCut.target.isContract(),
                'DiamondBase: REPLACE target has no code'
            );

            for (uint256 i; i < facetCut.selectors.length; i++) {
                bytes4 selector = facetCut.selectors[i];
                bytes32 oldFacet = l.facets[selector];
                address oldFacetAddress = address(bytes20(oldFacet));

                require(
                    oldFacetAddress != address(0),
                    'DiamondBase: selector not found'
                );

                require(
                    oldFacetAddress != address(this),
                    'DiamondBase: selector is immutable'
                );

                require(
                    oldFacetAddress != facetCut.target,
                    'DiamondBase: REPLACE target is identical'
                );

                // replace old facet address
                l.facets[selector] =
                    (oldFacet & CLEAR_ADDRESS_MASK) |
                    bytes20(facetCut.target);
            }
        }
    }

    function initialize(address target, bytes memory data) private {
        require(
            (target == address(0)) == (data.length == 0),
            'DiamondBase: invalid initialization parameters'
        );

        if (target != address(0)) {
            if (target != address(this)) {
                require(
                    target.isContract(),
                    'DiamondBase: initialization target has no code'
                );
            }

            (bool success, ) = target.delegatecall(data);

            if (!success) {
                assembly {
                    returndatacopy(0, 0, returndatasize())
                    revert(0, returndatasize())
                }
            }
        }
    }
}

File 21 of 24 : IDiamondLoupe.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title Diamond proxy introspection interface
 * @dev see https://eips.ethereum.org/EIPS/eip-2535
 */
interface IDiamondLoupe {
    struct Facet {
        address target;
        bytes4[] selectors;
    }

    /**
     * @notice get all facets and their selectors
     * @return diamondFacets array of structured facet data
     */
    function facets() external view returns (Facet[] memory diamondFacets);

    /**
     * @notice get all selectors for given facet address
     * @param facet address of facet to query
     * @return selectors array of function selectors
     */
    function facetFunctionSelectors(address facet)
        external
        view
        returns (bytes4[] memory selectors);

    /**
     * @notice get addresses of all facets used by diamond
     * @return addresses array of facet addresses
     */
    function facetAddresses()
        external
        view
        returns (address[] memory addresses);

    /**
     * @notice get the address of the facet associated with given selector
     * @param selector function selector to query
     * @return facet facet address (zero address if not found)
     */
    function facetAddress(bytes4 selector)
        external
        view
        returns (address facet);
}

File 22 of 24 : IDiamondCuttable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title Diamond proxy upgrade interface
 * @dev see https://eips.ethereum.org/EIPS/eip-2535
 */
interface IDiamondCuttable {
    enum FacetCutAction {
        ADD,
        REPLACE,
        REMOVE
    }

    event DiamondCut(FacetCut[] facetCuts, address target, bytes data);

    struct FacetCut {
        address target;
        FacetCutAction action;
        bytes4[] selectors;
    }

    /**
     * @notice update diamond facets and optionally execute arbitrary initialization function
     * @param facetCuts facet addresses, actions, and function selectors
     * @param target initialization function target
     * @param data initialization function call data
     */
    function diamondCut(
        FacetCut[] calldata facetCuts,
        address target,
        bytes calldata data
    ) external;
}

File 23 of 24 : AddressUtils.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library AddressUtils {
    function toString(address account) internal pure returns (string memory) {
        bytes32 value = bytes32(uint256(uint160(account)));
        bytes memory alphabet = '0123456789abcdef';
        bytes memory chars = new bytes(42);

        chars[0] = '0';
        chars[1] = 'x';

        for (uint256 i = 0; i < 20; i++) {
            chars[2 + i * 2] = alphabet[uint8(value[i + 12] >> 4)];
            chars[3 + i * 2] = alphabet[uint8(value[i + 12] & 0x0f)];
        }

        return string(chars);
    }

    function isContract(address account) internal view returns (bool) {
        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    function sendValue(address payable account, uint256 amount) internal {
        (bool success, ) = account.call{ value: amount }('');
        require(success, 'AddressUtils: failed to send value');
    }

    function functionCall(address target, bytes memory data)
        internal
        returns (bytes memory)
    {
        return
            functionCall(target, data, 'AddressUtils: failed low-level call');
    }

    function functionCall(
        address target,
        bytes memory data,
        string memory error
    ) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, error);
    }

    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return
            functionCallWithValue(
                target,
                data,
                value,
                'AddressUtils: failed low-level call with value'
            );
    }

    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory error
    ) internal returns (bytes memory) {
        require(
            address(this).balance >= value,
            'AddressUtils: insufficient balance for call'
        );
        return _functionCallWithValue(target, data, value, error);
    }

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory error
    ) private returns (bytes memory) {
        require(
            isContract(target),
            'AddressUtils: function call to non-contract'
        );

        (bool success, bytes memory returnData) = target.call{ value: value }(
            data
        );

        if (success) {
            return returnData;
        } else if (returnData.length > 0) {
            assembly {
                let returnData_size := mload(returnData)
                revert(add(32, returnData), returnData_size)
            }
        } else {
            revert(error);
        }
    }
}

File 24 of 24 : IERC1155Internal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IERC165 } from '../../introspection/IERC165.sol';

/**
 * @notice Partial ERC1155 interface needed by internal functions
 */
interface IERC1155Internal {
    event TransferSingle(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256 id,
        uint256 value
    );

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

    event ApprovalForAll(
        address indexed account,
        address indexed operator,
        bool approved
    );
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"merkleProofClaim","type":"address"},{"internalType":"string","name":"baseURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"enum IDiamondCuttable.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct IDiamondCuttable.FacetCut[]","name":"facetCuts","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"DiamondCut","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"enum IDiamondCuttable.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"internalType":"struct IDiamondCuttable.FacetCut[]","name":"facetCuts","type":"tuple[]"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"diamondCut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"facetAddress","outputs":[{"internalType":"address","name":"facet","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facetAddresses","outputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"facet","type":"address"}],"name":"facetFunctionSelectors","outputs":[{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facets","outputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"internalType":"struct IDiamondLoupe.Facet[]","name":"diamondFacets","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFallbackAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nomineeOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"fallbackAddress","type":"address"}],"name":"setFallbackAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b5060405162003630380380620036308339810160408190526200003491620012c5565b60006200004b620005e060201b62000ebe1760201c565b60408051600c8082526101a08201909252919250600091906020820161018080368337019050509050631f931c1c60e01b816000815181106200009e57634e487b7160e01b600052603260045260246000fd5b6001600160e01b0319909216602092830291909101820152620000d89083906307e4c70760e21b9060019062000ee262000604821b17901c565b637a0ed62760e01b816001815181106200010257634e487b7160e01b600052603260045260246000fd5b6001600160e01b03199092166020928302919091019091015280516356fe50af60e11b90829060029081106200014857634e487b7160e01b600052603260045260246000fd5b6001600160e01b03199092166020928302919091019091015280516314bbdacb60e21b90829060039081106200018e57634e487b7160e01b600052603260045260246000fd5b6001600160e01b03199092166020928302919091019091015280516366ffd66360e11b9082906004908110620001d457634e487b7160e01b600052603260045260246000fd5b6001600160e01b03199092166020928302919091018201526200020e9083906348e2b09360e01b9060019062000ee262000604821b17901c565b6301ffc9a760e01b816005815181106200023857634e487b7160e01b600052603260045260246000fd5b6001600160e01b0319909216602092830291909101820152620002729083906301ffc9a760e01b9060019062000ee262000604821b17901c565b638da5cb5b60e01b816006815181106200029c57634e487b7160e01b600052603260045260246000fd5b6001600160e01b031990921660209283029190910190910152805163455a8a8560e11b9082906007908110620002e257634e487b7160e01b600052603260045260246000fd5b6001600160e01b031990921660209283029190910190910152805163f2fde38b60e01b90829060089081106200032857634e487b7160e01b600052603260045260246000fd5b6001600160e01b03199092166020928302919091019091015280516379ba509760e01b90829060099081106200036e57634e487b7160e01b600052603260045260246000fd5b6001600160e01b0319909216602092830291909101820152620003a89083906307f5828d60e41b9060019062000ee262000604821b17901c565b632c40805960e01b81600a81518110620003d257634e487b7160e01b600052603260045260246000fd5b6001600160e01b0319909216602092830291909101909101528051639142376560e01b908290600b9081106200041857634e487b7160e01b600052603260045260246000fd5b6001600160e01b03199290921660209283029190910190910152604080516001808252818301909252600091816020015b604080516060808201835260008083526020830152918101919091528152602001906001900390816200044957905050604080516060810190915230815290915060208101600081526020018381525081600081518110620004bb57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506200050881600060405180602001604052806000815250620004f26200069260201b62000f6a1760201c565b620006b660201b62000f8e17909392919060201c565b6200053633620005226200090960201b6200119a1760201c565b6200092d60201b620011be1790919060201c565b50505062000571636cdb3d1360e11b60016200055c620005e060201b62000ebe1760201c565b6200060460201b62000ee2179092919060201c565b6001620005886200094a60201b620011db1760201c565b6001600160a01b0384166000908152602091825260409020805460ff1916921515929092179091558190620005c6906200096e811b620011ff17901c565b8151620005d792602001906200121f565b50505062001570565b7f326d0c59a7612f6a9919e2a8ee333c80ba689d8ba2634de89c85cbb04832e70590565b6001600160e01b03198083161415620006645760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e746572666163652069640000000060448201526064015b60405180910390fd5b6001600160e01b03199190911660009081526020929092526040909120805460ff1916911515919091179055565b7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc9390565b600184015461ffff811690819060009060071615620006e75750600381901c60009081526002870160205260409020545b60005b8651811015620008775760008782815181106200071757634e487b7160e01b600052603260045260246000fd5b602002602001015190506000816020015190506000826040015151116200078d5760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a206e6f2073656c6563746f7273207370656369666044820152621a595960ea1b60648201526084016200065b565b6000816002811115620007b057634e487b7160e01b600052602160045260246000fd5b1415620007e057620007d58585848d6200099260201b6200122317909392919060201c565b90955093506200086c565b60028160028111156200080357634e487b7160e01b600052602160045260246000fd5b14156200082857620007d58585848d62000b7060201b620013e417909392919060201c565b60018160028111156200084b57634e487b7160e01b600052602160045260246000fd5b14156200086c576200086c828b62000e4460201b620016841790919060201c565b5050600101620006ea565b50828214620008945760018701805461ffff191661ffff84161790555b6007821615620008b757600382901c600090815260028801602052604090208190555b7f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673868686604051620008ec93929190620013e7565b60405180910390a16200090085856200108a565b50505050505050565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f67168046090565b81546001600160a01b0319166001600160a01b0391909116179055565b7fd2fbe59115f79ec89cbdaf04053fefb85afb13a14fbcf6290cded23dd019d01d90565b7f4281b61aefbe70b3d3f684b428efca5f33077bc240e76f2808f9177c307617f490565b805160009081906001600160a01b0316301480620009ce5750620009ce83600001516001600160a01b03166200121960201b620003a41760201c565b62000a285760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a204144442074617267657420686173206e6f20636044820152626f646560e81b60648201526084016200065b565b60005b83604001515181101562000b635760008460400151828151811062000a6057634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160e01b031981166000908152918a9052604090912054909150606081901c1562000ae95760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a2073656c6563746f7220616c726561647920616460448201526219195960ea1b60648201526084016200065b565b85516001600160e01b0319838116600081815260208d90526040902060609390931b6001600160601b0319168b1790925560058a901b60e090811692831c91831c1999909916179781141562000b5357600389901c600090815260028b0160205260408120989098555b5050506001958601950162000a2b565b5093959294509192505050565b805160009081906001600160a01b03161562000be75760405162461bcd60e51b815260206004820152602f60248201527f4469616d6f6e64426173653a2052454d4f564520746172676574206d7573742060448201526e6265207a65726f206164647265737360881b60648201526084016200065b565b600385901c6007861660005b85604001515181101562000e305760008660400151828151811062000c2857634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160e01b031981166000908152918c9052604090912054909150606081901c62000ca45760405162461bcd60e51b815260206004820152601f60248201527f4469616d6f6e64426173653a2073656c6563746f72206e6f7420666f756e640060448201526064016200065b565b606081901c30141562000cf45760405162461bcd60e51b81526020600482015260226024820152600080516020620036108339815191526044820152616c6560f01b60648201526084016200065b565b8862000d1e57600019909401600081815260028c0160205260409020549850936007935062000d26565b600019909301925b600584901b89901b6000806001600160e01b03198084169086161462000d79576001600160e01b03198316600090815260208f90526040902080546001600160601b0319166001600160601b0386161790555b50506001600160e01b03198316600090815260208d90526040812055611fff600383901c1660e0600584901b1687821462000dde57600082815260028f016020526040902080546001600160e01b031980841c19909116908516831c17905562000e02565b80836001600160e01b031916901c816001600160e01b031960001b901c198d16179b505b8662000e1e57600088815260028f01602052604081208190559b505b50506001909301925062000bf3915050565b5060039190911b1796939550929350505050565b62000e6781600001516001600160a01b03166200121960201b620003a41760201c565b62000ec55760405162461bcd60e51b815260206004820152602760248201527f4469616d6f6e64426173653a205245504c4143452074617267657420686173206044820152666e6f20636f646560c81b60648201526084016200065b565b60005b816040015151811015620010855760008260400151828151811062000efd57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160e01b03198116600090815291869052604090912054909150606081901c8062000f7a5760405162461bcd60e51b815260206004820152601f60248201527f4469616d6f6e64426173653a2073656c6563746f72206e6f7420666f756e640060448201526064016200065b565b6001600160a01b03811630141562000fcf5760405162461bcd60e51b81526020600482015260226024820152600080516020620036108339815191526044820152616c6560f01b60648201526084016200065b565b84516001600160a01b03828116911614156200103f5760405162461bcd60e51b815260206004820152602860248201527f4469616d6f6e64426173653a205245504c41434520746172676574206973206960448201526719195b9d1a58d85b60c21b60648201526084016200065b565b5083516001600160e01b031992909216600090815260208690526040902060609290921b6001600160601b0319166001600160601b039190911617905560010162000ec8565b505050565b8051156001600160a01b0383161514620010fe5760405162461bcd60e51b815260206004820152602e60248201527f4469616d6f6e64426173653a20696e76616c696420696e697469616c697a617460448201526d696f6e20706172616d657465727360901b60648201526084016200065b565b6001600160a01b0382161562001215576001600160a01b0382163014620011a3576200113e826001600160a01b03166200121960201b620003a41760201c565b620011a35760405162461bcd60e51b815260206004820152602e60248201527f4469616d6f6e64426173653a20696e697469616c697a6174696f6e207461726760448201526d657420686173206e6f20636f646560901b60648201526084016200065b565b6000826001600160a01b031682604051620011bf9190620013c9565b600060405180830381855af49150503d8060008114620011fc576040519150601f19603f3d011682016040523d82523d6000602084013e62001201565b606091505b505090508062001085573d6000803e3d6000fd5b5050565b3b151590565b8280546200122d906200151d565b90600052602060002090601f0160209004810192826200125157600085556200129c565b82601f106200126c57805160ff19168380011785556200129c565b828001600101855582156200129c579182015b828111156200129c5782518255916020019190600101906200127f565b50620012aa929150620012ae565b5090565b5b80821115620012aa5760008155600101620012af565b60008060408385031215620012d8578182fd5b82516001600160a01b0381168114620012ef578283fd5b60208401519092506001600160401b03808211156200130c578283fd5b818501915085601f83011262001320578283fd5b8151818111156200133557620013356200155a565b604051601f8201601f19908116603f011681019083821181831017156200136057620013606200155a565b8160405282815288602084870101111562001379578586fd5b6200138c836020830160208801620014ea565b80955050505050509250929050565b60008151808452620013b5816020860160208601620014ea565b601f01601f19169290920160200192915050565b60008251620013dd818460208701620014ea565b9190910192915050565b60006060808301818452808751808352608092508286019150828160051b8701016020808b01875b84811015620014b857898403607f19018652815180516001600160a01b031685528381015189860190600381106200145557634e487b7160e01b8c52602160045260248cfd5b868601526040918201519186018a9052815190819052908401908a90898701905b80831015620014a25783516001600160e01b031916825292860192600192909201919086019062001476565b509785019795505050908201906001016200140f565b50506001600160a01b038a16908801528681036040880152620014dc81896200139b565b9a9950505050505050505050565b60005b8381101562001507578181015183820152602001620014ed565b8381111562001517576000848401525b50505050565b600181811c908216806200153257607f821691505b602082108114156200155457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b61209080620015806000396000f3fe6080604052600436106100ab5760003560e01c80638ab5150a116100645780638ab5150a1461022a5780638da5cb5b1461023f5780639142376514610254578063adfca15e14610274578063cdffacc6146102a1578063f2fde38b146102c1576100b2565b806301ffc9a71461014d5780631f931c1c146101825780632c408059146101a457806352ef6b2c146101d157806379ba5097146101f35780637a0ed62714610208576100b2565b366100b257005b60006100bc6102e1565b90506001600160a01b0381163b6101295760405162461bcd60e51b815260206004820152602660248201527f50726f78793a20696d706c656d656e746174696f6e206d75737420626520636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e808015610148573d6000f35b3d6000fd5b34801561015957600080fd5b5061016d610168366004611b34565b6103aa565b60405190151581526020015b60405180910390f35b34801561018e57600080fd5b506101a261019d366004611a88565b6103df565b005b3480156101b057600080fd5b506101b961046c565b6040516001600160a01b039091168152602001610179565b3480156101dd57600080fd5b506101e6610488565b6040516101799190611bda565b3480156101ff57600080fd5b506101a261065c565b34801561021457600080fd5b5061021d610743565b6040516101799190611d00565b34801561023657600080fd5b506101b9610c52565b34801561024b57600080fd5b506101b9610c73565b34801561026057600080fd5b506101a261026f366004611a6e565b610c7d565b34801561028057600080fd5b5061029461028f366004611a6e565b610cda565b6040516101799190611c27565b3480156102ad57600080fd5b506101b96102bc366004611b34565b610e49565b3480156102cd57600080fd5b506101a26102dc366004611a6e565b610e76565b600080356001600160e01b03191681527f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc9360208190526040822054819060601c8061039d575060038201546001600160a01b03168061039d5760405162461bcd60e51b815260206004820152603260248201527f4469616d6f6e64426173653a206e6f20666163657420666f756e6420666f722060448201527166756e6374696f6e207369676e617475726560701b6064820152608401610120565b9392505050565b3b151590565b60006103d9826103b8610ebe565b906001600160e01b0319166000908152602091909152604090205460ff1690565b92915050565b6103e761119a565b546001600160a01b0316331461040f5760405162461bcd60e51b815260040161012090611d7c565b61046561041c8587611e73565b8484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061045d9250610f6a915050565b929190610f8e565b5050505050565b6000610476610f6a565b600301546001600160a01b0316919050565b60606000610494610f6a565b600181015490915061ffff1667ffffffffffffffff8111156104c657634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156104ef578160200160208202803683370190505b50915060008060005b600184015461ffff16821015610654576000818152600285016020526040812054905b600881101561063f578361052e81611fd3565b600188015490955061ffff1685111590506105485761063f565b600581901b82901b6001600160e01b0319811660009081526020889052604081205460601c90805b888110156105d4578a818151811061059857634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316836001600160a01b031614156105c257600191506105d4565b806105cc81611fd3565b915050610570565b5080156105e35750505061062d565b818a898151811061060457634e487b7160e01b600052603260045260246000fd5b6001600160a01b03909216602092830291909101909101528761062681611fd3565b9850505050505b8061063781611fd3565b91505061051b565b5050808061064c90611fd3565b9150506104f8565b505082525090565b60008051602061203b833981519152546001600160a01b031633146106d55760405162461bcd60e51b815260206004820152602960248201527f536166654f776e61626c653a2073656e646572206d757374206265206e6f6d696044820152683732b29037bbb732b960b91b6064820152608401610120565b60006106df61119a565b805460405191925033916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a361072581336111be565b610740600060008051602061203b8339815191525b906111be565b50565b6060600061074f610f6a565b600181015490915061ffff1667ffffffffffffffff81111561078157634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156107c757816020015b60408051808201909152600081526060602082015281526020019060019003908161079f5790505b50600182015490925060009061ffff1667ffffffffffffffff8111156107fd57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610826578160200160208202803683370190505b50905060008060005b600185015461ffff16821015610bc4576000818152600286016020526040812054905b6008811015610baf578361086581611fd3565b600189015490955061ffff16851115905061087f57610baf565b600581901b82901b6001600160e01b0319811660009081526020899052604081205460601c90805b88811015610a1957826001600160a01b03168c82815181106108d957634e487b7160e01b600052603260045260246000fd5b6020026020010151600001516001600160a01b03161415610a0757838c828151811061091557634e487b7160e01b600052603260045260246000fd5b6020026020010151602001518b838151811061094157634e487b7160e01b600052603260045260246000fd5b602002602001015160ff168151811061096a57634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160e01b03191690816001600160e01b0319168152505060ff8a82815181106109ae57634e487b7160e01b600052603260045260246000fd5b602002602001015160ff16106109c357600080fd5b8981815181106109e357634e487b7160e01b600052603260045260246000fd5b6020026020010180518091906109f890611fee565b60ff1690525060019150610a19565b80610a1181611fd3565b9150506108a7565b508015610a2857505050610b9d565b818b8981518110610a4957634e487b7160e01b600052603260045260246000fd5b60209081029190910101516001600160a01b03909116905260018a015461ffff1667ffffffffffffffff811115610a9057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610ab9578160200160208202803683370190505b508b8981518110610ada57634e487b7160e01b600052603260045260246000fd5b602002602001015160200181905250828b8981518110610b0a57634e487b7160e01b600052603260045260246000fd5b602002602001015160200151600081518110610b3657634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160e01b03191690816001600160e01b031916815250506001898981518110610b7a57634e487b7160e01b600052603260045260246000fd5b60ff9092166020928302919091019091015287610b9681611fd3565b9850505050505b80610ba781611fd3565b915050610852565b50508080610bbc90611fd3565b91505061082f565b5060005b82811015610c47576000848281518110610bf257634e487b7160e01b600052603260045260246000fd5b602002602001015160ff1690506000878381518110610c2157634e487b7160e01b600052603260045260246000fd5b602002602001015160200151905081815250508080610c3f90611fd3565b915050610bc8565b508185525050505090565b600060008051602061203b8339815191525b546001600160a01b0316919050565b6000610c6461119a565b610c8561119a565b546001600160a01b03163314610cad5760405162461bcd60e51b815260040161012090611d7c565b80610cb6610f6a565b60030180546001600160a01b0319166001600160a01b039290921691909117905550565b60606000610ce6610f6a565b600181015490915061ffff1667ffffffffffffffff811115610d1857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610d41578160200160208202803683370190505b50915060008060005b600184015461ffff16821015610e3f576000818152600285016020526040812054905b6008811015610e2a5783610d8081611fd3565b600188015490955061ffff168511159050610d9a57610e2a565b600581901b82901b6001600160e01b0319811660009081526020889052604090205460601c6001600160a01b038a161415610e175780888781518110610df057634e487b7160e01b600052603260045260246000fd5b6001600160e01b03199092166020928302919091019091015285610e1381611fd3565b9650505b5080610e2281611fd3565b915050610d6d565b50508080610e3790611fd3565b915050610d4a565b5050825250919050565b6000610e53610f6a565b6001600160e01b0319909216600090815260209290925250604090205460601c90565b610e7e61119a565b546001600160a01b03163314610ea65760405162461bcd60e51b815260040161012090611d7c565b6107408160008051602061203b83398151915261073a565b7f326d0c59a7612f6a9919e2a8ee333c80ba689d8ba2634de89c85cbb04832e70590565b6001600160e01b03198083161415610f3c5760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401610120565b6001600160e01b03199190911660009081526020929092526040909120805460ff1916911515919091179055565b7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc9390565b600184015461ffff811690819060009060071615610fbe5750600381901c60009081526002870160205260409020545b60005b865181101561110e576000878281518110610fec57634e487b7160e01b600052603260045260246000fd5b602002602001015190506000816020015190506000826040015151116110605760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a206e6f2073656c6563746f7273207370656369666044820152621a595960ea1b6064820152608401610120565b600081600281111561108257634e487b7160e01b600052602160045260246000fd5b141561109e576110948a868685611223565b9095509350611104565b60028160028111156110c057634e487b7160e01b600052602160045260246000fd5b14156110d2576110948a8686856113e4565b60018160028111156110f457634e487b7160e01b600052602160045260246000fd5b1415611104576111048a83611684565b5050600101610fc1565b5082821461112a5760018701805461ffff191661ffff84161790555b600782161561114c57600382901c600090815260028801602052604090208190555b7f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67386868660405161117f93929190611c3a565b60405180910390a16111918585611883565b50505050505050565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f67168046090565b81546001600160a01b0319166001600160a01b0391909116179055565b7fd2fbe59115f79ec89cbdaf04053fefb85afb13a14fbcf6290cded23dd019d01d90565b7f4281b61aefbe70b3d3f684b428efca5f33077bc240e76f2808f9177c307617f490565b805160009081906001600160a01b031630148061124a575082516001600160a01b03163b15155b6112a25760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a204144442074617267657420686173206e6f20636044820152626f646560e81b6064820152608401610120565b60005b8360400151518110156113d7576000846040015182815181106112d857634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160e01b031981166000908152918a9052604090912054909150606081901c1561135f5760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a2073656c6563746f7220616c726561647920616460448201526219195960ea1b6064820152608401610120565b85516001600160e01b0319838116600081815260208d90526040902060609390931b6001600160601b0319168b1790925560058a901b60e090811692831c91831c199990991617978114156113c857600389901c600090815260028b0160205260408120989098555b505050600195860195016112a5565b5093959294509192505050565b805160009081906001600160a01b0316156114595760405162461bcd60e51b815260206004820152602f60248201527f4469616d6f6e64426173653a2052454d4f564520746172676574206d7573742060448201526e6265207a65726f206164647265737360881b6064820152608401610120565b600385901c6007861660005b8560400151518110156116705760008660400151828151811061149857634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160e01b031981166000908152918c9052604090912054909150606081901c6115125760405162461bcd60e51b815260206004820152601f60248201527f4469616d6f6e64426173653a2073656c6563746f72206e6f7420666f756e64006044820152606401610120565b606081901c3014156115365760405162461bcd60e51b815260040161012090611db3565b8861155e57600019909401600081815260028c01602052604090205498509360079350611566565b600019909301925b600584901b89901b6000806001600160e01b0319808416908616146115bd576001600160e01b03198316600090815260208f90526040902080546001600160601b0319166bffffffffffffffffffffffff86161790555b50506001600160e01b03198316600090815260208d90526040812055611fff600383901c1660e0600584901b1687821461162057600082815260028f016020526040902080546001600160e01b031980841c19909116908516831c179055611644565b80836001600160e01b031916901c816001600160e01b031960001b901c198d16179b505b8661165f57600088815260028f01602052604081208190559b505b505060019093019250611465915050565b5060039190911b1796939550929350505050565b80516001600160a01b03163b6116ec5760405162461bcd60e51b815260206004820152602760248201527f4469616d6f6e64426173653a205245504c4143452074617267657420686173206044820152666e6f20636f646560c81b6064820152608401610120565b60005b81604001515181101561187e5760008260400151828151811061172257634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160e01b03198116600090815291869052604090912054909150606081901c8061179d5760405162461bcd60e51b815260206004820152601f60248201527f4469616d6f6e64426173653a2073656c6563746f72206e6f7420666f756e64006044820152606401610120565b6001600160a01b0381163014156117c65760405162461bcd60e51b815260040161012090611db3565b84516001600160a01b03828116911614156118345760405162461bcd60e51b815260206004820152602860248201527f4469616d6f6e64426173653a205245504c41434520746172676574206973206960448201526719195b9d1a58d85b60c21b6064820152608401610120565b5083516001600160e01b031992909216600090815260208690526040902060609290921b6001600160601b0319166bffffffffffffffffffffffff919091161790556001016116ef565b505050565b8051156001600160a01b03831615146118f55760405162461bcd60e51b815260206004820152602e60248201527f4469616d6f6e64426173653a20696e76616c696420696e697469616c697a617460448201526d696f6e20706172616d657465727360901b6064820152608401610120565b6001600160a01b038216156119ef576001600160a01b0382163014611982576001600160a01b0382163b6119825760405162461bcd60e51b815260206004820152602e60248201527f4469616d6f6e64426173653a20696e697469616c697a6174696f6e207461726760448201526d657420686173206e6f20636f646560901b6064820152608401610120565b6000826001600160a01b03168260405161199c9190611bbe565b600060405180830381855af49150503d80600081146119d7576040519150601f19603f3d011682016040523d82523d6000602084013e6119dc565b606091505b505090508061187e573d6000803e3d6000fd5b5050565b80356001600160a01b0381168114611a0a57600080fd5b919050565b80356001600160e01b031981168114611a0a57600080fd5b60008083601f840112611a38578182fd5b50813567ffffffffffffffff811115611a4f578182fd5b602083019150836020828501011115611a6757600080fd5b9250929050565b600060208284031215611a7f578081fd5b61039d826119f3565b600080600080600060608688031215611a9f578081fd5b853567ffffffffffffffff80821115611ab6578283fd5b818801915088601f830112611ac9578283fd5b813581811115611ad7578384fd5b8960208260051b8501011115611aeb578384fd5b60208301975080965050611b01602089016119f3565b94506040880135915080821115611b16578283fd5b50611b2388828901611a27565b969995985093965092949392505050565b600060208284031215611b45578081fd5b61039d82611a0f565b6000815180845260208085019450808401835b83811015611b875781516001600160e01b03191687529582019590820190600101611b61565b509495945050505050565b60008151808452611baa816020860160208601611fa3565b601f01601f19169290920160200192915050565b60008251611bd0818460208701611fa3565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b81811015611c1b5783516001600160a01b031683529284019291840191600101611bf6565b50909695505050505050565b60208152600061039d6020830184611b4e565b6000606080830181845280875180835260808601915060808160051b87010192506020808a01865b83811015611cd157888603607f19018552815180516001600160a01b031687528381015160038110611ca257634e487b7160e01b8a52602160045260248afd5b87850152604090810151908701889052611cbe88880182611b4e565b9650509382019390820190600101611c62565b50506001600160a01b0389169087015250508381036040850152611cf58186611b92565b979650505050505050565b60006020808301818452808551808352604092508286019150828160051b870101848801865b83811015611d6e57888303603f19018552815180516001600160a01b03168452870151878401879052611d5b87850182611b4e565b9588019593505090860190600101611d26565b509098975050505050505050565b6020808252601d908201527f4f776e61626c653a2073656e646572206d757374206265206f776e6572000000604082015260600190565b60208082526022908201527f4469616d6f6e64426173653a2073656c6563746f7220697320696d6d757461626040820152616c6560f01b606082015260800190565b6040516060810167ffffffffffffffff81118282101715611e1857611e18612024565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611e4757611e47612024565b604052919050565b600067ffffffffffffffff821115611e6957611e69612024565b5060051b60200190565b6000611e86611e8184611e4f565b611e1e565b838152602080820191908460053688821b83011115611ea3578586fd5b855b88811015611f9657823567ffffffffffffffff80821115611ec4578889fd5b818a01915060608236031215611ed8578889fd5b611ee0611df5565b611ee9836119f3565b81528683013560038110611efb578a8bfd5b8188015260408381013583811115611f11578b8cfd5b939093019236601f850112611f24578a8bfd5b83359250611f34611e8184611e4f565b83815288810190858a0136868a1b88018c011115611f50578d8efd5b8d96505b85871015611f7957611f6581611a0f565b835260019690960195918a01918a01611f54565b509183019190915250885250509483019491830191600101611ea5565b5092979650505050505050565b60005b83811015611fbe578181015183820152602001611fa6565b83811115611fcd576000848401525b50505050565b6000600019821415611fe757611fe761200e565b5060010190565b600060ff821660ff8114156120055761200561200e565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfe24aa1f7b31fd188a8d3ecfb06bc55c806040e59b03bd4396283442fce6617890a26469706673582212205e055320dde7c68af7864df8aac3f8587155aca7c74d78de9a5992c61c4f813664736f6c634300080400334469616d6f6e64426173653a2073656c6563746f7220697320696d6d75746162000000000000000000000000d0ed73b33789111807bd64ae2a6e1e6f92f986f50000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005168747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d5a31735357525874366464346a4a517257703677664c427866396e6d526f537670506853424378614d4763332f000000000000000000000000000000

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

000000000000000000000000d0ed73b33789111807bd64ae2a6e1e6f92f986f50000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005168747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d5a31735357525874366464346a4a517257703677664c427866396e6d526f537670506853424378614d4763332f000000000000000000000000000000

-----Decoded View---------------
Arg [0] : merkleProofClaim (address): 0xd0ed73b33789111807bd64ae2a6e1e6f92f986f5
Arg [1] : baseURI (string): https://gateway.pinata.cloud/ipfs/QmZ1sSWRXt6dd4jJQrWp6wfLBxf9nmRoSvpPhSBCxaMGc3/

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000d0ed73b33789111807bd64ae2a6e1e6f92f986f5
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000051
Arg [3] : 68747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066
Arg [4] : 732f516d5a31735357525874366464346a4a517257703677664c427866396e6d
Arg [5] : 526f537670506853424378614d4763332f000000000000000000000000000000


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.