ETH Price: $2,746.69 (-2.96%)
Gas: 0.93 Gwei

Contract

0xe338aA35D844D5C1a4E052380DBFA939e0cce13F
 

Overview

ETH Balance

0.571903674668419976 ETH

Eth Value

$1,570.84 (@ $2,746.69/ETH)
Transaction Hash
Method
Block
From
To
Mint With Points136392242021-11-18 12:01:101176 days ago1637236870IN
0xe338aA35...9e0cce13F
0.1125 ETH0.06988566108.06037218
Mint With Points136326182021-11-17 11:21:381177 days ago1637148098IN
0xe338aA35...9e0cce13F
0.0015 ETH0.01836595130.36412327
Mint With Points136325782021-11-17 11:10:011177 days ago1637147401IN
0xe338aA35...9e0cce13F
0.0015 ETH0.01915567109.4097064
Mint With Points136116392021-11-14 3:33:271181 days ago1636860807IN
0xe338aA35...9e0cce13F
0.0015 ETH0.0176061896.82079132
Mint With Points135713622021-11-07 19:52:141187 days ago1636314734IN
0xe338aA35...9e0cce13F
0.003 ETH0.018941287.42766367
Mint With Points135587662021-11-05 20:33:431189 days ago1636144423IN
0xe338aA35...9e0cce13F
0.0015 ETH0.02931274135.3
Mint With Points135528682021-11-04 22:29:081190 days ago1636064948IN
0xe338aA35...9e0cce13F
0.0015 ETH0.02455261135.02095131
Mint With Points135488942021-11-04 7:31:351191 days ago1636011095IN
0xe338aA35...9e0cce13F
0.004 ETH0.02004458115.71017287
Mint With Points135110832021-10-29 8:38:081197 days ago1635496688IN
0xe338aA35...9e0cce13F
0.0015 ETH0.02361919129.88785249
Mint With Points134864662021-10-25 12:02:071200 days ago1635163327IN
0xe338aA35...9e0cce13F
0.003 ETH0.0132512761.33630593
Mint With Points134824382021-10-24 21:03:271201 days ago1635109407IN
0xe338aA35...9e0cce13F
0.003 ETH0.0214017399.06240295
Mint With Points134730082021-10-23 9:40:361203 days ago1634982036IN
0xe338aA35...9e0cce13F
0.0015 ETH0.0110737860.89749223
Mint With Points134593522021-10-21 6:12:151205 days ago1634796735IN
0xe338aA35...9e0cce13F
0.0015 ETH0.0101383968.66831725
Mint With Points134471582021-10-19 8:35:401207 days ago1634632540IN
0xe338aA35...9e0cce13F
0.0015 ETH0.0078665343.1161383
Mint With Points134465132021-10-19 6:09:021207 days ago1634623742IN
0xe338aA35...9e0cce13F
0.0118 ETH0.0095936253.30027625
Mint With Points134382992021-10-17 23:08:411208 days ago1634512121IN
0xe338aA35...9e0cce13F
0.0015 ETH0.0179460198.68963159
Mint With Points134349152021-10-17 10:39:151208 days ago1634467155IN
0xe338aA35...9e0cce13F
0.0015 ETH0.0140510570.62857094
Mint With Points134328342021-10-17 2:40:341209 days ago1634438434IN
0xe338aA35...9e0cce13F
0.0015 ETH0.012590547
Mint With Points134306172021-10-16 18:20:211209 days ago1634408421IN
0xe338aA35...9e0cce13F
0.003 ETH0.03161818118.02983079
Mint With Points134286662021-10-16 11:08:151209 days ago1634382495IN
0xe338aA35...9e0cce13F
0.0015 ETH0.0128321159.39611389
Mint With Points134258882021-10-16 0:43:131210 days ago1634344993IN
0xe338aA35...9e0cce13F
0.0015 ETH0.01910548105.06580709
Mint With Points134215062021-10-15 8:07:511211 days ago1634285271IN
0xe338aA35...9e0cce13F
0.003 ETH0.02426697112.32472322
Mint With Points133917922021-10-10 15:48:191215 days ago1633880899IN
0xe338aA35...9e0cce13F
0.0015 ETH0.0133420380.98694869
Merge133825962021-10-09 5:01:271217 days ago1633755687IN
0xe338aA35...9e0cce13F
0.05 ETH0.0098394671.5045915
Mint With Points133749872021-10-08 0:25:391218 days ago1633652739IN
0xe338aA35...9e0cce13F
0.0015 ETH0.0145958198.85880791
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
136392242021-11-18 12:01:101176 days ago1637236870
0xe338aA35...9e0cce13F
0.02727272 ETH
136326182021-11-17 11:21:381177 days ago1637148098
0xe338aA35...9e0cce13F
0.00036363 ETH
136325782021-11-17 11:10:011177 days ago1637147401
0xe338aA35...9e0cce13F
0.00036363 ETH
136116392021-11-14 3:33:271181 days ago1636860807
0xe338aA35...9e0cce13F
0.00036363 ETH
135713622021-11-07 19:52:141187 days ago1636314734
0xe338aA35...9e0cce13F
0.00072727 ETH
135587662021-11-05 20:33:431189 days ago1636144423
0xe338aA35...9e0cce13F
0.00036363 ETH
135528682021-11-04 22:29:081190 days ago1636064948
0xe338aA35...9e0cce13F
0.00036363 ETH
135488942021-11-04 7:31:351191 days ago1636011095
0xe338aA35...9e0cce13F
0.00113637 ETH
135110832021-10-29 8:38:081197 days ago1635496688
0xe338aA35...9e0cce13F
0.00036363 ETH
134864662021-10-25 12:02:071200 days ago1635163327
0xe338aA35...9e0cce13F
0.00072727 ETH
134824382021-10-24 21:03:271201 days ago1635109407
0xe338aA35...9e0cce13F
0.00072727 ETH
134730082021-10-23 9:40:361203 days ago1634982036
0xe338aA35...9e0cce13F
0.00036363 ETH
134593522021-10-21 6:12:151205 days ago1634796735
0xe338aA35...9e0cce13F
0.00036363 ETH
134471582021-10-19 8:35:401207 days ago1634632540
0xe338aA35...9e0cce13F
0.00036363 ETH
134465132021-10-19 6:09:021207 days ago1634623742
0xe338aA35...9e0cce13F
0.00298722 ETH
134382992021-10-17 23:08:411208 days ago1634512121
0xe338aA35...9e0cce13F
0.00036363 ETH
134349152021-10-17 10:39:151208 days ago1634467155
0xe338aA35...9e0cce13F
0.00036363 ETH
134328342021-10-17 2:40:341209 days ago1634438434
0xe338aA35...9e0cce13F
0.00036363 ETH
134306172021-10-16 18:20:211209 days ago1634408421
0xe338aA35...9e0cce13F
0.00072727 ETH
134286662021-10-16 11:08:151209 days ago1634382495
0xe338aA35...9e0cce13F
0.00036363 ETH
134258882021-10-16 0:43:131210 days ago1634344993
0xe338aA35...9e0cce13F
0.00036363 ETH
134215062021-10-15 8:07:511211 days ago1634285271
0xe338aA35...9e0cce13F
0.00072727 ETH
133917922021-10-10 15:48:191215 days ago1633880899
0xe338aA35...9e0cce13F
0.00036363 ETH
133749872021-10-08 0:25:391218 days ago1633652739
0xe338aA35...9e0cce13F
0.00036363 ETH
133749662021-10-08 0:21:101218 days ago1633652470
0xe338aA35...9e0cce13F
0.00036363 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RainiNft1155Functions

Compiler Version
v0.8.3+commit.8d00100c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 12 : RainiNft1155Functions.sol
// "SPDX-License-Identifier: MIT"

pragma solidity ^0.8.3;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

interface IStakingPool {
  function balanceOf(address _owner) external view returns (uint256 balance);
  function burn(address _owner, uint256 _amount) external;
}

interface INftStakingPool {
  function getTokenStamina(uint256 _tokenId, address _nftContractAddress) external view returns (uint256 stamina);
  function mergeTokens(uint256 _newTokenId, uint256[] memory _tokenIds, address _nftContractAddress) external;
}

interface IRainiCustomNFT {
  function onTransfered(address from, address to, uint256 id, uint256 amount, bytes memory data) external;
  function onMerged(uint256 _newTokenId, uint256[] memory _tokenId, address _nftContractAddress, uint256[] memory data) external;
  function onMinted(address _to, uint256 _tokenId, uint256 _cardId, uint256 _cardLevel, uint256 _amount, bytes1 _mintedContractChar, uint256 _number, uint256[] memory _data) external;
  function uri(uint256 id) external view returns (string memory);
}

interface IRainiNft1155 is IERC1155 {
  struct CardLevel {
    uint64 conversionRate; // number of base tokens required to create
    uint32 numberMinted;
    uint128 tokenId; // ID of token if grouped, 0 if not
    uint32 maxStamina; // The initial and maxiumum stamina for a token
  }

  struct Card {
    uint64 costInUnicorns;
    uint64 costInRainbows;
    uint16 maxMintsPerAddress;
    uint32 maxSupply; // number of base tokens mintable
    uint32 allocation; // number of base tokens mintable with points on this contract
    uint32 mintTimeStart; // the timestamp from which the card can be minted
    bool locked;
    address subContract;
  }
  
  struct TokenVars {
    uint128 cardId;
    uint32 level;
    uint32 number; // to assign a numbering to NFTs
    bytes1 mintedContractChar;
  }

  function maxTokenId() external view returns (uint256);
  function contractChar() external view returns (bytes1);

  function numberMintedByAddress(address _address, uint256 _cardID) external view returns (uint256);

  function burn(address _owner, uint256 _tokenId, uint256 _amount, bool _isBridged) external;

  function getPathUri(uint256 _cardId) view external returns (string memory);

  function cards(uint256 _cardId) external view returns (Card memory);
  function cardLevels(uint256 _cardId, uint256 _level) external view returns (CardLevel memory);
  function tokenVars(uint256 _tokenId) external view returns (TokenVars memory);

  function mint(address _to, uint256 _cardId, uint256 _cardLevel, uint256 _amount, bytes1 _mintedContractChar, uint256 _number, uint256[] memory _data) external;
  function addToNumberMintedByAddress(address _address, uint256 _cardId, uint256 amount) external;
}

contract RainiNft1155Functions is AccessControl, ReentrancyGuard {

  address public nftStakingPoolAddress;

  uint256 public constant POINT_COST_DECIMALS = 1000000000000000000;

  uint256 public rainbowToEth;
  uint256 public unicornToEth;
  uint256 public minPointsPercentToMint;

  mapping(address => bool) public rainbowPools;
  mapping(address => bool) public unicornPools;
  mapping(uint256 => uint256) public mergeFees;

  uint256 public mintingFeeBasisPoints;

  IRainiNft1155 nftContract;

  constructor(address _nftContractAddress, address _contractOwner) {
    _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
    _setupRole(DEFAULT_ADMIN_ROLE, _contractOwner);
    nftContract = IRainiNft1155(_nftContractAddress);
  }

  modifier onlyOwner() {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()));
    _;
  }

  function addRainbowPool(address _rainbowPool) 
    external onlyOwner {
      rainbowPools[_rainbowPool] = true;
  }

  function removeRainbowPool(address _rainbowPool) 
    external onlyOwner {
      rainbowPools[_rainbowPool] = false;
  }

  function addUnicornPool(address _unicornPool) 
    external onlyOwner {
      unicornPools[_unicornPool] = true;
  }

  function removeUnicornPool(address _unicornPool) 
    external onlyOwner {
      unicornPools[_unicornPool] = false;
  }

  function setEtherValues(uint256 _unicornToEth, uint256 _rainbowToEth, uint256 _minPointsPercentToMint)
     external onlyOwner {
      unicornToEth = _unicornToEth;
      rainbowToEth = _rainbowToEth;
      minPointsPercentToMint = _minPointsPercentToMint;
   }

  function setFees(uint256 _mintingFeeBasisPoints, uint256[] memory _mergeFees) 
    external onlyOwner {
      mintingFeeBasisPoints =_mintingFeeBasisPoints;
      for (uint256 i = 1; i < _mergeFees.length; i++) {
        mergeFees[i] = _mergeFees[i];
      }
  }

  function setNftStakingPoolAddress(address _nftStakingPoolAddress)
    external onlyOwner {
      nftStakingPoolAddress = (_nftStakingPoolAddress);
  }

  struct MergeData {
    uint256 cost;
    uint256 totalPointsBurned;
    uint256 currentTokenToMint;
    bool willCallPool;
    bool willCallSubContract;
  }

  function merge(uint256 _cardId, uint256 _level, uint256 _mintAmount, uint256[] memory _tokenIds, uint256[] memory _burnAmounts, uint256[] memory _data) 
    external payable nonReentrant {
      IRainiNft1155.CardLevel memory _cardLevel = nftContract.cardLevels(_cardId, _level);

      require(_level > 0 && _cardLevel.conversionRate > 0, "merge not allowed");

      MergeData memory _locals = MergeData({
        cost: 0,
        totalPointsBurned: 0,
        currentTokenToMint: 0,
        willCallPool: false,
        willCallSubContract: false
      });


      _locals.cost = _cardLevel.conversionRate * _mintAmount;

      uint256[] memory mergedTokensIds;
      INftStakingPool nftStakingPool;
      IRainiCustomNFT subContract;

      _locals.willCallPool = nftStakingPoolAddress != address(0) && _level > 0 && nftContract.cardLevels(_cardId, _level-1).tokenId == 0;
      _locals.willCallSubContract = _cardLevel.tokenId == 0 && nftContract.cards(_cardId).subContract != address(0);
      if (_locals.willCallPool || _locals.willCallSubContract) {
        mergedTokensIds = new uint256[](_tokenIds.length);
        if (_locals.willCallPool) {
          nftStakingPool = INftStakingPool(nftStakingPoolAddress);
        }
        if (_locals.willCallSubContract) {
          subContract = IRainiCustomNFT(nftContract.cards(_cardId).subContract);
        }
      }

      for (uint256 i = 0; i < _tokenIds.length; i++) {
        require(_burnAmounts[i] <= nftContract.balanceOf(_msgSender(), _tokenIds[i]), 'not enough balance');
        IRainiNft1155.TokenVars memory _tempTokenVars =  nftContract.tokenVars(_tokenIds[i]);
        require(_tempTokenVars.cardId == _cardId, "card mismatch");
        require(_tempTokenVars.level < _level, "can only merge into higher levels");
        IRainiNft1155.CardLevel memory _tempCardLevel = nftContract.cardLevels(_tempTokenVars.cardId, _tempTokenVars.level);
        if (_tempTokenVars.level == 0) {
          _locals.totalPointsBurned += _burnAmounts[i];
        } else {
          _locals.totalPointsBurned += _burnAmounts[i] * _tempCardLevel.conversionRate;
        }
        nftContract.burn(_msgSender(), _tokenIds[i], _burnAmounts[i], false);

        if (_locals.willCallPool || _locals.willCallSubContract) {
          mergedTokensIds[i] = _tokenIds[i];
          if (_locals.totalPointsBurned > (_locals.currentTokenToMint + 1) * _cardLevel.conversionRate || i == _tokenIds.length - 1) {
            _locals.currentTokenToMint++;
            if (_locals.willCallPool) {
              nftStakingPool.mergeTokens(_locals.currentTokenToMint + nftContract.maxTokenId(), mergedTokensIds, address(nftContract));
            }
            if (_locals.willCallSubContract) {
              subContract.onMerged(_locals.currentTokenToMint + nftContract.maxTokenId(), mergedTokensIds, address(nftContract), _data);
            }
            if (_locals.currentTokenToMint < _mintAmount) {
              mergedTokensIds = new uint256[](_cardLevel.conversionRate);
            }
          }
        }
      }

      require(_locals.totalPointsBurned == _locals.cost, "wrong no tkns burned");

      require(mergeFees[_level] * _mintAmount <= msg.value, "Not enough ETH");

      (bool success, ) = _msgSender().call{ value: msg.value - mergeFees[_level] * _mintAmount}(""); // refund excess Eth
      require(success, "transfer failed");

      nftContract.mint(_msgSender(), _cardId, _level, _mintAmount, nftContract.contractChar(), 0, _data);
  }

  struct MintWithPointsData {
    uint256 totalPriceRainbows;
    uint256 totalPriceUnicorns;
    uint256 fee;
    uint256 amountEthToWithdraw;
    bool success;
  }
  
  function mintWithPoints(uint256[] memory _cardId, uint256[] memory _amount, bool[] memory _useUnicorns, uint256[][] memory _data, address[] memory _rainbowPools, address[] memory _unicornPools)
    external payable nonReentrant {

    MintWithPointsData memory _locals = MintWithPointsData({
      totalPriceRainbows: 0,
      totalPriceUnicorns: 0,
      fee: 0,
      amountEthToWithdraw: 0,
      success: false
    });

    for (uint256 i = 0; i < _cardId.length; i++) {
      IRainiNft1155.Card memory card =  nftContract.cards(_cardId[i]);
      IRainiNft1155.CardLevel memory cardLevel =  nftContract.cardLevels(_cardId[i], 0);

      require(block.timestamp >= card.mintTimeStart, 'too early');
      require(nftContract.numberMintedByAddress(_msgSender(), _cardId[i]) + _amount[i] <= card.maxMintsPerAddress, "Max mints reached for address");

      if (cardLevel.numberMinted + _amount[i] > card.allocation) {
        _amount[i] = card.allocation - cardLevel.numberMinted;
      }

      if (_useUnicorns[i]) {
        require(card.costInUnicorns > 0, "unicorns not allowed");
        _locals.totalPriceUnicorns += card.costInUnicorns * _amount[i] * POINT_COST_DECIMALS;
      } else {
        require(card.costInRainbows > 0, "rainbows not allowed");
        _locals.totalPriceRainbows += card.costInRainbows * _amount[i] * POINT_COST_DECIMALS;
      }

      if (card.costInRainbows > 0) {
        _locals.fee += (card.costInRainbows * _amount[i] * POINT_COST_DECIMALS * mintingFeeBasisPoints) / (rainbowToEth * 10000);
      } else {
        _locals.fee += (card.costInUnicorns * _amount[i] * POINT_COST_DECIMALS * mintingFeeBasisPoints) / (unicornToEth * 10000);
      }
    }

    _locals.amountEthToWithdraw = 0;
    
    for (uint256 n = 0; n < 2; n++) {
      bool loopTypeUnicorns = n > 0;

      uint256 totalBalance = 0;
      uint256 totalPrice = loopTypeUnicorns ? _locals.totalPriceUnicorns : _locals.totalPriceRainbows;
      uint256 remainingPrice = totalPrice;

      if (totalPrice > 0) {
        uint256 loopLength = loopTypeUnicorns ? _unicornPools.length : _rainbowPools.length;

        require(loopLength > 0, "invalid pools");

        for (uint256 i = 0; i < loopLength; i++) {
          IStakingPool pool;
          if (loopTypeUnicorns) {
            require((unicornPools[_unicornPools[i]]), "invalid unicorn pool");
            pool = IStakingPool(_unicornPools[i]);
          } else {
            require((rainbowPools[_rainbowPools[i]]), "invalid rainbow pool");
            pool = IStakingPool(_rainbowPools[i]);
          }
          uint256 _balance = pool.balanceOf(_msgSender());
          totalBalance += _balance;

          if (totalBalance >=  totalPrice) {
            pool.burn(_msgSender(), remainingPrice);
            remainingPrice = 0;
            break;
          } else {
            pool.burn(_msgSender(), _balance);
            remainingPrice -= _balance;
          }
        }

        if (remainingPrice > 0) {
          uint256 minPoints = (totalPrice * minPointsPercentToMint) / 100;
          require(totalPrice - remainingPrice >= minPoints, "not enough balance");
          uint256 pointsToEth = loopTypeUnicorns ? unicornToEth : rainbowToEth;
          require(msg.value * pointsToEth > remainingPrice, "not enough balance");
          _locals.amountEthToWithdraw += remainingPrice / pointsToEth;
        }
      }
    }

    // Add minting fees
    _locals.amountEthToWithdraw += _locals.fee;

    require(_locals.amountEthToWithdraw <= msg.value);

    (_locals.success, ) = _msgSender().call{ value: msg.value - _locals.amountEthToWithdraw }(""); // refund excess Eth
    require(_locals.success, "transfer failed");

    bool _tokenMinted = false;
    for (uint256 i = 0; i < _cardId.length; i++) {
      if (_amount[i] > 0) {
        nftContract.addToNumberMintedByAddress(_msgSender(), _cardId[i], _amount[i]);
        nftContract.mint(_msgSender(), _cardId[i], 0, _amount[i], nftContract.contractChar(), 0, _data[i]);
        _tokenMinted = true;
      }
    }
    require(_tokenMinted, 'Allocation exhausted');
  }

  // Allow the owner to withdraw Ether payed into the contract
  function withdrawEth(uint256 _amount)
    external onlyOwner {
      require(_amount <= address(this).balance, "not enough balance");
      (bool success, ) = _msgSender().call{ value: _amount }("");
      require(success, "transfer failed");
  }
}

File 2 of 12 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    function hasRole(bytes32 role, address account) external view returns (bool);

    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    function grantRole(bytes32 role, address account) external;

    function revokeRole(bytes32 role, address account) external;

    function renounceRole(bytes32 role, address account) external;
}

/**
 * @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 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 {_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 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]{20}) is missing role (0x[0-9a-f]{32})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    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 {
        emit RoleAdminChanged(role, getRoleAdmin(role), adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 4 of 12 : ERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

        return batchBalances;
    }

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

        return array;
    }
}

File 5 of 12 : IERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

File 6 of 12 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC1155.sol";

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

File 8 of 12 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

File 9 of 12 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 10 of 12 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_nftContractAddress","type":"address"},{"internalType":"address","name":"_contractOwner","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":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POINT_COST_DECIMALS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rainbowPool","type":"address"}],"name":"addRainbowPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_unicornPool","type":"address"}],"name":"addUnicornPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"},{"internalType":"uint256","name":"_level","type":"uint256"},{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_burnAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"_data","type":"uint256[]"}],"name":"merge","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"mergeFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minPointsPercentToMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_cardId","type":"uint256[]"},{"internalType":"uint256[]","name":"_amount","type":"uint256[]"},{"internalType":"bool[]","name":"_useUnicorns","type":"bool[]"},{"internalType":"uint256[][]","name":"_data","type":"uint256[][]"},{"internalType":"address[]","name":"_rainbowPools","type":"address[]"},{"internalType":"address[]","name":"_unicornPools","type":"address[]"}],"name":"mintWithPoints","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintingFeeBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftStakingPoolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rainbowPools","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rainbowToEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rainbowPool","type":"address"}],"name":"removeRainbowPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_unicornPool","type":"address"}],"name":"removeUnicornPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_unicornToEth","type":"uint256"},{"internalType":"uint256","name":"_rainbowToEth","type":"uint256"},{"internalType":"uint256","name":"_minPointsPercentToMint","type":"uint256"}],"name":"setEtherValues","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintingFeeBasisPoints","type":"uint256"},{"internalType":"uint256[]","name":"_mergeFees","type":"uint256[]"}],"name":"setFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nftStakingPoolAddress","type":"address"}],"name":"setNftStakingPoolAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"unicornPools","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unicornToEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawEth","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200343538038062003435833981016040819052620000349162000146565b600180556200004560003362000079565b6200005260008262000079565b50600a80546001600160a01b0319166001600160a01b03929092169190911790556200017d565b62000085828262000089565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000085576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620000e53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b03811681146200014157600080fd5b919050565b6000806040838503121562000159578182fd5b620001648362000129565b9150620001746020840162000129565b90509250929050565b6132a8806200018d6000396000f3fe6080604052600436106101815760003560e01c80635a3b336c116100d1578063b29dc70a1161008a578063d547741f11610064578063d547741f14610479578063e0e5120d14610499578063f7e177de146104b9578063f9f98af6146104cf57610181565b8063b29dc70a14610419578063bda3ed071461042c578063c311d0491461045957610181565b80635a3b336c1461037557806388d1ae6c1461039557806391d14854146103a8578063928cb148146103c8578063a217fddf146103e8578063ae3068c1146103fd57610181565b80631d9083f31161013e5780632f2ff15d116101185780632f2ff15d146102ff57806336568abe1461031f57806354a7d0a91461033f578063582f706f1461035f57610181565b80631d9083f31461028d578063248a9ca3146102af578063257ea0ab146102df57610181565b806301ffc9a71461018657806308a55a6e146101bb5780630c024776146101eb57806313f431601461022357806315d21e11146102535780631c51333914610277575b600080fd5b34801561019257600080fd5b506101a66101a1366004612c35565b6104ef565b60405190151581526020015b60405180910390f35b3480156101c757600080fd5b506101a66101d6366004612acb565b60066020526000908152604090205460ff1681565b3480156101f757600080fd5b5060025461020b906001600160a01b031681565b6040516001600160a01b0390911681526020016101b2565b34801561022f57600080fd5b506101a661023e366004612acb565b60076020526000908152604090205460ff1681565b34801561025f57600080fd5b5061026960045481565b6040519081526020016101b2565b34801561028357600080fd5b5061026960035481565b34801561029957600080fd5b506102ad6102a8366004612acb565b610528565b005b3480156102bb57600080fd5b506102696102ca366004612bee565b60009081526020819052604090206001015490565b3480156102eb57600080fd5b506102ad6102fa366004612acb565b61055e565b34801561030b57600080fd5b506102ad61031a366004612c06565b610593565b34801561032b57600080fd5b506102ad61033a366004612c06565b6105bf565b34801561034b57600080fd5b506102ad61035a366004612e1c565b610642565b34801561036b57600080fd5b5061026960095481565b34801561038157600080fd5b506102ad610390366004612acb565b610664565b6102ad6103a3366004612e47565b61069c565b3480156103b457600080fd5b506101a66103c3366004612c06565b6114c3565b3480156103d457600080fd5b506102ad6103e3366004612acb565b6114ec565b3480156103f457600080fd5b50610269600081565b34801561040957600080fd5b50610269670de0b6b3a764000081565b6102ad610427366004612ae7565b611524565b34801561043857600080fd5b50610269610447366004612bee565b60086020526000908152604090205481565b34801561046557600080fd5b506102ad610474366004612bee565b61242c565b34801561048557600080fd5b506102ad610494366004612c06565b6124c8565b3480156104a557600080fd5b506102ad6104b4366004612acb565b6124ee565b3480156104c557600080fd5b5061026960055481565b3480156104db57600080fd5b506102ad6104ea366004612dd8565b612523565b60006001600160e01b03198216637965db0b60e01b148061052057506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6105336000336103c3565b61053c57600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6105696000336103c3565b61057257600080fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000828152602081905260409020600101546105b081335b612596565b6105ba83836125fa565b505050565b6001600160a01b03811633146106345760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61063e828261267e565b5050565b61064d6000336103c3565b61065657600080fd5b600492909255600355600555565b61066f6000336103c3565b61067857600080fd5b6001600160a01b03166000908152600660205260409020805460ff19166001179055565b600260015414156106ef5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161062b565b6002600155600a54604051631c39f49d60e21b815260048101889052602481018790526000916001600160a01b0316906370e7d2749060440160806040518083038186803b15801561074057600080fd5b505afa158015610754573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107789190612c5d565b9050600086118015610793575080516001600160401b031615155b6107d35760405162461bcd60e51b81526020600482015260116024820152701b595c99d9481b9bdd08185b1b1bddd959607a1b604482015260640161062b565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915281516108149087906001600160401b0316613163565b815260025460609060009081906001600160a01b031615801590610838575060008a115b80156108df5750600a546001600160a01b03166370e7d2748c61085c60018e613182565b6040516001600160e01b031960e085901b1681526004810192909252602482015260440160806040518083038186803b15801561089857600080fd5b505afa1580156108ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d09190612c5d565b604001516001600160801b0316155b1515606085015260408501516001600160801b031615801561098a5750600a546040516311b820ed60e31b8152600481018d90526000916001600160a01b031690638dc10768906024016101006040518083038186803b15801561094257600080fd5b505afa158015610956573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097a9190612cbd565b60e001516001600160a01b031614155b151560808501526060840151806109a2575083608001515b15610aa15787516001600160401b038111156109ce57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156109f7578160200160208202803683370190505b509250836060015115610a13576002546001600160a01b031691505b836080015115610aa157600a546040516311b820ed60e31b8152600481018d90526001600160a01b0390911690638dc10768906024016101006040518083038186803b158015610a6257600080fd5b505afa158015610a76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9a9190612cbd565b60e0015190505b60005b885181101561129057600a546001600160a01b031662fdd58e338b8481518110610ade57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401610b179291906001600160a01b03929092168252602082015260400190565b60206040518083038186803b158015610b2f57600080fd5b505afa158015610b43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b679190612dc0565b888281518110610b8757634e487b7160e01b600052603260045260246000fd5b60200260200101511115610bad5760405162461bcd60e51b815260040161062b9061300d565b600a5489516000916001600160a01b0316906301870f02908c9085908110610be557634e487b7160e01b600052603260045260246000fd5b60200260200101516040518263ffffffff1660e01b8152600401610c0b91815260200190565b60806040518083038186803b158015610c2357600080fd5b505afa158015610c37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5b9190612d6c565b80519091506001600160801b03168d14610ca75760405162461bcd60e51b815260206004820152600d60248201526c0c6c2e4c840dad2e6dac2e8c6d609b1b604482015260640161062b565b8b816020015163ffffffff1610610d0a5760405162461bcd60e51b815260206004820152602160248201527f63616e206f6e6c79206d6572676520696e746f20686967686572206c6576656c6044820152607360f81b606482015260840161062b565b600a5481516020830151604051631c39f49d60e21b81526001600160801b03909216600483015263ffffffff1660248201526000916001600160a01b0316906370e7d2749060440160806040518083038186803b158015610d6a57600080fd5b505afa158015610d7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da29190612c5d565b9050816020015163ffffffff1660001415610df857898381518110610dd757634e487b7160e01b600052603260045260246000fd5b602002602001015187602001818151610df0919061312b565b905250610e4d565b80600001516001600160401b03168a8481518110610e2657634e487b7160e01b600052603260045260246000fd5b6020026020010151610e389190613163565b87602001818151610e49919061312b565b9052505b600a546001600160a01b03166331126dd1338d8681518110610e7f57634e487b7160e01b600052603260045260246000fd5b60200260200101518d8781518110610ea757634e487b7160e01b600052603260045260246000fd5b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0390931660048401526024830191909152604482015260006064820152608401600060405180830381600087803b158015610f0757600080fd5b505af1158015610f1b573d6000803e3d6000fd5b50505050866060015180610f30575086608001515b1561127b578a8381518110610f5557634e487b7160e01b600052603260045260246000fd5b6020026020010151868481518110610f7d57634e487b7160e01b600052603260045260246000fd5b60200260200101818152505087600001516001600160401b031687604001516001610fa8919061312b565b610fb29190613163565b87602001511180610fcf575060018b51610fcc9190613182565b83145b1561127b5760408701805190610fe482613205565b9052506060870151156110fa57846001600160a01b031663feb0ae7f600a60009054906101000a90046001600160a01b03166001600160a01b03166391ba317a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561104e57600080fd5b505afa158015611062573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110869190612dc0565b8960400151611095919061312b565b600a546040516001600160e01b031960e085901b1681526110c792918b916001600160a01b0390911690600401613062565b600060405180830381600087803b1580156110e157600080fd5b505af11580156110f5573d6000803e3d6000fd5b505050505b86608001511561120f57836001600160a01b031663e4a3fba9600a60009054906101000a90046001600160a01b03166001600160a01b03166391ba317a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561116157600080fd5b505afa158015611175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111999190612dc0565b89604001516111a8919061312b565b600a546040516001600160e01b031960e085901b1681526111dc92918b916001600160a01b03909116908f90600401613093565b600060405180830381600087803b1580156111f657600080fd5b505af115801561120a573d6000803e3d6000fd5b505050505b8b8760400151101561127b5787600001516001600160401b03166001600160401b0381111561124e57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611277578160200160208202803683370190505b5095505b5050808061128890613205565b915050610aa4565b5083516020850151146112dc5760405162461bcd60e51b81526020600482015260146024820152731ddc9bdb99c81b9bc81d1adb9cc8189d5c9b995960621b604482015260640161062b565b60008a81526008602052604090205434906112f8908b90613163565b11156113375760405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced0408aa8960931b604482015260640161062b565b60008a8152600860205260408120543390611353908c90613163565b61135d9034613182565b604051600081818185875af1925050503d8060008114611399576040519150601f19603f3d011682016040523d82523d6000602084013e61139e565b606091505b50509050806113bf5760405162461bcd60e51b815260040161062b90613039565b600a546001600160a01b031663a39501df338e8e8e600a60009054906101000a90046001600160a01b03166001600160a01b0316636bb2e32d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142257600080fd5b505afa158015611436573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145a9190612bd4565b60008e6040518863ffffffff1660e01b815260040161147f9796959493929190612f88565b600060405180830381600087803b15801561149957600080fd5b505af11580156114ad573d6000803e3d6000fd5b5050600180555050505050505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6114f76000336103c3565b61150057600080fd5b6001600160a01b03166000908152600760205260409020805460ff19166001179055565b600260015414156115775760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161062b565b60026001556040805160a0810182526000808252602082018190529181018290526060810182905260808101829052905b8751811015611c2a57600a5488516000916001600160a01b031690638dc10768908b90859081106115e957634e487b7160e01b600052603260045260246000fd5b60200260200101516040518263ffffffff1660e01b815260040161160f91815260200190565b6101006040518083038186803b15801561162857600080fd5b505afa15801561163c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116609190612cbd565b600a548a519192506000916001600160a01b03909116906370e7d274908c908690811061169d57634e487b7160e01b600052603260045260246000fd5b602002602001015160006040518363ffffffff1660e01b81526004016116cd929190918252602082015260400190565b60806040518083038186803b1580156116e557600080fd5b505afa1580156116f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171d9190612c5d565b90508160a0015163ffffffff164210156117655760405162461bcd60e51b8152602060048201526009602482015268746f6f206561726c7960b81b604482015260640161062b565b816040015161ffff1689848151811061178e57634e487b7160e01b600052603260045260246000fd5b6020908102919091010151600a546001600160a01b0316630a3de451338e88815181106117cb57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b81526004016118049291906001600160a01b03929092168252602082015260400190565b60206040518083038186803b15801561181c57600080fd5b505afa158015611830573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118549190612dc0565b61185e919061312b565b11156118ac5760405162461bcd60e51b815260206004820152601d60248201527f4d6178206d696e7473207265616368656420666f722061646472657373000000604482015260640161062b565b816080015163ffffffff168984815181106118d757634e487b7160e01b600052603260045260246000fd5b6020026020010151826020015163ffffffff166118f4919061312b565b1115611941578060200151826080015161190e9190613199565b63ffffffff1689848151811061193457634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b87838151811061196157634e487b7160e01b600052603260045260246000fd5b602002602001015115611a285781516001600160401b03166119bc5760405162461bcd60e51b81526020600482015260146024820152731d5b9a58dbdc9b9cc81b9bdd08185b1b1bddd95960621b604482015260640161062b565b670de0b6b3a76400008984815181106119e557634e487b7160e01b600052603260045260246000fd5b602002602001015183600001516001600160401b0316611a059190613163565b611a0f9190613163565b84602001818151611a20919061312b565b905250611ae2565b600082602001516001600160401b031611611a7c5760405162461bcd60e51b81526020600482015260146024820152731c985a5b989bdddcc81b9bdd08185b1b1bddd95960621b604482015260640161062b565b670de0b6b3a7640000898481518110611aa557634e487b7160e01b600052603260045260246000fd5b602002602001015183602001516001600160401b0316611ac59190613163565b611acf9190613163565b84518590611ade90839061312b565b9052505b60208201516001600160401b031615611b8757600354611b0490612710613163565b600954670de0b6b3a76400008b8681518110611b3057634e487b7160e01b600052603260045260246000fd5b602002602001015185602001516001600160401b0316611b509190613163565b611b5a9190613163565b611b649190613163565b611b6e9190613143565b84604001818151611b7f919061312b565b905250611c15565b600454611b9690612710613163565b600954670de0b6b3a76400008b8681518110611bc257634e487b7160e01b600052603260045260246000fd5b602002602001015185600001516001600160401b0316611be29190613163565b611bec9190613163565b611bf69190613163565b611c009190613143565b84604001818151611c11919061312b565b9052505b50508080611c2290613205565b9150506115a8565b506000606082018190525b60028110156120ac5780151560008082611c50578451611c56565b84602001515b905080801561209557600084611c6d578851611c70565b87515b905060008111611cb25760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420706f6f6c7360981b604482015260640161062b565b60005b81811015611fe75760008615611d8257600760008b8481518110611ce957634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16611d535760405162461bcd60e51b81526020600482015260146024820152731a5b9d985b1a59081d5b9a58dbdc9b881c1bdbdb60621b604482015260640161062b565b898281518110611d7357634e487b7160e01b600052603260045260246000fd5b60200260200101519050611e3b565b600660008c8481518110611da657634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16611e105760405162461bcd60e51b81526020600482015260146024820152731a5b9d985b1a59081c985a5b989bddc81c1bdbdb60621b604482015260640161062b565b8a8281518110611e3057634e487b7160e01b600052603260045260246000fd5b602002602001015190505b60006001600160a01b0382166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015611e8c57600080fd5b505afa158015611ea0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec49190612dc0565b9050611ed0818861312b565b9650858710611f54576001600160a01b038216639dc29fac336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101889052604401600060405180830381600087803b158015611f3157600080fd5b505af1158015611f45573d6000803e3d6000fd5b50505050600094505050611fe7565b6001600160a01b038216639dc29fac336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b158015611fac57600080fd5b505af1158015611fc0573d6000803e3d6000fd5b505050508085611fd09190613182565b945050508080611fdf90613205565b915050611cb5565b5081156120935760006064600554856120009190613163565b61200a9190613143565b9050806120178486613182565b10156120355760405162461bcd60e51b815260040161062b9061300d565b60008661204457600354612048565b6004545b9050836120558234613163565b116120725760405162461bcd60e51b815260040161062b9061300d565b61207c8185613143565b8960600181815161208d919061312b565b90525050505b505b5050505080806120a490613205565b915050611c35565b508060400151816060018181516120c3919061312b565b90525060608101513410156120d757600080fd5b606081015133906120e89034613182565b604051600081818185875af1925050503d8060008114612124576040519150601f19603f3d011682016040523d82523d6000602084013e612129565b606091505b50501515608082018190526121505760405162461bcd60e51b815260040161062b90613039565b6000805b88518110156123d957600088828151811061217f57634e487b7160e01b600052603260045260246000fd5b602002602001015111156123c757600a546001600160a01b031663c2fa4019338b84815181106121bf57634e487b7160e01b600052603260045260246000fd5b60200260200101518b85815181106121e757634e487b7160e01b600052603260045260246000fd5b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381600087803b15801561224057600080fd5b505af1158015612254573d6000803e3d6000fd5b5050600a546001600160a01b0316915063a39501df9050338b848151811061228c57634e487b7160e01b600052603260045260246000fd5b602002602001015160008c86815181106122b657634e487b7160e01b600052603260045260246000fd5b6020026020010151600a60009054906101000a90046001600160a01b03166001600160a01b0316636bb2e32d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561230c57600080fd5b505afa158015612320573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123449190612bd4565b60008d898151811061236657634e487b7160e01b600052603260045260246000fd5b60200260200101516040518863ffffffff1660e01b81526004016123909796959493929190612f88565b600060405180830381600087803b1580156123aa57600080fd5b505af11580156123be573d6000803e3d6000fd5b50505050600191505b806123d181613205565b915050612154565b508061241e5760405162461bcd60e51b8152602060048201526014602482015273105b1b1bd8d85d1a5bdb88195e1a185d5cdd195960621b604482015260640161062b565b505060018055505050505050565b6124376000336103c3565b61244057600080fd5b478111156124605760405162461bcd60e51b815260040161062b9061300d565b604051600090339083908381818185875af1925050503d80600081146124a2576040519150601f19603f3d011682016040523d82523d6000602084013e6124a7565b606091505b505090508061063e5760405162461bcd60e51b815260040161062b90613039565b6000828152602081905260409020600101546124e481336105ab565b6105ba838361267e565b6124f96000336103c3565b61250257600080fd5b6001600160a01b03166000908152600760205260409020805460ff19169055565b61252e6000336103c3565b61253757600080fd5b600982905560015b81518110156105ba5781818151811061256857634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600083815260089092526040909120558061258e81613205565b91505061253f565b6125a082826114c3565b61063e576125b8816001600160a01b031660146126e3565b6125c38360206126e3565b6040516020016125d4929190612f13565b60408051601f198184030181529082905262461bcd60e51b825261062b91600401612fda565b61260482826114c3565b61063e576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561263a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61268882826114c3565b1561063e576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b606060006126f2836002613163565b6126fd90600261312b565b6001600160401b0381111561272257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561274c576020820181803683370190505b509050600360fc1b8160008151811061277557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106127b257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006127d6846002613163565b6127e190600161312b565b90505b6001811115612875576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061282357634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061284757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361286e816131ee565b90506127e4565b5083156128c45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161062b565b9392505050565b80516105238161324c565b600082601f8301126128e6578081fd5b813560206128fb6128f683613108565b6130d8565b80838252828201915082860187848660051b890101111561291a578586fd5b855b8581101561294157813561292f8161324c565b8452928401929084019060010161291c565b5090979650505050505050565b600082601f83011261295e578081fd5b8135602061296e6128f683613108565b82815281810190858301855b8581101561294157612991898684358b0101612a09565b8452928401929084019060010161297a565b600082601f8301126129b3578081fd5b813560206129c36128f683613108565b80838252828201915082860187848660051b89010111156129e2578586fd5b855b858110156129415781356129f781613264565b845292840192908401906001016129e4565b600082601f830112612a19578081fd5b81356020612a296128f683613108565b80838252828201915082860187848660051b8901011115612a48578586fd5b855b8581101561294157813584529284019290840190600101612a4a565b805161052381613264565b80516001600160f81b03198116811461052357600080fd5b80516001600160801b038116811461052357600080fd5b805163ffffffff8116811461052357600080fd5b80516001600160401b038116811461052357600080fd5b600060208284031215612adc578081fd5b81356128c48161324c565b60008060008060008060c08789031215612aff578182fd5b86356001600160401b0380821115612b15578384fd5b612b218a838b01612a09565b97506020890135915080821115612b36578384fd5b612b428a838b01612a09565b96506040890135915080821115612b57578384fd5b612b638a838b016129a3565b95506060890135915080821115612b78578384fd5b612b848a838b0161294e565b94506080890135915080821115612b99578384fd5b612ba58a838b016128d6565b935060a0890135915080821115612bba578283fd5b50612bc789828a016128d6565b9150509295509295509295565b600060208284031215612be5578081fd5b6128c482612a71565b600060208284031215612bff578081fd5b5035919050565b60008060408385031215612c18578182fd5b823591506020830135612c2a8161324c565b809150509250929050565b600060208284031215612c46578081fd5b81356001600160e01b0319811681146128c4578182fd5b600060808284031215612c6e578081fd5b612c7860806130d8565b612c8183612ab4565b8152612c8f60208401612aa0565b6020820152612ca060408401612a89565b6040820152612cb160608401612aa0565b60608201529392505050565b6000610100808385031215612cd0578182fd5b612cd9816130d8565b9050612ce483612ab4565b8152612cf260208401612ab4565b6020820152604083015161ffff81168114612d0b578283fd5b6040820152612d1c60608401612aa0565b6060820152612d2d60808401612aa0565b6080820152612d3e60a08401612aa0565b60a0820152612d4f60c08401612a66565b60c0820152612d6060e084016128cb565b60e08201529392505050565b600060808284031215612d7d578081fd5b612d8760806130d8565b612d9083612a89565b8152612d9e60208401612aa0565b6020820152612daf60408401612aa0565b6040820152612cb160608401612a71565b600060208284031215612dd1578081fd5b5051919050565b60008060408385031215612dea578182fd5b8235915060208301356001600160401b03811115612e06578182fd5b612e1285828601612a09565b9150509250929050565b600080600060608486031215612e30578081fd5b505081359360208301359350604090920135919050565b60008060008060008060c08789031215612e5f578384fd5b86359550602087013594506040870135935060608701356001600160401b0380821115612e8a578384fd5b612e968a838b01612a09565b94506080890135915080821115612eab578384fd5b612eb78a838b01612a09565b935060a0890135915080821115612ecc578283fd5b50612bc789828a01612a09565b6000815180845260208085019450808401835b83811015612f0857815187529582019590820190600101612eec565b509495945050505050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612f4b8160178501602088016131be565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612f7c8160288401602088016131be565b01602801949350505050565b600060018060a01b038916825287602083015286604083015285606083015260ff60f81b851660808301528360a083015260e060c0830152612fcd60e0830184612ed9565b9998505050505050505050565b6000602082528251806020840152612ff98160408501602087016131be565b601f01601f19169190910160400192915050565b6020808252601290820152716e6f7420656e6f7567682062616c616e636560701b604082015260600190565b6020808252600f908201526e1d1c985b9cd9995c8819985a5b1959608a1b604082015260600190565b60008482526060602083015261307b6060830185612ed9565b905060018060a01b0383166040830152949350505050565b6000858252608060208301526130ac6080830186612ed9565b6001600160a01b038516604084015282810360608401526130cd8185612ed9565b979650505050505050565b604051601f8201601f191681016001600160401b038111828210171561310057613100613236565b604052919050565b60006001600160401b0382111561312157613121613236565b5060051b60200190565b6000821982111561313e5761313e613220565b500190565b60008261315e57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561317d5761317d613220565b500290565b60008282101561319457613194613220565b500390565b600063ffffffff838116908316818110156131b6576131b6613220565b039392505050565b60005b838110156131d95781810151838201526020016131c1565b838111156131e8576000848401525b50505050565b6000816131fd576131fd613220565b506000190190565b600060001982141561321957613219613220565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461326157600080fd5b50565b801515811461326157600080fdfea2646970667358221220a18df895bb7264315f1a426e4b5e2169ebddc77107e939187e6c2d7ee840400864736f6c63430008030033000000000000000000000000fb2e0ef40f552d460098d6d8ac70e6e3ee96f49600000000000000000000000082f9d5fe6c46990f3c2536e83b2b4e1c0a91f27f

Deployed Bytecode

0x6080604052600436106101815760003560e01c80635a3b336c116100d1578063b29dc70a1161008a578063d547741f11610064578063d547741f14610479578063e0e5120d14610499578063f7e177de146104b9578063f9f98af6146104cf57610181565b8063b29dc70a14610419578063bda3ed071461042c578063c311d0491461045957610181565b80635a3b336c1461037557806388d1ae6c1461039557806391d14854146103a8578063928cb148146103c8578063a217fddf146103e8578063ae3068c1146103fd57610181565b80631d9083f31161013e5780632f2ff15d116101185780632f2ff15d146102ff57806336568abe1461031f57806354a7d0a91461033f578063582f706f1461035f57610181565b80631d9083f31461028d578063248a9ca3146102af578063257ea0ab146102df57610181565b806301ffc9a71461018657806308a55a6e146101bb5780630c024776146101eb57806313f431601461022357806315d21e11146102535780631c51333914610277575b600080fd5b34801561019257600080fd5b506101a66101a1366004612c35565b6104ef565b60405190151581526020015b60405180910390f35b3480156101c757600080fd5b506101a66101d6366004612acb565b60066020526000908152604090205460ff1681565b3480156101f757600080fd5b5060025461020b906001600160a01b031681565b6040516001600160a01b0390911681526020016101b2565b34801561022f57600080fd5b506101a661023e366004612acb565b60076020526000908152604090205460ff1681565b34801561025f57600080fd5b5061026960045481565b6040519081526020016101b2565b34801561028357600080fd5b5061026960035481565b34801561029957600080fd5b506102ad6102a8366004612acb565b610528565b005b3480156102bb57600080fd5b506102696102ca366004612bee565b60009081526020819052604090206001015490565b3480156102eb57600080fd5b506102ad6102fa366004612acb565b61055e565b34801561030b57600080fd5b506102ad61031a366004612c06565b610593565b34801561032b57600080fd5b506102ad61033a366004612c06565b6105bf565b34801561034b57600080fd5b506102ad61035a366004612e1c565b610642565b34801561036b57600080fd5b5061026960095481565b34801561038157600080fd5b506102ad610390366004612acb565b610664565b6102ad6103a3366004612e47565b61069c565b3480156103b457600080fd5b506101a66103c3366004612c06565b6114c3565b3480156103d457600080fd5b506102ad6103e3366004612acb565b6114ec565b3480156103f457600080fd5b50610269600081565b34801561040957600080fd5b50610269670de0b6b3a764000081565b6102ad610427366004612ae7565b611524565b34801561043857600080fd5b50610269610447366004612bee565b60086020526000908152604090205481565b34801561046557600080fd5b506102ad610474366004612bee565b61242c565b34801561048557600080fd5b506102ad610494366004612c06565b6124c8565b3480156104a557600080fd5b506102ad6104b4366004612acb565b6124ee565b3480156104c557600080fd5b5061026960055481565b3480156104db57600080fd5b506102ad6104ea366004612dd8565b612523565b60006001600160e01b03198216637965db0b60e01b148061052057506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6105336000336103c3565b61053c57600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6105696000336103c3565b61057257600080fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000828152602081905260409020600101546105b081335b612596565b6105ba83836125fa565b505050565b6001600160a01b03811633146106345760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61063e828261267e565b5050565b61064d6000336103c3565b61065657600080fd5b600492909255600355600555565b61066f6000336103c3565b61067857600080fd5b6001600160a01b03166000908152600660205260409020805460ff19166001179055565b600260015414156106ef5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161062b565b6002600155600a54604051631c39f49d60e21b815260048101889052602481018790526000916001600160a01b0316906370e7d2749060440160806040518083038186803b15801561074057600080fd5b505afa158015610754573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107789190612c5d565b9050600086118015610793575080516001600160401b031615155b6107d35760405162461bcd60e51b81526020600482015260116024820152701b595c99d9481b9bdd08185b1b1bddd959607a1b604482015260640161062b565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915281516108149087906001600160401b0316613163565b815260025460609060009081906001600160a01b031615801590610838575060008a115b80156108df5750600a546001600160a01b03166370e7d2748c61085c60018e613182565b6040516001600160e01b031960e085901b1681526004810192909252602482015260440160806040518083038186803b15801561089857600080fd5b505afa1580156108ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d09190612c5d565b604001516001600160801b0316155b1515606085015260408501516001600160801b031615801561098a5750600a546040516311b820ed60e31b8152600481018d90526000916001600160a01b031690638dc10768906024016101006040518083038186803b15801561094257600080fd5b505afa158015610956573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097a9190612cbd565b60e001516001600160a01b031614155b151560808501526060840151806109a2575083608001515b15610aa15787516001600160401b038111156109ce57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156109f7578160200160208202803683370190505b509250836060015115610a13576002546001600160a01b031691505b836080015115610aa157600a546040516311b820ed60e31b8152600481018d90526001600160a01b0390911690638dc10768906024016101006040518083038186803b158015610a6257600080fd5b505afa158015610a76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9a9190612cbd565b60e0015190505b60005b885181101561129057600a546001600160a01b031662fdd58e338b8481518110610ade57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401610b179291906001600160a01b03929092168252602082015260400190565b60206040518083038186803b158015610b2f57600080fd5b505afa158015610b43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b679190612dc0565b888281518110610b8757634e487b7160e01b600052603260045260246000fd5b60200260200101511115610bad5760405162461bcd60e51b815260040161062b9061300d565b600a5489516000916001600160a01b0316906301870f02908c9085908110610be557634e487b7160e01b600052603260045260246000fd5b60200260200101516040518263ffffffff1660e01b8152600401610c0b91815260200190565b60806040518083038186803b158015610c2357600080fd5b505afa158015610c37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5b9190612d6c565b80519091506001600160801b03168d14610ca75760405162461bcd60e51b815260206004820152600d60248201526c0c6c2e4c840dad2e6dac2e8c6d609b1b604482015260640161062b565b8b816020015163ffffffff1610610d0a5760405162461bcd60e51b815260206004820152602160248201527f63616e206f6e6c79206d6572676520696e746f20686967686572206c6576656c6044820152607360f81b606482015260840161062b565b600a5481516020830151604051631c39f49d60e21b81526001600160801b03909216600483015263ffffffff1660248201526000916001600160a01b0316906370e7d2749060440160806040518083038186803b158015610d6a57600080fd5b505afa158015610d7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da29190612c5d565b9050816020015163ffffffff1660001415610df857898381518110610dd757634e487b7160e01b600052603260045260246000fd5b602002602001015187602001818151610df0919061312b565b905250610e4d565b80600001516001600160401b03168a8481518110610e2657634e487b7160e01b600052603260045260246000fd5b6020026020010151610e389190613163565b87602001818151610e49919061312b565b9052505b600a546001600160a01b03166331126dd1338d8681518110610e7f57634e487b7160e01b600052603260045260246000fd5b60200260200101518d8781518110610ea757634e487b7160e01b600052603260045260246000fd5b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0390931660048401526024830191909152604482015260006064820152608401600060405180830381600087803b158015610f0757600080fd5b505af1158015610f1b573d6000803e3d6000fd5b50505050866060015180610f30575086608001515b1561127b578a8381518110610f5557634e487b7160e01b600052603260045260246000fd5b6020026020010151868481518110610f7d57634e487b7160e01b600052603260045260246000fd5b60200260200101818152505087600001516001600160401b031687604001516001610fa8919061312b565b610fb29190613163565b87602001511180610fcf575060018b51610fcc9190613182565b83145b1561127b5760408701805190610fe482613205565b9052506060870151156110fa57846001600160a01b031663feb0ae7f600a60009054906101000a90046001600160a01b03166001600160a01b03166391ba317a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561104e57600080fd5b505afa158015611062573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110869190612dc0565b8960400151611095919061312b565b600a546040516001600160e01b031960e085901b1681526110c792918b916001600160a01b0390911690600401613062565b600060405180830381600087803b1580156110e157600080fd5b505af11580156110f5573d6000803e3d6000fd5b505050505b86608001511561120f57836001600160a01b031663e4a3fba9600a60009054906101000a90046001600160a01b03166001600160a01b03166391ba317a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561116157600080fd5b505afa158015611175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111999190612dc0565b89604001516111a8919061312b565b600a546040516001600160e01b031960e085901b1681526111dc92918b916001600160a01b03909116908f90600401613093565b600060405180830381600087803b1580156111f657600080fd5b505af115801561120a573d6000803e3d6000fd5b505050505b8b8760400151101561127b5787600001516001600160401b03166001600160401b0381111561124e57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611277578160200160208202803683370190505b5095505b5050808061128890613205565b915050610aa4565b5083516020850151146112dc5760405162461bcd60e51b81526020600482015260146024820152731ddc9bdb99c81b9bc81d1adb9cc8189d5c9b995960621b604482015260640161062b565b60008a81526008602052604090205434906112f8908b90613163565b11156113375760405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced0408aa8960931b604482015260640161062b565b60008a8152600860205260408120543390611353908c90613163565b61135d9034613182565b604051600081818185875af1925050503d8060008114611399576040519150601f19603f3d011682016040523d82523d6000602084013e61139e565b606091505b50509050806113bf5760405162461bcd60e51b815260040161062b90613039565b600a546001600160a01b031663a39501df338e8e8e600a60009054906101000a90046001600160a01b03166001600160a01b0316636bb2e32d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561142257600080fd5b505afa158015611436573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145a9190612bd4565b60008e6040518863ffffffff1660e01b815260040161147f9796959493929190612f88565b600060405180830381600087803b15801561149957600080fd5b505af11580156114ad573d6000803e3d6000fd5b5050600180555050505050505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6114f76000336103c3565b61150057600080fd5b6001600160a01b03166000908152600760205260409020805460ff19166001179055565b600260015414156115775760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161062b565b60026001556040805160a0810182526000808252602082018190529181018290526060810182905260808101829052905b8751811015611c2a57600a5488516000916001600160a01b031690638dc10768908b90859081106115e957634e487b7160e01b600052603260045260246000fd5b60200260200101516040518263ffffffff1660e01b815260040161160f91815260200190565b6101006040518083038186803b15801561162857600080fd5b505afa15801561163c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116609190612cbd565b600a548a519192506000916001600160a01b03909116906370e7d274908c908690811061169d57634e487b7160e01b600052603260045260246000fd5b602002602001015160006040518363ffffffff1660e01b81526004016116cd929190918252602082015260400190565b60806040518083038186803b1580156116e557600080fd5b505afa1580156116f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171d9190612c5d565b90508160a0015163ffffffff164210156117655760405162461bcd60e51b8152602060048201526009602482015268746f6f206561726c7960b81b604482015260640161062b565b816040015161ffff1689848151811061178e57634e487b7160e01b600052603260045260246000fd5b6020908102919091010151600a546001600160a01b0316630a3de451338e88815181106117cb57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b81526004016118049291906001600160a01b03929092168252602082015260400190565b60206040518083038186803b15801561181c57600080fd5b505afa158015611830573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118549190612dc0565b61185e919061312b565b11156118ac5760405162461bcd60e51b815260206004820152601d60248201527f4d6178206d696e7473207265616368656420666f722061646472657373000000604482015260640161062b565b816080015163ffffffff168984815181106118d757634e487b7160e01b600052603260045260246000fd5b6020026020010151826020015163ffffffff166118f4919061312b565b1115611941578060200151826080015161190e9190613199565b63ffffffff1689848151811061193457634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b87838151811061196157634e487b7160e01b600052603260045260246000fd5b602002602001015115611a285781516001600160401b03166119bc5760405162461bcd60e51b81526020600482015260146024820152731d5b9a58dbdc9b9cc81b9bdd08185b1b1bddd95960621b604482015260640161062b565b670de0b6b3a76400008984815181106119e557634e487b7160e01b600052603260045260246000fd5b602002602001015183600001516001600160401b0316611a059190613163565b611a0f9190613163565b84602001818151611a20919061312b565b905250611ae2565b600082602001516001600160401b031611611a7c5760405162461bcd60e51b81526020600482015260146024820152731c985a5b989bdddcc81b9bdd08185b1b1bddd95960621b604482015260640161062b565b670de0b6b3a7640000898481518110611aa557634e487b7160e01b600052603260045260246000fd5b602002602001015183602001516001600160401b0316611ac59190613163565b611acf9190613163565b84518590611ade90839061312b565b9052505b60208201516001600160401b031615611b8757600354611b0490612710613163565b600954670de0b6b3a76400008b8681518110611b3057634e487b7160e01b600052603260045260246000fd5b602002602001015185602001516001600160401b0316611b509190613163565b611b5a9190613163565b611b649190613163565b611b6e9190613143565b84604001818151611b7f919061312b565b905250611c15565b600454611b9690612710613163565b600954670de0b6b3a76400008b8681518110611bc257634e487b7160e01b600052603260045260246000fd5b602002602001015185600001516001600160401b0316611be29190613163565b611bec9190613163565b611bf69190613163565b611c009190613143565b84604001818151611c11919061312b565b9052505b50508080611c2290613205565b9150506115a8565b506000606082018190525b60028110156120ac5780151560008082611c50578451611c56565b84602001515b905080801561209557600084611c6d578851611c70565b87515b905060008111611cb25760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420706f6f6c7360981b604482015260640161062b565b60005b81811015611fe75760008615611d8257600760008b8481518110611ce957634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16611d535760405162461bcd60e51b81526020600482015260146024820152731a5b9d985b1a59081d5b9a58dbdc9b881c1bdbdb60621b604482015260640161062b565b898281518110611d7357634e487b7160e01b600052603260045260246000fd5b60200260200101519050611e3b565b600660008c8481518110611da657634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16611e105760405162461bcd60e51b81526020600482015260146024820152731a5b9d985b1a59081c985a5b989bddc81c1bdbdb60621b604482015260640161062b565b8a8281518110611e3057634e487b7160e01b600052603260045260246000fd5b602002602001015190505b60006001600160a01b0382166370a08231336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015611e8c57600080fd5b505afa158015611ea0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec49190612dc0565b9050611ed0818861312b565b9650858710611f54576001600160a01b038216639dc29fac336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101889052604401600060405180830381600087803b158015611f3157600080fd5b505af1158015611f45573d6000803e3d6000fd5b50505050600094505050611fe7565b6001600160a01b038216639dc29fac336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b158015611fac57600080fd5b505af1158015611fc0573d6000803e3d6000fd5b505050508085611fd09190613182565b945050508080611fdf90613205565b915050611cb5565b5081156120935760006064600554856120009190613163565b61200a9190613143565b9050806120178486613182565b10156120355760405162461bcd60e51b815260040161062b9061300d565b60008661204457600354612048565b6004545b9050836120558234613163565b116120725760405162461bcd60e51b815260040161062b9061300d565b61207c8185613143565b8960600181815161208d919061312b565b90525050505b505b5050505080806120a490613205565b915050611c35565b508060400151816060018181516120c3919061312b565b90525060608101513410156120d757600080fd5b606081015133906120e89034613182565b604051600081818185875af1925050503d8060008114612124576040519150601f19603f3d011682016040523d82523d6000602084013e612129565b606091505b50501515608082018190526121505760405162461bcd60e51b815260040161062b90613039565b6000805b88518110156123d957600088828151811061217f57634e487b7160e01b600052603260045260246000fd5b602002602001015111156123c757600a546001600160a01b031663c2fa4019338b84815181106121bf57634e487b7160e01b600052603260045260246000fd5b60200260200101518b85815181106121e757634e487b7160e01b600052603260045260246000fd5b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381600087803b15801561224057600080fd5b505af1158015612254573d6000803e3d6000fd5b5050600a546001600160a01b0316915063a39501df9050338b848151811061228c57634e487b7160e01b600052603260045260246000fd5b602002602001015160008c86815181106122b657634e487b7160e01b600052603260045260246000fd5b6020026020010151600a60009054906101000a90046001600160a01b03166001600160a01b0316636bb2e32d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561230c57600080fd5b505afa158015612320573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123449190612bd4565b60008d898151811061236657634e487b7160e01b600052603260045260246000fd5b60200260200101516040518863ffffffff1660e01b81526004016123909796959493929190612f88565b600060405180830381600087803b1580156123aa57600080fd5b505af11580156123be573d6000803e3d6000fd5b50505050600191505b806123d181613205565b915050612154565b508061241e5760405162461bcd60e51b8152602060048201526014602482015273105b1b1bd8d85d1a5bdb88195e1a185d5cdd195960621b604482015260640161062b565b505060018055505050505050565b6124376000336103c3565b61244057600080fd5b478111156124605760405162461bcd60e51b815260040161062b9061300d565b604051600090339083908381818185875af1925050503d80600081146124a2576040519150601f19603f3d011682016040523d82523d6000602084013e6124a7565b606091505b505090508061063e5760405162461bcd60e51b815260040161062b90613039565b6000828152602081905260409020600101546124e481336105ab565b6105ba838361267e565b6124f96000336103c3565b61250257600080fd5b6001600160a01b03166000908152600760205260409020805460ff19169055565b61252e6000336103c3565b61253757600080fd5b600982905560015b81518110156105ba5781818151811061256857634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600083815260089092526040909120558061258e81613205565b91505061253f565b6125a082826114c3565b61063e576125b8816001600160a01b031660146126e3565b6125c38360206126e3565b6040516020016125d4929190612f13565b60408051601f198184030181529082905262461bcd60e51b825261062b91600401612fda565b61260482826114c3565b61063e576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561263a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61268882826114c3565b1561063e576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b606060006126f2836002613163565b6126fd90600261312b565b6001600160401b0381111561272257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561274c576020820181803683370190505b509050600360fc1b8160008151811061277557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106127b257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006127d6846002613163565b6127e190600161312b565b90505b6001811115612875576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061282357634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061284757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361286e816131ee565b90506127e4565b5083156128c45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161062b565b9392505050565b80516105238161324c565b600082601f8301126128e6578081fd5b813560206128fb6128f683613108565b6130d8565b80838252828201915082860187848660051b890101111561291a578586fd5b855b8581101561294157813561292f8161324c565b8452928401929084019060010161291c565b5090979650505050505050565b600082601f83011261295e578081fd5b8135602061296e6128f683613108565b82815281810190858301855b8581101561294157612991898684358b0101612a09565b8452928401929084019060010161297a565b600082601f8301126129b3578081fd5b813560206129c36128f683613108565b80838252828201915082860187848660051b89010111156129e2578586fd5b855b858110156129415781356129f781613264565b845292840192908401906001016129e4565b600082601f830112612a19578081fd5b81356020612a296128f683613108565b80838252828201915082860187848660051b8901011115612a48578586fd5b855b8581101561294157813584529284019290840190600101612a4a565b805161052381613264565b80516001600160f81b03198116811461052357600080fd5b80516001600160801b038116811461052357600080fd5b805163ffffffff8116811461052357600080fd5b80516001600160401b038116811461052357600080fd5b600060208284031215612adc578081fd5b81356128c48161324c565b60008060008060008060c08789031215612aff578182fd5b86356001600160401b0380821115612b15578384fd5b612b218a838b01612a09565b97506020890135915080821115612b36578384fd5b612b428a838b01612a09565b96506040890135915080821115612b57578384fd5b612b638a838b016129a3565b95506060890135915080821115612b78578384fd5b612b848a838b0161294e565b94506080890135915080821115612b99578384fd5b612ba58a838b016128d6565b935060a0890135915080821115612bba578283fd5b50612bc789828a016128d6565b9150509295509295509295565b600060208284031215612be5578081fd5b6128c482612a71565b600060208284031215612bff578081fd5b5035919050565b60008060408385031215612c18578182fd5b823591506020830135612c2a8161324c565b809150509250929050565b600060208284031215612c46578081fd5b81356001600160e01b0319811681146128c4578182fd5b600060808284031215612c6e578081fd5b612c7860806130d8565b612c8183612ab4565b8152612c8f60208401612aa0565b6020820152612ca060408401612a89565b6040820152612cb160608401612aa0565b60608201529392505050565b6000610100808385031215612cd0578182fd5b612cd9816130d8565b9050612ce483612ab4565b8152612cf260208401612ab4565b6020820152604083015161ffff81168114612d0b578283fd5b6040820152612d1c60608401612aa0565b6060820152612d2d60808401612aa0565b6080820152612d3e60a08401612aa0565b60a0820152612d4f60c08401612a66565b60c0820152612d6060e084016128cb565b60e08201529392505050565b600060808284031215612d7d578081fd5b612d8760806130d8565b612d9083612a89565b8152612d9e60208401612aa0565b6020820152612daf60408401612aa0565b6040820152612cb160608401612a71565b600060208284031215612dd1578081fd5b5051919050565b60008060408385031215612dea578182fd5b8235915060208301356001600160401b03811115612e06578182fd5b612e1285828601612a09565b9150509250929050565b600080600060608486031215612e30578081fd5b505081359360208301359350604090920135919050565b60008060008060008060c08789031215612e5f578384fd5b86359550602087013594506040870135935060608701356001600160401b0380821115612e8a578384fd5b612e968a838b01612a09565b94506080890135915080821115612eab578384fd5b612eb78a838b01612a09565b935060a0890135915080821115612ecc578283fd5b50612bc789828a01612a09565b6000815180845260208085019450808401835b83811015612f0857815187529582019590820190600101612eec565b509495945050505050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351612f4b8160178501602088016131be565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612f7c8160288401602088016131be565b01602801949350505050565b600060018060a01b038916825287602083015286604083015285606083015260ff60f81b851660808301528360a083015260e060c0830152612fcd60e0830184612ed9565b9998505050505050505050565b6000602082528251806020840152612ff98160408501602087016131be565b601f01601f19169190910160400192915050565b6020808252601290820152716e6f7420656e6f7567682062616c616e636560701b604082015260600190565b6020808252600f908201526e1d1c985b9cd9995c8819985a5b1959608a1b604082015260600190565b60008482526060602083015261307b6060830185612ed9565b905060018060a01b0383166040830152949350505050565b6000858252608060208301526130ac6080830186612ed9565b6001600160a01b038516604084015282810360608401526130cd8185612ed9565b979650505050505050565b604051601f8201601f191681016001600160401b038111828210171561310057613100613236565b604052919050565b60006001600160401b0382111561312157613121613236565b5060051b60200190565b6000821982111561313e5761313e613220565b500190565b60008261315e57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561317d5761317d613220565b500290565b60008282101561319457613194613220565b500390565b600063ffffffff838116908316818110156131b6576131b6613220565b039392505050565b60005b838110156131d95781810151838201526020016131c1565b838111156131e8576000848401525b50505050565b6000816131fd576131fd613220565b506000190190565b600060001982141561321957613219613220565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461326157600080fd5b50565b801515811461326157600080fdfea2646970667358221220a18df895bb7264315f1a426e4b5e2169ebddc77107e939187e6c2d7ee840400864736f6c63430008030033

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

000000000000000000000000fb2e0ef40f552d460098d6d8ac70e6e3ee96f49600000000000000000000000082f9d5fe6c46990f3c2536e83b2b4e1c0a91f27f

-----Decoded View---------------
Arg [0] : _nftContractAddress (address): 0xfB2e0Ef40f552D460098d6D8aC70e6e3eE96f496
Arg [1] : _contractOwner (address): 0x82F9d5FE6C46990f3C2536e83b2B4e1c0a91F27f

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000fb2e0ef40f552d460098d6d8ac70e6e3ee96f496
Arg [1] : 00000000000000000000000082f9d5fe6c46990f3c2536e83b2b4e1c0a91f27f


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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