ETH Price: $3,083.52 (-0.14%)

Contract

0x99f97D66aB29cD89d723121eE8dff81e65D18CBA
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Purchase Traits210277702024-10-23 10:44:3526 days ago1729680275IN
0x99f97D66...e65D18CBA
0 ETH0.001135186.3927069
Purchase Traits192034512024-02-11 7:50:47281 days ago1707637847IN
0x99f97D66...e65D18CBA
0 ETH0.0040564825.27800668
Purchase Traits187059432023-12-03 12:44:23351 days ago1701607463IN
0x99f97D66...e65D18CBA
0 ETH0.0044652425.14568591
Purchase Traits176884292023-07-14 1:26:35493 days ago1689297995IN
0x99f97D66...e65D18CBA
0 ETH0.0014918519.82869738
Purchase Traits176884292023-07-14 1:26:35493 days ago1689297995IN
0x99f97D66...e65D18CBA
0 ETH0.001399118.59591229
Purchase Traits173439422023-05-26 14:44:47542 days ago1685112287IN
0x99f97D66...e65D18CBA
0 ETH0.0124694436.09769108
Purchase Traits171312472023-04-26 15:18:35571 days ago1682522315IN
0x99f97D66...e65D18CBA
0 ETH0.0137035738.603463
Purchase Traits171310032023-04-26 14:29:23572 days ago1682519363IN
0x99f97D66...e65D18CBA
0 ETH0.0139601443.51896024
Purchase Traits171309862023-04-26 14:25:59572 days ago1682519159IN
0x99f97D66...e65D18CBA
0 ETH0.027972247.9246119
Purchase Traits171308952023-04-26 14:07:47572 days ago1682518067IN
0x99f97D66...e65D18CBA
0 ETH0.05948802101.92046985
Purchase Traits171308752023-04-26 14:03:47572 days ago1682517827IN
0x99f97D66...e65D18CBA
0 ETH0.0420166868.26431634
Purchase Traits168192632023-03-13 13:07:23616 days ago1678712843IN
0x99f97D66...e65D18CBA
0 ETH0.0051550128.84197119
Purchase Traits168192102023-03-13 12:56:35616 days ago1678712195IN
0x99f97D66...e65D18CBA
0 ETH0.0032094617.9567788
Purchase Traits167507622023-03-03 21:52:35625 days ago1677880355IN
0x99f97D66...e65D18CBA
0 ETH0.0039512521.81700353
Purchase Traits165125822023-01-29 12:49:23659 days ago1674996563IN
0x99f97D66...e65D18CBA
0 ETH0.0040290918.55992501
Purchase Traits165124142023-01-29 12:15:47659 days ago1674994547IN
0x99f97D66...e65D18CBA
0 ETH0.0029447517.69906288
Purchase Traits165123952023-01-29 12:11:47659 days ago1674994307IN
0x99f97D66...e65D18CBA
0 ETH0.0026100214.22518305
Purchase Traits161992652022-12-16 19:11:35702 days ago1671217895IN
0x99f97D66...e65D18CBA
0 ETH0.004158722.66583472
Purchase Traits160968732022-12-02 11:37:59717 days ago1669981079IN
0x99f97D66...e65D18CBA
0 ETH0.0025878112.93995893
Purchase Traits160861742022-11-30 23:48:11718 days ago1669852091IN
0x99f97D66...e65D18CBA
0 ETH0.0020533412.34226498
Grant Role160839892022-11-30 16:27:35718 days ago1669825655IN
0x99f97D66...e65D18CBA
0 ETH0.0014625212.36056258
Purchase Traits160722082022-11-29 0:55:47720 days ago1669683347IN
0x99f97D66...e65D18CBA
0 ETH0.0018558810.11499016
Purchase Traits160128982022-11-20 18:04:35728 days ago1668967475IN
0x99f97D66...e65D18CBA
0 ETH0.0067655214.88243794
Purchase Traits159871592022-11-17 3:49:11732 days ago1668656951IN
0x99f97D66...e65D18CBA
0 ETH0.0021339112.82565471
Purchase Traits159871272022-11-17 3:42:47732 days ago1668656567IN
0x99f97D66...e65D18CBA
0 ETH0.0033122513.40245179
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FancyTraitSale

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 23 : FancyTraitSale.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./interfaces/IFancyBears.sol";
import "./interfaces/IHoneyJars.sol";
import "./interfaces/IHoneyToken.sol";
import "./interfaces/IHoneyVesting.sol";
import "./interfaces/IFancyBearTraits.sol";
import "./interfaces/IFancyBearHoneyConsumption.sol";

contract FancyTraitSale is AccessControlEnumerable {

    struct TokenSaleData {
        uint256 price;
        uint256 counter;
        uint256 maxSupply;
        bool saleActive;
    }

    struct PurchaseData {
        uint256[] fancyBear; 
        uint256[] amountToSpendFromBear;
        uint256[] honeyJars;
        uint256[] amountToSpendFromHoneyJars;
        uint256 amountToSpendFromWallet;
        uint256[] traitTokenIds;
        uint256[] amountPerTrait;
    }

    using SafeMath for uint256;
    using SafeERC20 for IHoneyToken;

    bytes32 public constant SALE_MANAGER_ROLE = keccak256("SALE_MANAGER_ROLE");
    bytes32 public constant WITHDRAW_ROLE = keccak256("WITHDRAW_ROLE");

    mapping(uint256 => TokenSaleData) public tokenSaleData;

    IFancyBears public fancyBearsContract;
    IHoneyJars public honeyJarsContract;
    IHoneyToken public honeyTokenContract;
    IHoneyVesting public honeyVestingContract;
    IFancyBearTraits public fancyBearTraitsContract;
    IFancyBearHoneyConsumption public fancyBearHoneyConsumptionContract;

    event SaleDataUpdated(uint256 indexed _tokenId);
    event PriceUpdated(uint256 indexed _tokenId, uint256 _price);
    event CounterCleared(uint256 indexed _tokenId);
    event MaxSupplyUpdated(uint256 indexed _tokenId, uint256 _maxSupply);
    event SaleToggled(uint256 indexed _tokenId, bool _saleActive);
    event SaleDataDeleted(uint256 indexed _tokenId);
    event Withdraw(address _destination, uint256 _amount);

    constructor(
        IFancyBears _fancyBearsContract,
        IHoneyJars _honeyJarsContract,
        IHoneyToken _honeyTokenContract,
        IHoneyVesting _honeyVestingContract,
        IFancyBearTraits _fancyBearTraitsContract,
        IFancyBearHoneyConsumption _fancyBearHoneyConsumptionContract
    ) 
    {
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);

        fancyBearsContract = _fancyBearsContract;
        honeyJarsContract = _honeyJarsContract;
        honeyTokenContract = _honeyTokenContract;
        honeyVestingContract = _honeyVestingContract;
        fancyBearTraitsContract = _fancyBearTraitsContract;
        fancyBearHoneyConsumptionContract = _fancyBearHoneyConsumptionContract;

    }

    function purchaseTraits(PurchaseData calldata purchaseData) public {

        uint256 totalHoneyRequired;
        uint256 totalHoneySubmitted = purchaseData.amountToSpendFromWallet;

        require(
            purchaseData.fancyBear.length <= 1,
            "purchaseTraits: cannot submit more than one fancy bear"
        );

        require(
            purchaseData.amountToSpendFromBear.length == purchaseData.fancyBear.length,
            "purchaseTraits: fancy bear and amount to spend must match in length"
        );

        if(purchaseData.fancyBear.length == 1){

            require(
                fancyBearsContract.tokenByIndex(purchaseData.fancyBear[0].sub(1)) == purchaseData.fancyBear[0]
            );

            if(purchaseData.amountToSpendFromBear[0] > 0){
                require(
                    fancyBearsContract.ownerOf(purchaseData.fancyBear[0]) == msg.sender,
                    "purchaseTraits: caller must own fancy bear if spending honey in bear"
                );

                totalHoneySubmitted += purchaseData.amountToSpendFromBear[0];
            }
        }
        
        require(
            purchaseData.traitTokenIds.length > 0, "purchaseTraits: must request at least 1 trait"
        );

        require(
            purchaseData.traitTokenIds.length == purchaseData.amountPerTrait.length,
            "purchaseTraits: trait token ids and amounts must match in length"
        );

        for(uint256 i = 0; i < purchaseData.traitTokenIds.length; i++) {
            
            require(
                tokenSaleData[purchaseData.traitTokenIds[i]].saleActive,
                "purchaseTraits: trait is not available for sale"
            );
    
            require(
                tokenSaleData[purchaseData.traitTokenIds[i]].counter.add(purchaseData.amountPerTrait[i]) <= tokenSaleData[purchaseData.traitTokenIds[i]].maxSupply,
                "purchaseTraits: request exceeds supply of trait"
            );

            totalHoneyRequired += (tokenSaleData[purchaseData.traitTokenIds[i]]).price.mul(purchaseData.amountPerTrait[i]);

            tokenSaleData[purchaseData.traitTokenIds[i]].counter += purchaseData.amountPerTrait[i];
        }

        require(
            purchaseData.honeyJars.length == purchaseData.amountToSpendFromHoneyJars.length, 
            "purchaseTraits: honey jar ids and amounts to spend must match in length"
        );
        
        for(uint256 i = 0; i < purchaseData.honeyJars.length; i++) {
            require(
                honeyJarsContract.ownerOf(purchaseData.honeyJars[i]) == msg.sender,
                "purchaseTraits: caller must be owner of all honey jars"
            );

            totalHoneySubmitted += purchaseData.amountToSpendFromHoneyJars[i];
        }

        require(
            totalHoneyRequired == totalHoneySubmitted, 
            "purchaseTraits: caller must submit the required amount of honey"
        );

        if(purchaseData.fancyBear.length == 1 && purchaseData.amountToSpendFromBear[0] > 0) {
           
            honeyVestingContract.spendHoney(
                purchaseData.fancyBear,
                purchaseData.amountToSpendFromBear,
                purchaseData.honeyJars,
                purchaseData.amountToSpendFromHoneyJars
            );

        }
        else {
            honeyVestingContract.spendHoney(
                new uint256[](0),
                new uint256[](0),
                purchaseData.honeyJars,
                purchaseData.amountToSpendFromHoneyJars);
        }

        fancyBearTraitsContract.mintBatch(
            msg.sender,
            purchaseData.traitTokenIds,
            purchaseData.amountPerTrait,
            ""
        );

        if(purchaseData.fancyBear.length == 1){
            fancyBearHoneyConsumptionContract.consumeHoney(purchaseData.fancyBear[0], totalHoneyRequired);
        }

        if(purchaseData.amountToSpendFromWallet > 0){
            honeyTokenContract.safeTransferFrom(msg.sender, address(this), purchaseData.amountToSpendFromWallet);
        }
        
    }

    function updateSaleData(uint256 _tokenId, TokenSaleData calldata _tokenSaleData) public onlyRole(SALE_MANAGER_ROLE) {
        tokenSaleData[_tokenId] = _tokenSaleData;
        emit SaleDataUpdated(_tokenId);
    }

    function updateSaleDataBulk(
        uint256[] calldata _tokenIds, 
        TokenSaleData[] calldata _tokenSaleData
    ) 
        public 
        onlyRole(SALE_MANAGER_ROLE) 
    {
        require(
            _tokenIds.length == _tokenSaleData.length, 
            "updateSaleDataBulk: arrays must match in length"
        );
        for(uint256 i = 0; i < _tokenIds.length; i++){
            tokenSaleData[_tokenIds[i]] = _tokenSaleData[i];
            emit SaleDataUpdated(_tokenIds[i]);
        }
       
    }

    function updatePrice(uint256[] calldata _tokenIds, uint256[] calldata _prices) public onlyRole(SALE_MANAGER_ROLE) {
        require(_tokenIds.length == _prices.length, "updatePrice: token Ids and prices array must match in length");
        for(uint256 i = 0; i < _tokenIds.length; i++){
            tokenSaleData[_tokenIds[i]].price = _prices[i];
            emit PriceUpdated(_tokenIds[i], _prices[i]);
        }
    }

    function clearCounter(uint256[] calldata _tokenIds) public onlyRole(SALE_MANAGER_ROLE) {
        for(uint256 i = 0; i < _tokenIds.length; i++){
            tokenSaleData[_tokenIds[i]].counter = 0;
            emit CounterCleared(_tokenIds[i]);
        }
    }

    function updateMaxSupply(uint256[] calldata _tokenIds, uint256[] calldata _maxSupplies) public onlyRole(SALE_MANAGER_ROLE) {
        require(_tokenIds.length == _maxSupplies.length, "updatePrice: token Ids and max supplies array must match in length");
        for(uint256 i = 0; i < _tokenIds.length; i++){
            require(
                _maxSupplies[i] >= tokenSaleData[_tokenIds[i]].counter, 
                "updateMaxSupply: cannot set max supply below item counter"
            );

            tokenSaleData[_tokenIds[i]].maxSupply = _maxSupplies[i];
            emit MaxSupplyUpdated(_tokenIds[i], _maxSupplies[i]);
        }
    }

    function toggleSale(uint256[] calldata _tokenIds) public onlyRole(SALE_MANAGER_ROLE) {
        for(uint256 i = 0; i < _tokenIds.length; i++){
            tokenSaleData[_tokenIds[i]].saleActive = !tokenSaleData[_tokenIds[i]].saleActive;
            emit SaleToggled(_tokenIds[i], tokenSaleData[_tokenIds[i]].saleActive);
        } 
    }

    function deleteSaleData(uint256[] calldata _tokenIds) public onlyRole(SALE_MANAGER_ROLE) {
        for(uint256 i = 0; i < _tokenIds.length; i++){
            delete(tokenSaleData[_tokenIds[i]]);
            emit SaleDataDeleted(_tokenIds[i]); 
        }
    }

    function withdraw(address _beneficiary, uint256 _amount) public onlyRole(WITHDRAW_ROLE) {
        honeyTokenContract.safeTransfer(_beneficiary, _amount);
        emit Withdraw(_beneficiary, _amount);
    }

}

File 2 of 23 : IHoneyVesting.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

abstract contract IHoneyVesting {
    function spendHoney(
        uint256[] calldata _fancyBearTokens, 
        uint256[] calldata _amountPerFancyBearToken, 
        uint256[] calldata _honeyJarTokens,
        uint256[] calldata _amountPerHoneyJarToken
    )
        external
        virtual;
}

File 3 of 23 : IHoneyToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

abstract contract IHoneyToken is IERC20 {}

File 4 of 23 : IHoneyJars.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";

interface IHoneyJars is IERC721, IERC721Enumerable {

    function tokensInWallet(address _owner) external view returns(uint256[] memory);

}

File 5 of 23 : IFancyBears.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";

interface IFancyBears is IERC721, IERC721Enumerable {

    function tokensInWallet(address _owner) external view returns(uint256[] memory);

}

File 6 of 23 : IFancyBearTraits.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

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

abstract contract IFancyBearTraits is IERC1155 {

    mapping(string => bool) public categoryValidation;
    uint256 public categoryPointer;
    string[] public categories;
    function getTrait(uint256 _tokenId) public virtual returns (string memory, string memory, uint256);
    function getCategories() public virtual returns (string[] memory);
    function mint(address _account, uint256 _id, uint256 _amount, bytes memory _data) public virtual;
    function mintBatch(address _account, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data) public virtual;
}

File 7 of 23 : IFancyBearHoneyConsumption.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

abstract contract IFancyBearHoneyConsumption {

    mapping(uint256 => uint256) public honeyConsumed;
    function consumeHoney(uint256 _tokenId, uint256 _honeyAmount) public virtual;
    
}

File 8 of 23 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

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

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

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

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

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

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

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

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

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

        assembly {
            result := store
        }

        return result;
    }
}

File 9 of 23 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

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 generally not needed starting with Solidity 0.8, since 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 10 of 23 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 12 of 23 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

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

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

pragma solidity ^0.8.0;

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

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

File 14 of 23 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://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 15 of 23 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 16 of 23 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

File 17 of 23 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 18 of 23 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 19 of 23 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must 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 20 of 23 : IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 22 of 23 : AccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;

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

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override {
        super._grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override {
        super._revokeRole(role, account);
        _roleMembers[role].remove(account);
    }
}

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

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IFancyBears","name":"_fancyBearsContract","type":"address"},{"internalType":"contract IHoneyJars","name":"_honeyJarsContract","type":"address"},{"internalType":"contract IHoneyToken","name":"_honeyTokenContract","type":"address"},{"internalType":"contract IHoneyVesting","name":"_honeyVestingContract","type":"address"},{"internalType":"contract IFancyBearTraits","name":"_fancyBearTraitsContract","type":"address"},{"internalType":"contract IFancyBearHoneyConsumption","name":"_fancyBearHoneyConsumptionContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"CounterCleared","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"MaxSupplyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_price","type":"uint256"}],"name":"PriceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"SaleDataDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"SaleDataUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"_saleActive","type":"bool"}],"name":"SaleToggled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_destination","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"clearCounter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"deleteSaleData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fancyBearHoneyConsumptionContract","outputs":[{"internalType":"contract IFancyBearHoneyConsumption","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fancyBearTraitsContract","outputs":[{"internalType":"contract IFancyBearTraits","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fancyBearsContract","outputs":[{"internalType":"contract IFancyBears","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"honeyJarsContract","outputs":[{"internalType":"contract IHoneyJars","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"honeyTokenContract","outputs":[{"internalType":"contract IHoneyToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"honeyVestingContract","outputs":[{"internalType":"contract IHoneyVesting","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256[]","name":"fancyBear","type":"uint256[]"},{"internalType":"uint256[]","name":"amountToSpendFromBear","type":"uint256[]"},{"internalType":"uint256[]","name":"honeyJars","type":"uint256[]"},{"internalType":"uint256[]","name":"amountToSpendFromHoneyJars","type":"uint256[]"},{"internalType":"uint256","name":"amountToSpendFromWallet","type":"uint256"},{"internalType":"uint256[]","name":"traitTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amountPerTrait","type":"uint256[]"}],"internalType":"struct FancyTraitSale.PurchaseData","name":"purchaseData","type":"tuple"}],"name":"purchaseTraits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"toggleSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenSaleData","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"counter","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"bool","name":"saleActive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_maxSupplies","type":"uint256[]"}],"name":"updateMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_prices","type":"uint256[]"}],"name":"updatePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"counter","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"bool","name":"saleActive","type":"bool"}],"internalType":"struct FancyTraitSale.TokenSaleData","name":"_tokenSaleData","type":"tuple"}],"name":"updateSaleData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"counter","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"bool","name":"saleActive","type":"bool"}],"internalType":"struct FancyTraitSale.TokenSaleData[]","name":"_tokenSaleData","type":"tuple[]"}],"name":"updateSaleDataBulk","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162002d1938038062002d19833981016040819052620000349162000223565b62000041600033620000b4565b600380546001600160a01b03199081166001600160a01b0398891617909155600480548216968816969096179095556005805486169487169490941790935560068054851692861692909217909155600780548416918516919091179055600880549092169216919091179055620002b7565b620000cb8282620000f760201b62001ac61760201c565b6000828152600160209081526040909120620000f291839062001b4a62000198821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000194576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001533390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000620001af836001600160a01b038416620001b8565b90505b92915050565b60008181526001830160205260408120546200020157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001b2565b506000620001b2565b6001600160a01b03811681146200022057600080fd5b50565b60008060008060008060c087890312156200023d57600080fd5b86516200024a816200020a565b60208801519096506200025d816200020a565b604088015190955062000270816200020a565b606088015190945062000283816200020a565b608088015190935062000296816200020a565b60a0880151909250620002a9816200020a565b809150509295509295509295565b612a5280620002c76000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80638ce34394116100f9578063d1c354b811610097578063da8d126911610071578063da8d1269146103f0578063e02023a114610403578063f3fef3a31461042a578063f81b78ad1461043d57600080fd5b8063d1c354b8146103b7578063d547741f146103ca578063d66cd539146103dd57600080fd5b80639536148a116100d35780639536148a14610376578063a217fddf14610389578063ba9bd42814610391578063ca15c873146103a457600080fd5b80638ce343941461033d5780639010d07c1461035057806391d148541461036357600080fd5b80632f2ff15d11610166578063551b42a811610140578063551b42a8146102d757806372fb4e71146102ec5780637651721b14610317578063882e1a281461032a57600080fd5b80632f2ff15d1461029e57806336568abe146102b157806342d6f6f7146102c457600080fd5b806301634d9e146101ae57806301ffc9a7146101c3578063168b140b146101eb578063248a9ca3146101fe57806324ac8cc21461022f5780632840c2ca1461028b575b600080fd5b6101c16101bc3660046122e6565b610450565b005b6101d66101d136600461231e565b6104b5565b60405190151581526020015b60405180910390f35b6101c16101f9366004612394565b6104e0565b61022161020c3660046123d6565b60009081526020819052604090206001015490565b6040519081526020016101e2565b61026961023d3660046123d6565b600260208190526000918252604090912080546001820154928201546003909201549092919060ff1684565b60408051948552602085019390935291830152151560608201526080016101e2565b6101c16102993660046123ef565b61062d565b6101c16102ac366004612473565b61079a565b6101c16102bf366004612473565b6107c5565b6101c16102d2366004612394565b610843565b6102216000805160206129fd83398151915281565b6006546102ff906001600160a01b031681565b6040516001600160a01b0390911681526020016101e2565b6003546102ff906001600160a01b031681565b6101c16103383660046124a3565b6108f2565b6005546102ff906001600160a01b031681565b6102ff61035e3660046124de565b611594565b6101d6610371366004612473565b6115b3565b6101c1610384366004612394565b6115dc565b610221600081565b6101c161039f3660046123ef565b6116a5565b6102216103b23660046123d6565b6118cc565b6101c16103c5366004612500565b6118e3565b6101c16103d8366004612473565b611a17565b6007546102ff906001600160a01b031681565b6008546102ff906001600160a01b031681565b6102217f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec81565b6101c161043836600461259a565b611a3d565b6004546102ff906001600160a01b031681565b6000805160206129fd8339815191526104698133611b5f565b6000838152600260205260409020829061048382826125d4565b505060405183907fc8495fe7971ceb37aaa76d46be369f8eb8b077d903717c154c0618cec4f3519e90600090a2505050565b60006001600160e01b03198216635a05180f60e01b14806104da57506104da82611bc3565b92915050565b6000805160206129fd8339815191526104f98133611b5f565b60005b82811015610627576002600085858481811061051a5761051a612614565b90506020020135815260200190815260200160002060030160009054906101000a900460ff16156002600086868581811061055757610557612614565b90506020020135815260200190815260200160002060030160006101000a81548160ff02191690831515021790555083838281811061059857610598612614565b905060200201357fa04432bc9092a95cb96adf3c62d3000f9f6b7af5c0a1439fbae35d9b773cf1c0600260008787868181106105d6576105d6612614565b90506020020135815260200190815260200160002060030160009054906101000a900460ff1660405161060d911515815260200190565b60405180910390a28061061f81612640565b9150506104fc565b50505050565b6000805160206129fd8339815191526106468133611b5f565b8382146106c05760405162461bcd60e51b815260206004820152603c60248201527f75706461746550726963653a20746f6b656e2049647320616e6420707269636560448201527f73206172726179206d757374206d6174636820696e206c656e6774680000000060648201526084015b60405180910390fd5b60005b84811015610792578383828181106106dd576106dd612614565b90506020020135600260008888858181106106fa576106fa612614565b9050602002013581526020019081526020016000206000018190555085858281811061072857610728612614565b905060200201357f945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd69683885858481811061076257610762612614565b9050602002013560405161077891815260200190565b60405180910390a28061078a81612640565b9150506106c3565b505050505050565b6000828152602081905260409020600101546107b68133611b5f565b6107c08383611bf8565b505050565b6001600160a01b03811633146108355760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106b7565b61083f8282611c1a565b5050565b6000805160206129fd83398151915261085c8133611b5f565b60005b828110156106275760006002600086868581811061087f5761087f612614565b905060200201358152602001908152602001600020600101819055508383828181106108ad576108ad612614565b905060200201357fdfdd873df6e0bceeaed28e2561412a65cfb5197f879900a9d4c72de16ab3723260405160405180910390a2806108ea81612640565b91505061085f565b600060808201356001610905848061265b565b905011156109745760405162461bcd60e51b815260206004820152603660248201527f70757263686173655472616974733a2063616e6e6f74207375626d6974206d6f6044820152753932903a3430b71037b732903330b731bc903132b0b960511b60648201526084016106b7565b61097e838061265b565b905061098d602085018561265b565b905014610a0e5760405162461bcd60e51b815260206004820152604360248201527f70757263686173655472616974733a2066616e6379206265617220616e64206160448201527f6d6f756e7420746f207370656e64206d757374206d6174636820696e206c656e6064820152620cee8d60eb1b608482015260a4016106b7565b610a18838061265b565b905060011415610c7757610a2c838061265b565b6000818110610a3d57610a3d612614565b60035460209091029290920135916001600160a01b03169050634f6ccce7610a906001610a6a888061265b565b6000818110610a7b57610a7b612614565b90506020020135611c3c90919063ffffffff16565b6040518263ffffffff1660e01b8152600401610aae91815260200190565b602060405180830381865afa158015610acb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aef91906126a5565b14610af957600080fd5b6000610b08602085018561265b565b6000818110610b1957610b19612614565b905060200201351115610c775760035433906001600160a01b0316636352211e610b43868061265b565b6000818110610b5457610b54612614565b905060200201356040518263ffffffff1660e01b8152600401610b7991815260200190565b602060405180830381865afa158015610b96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bba91906126be565b6001600160a01b031614610c445760405162461bcd60e51b8152602060048201526044602482018190527f70757263686173655472616974733a2063616c6c6572206d757374206f776e20908201527f66616e63792062656172206966207370656e64696e6720686f6e657920696e206064820152633132b0b960e11b608482015260a4016106b7565b610c51602084018461265b565b6000818110610c6257610c62612614565b9050602002013581610c7491906126db565b90505b6000610c8660a085018561265b565b905011610ceb5760405162461bcd60e51b815260206004820152602d60248201527f70757263686173655472616974733a206d75737420726571756573742061742060448201526c1b19585cdd080c481d1c985a5d609a1b60648201526084016106b7565b610cf860c084018461265b565b9050610d0760a085018561265b565b905014610d7e576040805162461bcd60e51b81526020600482015260248101919091527f70757263686173655472616974733a20747261697420746f6b656e206964732060448201527f616e6420616d6f756e7473206d757374206d6174636820696e206c656e67746860648201526084016106b7565b60005b610d8e60a085018561265b565b90508110156110565760026000610da860a087018761265b565b84818110610db857610db8612614565b602090810292909201358352508101919091526040016000206003015460ff16610e3c5760405162461bcd60e51b815260206004820152602f60248201527f70757263686173655472616974733a207472616974206973206e6f742061766160448201526e696c61626c6520666f722073616c6560881b60648201526084016106b7565b60026000610e4d60a087018761265b565b84818110610e5d57610e5d612614565b90506020020135815260200190815260200160002060020154610eeb858060c00190610e89919061265b565b84818110610e9957610e99612614565b9050602002013560026000888060a00190610eb4919061265b565b87818110610ec457610ec4612614565b90506020020135815260200190815260200160002060010154611c4890919063ffffffff16565b1115610f515760405162461bcd60e51b815260206004820152602f60248201527f70757263686173655472616974733a207265717565737420657863656564732060448201526e1cdd5c1c1b1e481bd9881d1c985a5d608a1b60648201526084016106b7565b610fc3610f6160c086018661265b565b83818110610f7157610f71612614565b9050602002013560026000878060a00190610f8c919061265b565b86818110610f9c57610f9c612614565b90506020020135815260200190815260200160002060000154611c5490919063ffffffff16565b610fcd90846126db565b9250610fdc60c085018561265b565b82818110610fec57610fec612614565b9050602002013560026000868060a00190611007919061265b565b8581811061101757611017612614565b905060200201358152602001908152602001600020600101600082825461103e91906126db565b9091555081905061104e81612640565b915050610d81565b50611064606084018461265b565b9050611073604085018561265b565b9050146110f85760405162461bcd60e51b815260206004820152604760248201527f70757263686173655472616974733a20686f6e6579206a61722069647320616e60448201527f6420616d6f756e747320746f207370656e64206d757374206d6174636820696e606482015266040d8cadccee8d60cb1b608482015260a4016106b7565b60005b611108604085018561265b565b905081101561125f5760045433906001600160a01b0316636352211e611131604088018861265b565b8581811061114157611141612614565b905060200201356040518263ffffffff1660e01b815260040161116691815260200190565b602060405180830381865afa158015611183573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a791906126be565b6001600160a01b03161461121c5760405162461bcd60e51b815260206004820152603660248201527f70757263686173655472616974733a2063616c6c6572206d757374206265206f604482015275776e6572206f6620616c6c20686f6e6579206a61727360501b60648201526084016106b7565b611229606085018561265b565b8281811061123957611239612614565b905060200201358261124b91906126db565b91508061125781612640565b9150506110fb565b508082146112d55760405162461bcd60e51b815260206004820152603f60248201527f70757263686173655472616974733a2063616c6c6572206d757374207375626d60448201527f69742074686520726571756972656420616d6f756e74206f6620686f6e65790060648201526084016106b7565b6112df838061265b565b90506001148015611314575060006112fa602085018561265b565b600081811061130b5761130b612614565b90506020020135115b156113b5576006546001600160a01b031663d17c1c9f611334858061265b565b611341602088018861265b565b61134e60408a018a61265b565b61135b60608c018c61265b565b6040518963ffffffff1660e01b815260040161137e989796959493929190612729565b600060405180830381600087803b15801561139857600080fd5b505af11580156113ac573d6000803e3d6000fd5b5050505061144c565b6006546040805160008082526020820190815281830183526001600160a01b039093169263d17c1c9f926113eb9088018861265b565b6113f860608a018a61265b565b6040518763ffffffff1660e01b8152600401611419969594939291906127da565b600060405180830381600087803b15801561143357600080fd5b505af1158015611447573d6000803e3d6000fd5b505050505b6007546001600160a01b0316631f7fdffa3361146b60a087018761265b565b61147860c089018961265b565b6040518663ffffffff1660e01b8152600401611498959493929190612836565b600060405180830381600087803b1580156114b257600080fd5b505af11580156114c6573d6000803e3d6000fd5b506114d7925085915081905061265b565b90506001141561156e576008546001600160a01b03166389a1debb6114fc858061265b565b600081811061150d5761150d612614565b90506020020135846040518363ffffffff1660e01b815260040161153b929190918252602082015260400190565b600060405180830381600087803b15801561155557600080fd5b505af1158015611569573d6000803e3d6000fd5b505050505b6080830135156107c0576005546107c0906001600160a01b031633306080870135611c60565b60008281526001602052604081206115ac9083611ccb565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000805160206129fd8339815191526115f58133611b5f565b60005b82811015610627576002600085858481811061161657611616612614565b602090810292909201358352508101919091526040016000908120818155600181018290556002810191909155600301805460ff1916905583838281811061166057611660612614565b905060200201357fac2e98f4328e4840a53a643210ab313f4c9c440b171c4ac93eccfa985fac74bf60405160405180910390a28061169d81612640565b9150506115f8565b6000805160206129fd8339815191526116be8133611b5f565b83821461173e5760405162461bcd60e51b815260206004820152604260248201527f75706461746550726963653a20746f6b656e2049647320616e64206d6178207360448201527f7570706c696573206172726179206d757374206d6174636820696e206c656e676064820152610e8d60f31b608482015260a4016106b7565b60005b84811015610792576002600087878481811061175f5761175f612614565b9050602002013581526020019081526020016000206001015484848381811061178a5761178a612614565b9050602002013510156118055760405162461bcd60e51b815260206004820152603960248201527f7570646174654d6178537570706c793a2063616e6e6f7420736574206d61782060448201527f737570706c792062656c6f77206974656d20636f756e7465720000000000000060648201526084016106b7565b83838281811061181757611817612614565b905060200201356002600088888581811061183457611834612614565b9050602002013581526020019081526020016000206002018190555085858281811061186257611862612614565b905060200201357f44ecfc706d63e347851cfd40acfa6cf2e3a41faa3e8b460210c03938e84a91ad85858481811061189c5761189c612614565b905060200201356040516118b291815260200190565b60405180910390a2806118c481612640565b915050611741565b60008181526001602052604081206104da90611cd7565b6000805160206129fd8339815191526118fc8133611b5f565b8382146119635760405162461bcd60e51b815260206004820152602f60248201527f75706461746553616c654461746142756c6b3a20617272617973206d7573742060448201526e0dac2e8c6d040d2dc40d8cadccee8d608b1b60648201526084016106b7565b60005b848110156107925783838281811061198057611980612614565b9050608002016002600088888581811061199c5761199c612614565b90506020020135815260200190815260200160002081816119bd91906125d4565b9050508585828181106119d2576119d2612614565b905060200201357fc8495fe7971ceb37aaa76d46be369f8eb8b077d903717c154c0618cec4f3519e60405160405180910390a280611a0f81612640565b915050611966565b600082815260208190526040902060010154611a338133611b5f565b6107c08383611c1a565b7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec611a688133611b5f565b600554611a7f906001600160a01b03168484611ce1565b604080516001600160a01b0385168152602081018490527f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364910160405180910390a1505050565b611ad082826115b3565b61083f576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611b063390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115ac836001600160a01b038416611d11565b611b6982826115b3565b61083f57611b81816001600160a01b03166014611d60565b611b8c836020611d60565b604051602001611b9d9291906128b8565b60408051601f198184030181529082905262461bcd60e51b82526106b79160040161292d565b60006001600160e01b03198216637965db0b60e01b14806104da57506301ffc9a760e01b6001600160e01b03198316146104da565b611c028282611ac6565b60008281526001602052604090206107c09082611b4a565b611c248282611efc565b60008281526001602052604090206107c09082611f61565b60006115ac8284612960565b60006115ac82846126db565b60006115ac8284612977565b6040516001600160a01b03808516602483015283166044820152606481018290526106279085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611f76565b60006115ac8383612048565b60006104da825490565b6040516001600160a01b0383166024820152604481018290526107c090849063a9059cbb60e01b90606401611c94565b6000818152600183016020526040812054611d58575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556104da565b5060006104da565b60606000611d6f836002612977565b611d7a9060026126db565b67ffffffffffffffff811115611d9257611d92612789565b6040519080825280601f01601f191660200182016040528015611dbc576020820181803683370190505b509050600360fc1b81600081518110611dd757611dd7612614565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611e0657611e06612614565b60200101906001600160f81b031916908160001a9053506000611e2a846002612977565b611e359060016126db565b90505b6001811115611ead576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611e6957611e69612614565b1a60f81b828281518110611e7f57611e7f612614565b60200101906001600160f81b031916908160001a90535060049490941c93611ea681612996565b9050611e38565b5083156115ac5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106b7565b611f0682826115b3565b1561083f576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115ac836001600160a01b038416612072565b6000611fcb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166121659092919063ffffffff16565b8051909150156107c05780806020019051810190611fe991906129ad565b6107c05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106b7565b600082600001828154811061205f5761205f612614565b9060005260206000200154905092915050565b6000818152600183016020526040812054801561215b576000612096600183612960565b85549091506000906120aa90600190612960565b905081811461210f5760008660000182815481106120ca576120ca612614565b90600052602060002001549050808760000184815481106120ed576120ed612614565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612120576121206129ca565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506104da565b60009150506104da565b6060612174848460008561217c565b949350505050565b6060824710156121dd5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106b7565b6001600160a01b0385163b6122345760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106b7565b600080866001600160a01b0316858760405161225091906129e0565b60006040518083038185875af1925050503d806000811461228d576040519150601f19603f3d011682016040523d82523d6000602084013e612292565b606091505b50915091506122a28282866122ad565b979650505050505050565b606083156122bc5750816115ac565b8251156122cc5782518084602001fd5b8160405162461bcd60e51b81526004016106b7919061292d565b60008082840360a08112156122fa57600080fd5b833592506080601f198201121561231057600080fd5b506020830190509250929050565b60006020828403121561233057600080fd5b81356001600160e01b0319811681146115ac57600080fd5b60008083601f84011261235a57600080fd5b50813567ffffffffffffffff81111561237257600080fd5b6020830191508360208260051b850101111561238d57600080fd5b9250929050565b600080602083850312156123a757600080fd5b823567ffffffffffffffff8111156123be57600080fd5b6123ca85828601612348565b90969095509350505050565b6000602082840312156123e857600080fd5b5035919050565b6000806000806040858703121561240557600080fd5b843567ffffffffffffffff8082111561241d57600080fd5b61242988838901612348565b9096509450602087013591508082111561244257600080fd5b5061244f87828801612348565b95989497509550505050565b6001600160a01b038116811461247057600080fd5b50565b6000806040838503121561248657600080fd5b8235915060208301356124988161245b565b809150509250929050565b6000602082840312156124b557600080fd5b813567ffffffffffffffff8111156124cc57600080fd5b820160e081850312156115ac57600080fd5b600080604083850312156124f157600080fd5b50508035926020909101359150565b6000806000806040858703121561251657600080fd5b843567ffffffffffffffff8082111561252e57600080fd5b61253a88838901612348565b9096509450602087013591508082111561255357600080fd5b818701915087601f83011261256757600080fd5b81358181111561257657600080fd5b8860208260071b850101111561258b57600080fd5b95989497505060200194505050565b600080604083850312156125ad57600080fd5b82356125b88161245b565b946020939093013593505050565b801515811461247057600080fd5b8135815560208201356001820155604082013560028201556003810160608301356125fe816125c6565b815490151560ff1660ff19919091161790555050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156126545761265461262a565b5060010190565b6000808335601e1984360301811261267257600080fd5b83018035915067ffffffffffffffff82111561268d57600080fd5b6020019150600581901b360382131561238d57600080fd5b6000602082840312156126b757600080fd5b5051919050565b6000602082840312156126d057600080fd5b81516115ac8161245b565b600082198211156126ee576126ee61262a565b500190565b81835260006001600160fb1b0383111561270c57600080fd5b8260051b8083602087013760009401602001938452509192915050565b60808152600061273d608083018a8c6126f3565b828103602084015261275081898b6126f3565b905082810360408401526127658187896126f3565b9050828103606084015261277a8185876126f3565b9b9a5050505050505050505050565b634e487b7160e01b600052604160045260246000fd5b600081518084526020808501945080840160005b838110156127cf578151875295820195908201906001016127b3565b509495945050505050565b6080815260006127ed608083018961279f565b82810360208401526127ff818961279f565b905082810360408401526128148187896126f3565b905082810360608401526128298185876126f3565b9998505050505050505050565b6001600160a01b038616815260806020820181905260009061285b90830186886126f3565b828103604084015261286e8185876126f3565b83810360609094019390935250506000815260200195945050505050565b60005b838110156128a757818101518382015260200161288f565b838111156106275750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516128f081601785016020880161288c565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161292181602884016020880161288c565b01602801949350505050565b602081526000825180602084015261294c81604085016020870161288c565b601f01601f19169190910160400192915050565b6000828210156129725761297261262a565b500390565b60008160001904831182151516156129915761299161262a565b500290565b6000816129a5576129a561262a565b506000190190565b6000602082840312156129bf57600080fd5b81516115ac816125c6565b634e487b7160e01b600052603160045260246000fd5b600082516129f281846020870161288c565b919091019291505056fe988301af8238f779281a300de031815cd01b48e9f1ae47a0f91ed6584213624aa26469706673582212201797ee2685db5c23ff09eaab45177c4f0b423e5805d906c27264f8c670e73dc964736f6c634300080c003300000000000000000000000087084ec881d5a15c918057f326790db177d218f200000000000000000000000055f3bc084da207b7347538b74cc388deeb3ab44800000000000000000000000033b4fe5e40e4903a0849ca97b3292eac3eb0aa360000000000000000000000007bb5178af214b8c5e714ee29d40045e37bc89d42000000000000000000000000ce15f018b083844a0b650b8000a00f227fb8cfbe000000000000000000000000628bec3f759d9a6d49829288a0e546282d284b7e

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80638ce34394116100f9578063d1c354b811610097578063da8d126911610071578063da8d1269146103f0578063e02023a114610403578063f3fef3a31461042a578063f81b78ad1461043d57600080fd5b8063d1c354b8146103b7578063d547741f146103ca578063d66cd539146103dd57600080fd5b80639536148a116100d35780639536148a14610376578063a217fddf14610389578063ba9bd42814610391578063ca15c873146103a457600080fd5b80638ce343941461033d5780639010d07c1461035057806391d148541461036357600080fd5b80632f2ff15d11610166578063551b42a811610140578063551b42a8146102d757806372fb4e71146102ec5780637651721b14610317578063882e1a281461032a57600080fd5b80632f2ff15d1461029e57806336568abe146102b157806342d6f6f7146102c457600080fd5b806301634d9e146101ae57806301ffc9a7146101c3578063168b140b146101eb578063248a9ca3146101fe57806324ac8cc21461022f5780632840c2ca1461028b575b600080fd5b6101c16101bc3660046122e6565b610450565b005b6101d66101d136600461231e565b6104b5565b60405190151581526020015b60405180910390f35b6101c16101f9366004612394565b6104e0565b61022161020c3660046123d6565b60009081526020819052604090206001015490565b6040519081526020016101e2565b61026961023d3660046123d6565b600260208190526000918252604090912080546001820154928201546003909201549092919060ff1684565b60408051948552602085019390935291830152151560608201526080016101e2565b6101c16102993660046123ef565b61062d565b6101c16102ac366004612473565b61079a565b6101c16102bf366004612473565b6107c5565b6101c16102d2366004612394565b610843565b6102216000805160206129fd83398151915281565b6006546102ff906001600160a01b031681565b6040516001600160a01b0390911681526020016101e2565b6003546102ff906001600160a01b031681565b6101c16103383660046124a3565b6108f2565b6005546102ff906001600160a01b031681565b6102ff61035e3660046124de565b611594565b6101d6610371366004612473565b6115b3565b6101c1610384366004612394565b6115dc565b610221600081565b6101c161039f3660046123ef565b6116a5565b6102216103b23660046123d6565b6118cc565b6101c16103c5366004612500565b6118e3565b6101c16103d8366004612473565b611a17565b6007546102ff906001600160a01b031681565b6008546102ff906001600160a01b031681565b6102217f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec81565b6101c161043836600461259a565b611a3d565b6004546102ff906001600160a01b031681565b6000805160206129fd8339815191526104698133611b5f565b6000838152600260205260409020829061048382826125d4565b505060405183907fc8495fe7971ceb37aaa76d46be369f8eb8b077d903717c154c0618cec4f3519e90600090a2505050565b60006001600160e01b03198216635a05180f60e01b14806104da57506104da82611bc3565b92915050565b6000805160206129fd8339815191526104f98133611b5f565b60005b82811015610627576002600085858481811061051a5761051a612614565b90506020020135815260200190815260200160002060030160009054906101000a900460ff16156002600086868581811061055757610557612614565b90506020020135815260200190815260200160002060030160006101000a81548160ff02191690831515021790555083838281811061059857610598612614565b905060200201357fa04432bc9092a95cb96adf3c62d3000f9f6b7af5c0a1439fbae35d9b773cf1c0600260008787868181106105d6576105d6612614565b90506020020135815260200190815260200160002060030160009054906101000a900460ff1660405161060d911515815260200190565b60405180910390a28061061f81612640565b9150506104fc565b50505050565b6000805160206129fd8339815191526106468133611b5f565b8382146106c05760405162461bcd60e51b815260206004820152603c60248201527f75706461746550726963653a20746f6b656e2049647320616e6420707269636560448201527f73206172726179206d757374206d6174636820696e206c656e6774680000000060648201526084015b60405180910390fd5b60005b84811015610792578383828181106106dd576106dd612614565b90506020020135600260008888858181106106fa576106fa612614565b9050602002013581526020019081526020016000206000018190555085858281811061072857610728612614565b905060200201357f945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd69683885858481811061076257610762612614565b9050602002013560405161077891815260200190565b60405180910390a28061078a81612640565b9150506106c3565b505050505050565b6000828152602081905260409020600101546107b68133611b5f565b6107c08383611bf8565b505050565b6001600160a01b03811633146108355760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106b7565b61083f8282611c1a565b5050565b6000805160206129fd83398151915261085c8133611b5f565b60005b828110156106275760006002600086868581811061087f5761087f612614565b905060200201358152602001908152602001600020600101819055508383828181106108ad576108ad612614565b905060200201357fdfdd873df6e0bceeaed28e2561412a65cfb5197f879900a9d4c72de16ab3723260405160405180910390a2806108ea81612640565b91505061085f565b600060808201356001610905848061265b565b905011156109745760405162461bcd60e51b815260206004820152603660248201527f70757263686173655472616974733a2063616e6e6f74207375626d6974206d6f6044820152753932903a3430b71037b732903330b731bc903132b0b960511b60648201526084016106b7565b61097e838061265b565b905061098d602085018561265b565b905014610a0e5760405162461bcd60e51b815260206004820152604360248201527f70757263686173655472616974733a2066616e6379206265617220616e64206160448201527f6d6f756e7420746f207370656e64206d757374206d6174636820696e206c656e6064820152620cee8d60eb1b608482015260a4016106b7565b610a18838061265b565b905060011415610c7757610a2c838061265b565b6000818110610a3d57610a3d612614565b60035460209091029290920135916001600160a01b03169050634f6ccce7610a906001610a6a888061265b565b6000818110610a7b57610a7b612614565b90506020020135611c3c90919063ffffffff16565b6040518263ffffffff1660e01b8152600401610aae91815260200190565b602060405180830381865afa158015610acb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aef91906126a5565b14610af957600080fd5b6000610b08602085018561265b565b6000818110610b1957610b19612614565b905060200201351115610c775760035433906001600160a01b0316636352211e610b43868061265b565b6000818110610b5457610b54612614565b905060200201356040518263ffffffff1660e01b8152600401610b7991815260200190565b602060405180830381865afa158015610b96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bba91906126be565b6001600160a01b031614610c445760405162461bcd60e51b8152602060048201526044602482018190527f70757263686173655472616974733a2063616c6c6572206d757374206f776e20908201527f66616e63792062656172206966207370656e64696e6720686f6e657920696e206064820152633132b0b960e11b608482015260a4016106b7565b610c51602084018461265b565b6000818110610c6257610c62612614565b9050602002013581610c7491906126db565b90505b6000610c8660a085018561265b565b905011610ceb5760405162461bcd60e51b815260206004820152602d60248201527f70757263686173655472616974733a206d75737420726571756573742061742060448201526c1b19585cdd080c481d1c985a5d609a1b60648201526084016106b7565b610cf860c084018461265b565b9050610d0760a085018561265b565b905014610d7e576040805162461bcd60e51b81526020600482015260248101919091527f70757263686173655472616974733a20747261697420746f6b656e206964732060448201527f616e6420616d6f756e7473206d757374206d6174636820696e206c656e67746860648201526084016106b7565b60005b610d8e60a085018561265b565b90508110156110565760026000610da860a087018761265b565b84818110610db857610db8612614565b602090810292909201358352508101919091526040016000206003015460ff16610e3c5760405162461bcd60e51b815260206004820152602f60248201527f70757263686173655472616974733a207472616974206973206e6f742061766160448201526e696c61626c6520666f722073616c6560881b60648201526084016106b7565b60026000610e4d60a087018761265b565b84818110610e5d57610e5d612614565b90506020020135815260200190815260200160002060020154610eeb858060c00190610e89919061265b565b84818110610e9957610e99612614565b9050602002013560026000888060a00190610eb4919061265b565b87818110610ec457610ec4612614565b90506020020135815260200190815260200160002060010154611c4890919063ffffffff16565b1115610f515760405162461bcd60e51b815260206004820152602f60248201527f70757263686173655472616974733a207265717565737420657863656564732060448201526e1cdd5c1c1b1e481bd9881d1c985a5d608a1b60648201526084016106b7565b610fc3610f6160c086018661265b565b83818110610f7157610f71612614565b9050602002013560026000878060a00190610f8c919061265b565b86818110610f9c57610f9c612614565b90506020020135815260200190815260200160002060000154611c5490919063ffffffff16565b610fcd90846126db565b9250610fdc60c085018561265b565b82818110610fec57610fec612614565b9050602002013560026000868060a00190611007919061265b565b8581811061101757611017612614565b905060200201358152602001908152602001600020600101600082825461103e91906126db565b9091555081905061104e81612640565b915050610d81565b50611064606084018461265b565b9050611073604085018561265b565b9050146110f85760405162461bcd60e51b815260206004820152604760248201527f70757263686173655472616974733a20686f6e6579206a61722069647320616e60448201527f6420616d6f756e747320746f207370656e64206d757374206d6174636820696e606482015266040d8cadccee8d60cb1b608482015260a4016106b7565b60005b611108604085018561265b565b905081101561125f5760045433906001600160a01b0316636352211e611131604088018861265b565b8581811061114157611141612614565b905060200201356040518263ffffffff1660e01b815260040161116691815260200190565b602060405180830381865afa158015611183573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a791906126be565b6001600160a01b03161461121c5760405162461bcd60e51b815260206004820152603660248201527f70757263686173655472616974733a2063616c6c6572206d757374206265206f604482015275776e6572206f6620616c6c20686f6e6579206a61727360501b60648201526084016106b7565b611229606085018561265b565b8281811061123957611239612614565b905060200201358261124b91906126db565b91508061125781612640565b9150506110fb565b508082146112d55760405162461bcd60e51b815260206004820152603f60248201527f70757263686173655472616974733a2063616c6c6572206d757374207375626d60448201527f69742074686520726571756972656420616d6f756e74206f6620686f6e65790060648201526084016106b7565b6112df838061265b565b90506001148015611314575060006112fa602085018561265b565b600081811061130b5761130b612614565b90506020020135115b156113b5576006546001600160a01b031663d17c1c9f611334858061265b565b611341602088018861265b565b61134e60408a018a61265b565b61135b60608c018c61265b565b6040518963ffffffff1660e01b815260040161137e989796959493929190612729565b600060405180830381600087803b15801561139857600080fd5b505af11580156113ac573d6000803e3d6000fd5b5050505061144c565b6006546040805160008082526020820190815281830183526001600160a01b039093169263d17c1c9f926113eb9088018861265b565b6113f860608a018a61265b565b6040518763ffffffff1660e01b8152600401611419969594939291906127da565b600060405180830381600087803b15801561143357600080fd5b505af1158015611447573d6000803e3d6000fd5b505050505b6007546001600160a01b0316631f7fdffa3361146b60a087018761265b565b61147860c089018961265b565b6040518663ffffffff1660e01b8152600401611498959493929190612836565b600060405180830381600087803b1580156114b257600080fd5b505af11580156114c6573d6000803e3d6000fd5b506114d7925085915081905061265b565b90506001141561156e576008546001600160a01b03166389a1debb6114fc858061265b565b600081811061150d5761150d612614565b90506020020135846040518363ffffffff1660e01b815260040161153b929190918252602082015260400190565b600060405180830381600087803b15801561155557600080fd5b505af1158015611569573d6000803e3d6000fd5b505050505b6080830135156107c0576005546107c0906001600160a01b031633306080870135611c60565b60008281526001602052604081206115ac9083611ccb565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000805160206129fd8339815191526115f58133611b5f565b60005b82811015610627576002600085858481811061161657611616612614565b602090810292909201358352508101919091526040016000908120818155600181018290556002810191909155600301805460ff1916905583838281811061166057611660612614565b905060200201357fac2e98f4328e4840a53a643210ab313f4c9c440b171c4ac93eccfa985fac74bf60405160405180910390a28061169d81612640565b9150506115f8565b6000805160206129fd8339815191526116be8133611b5f565b83821461173e5760405162461bcd60e51b815260206004820152604260248201527f75706461746550726963653a20746f6b656e2049647320616e64206d6178207360448201527f7570706c696573206172726179206d757374206d6174636820696e206c656e676064820152610e8d60f31b608482015260a4016106b7565b60005b84811015610792576002600087878481811061175f5761175f612614565b9050602002013581526020019081526020016000206001015484848381811061178a5761178a612614565b9050602002013510156118055760405162461bcd60e51b815260206004820152603960248201527f7570646174654d6178537570706c793a2063616e6e6f7420736574206d61782060448201527f737570706c792062656c6f77206974656d20636f756e7465720000000000000060648201526084016106b7565b83838281811061181757611817612614565b905060200201356002600088888581811061183457611834612614565b9050602002013581526020019081526020016000206002018190555085858281811061186257611862612614565b905060200201357f44ecfc706d63e347851cfd40acfa6cf2e3a41faa3e8b460210c03938e84a91ad85858481811061189c5761189c612614565b905060200201356040516118b291815260200190565b60405180910390a2806118c481612640565b915050611741565b60008181526001602052604081206104da90611cd7565b6000805160206129fd8339815191526118fc8133611b5f565b8382146119635760405162461bcd60e51b815260206004820152602f60248201527f75706461746553616c654461746142756c6b3a20617272617973206d7573742060448201526e0dac2e8c6d040d2dc40d8cadccee8d608b1b60648201526084016106b7565b60005b848110156107925783838281811061198057611980612614565b9050608002016002600088888581811061199c5761199c612614565b90506020020135815260200190815260200160002081816119bd91906125d4565b9050508585828181106119d2576119d2612614565b905060200201357fc8495fe7971ceb37aaa76d46be369f8eb8b077d903717c154c0618cec4f3519e60405160405180910390a280611a0f81612640565b915050611966565b600082815260208190526040902060010154611a338133611b5f565b6107c08383611c1a565b7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec611a688133611b5f565b600554611a7f906001600160a01b03168484611ce1565b604080516001600160a01b0385168152602081018490527f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364910160405180910390a1505050565b611ad082826115b3565b61083f576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611b063390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115ac836001600160a01b038416611d11565b611b6982826115b3565b61083f57611b81816001600160a01b03166014611d60565b611b8c836020611d60565b604051602001611b9d9291906128b8565b60408051601f198184030181529082905262461bcd60e51b82526106b79160040161292d565b60006001600160e01b03198216637965db0b60e01b14806104da57506301ffc9a760e01b6001600160e01b03198316146104da565b611c028282611ac6565b60008281526001602052604090206107c09082611b4a565b611c248282611efc565b60008281526001602052604090206107c09082611f61565b60006115ac8284612960565b60006115ac82846126db565b60006115ac8284612977565b6040516001600160a01b03808516602483015283166044820152606481018290526106279085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611f76565b60006115ac8383612048565b60006104da825490565b6040516001600160a01b0383166024820152604481018290526107c090849063a9059cbb60e01b90606401611c94565b6000818152600183016020526040812054611d58575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556104da565b5060006104da565b60606000611d6f836002612977565b611d7a9060026126db565b67ffffffffffffffff811115611d9257611d92612789565b6040519080825280601f01601f191660200182016040528015611dbc576020820181803683370190505b509050600360fc1b81600081518110611dd757611dd7612614565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611e0657611e06612614565b60200101906001600160f81b031916908160001a9053506000611e2a846002612977565b611e359060016126db565b90505b6001811115611ead576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611e6957611e69612614565b1a60f81b828281518110611e7f57611e7f612614565b60200101906001600160f81b031916908160001a90535060049490941c93611ea681612996565b9050611e38565b5083156115ac5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106b7565b611f0682826115b3565b1561083f576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115ac836001600160a01b038416612072565b6000611fcb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166121659092919063ffffffff16565b8051909150156107c05780806020019051810190611fe991906129ad565b6107c05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106b7565b600082600001828154811061205f5761205f612614565b9060005260206000200154905092915050565b6000818152600183016020526040812054801561215b576000612096600183612960565b85549091506000906120aa90600190612960565b905081811461210f5760008660000182815481106120ca576120ca612614565b90600052602060002001549050808760000184815481106120ed576120ed612614565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612120576121206129ca565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506104da565b60009150506104da565b6060612174848460008561217c565b949350505050565b6060824710156121dd5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106b7565b6001600160a01b0385163b6122345760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106b7565b600080866001600160a01b0316858760405161225091906129e0565b60006040518083038185875af1925050503d806000811461228d576040519150601f19603f3d011682016040523d82523d6000602084013e612292565b606091505b50915091506122a28282866122ad565b979650505050505050565b606083156122bc5750816115ac565b8251156122cc5782518084602001fd5b8160405162461bcd60e51b81526004016106b7919061292d565b60008082840360a08112156122fa57600080fd5b833592506080601f198201121561231057600080fd5b506020830190509250929050565b60006020828403121561233057600080fd5b81356001600160e01b0319811681146115ac57600080fd5b60008083601f84011261235a57600080fd5b50813567ffffffffffffffff81111561237257600080fd5b6020830191508360208260051b850101111561238d57600080fd5b9250929050565b600080602083850312156123a757600080fd5b823567ffffffffffffffff8111156123be57600080fd5b6123ca85828601612348565b90969095509350505050565b6000602082840312156123e857600080fd5b5035919050565b6000806000806040858703121561240557600080fd5b843567ffffffffffffffff8082111561241d57600080fd5b61242988838901612348565b9096509450602087013591508082111561244257600080fd5b5061244f87828801612348565b95989497509550505050565b6001600160a01b038116811461247057600080fd5b50565b6000806040838503121561248657600080fd5b8235915060208301356124988161245b565b809150509250929050565b6000602082840312156124b557600080fd5b813567ffffffffffffffff8111156124cc57600080fd5b820160e081850312156115ac57600080fd5b600080604083850312156124f157600080fd5b50508035926020909101359150565b6000806000806040858703121561251657600080fd5b843567ffffffffffffffff8082111561252e57600080fd5b61253a88838901612348565b9096509450602087013591508082111561255357600080fd5b818701915087601f83011261256757600080fd5b81358181111561257657600080fd5b8860208260071b850101111561258b57600080fd5b95989497505060200194505050565b600080604083850312156125ad57600080fd5b82356125b88161245b565b946020939093013593505050565b801515811461247057600080fd5b8135815560208201356001820155604082013560028201556003810160608301356125fe816125c6565b815490151560ff1660ff19919091161790555050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156126545761265461262a565b5060010190565b6000808335601e1984360301811261267257600080fd5b83018035915067ffffffffffffffff82111561268d57600080fd5b6020019150600581901b360382131561238d57600080fd5b6000602082840312156126b757600080fd5b5051919050565b6000602082840312156126d057600080fd5b81516115ac8161245b565b600082198211156126ee576126ee61262a565b500190565b81835260006001600160fb1b0383111561270c57600080fd5b8260051b8083602087013760009401602001938452509192915050565b60808152600061273d608083018a8c6126f3565b828103602084015261275081898b6126f3565b905082810360408401526127658187896126f3565b9050828103606084015261277a8185876126f3565b9b9a5050505050505050505050565b634e487b7160e01b600052604160045260246000fd5b600081518084526020808501945080840160005b838110156127cf578151875295820195908201906001016127b3565b509495945050505050565b6080815260006127ed608083018961279f565b82810360208401526127ff818961279f565b905082810360408401526128148187896126f3565b905082810360608401526128298185876126f3565b9998505050505050505050565b6001600160a01b038616815260806020820181905260009061285b90830186886126f3565b828103604084015261286e8185876126f3565b83810360609094019390935250506000815260200195945050505050565b60005b838110156128a757818101518382015260200161288f565b838111156106275750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516128f081601785016020880161288c565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161292181602884016020880161288c565b01602801949350505050565b602081526000825180602084015261294c81604085016020870161288c565b601f01601f19169190910160400192915050565b6000828210156129725761297261262a565b500390565b60008160001904831182151516156129915761299161262a565b500290565b6000816129a5576129a561262a565b506000190190565b6000602082840312156129bf57600080fd5b81516115ac816125c6565b634e487b7160e01b600052603160045260246000fd5b600082516129f281846020870161288c565b919091019291505056fe988301af8238f779281a300de031815cd01b48e9f1ae47a0f91ed6584213624aa26469706673582212201797ee2685db5c23ff09eaab45177c4f0b423e5805d906c27264f8c670e73dc964736f6c634300080c0033

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

00000000000000000000000087084ec881d5a15c918057f326790db177d218f200000000000000000000000055f3bc084da207b7347538b74cc388deeb3ab44800000000000000000000000033b4fe5e40e4903a0849ca97b3292eac3eb0aa360000000000000000000000007bb5178af214b8c5e714ee29d40045e37bc89d42000000000000000000000000ce15f018b083844a0b650b8000a00f227fb8cfbe000000000000000000000000628bec3f759d9a6d49829288a0e546282d284b7e

-----Decoded View---------------
Arg [0] : _fancyBearsContract (address): 0x87084ec881d5A15C918057F326790dB177D218F2
Arg [1] : _honeyJarsContract (address): 0x55f3bc084Da207B7347538B74cC388DEEB3AB448
Arg [2] : _honeyTokenContract (address): 0x33B4fE5e40E4903A0849cA97B3292eac3EB0aA36
Arg [3] : _honeyVestingContract (address): 0x7BB5178af214B8c5E714EE29D40045E37Bc89d42
Arg [4] : _fancyBearTraitsContract (address): 0xCE15f018b083844a0B650B8000A00F227fB8cfbe
Arg [5] : _fancyBearHoneyConsumptionContract (address): 0x628BEC3f759D9a6d49829288a0E546282d284b7E

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 00000000000000000000000087084ec881d5a15c918057f326790db177d218f2
Arg [1] : 00000000000000000000000055f3bc084da207b7347538b74cc388deeb3ab448
Arg [2] : 00000000000000000000000033b4fe5e40e4903a0849ca97b3292eac3eb0aa36
Arg [3] : 0000000000000000000000007bb5178af214b8c5e714ee29d40045e37bc89d42
Arg [4] : 000000000000000000000000ce15f018b083844a0b650b8000a00f227fb8cfbe
Arg [5] : 000000000000000000000000628bec3f759d9a6d49829288a0e546282d284b7e


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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