ETH Price: $2,482.42 (-1.53%)

Contract

0x7b7A4741738A29bEb1F4492d184005a045E15f02
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Forge169547592023-04-01 14:02:35518 days ago1680357755IN
0x7b7A4741...045E15f02
0 ETH0.0020981823.98477727
Forge169546162023-04-01 13:33:47518 days ago1680356027IN
0x7b7A4741...045E15f02
0 ETH0.0022372721.57140894
Forge169545692023-04-01 13:24:11518 days ago1680355451IN
0x7b7A4741...045E15f02
0 ETH0.0026633322.56429937
Forge169544962023-04-01 13:09:23518 days ago1680354563IN
0x7b7A4741...045E15f02
0 ETH0.0023791922.75002494
Forge168411172023-03-16 14:52:11534 days ago1678978331IN
0x7b7A4741...045E15f02
0 ETH0.003376228.81510945
Forge168391352023-03-16 8:09:59534 days ago1678954199IN
0x7b7A4741...045E15f02
0 ETH0.0018165717.66236835
Forge168391332023-03-16 8:09:35534 days ago1678954175IN
0x7b7A4741...045E15f02
0 ETH0.0008915619.25633662
Forge168136962023-03-12 18:21:47538 days ago1678645307IN
0x7b7A4741...045E15f02
0 ETH0.0029021123.71825952
Forge168136892023-03-12 18:20:23538 days ago1678645223IN
0x7b7A4741...045E15f02
0 ETH0.0020388120.19967409
Forge168136832023-03-12 18:19:11538 days ago1678645151IN
0x7b7A4741...045E15f02
0 ETH0.0022900819.40203335
Forge167921382023-03-09 17:29:11541 days ago1678382951IN
0x7b7A4741...045E15f02
0 ETH0.0042433940.91402244
Forge167852782023-03-08 18:20:59542 days ago1678299659IN
0x7b7A4741...045E15f02
0 ETH0.0055615346.77568878
Forge167638872023-03-05 18:10:47545 days ago1678039847IN
0x7b7A4741...045E15f02
0 ETH0.0033971433.03011481
Forge167626152023-03-05 13:52:59545 days ago1678024379IN
0x7b7A4741...045E15f02
0 ETH0.0030028825.25594227
Forge167621322023-03-05 12:15:23545 days ago1678018523IN
0x7b7A4741...045E15f02
0 ETH0.0020736919.09728287
Forge167614672023-03-05 10:00:23545 days ago1678010423IN
0x7b7A4741...045E15f02
0 ETH0.002091620
Forge167578652023-03-04 21:52:35546 days ago1677966755IN
0x7b7A4741...045E15f02
0 ETH0.0032577727.39978531
Forge167576842023-03-04 21:16:11546 days ago1677964571IN
0x7b7A4741...045E15f02
0 ETH0.0026937225.97234878
Forge167570882023-03-04 19:15:11546 days ago1677957311IN
0x7b7A4741...045E15f02
0 ETH0.0029752225.39282243
Forge167568482023-03-04 18:26:47546 days ago1677954407IN
0x7b7A4741...045E15f02
0 ETH0.0026639320.76641781
Forge167568452023-03-04 18:26:11546 days ago1677954371IN
0x7b7A4741...045E15f02
0 ETH0.0021331620.23012368
Forge167544502023-03-04 10:20:59546 days ago1677925259IN
0x7b7A4741...045E15f02
0 ETH0.0020626417.60413245
Forge167543622023-03-04 10:03:11546 days ago1677924191IN
0x7b7A4741...045E15f02
0 ETH0.0022288618.88340504
Forge167540422023-03-04 8:58:35546 days ago1677920315IN
0x7b7A4741...045E15f02
0 ETH0.0014694316.96513325
Forge167539632023-03-04 8:42:35546 days ago1677919355IN
0x7b7A4741...045E15f02
0 ETH0.0022799716.76478283
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FutureForge

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 10000 runs

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

pragma solidity 0.8.15;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";

import "@openzeppelin/contracts/utils/math/SafeMath.sol";

/*
 *   @title:  Future-Quest Forge contract
 *
 *   @author: ahm3d.eth, ryado.eth
 *
 *       Built with ♥ by the ProductShop team
 *
 *                  -+=-.
 *                 .++++++=-.
 *                 +++++++++++=-.
 *                ++++++++++++++++=:.
 *               =++++++==++++++++++++=:.
 *              :++++++=   .:=++++++++++++-:.
 *             .+++++++        .-=++++++++++++-:
 *             +++++++.            .-=++++++++++
 *            =++++++:                 :=+++++++
 *           -++++++-                :-+++++++++
 *          :++++++=             .-=+++++++++++-
 *         .+++++++          .:=+++++++++++=:.
 *         +++++++.       :-++++++++++++-.
 *        =++++++:    .-=+++++++++++=:
 *       -++++++=    +++++++++++=:.
 *      :++++++=     ++++++++-.
 *     .+++++++      ++++=:
 *     =++++++.      --.
 *    =++++++-
 *   -++++++=
 *  .++++++=
 *  +++++++.
 *
 */

interface FutureQuest {
  function balanceOf(
    address account,
    uint256 id
  ) external view returns (uint256);

  function safeTransferFrom(
    address from,
    address to,
    uint256 id,
    uint256 amount,
    bytes calldata data
  ) external;

  function safeBatchTransferFrom(
    address from,
    address to,
    uint256[] memory ids,
    uint256[] memory amounts,
    bytes memory data
  ) external;

  function create(uint256 _quantity) external returns (uint256);

  function mintOnBehalf(
    uint256 _artifactId,
    uint256 _quantity,
    address _user
  ) external;
}

contract FutureForge is AccessControl, ERC1155Holder {
  using Strings for uint256;
  using SafeMath for uint256;

  bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");

  FutureQuest public immutable _futureQuestContract;

  uint256 constant DRAGON_ID = 1;

  struct Artifact {
    uint8 mintedSupply;
    uint8 maxSupply;
    uint8 tier;
    uint8 id;
  }

  mapping(uint256 => Artifact) _tier3Artifacts;
  mapping(uint256 => Artifact) _tier2Artifacts;
  mapping(uint256 => Artifact) _tier1Artifacts;

  uint256 public tier1Supply = 0;
  uint256 public tier2Supply = 0;
  uint256 public tier3Supply = 0;

  uint256 constant TIER_1_MAP_LENGTH = 9;
  uint256 constant TIER_2_MAP_LENGTH = 6;
  uint256 constant TIER_3_MAP_LENGTH = 4;

  uint256 constant TIER_1_START_ID = 12;
  uint256 constant TIER_2_START_ID = 6;
  uint256 constant TIER_3_START_ID = 2;

  uint256 constant TIER_1_MAX_SUPPLY = 65;
  uint256 constant TIER_2_MAX_SUPPLY = 58;
  uint256 constant TIER_3_MAX_SUPPLY = 47;

  bool public _paused = true;

  constructor(address futureQuestContract) {
    _futureQuestContract = FutureQuest(futureQuestContract);
    _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
    _setupRole(ADMIN_ROLE, msg.sender);
    _initializeArtifacts();
  }

  // modifiers
  modifier onlyAdmin() {
    require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an Admin");
    _;
  }

  modifier isNotPaused() {
    require(!_paused, "The contract is paused");
    _;
  }

  function _initializeArtifacts() internal {
    // Tier 3 Artifacts
    _tier3Artifacts[2] = Artifact(0, 20, 3, 2); // Hover Drone Assistant of Skill
    _tier3Artifacts[3] = Artifact(0, 12, 3, 3); // Power Arm of Skill
    _tier3Artifacts[4] = Artifact(0, 5, 3, 4); // Robot Helper of Skill
    _tier3Artifacts[5] = Artifact(0, 10, 3, 5); // Elite Robotic Arm of Skill

    // Tier 2 Artifacts
    _tier2Artifacts[6] = Artifact(0, 20, 2, 6); // Small HoloGem of Fortune
    _tier2Artifacts[7] = Artifact(0, 12, 2, 7); // Medium HoloGem of Fortune
    _tier2Artifacts[8] = Artifact(0, 10, 2, 8); // Big HoloGem of Fortune
    _tier2Artifacts[9] = Artifact(0, 3, 2, 9); // Elite Crystal of Fortune
    _tier2Artifacts[10] = Artifact(0, 10, 2, 10); // Touch of Regen ($5k Grant!)
    _tier2Artifacts[11] = Artifact(0, 3, 2, 11); // Touch of Vanguard ($10k Grant!)

    // Tier 1 Artifacts
    _tier1Artifacts[12] = Artifact(0, 20, 1, 12); // Mutant Antilope
    _tier1Artifacts[13] = Artifact(0, 12, 1, 13); // Mutant Jelly Processor
    _tier1Artifacts[14] = Artifact(0, 12, 1, 14); // Wind Turbine
    _tier1Artifacts[15] = Artifact(0, 10, 1, 15); // Solar Array
    _tier1Artifacts[16] = Artifact(0, 15, 1, 16); // Smugglers Crate
    _tier1Artifacts[17] = Artifact(0, 5, 1, 17); // Future Horizon eVTOL mk1
    _tier1Artifacts[18] = Artifact(0, 5, 1, 18); // Interplanetary Survey Rig
    _tier1Artifacts[19] = Artifact(0, 5, 1, 19); // Space Mining Refinery Rig
    _tier1Artifacts[20] = Artifact(0, 5, 1, 20); // Astro Chip Upgrade
  }

  function createArtifacts() public onlyAdmin {
    for (uint256 i = 2; i <= 5; i++) {
      _futureQuestContract.create(_tier3Artifacts[i].maxSupply);
    }

    for (uint256 i = 6; i <= 11; i++) {
      _futureQuestContract.create(_tier2Artifacts[i].maxSupply);
    }

    for (uint256 i = 12; i <= 20; i++) {
      _futureQuestContract.create(_tier1Artifacts[i].maxSupply);
    }
  }

  function getRandomArtifactId(
    uint8 tier
  ) public view returns (uint256 artifactId) {
    uint256 totalWeight = 0;
    uint256 randomNum;

    if (tier == 1) {
      totalWeight = calculateTotalWeight(
        _tier1Artifacts,
        TIER_1_MAP_LENGTH,
        TIER_1_START_ID
      );

      randomNum =
        uint256(
          keccak256(abi.encodePacked(block.timestamp, block.difficulty))
        ) %
        totalWeight;

      for (
        uint256 i = TIER_1_START_ID;
        i < TIER_1_MAP_LENGTH + TIER_1_START_ID;
        i++
      ) {
        if (
          randomNum <
          (_tier1Artifacts[i].maxSupply - _tier1Artifacts[i].mintedSupply)
        ) {
          return _tier1Artifacts[i].id;
        }
        randomNum -= (_tier1Artifacts[i].maxSupply -
          _tier1Artifacts[i].mintedSupply);
      }
    } else if (tier == 2) {
      totalWeight = calculateTotalWeight(
        _tier2Artifacts,
        TIER_2_MAP_LENGTH,
        TIER_2_START_ID
      );

      randomNum =
        uint256(
          keccak256(abi.encodePacked(block.timestamp, block.difficulty))
        ) %
        totalWeight;

      for (
        uint256 i = TIER_2_START_ID;
        i < TIER_2_MAP_LENGTH + TIER_2_START_ID;
        i++
      ) {
        if (
          randomNum <
          (_tier2Artifacts[i].maxSupply - _tier2Artifacts[i].mintedSupply)
        ) {
          return _tier2Artifacts[i].id;
        }
        randomNum -= (_tier2Artifacts[i].maxSupply -
          _tier2Artifacts[i].mintedSupply);
      }
    } else if (tier == 3) {
      totalWeight = calculateTotalWeight(
        _tier3Artifacts,
        TIER_3_MAP_LENGTH,
        TIER_3_START_ID
      );

      randomNum =
        uint256(
          keccak256(abi.encodePacked(block.timestamp, block.difficulty))
        ) %
        totalWeight;

      for (
        uint256 i = TIER_3_START_ID;
        i < TIER_3_MAP_LENGTH + TIER_3_START_ID;
        i++
      ) {
        if (
          randomNum <
          (_tier3Artifacts[i].maxSupply - _tier3Artifacts[i].mintedSupply)
        ) {
          // console.log("forge _tier3Artifacts[i].id: %s", _tier3Artifacts[i].id);
          return _tier3Artifacts[i].id;
        }
        randomNum -= (_tier3Artifacts[i].maxSupply -
          _tier3Artifacts[i].mintedSupply);
      }
    } else {
      revert("Invalid tier");
    }
  }

  function calculateTotalWeight(
    mapping(uint256 => Artifact) storage artifacts,
    uint256 mapSize,
    uint256 startId
  ) internal view returns (uint256) {
    uint256 totalWeight = 0;

    for (uint8 i = 0; i < mapSize; i++) {
      totalWeight += (artifacts[i + startId].maxSupply -
        artifacts[i + startId].mintedSupply);
    }
    return totalWeight;
  }

  function forge(uint256 _dragonQuantity) public returns (uint256) {
    require(
      _dragonQuantity > 2,
      "Dragon quantity must be greater or equal than 3"
    );

    require(
      _futureQuestContract.balanceOf(msg.sender, DRAGON_ID) >= _dragonQuantity,
      "User does not have enough dragons"
    );

    uint256 tier = 1;

    if (_dragonQuantity > 6) {
      tier = 3;
    } else if (_dragonQuantity > 4) {
      tier = 2;
    }

    uint256 artifactId = getRandomArtifactId(uint8(tier));

    _futureQuestContract.safeTransferFrom(
      msg.sender,
      address(this),
      DRAGON_ID,
      _dragonQuantity - 1,
      ""
    );

    mintArtifact(msg.sender, artifactId, tier);

    return artifactId;
  }

  function mintArtifact(
    address _user,
    uint256 _artifactId,
    uint256 tier
  ) private {
    if (tier == 3) {
      _tier3Artifacts[_artifactId].mintedSupply += 1;
      tier3Supply++;
    } else if (tier == 2) {
      _tier2Artifacts[_artifactId].mintedSupply += 1;
      tier2Supply++;
    } else if (tier == 1) {
      _tier1Artifacts[_artifactId].mintedSupply += 1;
      tier1Supply++;
    }
    _futureQuestContract.mintOnBehalf(_artifactId, 1, _user);
  }

  function grantAdminRole(address user) external onlyAdmin {
    grantRole(ADMIN_ROLE, user);
  }

  function withdraw() external onlyAdmin {
    payable(msg.sender).transfer(address(this).balance);
  }

  function setPaused(bool paused) external onlyAdmin {
    _paused = paused;
  }

  function burnAllDragons() external onlyAdmin {
    uint256 balance = _futureQuestContract.balanceOf(address(this), DRAGON_ID);
    require(balance > 0, "No tokens to burn");
    _futureQuestContract.safeTransferFrom(
      address(this),
      address(0),
      DRAGON_ID,
      balance,
      ""
    );
  }

  function supportsInterface(
    bytes4 interfaceId
  )
    public
    view
    virtual
    override(AccessControl, ERC1155Receiver)
    returns (bool)
  {
    return super.supportsInterface(interfaceId);
  }
}

File 2 of 13 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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(account),
                        " 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.
     *
     * May emit a {RoleGranted} event.
     */
    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.
     *
     * May emit a {RoleRevoked} event.
     */
    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`.
     *
     * May emit a {RoleRevoked} event.
     */
    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.
     *
     * May emit a {RoleGranted} event.
     *
     * [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.
     *
     * May emit a {RoleGranted} event.
     */
    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.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 13 : 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 4 of 13 : 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 5 of 13 : ERC1155Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)

pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

/**
 * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.
 *
 * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be
 * stuck.
 *
 * @dev _Available since v3.1._
 */
contract ERC1155Holder is ERC1155Receiver {
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

File 6 of 13 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }
}

File 7 of 13 : 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 8 of 13 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

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

pragma solidity ^0.8.0;

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

File 11 of 13 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 12 of 13 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 13 of 13 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"futureQuestContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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"},{"inputs":[],"name":"ADMIN_ROLE","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":"_futureQuestContract","outputs":[{"internalType":"contract FutureQuest","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnAllDragons","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"createArtifacts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dragonQuantity","type":"uint256"}],"name":"forge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tier","type":"uint8"}],"name":"getRandomArtifactId","outputs":[{"internalType":"uint256","name":"artifactId","type":"uint256"}],"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":"address","name":"user","type":"address"}],"name":"grantAdminRole","outputs":[],"stateMutability":"nonpayable","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":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"paused","type":"bool"}],"name":"setPaused","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":[],"name":"tier1Supply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tier2Supply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tier3Supply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040526000600481905560058190556006556007805460ff191660011790553480156200002d57600080fd5b506040516200326b3803806200326b833981016040819052620000509162001077565b6001600160a01b0381166080526200006a60003362000fc7565b620000967fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000fc7565b62000fc06040518060800160405280600060ff168152602001601460ff168152602001600360ff168152602001600260ff16815250600160006002815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600c60ff168152602001600360ff168152602001600360ff16815250600160006003815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600560ff168152602001600360ff168152602001600460ff16815250600160006004815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600a60ff168152602001600360ff168152602001600560ff16815250600160006005815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001601460ff168152602001600260ff168152602001600660ff16815250600260006006815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600c60ff168152602001600260ff168152602001600760ff16815250600260006007815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600a60ff168152602001600260ff168152602001600860ff16815250600260006008815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600360ff168152602001600260ff168152602001600960ff16815250600260006009815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600a60ff168152602001600260ff168152602001600a60ff1681525060026000600a815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600360ff168152602001600260ff168152602001600b60ff1681525060026000600b815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001601460ff168152602001600160ff168152602001600c60ff1681525060036000600c815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600c60ff168152602001600160ff168152602001600d60ff1681525060036000600d815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600c60ff168152602001600160ff168152602001600e60ff1681525060036000600e815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600a60ff168152602001600160ff168152602001600f60ff1681525060036000600f815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600f60ff168152602001600160ff168152602001601060ff16815250600360006010815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600560ff168152602001600160ff168152602001601160ff16815250600360006011815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600560ff168152602001600160ff168152602001601260ff16815250600360006012815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600560ff168152602001600160ff168152602001601360ff16815250600360006013815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff1602179055509050506040518060800160405280600060ff168152602001600560ff168152602001600160ff168152602001601460ff16815250600360006014815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff160217905550905050565b50620010a9565b62000fd3828262000fd7565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000fd3576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620010333390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000602082840312156200108a57600080fd5b81516001600160a01b0381168114620010a257600080fd5b9392505050565b60805161216e620010fd600039600081816101ed015281816105ab015281816106cd0152818161093501528181610a6c015281816110580152818161113f015281816112260152611626015261216e6000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c806375b238fc116100d8578063c2e6a0121161008c578063e1fc605411610066578063e1fc6054146103b4578063eb5613ca146103c7578063f23a6e61146103cf57600080fd5b8063c2e6a01214610385578063c634b78e1461038e578063d547741f146103a157600080fd5b8063a217fddf116100bd578063a217fddf14610301578063a94e834b14610309578063bc197c811461031c57600080fd5b806375b238fc1461029657806391d14854146102bd57600080fd5b8063248a9ca31161013a57806336568abe1161011457806336568abe146102725780633ccfd60b146102855780635c03af2a1461028d57600080fd5b8063248a9ca3146102345780632f2ff15d14610257578063362b6e701461026a57600080fd5b806316c38b3c1161016b57806316c38b3c146101c657806316c61ccc146101db5780631a0d3ce7146101e857600080fd5b806301ffc9a7146101875780630eb92100146101af575b600080fd5b61019a610195366004611a99565b610407565b60405190151581526020015b60405180910390f35b6101b860065481565b6040519081526020016101a6565b6101d96101d4366004611adb565b610418565b005b60075461019a9060ff1681565b61020f7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a6565b6101b8610242366004611afd565b60009081526020819052604090206001015490565b6101d9610265366004611b3f565b6104cc565b6101d96104f6565b6101d9610280366004611b3f565b610741565b6101d96107da565b6101b860045481565b6101b87fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61019a6102cb366004611b3f565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6101b8600081565b6101b8610317366004611afd565b610887565b61035461032a366004611cf7565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101a6565b6101b860055481565b6101d961039c366004611da1565b610b50565b6101d96103af366004611b3f565b610bf8565b6101b86103c2366004611dbc565b610c1d565b6101d9610f89565b6103546103dd366004611ddf565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b6000610412826112bb565b92915050565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff1661049b5760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f7420616e2041646d696e0000000000000000000060448201526064015b60405180910390fd5b600780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6000828152602081905260409020600101546104e781611311565b6104f1838361131b565b505050565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff166105745760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f7420616e2041646d696e000000000000000000006044820152606401610492565b6040517efdd58e000000000000000000000000000000000000000000000000000000008152306004820152600160248201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169062fdd58e90604401602060405180830381865afa158015610606573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062a9190611e44565b90506000811161067c5760405162461bcd60e51b815260206004820152601160248201527f4e6f20746f6b656e7320746f206275726e0000000000000000000000000000006044820152606401610492565b6040517ff242432a000000000000000000000000000000000000000000000000000000008152306004820152600060248201819052600160448301526064820183905260a0608483015260a48201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063f242432a9060c401600060405180830381600087803b15801561072657600080fd5b505af115801561073a573d6000803e3d6000fd5b5050505050565b73ffffffffffffffffffffffffffffffffffffffff811633146107cc5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610492565b6107d6828261140b565b5050565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff166108585760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f7420616e2041646d696e000000000000000000006044820152606401610492565b60405133904780156108fc02916000818181858888f19350505050158015610884573d6000803e3d6000fd5b50565b6000600282116108ff5760405162461bcd60e51b815260206004820152602f60248201527f447261676f6e207175616e74697479206d75737420626520677265617465722060448201527f6f7220657175616c207468616e203300000000000000000000000000000000006064820152608401610492565b6040517efdd58e0000000000000000000000000000000000000000000000000000000081523360048201526001602482015282907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169062fdd58e90604401602060405180830381865afa158015610990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b49190611e44565b1015610a285760405162461bcd60e51b815260206004820152602160248201527f5573657220646f6573206e6f74206861766520656e6f75676820647261676f6e60448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610492565b60016006831115610a3b57506003610a48565b6004831115610a48575060025b6000610a5382610c1d565b905073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663f242432a33306001610a9f818a611e8c565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b16815273ffffffffffffffffffffffffffffffffffffffff94851660048201529390921660248401526044830152606482015260a06084820152600060a482015260c401600060405180830381600087803b158015610b2657600080fd5b505af1158015610b3a573d6000803e3d6000fd5b50505050610b493382846114c2565b9392505050565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff16610bce5760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f7420616e2041646d696e000000000000000000006044820152606401610492565b6108847fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775826104cc565b600082815260208190526040902060010154610c1381611311565b6104f1838361140b565b6000808060ff8416600103610d2e57610c3a60036009600c611687565b9150814244604051602001610c59929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c610c7c9190611ea3565b9050600c5b610c8d600c6009611ede565b811015610d2857600081815260036020526040902054610cb89060ff80821691610100900416611ef6565b60ff16821015610ce3576000908152600360205260409020546301000000900460ff16949350505050565b600081815260036020526040902054610d079060ff80821691610100900416611ef6565b610d149060ff1683611e8c565b915080610d2081611f19565b915050610c81565b50610f82565b8360ff16600203610e3357610d466002600680611687565b9150814244604051602001610d65929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c610d889190611ea3565b905060065b610d98600680611ede565b811015610d2857600081815260026020526040902054610dc39060ff80821691610100900416611ef6565b60ff16821015610dee576000908152600260205260409020546301000000900460ff16949350505050565b600081815260026020526040902054610e129060ff80821691610100900416611ef6565b610e1f9060ff1683611e8c565b915080610e2b81611f19565b915050610d8d565b8360ff16600303610f3a57610e4c600160046002611687565b9150814244604051602001610e6b929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c610e8e9190611ea3565b905060025b610e9f60026004611ede565b811015610d2857600081815260016020526040902054610eca9060ff80821691610100900416611ef6565b60ff16821015610ef5576000908152600160205260409020546301000000900460ff16949350505050565b600081815260016020526040902054610f199060ff80821691610100900416611ef6565b610f269060ff1683611e8c565b915080610f3281611f19565b915050610e93565b60405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964207469657200000000000000000000000000000000000000006044820152606401610492565b5050919050565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff166110075760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f7420616e2041646d696e000000000000000000006044820152606401610492565b60025b600581116110ed57600081815260016020526040908190205490517f780900dc00000000000000000000000000000000000000000000000000000000815261010090910460ff1660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063780900dc906024016020604051808303816000875af11580156110b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110da9190611e44565b50806110e581611f19565b91505061100a565b5060065b600b81116111d457600081815260026020526040908190205490517f780900dc00000000000000000000000000000000000000000000000000000000815261010090910460ff1660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063780900dc906024016020604051808303816000875af115801561119d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c19190611e44565b50806111cc81611f19565b9150506110f1565b50600c5b6014811161088457600081815260036020526040908190205490517f780900dc00000000000000000000000000000000000000000000000000000000815261010090910460ff1660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063780900dc906024016020604051808303816000875af1158015611284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a89190611e44565b50806112b381611f19565b9150506111d8565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000148061041257506104128261171c565b61088481336117b3565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166107d65760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556113ad3390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156107d65760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8060030361152357600082815260016020819052604082208054919290916114ee90849060ff16611f51565b92506101000a81548160ff021916908360ff1602179055506006600081548092919061151990611f19565b91905055506115d3565b8060020361157857600082815260026020526040812080546001929061154d90849060ff16611f51565b92506101000a81548160ff021916908360ff1602179055506005600081548092919061151990611f19565b806001036115d35760008281526003602052604081208054600192906115a290849060ff16611f51565b92506101000a81548160ff021916908360ff160217905550600460008154809291906115cd90611f19565b91905055505b6040517f429408d3000000000000000000000000000000000000000000000000000000008152600481018390526001602482015273ffffffffffffffffffffffffffffffffffffffff84811660448301527f0000000000000000000000000000000000000000000000000000000000000000169063429408d390606401600060405180830381600087803b15801561166a57600080fd5b505af115801561167e573d6000803e3d6000fd5b50505050505050565b600080805b848160ff161015611713578560006116a78660ff8516611ede565b8152602081019190915260400160009081205460ff9081169188916116cf9088908616611ede565b81526020810191909152604001600020546116f29190610100900460ff16611ef6565b6116ff9060ff1683611ede565b91508061170b81611f76565b91505061168c565b50949350505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061041257507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610412565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166107d6576117f181611851565b6117fc836020611870565b60405160200161180d929190611fc5565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905262461bcd60e51b825261049291600401612046565b606061041273ffffffffffffffffffffffffffffffffffffffff831660145b6060600061187f836002612097565b61188a906002611ede565b67ffffffffffffffff8111156118a2576118a2611b6b565b6040519080825280601f01601f1916602001820160405280156118cc576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611903576119036120d4565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611966576119666120d4565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006119a2846002612097565b6119ad906001611ede565b90505b6001811115611a4a577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106119ee576119ee6120d4565b1a60f81b828281518110611a0457611a046120d4565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93611a4381612103565b90506119b0565b508315610b495760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610492565b600060208284031215611aab57600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610b4957600080fd5b600060208284031215611aed57600080fd5b81358015158114610b4957600080fd5b600060208284031215611b0f57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611b3a57600080fd5b919050565b60008060408385031215611b5257600080fd5b82359150611b6260208401611b16565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611be157611be1611b6b565b604052919050565b600082601f830112611bfa57600080fd5b8135602067ffffffffffffffff821115611c1657611c16611b6b565b8160051b611c25828201611b9a565b9283528481018201928281019087851115611c3f57600080fd5b83870192505b84831015611c5e57823582529183019190830190611c45565b979650505050505050565b600082601f830112611c7a57600080fd5b813567ffffffffffffffff811115611c9457611c94611b6b565b611cc560207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611b9a565b818152846020838601011115611cda57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215611d0f57600080fd5b611d1886611b16565b9450611d2660208701611b16565b9350604086013567ffffffffffffffff80821115611d4357600080fd5b611d4f89838a01611be9565b94506060880135915080821115611d6557600080fd5b611d7189838a01611be9565b93506080880135915080821115611d8757600080fd5b50611d9488828901611c69565b9150509295509295909350565b600060208284031215611db357600080fd5b610b4982611b16565b600060208284031215611dce57600080fd5b813560ff81168114610b4957600080fd5b600080600080600060a08688031215611df757600080fd5b611e0086611b16565b9450611e0e60208701611b16565b93506040860135925060608601359150608086013567ffffffffffffffff811115611e3857600080fd5b611d9488828901611c69565b600060208284031215611e5657600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015611e9e57611e9e611e5d565b500390565b600082611ed9577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500690565b60008219821115611ef157611ef1611e5d565b500190565b600060ff821660ff841680821015611f1057611f10611e5d565b90039392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611f4a57611f4a611e5d565b5060010190565b600060ff821660ff84168060ff03821115611f6e57611f6e611e5d565b019392505050565b600060ff821660ff8103611f8c57611f8c611e5d565b60010192915050565b60005b83811015611fb0578181015183820152602001611f98565b83811115611fbf576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611ffd816017850160208801611f95565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161203a816028840160208801611f95565b01602801949350505050565b6020815260008251806020840152612065816040850160208701611f95565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156120cf576120cf611e5d565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008161211257612112611e5d565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea2646970667358221220c9016c36303e3cd42ee4cb3f6aa99638225920a2c4e3d2c888812d04bdbf17cc64736f6c634300080f0033000000000000000000000000a213c344d14e9ae9da2b70a8f9a0122131d59274

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101825760003560e01c806375b238fc116100d8578063c2e6a0121161008c578063e1fc605411610066578063e1fc6054146103b4578063eb5613ca146103c7578063f23a6e61146103cf57600080fd5b8063c2e6a01214610385578063c634b78e1461038e578063d547741f146103a157600080fd5b8063a217fddf116100bd578063a217fddf14610301578063a94e834b14610309578063bc197c811461031c57600080fd5b806375b238fc1461029657806391d14854146102bd57600080fd5b8063248a9ca31161013a57806336568abe1161011457806336568abe146102725780633ccfd60b146102855780635c03af2a1461028d57600080fd5b8063248a9ca3146102345780632f2ff15d14610257578063362b6e701461026a57600080fd5b806316c38b3c1161016b57806316c38b3c146101c657806316c61ccc146101db5780631a0d3ce7146101e857600080fd5b806301ffc9a7146101875780630eb92100146101af575b600080fd5b61019a610195366004611a99565b610407565b60405190151581526020015b60405180910390f35b6101b860065481565b6040519081526020016101a6565b6101d96101d4366004611adb565b610418565b005b60075461019a9060ff1681565b61020f7f000000000000000000000000a213c344d14e9ae9da2b70a8f9a0122131d5927481565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a6565b6101b8610242366004611afd565b60009081526020819052604090206001015490565b6101d9610265366004611b3f565b6104cc565b6101d96104f6565b6101d9610280366004611b3f565b610741565b6101d96107da565b6101b860045481565b6101b87fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b61019a6102cb366004611b3f565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6101b8600081565b6101b8610317366004611afd565b610887565b61035461032a366004611cf7565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101a6565b6101b860055481565b6101d961039c366004611da1565b610b50565b6101d96103af366004611b3f565b610bf8565b6101b86103c2366004611dbc565b610c1d565b6101d9610f89565b6103546103dd366004611ddf565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b6000610412826112bb565b92915050565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff1661049b5760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f7420616e2041646d696e0000000000000000000060448201526064015b60405180910390fd5b600780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6000828152602081905260409020600101546104e781611311565b6104f1838361131b565b505050565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff166105745760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f7420616e2041646d696e000000000000000000006044820152606401610492565b6040517efdd58e000000000000000000000000000000000000000000000000000000008152306004820152600160248201526000907f000000000000000000000000a213c344d14e9ae9da2b70a8f9a0122131d5927473ffffffffffffffffffffffffffffffffffffffff169062fdd58e90604401602060405180830381865afa158015610606573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062a9190611e44565b90506000811161067c5760405162461bcd60e51b815260206004820152601160248201527f4e6f20746f6b656e7320746f206275726e0000000000000000000000000000006044820152606401610492565b6040517ff242432a000000000000000000000000000000000000000000000000000000008152306004820152600060248201819052600160448301526064820183905260a0608483015260a48201527f000000000000000000000000a213c344d14e9ae9da2b70a8f9a0122131d5927473ffffffffffffffffffffffffffffffffffffffff169063f242432a9060c401600060405180830381600087803b15801561072657600080fd5b505af115801561073a573d6000803e3d6000fd5b5050505050565b73ffffffffffffffffffffffffffffffffffffffff811633146107cc5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610492565b6107d6828261140b565b5050565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff166108585760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f7420616e2041646d696e000000000000000000006044820152606401610492565b60405133904780156108fc02916000818181858888f19350505050158015610884573d6000803e3d6000fd5b50565b6000600282116108ff5760405162461bcd60e51b815260206004820152602f60248201527f447261676f6e207175616e74697479206d75737420626520677265617465722060448201527f6f7220657175616c207468616e203300000000000000000000000000000000006064820152608401610492565b6040517efdd58e0000000000000000000000000000000000000000000000000000000081523360048201526001602482015282907f000000000000000000000000a213c344d14e9ae9da2b70a8f9a0122131d5927473ffffffffffffffffffffffffffffffffffffffff169062fdd58e90604401602060405180830381865afa158015610990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b49190611e44565b1015610a285760405162461bcd60e51b815260206004820152602160248201527f5573657220646f6573206e6f74206861766520656e6f75676820647261676f6e60448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610492565b60016006831115610a3b57506003610a48565b6004831115610a48575060025b6000610a5382610c1d565b905073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000a213c344d14e9ae9da2b70a8f9a0122131d592741663f242432a33306001610a9f818a611e8c565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b16815273ffffffffffffffffffffffffffffffffffffffff94851660048201529390921660248401526044830152606482015260a06084820152600060a482015260c401600060405180830381600087803b158015610b2657600080fd5b505af1158015610b3a573d6000803e3d6000fd5b50505050610b493382846114c2565b9392505050565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff16610bce5760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f7420616e2041646d696e000000000000000000006044820152606401610492565b6108847fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775826104cc565b600082815260208190526040902060010154610c1381611311565b6104f1838361140b565b6000808060ff8416600103610d2e57610c3a60036009600c611687565b9150814244604051602001610c59929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c610c7c9190611ea3565b9050600c5b610c8d600c6009611ede565b811015610d2857600081815260036020526040902054610cb89060ff80821691610100900416611ef6565b60ff16821015610ce3576000908152600360205260409020546301000000900460ff16949350505050565b600081815260036020526040902054610d079060ff80821691610100900416611ef6565b610d149060ff1683611e8c565b915080610d2081611f19565b915050610c81565b50610f82565b8360ff16600203610e3357610d466002600680611687565b9150814244604051602001610d65929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c610d889190611ea3565b905060065b610d98600680611ede565b811015610d2857600081815260026020526040902054610dc39060ff80821691610100900416611ef6565b60ff16821015610dee576000908152600260205260409020546301000000900460ff16949350505050565b600081815260026020526040902054610e129060ff80821691610100900416611ef6565b610e1f9060ff1683611e8c565b915080610e2b81611f19565b915050610d8d565b8360ff16600303610f3a57610e4c600160046002611687565b9150814244604051602001610e6b929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c610e8e9190611ea3565b905060025b610e9f60026004611ede565b811015610d2857600081815260016020526040902054610eca9060ff80821691610100900416611ef6565b60ff16821015610ef5576000908152600160205260409020546301000000900460ff16949350505050565b600081815260016020526040902054610f199060ff80821691610100900416611ef6565b610f269060ff1683611e8c565b915080610f3281611f19565b915050610e93565b60405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964207469657200000000000000000000000000000000000000006044820152606401610492565b5050919050565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff166110075760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f7420616e2041646d696e000000000000000000006044820152606401610492565b60025b600581116110ed57600081815260016020526040908190205490517f780900dc00000000000000000000000000000000000000000000000000000000815261010090910460ff1660048201527f000000000000000000000000a213c344d14e9ae9da2b70a8f9a0122131d5927473ffffffffffffffffffffffffffffffffffffffff169063780900dc906024016020604051808303816000875af11580156110b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110da9190611e44565b50806110e581611f19565b91505061100a565b5060065b600b81116111d457600081815260026020526040908190205490517f780900dc00000000000000000000000000000000000000000000000000000000815261010090910460ff1660048201527f000000000000000000000000a213c344d14e9ae9da2b70a8f9a0122131d5927473ffffffffffffffffffffffffffffffffffffffff169063780900dc906024016020604051808303816000875af115801561119d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c19190611e44565b50806111cc81611f19565b9150506110f1565b50600c5b6014811161088457600081815260036020526040908190205490517f780900dc00000000000000000000000000000000000000000000000000000000815261010090910460ff1660048201527f000000000000000000000000a213c344d14e9ae9da2b70a8f9a0122131d5927473ffffffffffffffffffffffffffffffffffffffff169063780900dc906024016020604051808303816000875af1158015611284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a89190611e44565b50806112b381611f19565b9150506111d8565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000148061041257506104128261171c565b61088481336117b3565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166107d65760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556113ad3390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156107d65760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8060030361152357600082815260016020819052604082208054919290916114ee90849060ff16611f51565b92506101000a81548160ff021916908360ff1602179055506006600081548092919061151990611f19565b91905055506115d3565b8060020361157857600082815260026020526040812080546001929061154d90849060ff16611f51565b92506101000a81548160ff021916908360ff1602179055506005600081548092919061151990611f19565b806001036115d35760008281526003602052604081208054600192906115a290849060ff16611f51565b92506101000a81548160ff021916908360ff160217905550600460008154809291906115cd90611f19565b91905055505b6040517f429408d3000000000000000000000000000000000000000000000000000000008152600481018390526001602482015273ffffffffffffffffffffffffffffffffffffffff84811660448301527f000000000000000000000000a213c344d14e9ae9da2b70a8f9a0122131d59274169063429408d390606401600060405180830381600087803b15801561166a57600080fd5b505af115801561167e573d6000803e3d6000fd5b50505050505050565b600080805b848160ff161015611713578560006116a78660ff8516611ede565b8152602081019190915260400160009081205460ff9081169188916116cf9088908616611ede565b81526020810191909152604001600020546116f29190610100900460ff16611ef6565b6116ff9060ff1683611ede565b91508061170b81611f76565b91505061168c565b50949350505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061041257507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610412565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166107d6576117f181611851565b6117fc836020611870565b60405160200161180d929190611fc5565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905262461bcd60e51b825261049291600401612046565b606061041273ffffffffffffffffffffffffffffffffffffffff831660145b6060600061187f836002612097565b61188a906002611ede565b67ffffffffffffffff8111156118a2576118a2611b6b565b6040519080825280601f01601f1916602001820160405280156118cc576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611903576119036120d4565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611966576119666120d4565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006119a2846002612097565b6119ad906001611ede565b90505b6001811115611a4a577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106119ee576119ee6120d4565b1a60f81b828281518110611a0457611a046120d4565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93611a4381612103565b90506119b0565b508315610b495760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610492565b600060208284031215611aab57600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610b4957600080fd5b600060208284031215611aed57600080fd5b81358015158114610b4957600080fd5b600060208284031215611b0f57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611b3a57600080fd5b919050565b60008060408385031215611b5257600080fd5b82359150611b6260208401611b16565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611be157611be1611b6b565b604052919050565b600082601f830112611bfa57600080fd5b8135602067ffffffffffffffff821115611c1657611c16611b6b565b8160051b611c25828201611b9a565b9283528481018201928281019087851115611c3f57600080fd5b83870192505b84831015611c5e57823582529183019190830190611c45565b979650505050505050565b600082601f830112611c7a57600080fd5b813567ffffffffffffffff811115611c9457611c94611b6b565b611cc560207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611b9a565b818152846020838601011115611cda57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215611d0f57600080fd5b611d1886611b16565b9450611d2660208701611b16565b9350604086013567ffffffffffffffff80821115611d4357600080fd5b611d4f89838a01611be9565b94506060880135915080821115611d6557600080fd5b611d7189838a01611be9565b93506080880135915080821115611d8757600080fd5b50611d9488828901611c69565b9150509295509295909350565b600060208284031215611db357600080fd5b610b4982611b16565b600060208284031215611dce57600080fd5b813560ff81168114610b4957600080fd5b600080600080600060a08688031215611df757600080fd5b611e0086611b16565b9450611e0e60208701611b16565b93506040860135925060608601359150608086013567ffffffffffffffff811115611e3857600080fd5b611d9488828901611c69565b600060208284031215611e5657600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015611e9e57611e9e611e5d565b500390565b600082611ed9577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500690565b60008219821115611ef157611ef1611e5d565b500190565b600060ff821660ff841680821015611f1057611f10611e5d565b90039392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611f4a57611f4a611e5d565b5060010190565b600060ff821660ff84168060ff03821115611f6e57611f6e611e5d565b019392505050565b600060ff821660ff8103611f8c57611f8c611e5d565b60010192915050565b60005b83811015611fb0578181015183820152602001611f98565b83811115611fbf576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611ffd816017850160208801611f95565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161203a816028840160208801611f95565b01602801949350505050565b6020815260008251806020840152612065816040850160208701611f95565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156120cf576120cf611e5d565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008161211257612112611e5d565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea2646970667358221220c9016c36303e3cd42ee4cb3f6aa99638225920a2c4e3d2c888812d04bdbf17cc64736f6c634300080f0033

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

000000000000000000000000a213c344d14e9ae9da2b70a8f9a0122131d59274

-----Decoded View---------------
Arg [0] : futureQuestContract (address): 0xa213C344D14e9aE9DA2b70a8f9A0122131d59274

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a213c344d14e9ae9da2b70a8f9a0122131d59274


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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