ETH Price: $3,809.11 (+5.29%)

Contract

0xCAA57C4038fCE04185898466FB454E33D5b27029
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdrawal All134534992021-10-20 8:17:481141 days ago1634717868IN
0xCAA57C40...3D5b27029
0 ETH0.0019806165
Withdrawal All N...134534832021-10-20 8:15:111141 days ago1634717711IN
0xCAA57C40...3D5b27029
0 ETH0.1418270165
Transfer134501592021-10-19 19:51:191142 days ago1634673079IN
0xCAA57C40...3D5b27029
0.25 ETH0.0072162972.49349773
Add To Whitelist134501342021-10-19 19:46:101142 days ago1634672770IN
0xCAA57C40...3D5b27029
0 ETH0.0030945265
Withdrawal All N...134495772021-10-19 17:44:201142 days ago1634665460IN
0xCAA57C40...3D5b27029
0 ETH0.0790401282
Withdrawal All134495682021-10-19 17:42:561142 days ago1634665376IN
0xCAA57C40...3D5b27029
0 ETH0.0019492282
Transfer134487102021-10-19 14:15:461142 days ago1634652946IN
0xCAA57C40...3D5b27029
0.25 ETH0.0012923354.6026941
Withdrawal All134410412021-10-18 9:33:441143 days ago1634549624IN
0xCAA57C40...3D5b27029
0 ETH0.0019806165
Transfer134408532021-10-18 8:50:081143 days ago1634547008IN
0xCAA57C40...3D5b27029
0.25 ETH0.001364157.63495209
Transfer134371412021-10-17 18:49:561144 days ago1634496596IN
0xCAA57C40...3D5b27029
0.25 ETH0.0074852675.19555684
Transfer134366932021-10-17 17:13:231144 days ago1634490803IN
0xCAA57C40...3D5b27029
0.25 ETH0.01113397111.84979551
Transfer134366772021-10-17 17:09:451144 days ago1634490585IN
0xCAA57C40...3D5b27029
0.25 ETH0.01163345116.86744214
Transfer134366452021-10-17 17:03:341144 days ago1634490214IN
0xCAA57C40...3D5b27029
0.25 ETH0.0086159386.55407712
Transfer134364612021-10-17 16:23:031144 days ago1634487783IN
0xCAA57C40...3D5b27029
0.25 ETH0.002122381.85364582
Add To Whitelist134359762021-10-17 14:33:131144 days ago1634481193IN
0xCAA57C40...3D5b27029
0 ETH0.0030945265
Add To Whitelist134357082021-10-17 13:30:221144 days ago1634477422IN
0xCAA57C40...3D5b27029
0 ETH0.0030945265
Transfer134356822021-10-17 13:24:081144 days ago1634477048IN
0xCAA57C40...3D5b27029
0.25 ETH0.0068352968.66607121
Transfer134356412021-10-17 13:16:141144 days ago1634476574IN
0xCAA57C40...3D5b27029
0.25 ETH0.0020308778.32742828
Transfer134354322021-10-17 12:27:091144 days ago1634473629IN
0xCAA57C40...3D5b27029
0.25 ETH0.0068641168.95560703
Transfer134353512021-10-17 12:10:561144 days ago1634472656IN
0xCAA57C40...3D5b27029
0.25 ETH0.0057301757.56429265
Transfer134352582021-10-17 11:51:511144 days ago1634471511IN
0xCAA57C40...3D5b27029
0.25 ETH0.0054952155.20391773
Transfer134351172021-10-17 11:23:221144 days ago1634469802IN
0xCAA57C40...3D5b27029
0.25 ETH0.0060377260.65378392
Transfer134350352021-10-17 11:04:411144 days ago1634468681IN
0xCAA57C40...3D5b27029
0.25 ETH0.0058304258.57134122
Transfer134350182021-10-17 11:02:071144 days ago1634468527IN
0xCAA57C40...3D5b27029
0.25 ETH0.0025782676.95390882
Transfer134350162021-10-17 11:01:511144 days ago1634468511IN
0xCAA57C40...3D5b27029
0.25 ETH0.0020695379.81843973
View all transactions

Latest 7 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
134534992021-10-20 8:17:481141 days ago1634717868
0xCAA57C40...3D5b27029
0.25 ETH
134410412021-10-18 9:33:441143 days ago1634549624
0xCAA57C40...3D5b27029
13.5 ETH
134306562021-10-16 18:31:191145 days ago1634409079
0xCAA57C40...3D5b27029
23 ETH
134281872021-10-16 9:23:141145 days ago1634376194
0xCAA57C40...3D5b27029
19.25 ETH
134264302021-10-16 2:45:261145 days ago1634352326
0xCAA57C40...3D5b27029
23.75 ETH
134257462021-10-16 0:11:141146 days ago1634343074
0xCAA57C40...3D5b27029
14 ETH
134247592021-10-15 20:27:571146 days ago1634329677
0xCAA57C40...3D5b27029
0.25 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MultipleDropsSale

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 11 : MultipleDropsSale.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;

// thedrops.xyz
//                     ........                                                                                         
//                   ..'..........              .                                                                      
//                 ..'....'........          ....                                                                      
//              ...''...,:;'.::.....       ..'..                                                                       
//              ..,:,'',:,.';:'...,,..    ....                                                                         
//               .,'....',''','''',;.     ...                                                                          
//               .,. ............ .'.       .......     .,;;;;;;;;;,..;;'.  ..;;'...;;;;;;;'.                          
//              .''..'..'..,..,.  .''.      .......     ;OXXXNNNNXXO,:KWx.  .lXNo..dNNXXXXXx'                          
//              .,. .,,.,'.,,',.   .,.                  .',;:kWWk;,'.:XMk'...oNWd..xWNd;;;;'.                          
//             .''.  .''.....'..   .''.      .....         ..dWWo.  .:XMXOkkkKWWd..xWW0xxxd;.                          
//            .''....................'..      ....         ..dWWo.   :XMXkxxxKWWd..xWW0xxxd,.                          
//          ..'''''................'''''.                  ..dWWo.  .:XMk.  .lNWd..xWNd;;;;'.                          
//         .',..,.                 .,'..'..                ..oXXl.   :KNx.  .lXNo..dNNXXXXXx'                          
//  ...   .',..',.                 .,'. .'.                ...,,..   .,,..   .,,....,,,,,,,'.                          
//  ....  .,.  ',.                 .,'  ...              .:lllllc;'.  .,llllllc;..  .':lool:'.  .:llllll:'. .'coool:'. 
//    ..  .''. .,,..             ..',.  .'.              ;KMMWXKXNKx,..oWWXKKXNNk,.'dXNX00KNXx,.,0MWXKKXWXl,oXWXO0XNKl.
// ....... ..'....'''''.......'''''.. .....              ;KMM0;.'lKWO,.dWNd,,:OMNc'kWNx,..'oXMO,,0MKl,,oXMOl0MNk:,:odc.
// .......   .......'.....................               ;KMMO'  .dWNl.oWMNK0XWNx':XM0,    .kMNc,0MWXKKXNKc.:x0XXK0kd;.
//        ..    .....,,'................                 ;KMMO'  'kMXc.oWWOldXM0;.;0MK:.   ,0MX:,0MXdlll:'..;::;;cdXMXl
//      ..'.      ..''...........''..                    ;KMMXdld0WXo..oWNl..lNWx..lXWKdcco0WNo.,0M0,     .;0WXxlcdKMNl
//    ..'..      .''..           .....                   ,kKKKKK0ko;. .c0O:. .o0O:..,oOKKXKOd;. 'xKx'      .,oO0KKK0x:.
//   ....      ..,'..             ..'..                  .........     ....   .....  ...''...   .....        ....'...  
//   ..        .;;;'.             .';,'.                    .                                                          
//             ..,;.      ...      .,'..                                                                               
//              .',.  ...........  ...                                                                                 
//              .',.......   ..''.....                                                                                 
//               .'.....       .......                                                                                 
//                 .              .                                                                                    

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";

/* solhint-enable */

// The Drops Multiple Public Sale
contract MultipleDropsSale is Ownable, IERC1155Receiver {
    using Address for address;
    using SafeMath for uint256;

    address public nftContractAddress;

    mapping(address => bool) private _admins;
    mapping(address => bool) private _buyers;
    mapping(address => bool) private _whitelisted;

    struct AvailableToken {
        uint256 id; // short id (up to 32 bytes)
        uint256 amount; // number of available tokens
    }

    AvailableToken[] public _availableTokens;

    event AdminAccessSet(address _admin, bool _enabled);
    event NftTransfered(uint256 _nftId, address _buyer, uint256 _timestamp);
    event AddedMultipleToWhitelist(address[] account);
    event AddedToWhitelist(address indexed account);
    event RemovedFromWhitelist(address indexed account);

    constructor(address _nftContractAddress) {
        require(
            _nftContractAddress.isContract(),
            "_nftContractAddress must be a NFT contract"
        );
        nftContractAddress = _nftContractAddress;
        _admins[msg.sender] = true;
    }

    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165) returns (bool) {
        return false;
    }

    // Transaction Functions
    /**
     * Default Interfaces for accepting ETH
     */
    receive() external payable {
        deposit();
    }
    fallback() external payable {
        deposit();
    }

    /**
     * Withrawal Function for Admins
     */
    function withdrawalAll() external onlyAdmin() {
        require(payable(msg.sender).send(address(this).balance));
    }

    /**
     * Withrawal NFTs Function for Admins
     */
    function withdrawalAllNfts() external onlyAdmin() {
        for (uint p = 0; p < _availableTokens.length; p++) {
            require(
                ERC1155(nftContractAddress).balanceOf(address(this), _availableTokens[p].id) > 0,
                "NFT is owned by this contract"
            );
            ERC1155(nftContractAddress).safeTransferFrom(
                address(this),
                msg.sender,
                _availableTokens[p].id,
                _availableTokens[p].amount,
                '0x0'
            );
            delete _availableTokens[p];
            emit NftTransfered(_availableTokens[p].id, msg.sender, block.timestamp);
        }
    }

    /**
     * take eth and distribute NFT
     */
    function deposit() public payable {
        require(msg.value == 0.25 ether, "Please transfer 0.25 ether");
        require(
            _buyers[msg.sender] == false,
            "Only 1 purchase per wallet allowed"
        );
        require(
            _whitelisted[msg.sender] == true,
            "You need to be whitelisted to purchase"
        );
        require(
            _availableTokens.length > 0,
            "Currently no NFT available. Please try again later"
        );

        uint256 randomIndex = randomAvailableTokenIndex();
        uint256 randomTokenId = _availableTokens[randomIndex].id;
        require(
            _availableTokens[randomIndex].amount > 0,
            "No Amount available for this token"
        );
        transferNft(randomTokenId, msg.sender);
        _buyers[msg.sender] = true;
        if (_availableTokens[randomIndex].amount > 1) {
            _availableTokens[randomIndex] = AvailableToken({
                id: randomTokenId,
                amount: _availableTokens[randomIndex].amount - 1
            });
        } else {
            delete _availableTokens[randomIndex];
        }
    }

    /**

     *
     * @param nftId - nftId of the artwork
     * @param to - address of the artwork recipient
     */
    function transferNft(uint256 nftId, address to) private {
        require(
            ERC1155(nftContractAddress).balanceOf(address(this), nftId) > 0,
            "NFT is owned by this contract"
        );
        ERC1155(nftContractAddress).safeTransferFrom(
            address(this),
            to,
            nftId,
            1,
            '0x0'
        );
        emit NftTransfered(nftId, to, block.timestamp);
    }

    // Admin Functions
    /**
    * ERC1155 Receiver Methods
    */
    function onERC1155Received(
        address _operator,
        address _from,
        uint256 _id,
        uint256 _amount,
        bytes memory
    ) public virtual returns (bytes4) {
        require(
            _admins[_from] || _from == owner(),
            "Only Admins can send NFTs"
        );

        int selectedIdx = getAvailableTokensByTokenId(_id);
        if (selectedIdx > 0) {
            uint256 tokenIdx = uint256(selectedIdx);
            _availableTokens[tokenIdx] = AvailableToken({
                id: _id,
                amount: _availableTokens[tokenIdx].amount + _amount
            });
        } else {
            _availableTokens.push(AvailableToken({id: _id, amount: _amount}));
        }

        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address _operator,
        address _from,
        uint256[] memory _ids,
        uint256[] memory _amounts,
        bytes memory
    ) public virtual returns (bytes4) {
        require(
            _admins[_from] || _from == owner(),
            "Only Admins can send NFTs"
        );

        for (uint256 i = 0; i < _ids.length; i++) {
            int selectedIdx = getAvailableTokensByTokenId(_ids[i]);
            if (selectedIdx > 0) {
                uint256 tokenIdx = uint256(selectedIdx);
                _availableTokens[tokenIdx] = AvailableToken({
                    id: _ids[i],
                    amount: _availableTokens[tokenIdx].amount + _amounts[i]
                });
            } else {
                _availableTokens.push(
                    AvailableToken({id: _ids[i], amount: _amounts[i]})
                );
            }
        }
        return this.onERC1155BatchReceived.selector;
    }

    // Utils
    /**
     * Helper Function to get Available Token by Token Id
     */
    function getAvailableTokensByTokenId(uint256 id)
        public
        view
        returns (int)
    {
        int index = -1;
        for (uint p = 0; p < _availableTokens.length; p++) {
            if (_availableTokens[p].id == id) {
                index = int(p);
            }
        }
        return index;
    }

    /**
     * Get a random Token Index based on array length
     */
    function randomAvailableTokenIndex() private view returns (uint8) {
        uint256 max_amount = _availableTokens.length;
        return
            uint8(
                uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty))) %
                    max_amount
            );
    }

    function getBalance() public view returns (uint256) {
        return address(this).balance;
    }

    /**
     * Whitelist
     */
    function addToWhitelist(address _address) public onlyAdmin() {
        _whitelisted[_address] = true;
        emit AddedToWhitelist(_address);
    }

    function addMultipleToWhitelist(address[] memory addrs) public onlyAdmin() {
         for (uint p = 0; p < addrs.length; p++) {
            _whitelisted[addrs[p]] = true;
        }
        emit AddedMultipleToWhitelist(addrs);
    }

    function removeFromWhitelist(address _address) public onlyAdmin() {
        _whitelisted[_address] = false;
        emit RemovedFromWhitelist(_address);
    }

    function isWhitelisted(address _address) public view returns(bool) {
        return _whitelisted[_address];
    }

    // Admin Functions
    /**
     * Set Admin Access
     *
     * @param admin - Address of Minter
     * @param enabled - Enable/Disable Admin Access
     */
    function setAdmin(address admin, bool enabled) external onlyOwner {
        _admins[admin] = enabled;
        emit AdminAccessSet(admin, enabled);
    }

    /**
     * Check Admin Access
     *
     * @param admin - Address of Admin
     * @return whether minter has access
     */
    function isAdmin(address admin) public view returns (bool) {
        return _admins[admin];
    }

    /**
     * Throws if called by any account other than the Admin.
     */
    modifier onlyAdmin() {
        require(
            _admins[msg.sender] || msg.sender == owner(),
            "Caller does not have Admin Access"
        );
        _;
    }
}

File 2 of 11 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 3 of 11 : IERC165.sol
// SPDX-License-Identifier: MIT

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 4 of 11 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 5 of 11 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 6 of 11 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 7 of 11 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 8 of 11 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
        @dev Handles the receipt of a single ERC1155 token type. This function is
        called at the end of a `safeTransferFrom` after the balance has been updated.
        To accept the transfer, this must return
        `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
        (i.e. 0xf23a6e61, or its own function selector).
        @param operator The address which initiated the transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param id The ID of the token being transferred
        @param value The amount of tokens being transferred
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
    */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
        @dev Handles the receipt of a multiple ERC1155 token types. This function
        is called at the end of a `safeBatchTransferFrom` after the balances have
        been updated. To accept the transfer(s), this must return
        `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
        (i.e. 0xbc197c81, or its own function selector).
        @param operator The address which initiated the batch transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param ids An array containing ids of each token being transferred (order and length must match values array)
        @param values An array containing amounts of each token being transferred (order and length must match ids array)
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
    */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 9 of 11 : IERC1155.sol
// SPDX-License-Identifier: MIT

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 be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

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

File 10 of 11 : ERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

    // Mapping from account to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(_msgSender() != operator, "ERC1155: setting approval status for self");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC1155-isApprovedForAll}.
     */
    function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[account][operator];
    }

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `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 memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - 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[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

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

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address account,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(account != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data);

        _balances[id][account] += amount;
        emit TransferSingle(operator, address(0), account, id, amount);

        _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * 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 _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `account`
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address account,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(account != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");

        uint256 accountBalance = _balances[id][account];
        require(accountBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][account] = accountBalance - amount;
        }

        emit TransferSingle(operator, account, address(0), id, amount);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(account != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, account, address(0), ids, amounts, "");

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

            uint256 accountBalance = _balances[id][account];
            require(accountBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][account] = accountBalance - amount;
            }
        }

        emit TransferBatch(operator, account, address(0), ids, amounts);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_nftContractAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"account","type":"address[]"}],"name":"AddedMultipleToWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"AddedToWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_admin","type":"address"},{"indexed":false,"internalType":"bool","name":"_enabled","type":"bool"}],"name":"AdminAccessSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_nftId","type":"uint256"},{"indexed":false,"internalType":"address","name":"_buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"NftTransfered","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"RemovedFromWhitelist","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_availableTokens","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addrs","type":"address[]"}],"name":"addMultipleToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"addToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getAvailableTokensByTokenId","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeFromWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawalAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawalAllNfts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620031e2380380620031e28339818101604052810190620000379190620002ae565b620000576200004b6200016560201b60201c565b6200016d60201b60201c565b620000838173ffffffffffffffffffffffffffffffffffffffff166200023160201b6200199f1760201c565b620000c5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000bc9062000367565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505062000389565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080823b905060008111915050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002768262000249565b9050919050565b620002888162000269565b81146200029457600080fd5b50565b600081519050620002a8816200027d565b92915050565b600060208284031215620002c757620002c662000244565b5b6000620002d78482850162000297565b91505092915050565b600082825260208201905092915050565b7f5f6e6674436f6e747261637441646472657373206d7573742062652061204e4660008201527f5420636f6e747261637400000000000000000000000000000000000000000000602082015250565b60006200034f602a83620002e0565b91506200035c82620002f1565b604082019050919050565b60006020820190508181036000830152620003828162000340565b9050919050565b612e4980620003996000396000f3fe6080604052600436106101185760003560e01c80638da5cb5b116100a0578063dbfa167b11610064578063dbfa167b14610396578063e43252d7146103d4578063f23a6e61146103fd578063f2fde38b1461043a578063f44b79b31461046357610127565b80638da5cb5b146102e2578063aae282e11461030d578063bc197c8114610338578063cc70158314610375578063d0e30db01461038c57610127565b80634b0bddd2116100e75780634b0bddd214610213578063715018a61461023c57806372b94204146102535780638401f8d1146102905780638ab1d681146102b957610127565b806301ffc9a71461013157806312065fe01461016e57806324d7806c146101995780633af32abf146101d657610127565b366101275761012561047a565b005b61012f61047a565b005b34801561013d57600080fd5b5061015860048036038101906101539190611cf3565b610821565b6040516101659190611d3b565b60405180910390f35b34801561017a57600080fd5b50610183610828565b6040516101909190611d6f565b60405180910390f35b3480156101a557600080fd5b506101c060048036038101906101bb9190611de8565b610830565b6040516101cd9190611d3b565b60405180910390f35b3480156101e257600080fd5b506101fd60048036038101906101f89190611de8565b610886565b60405161020a9190611d3b565b60405180910390f35b34801561021f57600080fd5b5061023a60048036038101906102359190611e41565b6108dc565b005b34801561024857600080fd5b506102516109ec565b005b34801561025f57600080fd5b5061027a60048036038101906102759190611ead565b610a74565b6040516102879190611ef3565b60405180910390f35b34801561029c57600080fd5b506102b760048036038101906102b29190612067565b610af8565b005b3480156102c557600080fd5b506102e060048036038101906102db9190611de8565b610c8d565b005b3480156102ee57600080fd5b506102f7610df4565b60405161030491906120bf565b60405180910390f35b34801561031957600080fd5b50610322610e1d565b60405161032f91906120bf565b60405180910390f35b34801561034457600080fd5b5061035f600480360381019061035a9190612252565b610e43565b60405161036c9190612330565b60405180910390f35b34801561038157600080fd5b5061038a6110ba565b005b61039461047a565b005b3480156103a257600080fd5b506103bd60048036038101906103b89190611ead565b61142e565b6040516103cb92919061234b565b60405180910390f35b3480156103e057600080fd5b506103fb60048036038101906103f69190611de8565b611462565b005b34801561040957600080fd5b50610424600480360381019061041f9190612374565b6115c9565b6040516104319190612330565b60405180910390f35b34801561044657600080fd5b50610461600480360381019061045c9190611de8565b61179e565b005b34801561046f57600080fd5b50610478611896565b005b6703782dace9d9000034146104c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104bb90612468565b60405180910390fd5b60001515600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054e906124fa565b60405180910390fd5b60011515600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146105ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e19061258c565b60405180910390fd5b600060058054905011610632576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106299061261e565b60405180910390fd5b600061063c6119b2565b60ff1690506000600582815481106106575761065661263e565b5b90600052602060002090600202016000015490506000600583815481106106815761068061263e565b5b906000526020600020906002020160010154116106d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ca906126df565b60405180910390fd5b6106dd81336119fa565b6001600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060016005838154811061074b5761074a61263e565b5b90600052602060002090600202016001015411156107e757604051806040016040528082815260200160016005858154811061078a5761078961263e565b5b9060005260206000209060020201600101546107a6919061272e565b815250600583815481106107bd576107bc61263e565b5b9060005260206000209060020201600082015181600001556020820151816001015590505061081d565b600582815481106107fb576107fa61263e565b5b9060005260206000209060020201600080820160009055600182016000905550505b5050565b6000919050565b600047905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6108e4611bbb565b73ffffffffffffffffffffffffffffffffffffffff16610902610df4565b73ffffffffffffffffffffffffffffffffffffffff1614610958576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094f906127ae565b60405180910390fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fe529461c8529abc0e0fe7c5ee361f74fe22e0b7574df1fc0b7558a282091fb7882826040516109e09291906127ce565b60405180910390a15050565b6109f4611bbb565b73ffffffffffffffffffffffffffffffffffffffff16610a12610df4565b73ffffffffffffffffffffffffffffffffffffffff1614610a68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5f906127ae565b60405180910390fd5b610a726000611bc3565b565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff905060005b600580549050811015610aee578360058281548110610abf57610abe61263e565b5b9060005260206000209060020201600001541415610adb578091505b8080610ae6906127f7565b915050610a9d565b5080915050919050565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610b825750610b53610df4565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610bc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb8906128b2565b60405180910390fd5b60005b8151811015610c5257600160046000848481518110610be657610be561263e565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610c4a906127f7565b915050610bc4565b507f38b0ca37539c1f04430742c13474bf9185bc2faf638609de5d6ce28de7da4d5581604051610c829190612990565b60405180910390a150565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610d175750610ce8610df4565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610d56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4d906128b2565b60405180910390fd5b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fcdd2e9b91a56913d370075169cefa1602ba36be5301664f752192bb1709df75760405160405180910390a250565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610ecf5750610ea0610df4565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b610f0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f05906129fe565b60405180910390fd5b60005b84518110156110a6576000610f3f868381518110610f3257610f3161263e565b5b6020026020010151610a74565b905060008113156110075760008190506040518060400160405280888581518110610f6d57610f6c61263e565b5b60200260200101518152602001878581518110610f8d57610f8c61263e565b5b602002602001015160058481548110610fa957610fa861263e565b5b906000526020600020906002020160010154610fc59190612a1e565b81525060058281548110610fdc57610fdb61263e565b5b9060005260206000209060020201600082015181600001556020820151816001015590505050611092565b600560405180604001604052808885815181106110275761102661263e565b5b602002602001015181526020018785815181106110475761104661263e565b5b60200260200101518152509080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015181600001556020820151816001015550505b50808061109e906127f7565b915050610f11565b5063bc197c8160e01b905095945050505050565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806111445750611115610df4565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117a906128b2565b60405180910390fd5b60005b60058054905081101561142b576000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e30600585815481106111e7576111e661263e565b5b9060005260206000209060020201600001546040518363ffffffff1660e01b8152600401611216929190612a74565b60206040518083038186803b15801561122e57600080fd5b505afa158015611242573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112669190612ab2565b116112a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129d90612b2b565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a3033600585815481106112fa576112f961263e565b5b906000526020600020906002020160000154600586815481106113205761131f61263e565b5b9060005260206000209060020201600101546040518563ffffffff1660e01b81526004016113519493929190612ba8565b600060405180830381600087803b15801561136b57600080fd5b505af115801561137f573d6000803e3d6000fd5b50505050600581815481106113975761139661263e565b5b9060005260206000209060020201600080820160009055600182016000905550507f9dfcbfa96cdfe64c96cc2bedb739c05b3202e2931940ef19a5f1d20aaff93cad600582815481106113ed576113ec61263e565b5b906000526020600020906002020160000154334260405161141093929190612c00565b60405180910390a18080611423906127f7565b915050611186565b50565b6005818154811061143e57600080fd5b90600052602060002090600202016000915090508060000154908060010154905082565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806114ec57506114bd610df4565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61152b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611522906128b2565b60405180910390fd5b6001600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fa850ae9193f515cbae8d35e8925bd2be26627fc91bce650b8652ed254e9cab0360405160405180910390a250565b6000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806116555750611626610df4565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b611694576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168b906129fe565b60405180910390fd5b600061169f85610a74565b90506000811315611733576000819050604051806040016040528087815260200186600584815481106116d5576116d461263e565b5b9060005260206000209060020201600101546116f19190612a1e565b815250600582815481106117085761170761263e565b5b906000526020600020906002020160008201518160000155602082015181600101559050505061178a565b60056040518060400160405280878152602001868152509080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015181600001556020820151816001015550505b63f23a6e6160e01b91505095945050505050565b6117a6611bbb565b73ffffffffffffffffffffffffffffffffffffffff166117c4610df4565b73ffffffffffffffffffffffffffffffffffffffff161461181a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611811906127ae565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561188a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188190612ca9565b60405180910390fd5b61189381611bc3565b50565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061192057506118f1610df4565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61195f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611956906128b2565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505061199d57600080fd5b565b600080823b905060008111915050919050565b60008060058054905090508042446040516020016119d1929190612cea565b6040516020818303038152906040528051906020012060001c6119f49190612d45565b91505090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e30856040518363ffffffff1660e01b8152600401611a58929190612a74565b60206040518083038186803b158015611a7057600080fd5b505afa158015611a84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa89190612ab2565b11611ae8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611adf90612b2b565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a30838560016040518563ffffffff1660e01b8152600401611b4a9493929190612dbb565b600060405180830381600087803b158015611b6457600080fd5b505af1158015611b78573d6000803e3d6000fd5b505050507f9dfcbfa96cdfe64c96cc2bedb739c05b3202e2931940ef19a5f1d20aaff93cad828242604051611baf93929190612c00565b60405180910390a15050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611cd081611c9b565b8114611cdb57600080fd5b50565b600081359050611ced81611cc7565b92915050565b600060208284031215611d0957611d08611c91565b5b6000611d1784828501611cde565b91505092915050565b60008115159050919050565b611d3581611d20565b82525050565b6000602082019050611d506000830184611d2c565b92915050565b6000819050919050565b611d6981611d56565b82525050565b6000602082019050611d846000830184611d60565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611db582611d8a565b9050919050565b611dc581611daa565b8114611dd057600080fd5b50565b600081359050611de281611dbc565b92915050565b600060208284031215611dfe57611dfd611c91565b5b6000611e0c84828501611dd3565b91505092915050565b611e1e81611d20565b8114611e2957600080fd5b50565b600081359050611e3b81611e15565b92915050565b60008060408385031215611e5857611e57611c91565b5b6000611e6685828601611dd3565b9250506020611e7785828601611e2c565b9150509250929050565b611e8a81611d56565b8114611e9557600080fd5b50565b600081359050611ea781611e81565b92915050565b600060208284031215611ec357611ec2611c91565b5b6000611ed184828501611e98565b91505092915050565b6000819050919050565b611eed81611eda565b82525050565b6000602082019050611f086000830184611ee4565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611f5c82611f13565b810181811067ffffffffffffffff82111715611f7b57611f7a611f24565b5b80604052505050565b6000611f8e611c87565b9050611f9a8282611f53565b919050565b600067ffffffffffffffff821115611fba57611fb9611f24565b5b602082029050602081019050919050565b600080fd5b6000611fe3611fde84611f9f565b611f84565b9050808382526020820190506020840283018581111561200657612005611fcb565b5b835b8181101561202f578061201b8882611dd3565b845260208401935050602081019050612008565b5050509392505050565b600082601f83011261204e5761204d611f0e565b5b813561205e848260208601611fd0565b91505092915050565b60006020828403121561207d5761207c611c91565b5b600082013567ffffffffffffffff81111561209b5761209a611c96565b5b6120a784828501612039565b91505092915050565b6120b981611daa565b82525050565b60006020820190506120d460008301846120b0565b92915050565b600067ffffffffffffffff8211156120f5576120f4611f24565b5b602082029050602081019050919050565b6000612119612114846120da565b611f84565b9050808382526020820190506020840283018581111561213c5761213b611fcb565b5b835b8181101561216557806121518882611e98565b84526020840193505060208101905061213e565b5050509392505050565b600082601f83011261218457612183611f0e565b5b8135612194848260208601612106565b91505092915050565b600080fd5b600067ffffffffffffffff8211156121bd576121bc611f24565b5b6121c682611f13565b9050602081019050919050565b82818337600083830152505050565b60006121f56121f0846121a2565b611f84565b9050828152602081018484840111156122115761221061219d565b5b61221c8482856121d3565b509392505050565b600082601f83011261223957612238611f0e565b5b81356122498482602086016121e2565b91505092915050565b600080600080600060a0868803121561226e5761226d611c91565b5b600061227c88828901611dd3565b955050602061228d88828901611dd3565b945050604086013567ffffffffffffffff8111156122ae576122ad611c96565b5b6122ba8882890161216f565b935050606086013567ffffffffffffffff8111156122db576122da611c96565b5b6122e78882890161216f565b925050608086013567ffffffffffffffff81111561230857612307611c96565b5b61231488828901612224565b9150509295509295909350565b61232a81611c9b565b82525050565b60006020820190506123456000830184612321565b92915050565b60006040820190506123606000830185611d60565b61236d6020830184611d60565b9392505050565b600080600080600060a086880312156123905761238f611c91565b5b600061239e88828901611dd3565b95505060206123af88828901611dd3565b94505060406123c088828901611e98565b93505060606123d188828901611e98565b925050608086013567ffffffffffffffff8111156123f2576123f1611c96565b5b6123fe88828901612224565b9150509295509295909350565b600082825260208201905092915050565b7f506c65617365207472616e7366657220302e3235206574686572000000000000600082015250565b6000612452601a8361240b565b915061245d8261241c565b602082019050919050565b6000602082019050818103600083015261248181612445565b9050919050565b7f4f6e6c792031207075726368617365207065722077616c6c657420616c6c6f7760008201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b60006124e460228361240b565b91506124ef82612488565b604082019050919050565b60006020820190508181036000830152612513816124d7565b9050919050565b7f596f75206e65656420746f2062652077686974656c697374656420746f20707560008201527f7263686173650000000000000000000000000000000000000000000000000000602082015250565b600061257660268361240b565b91506125818261251a565b604082019050919050565b600060208201905081810360008301526125a581612569565b9050919050565b7f43757272656e746c79206e6f204e465420617661696c61626c652e20506c656160008201527f73652074727920616761696e206c617465720000000000000000000000000000602082015250565b600061260860328361240b565b9150612613826125ac565b604082019050919050565b60006020820190508181036000830152612637816125fb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e6f20416d6f756e7420617661696c61626c6520666f72207468697320746f6b60008201527f656e000000000000000000000000000000000000000000000000000000000000602082015250565b60006126c960228361240b565b91506126d48261266d565b604082019050919050565b600060208201905081810360008301526126f8816126bc565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061273982611d56565b915061274483611d56565b925082821015612757576127566126ff565b5b828203905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061279860208361240b565b91506127a382612762565b602082019050919050565b600060208201905081810360008301526127c78161278b565b9050919050565b60006040820190506127e360008301856120b0565b6127f06020830184611d2c565b9392505050565b600061280282611d56565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612835576128346126ff565b5b600182019050919050565b7f43616c6c657220646f6573206e6f7420686176652041646d696e20416363657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b600061289c60218361240b565b91506128a782612840565b604082019050919050565b600060208201905081810360008301526128cb8161288f565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61290781611daa565b82525050565b600061291983836128fe565b60208301905092915050565b6000602082019050919050565b600061293d826128d2565b61294781856128dd565b9350612952836128ee565b8060005b8381101561298357815161296a888261290d565b975061297583612925565b925050600181019050612956565b5085935050505092915050565b600060208201905081810360008301526129aa8184612932565b905092915050565b7f4f6e6c792041646d696e732063616e2073656e64204e46547300000000000000600082015250565b60006129e860198361240b565b91506129f3826129b2565b602082019050919050565b60006020820190508181036000830152612a17816129db565b9050919050565b6000612a2982611d56565b9150612a3483611d56565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612a6957612a686126ff565b5b828201905092915050565b6000604082019050612a8960008301856120b0565b612a966020830184611d60565b9392505050565b600081519050612aac81611e81565b92915050565b600060208284031215612ac857612ac7611c91565b5b6000612ad684828501612a9d565b91505092915050565b7f4e4654206973206f776e6564206279207468697320636f6e7472616374000000600082015250565b6000612b15601d8361240b565b9150612b2082612adf565b602082019050919050565b60006020820190508181036000830152612b4481612b08565b9050919050565b600082825260208201905092915050565b7f3078300000000000000000000000000000000000000000000000000000000000600082015250565b6000612b92600383612b4b565b9150612b9d82612b5c565b602082019050919050565b600060a082019050612bbd60008301876120b0565b612bca60208301866120b0565b612bd76040830185611d60565b612be46060830184611d60565b8181036080830152612bf581612b85565b905095945050505050565b6000606082019050612c156000830186611d60565b612c2260208301856120b0565b612c2f6040830184611d60565b949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612c9360268361240b565b9150612c9e82612c37565b604082019050919050565b60006020820190508181036000830152612cc281612c86565b9050919050565b6000819050919050565b612ce4612cdf82611d56565b612cc9565b82525050565b6000612cf68285612cd3565b602082019150612d068284612cd3565b6020820191508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612d5082611d56565b9150612d5b83611d56565b925082612d6b57612d6a612d16565b5b828206905092915050565b6000819050919050565b6000819050919050565b6000612da5612da0612d9b84612d76565b612d80565b611d56565b9050919050565b612db581612d8a565b82525050565b600060a082019050612dd060008301876120b0565b612ddd60208301866120b0565b612dea6040830185611d60565b612df76060830184612dac565b8181036080830152612e0881612b85565b90509594505050505056fea2646970667358221220ea57474c9ec800405965965f2a554b6f7570509c5090c04eaa7aa719ee2dfd4164736f6c63430008090033000000000000000000000000879cd97000c0567b370b9a97540a1fd56b8d1b2b

Deployed Bytecode

0x6080604052600436106101185760003560e01c80638da5cb5b116100a0578063dbfa167b11610064578063dbfa167b14610396578063e43252d7146103d4578063f23a6e61146103fd578063f2fde38b1461043a578063f44b79b31461046357610127565b80638da5cb5b146102e2578063aae282e11461030d578063bc197c8114610338578063cc70158314610375578063d0e30db01461038c57610127565b80634b0bddd2116100e75780634b0bddd214610213578063715018a61461023c57806372b94204146102535780638401f8d1146102905780638ab1d681146102b957610127565b806301ffc9a71461013157806312065fe01461016e57806324d7806c146101995780633af32abf146101d657610127565b366101275761012561047a565b005b61012f61047a565b005b34801561013d57600080fd5b5061015860048036038101906101539190611cf3565b610821565b6040516101659190611d3b565b60405180910390f35b34801561017a57600080fd5b50610183610828565b6040516101909190611d6f565b60405180910390f35b3480156101a557600080fd5b506101c060048036038101906101bb9190611de8565b610830565b6040516101cd9190611d3b565b60405180910390f35b3480156101e257600080fd5b506101fd60048036038101906101f89190611de8565b610886565b60405161020a9190611d3b565b60405180910390f35b34801561021f57600080fd5b5061023a60048036038101906102359190611e41565b6108dc565b005b34801561024857600080fd5b506102516109ec565b005b34801561025f57600080fd5b5061027a60048036038101906102759190611ead565b610a74565b6040516102879190611ef3565b60405180910390f35b34801561029c57600080fd5b506102b760048036038101906102b29190612067565b610af8565b005b3480156102c557600080fd5b506102e060048036038101906102db9190611de8565b610c8d565b005b3480156102ee57600080fd5b506102f7610df4565b60405161030491906120bf565b60405180910390f35b34801561031957600080fd5b50610322610e1d565b60405161032f91906120bf565b60405180910390f35b34801561034457600080fd5b5061035f600480360381019061035a9190612252565b610e43565b60405161036c9190612330565b60405180910390f35b34801561038157600080fd5b5061038a6110ba565b005b61039461047a565b005b3480156103a257600080fd5b506103bd60048036038101906103b89190611ead565b61142e565b6040516103cb92919061234b565b60405180910390f35b3480156103e057600080fd5b506103fb60048036038101906103f69190611de8565b611462565b005b34801561040957600080fd5b50610424600480360381019061041f9190612374565b6115c9565b6040516104319190612330565b60405180910390f35b34801561044657600080fd5b50610461600480360381019061045c9190611de8565b61179e565b005b34801561046f57600080fd5b50610478611896565b005b6703782dace9d9000034146104c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104bb90612468565b60405180910390fd5b60001515600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610557576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054e906124fa565b60405180910390fd5b60011515600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146105ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e19061258c565b60405180910390fd5b600060058054905011610632576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106299061261e565b60405180910390fd5b600061063c6119b2565b60ff1690506000600582815481106106575761065661263e565b5b90600052602060002090600202016000015490506000600583815481106106815761068061263e565b5b906000526020600020906002020160010154116106d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ca906126df565b60405180910390fd5b6106dd81336119fa565b6001600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060016005838154811061074b5761074a61263e565b5b90600052602060002090600202016001015411156107e757604051806040016040528082815260200160016005858154811061078a5761078961263e565b5b9060005260206000209060020201600101546107a6919061272e565b815250600583815481106107bd576107bc61263e565b5b9060005260206000209060020201600082015181600001556020820151816001015590505061081d565b600582815481106107fb576107fa61263e565b5b9060005260206000209060020201600080820160009055600182016000905550505b5050565b6000919050565b600047905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6108e4611bbb565b73ffffffffffffffffffffffffffffffffffffffff16610902610df4565b73ffffffffffffffffffffffffffffffffffffffff1614610958576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094f906127ae565b60405180910390fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fe529461c8529abc0e0fe7c5ee361f74fe22e0b7574df1fc0b7558a282091fb7882826040516109e09291906127ce565b60405180910390a15050565b6109f4611bbb565b73ffffffffffffffffffffffffffffffffffffffff16610a12610df4565b73ffffffffffffffffffffffffffffffffffffffff1614610a68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5f906127ae565b60405180910390fd5b610a726000611bc3565b565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff905060005b600580549050811015610aee578360058281548110610abf57610abe61263e565b5b9060005260206000209060020201600001541415610adb578091505b8080610ae6906127f7565b915050610a9d565b5080915050919050565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610b825750610b53610df4565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610bc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb8906128b2565b60405180910390fd5b60005b8151811015610c5257600160046000848481518110610be657610be561263e565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610c4a906127f7565b915050610bc4565b507f38b0ca37539c1f04430742c13474bf9185bc2faf638609de5d6ce28de7da4d5581604051610c829190612990565b60405180910390a150565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610d175750610ce8610df4565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610d56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4d906128b2565b60405180910390fd5b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fcdd2e9b91a56913d370075169cefa1602ba36be5301664f752192bb1709df75760405160405180910390a250565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610ecf5750610ea0610df4565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b610f0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f05906129fe565b60405180910390fd5b60005b84518110156110a6576000610f3f868381518110610f3257610f3161263e565b5b6020026020010151610a74565b905060008113156110075760008190506040518060400160405280888581518110610f6d57610f6c61263e565b5b60200260200101518152602001878581518110610f8d57610f8c61263e565b5b602002602001015160058481548110610fa957610fa861263e565b5b906000526020600020906002020160010154610fc59190612a1e565b81525060058281548110610fdc57610fdb61263e565b5b9060005260206000209060020201600082015181600001556020820151816001015590505050611092565b600560405180604001604052808885815181106110275761102661263e565b5b602002602001015181526020018785815181106110475761104661263e565b5b60200260200101518152509080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015181600001556020820151816001015550505b50808061109e906127f7565b915050610f11565b5063bc197c8160e01b905095945050505050565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806111445750611115610df4565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117a906128b2565b60405180910390fd5b60005b60058054905081101561142b576000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e30600585815481106111e7576111e661263e565b5b9060005260206000209060020201600001546040518363ffffffff1660e01b8152600401611216929190612a74565b60206040518083038186803b15801561122e57600080fd5b505afa158015611242573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112669190612ab2565b116112a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129d90612b2b565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a3033600585815481106112fa576112f961263e565b5b906000526020600020906002020160000154600586815481106113205761131f61263e565b5b9060005260206000209060020201600101546040518563ffffffff1660e01b81526004016113519493929190612ba8565b600060405180830381600087803b15801561136b57600080fd5b505af115801561137f573d6000803e3d6000fd5b50505050600581815481106113975761139661263e565b5b9060005260206000209060020201600080820160009055600182016000905550507f9dfcbfa96cdfe64c96cc2bedb739c05b3202e2931940ef19a5f1d20aaff93cad600582815481106113ed576113ec61263e565b5b906000526020600020906002020160000154334260405161141093929190612c00565b60405180910390a18080611423906127f7565b915050611186565b50565b6005818154811061143e57600080fd5b90600052602060002090600202016000915090508060000154908060010154905082565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806114ec57506114bd610df4565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61152b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611522906128b2565b60405180910390fd5b6001600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fa850ae9193f515cbae8d35e8925bd2be26627fc91bce650b8652ed254e9cab0360405160405180910390a250565b6000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806116555750611626610df4565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b611694576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168b906129fe565b60405180910390fd5b600061169f85610a74565b90506000811315611733576000819050604051806040016040528087815260200186600584815481106116d5576116d461263e565b5b9060005260206000209060020201600101546116f19190612a1e565b815250600582815481106117085761170761263e565b5b906000526020600020906002020160008201518160000155602082015181600101559050505061178a565b60056040518060400160405280878152602001868152509080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015181600001556020820151816001015550505b63f23a6e6160e01b91505095945050505050565b6117a6611bbb565b73ffffffffffffffffffffffffffffffffffffffff166117c4610df4565b73ffffffffffffffffffffffffffffffffffffffff161461181a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611811906127ae565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561188a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188190612ca9565b60405180910390fd5b61189381611bc3565b50565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061192057506118f1610df4565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61195f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611956906128b2565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505061199d57600080fd5b565b600080823b905060008111915050919050565b60008060058054905090508042446040516020016119d1929190612cea565b6040516020818303038152906040528051906020012060001c6119f49190612d45565b91505090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e30856040518363ffffffff1660e01b8152600401611a58929190612a74565b60206040518083038186803b158015611a7057600080fd5b505afa158015611a84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa89190612ab2565b11611ae8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611adf90612b2b565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a30838560016040518563ffffffff1660e01b8152600401611b4a9493929190612dbb565b600060405180830381600087803b158015611b6457600080fd5b505af1158015611b78573d6000803e3d6000fd5b505050507f9dfcbfa96cdfe64c96cc2bedb739c05b3202e2931940ef19a5f1d20aaff93cad828242604051611baf93929190612c00565b60405180910390a15050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611cd081611c9b565b8114611cdb57600080fd5b50565b600081359050611ced81611cc7565b92915050565b600060208284031215611d0957611d08611c91565b5b6000611d1784828501611cde565b91505092915050565b60008115159050919050565b611d3581611d20565b82525050565b6000602082019050611d506000830184611d2c565b92915050565b6000819050919050565b611d6981611d56565b82525050565b6000602082019050611d846000830184611d60565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611db582611d8a565b9050919050565b611dc581611daa565b8114611dd057600080fd5b50565b600081359050611de281611dbc565b92915050565b600060208284031215611dfe57611dfd611c91565b5b6000611e0c84828501611dd3565b91505092915050565b611e1e81611d20565b8114611e2957600080fd5b50565b600081359050611e3b81611e15565b92915050565b60008060408385031215611e5857611e57611c91565b5b6000611e6685828601611dd3565b9250506020611e7785828601611e2c565b9150509250929050565b611e8a81611d56565b8114611e9557600080fd5b50565b600081359050611ea781611e81565b92915050565b600060208284031215611ec357611ec2611c91565b5b6000611ed184828501611e98565b91505092915050565b6000819050919050565b611eed81611eda565b82525050565b6000602082019050611f086000830184611ee4565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611f5c82611f13565b810181811067ffffffffffffffff82111715611f7b57611f7a611f24565b5b80604052505050565b6000611f8e611c87565b9050611f9a8282611f53565b919050565b600067ffffffffffffffff821115611fba57611fb9611f24565b5b602082029050602081019050919050565b600080fd5b6000611fe3611fde84611f9f565b611f84565b9050808382526020820190506020840283018581111561200657612005611fcb565b5b835b8181101561202f578061201b8882611dd3565b845260208401935050602081019050612008565b5050509392505050565b600082601f83011261204e5761204d611f0e565b5b813561205e848260208601611fd0565b91505092915050565b60006020828403121561207d5761207c611c91565b5b600082013567ffffffffffffffff81111561209b5761209a611c96565b5b6120a784828501612039565b91505092915050565b6120b981611daa565b82525050565b60006020820190506120d460008301846120b0565b92915050565b600067ffffffffffffffff8211156120f5576120f4611f24565b5b602082029050602081019050919050565b6000612119612114846120da565b611f84565b9050808382526020820190506020840283018581111561213c5761213b611fcb565b5b835b8181101561216557806121518882611e98565b84526020840193505060208101905061213e565b5050509392505050565b600082601f83011261218457612183611f0e565b5b8135612194848260208601612106565b91505092915050565b600080fd5b600067ffffffffffffffff8211156121bd576121bc611f24565b5b6121c682611f13565b9050602081019050919050565b82818337600083830152505050565b60006121f56121f0846121a2565b611f84565b9050828152602081018484840111156122115761221061219d565b5b61221c8482856121d3565b509392505050565b600082601f83011261223957612238611f0e565b5b81356122498482602086016121e2565b91505092915050565b600080600080600060a0868803121561226e5761226d611c91565b5b600061227c88828901611dd3565b955050602061228d88828901611dd3565b945050604086013567ffffffffffffffff8111156122ae576122ad611c96565b5b6122ba8882890161216f565b935050606086013567ffffffffffffffff8111156122db576122da611c96565b5b6122e78882890161216f565b925050608086013567ffffffffffffffff81111561230857612307611c96565b5b61231488828901612224565b9150509295509295909350565b61232a81611c9b565b82525050565b60006020820190506123456000830184612321565b92915050565b60006040820190506123606000830185611d60565b61236d6020830184611d60565b9392505050565b600080600080600060a086880312156123905761238f611c91565b5b600061239e88828901611dd3565b95505060206123af88828901611dd3565b94505060406123c088828901611e98565b93505060606123d188828901611e98565b925050608086013567ffffffffffffffff8111156123f2576123f1611c96565b5b6123fe88828901612224565b9150509295509295909350565b600082825260208201905092915050565b7f506c65617365207472616e7366657220302e3235206574686572000000000000600082015250565b6000612452601a8361240b565b915061245d8261241c565b602082019050919050565b6000602082019050818103600083015261248181612445565b9050919050565b7f4f6e6c792031207075726368617365207065722077616c6c657420616c6c6f7760008201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b60006124e460228361240b565b91506124ef82612488565b604082019050919050565b60006020820190508181036000830152612513816124d7565b9050919050565b7f596f75206e65656420746f2062652077686974656c697374656420746f20707560008201527f7263686173650000000000000000000000000000000000000000000000000000602082015250565b600061257660268361240b565b91506125818261251a565b604082019050919050565b600060208201905081810360008301526125a581612569565b9050919050565b7f43757272656e746c79206e6f204e465420617661696c61626c652e20506c656160008201527f73652074727920616761696e206c617465720000000000000000000000000000602082015250565b600061260860328361240b565b9150612613826125ac565b604082019050919050565b60006020820190508181036000830152612637816125fb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e6f20416d6f756e7420617661696c61626c6520666f72207468697320746f6b60008201527f656e000000000000000000000000000000000000000000000000000000000000602082015250565b60006126c960228361240b565b91506126d48261266d565b604082019050919050565b600060208201905081810360008301526126f8816126bc565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061273982611d56565b915061274483611d56565b925082821015612757576127566126ff565b5b828203905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061279860208361240b565b91506127a382612762565b602082019050919050565b600060208201905081810360008301526127c78161278b565b9050919050565b60006040820190506127e360008301856120b0565b6127f06020830184611d2c565b9392505050565b600061280282611d56565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612835576128346126ff565b5b600182019050919050565b7f43616c6c657220646f6573206e6f7420686176652041646d696e20416363657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b600061289c60218361240b565b91506128a782612840565b604082019050919050565b600060208201905081810360008301526128cb8161288f565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61290781611daa565b82525050565b600061291983836128fe565b60208301905092915050565b6000602082019050919050565b600061293d826128d2565b61294781856128dd565b9350612952836128ee565b8060005b8381101561298357815161296a888261290d565b975061297583612925565b925050600181019050612956565b5085935050505092915050565b600060208201905081810360008301526129aa8184612932565b905092915050565b7f4f6e6c792041646d696e732063616e2073656e64204e46547300000000000000600082015250565b60006129e860198361240b565b91506129f3826129b2565b602082019050919050565b60006020820190508181036000830152612a17816129db565b9050919050565b6000612a2982611d56565b9150612a3483611d56565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612a6957612a686126ff565b5b828201905092915050565b6000604082019050612a8960008301856120b0565b612a966020830184611d60565b9392505050565b600081519050612aac81611e81565b92915050565b600060208284031215612ac857612ac7611c91565b5b6000612ad684828501612a9d565b91505092915050565b7f4e4654206973206f776e6564206279207468697320636f6e7472616374000000600082015250565b6000612b15601d8361240b565b9150612b2082612adf565b602082019050919050565b60006020820190508181036000830152612b4481612b08565b9050919050565b600082825260208201905092915050565b7f3078300000000000000000000000000000000000000000000000000000000000600082015250565b6000612b92600383612b4b565b9150612b9d82612b5c565b602082019050919050565b600060a082019050612bbd60008301876120b0565b612bca60208301866120b0565b612bd76040830185611d60565b612be46060830184611d60565b8181036080830152612bf581612b85565b905095945050505050565b6000606082019050612c156000830186611d60565b612c2260208301856120b0565b612c2f6040830184611d60565b949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612c9360268361240b565b9150612c9e82612c37565b604082019050919050565b60006020820190508181036000830152612cc281612c86565b9050919050565b6000819050919050565b612ce4612cdf82611d56565b612cc9565b82525050565b6000612cf68285612cd3565b602082019150612d068284612cd3565b6020820191508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612d5082611d56565b9150612d5b83611d56565b925082612d6b57612d6a612d16565b5b828206905092915050565b6000819050919050565b6000819050919050565b6000612da5612da0612d9b84612d76565b612d80565b611d56565b9050919050565b612db581612d8a565b82525050565b600060a082019050612dd060008301876120b0565b612ddd60208301866120b0565b612dea6040830185611d60565b612df76060830184612dac565b8181036080830152612e0881612b85565b90509594505050505056fea2646970667358221220ea57474c9ec800405965965f2a554b6f7570509c5090c04eaa7aa719ee2dfd4164736f6c63430008090033

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

000000000000000000000000879cd97000c0567b370b9a97540a1fd56b8d1b2b

-----Decoded View---------------
Arg [0] : _nftContractAddress (address): 0x879CD97000c0567B370B9a97540a1FD56B8D1B2B

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


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  ]
[ 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.