ETH Price: $2,969.59 (-2.68%)
Gas: 2 Gwei

Token

 

Overview

Max Total Supply

3,437

Holders

549

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
fabiaz84.eth
0xb9ab9578a34a05c86124c399735fde44dec80e7f
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:
DNA

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 2000 runs

Other Settings:
default evmVersion
File 1 of 23 : DNA.sol
// SPDX-License-Identifier: Unlicense

pragma solidity ^0.8.11;

import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import "./interfaces/IMutants.sol";
import "./interfaces/IRWaste.sol";
import "./interfaces/IScales.sol";
import "./interfaces/IScientists.sol";

error DNA_BatchAlreadySeeded();
error DNA_BatchNotSeeded();
error DNA_CoolDownOngoing();
error DNA_ExceedsMaximumTier();
error DNA_ExtractionOngoing();
error DNA_FunctionLocked();
error DNA_IndexOutOfRange();
error DNA_IncorrectValue();
error DNA_NothingToReveal();
error DNA_SenderNotAllowed();
error DNA_SenderNotTokenOwner();
error DNA_ValueOutOfRange();

/**                                     ..',,;;;;:::;;;,,'..
                                 .';:ccccc:::;;,,,,,;;;:::ccccc:;'.
                            .,:ccc:;'..                      ..';:ccc:,.
                        .':cc:,.                                    .,ccc:'.
                     .,clc,.                                            .,clc,.
                   'clc'                                                    'clc'
                .;ll,.                                                        .;ll;.
              .:ol.                                                              'co:.
             ;oc.                                                                  .co;
           'oo'                                                                      'lo'
         .cd;                                                                          ;dc.
        .ol.                                                                 .,.        .lo.
       ,dc.                                                               'cxKWK;         cd,
      ;d;                                                             .;oONWMMMMXc         ;d;
     ;d;                                                           'cxKWMMMMMMMMMXl.        ;x;
    ,x:            ;dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0NMMMMMMMMMMMMMMNd.        :x,
   .dc           .lXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNd.        cd.
   ld.          .oNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXkl'         .dl
  ,x;          .xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN0d:.             ;x,
  oo.         .kWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWKxc'.                .oo
 'x:          .kWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNOo;.                     :x'
 :x.           .xWMMMMMMMMMMM0occcccccccccccccccccccccccccccccccccccc:'                         .x:
 lo.            .oNMMMMMMMMMX;                                                                  .ol
.ol              .lXMMMMMMMWd.  ,dddddddddddddddo;.   .:dddddddddddddo,                          lo.
.dl                cXMMMMMM0,  'OMMMMMMMMMMMMMMNd.   .xWMMMMMMMMMMMMXo.                          ld.
.dl                 ;KMMMMNl   oWMMMMMMMMMMMMMXc.   ,OWMMMMMMMMMMMMK:                            ld.
 oo                  ,OWMMO.  ,KMMMMMMMMMMMMW0;   .cKMMMMMMMMMMMMWO,                             oo
 cd.                  'kWX:  .xWMMMMMMMMMMMWx.  .dKNMMMMMMMMMMMMNd.                             .dc
 ,x,                   .dd.  ;KMMMMMMMMMMMXo.  'kWMMMMMMMMMMMMMXl.                              ,x;
 .dc                     .   .,:loxOKNWMMK:   ;0WMMMMMMMMMMMMW0;                                cd.
  :d.                      ...      ..,:c'  .lXMMMMMMMMMMMMMWk'                                .d:
  .dl                      :OKOxoc:,..     .xNMMMMMMMMMMMMMNo.                                 cd.
   ;x,                      ;0MMMMWWXKOxoclOWMMMMMMMMMMMMMKc                                  ,x;
    cd.                      ,OWMMMMMMMMMMMMMMMMMMMMMMMMWO,                                  .dc
    .oo.                      .kWMMMMMMMMMMMMMMMMMMMMMMNx.                                  .oo.
     .oo.                      .xWMMMMMMMMMMMMMMMMMMMMXl.                                  .oo.
      .lo.                      .oNMMMMMMMMMMMMMMMMMW0;                                   .ol.
       .cd,                      .lXMMMMMMMMMMMMMMMWk'                                   ,dc.
         ;dc.                      :KMMMMMMMMMMMMNKo.                                  .cd;
          .lo,                      ;0WWWWWWWWWWKc.                                   'ol.
            ,ol.                     .,,,,,,,,,,.                                   .lo,
             .;oc.                                                                .co:.
               .;ol'                                                            'lo;.
                  ,ll:.                                                      .:ll,
                    .:ll;.                                                .;ll:.
                       .:ll:,.                                        .,:ll:.
                          .,:ccc;'.                              .';ccc:,.
                              .';cccc::;'...            ...';:ccccc;'.
                                    .',;::cc::cc::::::::::::;,..
                                              ........
 * @title DNA
 * @author Augminted Labs, LLC
 * @notice DNA is earned using MUTANT, $SCALES, and optional $RWASTE
 * @notice For more details see: https://medium.com/@AugmintedLabs/kaijukingz-p2e-ecosystem-dc9577ff8773
 */
contract DNA is ERC1155, Ownable, AccessControl, ReentrancyGuard, VRFConsumerBaseV2 {
    struct Contracts {
        IMutants Mutants;
        IRWaste RWaste;
        IScales Scales;
        IScientists Scientists;
    }

    struct RequestConfig {
        bytes32 keyHash;
        uint64 subId;
        uint32 callbackGasLimit;
        uint16 requestConfirmations;
    }

    struct VRFFundingConfig {
        uint256 fee;
        bool userFunded;
    }

    struct FreeBoostConfig {
        uint16 boostId;
        uint64 minimumBatchSize;
    }

    struct MutantInfo {
        uint64 batchId;
        uint128 coolDownStarted;
        uint16 boostId;
        uint8 tier;
        bool extractionOngoing;
    }

    struct Batch {
        uint256 size;
        uint256 seed;
    }

    struct Boost {
        uint256 cost;
        uint256[4] rarities;
    }

    struct ExtractionResults {
        uint256 tokenId;
        uint16 criticality;
        bool success;
    }

    event BatchSeeded(
        uint256 indexed batchId
    );

    event DNAStolen(
        address indexed receiver,
        uint256 indexed tokenId
    );

    event ExtractionComplete(
        uint256 indexed mutantId,
        uint64 indexed batchId,
        uint16 indexed boostId,
        ExtractionResults results
    );

    VRFCoordinatorV2Interface internal immutable COORDINATOR;
    bytes32 public constant CONTRACT_MANAGER_ROLE = keccak256("CONTRACT_OWNER_ROLE");
    bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE");
    bytes32 public constant CRITICALITY_ENTROPY = keccak256("CRITICALITY");
    bytes32 public constant TOKEN_RARITY_ENTROPY = keccak256("TOKEN_RARITY");
    bytes32 public constant TOKEN_ELEMENT_ENTROPY = keccak256("TOKEN_ELEMENT");
    bytes32 public constant SCIENTIST_ENTROPY = keccak256("SCIENTIST");
    uint256 public constant MAX_MUTANT_TIER = 6;

    Contracts public contracts;
    RequestConfig public requestConfig;
    VRFFundingConfig public vrfFundingConfig;
    FreeBoostConfig public freeBoostConfig;
    uint256 public mutantUpgradeCost = 150 ether;
    uint256 public extractionCost = 600 ether;
    uint256 public coolDown = 14 days;
    Boost[] public boosts;
    uint64 public batchId;
    mapping(uint64 => Batch) public batch;
    mapping(uint256 => MutantInfo) public mutantInfo;
    mapping(uint256 => uint64) public requestIdToBatchId;
    mapping(bytes4 => bool) public functionLocked;

    constructor(
        string memory uri,
        address vrfCoordinator,
        bytes32 keyHash,
        uint64 subId
    )
        ERC1155(uri)
        VRFConsumerBaseV2(vrfCoordinator)
    {
        _grantRole(DEFAULT_ADMIN_ROLE, _msgSender());

        COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator);

        requestConfig = RequestConfig({
            keyHash: keyHash,
            subId: subId,
            callbackGasLimit: 2500000,
            requestConfirmations: 3
        });

        freeBoostConfig = FreeBoostConfig({
            boostId: 2,
            minimumBatchSize: 20
        });

        boosts.push(Boost({ cost: 0 ether, rarities: [uint256(1), 5, 20, 50] }));       // default (1%, 4%, 15%, 30%, 50%)
        boosts.push(Boost({ cost: 200 ether, rarities: [uint256(2), 10, 35, 80] }));    // basic boost (2%, 8%, 25%, 45%, 20%)
        boosts.push(Boost({ cost: 100 ether, rarities: [uint256(1), 5, 20, 100] }));    // no commons (1%, 4%, 15%, 80%, 0%)
        boosts.push(Boost({ cost: 75 ether, rarities: [uint256(0), 0, 50, 50] }));      // 50/50 rare/common (0%, 0%, 50%, 0%, 50%)
        boosts.push(Boost({ cost: 500 ether, rarities: [uint256(20), 40, 60, 80] }));   // flattened (20%, 20%, 20%, 20%, 20%)
        boosts.push(Boost({ cost: 750 ether, rarities: [uint256(0), 100, 100, 100] })); // always epic (0%, 100%, 0%, 0%, 0%)
    }

    /**
     * @notice Modifier applied to functions that will be disabled when they're no longer needed
     */
    modifier lockable() {
        if (functionLocked[msg.sig]) revert DNA_FunctionLocked();
        _;
    }

    /**
     * @notice Get specified boost cost
     * @param index Of boost cost to return
     * @return uint256 Cost of the boost
     */
    function getBoostCost(uint256 index) public view returns (uint256) {
        if (index >= boosts.length) revert DNA_IndexOutOfRange();

        return boosts[index].cost;
    }

    /**
     * @notice Get specified boost rarities
     * @param index Of boost rarities to return
     * @return uint256 Rarities of the boost
     */
    function getBoostRarities(uint256 index) public view returns (uint256[4] memory) {
        if (index >= boosts.length) revert DNA_IndexOutOfRange();

        return boosts[index].rarities;
    }

    /**
     * @notice If the specified MUTANT is available for DNA extraction
     * @param mutantId MUTANT to query cool down status of
     * @return bool If MUTANT is available for DNA extraction
     */
    function isCooledDown(uint256 mutantId) public view returns (bool) {
        return block.timestamp - mutantInfo[mutantId].coolDownStarted > coolDown;
    }

    /**
     * @notice Set external contracts used by the DNA contract
     * @param _contracts Struct with updated contract addresses
     */
    function setContracts(Contracts calldata _contracts) external lockable onlyRole(DEFAULT_ADMIN_ROLE) {
        contracts = _contracts;
    }

    /**
     * @notice Set configuration for controlling the free boost functionality
     * @param _freeBoostConfig Struct with updated configuration values
     */
    function setFreeBoostConfig(FreeBoostConfig calldata _freeBoostConfig) external lockable onlyRole(DEFAULT_ADMIN_ROLE) {
        freeBoostConfig = _freeBoostConfig;
    }

    /**
     * @notice Set configuration data for Chainlink VRF
     * @dev https://docs.chain.link/docs/chainlink-vrf/
     * @param _requestConfig Struct with updated configuration values
     */
    function setRequestConfig(RequestConfig calldata _requestConfig) external onlyRole(DEFAULT_ADMIN_ROLE) {
        requestConfig = _requestConfig;
    }

    /**
     * @notice Set configuration for controlling source of funding for VRF
     * @param _vrfFundingConfig Struct with updated configuration values
     */
    function setVRFFundingConfig(VRFFundingConfig calldata _vrfFundingConfig) external onlyRole(DEFAULT_ADMIN_ROLE) {
        vrfFundingConfig = _vrfFundingConfig;
    }

    /**
     * @notice Set token URI for all tokens
     * @param uri Token URI to set for all tokens
     */
    function setURI(string calldata uri) external lockable onlyRole(DEFAULT_ADMIN_ROLE) {
        _setURI(uri);
    }

    /**
     * @notice Set boost values for an existing boost
     * @dev Boosts can be neutralized by setting them to default values
     * @param boostId Boost to set the value of
     * @param boost Boost values to set
     */
    function setBoost(uint256 boostId, Boost calldata boost) public lockable onlyRole(CONTRACT_MANAGER_ROLE) {
        if (boostId >= boosts.length || boostId == 0) revert DNA_ValueOutOfRange();

        boosts[boostId] = boost;
    }

    /**
     * @notice Add a new boost option for DNA extraction
     * @param boost New boost to be added
     */
    function addBoost(Boost calldata boost) public lockable onlyRole(CONTRACT_MANAGER_ROLE) {
        boosts.push(boost);
    }

    /**
     * @notice Set a new DNA extraction cost
     * @dev WARNING: Calling this will create a race condition for the current batch in which
     * @dev          the amount of stolen/refunded $SCALES will be calculated based on the new
     * @dev          value despite already having charged for extraction based on the old value.
     * @param cost Cost of DNA extraction
     */
    function setExtractionCost(uint256 cost) public lockable onlyRole(CONTRACT_MANAGER_ROLE) {
        extractionCost = cost;
    }

    /**
     * @notice Set a new MUTANT upgrade cost
     * @param cost Cost of upgrading a MUTANT by a single tier
     */
    function setMutantUpgradeCost(uint256 cost) public lockable onlyRole(CONTRACT_MANAGER_ROLE) {
        mutantUpgradeCost = cost;
    }

    /**
     * @notice Set a new duration for the cool down period applied after a successful DNA extraction
     * @param time New cool down duration
     */
    function setCoolDown(uint256 time) public lockable onlyRole(CONTRACT_MANAGER_ROLE) {
        coolDown = time;
    }

    /**
     * @notice Spend $SCALES to upgrade a MUTANT and increase chances of DNA extraction success
     * @dev This function is used in favor of the one on the MUTANT contract to improve gas efficiency
     * @param tokenId MUTANT to apply upgrades to
     * @param tiers Amount of tiers to upgrade
     */
    function upgradeMutant(uint256 tokenId, uint8 tiers) public {
        if (_msgSender() != contracts.Mutants.ownerOf(tokenId)) revert DNA_SenderNotTokenOwner();
        if (mutantInfo[tokenId].tier + tiers > MAX_MUTANT_TIER) revert DNA_ExceedsMaximumTier();
        if (mutantInfo[tokenId].extractionOngoing) revert DNA_ExtractionOngoing();

        contracts.Scales.spend(_msgSender(), mutantUpgradeCost * tiers);

        mutantInfo[tokenId].tier += tiers;
    }

    /**
     * @notice Run the extraction process for a MUTANT and queued extractions in this batch
     * @param mutantId MUTANT to run the extraction for
     * @param boostId Boost to apply to the extraction process
     */
    function runExtraction(uint256 mutantId, uint16 boostId) public payable nonReentrant {
        if (vrfFundingConfig.userFunded && msg.value != vrfFundingConfig.fee) revert DNA_IncorrectValue();

        bool freeBoost = batch[batchId].size > freeBoostConfig.minimumBatchSize;

        _queueExtraction(mutantId, freeBoost ? freeBoostConfig.boostId : boostId, freeBoost);
        _seedBatch(batchId);
    }

    /**
     * @notice Queue a MUTANT for DNA extraction
     * @param mutantId MUTANT to queue for extraction
     * @param boostId Boost to apply to the extraction process
     */
    function queueExtraction(uint256 mutantId, uint16 boostId) public nonReentrant {
        _queueExtraction(mutantId, boostId, false);
    }

    /**
     * @notice Queue a MUTANT for DNA extraction
     * @param mutantId MUTANT to queue for extraction
     * @param boostId Boost to apply to the extraction process
     * @param freeBoost If sender should be charged for the cost of the boost
     */
    function _queueExtraction(uint256 mutantId, uint16 boostId, bool freeBoost) internal {
        if (_msgSender() != contracts.Mutants.ownerOf(mutantId)) revert DNA_SenderNotAllowed();
        if (boostId >= boosts.length) revert DNA_ValueOutOfRange();

        MutantInfo storage _mutantInfo = mutantInfo[mutantId];

        if (!isCooledDown(mutantId)) revert DNA_CoolDownOngoing();
        if (_mutantInfo.extractionOngoing) revert DNA_ExtractionOngoing();

        contracts.Scales.spend(_msgSender(), extractionCost);

        if (boosts[boostId].cost > 0 && !freeBoost) {
            contracts.RWaste.burn(_msgSender(), boosts[boostId].cost);
        }

        ++batch[batchId].size;
        _mutantInfo.batchId = batchId;
        _mutantInfo.boostId = boostId;
        _mutantInfo.extractionOngoing = true;
        _mutantInfo.coolDownStarted = uint128(block.timestamp);
    }

    /**
     * @notice Seed a specified batch so that extraction results can be revealed
     * @param _batchId Batch to seed
     */
    function seedBatch(uint64 _batchId) public onlyRole(CONTRACT_MANAGER_ROLE) {
        if (batch[_batchId].seed != 0) revert DNA_BatchAlreadySeeded();

        _seedBatch(_batchId);
    }

    /**
     * @notice Seed a specified batch so that extraction results can be revealed
     * @param _batchId Batch to seed
     */
    function _seedBatch(uint64 _batchId) internal {
        requestIdToBatchId[COORDINATOR.requestRandomWords(
            requestConfig.keyHash,
            requestConfig.subId,
            requestConfig.requestConfirmations,
            requestConfig.callbackGasLimit,
            1 // number of random words
        )] = _batchId;

        ++batchId;
    }

    /**
     * @inheritdoc VRFConsumerBaseV2
     * @dev Seed a batch of extractions
     */
    function fulfillRandomWords(
        uint256 requestId,
        uint256[] memory randomWords
    ) internal override {
        uint64 _batchId = requestIdToBatchId[requestId];

        batch[_batchId].seed = randomWords[0];

        emit BatchSeeded(_batchId);
    }

    /**
     * @notice Complete the extraction process by executing the results of the extraction
     * @param mutantId MUTANT to complete the DNA extraction for
     */
    function completeExtraction(uint256 mutantId) public nonReentrant {
        MutantInfo storage _mutantInfo = mutantInfo[mutantId];

        if (!_mutantInfo.extractionOngoing) revert DNA_NothingToReveal();
        if (
            _msgSender() != contracts.Mutants.ownerOf(mutantId)
            && !hasRole(CONTRACT_MANAGER_ROLE, _msgSender())
        ) revert DNA_SenderNotAllowed();

        uint256 batchSeed = batch[_mutantInfo.batchId].seed;

        if (batchSeed == 0) revert DNA_BatchNotSeeded();

        uint256 randomness = uint256(keccak256(abi.encode(batchSeed, mutantId)));

        ExtractionResults memory results;
        results.success = (randomness % 10) < (2 + _mutantInfo.tier);

        if (results.success) {
            results.tokenId = getTokenId(randomness, _mutantInfo.boostId);
            results.criticality = uint16(uint256(keccak256(abi.encode(randomness, CRITICALITY_ENTROPY))) % 100);

            if (results.criticality == 0) {
                address receiver = contracts.Scientists.getRandomPaidScientistOwner(
                    uint256((keccak256(abi.encode(randomness, SCIENTIST_ENTROPY))))
                );

                _mint(receiver, results.tokenId, 1, "");

                _mutantInfo.coolDownStarted = 0;

                emit DNAStolen(receiver, results.tokenId);
            } else {
                address receiver = contracts.Mutants.ownerOf(mutantId);

                _mint(receiver, results.tokenId, 1, "");

                if (results.criticality == 99) contracts.Scales.credit(receiver, extractionCost);
            }
        } else {
            contracts.Scientists.increasePool(extractionCost);
            _mutantInfo.coolDownStarted = 0;
        }

        _mutantInfo.extractionOngoing = false;

        emit ExtractionComplete(mutantId, _mutantInfo.batchId, _mutantInfo.boostId, results);
    }

    /**
     * @notice Calculate DNA token ID based on a provided randomness
     * @param randomness Random seed used to generate DNA rarity and element
     * @param boostId Value indicating the the boost applied to the extraction
     * @return uint256 DNA token ID calculated from rarity, element, and boost values
     */
    function getTokenId(uint256 randomness, uint256 boostId) internal view returns (uint256) {
        if (boostId >= boosts.length) revert DNA_ValueOutOfRange();

        uint256 rarity = uint256((keccak256(abi.encode(randomness, TOKEN_RARITY_ENTROPY)))) % 100;
        uint256[4] memory rarities = boosts[boostId].rarities;
        uint256 baseId;

        if (rarity >= rarities[3]) baseId = 4;
        else if (rarity >= rarities[2]) baseId = 3;
        else if (rarity >= rarities[1]) baseId = 2;
        else if (rarity >= rarities[0]) baseId = 1;

        return uint256((baseId * 5) + (uint256((keccak256(abi.encode(randomness, TOKEN_ELEMENT_ENTROPY)))) % 5));
    }

    /**
     * @notice Burn an amount of specified DNA tokens from a specified owner
     * @param from DNA owner to burn from
     * @param id DNA to burn
     * @param amount Amount of DNA tokens to burn
     */
    function burn(
        address from,
        uint256 id,
        uint256 amount
    )
        public
        lockable
        onlyRole(BURNER_ROLE)
    {
        _burn(from, id, amount);
    }

    /**
     * @notice Burn an amount of specified DNA tokens from a specified owner
     * @param from DNA owner to burn from
     * @param ids DNA tokens to burn
     * @param amounts Amounts of DNA tokens to burn
     */
    function burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    )
        public
        lockable
        onlyRole(BURNER_ROLE)
    {
        _burnBatch(from, ids, amounts);
    }

    /**
     * @inheritdoc ERC1155
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC1155, AccessControl)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    /**
     * @notice Withdraw all ETH transferred to the contract
     */
    function withdraw() external onlyRole(DEFAULT_ADMIN_ROLE) {
        Address.sendValue(payable(_msgSender()), address(this).balance);
    }

    /**
     * @notice Lock individual functions that are no longer needed
     * @dev Only affects functions with the lockable modifier
     * @param id First 4 bytes of the calldata (i.e. function identifier)
     */
    function lockFunction(bytes4 id) external onlyRole(DEFAULT_ADMIN_ROLE) {
        functionLocked[id] = true;
    }
}

File 2 of 23 : IScientists.sol
//SPDX-License-Identifier: Unlicense

pragma solidity ^0.8.4;

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

interface IScientists is IERC721 {
    function getRandomPaidScientistOwner(uint256) external returns (address);
    function increasePool(uint256) external;
}

File 3 of 23 : IScales.sol
// SPDX-License-Identifier: Unlicense

pragma solidity ^0.8.4;

import "./ISpendable.sol";

interface IScales is ISpendable {
    function getAllOwned(address) external view returns (uint256[] memory);
}

File 4 of 23 : IRWaste.sol
//SPDX-License-Identifier: Unlicense

pragma solidity ^0.8.4;

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

interface IRWaste is IERC20 {
    function burn(address user, uint256 amount) external;
    function claimReward() external;
}

File 5 of 23 : IMutants.sol
//SPDX-License-Identifier: Unlicense

pragma solidity ^0.8.4;

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

interface IMutants is IERC721 {
    function MAX_SUPPLY() external view returns (uint256);
    function totalSupply() external view returns (uint256);
    function tier(uint256) external view returns (uint256);
}

File 6 of 23 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 7 of 23 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (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();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, 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);

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

        _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);

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

        _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();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

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

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

        _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);

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

        _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();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

        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);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @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);

        _afterTokenTransfer(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 {}

    /**
     * @dev Hook that is called after 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 _afterTokenTransfer(
        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 8 of 23 : 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 9 of 23 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

File 10 of 23 : VRFConsumerBaseV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness. It ensures 2 things:
 * @dev 1. The fulfillment came from the VRFCoordinator
 * @dev 2. The consumer contract implements fulfillRandomWords.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash). Create subscription, fund it
 * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface
 * @dev subscription management functions).
 * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,
 * @dev callbackGasLimit, numWords),
 * @dev see (VRFCoordinatorInterface for a description of the arguments).
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomWords method.
 *
 * @dev The randomness argument to fulfillRandomWords is a set of random words
 * @dev generated from your requestId and the blockHash of the request.
 *
 * @dev If your contract could have concurrent requests open, you can use the
 * @dev requestId returned from requestRandomWords to track which response is associated
 * @dev with which randomness request.
 * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ.
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request. It is for this reason that
 * @dev that you can signal to an oracle you'd like them to wait longer before
 * @dev responding to the request (however this is not enforced in the contract
 * @dev and so remains effective only in the case of unmodified oracle software).
 */
abstract contract VRFConsumerBaseV2 {
  error OnlyCoordinatorCanFulfill(address have, address want);
  address private immutable vrfCoordinator;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   */
  constructor(address _vrfCoordinator) {
    vrfCoordinator = _vrfCoordinator;
  }

  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomWords the VRF output expanded to the requested number of words
   */
  function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual;

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external {
    if (msg.sender != vrfCoordinator) {
      revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator);
    }
    fulfillRandomWords(requestId, randomWords);
  }
}

File 11 of 23 : VRFCoordinatorV2Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface VRFCoordinatorV2Interface {
  /**
   * @notice Get configuration relevant for making requests
   * @return minimumRequestConfirmations global min for request confirmations
   * @return maxGasLimit global max for request gas limit
   * @return s_provingKeyHashes list of registered key hashes
   */
  function getRequestConfig()
    external
    view
    returns (
      uint16,
      uint32,
      bytes32[] memory
    );

  /**
   * @notice Request a set of random words.
   * @param keyHash - Corresponds to a particular oracle job which uses
   * that key for generating the VRF proof. Different keyHash's have different gas price
   * ceilings, so you can select a specific one to bound your maximum per request cost.
   * @param subId  - The ID of the VRF subscription. Must be funded
   * with the minimum subscription balance required for the selected keyHash.
   * @param minimumRequestConfirmations - How many blocks you'd like the
   * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS
   * for why you may want to request more. The acceptable range is
   * [minimumRequestBlockConfirmations, 200].
   * @param callbackGasLimit - How much gas you'd like to receive in your
   * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords
   * may be slightly less than this amount because of gas used calling the function
   * (argument decoding etc.), so you may need to request slightly more than you expect
   * to have inside fulfillRandomWords. The acceptable range is
   * [0, maxGasLimit]
   * @param numWords - The number of uint256 random values you'd like to receive
   * in your fulfillRandomWords callback. Note these numbers are expanded in a
   * secure way by the VRFCoordinator from a single random value supplied by the oracle.
   * @return requestId - A unique identifier of the request. Can be used to match
   * a request to a response in fulfillRandomWords.
   */
  function requestRandomWords(
    bytes32 keyHash,
    uint64 subId,
    uint16 minimumRequestConfirmations,
    uint32 callbackGasLimit,
    uint32 numWords
  ) external returns (uint256 requestId);

  /**
   * @notice Create a VRF subscription.
   * @return subId - A unique subscription id.
   * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.
   * @dev Note to fund the subscription, use transferAndCall. For example
   * @dev  LINKTOKEN.transferAndCall(
   * @dev    address(COORDINATOR),
   * @dev    amount,
   * @dev    abi.encode(subId));
   */
  function createSubscription() external returns (uint64 subId);

  /**
   * @notice Get a VRF subscription.
   * @param subId - ID of the subscription
   * @return balance - LINK balance of the subscription in juels.
   * @return reqCount - number of requests for this subscription, determines fee tier.
   * @return owner - owner of the subscription.
   * @return consumers - list of consumer address which are able to use this subscription.
   */
  function getSubscription(uint64 subId)
    external
    view
    returns (
      uint96 balance,
      uint64 reqCount,
      address owner,
      address[] memory consumers
    );

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @param newOwner - proposed new owner of the subscription
   */
  function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external;

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @dev will revert if original owner of subId has
   * not requested that msg.sender become the new owner.
   */
  function acceptSubscriptionOwnerTransfer(uint64 subId) external;

  /**
   * @notice Add a consumer to a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - New consumer which can use the subscription
   */
  function addConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Remove a consumer from a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - Consumer to remove from the subscription
   */
  function removeConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Cancel a subscription
   * @param subId - ID of the subscription
   * @param to - Where to send the remaining LINK to
   */
  function cancelSubscription(uint64 subId, address to) external;
}

File 12 of 23 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 13 of 23 : ISpendable.sol
//SPDX-License-Identifier: Unlicense

pragma solidity ^0.8.4;

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

interface ISpendable is IERC20 {
    function getSpendable(address) external view returns (uint256);
    function spend(address, uint256) external;
    function credit(address, uint256) external;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 18 of 23 : 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 19 of 23 : 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 20 of 23 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"uri","type":"string"},{"internalType":"address","name":"vrfCoordinator","type":"address"},{"internalType":"bytes32","name":"keyHash","type":"bytes32"},{"internalType":"uint64","name":"subId","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DNA_BatchAlreadySeeded","type":"error"},{"inputs":[],"name":"DNA_BatchNotSeeded","type":"error"},{"inputs":[],"name":"DNA_CoolDownOngoing","type":"error"},{"inputs":[],"name":"DNA_ExceedsMaximumTier","type":"error"},{"inputs":[],"name":"DNA_ExtractionOngoing","type":"error"},{"inputs":[],"name":"DNA_FunctionLocked","type":"error"},{"inputs":[],"name":"DNA_IncorrectValue","type":"error"},{"inputs":[],"name":"DNA_IndexOutOfRange","type":"error"},{"inputs":[],"name":"DNA_NothingToReveal","type":"error"},{"inputs":[],"name":"DNA_SenderNotAllowed","type":"error"},{"inputs":[],"name":"DNA_SenderNotTokenOwner","type":"error"},{"inputs":[],"name":"DNA_ValueOutOfRange","type":"error"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"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":true,"internalType":"uint256","name":"batchId","type":"uint256"}],"name":"BatchSeeded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"DNAStolen","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"mutantId","type":"uint256"},{"indexed":true,"internalType":"uint64","name":"batchId","type":"uint64"},{"indexed":true,"internalType":"uint16","name":"boostId","type":"uint16"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint16","name":"criticality","type":"uint16"},{"internalType":"bool","name":"success","type":"bool"}],"indexed":false,"internalType":"struct DNA.ExtractionResults","name":"results","type":"tuple"}],"name":"ExtractionComplete","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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"BURNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONTRACT_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CRITICALITY_ENTROPY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MUTANT_TIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SCIENTIST_ENTROPY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_ELEMENT_ENTROPY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_RARITY_ENTROPY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"uint256[4]","name":"rarities","type":"uint256[4]"}],"internalType":"struct DNA.Boost","name":"boost","type":"tuple"}],"name":"addBoost","outputs":[],"stateMutability":"nonpayable","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":"uint64","name":"","type":"uint64"}],"name":"batch","outputs":[{"internalType":"uint256","name":"size","type":"uint256"},{"internalType":"uint256","name":"seed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"batchId","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"boosts","outputs":[{"internalType":"uint256","name":"cost","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mutantId","type":"uint256"}],"name":"completeExtraction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contracts","outputs":[{"internalType":"contract IMutants","name":"Mutants","type":"address"},{"internalType":"contract IRWaste","name":"RWaste","type":"address"},{"internalType":"contract IScales","name":"Scales","type":"address"},{"internalType":"contract IScientists","name":"Scientists","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"coolDown","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"extractionCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freeBoostConfig","outputs":[{"internalType":"uint16","name":"boostId","type":"uint16"},{"internalType":"uint64","name":"minimumBatchSize","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"functionLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getBoostCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getBoostRarities","outputs":[{"internalType":"uint256[4]","name":"","type":"uint256[4]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"mutantId","type":"uint256"}],"name":"isCooledDown","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"id","type":"bytes4"}],"name":"lockFunction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"mutantInfo","outputs":[{"internalType":"uint64","name":"batchId","type":"uint64"},{"internalType":"uint128","name":"coolDownStarted","type":"uint128"},{"internalType":"uint16","name":"boostId","type":"uint16"},{"internalType":"uint8","name":"tier","type":"uint8"},{"internalType":"bool","name":"extractionOngoing","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mutantUpgradeCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"mutantId","type":"uint256"},{"internalType":"uint16","name":"boostId","type":"uint16"}],"name":"queueExtraction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requestConfig","outputs":[{"internalType":"bytes32","name":"keyHash","type":"bytes32"},{"internalType":"uint64","name":"subId","type":"uint64"},{"internalType":"uint32","name":"callbackGasLimit","type":"uint32"},{"internalType":"uint16","name":"requestConfirmations","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requestIdToBatchId","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mutantId","type":"uint256"},{"internalType":"uint16","name":"boostId","type":"uint16"}],"name":"runExtraction","outputs":[],"stateMutability":"payable","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":"uint64","name":"_batchId","type":"uint64"}],"name":"seedBatch","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":"uint256","name":"boostId","type":"uint256"},{"components":[{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"uint256[4]","name":"rarities","type":"uint256[4]"}],"internalType":"struct DNA.Boost","name":"boost","type":"tuple"}],"name":"setBoost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IMutants","name":"Mutants","type":"address"},{"internalType":"contract IRWaste","name":"RWaste","type":"address"},{"internalType":"contract IScales","name":"Scales","type":"address"},{"internalType":"contract IScientists","name":"Scientists","type":"address"}],"internalType":"struct DNA.Contracts","name":"_contracts","type":"tuple"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"setCoolDown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"cost","type":"uint256"}],"name":"setExtractionCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint16","name":"boostId","type":"uint16"},{"internalType":"uint64","name":"minimumBatchSize","type":"uint64"}],"internalType":"struct DNA.FreeBoostConfig","name":"_freeBoostConfig","type":"tuple"}],"name":"setFreeBoostConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"cost","type":"uint256"}],"name":"setMutantUpgradeCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"keyHash","type":"bytes32"},{"internalType":"uint64","name":"subId","type":"uint64"},{"internalType":"uint32","name":"callbackGasLimit","type":"uint32"},{"internalType":"uint16","name":"requestConfirmations","type":"uint16"}],"internalType":"struct DNA.RequestConfig","name":"_requestConfig","type":"tuple"}],"name":"setRequestConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bool","name":"userFunded","type":"bool"}],"internalType":"struct DNA.VRFFundingConfig","name":"_vrfFundingConfig","type":"tuple"}],"name":"setVRFFundingConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint8","name":"tiers","type":"uint8"}],"name":"upgradeMutant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vrfFundingConfig","outputs":[{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bool","name":"userFunded","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052680821ab0d4414980000600f55682086ac351052600000601055621275006011553480156200003257600080fd5b506040516200596d3803806200596d8339810160408190526200005591620006c9565b8284620000628162000499565b506200006e33620004b2565b60016005556001600160a01b03166080526200008c60003362000504565b6001600160a01b03831660a05260408051608080820183528482526001600160401b0384166020808401829052622625a0848601526003606094850152600a879055600b80546001600160601b0319169092176a2625a000000000000000001761ffff60601b19166c030000000000000000000000001790915583518085018552600281526014908201819052600e80546001600160501b0319166214000217905584518086018652600080825286519485018752600180865260058686018190529786019390935260329585019590955291820192835260128054918201815590935280516000805160206200592d833981519152939094029283019384559051909291620001b2916000805160206200594d833981519152909101906004620005a8565b5050604080518082018252680ad78ebc5ac62000008152815160808101835260028152600a6020828101919091526023938201939093526050606082015291810191825260128054600181018255600091909152815160059091026000805160206200592d833981519152810191825592519193509162000249916000805160206200594d833981519152909101906004620005a8565b505060408051808201825268056bc75e2d631000008152815160808101835260018082526005602083810182905260149584019590955260646060840152938301918252601280549182018155600052825193026000805160206200592d83398151915281019384559051919350620002d8916000805160206200594d833981519152909101906004620005a8565b5050604080518082018252680410d586a20a4c0000815281516080810183526000808252602082810182905260329483018590526060830194909452928201908152601280546001810182559352815160059093026000805160206200592d8339815191528101938455905191935062000368916000805160206200594d833981519152909101906004620005a8565b5050604080518082018252681b1ae4d6e2ef50000081528151608081018352601481526028602082810191909152603c938201939093526050606082015291810191825260128054600181018255600091909152815160059091026000805160206200592d8339815191528101918255925191935091620003ff916000805160206200594d833981519152909101906004620005a8565b50506040805180820182526828a857425466f80000815281516080810183526000808252606460208381018290529483018190526060830152928201908152601280546001810182559352815160059093026000805160206200592d833981519152810193845590519193506200048c916000805160206200594d833981519152909101906004620005a8565b5050505050505062000813565b8051620004ae906002906020840190620005eb565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008281526004602090815260408083206001600160a01b038516845290915290205460ff16620004ae5760008281526004602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620005643390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b8260048101928215620005d9579160200282015b82811115620005d9578251825591602001919060010190620005bc565b50620005e792915062000667565b5090565b828054620005f990620007d6565b90600052602060002090601f0160209004810192826200061d5760008555620005d9565b82601f106200063857805160ff1916838001178555620005d9565b82800160010185558215620005d95791820182811115620005d9578251825591602001919060010190620005bc565b5b80821115620005e7576000815560010162000668565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b0381168114620006ac57600080fd5b919050565b80516001600160401b0381168114620006ac57600080fd5b60008060008060808587031215620006e057600080fd5b84516001600160401b0380821115620006f857600080fd5b818701915087601f8301126200070d57600080fd5b8151818111156200072257620007226200067e565b604051601f8201601f19908116603f011681019083821181831017156200074d576200074d6200067e565b81604052828152602093508a848487010111156200076a57600080fd5b600091505b828210156200078e57848201840151818301850152908301906200076f565b82821115620007a05760008484830101525b9750620007b291505087820162000694565b9450505060408501519150620007cb60608601620006b1565b905092959194509250565b600181811c90821680620007eb57607f821691505b602082108114156200080d57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a0516150ed620008406000396000612fb501526000818161103f015261109a01526150ed6000f3fe6080604052600436106103965760003560e01c806362470758116101dc578063a22cb46511610102578063e985e9c5116100a0578063f5298aca1161006f578063f5298aca14610d7b578063f5feafd914610d9b578063fac6665e14610db1578063fb38efc814610dd157600080fd5b8063e985e9c514610cbe578063f242432a14610d07578063f2fde38b14610d27578063f3606c8814610d4757600080fd5b8063bbadfe76116100dc578063bbadfe7614610c08578063d547741f14610c38578063e329ab7114610c58578063e8e5826714610c6e57600080fd5b8063a22cb46514610ba8578063a5bc369614610bc8578063aa9b503c14610be857600080fd5b8063857553cc1161017a57806391d148541161014957806391d1485414610b065780639b8fa79d14610b4c5780639d28b50614610b5f578063a217fddf14610b9357600080fd5b8063857553cc14610a42578063895eb82214610a8b5780638da5cb5b14610aab5780638ec4606114610ad357600080fd5b80636d95eac8116101b65780636d95eac814610910578063715018a6146109d957806378573d89146109ee5780637c56687a14610a2257600080fd5b8063624707581461086a5780636b20c4541461088a5780636c0f79b6146108aa57600080fd5b806336568abe116102c15780634c99c9491161025f57806352566e931161022e57806352566e93146107845780635341c2481461080a5780635dd8d8411461082a5780635e01a78f1461084a57600080fd5b80634c99c949146106ed5780634d056f6d1461070d5780634e1273f41461072357806351f2823a1461075057600080fd5b80633ccfd60b1161029b5780633ccfd60b146106475780634401fc0f1461065c5780634972134a146106ac5780634afd82e7146106cd57600080fd5b806336568abe146105e55780633b8caedc146106055780633bb796411461063257600080fd5b8063248a9ca3116103395780632eb2c2d6116103085780632eb2c2d6146105655780632f2ff15d146105855780633327b09e146105a557806334531828146105c557600080fd5b8063248a9ca3146104c1578063282c51f3146104f15780632a2ae6b7146105255780632d1216321461054557600080fd5b80630e89341c116103755780630e89341c146104205780631d8d78611461044d5780631e82ab3c1461046d5780631fe543e3146104a157600080fd5b8062fdd58e1461039b57806301ffc9a7146103ce57806302fe5305146103fe575b600080fd5b3480156103a757600080fd5b506103bb6103b636600461426d565b610df1565b6040519081526020015b60405180910390f35b3480156103da57600080fd5b506103ee6103e93660046142af565b610e9a565b60405190151581526020016103c5565b34801561040a57600080fd5b5061041e6104193660046142cc565b610eab565b005b34801561042c57600080fd5b5061044061043b36600461433e565b610f35565b6040516103c591906143af565b34801561045957600080fd5b5061041e61046836600461433e565b610fc9565b34801561047957600080fd5b506103bb7f8ad427a21502aebf6bacf91a43e4ebac191569fe283d1788426ef8757807947281565b3480156104ad57600080fd5b5061041e6104bc36600461449a565b611034565b3480156104cd57600080fd5b506103bb6104dc36600461433e565b60009081526004602052604090206001015490565b3480156104fd57600080fd5b506103bb7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b34801561053157600080fd5b5061041e6105403660046144f9565b6110d5565b34801561055157600080fd5b506103ee61056036600461433e565b6110f3565b34801561057157600080fd5b5061041e610580366004614589565b611137565b34801561059157600080fd5b5061041e6105a0366004614637565b6111d9565b3480156105b157600080fd5b5061041e6105c0366004614679565b6111fe565b3480156105d157600080fd5b5061041e6105e03660046142af565b611251565b3480156105f157600080fd5b5061041e610600366004614637565b611282565b34801561061157600080fd5b5061062561062036600461433e565b61130a565b6040516103c59190614695565b34801561063e57600080fd5b506103bb600681565b34801561065357600080fd5b5061041e6113a6565b34801561066857600080fd5b5061069361067736600461433e565b60166020526000908152604090205467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016103c5565b3480156106b857600080fd5b506013546106939067ffffffffffffffff1681565b3480156106d957600080fd5b506103bb6106e836600461433e565b6113be565b3480156106f957600080fd5b5061041e6107083660046146d6565b6113e4565b34801561071957600080fd5b506103bb60115481565b34801561072f57600080fd5b5061074361073e3660046146fb565b611451565b6040516103c591906147f9565b34801561075c57600080fd5b506103bb7fecd1375979ac48cac4e35c6296552e31cd1b133c7bf4ab3d835f100eaed90a2881565b34801561079057600080fd5b50600a54600b546107d2919067ffffffffffffffff81169068010000000000000000810463ffffffff16906c01000000000000000000000000900461ffff1684565b6040805194855267ffffffffffffffff909316602085015263ffffffff9091169183019190915261ffff1660608201526080016103c5565b34801561081657600080fd5b5061041e610825366004614679565b61158f565b34801561083657600080fd5b5061041e61084536600461481e565b6115a7565b34801561085657600080fd5b5061041e610865366004614850565b61164d565b34801561087657600080fd5b5061041e61088536600461486d565b6116d4565b34801561089657600080fd5b5061041e6108a5366004614898565b611904565b3480156108b657600080fd5b506006546007546008546009546108dd936001600160a01b03908116938116928116911684565b604080516001600160a01b03958616815293851660208501529184169183019190915290911660608201526080016103c5565b34801561091c57600080fd5b5061098861092b36600461433e565b60156020526000908152604090205467ffffffffffffffff8116906fffffffffffffffffffffffffffffffff680100000000000000008204169061ffff600160c01b8204169060ff600160d01b8204811691600160d81b90041685565b6040805167ffffffffffffffff90961686526fffffffffffffffffffffffffffffffff909416602086015261ffff9092169284019290925260ff90911660608301521515608082015260a0016103c5565b3480156109e557600080fd5b5061041e611974565b3480156109fa57600080fd5b506103bb7f910202e0db33e280110131d2a8d4d44c4dba99fae6b2dca7c31763febc6c494c81565b348015610a2e57600080fd5b5061041e610a3d36600461433e565b6119da565b348015610a4e57600080fd5b50610a76610a5d366004614850565b6014602052600090815260409020805460019091015482565b604080519283526020830191909152016103c5565b348015610a9757600080fd5b5061041e610aa63660046144f9565b611a45565b348015610ab757600080fd5b506003546040516001600160a01b0390911681526020016103c5565b348015610adf57600080fd5b50600c54600d54610af1919060ff1682565b604080519283529015156020830152016103c5565b348015610b1257600080fd5b506103ee610b21366004614637565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61041e610b5a3660046146d6565b611a98565b348015610b6b57600080fd5b506103bb7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a3130081565b348015610b9f57600080fd5b506103bb600081565b348015610bb457600080fd5b5061041e610bc336600461491c565b611ba2565b348015610bd457600080fd5b506103bb610be336600461433e565b611bad565b348015610bf457600080fd5b5061041e610c0336600461494a565b611c17565b348015610c1457600080fd5b506103ee610c233660046142af565b60176020526000908152604090205460ff1681565b348015610c4457600080fd5b5061041e610c53366004614637565b611cd7565b348015610c6457600080fd5b506103bb60105481565b348015610c7a57600080fd5b50600e54610c9b9061ffff81169062010000900467ffffffffffffffff1682565b6040805161ffff909316835267ffffffffffffffff9091166020830152016103c5565b348015610cca57600080fd5b506103ee610cd9366004614977565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b348015610d1357600080fd5b5061041e610d223660046149a5565b611cfc565b348015610d3357600080fd5b5061041e610d42366004614a0e565b611d97565b348015610d5357600080fd5b506103bb7f90808729655f2ef7d78076f4064f489ce2fbe7855f90e1f8134baa6a61b4458d81565b348015610d8757600080fd5b5061041e610d96366004614a2b565b611e76565b348015610da757600080fd5b506103bb600f5481565b348015610dbd57600080fd5b5061041e610dcc36600461433e565b611ee6565b348015610ddd57600080fd5b5061041e610dec36600461433e565b611f51565b60006001600160a01b038316610e745760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b6000610ea5826125f9565b92915050565b600080356001600160e01b03191681526017602052604090205460ff1615610ee657604051639c568c2760e01b815260040160405180910390fd5b6000610ef181612637565b610f3083838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061264192505050565b505050565b606060028054610f4490614a60565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7090614a60565b8015610fbd5780601f10610f9257610100808354040283529160200191610fbd565b820191906000526020600020905b815481529060010190602001808311610fa057829003601f168201915b50505050509050919050565b600080356001600160e01b03191681526017602052604090205460ff161561100457604051639c568c2760e01b815260040160405180910390fd5b7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a3130061102e81612637565b50600f55565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146110c7576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166024820152604401610e6b565b6110d18282612654565b5050565b60006110e081612637565b81600a6110ed8282614a95565b50505050565b601154600082815260156020526040812054909190611130906801000000000000000090046fffffffffffffffffffffffffffffffff1642614b89565b1192915050565b6001600160a01b03851633148061115357506111538533610cd9565b6111c55760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610e6b565b6111d285858585856126d9565b5050505050565b6000828152600460205260409020600101546111f481612637565b610f308383612977565b600080356001600160e01b03191681526017602052604090205460ff161561123957604051639c568c2760e01b815260040160405180910390fd5b600061124481612637565b81600e6110ed8282614ba0565b600061125c81612637565b506001600160e01b0319166000908152601760205260409020805460ff19166001179055565b6001600160a01b03811633146113005760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610e6b565b6110d18282612a19565b6113126141a1565b601254821061134d576040517fe453f4ae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6012828154811061136057611360614c28565b60009182526020909120604080516080810191829052926005029091016001019060049082845b8154815260200190600101908083116113875750505050509050919050565b60006113b181612637565b6113bb3347612a9c565b50565b601281815481106113ce57600080fd5b6000918252602090912060059091020154905081565b600260055414156114375760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e6b565b600260055561144882826000612bb5565b50506001600555565b606081518351146114ca5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610e6b565b6000835167ffffffffffffffff8111156114e6576114e66143c2565b60405190808252806020026020018201604052801561150f578160200160208202803683370190505b50905060005b84518110156115875761155a85828151811061153357611533614c28565b602002602001015185838151811061154d5761154d614c28565b6020026020010151610df1565b82828151811061156c5761156c614c28565b602090810291909101015261158081614c3e565b9050611515565b509392505050565b600061159a81612637565b81600c6110ed8282614c59565b600080356001600160e01b03191681526017602052604090205460ff16156115e257604051639c568c2760e01b815260040160405180910390fd5b7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a3130061160c81612637565b6012805460018101825560009190915282906005027fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec3444016110ed8282614ca4565b7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a3130061167781612637565b67ffffffffffffffff8216600090815260146020526040902060010154156116cb576040517feabc32b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110d182612f30565b6006546040516331a9108f60e11b8152600481018490526001600160a01b0390911690636352211e90602401602060405180830381865afa15801561171d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117419190614cd1565b6001600160a01b0316336001600160a01b03161461178b576040517f46dc0e8200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152601560205260409020546006906117b2908390600160d01b900460ff16614cee565b60ff1611156117ed576040517fe824d00700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260156020526040902054600160d81b900460ff161561183d576040517f99738ef700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6008546001600160a01b031663af7d6ca3338360ff16600f546118609190614c85565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156118a657600080fd5b505af11580156118ba573d6000803e3d6000fd5b50505060008381526015602052604090208054839250601a906118e8908490600160d01b900460ff16614cee565b92506101000a81548160ff021916908360ff1602179055505050565b600080356001600160e01b03191681526017602052604090205460ff161561193f57604051639c568c2760e01b815260040160405180910390fd5b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84861196981612637565b6110ed848484613091565b6003546001600160a01b031633146119ce5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e6b565b6119d8600061331c565b565b600080356001600160e01b03191681526017602052604090205460ff1615611a1557604051639c568c2760e01b815260040160405180910390fd5b7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a31300611a3f81612637565b50601155565b600080356001600160e01b03191681526017602052604090205460ff1615611a8057604051639c568c2760e01b815260040160405180910390fd5b6000611a8b81612637565b8160066110ed8282614d13565b60026005541415611aeb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e6b565b6002600555600d5460ff168015611b045750600c543414155b15611b3b576040517f93c618ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e5460135467ffffffffffffffff908116600090815260146020526040902054620100009092041610611b828382611b745783611b7c565b600e5461ffff165b83612bb5565b601354611b989067ffffffffffffffff16612f30565b5050600160055550565b6110d133838361337b565b6012546000908210611beb576040517fe453f4ae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60128281548110611bfe57611bfe614c28565b9060005260206000209060050201600001549050919050565b600080356001600160e01b03191681526017602052604090205460ff1615611c5257604051639c568c2760e01b815260040160405180910390fd5b7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a31300611c7c81612637565b60125483101580611c8b575082155b15611ca9576040516311275e7160e21b815260040160405180910390fd5b8160128481548110611cbd57611cbd614c28565b906000526020600020906005020181816111d29190614ca4565b600082815260046020526040902060010154611cf281612637565b610f308383612a19565b6001600160a01b038516331480611d185750611d188533610cd9565b611d8a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f76656400000000000000000000000000000000000000000000006064820152608401610e6b565b6111d28585858585613470565b6003546001600160a01b03163314611df15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e6b565b6001600160a01b038116611e6d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610e6b565b6113bb8161331c565b600080356001600160e01b03191681526017602052604090205460ff1615611eb157604051639c568c2760e01b815260040160405180910390fd5b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848611edb81612637565b6110ed848484613646565b600080356001600160e01b03191681526017602052604090205460ff1615611f2157604051639c568c2760e01b815260040160405180910390fd5b7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a31300611f4b81612637565b50601055565b60026005541415611fa45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e6b565b600260055560008181526015602052604090208054600160d81b900460ff16611ff9576040517fabc498f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006546040516331a9108f60e11b8152600481018490526001600160a01b0390911690636352211e90602401602060405180830381865afa158015612042573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120669190614cd1565b6001600160a01b0316336001600160a01b0316141580156120ae57506120ac7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a3130033610b21565b155b156120e5576040517f451fd8b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805467ffffffffffffffff166000908152601460205260409020600101548061213a576040517fb90db5cc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516020810183905290810184905260009060600160408051601f1981840301815282825280516020918201206060840183526000808552918401829052918301529150835461219790600160d01b900460ff166002614cee565b60ff166121a5600a84614df4565b1060408201819052156124b25783546121ca908390600160c01b900461ffff166137fa565b815260405160649061220b9084907f8ad427a21502aebf6bacf91a43e4ebac191569fe283d1788426ef8757807947290602001918252602082015260400190565b6040516020818303038152906040528051906020012060001c61222e9190614df4565b61ffff1660208201819052612388576009546040516000916001600160a01b0316906399c04c019061228f9086907f910202e0db33e280110131d2a8d4d44c4dba99fae6b2dca7c31763febc6c494c90602001918252602082015260400190565b60408051808303601f1901815290829052805160209091012060e083901b6001600160e01b031916825260048201526024016020604051808303816000875af11580156122e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123049190614cd1565b90506123268183600001516001604051806020016040528060008152506139b4565b84547fffffffffffffffff00000000000000000000000000000000ffffffffffffffff16855581516040516001600160a01b038316907fce9f81550f8c94a80bcef34d64abe906392273a6d650a92900565c4eac2cdfc590600090a350612559565b6006546040516331a9108f60e11b8152600481018790526000916001600160a01b031690636352211e90602401602060405180830381865afa1580156123d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f69190614cd1565b90506124188183600001516001604051806020016040528060008152506139b4565b816020015161ffff16606314156124ac576008546010546040517fef6506db0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482019290925291169063ef6506db90604401600060405180830381600087803b15801561249357600080fd5b505af11580156124a7573d6000803e3d6000fd5b505050505b50612559565b6009546010546040517f833e8bb60000000000000000000000000000000000000000000000000000000081526001600160a01b039092169163833e8bb6916125009160040190815260200190565b600060405180830381600087803b15801561251a57600080fd5b505af115801561252e573d6000803e3d6000fd5b505085547fffffffffffffffff00000000000000000000000000000000ffffffffffffffff16865550505b83547fffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffff8116808655604080518451815260208086015161ffff9081169183019190915285830151151592820192909252600160c01b909204169167ffffffffffffffff169087907f72ebf13b7e83b976d8f0af3ee089b4a5dff0f78fd3fe1c86909eb499f87f08ca9060600160405180910390a450506001600555505050565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610ea55750610ea582613adb565b6113bb8133613b76565b80516110d19060029060208401906141bf565b600082815260166020526040812054825167ffffffffffffffff90911691839161268057612680614c28565b60209081029190910181015167ffffffffffffffff831660008181526014909352604080842060010192909255905190917fd49bf0fafbceb18072a10e504cc11517c6cd48e9b5cdf92f9c27adba0487a16f91a2505050565b81518351146127505760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152608401610e6b565b6001600160a01b0384166127cc5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610e6b565b3360005b84518110156129095760008582815181106127ed576127ed614c28565b60200260200101519050600085838151811061280b5761280b614c28565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156128b15760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610e6b565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906128ee908490614e16565b925050819055505050508061290290614c3e565b90506127d0565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612959929190614e2e565b60405180910390a461296f818787878787613bf6565b505050505050565b60008281526004602090815260408083206001600160a01b038516845290915290205460ff166110d15760008281526004602090815260408083206001600160a01b03851684529091529020805460ff191660011790556129d53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526004602090815260408083206001600160a01b038516845290915290205460ff16156110d15760008281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b80471015612aec5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610e6b565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612b39576040519150601f19603f3d011682016040523d82523d6000602084013e612b3e565b606091505b5050905080610f305760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610e6b565b6006546040516331a9108f60e11b8152600481018590526001600160a01b0390911690636352211e90602401602060405180830381865afa158015612bfe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c229190614cd1565b6001600160a01b0316336001600160a01b031614612c6c576040517f451fd8b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60125461ffff831610612c92576040516311275e7160e21b815260040160405180910390fd5b6000838152601560205260409020612ca9846110f3565b612cdf576040517fc596abf500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054600160d81b900460ff1615612d22576040517f99738ef700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6008546001600160a01b031663af7d6ca3336010546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612d7d57600080fd5b505af1158015612d91573d6000803e3d6000fd5b50505050600060128461ffff1681548110612dae57612dae614c28565b906000526020600020906005020160000154118015612dcb575081155b15612e69576007546001600160a01b0316639dc29fac3360128661ffff1681548110612df957612df9614c28565b60009182526020909120600590910201546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612e5057600080fd5b505af1158015612e64573d6000803e3d6000fd5b505050505b60135467ffffffffffffffff1660009081526014602052604081208054909190612e9290614c3e565b9091555060135481546fffffffffffffffffffffffffffffffff421668010000000000000000027fffffffff00ffffff00000000000000000000000000000000ffffffffffffffff61ffff909616600160c01b027fffffffffffff0000ffffffffffffffffffffffffffffffff000000000000000090921667ffffffffffffffff90931692909217179390931692909217600160d81b179091555050565b600a54600b546040517f5d3b1d30000000000000000000000000000000000000000000000000000000008152600481019290925267ffffffffffffffff811660248301526c01000000000000000000000000810461ffff16604483015268010000000000000000900463ffffffff1660648201526001608482015281906016906000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635d3b1d309060a4016020604051808303816000875af1158015613006573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061302a9190614e5c565b815260208101919091526040016000908120805467ffffffffffffffff191667ffffffffffffffff9384161790556013805490926130689116614e75565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b6001600160a01b03831661310d5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610e6b565b80518251146131845760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152608401610e6b565b604080516020810190915260009081905233905b83518110156132af5760008482815181106131b5576131b5614c28565b6020026020010151905060008483815181106131d3576131d3614c28565b602090810291909101810151600084815280835260408082206001600160a01b038c1683529093529190912054909150818110156132785760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e6365000000000000000000000000000000000000000000000000000000006064820152608401610e6b565b6000928352602083815260408085206001600160a01b038b16865290915290922091039055806132a781614c3e565b915050613198565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051613300929190614e2e565b60405180910390a46040805160208101909152600090526110ed565b600380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156134035760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610e6b565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166134ec5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610e6b565b3360006134f885613de3565b9050600061350585613de3565b90506000868152602081815260408083206001600160a01b038c1684529091529020548581101561359e5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610e6b565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906135db908490614e16565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461363b848a8a8a8a8a613e2e565b505050505050505050565b6001600160a01b0383166136c25760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610e6b565b3360006136ce84613de3565b905060006136db84613de3565b60408051602080820183526000918290528882528181528282206001600160a01b038b168352905220549091508481101561377d5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e6365000000000000000000000000000000000000000000000000000000006064820152608401610e6b565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090525b50505050505050565b601254600090821061381f576040516311275e7160e21b815260040160405180910390fd5b60006064847f90808729655f2ef7d78076f4064f489ce2fbe7855f90e1f8134baa6a61b4458d60405160200161385f929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6138829190614df4565b905060006012848154811061389957613899614c28565b60009182526020909120604080516080810191829052926005029091016001019060049082845b8154815260200190600101908083116138c057505050505090506000816003600481106138ef576138ef614c28565b6020020151831061390257506004613934565b6040820151831061391557506003613934565b6020820151831061392857506002613934565b81518310613934575060015b6005867fecd1375979ac48cac4e35c6296552e31cd1b133c7bf4ab3d835f100eaed90a28604051602001613972929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6139959190614df4565b6139a0826005614c85565b6139aa9190614e16565b9695505050505050565b6001600160a01b038416613a305760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610e6b565b336000613a3c85613de3565b90506000613a4985613de3565b90506000868152602081815260408083206001600160a01b038b16845290915281208054879290613a7b908490614e16565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46137f183600089898989613e2e565b60006001600160e01b031982167fd9b67a26000000000000000000000000000000000000000000000000000000001480613b3e57506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b80610ea557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610ea5565b60008281526004602090815260408083206001600160a01b038516845290915290205460ff166110d157613bb4816001600160a01b03166014613f71565b613bbf836020613f71565b604051602001613bd0929190614e9d565b60408051601f198184030181529082905262461bcd60e51b8252610e6b916004016143af565b6001600160a01b0384163b1561296f576040517fbc197c810000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063bc197c8190613c539089908990889088908890600401614f1e565b6020604051808303816000875af1925050508015613c8e575060408051601f3d908101601f19168201909252613c8b91810190614f7c565b60015b613d4457613c9a614f99565b806308c379a01415613cd45750613caf614fb5565b80613cba5750613cd6565b8060405162461bcd60e51b8152600401610e6b91906143af565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610e6b565b6001600160e01b031981167fbc197c8100000000000000000000000000000000000000000000000000000000146137f15760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610e6b565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613e1d57613e1d614c28565b602090810291909101015292915050565b6001600160a01b0384163b1561296f576040517ff23a6e610000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063f23a6e6190613e8b908990899088908890889060040161505d565b6020604051808303816000875af1925050508015613ec6575060408051601f3d908101601f19168201909252613ec391810190614f7c565b60015b613ed257613c9a614f99565b6001600160e01b031981167ff23a6e6100000000000000000000000000000000000000000000000000000000146137f15760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610e6b565b60606000613f80836002614c85565b613f8b906002614e16565b67ffffffffffffffff811115613fa357613fa36143c2565b6040519080825280601f01601f191660200182016040528015613fcd576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061400457614004614c28565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061406757614067614c28565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006140a3846002614c85565b6140ae906001614e16565b90505b600181111561414b577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106140ef576140ef614c28565b1a60f81b82828151811061410557614105614c28565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93614144816150a0565b90506140b1565b50831561419a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610e6b565b9392505050565b60405180608001604052806004906020820280368337509192915050565b8280546141cb90614a60565b90600052602060002090601f0160209004810192826141ed5760008555614233565b82601f1061420657805160ff1916838001178555614233565b82800160010185558215614233579182015b82811115614233578251825591602001919060010190614218565b5061423f929150614243565b5090565b5b8082111561423f5760008155600101614244565b6001600160a01b03811681146113bb57600080fd5b6000806040838503121561428057600080fd5b823561428b81614258565b946020939093013593505050565b6001600160e01b0319811681146113bb57600080fd5b6000602082840312156142c157600080fd5b813561419a81614299565b600080602083850312156142df57600080fd5b823567ffffffffffffffff808211156142f757600080fd5b818501915085601f83011261430b57600080fd5b81358181111561431a57600080fd5b86602082850101111561432c57600080fd5b60209290920196919550909350505050565b60006020828403121561435057600080fd5b5035919050565b60005b8381101561437257818101518382015260200161435a565b838111156110ed5750506000910152565b6000815180845261439b816020860160208601614357565b601f01601f19169290920160200192915050565b60208152600061419a6020830184614383565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff821117156143fe576143fe6143c2565b6040525050565b600067ffffffffffffffff82111561441f5761441f6143c2565b5060051b60200190565b600082601f83011261443a57600080fd5b8135602061444782614405565b60405161445482826143d8565b83815260059390931b850182019282810191508684111561447457600080fd5b8286015b8481101561448f5780358352918301918301614478565b509695505050505050565b600080604083850312156144ad57600080fd5b82359150602083013567ffffffffffffffff8111156144cb57600080fd5b6144d785828601614429565b9150509250929050565b6000608082840312156144f357600080fd5b50919050565b60006080828403121561450b57600080fd5b61419a83836144e1565b600082601f83011261452657600080fd5b813567ffffffffffffffff811115614540576145406143c2565b6040516145576020601f19601f85011601826143d8565b81815284602083860101111561456c57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156145a157600080fd5b85356145ac81614258565b945060208601356145bc81614258565b9350604086013567ffffffffffffffff808211156145d957600080fd5b6145e589838a01614429565b945060608801359150808211156145fb57600080fd5b61460789838a01614429565b9350608088013591508082111561461d57600080fd5b5061462a88828901614515565b9150509295509295909350565b6000806040838503121561464a57600080fd5b82359150602083013561465c81614258565b809150509250929050565b6000604082840312156144f357600080fd5b60006040828403121561468b57600080fd5b61419a8383614667565b60808101818360005b60048110156146bd57815183526020928301929091019060010161469e565b50505092915050565b61ffff811681146113bb57600080fd5b600080604083850312156146e957600080fd5b82359150602083013561465c816146c6565b6000806040838503121561470e57600080fd5b823567ffffffffffffffff8082111561472657600080fd5b818501915085601f83011261473a57600080fd5b8135602061474782614405565b60405161475482826143d8565b83815260059390931b850182019282810191508984111561477457600080fd5b948201945b8386101561479b57853561478c81614258565b82529482019490820190614779565b965050860135925050808211156147b157600080fd5b506144d785828601614429565b600081518084526020808501945080840160005b838110156147ee578151875295820195908201906001016147d2565b509495945050505050565b60208152600061419a60208301846147be565b600060a082840312156144f357600080fd5b600060a0828403121561483057600080fd5b61419a838361480c565b67ffffffffffffffff811681146113bb57600080fd5b60006020828403121561486257600080fd5b813561419a8161483a565b6000806040838503121561488057600080fd5b82359150602083013560ff8116811461465c57600080fd5b6000806000606084860312156148ad57600080fd5b83356148b881614258565b9250602084013567ffffffffffffffff808211156148d557600080fd5b6148e187838801614429565b935060408601359150808211156148f757600080fd5b5061490486828701614429565b9150509250925092565b80151581146113bb57600080fd5b6000806040838503121561492f57600080fd5b823561493a81614258565b9150602083013561465c8161490e565b60008060c0838503121561495d57600080fd5b8235915061496e846020850161480c565b90509250929050565b6000806040838503121561498a57600080fd5b823561499581614258565b9150602083013561465c81614258565b600080600080600060a086880312156149bd57600080fd5b85356149c881614258565b945060208601356149d881614258565b93506040860135925060608601359150608086013567ffffffffffffffff811115614a0257600080fd5b61462a88828901614515565b600060208284031215614a2057600080fd5b813561419a81614258565b600080600060608486031215614a4057600080fd5b8335614a4b81614258565b95602085013595506040909401359392505050565b600181811c90821680614a7457607f821691505b602082108114156144f357634e487b7160e01b600052602260045260246000fd5b81358155600181016020830135614aab8161483a565b67ffffffffffffffff8116905081548167ffffffffffffffff198216178355604085013563ffffffff81168114614ae157600080fd5b6bffffffff00000000000000008160401b16905080837fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008416171784556060860135614b2c816146c6565b6dffff0000000000000000000000008160601b16847fffffffffffffffffffffffffffffffffffff0000000000000000000000000000851617831717855550505050505050565b634e487b7160e01b600052601160045260246000fd5b600082821015614b9b57614b9b614b73565b500390565b8135614bab816146c6565b61ffff811690508154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000082161783556020840135614be98161483a565b69ffffffffffffffff00008160101b16837fffffffffffffffffffffffffffffffffffffffffffff000000000000000000008416171784555050505050565b634e487b7160e01b600052603260045260246000fd5b6000600019821415614c5257614c52614b73565b5060010190565b81358155600181016020830135614c6f8161490e565b815490151560ff1660ff19919091161790555050565b6000816000190483118215151615614c9f57614c9f614b73565b500290565b813581556001602080840182840160005b60048110156137f1578235825591830191908401908401614cb5565b600060208284031215614ce357600080fd5b815161419a81614258565b600060ff821660ff84168060ff03821115614d0b57614d0b614b73565b019392505050565b8135614d1e81614258565b815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038216178255506020820135614d5381614258565b60018201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316179055506040820135614d8c81614258565b60028201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316179055506060820135614dc581614258565b60038201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316179055505050565b600082614e1157634e487b7160e01b600052601260045260246000fd5b500690565b60008219821115614e2957614e29614b73565b500190565b604081526000614e4160408301856147be565b8281036020840152614e5381856147be565b95945050505050565b600060208284031215614e6e57600080fd5b5051919050565b600067ffffffffffffffff80831681811415614e9357614e93614b73565b6001019392505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614ed5816017850160208801614357565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614f12816028840160208801614357565b01602801949350505050565b60006001600160a01b03808816835280871660208401525060a06040830152614f4a60a08301866147be565b8281036060840152614f5c81866147be565b90508281036080840152614f708185614383565b98975050505050505050565b600060208284031215614f8e57600080fd5b815161419a81614299565b600060033d1115614fb25760046000803e5060005160e01c5b90565b600060443d1015614fc35790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff816024840111818411171561501157505050505090565b82850191508151818111156150295750505050505090565b843d87010160208285010111156150435750505050505090565b615052602082860101876143d8565b509095945050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a0608083015261509560a0830184614383565b979650505050505050565b6000816150af576150af614b73565b50600019019056fea2646970667358221220efe6a5af2c9943b9ac163275ab88a4e1867d01def0e1e4bc814fd4d91f3c880064736f6c634300080b0033bb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec3444bb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34450000000000000000000000000000000000000000000000000000000000000080000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699098af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000005968747470733a2f2f6175676d696e7465642e6d7970696e6174612e636c6f75642f697066732f516d59674d6a3968454252376f4e4b63726259677a5a4139674a6a31414b716b68756d7a674263554c5a673863642f7b69647d00000000000000

Deployed Bytecode

0x6080604052600436106103965760003560e01c806362470758116101dc578063a22cb46511610102578063e985e9c5116100a0578063f5298aca1161006f578063f5298aca14610d7b578063f5feafd914610d9b578063fac6665e14610db1578063fb38efc814610dd157600080fd5b8063e985e9c514610cbe578063f242432a14610d07578063f2fde38b14610d27578063f3606c8814610d4757600080fd5b8063bbadfe76116100dc578063bbadfe7614610c08578063d547741f14610c38578063e329ab7114610c58578063e8e5826714610c6e57600080fd5b8063a22cb46514610ba8578063a5bc369614610bc8578063aa9b503c14610be857600080fd5b8063857553cc1161017a57806391d148541161014957806391d1485414610b065780639b8fa79d14610b4c5780639d28b50614610b5f578063a217fddf14610b9357600080fd5b8063857553cc14610a42578063895eb82214610a8b5780638da5cb5b14610aab5780638ec4606114610ad357600080fd5b80636d95eac8116101b65780636d95eac814610910578063715018a6146109d957806378573d89146109ee5780637c56687a14610a2257600080fd5b8063624707581461086a5780636b20c4541461088a5780636c0f79b6146108aa57600080fd5b806336568abe116102c15780634c99c9491161025f57806352566e931161022e57806352566e93146107845780635341c2481461080a5780635dd8d8411461082a5780635e01a78f1461084a57600080fd5b80634c99c949146106ed5780634d056f6d1461070d5780634e1273f41461072357806351f2823a1461075057600080fd5b80633ccfd60b1161029b5780633ccfd60b146106475780634401fc0f1461065c5780634972134a146106ac5780634afd82e7146106cd57600080fd5b806336568abe146105e55780633b8caedc146106055780633bb796411461063257600080fd5b8063248a9ca3116103395780632eb2c2d6116103085780632eb2c2d6146105655780632f2ff15d146105855780633327b09e146105a557806334531828146105c557600080fd5b8063248a9ca3146104c1578063282c51f3146104f15780632a2ae6b7146105255780632d1216321461054557600080fd5b80630e89341c116103755780630e89341c146104205780631d8d78611461044d5780631e82ab3c1461046d5780631fe543e3146104a157600080fd5b8062fdd58e1461039b57806301ffc9a7146103ce57806302fe5305146103fe575b600080fd5b3480156103a757600080fd5b506103bb6103b636600461426d565b610df1565b6040519081526020015b60405180910390f35b3480156103da57600080fd5b506103ee6103e93660046142af565b610e9a565b60405190151581526020016103c5565b34801561040a57600080fd5b5061041e6104193660046142cc565b610eab565b005b34801561042c57600080fd5b5061044061043b36600461433e565b610f35565b6040516103c591906143af565b34801561045957600080fd5b5061041e61046836600461433e565b610fc9565b34801561047957600080fd5b506103bb7f8ad427a21502aebf6bacf91a43e4ebac191569fe283d1788426ef8757807947281565b3480156104ad57600080fd5b5061041e6104bc36600461449a565b611034565b3480156104cd57600080fd5b506103bb6104dc36600461433e565b60009081526004602052604090206001015490565b3480156104fd57600080fd5b506103bb7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b34801561053157600080fd5b5061041e6105403660046144f9565b6110d5565b34801561055157600080fd5b506103ee61056036600461433e565b6110f3565b34801561057157600080fd5b5061041e610580366004614589565b611137565b34801561059157600080fd5b5061041e6105a0366004614637565b6111d9565b3480156105b157600080fd5b5061041e6105c0366004614679565b6111fe565b3480156105d157600080fd5b5061041e6105e03660046142af565b611251565b3480156105f157600080fd5b5061041e610600366004614637565b611282565b34801561061157600080fd5b5061062561062036600461433e565b61130a565b6040516103c59190614695565b34801561063e57600080fd5b506103bb600681565b34801561065357600080fd5b5061041e6113a6565b34801561066857600080fd5b5061069361067736600461433e565b60166020526000908152604090205467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016103c5565b3480156106b857600080fd5b506013546106939067ffffffffffffffff1681565b3480156106d957600080fd5b506103bb6106e836600461433e565b6113be565b3480156106f957600080fd5b5061041e6107083660046146d6565b6113e4565b34801561071957600080fd5b506103bb60115481565b34801561072f57600080fd5b5061074361073e3660046146fb565b611451565b6040516103c591906147f9565b34801561075c57600080fd5b506103bb7fecd1375979ac48cac4e35c6296552e31cd1b133c7bf4ab3d835f100eaed90a2881565b34801561079057600080fd5b50600a54600b546107d2919067ffffffffffffffff81169068010000000000000000810463ffffffff16906c01000000000000000000000000900461ffff1684565b6040805194855267ffffffffffffffff909316602085015263ffffffff9091169183019190915261ffff1660608201526080016103c5565b34801561081657600080fd5b5061041e610825366004614679565b61158f565b34801561083657600080fd5b5061041e61084536600461481e565b6115a7565b34801561085657600080fd5b5061041e610865366004614850565b61164d565b34801561087657600080fd5b5061041e61088536600461486d565b6116d4565b34801561089657600080fd5b5061041e6108a5366004614898565b611904565b3480156108b657600080fd5b506006546007546008546009546108dd936001600160a01b03908116938116928116911684565b604080516001600160a01b03958616815293851660208501529184169183019190915290911660608201526080016103c5565b34801561091c57600080fd5b5061098861092b36600461433e565b60156020526000908152604090205467ffffffffffffffff8116906fffffffffffffffffffffffffffffffff680100000000000000008204169061ffff600160c01b8204169060ff600160d01b8204811691600160d81b90041685565b6040805167ffffffffffffffff90961686526fffffffffffffffffffffffffffffffff909416602086015261ffff9092169284019290925260ff90911660608301521515608082015260a0016103c5565b3480156109e557600080fd5b5061041e611974565b3480156109fa57600080fd5b506103bb7f910202e0db33e280110131d2a8d4d44c4dba99fae6b2dca7c31763febc6c494c81565b348015610a2e57600080fd5b5061041e610a3d36600461433e565b6119da565b348015610a4e57600080fd5b50610a76610a5d366004614850565b6014602052600090815260409020805460019091015482565b604080519283526020830191909152016103c5565b348015610a9757600080fd5b5061041e610aa63660046144f9565b611a45565b348015610ab757600080fd5b506003546040516001600160a01b0390911681526020016103c5565b348015610adf57600080fd5b50600c54600d54610af1919060ff1682565b604080519283529015156020830152016103c5565b348015610b1257600080fd5b506103ee610b21366004614637565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61041e610b5a3660046146d6565b611a98565b348015610b6b57600080fd5b506103bb7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a3130081565b348015610b9f57600080fd5b506103bb600081565b348015610bb457600080fd5b5061041e610bc336600461491c565b611ba2565b348015610bd457600080fd5b506103bb610be336600461433e565b611bad565b348015610bf457600080fd5b5061041e610c0336600461494a565b611c17565b348015610c1457600080fd5b506103ee610c233660046142af565b60176020526000908152604090205460ff1681565b348015610c4457600080fd5b5061041e610c53366004614637565b611cd7565b348015610c6457600080fd5b506103bb60105481565b348015610c7a57600080fd5b50600e54610c9b9061ffff81169062010000900467ffffffffffffffff1682565b6040805161ffff909316835267ffffffffffffffff9091166020830152016103c5565b348015610cca57600080fd5b506103ee610cd9366004614977565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b348015610d1357600080fd5b5061041e610d223660046149a5565b611cfc565b348015610d3357600080fd5b5061041e610d42366004614a0e565b611d97565b348015610d5357600080fd5b506103bb7f90808729655f2ef7d78076f4064f489ce2fbe7855f90e1f8134baa6a61b4458d81565b348015610d8757600080fd5b5061041e610d96366004614a2b565b611e76565b348015610da757600080fd5b506103bb600f5481565b348015610dbd57600080fd5b5061041e610dcc36600461433e565b611ee6565b348015610ddd57600080fd5b5061041e610dec36600461433e565b611f51565b60006001600160a01b038316610e745760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b6000610ea5826125f9565b92915050565b600080356001600160e01b03191681526017602052604090205460ff1615610ee657604051639c568c2760e01b815260040160405180910390fd5b6000610ef181612637565b610f3083838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061264192505050565b505050565b606060028054610f4490614a60565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7090614a60565b8015610fbd5780601f10610f9257610100808354040283529160200191610fbd565b820191906000526020600020905b815481529060010190602001808311610fa057829003601f168201915b50505050509050919050565b600080356001600160e01b03191681526017602052604090205460ff161561100457604051639c568c2760e01b815260040160405180910390fd5b7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a3130061102e81612637565b50600f55565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990916146110c7576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909166024820152604401610e6b565b6110d18282612654565b5050565b60006110e081612637565b81600a6110ed8282614a95565b50505050565b601154600082815260156020526040812054909190611130906801000000000000000090046fffffffffffffffffffffffffffffffff1642614b89565b1192915050565b6001600160a01b03851633148061115357506111538533610cd9565b6111c55760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610e6b565b6111d285858585856126d9565b5050505050565b6000828152600460205260409020600101546111f481612637565b610f308383612977565b600080356001600160e01b03191681526017602052604090205460ff161561123957604051639c568c2760e01b815260040160405180910390fd5b600061124481612637565b81600e6110ed8282614ba0565b600061125c81612637565b506001600160e01b0319166000908152601760205260409020805460ff19166001179055565b6001600160a01b03811633146113005760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610e6b565b6110d18282612a19565b6113126141a1565b601254821061134d576040517fe453f4ae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6012828154811061136057611360614c28565b60009182526020909120604080516080810191829052926005029091016001019060049082845b8154815260200190600101908083116113875750505050509050919050565b60006113b181612637565b6113bb3347612a9c565b50565b601281815481106113ce57600080fd5b6000918252602090912060059091020154905081565b600260055414156114375760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e6b565b600260055561144882826000612bb5565b50506001600555565b606081518351146114ca5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610e6b565b6000835167ffffffffffffffff8111156114e6576114e66143c2565b60405190808252806020026020018201604052801561150f578160200160208202803683370190505b50905060005b84518110156115875761155a85828151811061153357611533614c28565b602002602001015185838151811061154d5761154d614c28565b6020026020010151610df1565b82828151811061156c5761156c614c28565b602090810291909101015261158081614c3e565b9050611515565b509392505050565b600061159a81612637565b81600c6110ed8282614c59565b600080356001600160e01b03191681526017602052604090205460ff16156115e257604051639c568c2760e01b815260040160405180910390fd5b7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a3130061160c81612637565b6012805460018101825560009190915282906005027fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec3444016110ed8282614ca4565b7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a3130061167781612637565b67ffffffffffffffff8216600090815260146020526040902060010154156116cb576040517feabc32b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110d182612f30565b6006546040516331a9108f60e11b8152600481018490526001600160a01b0390911690636352211e90602401602060405180830381865afa15801561171d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117419190614cd1565b6001600160a01b0316336001600160a01b03161461178b576040517f46dc0e8200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152601560205260409020546006906117b2908390600160d01b900460ff16614cee565b60ff1611156117ed576040517fe824d00700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260156020526040902054600160d81b900460ff161561183d576040517f99738ef700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6008546001600160a01b031663af7d6ca3338360ff16600f546118609190614c85565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156118a657600080fd5b505af11580156118ba573d6000803e3d6000fd5b50505060008381526015602052604090208054839250601a906118e8908490600160d01b900460ff16614cee565b92506101000a81548160ff021916908360ff1602179055505050565b600080356001600160e01b03191681526017602052604090205460ff161561193f57604051639c568c2760e01b815260040160405180910390fd5b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84861196981612637565b6110ed848484613091565b6003546001600160a01b031633146119ce5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e6b565b6119d8600061331c565b565b600080356001600160e01b03191681526017602052604090205460ff1615611a1557604051639c568c2760e01b815260040160405180910390fd5b7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a31300611a3f81612637565b50601155565b600080356001600160e01b03191681526017602052604090205460ff1615611a8057604051639c568c2760e01b815260040160405180910390fd5b6000611a8b81612637565b8160066110ed8282614d13565b60026005541415611aeb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e6b565b6002600555600d5460ff168015611b045750600c543414155b15611b3b576040517f93c618ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e5460135467ffffffffffffffff908116600090815260146020526040902054620100009092041610611b828382611b745783611b7c565b600e5461ffff165b83612bb5565b601354611b989067ffffffffffffffff16612f30565b5050600160055550565b6110d133838361337b565b6012546000908210611beb576040517fe453f4ae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60128281548110611bfe57611bfe614c28565b9060005260206000209060050201600001549050919050565b600080356001600160e01b03191681526017602052604090205460ff1615611c5257604051639c568c2760e01b815260040160405180910390fd5b7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a31300611c7c81612637565b60125483101580611c8b575082155b15611ca9576040516311275e7160e21b815260040160405180910390fd5b8160128481548110611cbd57611cbd614c28565b906000526020600020906005020181816111d29190614ca4565b600082815260046020526040902060010154611cf281612637565b610f308383612a19565b6001600160a01b038516331480611d185750611d188533610cd9565b611d8a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f76656400000000000000000000000000000000000000000000006064820152608401610e6b565b6111d28585858585613470565b6003546001600160a01b03163314611df15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e6b565b6001600160a01b038116611e6d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610e6b565b6113bb8161331c565b600080356001600160e01b03191681526017602052604090205460ff1615611eb157604051639c568c2760e01b815260040160405180910390fd5b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848611edb81612637565b6110ed848484613646565b600080356001600160e01b03191681526017602052604090205460ff1615611f2157604051639c568c2760e01b815260040160405180910390fd5b7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a31300611f4b81612637565b50601055565b60026005541415611fa45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e6b565b600260055560008181526015602052604090208054600160d81b900460ff16611ff9576040517fabc498f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006546040516331a9108f60e11b8152600481018490526001600160a01b0390911690636352211e90602401602060405180830381865afa158015612042573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120669190614cd1565b6001600160a01b0316336001600160a01b0316141580156120ae57506120ac7f035e65da48e4b6c2faabe72c122dddaa62b1293c3b881aaf39996f00b0a3130033610b21565b155b156120e5576040517f451fd8b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805467ffffffffffffffff166000908152601460205260409020600101548061213a576040517fb90db5cc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516020810183905290810184905260009060600160408051601f1981840301815282825280516020918201206060840183526000808552918401829052918301529150835461219790600160d01b900460ff166002614cee565b60ff166121a5600a84614df4565b1060408201819052156124b25783546121ca908390600160c01b900461ffff166137fa565b815260405160649061220b9084907f8ad427a21502aebf6bacf91a43e4ebac191569fe283d1788426ef8757807947290602001918252602082015260400190565b6040516020818303038152906040528051906020012060001c61222e9190614df4565b61ffff1660208201819052612388576009546040516000916001600160a01b0316906399c04c019061228f9086907f910202e0db33e280110131d2a8d4d44c4dba99fae6b2dca7c31763febc6c494c90602001918252602082015260400190565b60408051808303601f1901815290829052805160209091012060e083901b6001600160e01b031916825260048201526024016020604051808303816000875af11580156122e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123049190614cd1565b90506123268183600001516001604051806020016040528060008152506139b4565b84547fffffffffffffffff00000000000000000000000000000000ffffffffffffffff16855581516040516001600160a01b038316907fce9f81550f8c94a80bcef34d64abe906392273a6d650a92900565c4eac2cdfc590600090a350612559565b6006546040516331a9108f60e11b8152600481018790526000916001600160a01b031690636352211e90602401602060405180830381865afa1580156123d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f69190614cd1565b90506124188183600001516001604051806020016040528060008152506139b4565b816020015161ffff16606314156124ac576008546010546040517fef6506db0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482019290925291169063ef6506db90604401600060405180830381600087803b15801561249357600080fd5b505af11580156124a7573d6000803e3d6000fd5b505050505b50612559565b6009546010546040517f833e8bb60000000000000000000000000000000000000000000000000000000081526001600160a01b039092169163833e8bb6916125009160040190815260200190565b600060405180830381600087803b15801561251a57600080fd5b505af115801561252e573d6000803e3d6000fd5b505085547fffffffffffffffff00000000000000000000000000000000ffffffffffffffff16865550505b83547fffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffff8116808655604080518451815260208086015161ffff9081169183019190915285830151151592820192909252600160c01b909204169167ffffffffffffffff169087907f72ebf13b7e83b976d8f0af3ee089b4a5dff0f78fd3fe1c86909eb499f87f08ca9060600160405180910390a450506001600555505050565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610ea55750610ea582613adb565b6113bb8133613b76565b80516110d19060029060208401906141bf565b600082815260166020526040812054825167ffffffffffffffff90911691839161268057612680614c28565b60209081029190910181015167ffffffffffffffff831660008181526014909352604080842060010192909255905190917fd49bf0fafbceb18072a10e504cc11517c6cd48e9b5cdf92f9c27adba0487a16f91a2505050565b81518351146127505760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152608401610e6b565b6001600160a01b0384166127cc5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610e6b565b3360005b84518110156129095760008582815181106127ed576127ed614c28565b60200260200101519050600085838151811061280b5761280b614c28565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156128b15760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610e6b565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906128ee908490614e16565b925050819055505050508061290290614c3e565b90506127d0565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612959929190614e2e565b60405180910390a461296f818787878787613bf6565b505050505050565b60008281526004602090815260408083206001600160a01b038516845290915290205460ff166110d15760008281526004602090815260408083206001600160a01b03851684529091529020805460ff191660011790556129d53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526004602090815260408083206001600160a01b038516845290915290205460ff16156110d15760008281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b80471015612aec5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610e6b565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612b39576040519150601f19603f3d011682016040523d82523d6000602084013e612b3e565b606091505b5050905080610f305760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610e6b565b6006546040516331a9108f60e11b8152600481018590526001600160a01b0390911690636352211e90602401602060405180830381865afa158015612bfe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c229190614cd1565b6001600160a01b0316336001600160a01b031614612c6c576040517f451fd8b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60125461ffff831610612c92576040516311275e7160e21b815260040160405180910390fd5b6000838152601560205260409020612ca9846110f3565b612cdf576040517fc596abf500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054600160d81b900460ff1615612d22576040517f99738ef700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6008546001600160a01b031663af7d6ca3336010546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612d7d57600080fd5b505af1158015612d91573d6000803e3d6000fd5b50505050600060128461ffff1681548110612dae57612dae614c28565b906000526020600020906005020160000154118015612dcb575081155b15612e69576007546001600160a01b0316639dc29fac3360128661ffff1681548110612df957612df9614c28565b60009182526020909120600590910201546040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612e5057600080fd5b505af1158015612e64573d6000803e3d6000fd5b505050505b60135467ffffffffffffffff1660009081526014602052604081208054909190612e9290614c3e565b9091555060135481546fffffffffffffffffffffffffffffffff421668010000000000000000027fffffffff00ffffff00000000000000000000000000000000ffffffffffffffff61ffff909616600160c01b027fffffffffffff0000ffffffffffffffffffffffffffffffff000000000000000090921667ffffffffffffffff90931692909217179390931692909217600160d81b179091555050565b600a54600b546040517f5d3b1d30000000000000000000000000000000000000000000000000000000008152600481019290925267ffffffffffffffff811660248301526c01000000000000000000000000810461ffff16604483015268010000000000000000900463ffffffff1660648201526001608482015281906016906000907f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699096001600160a01b031690635d3b1d309060a4016020604051808303816000875af1158015613006573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061302a9190614e5c565b815260208101919091526040016000908120805467ffffffffffffffff191667ffffffffffffffff9384161790556013805490926130689116614e75565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b6001600160a01b03831661310d5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610e6b565b80518251146131845760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152608401610e6b565b604080516020810190915260009081905233905b83518110156132af5760008482815181106131b5576131b5614c28565b6020026020010151905060008483815181106131d3576131d3614c28565b602090810291909101810151600084815280835260408082206001600160a01b038c1683529093529190912054909150818110156132785760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e6365000000000000000000000000000000000000000000000000000000006064820152608401610e6b565b6000928352602083815260408085206001600160a01b038b16865290915290922091039055806132a781614c3e565b915050613198565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051613300929190614e2e565b60405180910390a46040805160208101909152600090526110ed565b600380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156134035760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610e6b565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166134ec5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610e6b565b3360006134f885613de3565b9050600061350585613de3565b90506000868152602081815260408083206001600160a01b038c1684529091529020548581101561359e5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610e6b565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906135db908490614e16565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461363b848a8a8a8a8a613e2e565b505050505050505050565b6001600160a01b0383166136c25760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610e6b565b3360006136ce84613de3565b905060006136db84613de3565b60408051602080820183526000918290528882528181528282206001600160a01b038b168352905220549091508481101561377d5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e6365000000000000000000000000000000000000000000000000000000006064820152608401610e6b565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090525b50505050505050565b601254600090821061381f576040516311275e7160e21b815260040160405180910390fd5b60006064847f90808729655f2ef7d78076f4064f489ce2fbe7855f90e1f8134baa6a61b4458d60405160200161385f929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6138829190614df4565b905060006012848154811061389957613899614c28565b60009182526020909120604080516080810191829052926005029091016001019060049082845b8154815260200190600101908083116138c057505050505090506000816003600481106138ef576138ef614c28565b6020020151831061390257506004613934565b6040820151831061391557506003613934565b6020820151831061392857506002613934565b81518310613934575060015b6005867fecd1375979ac48cac4e35c6296552e31cd1b133c7bf4ab3d835f100eaed90a28604051602001613972929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6139959190614df4565b6139a0826005614c85565b6139aa9190614e16565b9695505050505050565b6001600160a01b038416613a305760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610e6b565b336000613a3c85613de3565b90506000613a4985613de3565b90506000868152602081815260408083206001600160a01b038b16845290915281208054879290613a7b908490614e16565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46137f183600089898989613e2e565b60006001600160e01b031982167fd9b67a26000000000000000000000000000000000000000000000000000000001480613b3e57506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b80610ea557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610ea5565b60008281526004602090815260408083206001600160a01b038516845290915290205460ff166110d157613bb4816001600160a01b03166014613f71565b613bbf836020613f71565b604051602001613bd0929190614e9d565b60408051601f198184030181529082905262461bcd60e51b8252610e6b916004016143af565b6001600160a01b0384163b1561296f576040517fbc197c810000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063bc197c8190613c539089908990889088908890600401614f1e565b6020604051808303816000875af1925050508015613c8e575060408051601f3d908101601f19168201909252613c8b91810190614f7c565b60015b613d4457613c9a614f99565b806308c379a01415613cd45750613caf614fb5565b80613cba5750613cd6565b8060405162461bcd60e51b8152600401610e6b91906143af565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610e6b565b6001600160e01b031981167fbc197c8100000000000000000000000000000000000000000000000000000000146137f15760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610e6b565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613e1d57613e1d614c28565b602090810291909101015292915050565b6001600160a01b0384163b1561296f576040517ff23a6e610000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063f23a6e6190613e8b908990899088908890889060040161505d565b6020604051808303816000875af1925050508015613ec6575060408051601f3d908101601f19168201909252613ec391810190614f7c565b60015b613ed257613c9a614f99565b6001600160e01b031981167ff23a6e6100000000000000000000000000000000000000000000000000000000146137f15760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610e6b565b60606000613f80836002614c85565b613f8b906002614e16565b67ffffffffffffffff811115613fa357613fa36143c2565b6040519080825280601f01601f191660200182016040528015613fcd576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061400457614004614c28565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061406757614067614c28565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006140a3846002614c85565b6140ae906001614e16565b90505b600181111561414b577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106140ef576140ef614c28565b1a60f81b82828151811061410557614105614c28565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93614144816150a0565b90506140b1565b50831561419a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610e6b565b9392505050565b60405180608001604052806004906020820280368337509192915050565b8280546141cb90614a60565b90600052602060002090601f0160209004810192826141ed5760008555614233565b82601f1061420657805160ff1916838001178555614233565b82800160010185558215614233579182015b82811115614233578251825591602001919060010190614218565b5061423f929150614243565b5090565b5b8082111561423f5760008155600101614244565b6001600160a01b03811681146113bb57600080fd5b6000806040838503121561428057600080fd5b823561428b81614258565b946020939093013593505050565b6001600160e01b0319811681146113bb57600080fd5b6000602082840312156142c157600080fd5b813561419a81614299565b600080602083850312156142df57600080fd5b823567ffffffffffffffff808211156142f757600080fd5b818501915085601f83011261430b57600080fd5b81358181111561431a57600080fd5b86602082850101111561432c57600080fd5b60209290920196919550909350505050565b60006020828403121561435057600080fd5b5035919050565b60005b8381101561437257818101518382015260200161435a565b838111156110ed5750506000910152565b6000815180845261439b816020860160208601614357565b601f01601f19169290920160200192915050565b60208152600061419a6020830184614383565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff821117156143fe576143fe6143c2565b6040525050565b600067ffffffffffffffff82111561441f5761441f6143c2565b5060051b60200190565b600082601f83011261443a57600080fd5b8135602061444782614405565b60405161445482826143d8565b83815260059390931b850182019282810191508684111561447457600080fd5b8286015b8481101561448f5780358352918301918301614478565b509695505050505050565b600080604083850312156144ad57600080fd5b82359150602083013567ffffffffffffffff8111156144cb57600080fd5b6144d785828601614429565b9150509250929050565b6000608082840312156144f357600080fd5b50919050565b60006080828403121561450b57600080fd5b61419a83836144e1565b600082601f83011261452657600080fd5b813567ffffffffffffffff811115614540576145406143c2565b6040516145576020601f19601f85011601826143d8565b81815284602083860101111561456c57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156145a157600080fd5b85356145ac81614258565b945060208601356145bc81614258565b9350604086013567ffffffffffffffff808211156145d957600080fd5b6145e589838a01614429565b945060608801359150808211156145fb57600080fd5b61460789838a01614429565b9350608088013591508082111561461d57600080fd5b5061462a88828901614515565b9150509295509295909350565b6000806040838503121561464a57600080fd5b82359150602083013561465c81614258565b809150509250929050565b6000604082840312156144f357600080fd5b60006040828403121561468b57600080fd5b61419a8383614667565b60808101818360005b60048110156146bd57815183526020928301929091019060010161469e565b50505092915050565b61ffff811681146113bb57600080fd5b600080604083850312156146e957600080fd5b82359150602083013561465c816146c6565b6000806040838503121561470e57600080fd5b823567ffffffffffffffff8082111561472657600080fd5b818501915085601f83011261473a57600080fd5b8135602061474782614405565b60405161475482826143d8565b83815260059390931b850182019282810191508984111561477457600080fd5b948201945b8386101561479b57853561478c81614258565b82529482019490820190614779565b965050860135925050808211156147b157600080fd5b506144d785828601614429565b600081518084526020808501945080840160005b838110156147ee578151875295820195908201906001016147d2565b509495945050505050565b60208152600061419a60208301846147be565b600060a082840312156144f357600080fd5b600060a0828403121561483057600080fd5b61419a838361480c565b67ffffffffffffffff811681146113bb57600080fd5b60006020828403121561486257600080fd5b813561419a8161483a565b6000806040838503121561488057600080fd5b82359150602083013560ff8116811461465c57600080fd5b6000806000606084860312156148ad57600080fd5b83356148b881614258565b9250602084013567ffffffffffffffff808211156148d557600080fd5b6148e187838801614429565b935060408601359150808211156148f757600080fd5b5061490486828701614429565b9150509250925092565b80151581146113bb57600080fd5b6000806040838503121561492f57600080fd5b823561493a81614258565b9150602083013561465c8161490e565b60008060c0838503121561495d57600080fd5b8235915061496e846020850161480c565b90509250929050565b6000806040838503121561498a57600080fd5b823561499581614258565b9150602083013561465c81614258565b600080600080600060a086880312156149bd57600080fd5b85356149c881614258565b945060208601356149d881614258565b93506040860135925060608601359150608086013567ffffffffffffffff811115614a0257600080fd5b61462a88828901614515565b600060208284031215614a2057600080fd5b813561419a81614258565b600080600060608486031215614a4057600080fd5b8335614a4b81614258565b95602085013595506040909401359392505050565b600181811c90821680614a7457607f821691505b602082108114156144f357634e487b7160e01b600052602260045260246000fd5b81358155600181016020830135614aab8161483a565b67ffffffffffffffff8116905081548167ffffffffffffffff198216178355604085013563ffffffff81168114614ae157600080fd5b6bffffffff00000000000000008160401b16905080837fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008416171784556060860135614b2c816146c6565b6dffff0000000000000000000000008160601b16847fffffffffffffffffffffffffffffffffffff0000000000000000000000000000851617831717855550505050505050565b634e487b7160e01b600052601160045260246000fd5b600082821015614b9b57614b9b614b73565b500390565b8135614bab816146c6565b61ffff811690508154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000082161783556020840135614be98161483a565b69ffffffffffffffff00008160101b16837fffffffffffffffffffffffffffffffffffffffffffff000000000000000000008416171784555050505050565b634e487b7160e01b600052603260045260246000fd5b6000600019821415614c5257614c52614b73565b5060010190565b81358155600181016020830135614c6f8161490e565b815490151560ff1660ff19919091161790555050565b6000816000190483118215151615614c9f57614c9f614b73565b500290565b813581556001602080840182840160005b60048110156137f1578235825591830191908401908401614cb5565b600060208284031215614ce357600080fd5b815161419a81614258565b600060ff821660ff84168060ff03821115614d0b57614d0b614b73565b019392505050565b8135614d1e81614258565b815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038216178255506020820135614d5381614258565b60018201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316179055506040820135614d8c81614258565b60028201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316179055506060820135614dc581614258565b60038201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316179055505050565b600082614e1157634e487b7160e01b600052601260045260246000fd5b500690565b60008219821115614e2957614e29614b73565b500190565b604081526000614e4160408301856147be565b8281036020840152614e5381856147be565b95945050505050565b600060208284031215614e6e57600080fd5b5051919050565b600067ffffffffffffffff80831681811415614e9357614e93614b73565b6001019392505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614ed5816017850160208801614357565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614f12816028840160208801614357565b01602801949350505050565b60006001600160a01b03808816835280871660208401525060a06040830152614f4a60a08301866147be565b8281036060840152614f5c81866147be565b90508281036080840152614f708185614383565b98975050505050505050565b600060208284031215614f8e57600080fd5b815161419a81614299565b600060033d1115614fb25760046000803e5060005160e01c5b90565b600060443d1015614fc35790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff816024840111818411171561501157505050505090565b82850191508151818111156150295750505050505090565b843d87010160208285010111156150435750505050505090565b615052602082860101876143d8565b509095945050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a0608083015261509560a0830184614383565b979650505050505050565b6000816150af576150af614b73565b50600019019056fea2646970667358221220efe6a5af2c9943b9ac163275ab88a4e1867d01def0e1e4bc814fd4d91f3c880064736f6c634300080b0033

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

0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699098af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000005968747470733a2f2f6175676d696e7465642e6d7970696e6174612e636c6f75642f697066732f516d59674d6a3968454252376f4e4b63726259677a5a4139674a6a31414b716b68756d7a674263554c5a673863642f7b69647d00000000000000

-----Decoded View---------------
Arg [0] : uri (string): https://augminted.mypinata.cloud/ipfs/QmYgMj9hEBR7oNKcrbYgzZA9gJj1AKqkhumzgBcULZg8cd/{id}
Arg [1] : vrfCoordinator (address): 0x271682DEB8C4E0901D1a1550aD2e64D568E69909
Arg [2] : keyHash (bytes32): 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
Arg [3] : subId (uint64): 128

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [2] : 8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000059
Arg [5] : 68747470733a2f2f6175676d696e7465642e6d7970696e6174612e636c6f7564
Arg [6] : 2f697066732f516d59674d6a3968454252376f4e4b63726259677a5a4139674a
Arg [7] : 6a31414b716b68756d7a674263554c5a673863642f7b69647d00000000000000


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.