ETH Price: $3,258.32 (-0.78%)
Gas: 1 Gwei

Token

Helms for Loot (H4L)
 

Overview

Max Total Supply

129 H4L

Holders

52

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
raulonastool.eth
0x2531B2FF6a7f08c6Ab12c29D1b394788F819DeB1
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
HelmsForLoot

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 14 : HelmsForLoot.sol
// SPDX-License-Identifier: CC0-1.0
/// @title The Helms (for Loot) ERC-1155 token

//   _    _      _                  ____             _                 _ __
//  | |  | |    | |                / / _|           | |               | |\ \
//  | |__| | ___| |_ __ ___  ___  | | |_ ___  _ __  | |     ___   ___ | |_| |
//  |  __  |/ _ \ | '_ ` _ \/ __| | |  _/ _ \| '__| | |    / _ \ / _ \| __| |
//  | |  | |  __/ | | | | | \__ \ | | || (_) | |    | |___| (_) | (_) | |_| |
//  |_|  |_|\___|_|_| |_| |_|___/ | |_| \___/|_|    |______\___/ \___/ \__| |
//                                 \_\                                   /_/

/* Helms (for Loot) is a 3D visualisation of the Helms of Loot */

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "contracts/LootInterfaces.sol";
import "contracts/HelmsMetadata.sol";

pragma solidity ^0.8.0;

interface IERC20 {
    function balanceOf(address account) external view returns (uint256);

    function transfer(address recipient, uint256 amount)
        external
        returns (bool);
}

interface IERC2981 {
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

interface ProxyRegistry {
    function proxies(address) external view returns (address);
}

contract HelmsForLoot is ERC1155, IERC2981, Ownable {
    // Code inspired by Rings (for Loot):
    // https://github.com/w1nt3r-eth/rings-for-loot/blob/main/contracts/RingsForLoot.sol

    string public PROVENANCE = "";

    enum SaleState {
        Paused,
        Phase1, // Common helms available
        Phase2, // Epic and legendary helms available
        Phase3 // Mythic helms available
    }
    SaleState public state = SaleState.Paused;
    bool public lootOnly = true;

    // The Lootmart contract is used to calculate the token ID,
    // guaranteeing the correct supply for each helm
    ILoot private ogLootContract;
    ILmart private lmartContract;
    IRiftData private riftDataContract;
    IHelmsMetadata public metadataContract;

    // Loot-compatible contracts that we support. Users can claim a matching
    // helm if they own a token in this contract and `getHead` matches helm's name
    mapping(ILoot => bool) private lootContracts;

    // We only allow claiming one matching helm per bag. This data structure
    // holds the contract/bag ids that were already claimed
    mapping(ILoot => mapping(uint256 => bool)) public lootClaimed;
    // This data structure keeps track of the Loot bags that were minted to
    // ensure the correct max supply of each helm
    mapping(uint256 => bool) public lootMinted;

    string public name = "Helms for Loot";
    string public symbol = "H4L";

    // Flag to enable/disable Wyvern Proxy approval for gas-free Opensea listings
    bool private wyvernProxyWhitelist = true;

    // Common and Epic helms can be identified by calculating their greatness, but
    // to determine whether a helm is legendary or mythic, we use a list of ids
    // Legendary helm ids are stored as a tightly packed arrays of uint16
    bytes[5] private under19legendaryIds;
    bytes[5] private over19legendaryIds;

    // Pricing
    uint256 public lootOwnerPriceCommon = 0.02 ether;
    uint256 public publicPriceCommon = 0.05 ether;

    uint256 public lootOwnerPriceEpic = 0.04 ether;
    uint256 public publicPriceEpic = 0.07 ether;

    uint256 public lootOwnerPriceLegendary = 0.06 ether;
    uint256 public publicPriceLegendary = 0.09 ether;

    uint256 public lootOwnerPriceMythic = 0.08 ether;
    uint256 public publicPriceMythic = 0.11 ether;

    event Minted(uint256 lootId);
    event Claimed(uint256 lootId);

    constructor(
        ILoot[] memory lootsList,
        ILmart lmart,
        IRiftData riftData
    ) ERC1155("") {
        for (uint256 i = 0; i < lootsList.length; i++) {
            if (i == 0) {
                ogLootContract = lootsList[i];
            }
            lootContracts[lootsList[i]] = true;
        }
        lmartContract = lmart;
        riftDataContract = riftData;

        // List of legendary helm ids with less than 19 greatness
        // and over 19 greatness to help with rarity determination
        under19legendaryIds[1] = hex"01131028039119120f7b14d2";
        under19legendaryIds[2] = hex"0200109b0f441b04";
        under19legendaryIds[4] = hex"01400eea06fa1c29088616e60f7c12b5";
        over19legendaryIds[1] = hex"00fd148101ee0c02030a0809037013d91d501d88";
        over19legendaryIds[2] = hex"064d0a68094114340b611e45";
        over19legendaryIds[4] = hex"01a81d870b141087";
    }

    /**
     * @dev Accepts a Loot bag ID and returns the rarity level of the helm contained within that bag.
     * Rarity levels (based on the number of times each helm appears in the set of 8000 Loot bags):
     * 1 - Common Helm (>19)
     * 2 - Epic Helm (<19)
     * 3 - Legendary Helm (2)
     * 4 - Mythic Helm (1)
     */
    function helmRarity(uint256 lootId) public view returns (uint256) {
        // We use a combination of the greatness calculation from the loot contract
        // and precomputed lists of legendary and mythic helm IDs
        // to determine the helm rarity.
        uint256 rand = uint256(
            keccak256(abi.encodePacked("HEAD", Strings.toString(lootId)))
        );
        uint256 greatness = rand % 21;
        uint256 kind = rand % 15;

        // Other head armor not supported by this contract
        require(kind < 6, "HelmsForLoot: no helm in bag");

        if (greatness <= 14) {
            return (1); // Comon Helm
        } else if (greatness < 19) {
            // Check if it is in the legendary list
            if (findHelmIndex(under19legendaryIds[kind], lootId)) {
                return (3); // Legendary Helm
            }
            // Else two possible mythic helms with less than 19 greatness:
            else if (lootId == 2304 || lootId == 4557) {
                return (4); // Mythic Helm
            } else {
                return (2); // Epic Helm
            }
        } else {
            if (findHelmIndex(over19legendaryIds[kind], lootId)) {
                return (3); // Legendary helm
            } else {
                return (4); // Mythic Helm
            }
        }
    }

    /**
     * @dev Accepts an array of Loot bag IDs and mints the corresponding Helm tokens.
     */
    function purchasePublic(uint256[] memory lootIds) public payable {
        require(!lootOnly, "HelmsForLoot: Loot-only minting period is active");

        require(lootIds.length > 0, "HelmsForLoot: buy at least one");
        require(lootIds.length <= 26, "HelmsForLoot: too many at once");

        uint256[] memory tokenIds = new uint256[](lootIds.length);
        uint256 price = 0;

        for (uint256 i = 0; i < lootIds.length; i++) {
            require(!lootMinted[lootIds[i]], "HelmsForLoot: already claimed");
            // Reserve Loot IDs 7778 to 8000 for ownerClaim
            require(
                lootIds[i] > 0 && lootIds[i] < 7778,
                "HelmsForLoot: invalid Loot ID"
            );

            uint256 rarity = helmRarity(lootIds[i]);

            if (rarity == 1) {
                require(
                    state == SaleState.Phase1 ||
                        state == SaleState.Phase2 ||
                        state == SaleState.Phase3,
                    "HelmsForLoot: sale not active"
                );
                price += publicPriceCommon;
            } else if (rarity == 2) {
                require(
                    state == SaleState.Phase2 || state == SaleState.Phase3,
                    "HelmsForLoot: sale not active"
                );
                price += publicPriceEpic;
            } else if (rarity == 3) {
                require(
                    state == SaleState.Phase3,
                    "HelmsForLoot: sale not active"
                );
                price += publicPriceLegendary;
            } else {
                require(
                    state == SaleState.Phase3,
                    "HelmsForLoot: sale not active"
                );
                price += publicPriceMythic;
            }

            lootMinted[lootIds[i]] = true;
            tokenIds[i] = lmartContract.headId(lootIds[i]);
        }

        require(msg.value == price, "HelmsForLoot: wrong price");

        // We're using a loop with _mint rather than _mintBatch
        // as currently some centralised tools like Opensea
        // have issues understanding the `TransferBatch` event
        for (uint256 i = 0; i < tokenIds.length; i++) {
            _mint(msg.sender, tokenIds[i], 1, "");
            emit Minted(lootIds[i]);
        }
    }

    /**
     * @dev Allows the owner of a Loot, More Loot, or Genesis Adventurer
     * NFT to claim the Helm from a Loot bag that matches the Helm in
     * their bag. The address of the contract (Loot, More Loot, or GA)
     * needs to be provided, together with claimIds array containing
     * the IDs of the bags to be used for the claim, together with a
     * corresponding lootIds array that contains the IDs of the Loot Bags
     * with matching helms to be claimed. If claimRiftXP is set to true,
     * each bag in the claimIds array will gain 200 XP on The Rift.
     */
    function purchaseMatching(
        ILoot claimLoot,
        uint256[] memory claimIds,
        uint256[] memory lootIds,
        bool claimRiftXP
    ) public payable {
        require(
            state == SaleState.Phase1 ||
                state == SaleState.Phase2 ||
                state == SaleState.Phase3,
            "HelmsForLoot: sale not active"
        );

        require(lootContracts[claimLoot], "HelmsForLoot: not compatible");

        if (lootOnly == true) {
            require(
                claimLoot == ogLootContract,
                "HelmsForLoot: loot-only minting period is active."
            );
        }

        require(lootIds.length > 0, "HelmsForLoot: buy at least one");
        require(lootIds.length <= 26, "HelmsForLoot: too many at once");

        uint256[] memory tokenIds = new uint256[](lootIds.length);
        uint256 price = 0;

        for (uint256 i = 0; i < lootIds.length; i++) {
            // Reserve Loot IDs 7778 to 8000 for ownerClaim
            require(
                (lootIds[i] > 0 && lootIds[i] < 7778),
                "HelmsForLoot: invalid Loot ID"
            );

            require(
                claimLoot.ownerOf(claimIds[i]) == msg.sender,
                "HelmsForLoot: not owner"
            );

            require(
                keccak256(abi.encodePacked(claimLoot.getHead(claimIds[i]))) ==
                    keccak256(
                        abi.encodePacked(ogLootContract.getHead(lootIds[i]))
                    ),
                "HelmsForLoot: wrong helm"
            );

            // Both the original loot bag and matching bag
            // (loot/mloot/genesis adventurer) to be unclaimed
            require(
                !lootClaimed[claimLoot][claimIds[i]],
                "HelmsForLoot: bag already used for claim"
            );
            require(
                !lootMinted[lootIds[i]],
                "HelmsForLoot: loot bag already minted"
            );

            uint256 rarity = helmRarity(lootIds[i]);

            if (rarity == 1) {
                require(
                    state == SaleState.Phase1 ||
                        state == SaleState.Phase2 ||
                        state == SaleState.Phase3,
                    "HelmsForLoot: sale not active"
                );
                price += lootOwnerPriceCommon;
            } else if (rarity == 2) {
                require(
                    state == SaleState.Phase2 || state == SaleState.Phase3,
                    "HelmsForLoot: sale not active"
                );
                price += lootOwnerPriceEpic;
            } else if (rarity == 3) {
                require(
                    state == SaleState.Phase3,
                    "HelmsForLoot: sale not active"
                );
                price += lootOwnerPriceLegendary;
            } else {
                require(
                    state == SaleState.Phase3,
                    "HelmsForLoot: sale not active"
                );
                price += lootOwnerPriceMythic;
            }
            lootMinted[lootIds[i]] = true;
            lootClaimed[claimLoot][claimIds[i]] = true;
            tokenIds[i] = lmartContract.headId(lootIds[i]);
        }
        require(msg.value == price, "HelmsForLoot: wrong price");

        // We're using a loop with _mint rather than _mintBatch
        // as currently some centralised tools like Opensea
        // have issues understanding the `TransferBatch` event
        for (uint256 i = 0; i < tokenIds.length; i++) {
            uint256 riftId;
            // Add XP via The Rift
            if (claimRiftXP == true) {
                // Adjust ID for gLoot:
                if (claimLoot != ogLootContract && claimIds[i] < 8001) {
                    riftId = claimIds[i] + 9997460;
                } else {
                    riftId = claimIds[i];
                }
                riftDataContract.addXP(200, riftId);
            }
            _mint(msg.sender, tokenIds[i], 1, "");
            emit Claimed(lootIds[i]);
        }
    }

    function uri(uint256 tokenId) public view override returns (string memory) {
        require(
            address(metadataContract) != address(0),
            "HelmsForLoot: no metadata address"
        );
        return metadataContract.uri(tokenId);
    }

    /**
     * @dev Run a batch query to check if a set of loot, mloot or gloot IDs have been used for a claim.
     */
    function lootClaimedBatched(ILoot loot, uint256[] calldata ids)
        public
        view
        returns (bool[] memory claimed)
    {
        claimed = new bool[](ids.length);
        for (uint256 i = 0; i < ids.length; i++) {
            claimed[i] = lootClaimed[loot][ids[i]];
        }
    }

    /**
     * @dev Run a batch query to check if a set of loot bags have already been claimed.
     */
    function lootMintedBatched(uint256[] calldata ids)
        public
        view
        returns (bool[] memory minted)
    {
        minted = new bool[](ids.length);
        for (uint256 i = 0; i < ids.length; i++) {
            minted[i] = lootMinted[ids[i]];
        }
    }

    /**
     * @dev Utlity function to check a tightly packed array of uint16 for a given id.
     */
    function findHelmIndex(bytes storage data, uint256 helmId)
        internal
        view
        returns (bool found)
    {
        for (uint256 i = 0; i < data.length / 2; i++) {
            if (
                uint8(data[i * 2]) == ((helmId >> 8) & 0xFF) &&
                uint8(data[i * 2 + 1]) == (helmId & 0xFF)
            ) {
                return true;
            }
        }
        return false;
    }

    // Interfaces

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceId == type(IERC2981).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    function royaltyInfo(uint256, uint256 salePrice)
        external
        view
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        receiver = owner();
        royaltyAmount = (salePrice * 5) / 100;
    }

    function isApprovedForAll(address owner, address operator)
        public
        view
        override
        returns (bool)
    {
        // Allow easier listing for sale on OpenSea. Based on
        // https://github.com/ProjectOpenSea/opensea-creatures/blob/f7257a043e82fae8251eec2bdde37a44fee474c4/migrations/2_deploy_contracts.js#L29
        if (wyvernProxyWhitelist == true) {
            if (block.chainid == 4) {
                if (
                    ProxyRegistry(0xF57B2c51dED3A29e6891aba85459d600256Cf317)
                        .proxies(owner) == operator
                ) {
                    return true;
                }
            } else if (block.chainid == 1) {
                if (
                    ProxyRegistry(0xa5409ec958C83C3f309868babACA7c86DCB077c1)
                        .proxies(owner) == operator
                ) {
                    return true;
                }
            }
        }

        return ERC1155.isApprovedForAll(owner, operator);
    }

    // Admin
    function setProvenance(string calldata prov) public onlyOwner {
        PROVENANCE = prov;
    }

    function setState(SaleState newState, bool newlootOnly) public onlyOwner {
        state = newState;
        lootOnly = newlootOnly;
    }

    function setMetadataContract(IHelmsMetadata addr) public onlyOwner {
        metadataContract = addr;
    }

    function setWyvernProxyWhitelist(bool enabled) public onlyOwner {
        wyvernProxyWhitelist = enabled;
    }

    /**
     * @dev Allows the owner to mint a set of helms for promotional purposes and to reward contributors.
     * Loot IDs 7778->8000
     */
    function ownerClaim(uint256[] memory lootIds, address to)
        public
        payable
        onlyOwner
    {
        // We're using a loop with _mint rather than _mintBatch
        // as currently some centralised tools like Opensea
        // have issues understanding the `TransferBatch` event
        for (uint256 i = 0; i < lootIds.length; i++) {
            require(lootIds[i] > 7777 && lootIds[i] < 8001, "Token ID invalid");
            lootMinted[lootIds[i]] = true;
            uint256 tokenId = lmartContract.headId(lootIds[i]);
            _mint(to, tokenId, 1, "");
            emit Minted(lootIds[i]);
        }
    }

    /**
     * Given an erc721 bag, returns the erc1155 token ids of the helm in the bag
     * We use LootMart's bijective encoding function.
     */
    function id(uint256 lootId) public view returns (uint256 headId) {
        return lmartContract.headId(lootId);
    }

    function setPricesCommon(uint256 newlootOwnerPrice, uint256 newPublicPrice)
        public
        onlyOwner
    {
        lootOwnerPriceCommon = newlootOwnerPrice;
        publicPriceCommon = newPublicPrice;
    }

    function setPricesEpic(uint256 newlootOwnerPrice, uint256 newPublicPrice)
        public
        onlyOwner
    {
        lootOwnerPriceEpic = newlootOwnerPrice;
        publicPriceEpic = newPublicPrice;
    }

    function setPricesLegendary(
        uint256 newlootOwnerPrice,
        uint256 newPublicPrice
    ) public onlyOwner {
        lootOwnerPriceLegendary = newlootOwnerPrice;
        publicPriceLegendary = newPublicPrice;
    }

    function setPricesMythic(uint256 newlootOwnerPrice, uint256 newPublicPrice)
        public
        onlyOwner
    {
        lootOwnerPriceMythic = newlootOwnerPrice;
        publicPriceMythic = newPublicPrice;
    }

    function withdrawAll() public payable onlyOwner {
        require(payable(msg.sender).send(address(this).balance));
    }

    function withdrawAllERC20(IERC20 erc20Token) public onlyOwner {
        require(
            erc20Token.transfer(msg.sender, erc20Token.balanceOf(address(this)))
        );
    }
}

File 2 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 14 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

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

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

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

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

        address operator = _msgSender();

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

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

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

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

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

        address operator = _msgSender();

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

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

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

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

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

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

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

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

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

        return array;
    }
}

File 4 of 14 : LootInterfaces.sol
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.0;

interface ILoot {
    function ownerOf(uint256 tokenId) external view returns (address owner);

    function balanceOf(address owner) external view returns (uint256 balance);

    function tokenOfOwnerByIndex(address owner, uint256 index)
        external
        view
        returns (uint256 tokenId);

    function tokenByIndex(uint256 index) external view returns (uint256);

    function getHead(uint256 tokenId) external view returns (string memory);
}

interface ILmart {
    function headId(uint256 tokenId) external pure returns (uint256);

    function tokenName(uint256 id) external view returns (string memory);
}

interface IRiftData {
    function addXP(uint256 xp, uint256 bagId) external;
}

File 5 of 14 : HelmsMetadata.sol
// SPDX-License-Identifier: CC0-1.0
/// @title The Helms (for Loot) Metadata

import "@openzeppelin/contracts/access/Ownable.sol";
import "base64-sol/base64.sol";
import "contracts/LootInterfaces.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

pragma solidity ^0.8.0;

interface IHelmsMetadata {
    function uri(uint256 tokenId) external view returns (string memory);
}

contract HelmsMetadata is Ownable, IHelmsMetadata {
    string public description;
    string public baseUri;
    string private imageUriSuffix = ".gif";
    string private animationUriSuffix = ".glb";
    ILmart private lmartContract;

    constructor(ILmart lmart, string memory IpfsUri) Ownable() {
        description = "Helms (for Loot) is the first 3D interpretation of the helms of Loot. Adventurers, builders, and artists are encouraged to reference Helms (for Loot) to further expand on the imagination of Loot.";
        lmartContract = lmart;
        baseUri = IpfsUri;
    }

    function setDescription(string memory desc) public onlyOwner {
        description = desc;
    }

    function setbaseUri(string calldata newbaseUri) public onlyOwner {
        baseUri = newbaseUri;
    }

    function setUriSuffix(
        string calldata newImageUriSuffix,
        string calldata newAnimationUriSuffix
    ) public onlyOwner {
        imageUriSuffix = newImageUriSuffix;
        animationUriSuffix = newAnimationUriSuffix;
    }

    function uri(uint256 tokenId) public view override returns (string memory) {
        string memory name = lmartContract.tokenName(tokenId);
        bytes memory tokenUri = abi.encodePacked(
            baseUri,
            "/",
            Strings.toString(tokenId)
        );
        string memory json = Base64.encode(
            bytes(
                string(
                    abi.encodePacked(
                        '{ "name": "',
                        name,
                        '", ',
                        '"description": ',
                        '"Helms (for Loot) is the first 3D interpretation of the helms of Loot. Adventurers, builders, and artists are encouraged to reference Helms (for Loot) to further expand on the imagination of Loot.", ',
                        '"image": ',
                        '"',
                        tokenUri,
                        imageUriSuffix,
                        '", '
                        '"animation_url": ',
                        '"',
                        tokenUri,
                        animationUriSuffix,
                        '"'
                        "}"
                    )
                )
            )
        );
        return string(abi.encodePacked("data:application/json;base64,", json));
    }
}

File 6 of 14 : 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 7 of 14 : 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 8 of 14 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

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

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

File 9 of 14 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

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

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

pragma solidity ^0.8.0;

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

File 13 of 14 : base64.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides functions for encoding/decoding base64
library Base64 {
    string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
    bytes  internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000"
                                            hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
                                            hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
                                            hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";

    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return '';

        // load the table into memory
        string memory table = TABLE_ENCODE;

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((data.length + 2) / 3);

        // add some extra buffer at the end required for the writing
        string memory result = new string(encodedLen + 32);

        assembly {
            // set the actual output length
            mstore(result, encodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 3 bytes at a time
            for {} lt(dataPtr, endPtr) {}
            {
                // read 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // write 4 characters
                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(        input,  0x3F))))
                resultPtr := add(resultPtr, 1)
            }

            // padding with '='
            switch mod(mload(data), 3)
            case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
            case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
        }

        return result;
    }

    function decode(string memory _data) internal pure returns (bytes memory) {
        bytes memory data = bytes(_data);

        if (data.length == 0) return new bytes(0);
        require(data.length % 4 == 0, "invalid base64 decoder input");

        // load the table into memory
        bytes memory table = TABLE_DECODE;

        // every 4 characters represent 3 bytes
        uint256 decodedLen = (data.length / 4) * 3;

        // add some extra buffer at the end required for the writing
        bytes memory result = new bytes(decodedLen + 32);

        assembly {
            // padding with '='
            let lastBytes := mload(add(data, mload(data)))
            if eq(and(lastBytes, 0xFF), 0x3d) {
                decodedLen := sub(decodedLen, 1)
                if eq(and(lastBytes, 0xFFFF), 0x3d3d) {
                    decodedLen := sub(decodedLen, 1)
                }
            }

            // set the actual output length
            mstore(result, decodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 4 characters at a time
            for {} lt(dataPtr, endPtr) {}
            {
               // read 4 characters
               dataPtr := add(dataPtr, 4)
               let input := mload(dataPtr)

               // write 3 bytes
               let output := add(
                   add(
                       shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)),
                       shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))),
                   add(
                       shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)),
                               and(mload(add(tablePtr, and(        input , 0xFF))), 0xFF)
                    )
                )
                mstore(resultPtr, shl(232, output))
                resultPtr := add(resultPtr, 3)
            }
        }

        return result;
    }
}

File 14 of 14 : 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);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract ILoot[]","name":"lootsList","type":"address[]"},{"internalType":"contract ILmart","name":"lmart","type":"address"},{"internalType":"contract IRiftData","name":"riftData","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lootId","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lootId","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"PROVENANCE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"lootId","type":"uint256"}],"name":"helmRarity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"lootId","type":"uint256"}],"name":"id","outputs":[{"internalType":"uint256","name":"headId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ILoot","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"lootClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ILoot","name":"loot","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"lootClaimedBatched","outputs":[{"internalType":"bool[]","name":"claimed","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lootMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"lootMintedBatched","outputs":[{"internalType":"bool[]","name":"minted","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lootOnly","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lootOwnerPriceCommon","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lootOwnerPriceEpic","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lootOwnerPriceLegendary","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lootOwnerPriceMythic","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataContract","outputs":[{"internalType":"contract IHelmsMetadata","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"lootIds","type":"uint256[]"},{"internalType":"address","name":"to","type":"address"}],"name":"ownerClaim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicPriceCommon","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicPriceEpic","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicPriceLegendary","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicPriceMythic","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ILoot","name":"claimLoot","type":"address"},{"internalType":"uint256[]","name":"claimIds","type":"uint256[]"},{"internalType":"uint256[]","name":"lootIds","type":"uint256[]"},{"internalType":"bool","name":"claimRiftXP","type":"bool"}],"name":"purchaseMatching","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"lootIds","type":"uint256[]"}],"name":"purchasePublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IHelmsMetadata","name":"addr","type":"address"}],"name":"setMetadataContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newlootOwnerPrice","type":"uint256"},{"internalType":"uint256","name":"newPublicPrice","type":"uint256"}],"name":"setPricesCommon","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newlootOwnerPrice","type":"uint256"},{"internalType":"uint256","name":"newPublicPrice","type":"uint256"}],"name":"setPricesEpic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newlootOwnerPrice","type":"uint256"},{"internalType":"uint256","name":"newPublicPrice","type":"uint256"}],"name":"setPricesLegendary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newlootOwnerPrice","type":"uint256"},{"internalType":"uint256","name":"newPublicPrice","type":"uint256"}],"name":"setPricesMythic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"prov","type":"string"}],"name":"setProvenance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum HelmsForLoot.SaleState","name":"newState","type":"uint8"},{"internalType":"bool","name":"newlootOnly","type":"bool"}],"name":"setState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setWyvernProxyWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"state","outputs":[{"internalType":"enum HelmsForLoot.SaleState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"erc20Token","type":"address"}],"name":"withdrawAllERC20","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040819052600060808190526200001b91600491620003fa565b506005805461ffff191661010017905560408051808201909152600e8082526d12195b1b5cc8199bdc88131bdbdd60921b60209092019182526200006291600c91620003fa565b5060408051808201909152600380825262120d1360ea1b60209092019182526200008f91600d91620003fa565b50600e805460ff1916600117905566470de4df82000060195566b1a2bc2ec50000601a55668e1bc9bf040000601b5566f8b0a10e470000601c5566d529ae9e860000601d5567013fbe85edc90000601e5567011c37937e080000601f55670186cc6acd4b00006020553480156200010557600080fd5b5060405162004f4d38038062004f4d8339810160408190526200012891620004d3565b60408051602081019091526000815262000142816200038f565b506200014e33620003a8565b60005b8351811015620002075780620001a557838181518110620001765762000176620005cb565b6020026020010151600560026101000a8154816001600160a01b0302191690836001600160a01b031602179055505b600160096000868481518110620001c057620001c0620005cb565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580620001fe81620005e1565b91505062000151565b50600680546001600160a01b038481166001600160a01b031992831617909255600780549284169290911691909117905560408051808201909152600c8082526a89881401c88c8907bd8a6960a11b60209092019182526200026c91601091620003fa565b5060408051808201909152600880825266800426c3d106c160c21b60209092019182526200029d91601191620003fa565b506040805180820190915260108082526f01400eea06fa1c29088616e60f7c12b560801b6020909201918252620002d791601391620003fa565b506040805180820190915260148082527efd148101ee0c02030a0809037013d91d501d8800000000000000000000000060209092019182526200031d91601591620003fa565b5060408051808201909152600c8082526b064d0a68094114340b611e4560a01b60209092019182526200035391601691620003fa565b506040805180820190915260088082526701a81d870b14108760c01b60209092019182526200038591601891620003fa565b5050505062000648565b8051620003a4906002906020840190620003fa565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b82805462000408906200060b565b90600052602060002090601f0160209004810192826200042c576000855562000477565b82601f106200044757805160ff191683800117855562000477565b8280016001018555821562000477579182015b82811115620004775782518255916020019190600101906200045a565b506200048592915062000489565b5090565b5b808211156200048557600081556001016200048a565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b0381168114620004ce57600080fd5b919050565b600080600060608486031215620004e957600080fd5b83516001600160401b03808211156200050157600080fd5b818601915086601f8301126200051657600080fd5b81516020828211156200052d576200052d620004a0565b8160051b604051601f19603f83011681018181108682111715620005555762000555620004a0565b60405292835281830193508481018201928a8411156200057457600080fd5b948201945b838610156200059d576200058d86620004b6565b8552948201949382019362000579565b9750620005ae9050888201620004b6565b955050505050620005c260408501620004b6565b90509250925092565b634e487b7160e01b600052603260045260246000fd5b60006000198214156200060457634e487b7160e01b600052601160045260246000fd5b5060010190565b600181811c908216806200062057607f821691505b602082108114156200064257634e487b7160e01b600052602260045260246000fd5b50919050565b6148f580620006586000396000f3fe6080604052600436106102f15760003560e01c8063857abbd41161018f578063bb7a2f85116100e1578063e5187f431161008a578063f2fde38b11610064578063f2fde38b14610837578063f96efaf314610857578063ffe630b51461086d57600080fd5b8063e5187f43146107d7578063e985e9c5146107f7578063f242432a1461081757600080fd5b8063d0ae5d4d116100bb578063d0ae5d4d1461076a578063dab2eb4a14610797578063e42b0278146107b757600080fd5b8063bb7a2f85146106fd578063c19d93fb14610713578063c7d41c771461073a57600080fd5b806394b1ed7c11610143578063a88210f91161011d578063a88210f9146106b7578063aa1509af146106ca578063b7bfed68146106ea57600080fd5b806394b1ed7c1461066c57806395d89b4114610682578063a22cb4651461069757600080fd5b80638da5cb5b116101745780638da5cb5b146106185780638e9ed04814610636578063906596741461065657600080fd5b8063857abbd4146105d85780638bfd1f7d146105f857600080fd5b80632f53eaeb116102485780634e1273f4116101fc578063715018a6116101d6578063715018a61461059b5780637d3c40c8146105b0578063853828b6146105d057600080fd5b80634e1273f4146105395780635e2e5f27146105665780636373a6b11461058657600080fd5b80633b0369391161022d5780633b036939146104d25780633ef574bf146104e857806345b736e4146104fe57600080fd5b80632f53eaeb1461047a578063352098211461049a57600080fd5b80631445ad23116102aa57806325934ce51161028457806325934ce5146103fc5780632a55205a1461041b5780632eb2c2d61461045a57600080fd5b80631445ad23146103b057806317a2d413146103d057806317e0cef2146103e657600080fd5b806301ffc9a7116102db57806301ffc9a71461033e57806306fdde031461036e5780630e89341c1461039057600080fd5b8062fdd58e146102f6578063017acd6514610329575b600080fd5b34801561030257600080fd5b50610316610311366004613c87565b61088d565b6040519081526020015b60405180910390f35b61033c610337366004613d99565b610939565b005b34801561034a57600080fd5b5061035e610359366004613e38565b6116bd565b6040519015158152602001610320565b34801561037a57600080fd5b506103836116fb565b6040516103209190613ead565b34801561039c57600080fd5b506103836103ab366004613ec0565b611789565b3480156103bc57600080fd5b5061033c6103cb366004613ed9565b61186e565b3480156103dc57600080fd5b50610316601a5481565b3480156103f257600080fd5b5061031660205481565b34801561040857600080fd5b5060055461035e90610100900460ff1681565b34801561042757600080fd5b5061043b610436366004613ed9565b6118c1565b604080516001600160a01b039093168352602083019190915201610320565b34801561046657600080fd5b5061033c610475366004613f7f565b6118f8565b34801561048657600080fd5b5061033c610495366004613ed9565b61199a565b3480156104a657600080fd5b506008546104ba906001600160a01b031681565b6040516001600160a01b039091168152602001610320565b3480156104de57600080fd5b50610316601f5481565b3480156104f457600080fd5b5061031660195481565b34801561050a57600080fd5b5061035e610519366004613c87565b600a60209081526000928352604080842090915290825290205460ff1681565b34801561054557600080fd5b5061055961055436600461402d565b6119ed565b6040516103209190614135565b34801561057257600080fd5b5061033c610581366004613ed9565b611b2b565b34801561059257600080fd5b50610383611b7e565b3480156105a757600080fd5b5061033c611b8b565b3480156105bc57600080fd5b506103166105cb366004613ec0565b611bdf565b61033c611c75565b3480156105e457600080fd5b5061033c6105f3366004614148565b611ce1565b34801561060457600080fd5b5061033c610613366004614165565b611e4d565b34801561062457600080fd5b506003546001600160a01b03166104ba565b34801561064257600080fd5b5061033c610651366004614182565b611ea8565b34801561066257600080fd5b50610316601b5481565b34801561067857600080fd5b50610316601d5481565b34801561068e57600080fd5b50610383611f2f565b3480156106a357600080fd5b5061033c6106b23660046141bf565b611f3c565b61033c6106c53660046141dd565b611f4b565b3480156106d657600080fd5b506103166106e5366004613ec0565b6121aa565b61033c6106f8366004614224565b6122f4565b34801561070957600080fd5b50610316601c5481565b34801561071f57600080fd5b5060055461072d9060ff1681565b604051610320919061426f565b34801561074657600080fd5b5061035e610755366004613ec0565b600b6020526000908152604090205460ff1681565b34801561077657600080fd5b5061078a6107853660046142e3565b6129d3565b6040516103209190614338565b3480156107a357600080fd5b5061078a6107b236600461437e565b612aa7565b3480156107c357600080fd5b5061033c6107d2366004613ed9565b612b6d565b3480156107e357600080fd5b5061033c6107f2366004614148565b612bc0565b34801561080357600080fd5b5061035e6108123660046143c0565b612c37565b34801561082357600080fd5b5061033c6108323660046143ee565b612dde565b34801561084357600080fd5b5061033c610852366004614148565b612e79565b34801561086357600080fd5b50610316601e5481565b34801561087957600080fd5b5061033c610888366004614457565b612f46565b60006001600160a01b0383166109105760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600160055460ff16600381111561095257610952614259565b14806109745750600260055460ff16600381111561097257610972614259565b145b806109955750600360055460ff16600381111561099357610993614259565b145b6109e15760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b6001600160a01b03841660009081526009602052604090205460ff16610a495760405162461bcd60e51b815260206004820152601c60248201527f48656c6d73466f724c6f6f743a206e6f7420636f6d70617469626c65000000006044820152606401610907565b60055460ff61010090910416151560011415610ae8576005546001600160a01b03858116620100009092041614610ae85760405162461bcd60e51b815260206004820152603160248201527f48656c6d73466f724c6f6f743a206c6f6f742d6f6e6c79206d696e74696e672060448201527f706572696f64206973206163746976652e0000000000000000000000000000006064820152608401610907565b6000825111610b395760405162461bcd60e51b815260206004820152601e60248201527f48656c6d73466f724c6f6f743a20627579206174206c65617374206f6e6500006044820152606401610907565b601a82511115610b8b5760405162461bcd60e51b815260206004820152601e60248201527f48656c6d73466f724c6f6f743a20746f6f206d616e79206174206f6e636500006044820152606401610907565b6000825167ffffffffffffffff811115610ba757610ba7613cb3565b604051908082528060200260200182016040528015610bd0578160200160208202803683370190505b5090506000805b84518110156114a3576000858281518110610bf457610bf46144c9565b6020026020010151118015610c235750611e62858281518110610c1957610c196144c9565b6020026020010151105b610c6f5760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a20696e76616c6964204c6f6f742049440000006044820152606401610907565b336001600160a01b0316876001600160a01b0316636352211e888481518110610c9a57610c9a6144c9565b60200260200101516040518263ffffffff1660e01b8152600401610cc091815260200190565b60206040518083038186803b158015610cd857600080fd5b505afa158015610cec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1091906144df565b6001600160a01b031614610d665760405162461bcd60e51b815260206004820152601760248201527f48656c6d73466f724c6f6f743a206e6f74206f776e65720000000000000000006044820152606401610907565b600560029054906101000a90046001600160a01b03166001600160a01b0316639720c969868381518110610d9c57610d9c6144c9565b60200260200101516040518263ffffffff1660e01b8152600401610dc291815260200190565b60006040518083038186803b158015610dda57600080fd5b505afa158015610dee573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e1691908101906144fc565b604051602001610e26919061457e565b60405160208183030381529060405280519060200120876001600160a01b0316639720c969888481518110610e5d57610e5d6144c9565b60200260200101516040518263ffffffff1660e01b8152600401610e8391815260200190565b60006040518083038186803b158015610e9b57600080fd5b505afa158015610eaf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ed791908101906144fc565b604051602001610ee7919061457e565b6040516020818303038152906040528051906020012014610f4a5760405162461bcd60e51b815260206004820152601860248201527f48656c6d73466f724c6f6f743a2077726f6e672068656c6d00000000000000006044820152606401610907565b6001600160a01b0387166000908152600a602052604081208751909190889084908110610f7957610f796144c9565b60209081029190910181015182528101919091526040016000205460ff161561100a5760405162461bcd60e51b815260206004820152602860248201527f48656c6d73466f724c6f6f743a2062616720616c72656164792075736564206660448201527f6f7220636c61696d0000000000000000000000000000000000000000000000006064820152608401610907565b600b6000868381518110611020576110206144c9565b60209081029190910181015182528101919091526040016000205460ff16156110b15760405162461bcd60e51b815260206004820152602560248201527f48656c6d73466f724c6f6f743a206c6f6f742062616720616c7265616479206d60448201527f696e7465640000000000000000000000000000000000000000000000000000006064820152608401610907565b60006110d58683815181106110c8576110c86144c9565b60200260200101516121aa565b9050806001141561119c57600160055460ff1660038111156110f9576110f9614259565b148061111b5750600260055460ff16600381111561111957611119614259565b145b8061113c5750600360055460ff16600381111561113a5761113a614259565b145b6111885760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b60195461119590846145b0565b925061132b565b806002141561123957600260055460ff1660038111156111be576111be614259565b14806111e05750600360055460ff1660038111156111de576111de614259565b145b61122c5760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b601b5461119590846145b0565b80600314156112b557600360055460ff16600381111561125b5761125b614259565b146112a85760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b601d5461119590846145b0565b600360055460ff1660038111156112ce576112ce614259565b1461131b5760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b601f5461132890846145b0565b92505b6001600b6000888581518110611343576113436144c9565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600a60008a6001600160a01b03166001600160a01b0316815260200190815260200160002060008985815181106113ab576113ab6144c9565b6020908102919091018101518252810191909152604001600020805460ff191691151591909117905560065486516001600160a01b03909116906308dd465b908890859081106113fd576113fd6144c9565b60200260200101516040518263ffffffff1660e01b815260040161142391815260200190565b60206040518083038186803b15801561143b57600080fd5b505afa15801561144f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147391906145c8565b848381518110611485576114856144c9565b6020908102919091010152508061149b816145e1565b915050610bd7565b508034146114f35760405162461bcd60e51b815260206004820152601960248201527f48656c6d73466f724c6f6f743a2077726f6e67207072696365000000000000006044820152606401610907565b60005b82518110156116b45760006001851515141561161a576005546001600160a01b0389811662010000909204161480159061154a5750611f41878381518110611540576115406144c9565b6020026020010151105b1561157e57868281518110611561576115616144c9565b602002602001015162988c9461157791906145b0565b905061159b565b868281518110611590576115906144c9565b602002602001015190505b6007546040517f5146ea0e00000000000000000000000000000000000000000000000000000000815260c86004820152602481018390526001600160a01b0390911690635146ea0e90604401600060405180830381600087803b15801561160157600080fd5b505af1158015611615573d6000803e3d6000fd5b505050505b61164f33858481518110611630576116306144c9565b6020026020010151600160405180602001604052806000815250612f9a565b7f7a355715549cfe7c1cba26304350343fbddc4b4f72d3ce3e7c27117dd20b5cb8868381518110611682576116826144c9565b602002602001015160405161169991815260200190565b60405180910390a150806116ac816145e1565b9150506114f6565b50505050505050565b60006001600160e01b031982167f2a55205a0000000000000000000000000000000000000000000000000000000014806109335750610933826130a4565b600c8054611708906145fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611734906145fc565b80156117815780601f1061175657610100808354040283529160200191611781565b820191906000526020600020905b81548152906001019060200180831161176457829003601f168201915b505050505081565b6008546060906001600160a01b03166117ee5760405162461bcd60e51b815260206004820152602160248201527f48656c6d73466f724c6f6f743a206e6f206d65746164617461206164647265736044820152607360f81b6064820152608401610907565b6008546040516303a24d0760e21b8152600481018490526001600160a01b0390911690630e89341c9060240160006040518083038186803b15801561183257600080fd5b505afa158015611846573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261093391908101906144fc565b6003546001600160a01b031633146118b65760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b601b91909155601c55565b6000806118d66003546001600160a01b031690565b915060646118e5846005614637565b6118ef919061466c565b90509250929050565b6001600160a01b03851633148061191457506119148533612c37565b6119865760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610907565b6119938585858585613126565b5050505050565b6003546001600160a01b031633146119e25760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b601991909155601a55565b60608151835114611a665760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610907565b6000835167ffffffffffffffff811115611a8257611a82613cb3565b604051908082528060200260200182016040528015611aab578160200160208202803683370190505b50905060005b8451811015611b2357611af6858281518110611acf57611acf6144c9565b6020026020010151858381518110611ae957611ae96144c9565b602002602001015161088d565b828281518110611b0857611b086144c9565b6020908102919091010152611b1c816145e1565b9050611ab1565b509392505050565b6003546001600160a01b03163314611b735760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b601d91909155601e55565b60048054611708906145fc565b6003546001600160a01b03163314611bd35760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b611bdd6000613399565b565b6006546040517f08dd465b000000000000000000000000000000000000000000000000000000008152600481018390526000916001600160a01b0316906308dd465b9060240160206040518083038186803b158015611c3d57600080fd5b505afa158015611c51573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093391906145c8565b6003546001600160a01b03163314611cbd5760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b60405133904780156108fc02916000818181858888f19350505050611bdd57600080fd5b6003546001600160a01b03163314611d295760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0382169063a9059cbb90339083906370a082319060240160206040518083038186803b158015611d8b57600080fd5b505afa158015611d9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc391906145c8565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b158015611e0957600080fd5b505af1158015611e1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e419190614680565b611e4a57600080fd5b50565b6003546001600160a01b03163314611e955760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b600e805460ff1916911515919091179055565b6003546001600160a01b03163314611ef05760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b6005805483919060ff19166001836003811115611f0f57611f0f614259565b0217905550600580549115156101000261ff001990921691909117905550565b600d8054611708906145fc565b611f473383836133f8565b5050565b6003546001600160a01b03163314611f935760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b60005b82518110156121a557611e61838281518110611fb457611fb46144c9565b6020026020010151118015611fe35750611f41838281518110611fd957611fd96144c9565b6020026020010151105b61202f5760405162461bcd60e51b815260206004820152601060248201527f546f6b656e20494420696e76616c6964000000000000000000000000000000006044820152606401610907565b6001600b6000858481518110612047576120476144c9565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600660009054906101000a90046001600160a01b03166001600160a01b03166308dd465b8584815181106120ac576120ac6144c9565b60200260200101516040518263ffffffff1660e01b81526004016120d291815260200190565b60206040518083038186803b1580156120ea57600080fd5b505afa1580156120fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061212291906145c8565b90506121408382600160405180602001604052806000815250612f9a565b7f176b02bb2d12439ff7a20b59f402cca16c76f50508b13ef3166a600eb719354a848381518110612173576121736144c9565b602002602001015160405161218a91815260200190565b60405180910390a1508061219d816145e1565b915050611f96565b505050565b6000806121b6836134ed565b6040516020016121c6919061469d565b60408051601f198184030181529190528051602090910120905060006121ed6015836146e2565b905060006121fc600f846146e2565b90506006811061224e5760405162461bcd60e51b815260206004820152601c60248201527f48656c6d73466f724c6f6f743a206e6f2068656c6d20696e20626167000000006044820152606401610907565b600e821161226157506001949350505050565b60138210156122c357612287600f8260058110612280576122806144c9565b0186613627565b1561229757506003949350505050565b8461090014806122a85750846111cd145b156122b857506004949350505050565b506002949350505050565b6122d960148260058110612280576122806144c9565b156122e957506003949350505050565b506004949350505050565b600554610100900460ff16156123725760405162461bcd60e51b815260206004820152603060248201527f48656c6d73466f724c6f6f743a204c6f6f742d6f6e6c79206d696e74696e672060448201527f706572696f6420697320616374697665000000000000000000000000000000006064820152608401610907565b60008151116123c35760405162461bcd60e51b815260206004820152601e60248201527f48656c6d73466f724c6f6f743a20627579206174206c65617374206f6e6500006044820152606401610907565b601a815111156124155760405162461bcd60e51b815260206004820152601e60248201527f48656c6d73466f724c6f6f743a20746f6f206d616e79206174206f6e636500006044820152606401610907565b6000815167ffffffffffffffff81111561243157612431613cb3565b60405190808252806020026020018201604052801561245a578160200160208202803683370190505b5090506000805b83518110156128f757600b6000858381518110612480576124806144c9565b60209081029190910181015182528101919091526040016000205460ff16156124eb5760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a20616c726561647920636c61696d65640000006044820152606401610907565b60008482815181106124ff576124ff6144c9565b602002602001015111801561252e5750611e62848281518110612524576125246144c9565b6020026020010151105b61257a5760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a20696e76616c6964204c6f6f742049440000006044820152606401610907565b60006125918583815181106110c8576110c86144c9565b9050806001141561265857600160055460ff1660038111156125b5576125b5614259565b14806125d75750600260055460ff1660038111156125d5576125d5614259565b145b806125f85750600360055460ff1660038111156125f6576125f6614259565b145b6126445760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b601a5461265190846145b0565b92506127e7565b80600214156126f557600260055460ff16600381111561267a5761267a614259565b148061269c5750600360055460ff16600381111561269a5761269a614259565b145b6126e85760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b601c5461265190846145b0565b806003141561277157600360055460ff16600381111561271757612717614259565b146127645760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b601e5461265190846145b0565b600360055460ff16600381111561278a5761278a614259565b146127d75760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b6020546127e490846145b0565b92505b6001600b60008785815181106127ff576127ff6144c9565b6020908102919091018101518252810191909152604001600020805460ff191691151591909117905560065485516001600160a01b03909116906308dd465b90879085908110612851576128516144c9565b60200260200101516040518263ffffffff1660e01b815260040161287791815260200190565b60206040518083038186803b15801561288f57600080fd5b505afa1580156128a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128c791906145c8565b8483815181106128d9576128d96144c9565b602090810291909101015250806128ef816145e1565b915050612461565b508034146129475760405162461bcd60e51b815260206004820152601960248201527f48656c6d73466f724c6f6f743a2077726f6e67207072696365000000000000006044820152606401610907565b60005b82518110156129cd5761296933848381518110611630576116306144c9565b7f176b02bb2d12439ff7a20b59f402cca16c76f50508b13ef3166a600eb719354a84828151811061299c5761299c6144c9565b60200260200101516040516129b391815260200190565b60405180910390a1806129c5816145e1565b91505061294a565b50505050565b60608167ffffffffffffffff8111156129ee576129ee613cb3565b604051908082528060200260200182016040528015612a17578160200160208202803683370190505b50905060005b82811015611b23576001600160a01b0385166000908152600a6020526040812090858584818110612a5057612a506144c9565b90506020020135815260200190815260200160002060009054906101000a900460ff16828281518110612a8557612a856144c9565b9115156020928302919091019091015280612a9f816145e1565b915050612a1d565b60608167ffffffffffffffff811115612ac257612ac2613cb3565b604051908082528060200260200182016040528015612aeb578160200160208202803683370190505b50905060005b82811015612b6657600b6000858584818110612b0f57612b0f6144c9565b90506020020135815260200190815260200160002060009054906101000a900460ff16828281518110612b4457612b446144c9565b9115156020928302919091019091015280612b5e816145e1565b915050612af1565b5092915050565b6003546001600160a01b03163314612bb55760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b601f91909155602055565b6003546001600160a01b03163314612c085760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600e5460009060ff16151560011415612dad574660041415612cfe5760405163c455279160e01b81526001600160a01b03848116600483015283169073f57b2c51ded3a29e6891aba85459d600256cf3179063c45527919060240160206040518083038186803b158015612caa57600080fd5b505afa158015612cbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ce291906144df565b6001600160a01b03161415612cf957506001610933565b612dad565b4660011415612dad5760405163c455279160e01b81526001600160a01b03848116600483015283169073a5409ec958c83c3f309868babaca7c86dcb077c19063c45527919060240160206040518083038186803b158015612d5e57600080fd5b505afa158015612d72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d9691906144df565b6001600160a01b03161415612dad57506001610933565b6001600160a01b0380841660009081526001602090815260408083209386168352929052205460ff165b9392505050565b6001600160a01b038516331480612dfa5750612dfa8533612c37565b612e6c5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f76656400000000000000000000000000000000000000000000006064820152608401610907565b6119938585858585613739565b6003546001600160a01b03163314612ec15760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b6001600160a01b038116612f3d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610907565b611e4a81613399565b6003546001600160a01b03163314612f8e5760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b6121a560048383613bd9565b6001600160a01b038416612ffa5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610907565b336130148160008761300b886138ce565b611993886138ce565b6000848152602081815260408083206001600160a01b0389168452909152812080548592906130449084906145b0565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461199381600087878787613919565b60006001600160e01b031982167fd9b67a260000000000000000000000000000000000000000000000000000000014806130ee57506001600160e01b031982166303a24d0760e21b145b8061093357507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610933565b815183511461319d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152608401610907565b6001600160a01b0384166132015760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610907565b3360005b845181101561332b576000858281518110613222576132226144c9565b602002602001015190506000858381518110613240576132406144c9565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156132d35760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610907565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906133109084906145b0565b9250508190555050505080613324906145e1565b9050613205565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161337b9291906146f6565b60405180910390a4613391818787878787613ace565b505050505050565b600380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156134805760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610907565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60608161352d57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156135575780613541816145e1565b91506135509050600a8361466c565b9150613531565b60008167ffffffffffffffff81111561357257613572613cb3565b6040519080825280601f01601f19166020018201604052801561359c576020820181803683370190505b5090505b841561361f576135b1600183614724565b91506135be600a866146e2565b6135c99060306145b0565b60f81b8183815181106135de576135de6144c9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613618600a8661466c565b94506135a0565b949350505050565b6000805b6002848054613639906145fc565b61364492915061466c565b81101561372f5760ff600884901c168461365f836002614637565b815461366a906145fc565b8110613678576136786144c9565b8154600116156136975790600052602060002090602091828204019190065b9054600160f81b911a0260f81c14801561370e575060ff8316846136bc836002614637565b6136c79060016145b0565b81546136d2906145fc565b81106136e0576136e06144c9565b8154600116156136ff5790600052602060002090602091828204019190065b9054600160f81b911a0260f81c145b1561371d576001915050610933565b80613727816145e1565b91505061362b565b5060009392505050565b6001600160a01b03841661379d5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610907565b336137ad81878761300b886138ce565b6000848152602081815260408083206001600160a01b038a168452909152902054838110156138315760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610907565b6000858152602081815260408083206001600160a01b038b811685529252808320878503905590881682528120805486929061386e9084906145b0565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46116b4828888888888613919565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613908576139086144c9565b602090810291909101015292915050565b6001600160a01b0384163b156133915760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061395d908990899088908890889060040161473b565b602060405180830381600087803b15801561397757600080fd5b505af19250505080156139a7575060408051601f3d908101601f191682019092526139a49181019061477e565b60015b613a5d576139b361479b565b806308c379a014156139ed57506139c86147b7565b806139d357506139ef565b8060405162461bcd60e51b81526004016109079190613ead565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610907565b6001600160e01b0319811663f23a6e6160e01b146116b45760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610907565b6001600160a01b0384163b156133915760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613b129089908990889088908890600401614841565b602060405180830381600087803b158015613b2c57600080fd5b505af1925050508015613b5c575060408051601f3d908101601f19168201909252613b599181019061477e565b60015b613b68576139b361479b565b6001600160e01b0319811663bc197c8160e01b146116b45760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610907565b828054613be5906145fc565b90600052602060002090601f016020900481019282613c075760008555613c4d565b82601f10613c205782800160ff19823516178555613c4d565b82800160010185558215613c4d579182015b82811115613c4d578235825591602001919060010190613c32565b50613c59929150613c5d565b5090565b5b80821115613c595760008155600101613c5e565b6001600160a01b0381168114611e4a57600080fd5b60008060408385031215613c9a57600080fd5b8235613ca581613c72565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715613cef57613cef613cb3565b6040525050565b600067ffffffffffffffff821115613d1057613d10613cb3565b5060051b60200190565b600082601f830112613d2b57600080fd5b81356020613d3882613cf6565b604051613d458282613cc9565b83815260059390931b8501820192828101915086841115613d6557600080fd5b8286015b84811015613d805780358352918301918301613d69565b509695505050505050565b8015158114611e4a57600080fd5b60008060008060808587031215613daf57600080fd5b8435613dba81613c72565b9350602085013567ffffffffffffffff80821115613dd757600080fd5b613de388838901613d1a565b94506040870135915080821115613df957600080fd5b50613e0687828801613d1a565b9250506060850135613e1781613d8b565b939692955090935050565b6001600160e01b031981168114611e4a57600080fd5b600060208284031215613e4a57600080fd5b8135612dd781613e22565b60005b83811015613e70578181015183820152602001613e58565b838111156129cd5750506000910152565b60008151808452613e99816020860160208601613e55565b601f01601f19169290920160200192915050565b602081526000612dd76020830184613e81565b600060208284031215613ed257600080fd5b5035919050565b60008060408385031215613eec57600080fd5b50508035926020909101359150565b600067ffffffffffffffff821115613f1557613f15613cb3565b50601f01601f191660200190565b600082601f830112613f3457600080fd5b8135613f3f81613efb565b604051613f4c8282613cc9565b828152856020848701011115613f6157600080fd5b82602086016020830137600092810160200192909252509392505050565b600080600080600060a08688031215613f9757600080fd5b8535613fa281613c72565b94506020860135613fb281613c72565b9350604086013567ffffffffffffffff80821115613fcf57600080fd5b613fdb89838a01613d1a565b94506060880135915080821115613ff157600080fd5b613ffd89838a01613d1a565b9350608088013591508082111561401357600080fd5b5061402088828901613f23565b9150509295509295909350565b6000806040838503121561404057600080fd5b823567ffffffffffffffff8082111561405857600080fd5b818501915085601f83011261406c57600080fd5b8135602061407982613cf6565b6040516140868282613cc9565b83815260059390931b85018201928281019150898411156140a657600080fd5b948201945b838610156140cd5785356140be81613c72565b825294820194908201906140ab565b965050860135925050808211156140e357600080fd5b506140f085828601613d1a565b9150509250929050565b600081518084526020808501945080840160005b8381101561412a5781518752958201959082019060010161410e565b509495945050505050565b602081526000612dd760208301846140fa565b60006020828403121561415a57600080fd5b8135612dd781613c72565b60006020828403121561417757600080fd5b8135612dd781613d8b565b6000806040838503121561419557600080fd5b8235600481106141a457600080fd5b915060208301356141b481613d8b565b809150509250929050565b600080604083850312156141d257600080fd5b82356141a481613c72565b600080604083850312156141f057600080fd5b823567ffffffffffffffff81111561420757600080fd5b61421385828601613d1a565b92505060208301356141b481613c72565b60006020828403121561423657600080fd5b813567ffffffffffffffff81111561424d57600080fd5b61361f84828501613d1a565b634e487b7160e01b600052602160045260246000fd5b602081016004831061429157634e487b7160e01b600052602160045260246000fd5b91905290565b60008083601f8401126142a957600080fd5b50813567ffffffffffffffff8111156142c157600080fd5b6020830191508360208260051b85010111156142dc57600080fd5b9250929050565b6000806000604084860312156142f857600080fd5b833561430381613c72565b9250602084013567ffffffffffffffff81111561431f57600080fd5b61432b86828701614297565b9497909650939450505050565b6020808252825182820181905260009190848201906040850190845b81811015614372578351151583529284019291840191600101614354565b50909695505050505050565b6000806020838503121561439157600080fd5b823567ffffffffffffffff8111156143a857600080fd5b6143b485828601614297565b90969095509350505050565b600080604083850312156143d357600080fd5b82356143de81613c72565b915060208301356141b481613c72565b600080600080600060a0868803121561440657600080fd5b853561441181613c72565b9450602086013561442181613c72565b93506040860135925060608601359150608086013567ffffffffffffffff81111561444b57600080fd5b61402088828901613f23565b6000806020838503121561446a57600080fd5b823567ffffffffffffffff8082111561448257600080fd5b818501915085601f83011261449657600080fd5b8135818111156144a557600080fd5b8660208285010111156144b757600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156144f157600080fd5b8151612dd781613c72565b60006020828403121561450e57600080fd5b815167ffffffffffffffff81111561452557600080fd5b8201601f8101841361453657600080fd5b805161454181613efb565b60405161454e8282613cc9565b82815286602084860101111561456357600080fd5b614574836020830160208701613e55565b9695505050505050565b60008251614590818460208701613e55565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b600082198211156145c3576145c361459a565b500190565b6000602082840312156145da57600080fd5b5051919050565b60006000198214156145f5576145f561459a565b5060010190565b600181811c9082168061461057607f821691505b6020821081141561463157634e487b7160e01b600052602260045260246000fd5b50919050565b60008160001904831182151516156146515761465161459a565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261467b5761467b614656565b500490565b60006020828403121561469257600080fd5b8151612dd781613d8b565b7f48454144000000000000000000000000000000000000000000000000000000008152600082516146d5816004850160208701613e55565b9190910160040192915050565b6000826146f1576146f1614656565b500690565b60408152600061470960408301856140fa565b828103602084015261471b81856140fa565b95945050505050565b6000828210156147365761473661459a565b500390565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a0608083015261477360a0830184613e81565b979650505050505050565b60006020828403121561479057600080fd5b8151612dd781613e22565b600060033d11156147b45760046000803e5060005160e01c5b90565b600060443d10156147c55790565b6040516003193d81016004833e81513d67ffffffffffffffff81602484011181841117156147f557505050505090565b828501915081518181111561480d5750505050505090565b843d87010160208285010111156148275750505050505090565b61483660208286010187613cc9565b509095945050505050565b60006001600160a01b03808816835280871660208401525060a0604083015261486d60a08301866140fa565b828103606084015261487f81866140fa565b905082810360808401526148938185613e81565b9897505050505050505056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212207dbab0de5f4f1326cba2c9a6d12af56907e94c06887f90b28813c63fa70676c964736f6c6343000809003300000000000000000000000000000000000000000000000000000000000000600000000000000000000000008d9da67e30c89f9a453dcdb67ca9a7f76e735598000000000000000000000000632678bba8a4dd16255f164e9d74853bea9856e70000000000000000000000000000000000000000000000000000000000000003000000000000000000000000ff9c1b15b16263c61d017ee9f65c50e4ae0113d70000000000000000000000001dfe7ca09e99d10835bf73044a23b73fc20623df0000000000000000000000008db687aceb92c66f013e1d614137238cc698fedb

Deployed Bytecode

0x6080604052600436106102f15760003560e01c8063857abbd41161018f578063bb7a2f85116100e1578063e5187f431161008a578063f2fde38b11610064578063f2fde38b14610837578063f96efaf314610857578063ffe630b51461086d57600080fd5b8063e5187f43146107d7578063e985e9c5146107f7578063f242432a1461081757600080fd5b8063d0ae5d4d116100bb578063d0ae5d4d1461076a578063dab2eb4a14610797578063e42b0278146107b757600080fd5b8063bb7a2f85146106fd578063c19d93fb14610713578063c7d41c771461073a57600080fd5b806394b1ed7c11610143578063a88210f91161011d578063a88210f9146106b7578063aa1509af146106ca578063b7bfed68146106ea57600080fd5b806394b1ed7c1461066c57806395d89b4114610682578063a22cb4651461069757600080fd5b80638da5cb5b116101745780638da5cb5b146106185780638e9ed04814610636578063906596741461065657600080fd5b8063857abbd4146105d85780638bfd1f7d146105f857600080fd5b80632f53eaeb116102485780634e1273f4116101fc578063715018a6116101d6578063715018a61461059b5780637d3c40c8146105b0578063853828b6146105d057600080fd5b80634e1273f4146105395780635e2e5f27146105665780636373a6b11461058657600080fd5b80633b0369391161022d5780633b036939146104d25780633ef574bf146104e857806345b736e4146104fe57600080fd5b80632f53eaeb1461047a578063352098211461049a57600080fd5b80631445ad23116102aa57806325934ce51161028457806325934ce5146103fc5780632a55205a1461041b5780632eb2c2d61461045a57600080fd5b80631445ad23146103b057806317a2d413146103d057806317e0cef2146103e657600080fd5b806301ffc9a7116102db57806301ffc9a71461033e57806306fdde031461036e5780630e89341c1461039057600080fd5b8062fdd58e146102f6578063017acd6514610329575b600080fd5b34801561030257600080fd5b50610316610311366004613c87565b61088d565b6040519081526020015b60405180910390f35b61033c610337366004613d99565b610939565b005b34801561034a57600080fd5b5061035e610359366004613e38565b6116bd565b6040519015158152602001610320565b34801561037a57600080fd5b506103836116fb565b6040516103209190613ead565b34801561039c57600080fd5b506103836103ab366004613ec0565b611789565b3480156103bc57600080fd5b5061033c6103cb366004613ed9565b61186e565b3480156103dc57600080fd5b50610316601a5481565b3480156103f257600080fd5b5061031660205481565b34801561040857600080fd5b5060055461035e90610100900460ff1681565b34801561042757600080fd5b5061043b610436366004613ed9565b6118c1565b604080516001600160a01b039093168352602083019190915201610320565b34801561046657600080fd5b5061033c610475366004613f7f565b6118f8565b34801561048657600080fd5b5061033c610495366004613ed9565b61199a565b3480156104a657600080fd5b506008546104ba906001600160a01b031681565b6040516001600160a01b039091168152602001610320565b3480156104de57600080fd5b50610316601f5481565b3480156104f457600080fd5b5061031660195481565b34801561050a57600080fd5b5061035e610519366004613c87565b600a60209081526000928352604080842090915290825290205460ff1681565b34801561054557600080fd5b5061055961055436600461402d565b6119ed565b6040516103209190614135565b34801561057257600080fd5b5061033c610581366004613ed9565b611b2b565b34801561059257600080fd5b50610383611b7e565b3480156105a757600080fd5b5061033c611b8b565b3480156105bc57600080fd5b506103166105cb366004613ec0565b611bdf565b61033c611c75565b3480156105e457600080fd5b5061033c6105f3366004614148565b611ce1565b34801561060457600080fd5b5061033c610613366004614165565b611e4d565b34801561062457600080fd5b506003546001600160a01b03166104ba565b34801561064257600080fd5b5061033c610651366004614182565b611ea8565b34801561066257600080fd5b50610316601b5481565b34801561067857600080fd5b50610316601d5481565b34801561068e57600080fd5b50610383611f2f565b3480156106a357600080fd5b5061033c6106b23660046141bf565b611f3c565b61033c6106c53660046141dd565b611f4b565b3480156106d657600080fd5b506103166106e5366004613ec0565b6121aa565b61033c6106f8366004614224565b6122f4565b34801561070957600080fd5b50610316601c5481565b34801561071f57600080fd5b5060055461072d9060ff1681565b604051610320919061426f565b34801561074657600080fd5b5061035e610755366004613ec0565b600b6020526000908152604090205460ff1681565b34801561077657600080fd5b5061078a6107853660046142e3565b6129d3565b6040516103209190614338565b3480156107a357600080fd5b5061078a6107b236600461437e565b612aa7565b3480156107c357600080fd5b5061033c6107d2366004613ed9565b612b6d565b3480156107e357600080fd5b5061033c6107f2366004614148565b612bc0565b34801561080357600080fd5b5061035e6108123660046143c0565b612c37565b34801561082357600080fd5b5061033c6108323660046143ee565b612dde565b34801561084357600080fd5b5061033c610852366004614148565b612e79565b34801561086357600080fd5b50610316601e5481565b34801561087957600080fd5b5061033c610888366004614457565b612f46565b60006001600160a01b0383166109105760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600160055460ff16600381111561095257610952614259565b14806109745750600260055460ff16600381111561097257610972614259565b145b806109955750600360055460ff16600381111561099357610993614259565b145b6109e15760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b6001600160a01b03841660009081526009602052604090205460ff16610a495760405162461bcd60e51b815260206004820152601c60248201527f48656c6d73466f724c6f6f743a206e6f7420636f6d70617469626c65000000006044820152606401610907565b60055460ff61010090910416151560011415610ae8576005546001600160a01b03858116620100009092041614610ae85760405162461bcd60e51b815260206004820152603160248201527f48656c6d73466f724c6f6f743a206c6f6f742d6f6e6c79206d696e74696e672060448201527f706572696f64206973206163746976652e0000000000000000000000000000006064820152608401610907565b6000825111610b395760405162461bcd60e51b815260206004820152601e60248201527f48656c6d73466f724c6f6f743a20627579206174206c65617374206f6e6500006044820152606401610907565b601a82511115610b8b5760405162461bcd60e51b815260206004820152601e60248201527f48656c6d73466f724c6f6f743a20746f6f206d616e79206174206f6e636500006044820152606401610907565b6000825167ffffffffffffffff811115610ba757610ba7613cb3565b604051908082528060200260200182016040528015610bd0578160200160208202803683370190505b5090506000805b84518110156114a3576000858281518110610bf457610bf46144c9565b6020026020010151118015610c235750611e62858281518110610c1957610c196144c9565b6020026020010151105b610c6f5760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a20696e76616c6964204c6f6f742049440000006044820152606401610907565b336001600160a01b0316876001600160a01b0316636352211e888481518110610c9a57610c9a6144c9565b60200260200101516040518263ffffffff1660e01b8152600401610cc091815260200190565b60206040518083038186803b158015610cd857600080fd5b505afa158015610cec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1091906144df565b6001600160a01b031614610d665760405162461bcd60e51b815260206004820152601760248201527f48656c6d73466f724c6f6f743a206e6f74206f776e65720000000000000000006044820152606401610907565b600560029054906101000a90046001600160a01b03166001600160a01b0316639720c969868381518110610d9c57610d9c6144c9565b60200260200101516040518263ffffffff1660e01b8152600401610dc291815260200190565b60006040518083038186803b158015610dda57600080fd5b505afa158015610dee573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e1691908101906144fc565b604051602001610e26919061457e565b60405160208183030381529060405280519060200120876001600160a01b0316639720c969888481518110610e5d57610e5d6144c9565b60200260200101516040518263ffffffff1660e01b8152600401610e8391815260200190565b60006040518083038186803b158015610e9b57600080fd5b505afa158015610eaf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ed791908101906144fc565b604051602001610ee7919061457e565b6040516020818303038152906040528051906020012014610f4a5760405162461bcd60e51b815260206004820152601860248201527f48656c6d73466f724c6f6f743a2077726f6e672068656c6d00000000000000006044820152606401610907565b6001600160a01b0387166000908152600a602052604081208751909190889084908110610f7957610f796144c9565b60209081029190910181015182528101919091526040016000205460ff161561100a5760405162461bcd60e51b815260206004820152602860248201527f48656c6d73466f724c6f6f743a2062616720616c72656164792075736564206660448201527f6f7220636c61696d0000000000000000000000000000000000000000000000006064820152608401610907565b600b6000868381518110611020576110206144c9565b60209081029190910181015182528101919091526040016000205460ff16156110b15760405162461bcd60e51b815260206004820152602560248201527f48656c6d73466f724c6f6f743a206c6f6f742062616720616c7265616479206d60448201527f696e7465640000000000000000000000000000000000000000000000000000006064820152608401610907565b60006110d58683815181106110c8576110c86144c9565b60200260200101516121aa565b9050806001141561119c57600160055460ff1660038111156110f9576110f9614259565b148061111b5750600260055460ff16600381111561111957611119614259565b145b8061113c5750600360055460ff16600381111561113a5761113a614259565b145b6111885760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b60195461119590846145b0565b925061132b565b806002141561123957600260055460ff1660038111156111be576111be614259565b14806111e05750600360055460ff1660038111156111de576111de614259565b145b61122c5760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b601b5461119590846145b0565b80600314156112b557600360055460ff16600381111561125b5761125b614259565b146112a85760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b601d5461119590846145b0565b600360055460ff1660038111156112ce576112ce614259565b1461131b5760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b601f5461132890846145b0565b92505b6001600b6000888581518110611343576113436144c9565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600a60008a6001600160a01b03166001600160a01b0316815260200190815260200160002060008985815181106113ab576113ab6144c9565b6020908102919091018101518252810191909152604001600020805460ff191691151591909117905560065486516001600160a01b03909116906308dd465b908890859081106113fd576113fd6144c9565b60200260200101516040518263ffffffff1660e01b815260040161142391815260200190565b60206040518083038186803b15801561143b57600080fd5b505afa15801561144f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147391906145c8565b848381518110611485576114856144c9565b6020908102919091010152508061149b816145e1565b915050610bd7565b508034146114f35760405162461bcd60e51b815260206004820152601960248201527f48656c6d73466f724c6f6f743a2077726f6e67207072696365000000000000006044820152606401610907565b60005b82518110156116b45760006001851515141561161a576005546001600160a01b0389811662010000909204161480159061154a5750611f41878381518110611540576115406144c9565b6020026020010151105b1561157e57868281518110611561576115616144c9565b602002602001015162988c9461157791906145b0565b905061159b565b868281518110611590576115906144c9565b602002602001015190505b6007546040517f5146ea0e00000000000000000000000000000000000000000000000000000000815260c86004820152602481018390526001600160a01b0390911690635146ea0e90604401600060405180830381600087803b15801561160157600080fd5b505af1158015611615573d6000803e3d6000fd5b505050505b61164f33858481518110611630576116306144c9565b6020026020010151600160405180602001604052806000815250612f9a565b7f7a355715549cfe7c1cba26304350343fbddc4b4f72d3ce3e7c27117dd20b5cb8868381518110611682576116826144c9565b602002602001015160405161169991815260200190565b60405180910390a150806116ac816145e1565b9150506114f6565b50505050505050565b60006001600160e01b031982167f2a55205a0000000000000000000000000000000000000000000000000000000014806109335750610933826130a4565b600c8054611708906145fc565b80601f0160208091040260200160405190810160405280929190818152602001828054611734906145fc565b80156117815780601f1061175657610100808354040283529160200191611781565b820191906000526020600020905b81548152906001019060200180831161176457829003601f168201915b505050505081565b6008546060906001600160a01b03166117ee5760405162461bcd60e51b815260206004820152602160248201527f48656c6d73466f724c6f6f743a206e6f206d65746164617461206164647265736044820152607360f81b6064820152608401610907565b6008546040516303a24d0760e21b8152600481018490526001600160a01b0390911690630e89341c9060240160006040518083038186803b15801561183257600080fd5b505afa158015611846573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261093391908101906144fc565b6003546001600160a01b031633146118b65760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b601b91909155601c55565b6000806118d66003546001600160a01b031690565b915060646118e5846005614637565b6118ef919061466c565b90509250929050565b6001600160a01b03851633148061191457506119148533612c37565b6119865760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610907565b6119938585858585613126565b5050505050565b6003546001600160a01b031633146119e25760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b601991909155601a55565b60608151835114611a665760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610907565b6000835167ffffffffffffffff811115611a8257611a82613cb3565b604051908082528060200260200182016040528015611aab578160200160208202803683370190505b50905060005b8451811015611b2357611af6858281518110611acf57611acf6144c9565b6020026020010151858381518110611ae957611ae96144c9565b602002602001015161088d565b828281518110611b0857611b086144c9565b6020908102919091010152611b1c816145e1565b9050611ab1565b509392505050565b6003546001600160a01b03163314611b735760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b601d91909155601e55565b60048054611708906145fc565b6003546001600160a01b03163314611bd35760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b611bdd6000613399565b565b6006546040517f08dd465b000000000000000000000000000000000000000000000000000000008152600481018390526000916001600160a01b0316906308dd465b9060240160206040518083038186803b158015611c3d57600080fd5b505afa158015611c51573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093391906145c8565b6003546001600160a01b03163314611cbd5760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b60405133904780156108fc02916000818181858888f19350505050611bdd57600080fd5b6003546001600160a01b03163314611d295760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0382169063a9059cbb90339083906370a082319060240160206040518083038186803b158015611d8b57600080fd5b505afa158015611d9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc391906145c8565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b158015611e0957600080fd5b505af1158015611e1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e419190614680565b611e4a57600080fd5b50565b6003546001600160a01b03163314611e955760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b600e805460ff1916911515919091179055565b6003546001600160a01b03163314611ef05760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b6005805483919060ff19166001836003811115611f0f57611f0f614259565b0217905550600580549115156101000261ff001990921691909117905550565b600d8054611708906145fc565b611f473383836133f8565b5050565b6003546001600160a01b03163314611f935760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b60005b82518110156121a557611e61838281518110611fb457611fb46144c9565b6020026020010151118015611fe35750611f41838281518110611fd957611fd96144c9565b6020026020010151105b61202f5760405162461bcd60e51b815260206004820152601060248201527f546f6b656e20494420696e76616c6964000000000000000000000000000000006044820152606401610907565b6001600b6000858481518110612047576120476144c9565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600660009054906101000a90046001600160a01b03166001600160a01b03166308dd465b8584815181106120ac576120ac6144c9565b60200260200101516040518263ffffffff1660e01b81526004016120d291815260200190565b60206040518083038186803b1580156120ea57600080fd5b505afa1580156120fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061212291906145c8565b90506121408382600160405180602001604052806000815250612f9a565b7f176b02bb2d12439ff7a20b59f402cca16c76f50508b13ef3166a600eb719354a848381518110612173576121736144c9565b602002602001015160405161218a91815260200190565b60405180910390a1508061219d816145e1565b915050611f96565b505050565b6000806121b6836134ed565b6040516020016121c6919061469d565b60408051601f198184030181529190528051602090910120905060006121ed6015836146e2565b905060006121fc600f846146e2565b90506006811061224e5760405162461bcd60e51b815260206004820152601c60248201527f48656c6d73466f724c6f6f743a206e6f2068656c6d20696e20626167000000006044820152606401610907565b600e821161226157506001949350505050565b60138210156122c357612287600f8260058110612280576122806144c9565b0186613627565b1561229757506003949350505050565b8461090014806122a85750846111cd145b156122b857506004949350505050565b506002949350505050565b6122d960148260058110612280576122806144c9565b156122e957506003949350505050565b506004949350505050565b600554610100900460ff16156123725760405162461bcd60e51b815260206004820152603060248201527f48656c6d73466f724c6f6f743a204c6f6f742d6f6e6c79206d696e74696e672060448201527f706572696f6420697320616374697665000000000000000000000000000000006064820152608401610907565b60008151116123c35760405162461bcd60e51b815260206004820152601e60248201527f48656c6d73466f724c6f6f743a20627579206174206c65617374206f6e6500006044820152606401610907565b601a815111156124155760405162461bcd60e51b815260206004820152601e60248201527f48656c6d73466f724c6f6f743a20746f6f206d616e79206174206f6e636500006044820152606401610907565b6000815167ffffffffffffffff81111561243157612431613cb3565b60405190808252806020026020018201604052801561245a578160200160208202803683370190505b5090506000805b83518110156128f757600b6000858381518110612480576124806144c9565b60209081029190910181015182528101919091526040016000205460ff16156124eb5760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a20616c726561647920636c61696d65640000006044820152606401610907565b60008482815181106124ff576124ff6144c9565b602002602001015111801561252e5750611e62848281518110612524576125246144c9565b6020026020010151105b61257a5760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a20696e76616c6964204c6f6f742049440000006044820152606401610907565b60006125918583815181106110c8576110c86144c9565b9050806001141561265857600160055460ff1660038111156125b5576125b5614259565b14806125d75750600260055460ff1660038111156125d5576125d5614259565b145b806125f85750600360055460ff1660038111156125f6576125f6614259565b145b6126445760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b601a5461265190846145b0565b92506127e7565b80600214156126f557600260055460ff16600381111561267a5761267a614259565b148061269c5750600360055460ff16600381111561269a5761269a614259565b145b6126e85760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b601c5461265190846145b0565b806003141561277157600360055460ff16600381111561271757612717614259565b146127645760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b601e5461265190846145b0565b600360055460ff16600381111561278a5761278a614259565b146127d75760405162461bcd60e51b815260206004820152601d60248201527f48656c6d73466f724c6f6f743a2073616c65206e6f74206163746976650000006044820152606401610907565b6020546127e490846145b0565b92505b6001600b60008785815181106127ff576127ff6144c9565b6020908102919091018101518252810191909152604001600020805460ff191691151591909117905560065485516001600160a01b03909116906308dd465b90879085908110612851576128516144c9565b60200260200101516040518263ffffffff1660e01b815260040161287791815260200190565b60206040518083038186803b15801561288f57600080fd5b505afa1580156128a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128c791906145c8565b8483815181106128d9576128d96144c9565b602090810291909101015250806128ef816145e1565b915050612461565b508034146129475760405162461bcd60e51b815260206004820152601960248201527f48656c6d73466f724c6f6f743a2077726f6e67207072696365000000000000006044820152606401610907565b60005b82518110156129cd5761296933848381518110611630576116306144c9565b7f176b02bb2d12439ff7a20b59f402cca16c76f50508b13ef3166a600eb719354a84828151811061299c5761299c6144c9565b60200260200101516040516129b391815260200190565b60405180910390a1806129c5816145e1565b91505061294a565b50505050565b60608167ffffffffffffffff8111156129ee576129ee613cb3565b604051908082528060200260200182016040528015612a17578160200160208202803683370190505b50905060005b82811015611b23576001600160a01b0385166000908152600a6020526040812090858584818110612a5057612a506144c9565b90506020020135815260200190815260200160002060009054906101000a900460ff16828281518110612a8557612a856144c9565b9115156020928302919091019091015280612a9f816145e1565b915050612a1d565b60608167ffffffffffffffff811115612ac257612ac2613cb3565b604051908082528060200260200182016040528015612aeb578160200160208202803683370190505b50905060005b82811015612b6657600b6000858584818110612b0f57612b0f6144c9565b90506020020135815260200190815260200160002060009054906101000a900460ff16828281518110612b4457612b446144c9565b9115156020928302919091019091015280612b5e816145e1565b915050612af1565b5092915050565b6003546001600160a01b03163314612bb55760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b601f91909155602055565b6003546001600160a01b03163314612c085760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600e5460009060ff16151560011415612dad574660041415612cfe5760405163c455279160e01b81526001600160a01b03848116600483015283169073f57b2c51ded3a29e6891aba85459d600256cf3179063c45527919060240160206040518083038186803b158015612caa57600080fd5b505afa158015612cbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ce291906144df565b6001600160a01b03161415612cf957506001610933565b612dad565b4660011415612dad5760405163c455279160e01b81526001600160a01b03848116600483015283169073a5409ec958c83c3f309868babaca7c86dcb077c19063c45527919060240160206040518083038186803b158015612d5e57600080fd5b505afa158015612d72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d9691906144df565b6001600160a01b03161415612dad57506001610933565b6001600160a01b0380841660009081526001602090815260408083209386168352929052205460ff165b9392505050565b6001600160a01b038516331480612dfa5750612dfa8533612c37565b612e6c5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f76656400000000000000000000000000000000000000000000006064820152608401610907565b6119938585858585613739565b6003546001600160a01b03163314612ec15760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b6001600160a01b038116612f3d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610907565b611e4a81613399565b6003546001600160a01b03163314612f8e5760405162461bcd60e51b815260206004820181905260248201526000805160206148a08339815191526044820152606401610907565b6121a560048383613bd9565b6001600160a01b038416612ffa5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610907565b336130148160008761300b886138ce565b611993886138ce565b6000848152602081815260408083206001600160a01b0389168452909152812080548592906130449084906145b0565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461199381600087878787613919565b60006001600160e01b031982167fd9b67a260000000000000000000000000000000000000000000000000000000014806130ee57506001600160e01b031982166303a24d0760e21b145b8061093357507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610933565b815183511461319d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152608401610907565b6001600160a01b0384166132015760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610907565b3360005b845181101561332b576000858281518110613222576132226144c9565b602002602001015190506000858381518110613240576132406144c9565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156132d35760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610907565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906133109084906145b0565b9250508190555050505080613324906145e1565b9050613205565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161337b9291906146f6565b60405180910390a4613391818787878787613ace565b505050505050565b600380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156134805760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610907565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60608161352d57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156135575780613541816145e1565b91506135509050600a8361466c565b9150613531565b60008167ffffffffffffffff81111561357257613572613cb3565b6040519080825280601f01601f19166020018201604052801561359c576020820181803683370190505b5090505b841561361f576135b1600183614724565b91506135be600a866146e2565b6135c99060306145b0565b60f81b8183815181106135de576135de6144c9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613618600a8661466c565b94506135a0565b949350505050565b6000805b6002848054613639906145fc565b61364492915061466c565b81101561372f5760ff600884901c168461365f836002614637565b815461366a906145fc565b8110613678576136786144c9565b8154600116156136975790600052602060002090602091828204019190065b9054600160f81b911a0260f81c14801561370e575060ff8316846136bc836002614637565b6136c79060016145b0565b81546136d2906145fc565b81106136e0576136e06144c9565b8154600116156136ff5790600052602060002090602091828204019190065b9054600160f81b911a0260f81c145b1561371d576001915050610933565b80613727816145e1565b91505061362b565b5060009392505050565b6001600160a01b03841661379d5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610907565b336137ad81878761300b886138ce565b6000848152602081815260408083206001600160a01b038a168452909152902054838110156138315760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610907565b6000858152602081815260408083206001600160a01b038b811685529252808320878503905590881682528120805486929061386e9084906145b0565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46116b4828888888888613919565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613908576139086144c9565b602090810291909101015292915050565b6001600160a01b0384163b156133915760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061395d908990899088908890889060040161473b565b602060405180830381600087803b15801561397757600080fd5b505af19250505080156139a7575060408051601f3d908101601f191682019092526139a49181019061477e565b60015b613a5d576139b361479b565b806308c379a014156139ed57506139c86147b7565b806139d357506139ef565b8060405162461bcd60e51b81526004016109079190613ead565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610907565b6001600160e01b0319811663f23a6e6160e01b146116b45760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610907565b6001600160a01b0384163b156133915760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613b129089908990889088908890600401614841565b602060405180830381600087803b158015613b2c57600080fd5b505af1925050508015613b5c575060408051601f3d908101601f19168201909252613b599181019061477e565b60015b613b68576139b361479b565b6001600160e01b0319811663bc197c8160e01b146116b45760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610907565b828054613be5906145fc565b90600052602060002090601f016020900481019282613c075760008555613c4d565b82601f10613c205782800160ff19823516178555613c4d565b82800160010185558215613c4d579182015b82811115613c4d578235825591602001919060010190613c32565b50613c59929150613c5d565b5090565b5b80821115613c595760008155600101613c5e565b6001600160a01b0381168114611e4a57600080fd5b60008060408385031215613c9a57600080fd5b8235613ca581613c72565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715613cef57613cef613cb3565b6040525050565b600067ffffffffffffffff821115613d1057613d10613cb3565b5060051b60200190565b600082601f830112613d2b57600080fd5b81356020613d3882613cf6565b604051613d458282613cc9565b83815260059390931b8501820192828101915086841115613d6557600080fd5b8286015b84811015613d805780358352918301918301613d69565b509695505050505050565b8015158114611e4a57600080fd5b60008060008060808587031215613daf57600080fd5b8435613dba81613c72565b9350602085013567ffffffffffffffff80821115613dd757600080fd5b613de388838901613d1a565b94506040870135915080821115613df957600080fd5b50613e0687828801613d1a565b9250506060850135613e1781613d8b565b939692955090935050565b6001600160e01b031981168114611e4a57600080fd5b600060208284031215613e4a57600080fd5b8135612dd781613e22565b60005b83811015613e70578181015183820152602001613e58565b838111156129cd5750506000910152565b60008151808452613e99816020860160208601613e55565b601f01601f19169290920160200192915050565b602081526000612dd76020830184613e81565b600060208284031215613ed257600080fd5b5035919050565b60008060408385031215613eec57600080fd5b50508035926020909101359150565b600067ffffffffffffffff821115613f1557613f15613cb3565b50601f01601f191660200190565b600082601f830112613f3457600080fd5b8135613f3f81613efb565b604051613f4c8282613cc9565b828152856020848701011115613f6157600080fd5b82602086016020830137600092810160200192909252509392505050565b600080600080600060a08688031215613f9757600080fd5b8535613fa281613c72565b94506020860135613fb281613c72565b9350604086013567ffffffffffffffff80821115613fcf57600080fd5b613fdb89838a01613d1a565b94506060880135915080821115613ff157600080fd5b613ffd89838a01613d1a565b9350608088013591508082111561401357600080fd5b5061402088828901613f23565b9150509295509295909350565b6000806040838503121561404057600080fd5b823567ffffffffffffffff8082111561405857600080fd5b818501915085601f83011261406c57600080fd5b8135602061407982613cf6565b6040516140868282613cc9565b83815260059390931b85018201928281019150898411156140a657600080fd5b948201945b838610156140cd5785356140be81613c72565b825294820194908201906140ab565b965050860135925050808211156140e357600080fd5b506140f085828601613d1a565b9150509250929050565b600081518084526020808501945080840160005b8381101561412a5781518752958201959082019060010161410e565b509495945050505050565b602081526000612dd760208301846140fa565b60006020828403121561415a57600080fd5b8135612dd781613c72565b60006020828403121561417757600080fd5b8135612dd781613d8b565b6000806040838503121561419557600080fd5b8235600481106141a457600080fd5b915060208301356141b481613d8b565b809150509250929050565b600080604083850312156141d257600080fd5b82356141a481613c72565b600080604083850312156141f057600080fd5b823567ffffffffffffffff81111561420757600080fd5b61421385828601613d1a565b92505060208301356141b481613c72565b60006020828403121561423657600080fd5b813567ffffffffffffffff81111561424d57600080fd5b61361f84828501613d1a565b634e487b7160e01b600052602160045260246000fd5b602081016004831061429157634e487b7160e01b600052602160045260246000fd5b91905290565b60008083601f8401126142a957600080fd5b50813567ffffffffffffffff8111156142c157600080fd5b6020830191508360208260051b85010111156142dc57600080fd5b9250929050565b6000806000604084860312156142f857600080fd5b833561430381613c72565b9250602084013567ffffffffffffffff81111561431f57600080fd5b61432b86828701614297565b9497909650939450505050565b6020808252825182820181905260009190848201906040850190845b81811015614372578351151583529284019291840191600101614354565b50909695505050505050565b6000806020838503121561439157600080fd5b823567ffffffffffffffff8111156143a857600080fd5b6143b485828601614297565b90969095509350505050565b600080604083850312156143d357600080fd5b82356143de81613c72565b915060208301356141b481613c72565b600080600080600060a0868803121561440657600080fd5b853561441181613c72565b9450602086013561442181613c72565b93506040860135925060608601359150608086013567ffffffffffffffff81111561444b57600080fd5b61402088828901613f23565b6000806020838503121561446a57600080fd5b823567ffffffffffffffff8082111561448257600080fd5b818501915085601f83011261449657600080fd5b8135818111156144a557600080fd5b8660208285010111156144b757600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156144f157600080fd5b8151612dd781613c72565b60006020828403121561450e57600080fd5b815167ffffffffffffffff81111561452557600080fd5b8201601f8101841361453657600080fd5b805161454181613efb565b60405161454e8282613cc9565b82815286602084860101111561456357600080fd5b614574836020830160208701613e55565b9695505050505050565b60008251614590818460208701613e55565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b600082198211156145c3576145c361459a565b500190565b6000602082840312156145da57600080fd5b5051919050565b60006000198214156145f5576145f561459a565b5060010190565b600181811c9082168061461057607f821691505b6020821081141561463157634e487b7160e01b600052602260045260246000fd5b50919050565b60008160001904831182151516156146515761465161459a565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261467b5761467b614656565b500490565b60006020828403121561469257600080fd5b8151612dd781613d8b565b7f48454144000000000000000000000000000000000000000000000000000000008152600082516146d5816004850160208701613e55565b9190910160040192915050565b6000826146f1576146f1614656565b500690565b60408152600061470960408301856140fa565b828103602084015261471b81856140fa565b95945050505050565b6000828210156147365761473661459a565b500390565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a0608083015261477360a0830184613e81565b979650505050505050565b60006020828403121561479057600080fd5b8151612dd781613e22565b600060033d11156147b45760046000803e5060005160e01c5b90565b600060443d10156147c55790565b6040516003193d81016004833e81513d67ffffffffffffffff81602484011181841117156147f557505050505090565b828501915081518181111561480d5750505050505090565b843d87010160208285010111156148275750505050505090565b61483660208286010187613cc9565b509095945050505050565b60006001600160a01b03808816835280871660208401525060a0604083015261486d60a08301866140fa565b828103606084015261487f81866140fa565b905082810360808401526148938185613e81565b9897505050505050505056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212207dbab0de5f4f1326cba2c9a6d12af56907e94c06887f90b28813c63fa70676c964736f6c63430008090033

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

00000000000000000000000000000000000000000000000000000000000000600000000000000000000000008d9da67e30c89f9a453dcdb67ca9a7f76e735598000000000000000000000000632678bba8a4dd16255f164e9d74853bea9856e70000000000000000000000000000000000000000000000000000000000000003000000000000000000000000ff9c1b15b16263c61d017ee9f65c50e4ae0113d70000000000000000000000001dfe7ca09e99d10835bf73044a23b73fc20623df0000000000000000000000008db687aceb92c66f013e1d614137238cc698fedb

-----Decoded View---------------
Arg [0] : lootsList (address[]): 0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7,0x1dfe7Ca09e99d10835Bf73044a23B73Fc20623DF,0x8dB687aCEb92c66f013e1D614137238Cc698fEdb
Arg [1] : lmart (address): 0x8d9Da67E30c89f9a453dCdb67Ca9a7F76e735598
Arg [2] : riftData (address): 0x632678bBa8a4DD16255F164e9d74853BeA9856E7

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 0000000000000000000000008d9da67e30c89f9a453dcdb67ca9a7f76e735598
Arg [2] : 000000000000000000000000632678bba8a4dd16255f164e9d74853bea9856e7
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [4] : 000000000000000000000000ff9c1b15b16263c61d017ee9f65c50e4ae0113d7
Arg [5] : 0000000000000000000000001dfe7ca09e99d10835bf73044a23b73fc20623df
Arg [6] : 0000000000000000000000008db687aceb92c66f013e1d614137238cc698fedb


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.