ETH Price: $3,445.24 (+1.37%)

Token

BTC1155 (BTC)
 

Overview

Max Total Supply

0 BTC

Holders

349

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

0xd63c43fae7a27e854444bb67796c7ba6cfa6a202
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
BTC1155

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

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

/// @title This is a fungible ERC1155 token. People will be able to mint (1 mint per day though) everyday, a real open edition. Flippers can still speculate from it since there is a halving process every 4 years.

pragma solidity 0.8.17;
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

/// @dev ERC1155Supply: Return total supply of a specific token.
/// @dev ERC1155Holder: This contract is also used as an exchange. It needs to store SATs.
/// @dev ERC2981 and DefaultOperatorFilterer: Royalties determination
/// @dev Ownable: Only to set up descriptions on Opensea. Only the address with Chain Status NFT can collect the mint price.
contract BTC1155 is DefaultOperatorFilterer, ERC1155Supply, ERC1155Holder, ERC2981, ReentrancyGuard, Ownable{

    /// @dev Here we define tokenomics. The halving leads to the possible of speculation even with a open edition.
    /// @dev Initial reward ~ 0.56 BTC, which makes the total supply of BTC1155 around 1155 BTCs.
    uint256 private constant initialReward = 56396484;

    /// @dev Every 8192 (1 << 13) blocks on ETH is one block in BTC1155 contract.
    /// @dev This is around 1 day (1 day ~ 7166 blocks on 2023/02/07)
    uint256 private constant blockLengthETH = 8192;

    /// @dev We get a halving around every 4 years.
    /// @dev 4 years ~ 1245 days.
    /// @dev Every 1024 blocks in BTC1155 contract leads to a halving.
    /// @dev Every 2097152 blocks on Ethereum leads to a halving.
    uint256 private constant halvingPeriod = 1024;

    /// @dev Every transfer from someone to someone else burn 10 satoshis.
    uint256 private constant transactionFees = 10;

    /// @dev Current block number.
    uint256 private blockNumber;

    /// @dev The electricity fee to mine satoshis/BTCs.
    uint256 private electricityCost = 0.001 ether;

    /// @notice 1 BTC = 100000000 SAT.
    uint256 public constant BTCtoSAT = 10 ** 8;

    /// @dev Register the transaction fees collected to reward the next miner.
    uint256 private transactionFeesCollected;

    /// @notice How many electricities were used to mine BTCs
    uint256 public electricityFeeCollected;

    /// @dev TokenId, for better readability in the followings.
    uint256 private constant CHAINSTATUS = 0;
    uint256 private constant SWAPSTATUS = 1;
    uint256 private constant BTC = 2;
    uint256 private constant SAT = 3;
    uint256 private constant LP = 4;

    /// @dev names of different tokenId. Used in uri(tokenId)
    string[] private names = ["Chain Status", "Swap Status", "BTC", "SAT", "LP"];

    /// @dev Very useful constant in different functions.
    address private self = address(this);

    string public name = "BTC1155";
    string public symbol = "BTC";

  constructor() ERC1155("BTC1155") {
      _mint(msg.sender, CHAINSTATUS, 1, "");
      _mint(self, SWAPSTATUS, 1, "");
  }

  // -------------------------------------------------------------------------------------------------------------------
  // ------------------------------------------------ mine -------------------------------------------------------------
  // -------------------------------------------------------------------------------------------------------------------

  /// @notice Use this function to mine more SAT/BTC! Set value to `electricityCost`.
  function mine() external payable nonReentrant{
      /*
         A real open edition: everyone will still be able to mint after the first mints.
         Not a time-limited one like https://opensea.io/assets/ethereum/0x8c335a5e0cf05eca62ca1e49afa48531b694824e/10 and much more.
         This also motivate the team to keep building, not buying a G-wagon right after sold out.
         Flippers can also speculate with the halving event.
      */
      require(msg.value >= electricityCost, "You pay the electricity, don't you?"); // price: 0.001. 
      electricityFeeCollected += electricityCost;
      require(block.number >= blockNumber * blockLengthETH, "Next block not available yet");
      blockNumber++;

      uint256 blockReward = getBlockReward();
      _mint(msg.sender, SAT, blockReward + transactionFeesCollected, ""); // mine Block reward + transaction fees.
      transactionFeesCollected = 0;
  }

  /// @notice get current mining reward.
  /// @return Mining reward.
  function getBlockReward() public view returns (uint256){
      return initialReward >> (blockNumber / halvingPeriod);
  }

  // -------------------------------------------------------------------------------------------------------------------
  // ----------------------------------------------- convert -----------------------------------------------------------
  // -------------------------------------------------------------------------------------------------------------------
  /// @notice Convert BTC to SAT at 1 BTC = 1e8 SAT.
  /// @param amountBTC The amount of BTC that you want to change to SAT.
  function convertBTCtoSAT(uint256 amountBTC) external{
      require(balanceOf(msg.sender, BTC) >= amountBTC, "BTC not enough");
      _burn(msg.sender, BTC, amountBTC);
      _mint(msg.sender, SAT, amountBTC * BTCtoSAT, "");
  }
  /// @notice Convert SAT to BTC at 1 BTC = 1e8 SAT.
  /// @dev Raise error if amountSAT is not a multiplier of 1e8
  /// @param amountSAT The amount of SAT that you want to change to BTC.
  function convertSATtoBTC(uint256 amountSAT) external{
      require(balanceOf(msg.sender, SAT) >= amountSAT, "SAT not enough");
      require(amountSAT % (BTCtoSAT) == 0, "Not available amount");
      _burn(msg.sender, SAT, amountSAT);
      _mint(msg.sender, BTC, amountSAT / BTCtoSAT, "");
  }
  // -------------------------------------------------------------------------------------------------------------------
  // ------------------------------------------------ Swap -------------------------------------------------------------
  // -------------------------------------------------------------------------------------------------------------------
  // -------------------------------------
  // --------------- LP  -----------------
  // -------------------------------------

  /// @dev getting reserves of SAT, ETH in the pool and the supply of LP.
  /// @return reserveSAT, reserveETH, supplyLP.
  function getReserves() public view returns (uint256, uint256, uint256){
      return (balanceOf(self, SAT), self.balance - electricityFeeCollected, totalSupply(LP));
  }

  /// @dev Get the square root of an unsigned integer. Used to determine how many LP tokens to mine.
  /// @param x The number to get the square root.
  /// @return y Square root of x.
  function sqrt(uint x) internal pure returns (uint y) {
      uint z = (x + 1) / 2;
      y = x;
      while (z < y) {
          y = z;
          z = (x / z + z) / 2;
      }
  }

  /// @notice Use this function to check how many ETH you need to add liquidity.
  /// @param amountBTC the amount of BTC to add to the pool.
  /// @param amountSAT the amount of SAT to add to the pool.
  /// @return The ETH needed to add liquidity with given amounts of BTC and SAT.
  function getETHNeededToAddLiquidity(uint256 amountBTC, uint256 amountSAT) public view returns (uint256){
      (uint256 reserveSAT, uint256 reserveETH, uint256 reserveLP) = getReserves();
      require(reserveLP > 0, "Pool needs to be created");
      uint256 deltaSAT = amountBTC * BTCtoSAT + amountSAT;
      return divRound(reserveETH * deltaSAT, reserveSAT);
  }

  /// @notice Use this function to add liquidity. Ensure you check the ETH needed with getETHNeededToAddLiquidity first.
  /// @param amountBTC the amount of BTC to add to the pool.
  /// @param amountSAT the amount of SAT to add to the pool.
  function addLiquidity(uint256 amountBTC, uint256 amountSAT) external payable nonReentrant{
      require(balanceOf(msg.sender, BTC) >= amountBTC, "BTC not enough");
      require(balanceOf(msg.sender, SAT) >= amountSAT, "SAT not enough");
      (uint256 reserveSAT, uint256 reserveETH, uint256 reserveLP) = getReserves();
      if (reserveLP == 0){ // New pool
          require(msg.value > 0, "You need to add both BTC/SAT and ETH at the same time");
          if (amountBTC > 0){
              _burn(msg.sender, BTC, amountBTC);
              _mint(self, SAT, amountBTC * BTCtoSAT, "");
          }
          if (amountSAT > 0){
              _safeTransferFrom(msg.sender, self, SAT, amountSAT, "");
          }
          uint256 minimumLiquidity = 10 ** 10;
          _mint(msg.sender, LP, sqrt((amountBTC * BTCtoSAT + amountSAT) * msg.value) - minimumLiquidity, ""); // Mint liquidity token
          _mint(self, LP, minimumLiquidity, "");
      }
      else{ // Add to existing liquidities
          reserveETH -= msg.value;
          uint256 ETHNeeded = divRound(reserveETH * (amountBTC * BTCtoSAT + amountSAT), reserveSAT);
          require(msg.value >= ETHNeeded, "Eth not enough");
          payable(msg.sender).transfer(msg.value - ETHNeeded); // Return unused ether back to the msg sender.
          if (amountBTC > 0){
              _burn(msg.sender, BTC, amountBTC);
              _mint(self, SAT, amountBTC * BTCtoSAT, "");
          }
          if (amountSAT > 0){
              _safeTransferFrom(msg.sender, self, SAT, amountSAT, "");
          }
          _mint(msg.sender, LP, sqrt((amountBTC * BTCtoSAT + amountSAT) * ETHNeeded), "");
      }
  }

  /// @notice Use this function to remove liquidity.
  /// @param amountLP the amount of LP to remove from the pool.
  function removeLiquidity(uint256 amountLP) external nonReentrant{
      (uint256 reserveSAT, uint256 reserveETH, uint256 reserveLP) = getReserves();
      require(balanceOf(msg.sender, LP) >= amountLP, "LP not enough");
      _burn(msg.sender, LP, amountLP);
      uint256 returnedSAT = reserveSAT * amountLP / reserveLP;
      returnSATWisely(returnedSAT, msg.sender);
      payable(msg.sender).transfer(reserveETH * amountLP / reserveLP);
  }

  // -------------------------------------
  // -------------- SWAP -----------------
  // -------------------------------------

  /// @dev add one if a is not divided by b.
  /// @param a Dividend
  /// @param b Divisor
  /// @return Quotient
  function divRound(uint256 a, uint256 b) internal pure returns (uint256){
      return a % b == 0 ? (a/b) : ((a/b) + (1));
  }

  /// @notice Get the price when adding tokens to the pool.
  /// @dev The fee is fixed at 0.5% here. The price returned is with rounding error.
  /// @param _assetBoughtAmount Amount to buy.
  /// @param _assetSoldReserve Reserve in the pool of the token to sell
  /// @param _assetBoughtReserve Reserve in the pool of the token to buy.
  /// @return price The price.
  function getBuyPrice(uint256 _assetBoughtAmount, uint256 _assetSoldReserve, uint256 _assetBoughtReserve) public pure returns (uint256 price){
      require(_assetSoldReserve > 0 && _assetBoughtReserve > 0, "Exchange error: EMPTY_RESERVE");
      uint256 numerator = _assetSoldReserve * (_assetBoughtAmount) * (200);
      uint256 denominator = (_assetBoughtReserve - (_assetBoughtAmount)) * (199);
      (price) = divRound(numerator, denominator);
      return price; // Will add 1 if rounding error.
  }

  /// @notice Get the price when removing tokens from the pool.
  /// @dev The fee is fixed at 0.5% here. There is no rounding error here to favorite the exchange.
  /// @param _assetSoldAmount Amount to sell.
  /// @param _assetSoldReserve Reserve in the pool of the token to sell
  /// @param _assetBoughtReserve Reserve in the pool of the token to buy.
  /// @return price The price.
  function getSellPrice(uint256 _assetSoldAmount, uint256 _assetSoldReserve, uint256 _assetBoughtReserve) public pure returns (uint256  price){
      require(_assetSoldReserve > 0 && _assetBoughtReserve > 0, "Exchange error: EMPTY_RESERVE");
      uint256 _assetSoldAmount_withFee = _assetSoldAmount * 199;
      uint256 numerator = _assetSoldAmount_withFee * _assetBoughtReserve;
      uint256 denominator = _assetSoldReserve * 200 + _assetSoldAmount_withFee;
      return numerator / denominator;
  }

  /// @dev This function return SAT by changing them to BTC first.
  /// @param SATToReturn_ The amount of SAT to return. We assumed every BTC is already changed to SAT here.
  /// @param to The address to get the SAT(BTC)s.
  function returnSATWisely(uint256 SATToReturn_, address to) internal {
      if (SATToReturn_ >= BTCtoSAT){ // Give BTC then SAT
          _mint(to, BTC, SATToReturn_ / BTCtoSAT, "");
          _burn(self, SAT, SATToReturn_ / BTCtoSAT * BTCtoSAT);
      }
      _safeTransferFrom(self, to, SAT, SATToReturn_ % BTCtoSAT, "");
  }

  /// @notice Swap your SAT/BTC to get ETH.
  /// @param amountBTC The amount of BTC
  /// @param amountSAT The amount of SAT
  function swapForETH(uint256 amountBTC, uint256 amountSAT) external nonReentrant{
      (uint256 reserveSAT, uint256 reserveETH, ) = getReserves();
      require(balanceOf(msg.sender, BTC) >= amountBTC, "BTC not enough");
      require(balanceOf(msg.sender, SAT) >= amountSAT, "SAT not enough");
      if (amountBTC > 0){
          _burn(msg.sender, BTC, amountBTC);
          _mint(self, SAT, amountBTC * BTCtoSAT, "");
      }
      _safeTransferFrom(msg.sender, self, SAT, amountSAT, "");
      payable(msg.sender).transfer(getSellPrice(amountBTC * BTCtoSAT + amountSAT, reserveSAT, reserveETH));
  }

  /// @notice Swap your ETH to get SAT
  function swapForSAT() external payable nonReentrant{
      (uint256 reserveSAT, uint256 reserveETH, ) = getReserves();
      reserveETH -= msg.value;
      returnSATWisely((199 * msg.value * reserveSAT) / (200 * reserveETH + 199 * msg.value), msg.sender);
  }

  /// @notice Swap SATs for exact amount of ETH.
  /// @param amountETH The amount of ETH you want.
  function swapForExactETH(uint256 amountETH) external nonReentrant{
      (uint256 reserveSAT, uint256 reserveETH, ) = getReserves();
      uint256 SATNeeded = divRound(200 * reserveSAT * amountETH, 199 * (reserveETH - amountETH));
      if (balanceOf(msg.sender, SAT) >= SATNeeded){
          _safeTransferFrom(msg.sender, self, SAT, SATNeeded, "");
      }
      else{ // Burn 1 btc
          _burn(msg.sender, BTC, 1);
          _mint(msg.sender, SAT, BTCtoSAT, "");
          _safeTransferFrom(msg.sender, self, SAT, SATNeeded, "");
      }
      payable(msg.sender).transfer(amountETH);
  }

  /// @notice Swap ETH for exact amount of SAT.
  /// @param amountSAT The amount of SAT you want.
  function swapForExactSAT(uint256 amountSAT) external payable nonReentrant{
      (uint256 reserveSAT, uint256 reserveETH, ) = getReserves();
      reserveETH -= msg.value;
      uint256 ETHNeeded = divRound(200 * amountSAT * reserveETH, 199 * (reserveSAT - amountSAT));
      require(msg.value >= ETHNeeded, "Eth not enough");
      payable(msg.sender).transfer(msg.value - ETHNeeded);
      returnSATWisely(amountSAT, msg.sender);
  }

  // -------------------------------------------------------------------------------------------------------------------
  // ------------------------------------------- TokenUri: images --------------------------------------------------
  // -------------------------------------------------------------------------------------------------------------------

  struct chainStatus{
      uint256 blockNumber;
      uint256 blockReward;
      uint256 nextHalving;
      uint256 transactionFees;
      string currentSupply;
  }
  /// @notice Get current chain status with this function
  /// @dev Use this to render/do anyting you want.
  /// @return cS The chain status.
  function getCurrentChainStatus() public view returns (chainStatus memory cS){
      cS.blockNumber = blockNumber;
      cS.blockReward = getBlockReward();
      cS.nextHalving = halvingPeriod * (blockNumber / halvingPeriod + 1) - blockNumber;
      cS.transactionFees = transactionFeesCollected;
      cS.currentSupply = stringRatio(totalSupply(SAT) + BTCtoSAT * totalSupply(BTC) - transactionFeesCollected, BTCtoSAT);
  }

  /// @dev Return val1 / val2 with 3 digits decimals in the end.
  function stringRatio(uint256 val1, uint256 val2) internal pure returns (string memory){
      if (val2 == 0) val2 = 1;
      uint256 ent = val1 / val2;
      uint256 dec = (val1 - ent * val2) / (val2 / 10 ** 3);
      if (ent > 0 || dec > 0){
          return string.concat(
              Strings.toString(ent),
              ".",
              dec < 100? "0": "",
              dec < 10? "0": "",
              Strings.toString(dec)
          );
      }
      else{
          return "0";
      }
  }
  /// @dev Add text to a svg
  /// @param text The text to add
  /// @param x The x position
  /// @param y The y position
  /// @param type_ In the end or at the beginning.
  /// @return A string which gives the underlined text in svg format.
  function addText(string memory text, string memory x, string memory y, bool type_) internal pure returns (string memory){
      return string(
          abi.encodePacked(
              ' <text x="', x,
              '0%" y="', y,
              '0%" class="b ', type_? 's': 'e',
              '">', text,
              '</text> <line x1="', x,
              '0%" y1="', y,
              '1%" x2="90%" y2="', y, 
              '1%" stroke="#A2CCD6" stroke-width="1px"/>'
          )
      );
  }

  /// @dev image changes according to different tokenId.
  /// @param tokenId The token id
  /// @return A svg file encoded in base64.
  function image(uint256 tokenId) internal view returns (string memory){
      if (tokenId == CHAINSTATUS){
          chainStatus memory cS = getCurrentChainStatus();
          return string(
              string.concat(
                  "data:image/svg+xml;base64,",
                  Base64.encode(
                      bytes(
                          string.concat(
                              '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"> <style>.b {font-family: helvetica; font-size: 16px; dominant-baseline: bottom;}.s { fill: #F0A8AA; text-anchor: start;} .e {fill: #E5E6D9; text-anchor: end;}</style> <rect width="100%" height="100%" fill="#2F2D30" /><text x="50%" y="8%" dominant-baseline="middle" text-anchor="middle" font-size="20px" fill="#E5E6D9" font-family="helvetica">Chain status</text>',
                              /* 
                                  CHAINSTATUS-> return calculated
                                                block number
                                                block reward
                                                Next halving block
                                                transaction fees
                                                Current supply
                              */
                              string.concat(
                                  addText("Block number: ", "1", "2", true),
                                  addText("Block reward: ", "1", "3", true),
                                  addText("Next halving: ", "1", "6", true),
                                  addText("Transaction fees: ", "1", "4", true),
                                  addText("Supply: ", "1", "5", true)
                              ),
                              string.concat(
                                  addText(Strings.toString(cS.blockNumber), "9", "2", false),
                                  addText(string.concat(Strings.toString(cS.blockReward), " SAT"), "9", "3", false),
                                  addText(string.concat(Strings.toString(cS.nextHalving), " block(s)"), "9", "6", false),
                                  addText(string.concat(Strings.toString(cS.transactionFees), " SAT"), "9", "4", false),
                                  addText(string.concat(cS.currentSupply, " BTC"), "9", "5", false)
                              ),
                              '</svg>'
                          )
                      )
                  )
              )
          );
      }
      else if (tokenId == SWAPSTATUS){
          uint256 pooledSAT = balanceOf(self, SAT);
          uint256 pooledETH = self.balance - electricityFeeCollected;
          pooledETH = pooledETH == 0? 1 ether: pooledETH;
          string memory body;
      // SWAPSTATUS ->  return pooled token
          if (pooledSAT == 0){
              body = '<text x="50%" y="50%" text-anchor="middle" fill="#F0A8AA" class="b">No liquidity yet</text>';
          }
          else{
              body = string.concat(
                  string.concat(
                      addText("Pooled SAT:", "1", "2", true),
                      addText("Pooled SAT:", "1", "3", true),
                      addText("Pooled ETH:", "1", "4", true),
                      addText("1 ETH =", "1", "5", true),
                      addText("1 BTC =", "1", "6", true)
              ),
                  string.concat(
                      addText(string.concat(Strings.toString(pooledSAT), " SAT"), "9", "2", false),
                      addText(string.concat(stringRatio(pooledSAT, BTCtoSAT), " BTC"), "9", "3", false),
                      addText(string.concat(stringRatio(pooledETH, 1 ether), " ETH"), "9", "4", false),
                      addText(string.concat(stringRatio(pooledSAT * 10 ** 18, pooledETH), " SAT"), "9", "5", false),
                      addText(string.concat(stringRatio(pooledETH * BTCtoSAT / 1 ether, pooledSAT), " ETH"), "9", "6", false)
                  )
              );
          }

          return string(
              string.concat(
                  "data:image/svg+xml;base64,",
                  Base64.encode(
                      bytes(
                          string.concat(
                              '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"> <style>.b {font-family: helvetica; font-size: 16px; dominant-baseline: bottom;}.s { fill: #F0A8AA; text-anchor: start;} .e {fill: #E5E6D9; text-anchor: end;}</style> <rect width="100%" height="100%" fill="#2F2D30" /><text x="50%" y="8%" dominant-baseline="middle" text-anchor="middle" font-size="20px" fill="#E5E6D9" font-family="helvetica">Swap status</text>',
                              body,
                              '</svg>'
                          )
                      )
                  )
              )
          );
      }
      else{
          return string(
              string.concat(
                  "data:image/svg+xml;base64,",
                  Base64.encode(
                      bytes(
                          string.concat(
                              '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"> <style>.s { fill: #FFFFFF; font-family: helvetica; font-size: 24px; dominant-baseline: bottom; text-anchor: middle;} </style> <rect width="100%" height="100%" fill="#000000" />',
                              '<text x="50%" y="50%" class="s">',
                              ["", "", "1 BTC", "1 SAT", "1 LP"][tokenId],
                              '</text>',
                              '</svg>'
                          )
                      )
                  )
              )
          );
      }
  }

  /// @notice Get token metadata!
  /// @param tokenId The token ID
  /// @return Metadata of tokenId
  function uri(uint256 tokenId) public view override returns (string memory){
      string memory _name = names[tokenId]; 
      string memory _description = "A fungible ERC-1155 token.";
      return string(
          abi.encodePacked(
              "data:application/json;base64,",
              Base64.encode(
                  bytes(
                      abi.encodePacked(
                          '{"name":"', _name,
                          '", "description": "', _description,
                          '", "image":"', image(tokenId), 
                          '"}'
                      )
                  )
              )
          )
      );
  }

  // -------------------------------------------------------------------------------------------------------------------
  // ----------------------------------------------- Only Owner --------------------------------------------------------
  // -------------------------------------------------------------------------------------------------------------------

  /// @notice Manifest yourself if you want to dao this contract. Offer the CHAINSTATUS token with any address with twitter/website/medium account linked. You will also be able to set up royalties on different marketplace, but not this one.
  /// @dev The address who owns the CHAINSTATUS token can withdraw electricities fee. It's not many but if any group wants to dao this contract, try to contact me.
  function withdraw(address to) external nonReentrant{
      require(balanceOf(to, CHAINSTATUS) > 0, "Need to own the status NFT to claim the electricityFee");
      (bool success, ) = to.call{value: electricityFeeCollected}("");
      electricityFeeCollected = 0;
      require(success, "Transfer failed.");
  }

  /// @dev The address who owns the CHAINSTATUS token can withdraw electricities fee. It's not many but if any group wants to dao this contract, try to contact me.
  function withdrawERC20(address to, address currency, uint256 quantity) external nonReentrant{
      require(balanceOf(to, CHAINSTATUS) > 0, "Need to own the status NFT to claim the electricityFee");
      IERC20(currency).transfer(to, quantity);
  }
  /// @dev The address who owns the CHAINSTATUS token can change electricities fee. 
  function changeDifficulty(uint256 difficulty) external nonReentrant{
      require(balanceOf(msg.sender, CHAINSTATUS) > 0, "Need to own the status NFT to change the electricityFee");
      electricityCost = difficulty; // More difficult to mine = more electricity cost.
  }

  // -------------------------------------------------------------------------------------------------------------------
  // ------------------------------------------- Restrict marketplace --------------------------------------------------
  // -------------------------------------------------------------------------------------------------------------------

  /// @dev This is a good way to restrict some weird 0 fee marketplace from getting liquidities. Check opensea royalty restriction.
  function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
      super.setApprovalForAll(operator, approved);
  }

  /// @dev This function takes 10 satoshis from the person for the transaction.
  function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal override{
      if ((operator == from) && (to != address(0)) && (to != self)){ // transfer from somebody to someone else. If the operator is a marketplace then no fee applied.
          uint256 indexSAT = ids.length;
          uint256 totalSAT = 0;
          uint256 indexBTC = ids.length;
          uint256 totalBTC = 0;
          for (uint256 i=0; i < ids.length; ++i){ // Find SAT index. BTC index, too if necessary.
              if(ids[i] == SAT){
                  indexSAT = i;
                  totalSAT += amounts[i];
                  amounts[i] = 0;
              }
              else if (ids[i] == BTC){
                  indexBTC = i;
                  totalBTC += amounts[i];
                  amounts[i] = 0;
              }
          } // End of loop.
          if (totalSAT + transactionFees <= balanceOf(from, SAT)){
              _burn(from, SAT, transactionFees);
          }
          else if (totalSAT >= transactionFees){ // If balance + transactionFees < amount to transfer, then transfer balance - transaction fee to target. Rest 0 in funds.
              _burn(from, SAT, transactionFees);
              totalSAT = balanceOf(from, SAT);
          }
          else if (balanceOf(from, BTC) > totalBTC){ // Not enough SAT, burn 1 BTC for transaction Fees
              _burn(from, BTC, 1);
              _mint(from, SAT, BTCtoSAT - transactionFees, "");
          }
          else{
              _burn(from, BTC, 1);
              totalBTC -= 1;
              if (indexSAT == ids.length){
                  _mint(to, SAT, BTCtoSAT - transactionFees, "");
              }
          }
          if (indexSAT != ids.length){
              amounts[indexSAT] = totalSAT;
          }
          if (indexBTC != ids.length){
              amounts[indexBTC] = totalBTC;
          }
          transactionFeesCollected += transactionFees;
      }
      super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
  }

  function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes memory data) public override onlyAllowedOperator(from) {
      super.safeTransferFrom(from, to, tokenId, amount, data);
  }

  function safeBatchTransferFrom(address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public override onlyAllowedOperator(from){
      super.safeBatchTransferFrom(from, to, ids, amounts, data);
  }

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

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

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

File 3 of 23 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 4 of 23 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

File 5 of 23 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

File 6 of 23 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

        return batchBalances;
    }

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner or 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: caller is not token owner or approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

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

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

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

        emit TransferSingle(operator, from, to, id, amounts[0]);

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

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amounts[0], data);
    }

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

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

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

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

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * 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 _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

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

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

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

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

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

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

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

        return array;
    }
}

File 7 of 23 : ERC1155Supply.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol)

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of ERC1155 that adds tracking of total supply per id.
 *
 * Useful for scenarios where Fungible and Non-fungible tokens have to be
 * clearly identified. Note: While a totalSupply of 1 might mean the
 * corresponding is an NFT, there is no guarantees that no other token with the
 * same id are not going to be minted.
 */
abstract contract ERC1155Supply is ERC1155 {
    mapping(uint256 => uint256) private _totalSupply;

    /**
     * @dev Total amount of tokens in with a given id.
     */
    function totalSupply(uint256 id) public view virtual returns (uint256) {
        return _totalSupply[id];
    }

    /**
     * @dev Indicates whether any token exist with a given id, or not.
     */
    function exists(uint256 id) public view virtual returns (bool) {
        return ERC1155Supply.totalSupply(id) > 0;
    }

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);

        if (from == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                _totalSupply[ids[i]] += amounts[i];
            }
        }

        if (to == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                uint256 id = ids[i];
                uint256 amount = amounts[i];
                uint256 supply = _totalSupply[id];
                require(supply >= amount, "ERC1155: burn amount exceeds totalSupply");
                unchecked {
                    _totalSupply[id] = supply - amount;
                }
            }
        }
    }
}

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

pragma solidity ^0.8.0;

import "../IERC1155.sol";

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

File 9 of 23 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

File 11 of 23 : ERC1155Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)

pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 15 of 23 : Base64.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides a set of functions to operate with Base64 strings.
 *
 * _Available since v4.5._
 */
library Base64 {
    /**
     * @dev Base64 Encoding/Decoding Table
     */
    string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    /**
     * @dev Converts a `bytes` to its Bytes64 `string` representation.
     */
    function encode(bytes memory data) internal pure returns (string memory) {
        /**
         * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence
         * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol
         */
        if (data.length == 0) return "";

        // Loads the table into memory
        string memory table = _TABLE;

        // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter
        // and split into 4 numbers of 6 bits.
        // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up
        // - `data.length + 2`  -> Round up
        // - `/ 3`              -> Number of 3-bytes chunks
        // - `4 *`              -> 4 characters for each chunk
        string memory result = new string(4 * ((data.length + 2) / 3));

        /// @solidity memory-safe-assembly
        assembly {
            // Prepare the lookup table (skip the first "length" byte)
            let tablePtr := add(table, 1)

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

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

            } {
                // Advance 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // To write each character, shift the 3 bytes (18 bits) chunk
                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
                // and apply logical AND with 0x3F which is the number of
                // the previous character in the ASCII table prior to the Base64 Table
                // The result is then added to the table to get the character to write,
                // and finally write it in the result pointer but with a left shift
                // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits

                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance
            }

            // When data `bytes` is not exactly 3 bytes long
            // it is padded with `=` characters at the end
            switch mod(mload(data), 3)
            case 1 {
                mstore8(sub(resultPtr, 1), 0x3d)
                mstore8(sub(resultPtr, 2), 0x3d)
            }
            case 2 {
                mstore8(sub(resultPtr, 1), 0x3d)
            }
        }

        return result;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

File 21 of 23 : DefaultOperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {OperatorFilterer} from "./OperatorFilterer.sol";

/**
 * @title  DefaultOperatorFilterer
 * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
 */
abstract contract DefaultOperatorFilterer is OperatorFilterer {
    address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}
}

File 22 of 23 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);
    function register(address registrant) external;
    function registerAndSubscribe(address registrant, address subscription) external;
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;
    function unregister(address addr) external;
    function updateOperator(address registrant, address operator, bool filtered) external;
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
    function subscribe(address registrant, address registrantToSubscribe) external;
    function unsubscribe(address registrant, bool copyExistingEntries) external;
    function subscriptionOf(address addr) external returns (address registrant);
    function subscribers(address registrant) external returns (address[] memory);
    function subscriberAt(address registrant, uint256 index) external returns (address);
    function copyEntriesOf(address registrant, address registrantToCopy) external;
    function isOperatorFiltered(address registrant, address operator) external returns (bool);
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
    function filteredOperators(address addr) external returns (address[] memory);
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
    function isRegistered(address addr) external returns (bool);
    function codeHashOf(address addr) external returns (bytes32);
}

File 23 of 23 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";

/**
 * @title  OperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 */
abstract contract OperatorFilterer {
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (subscribe) {
                OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    OPERATOR_FILTER_REGISTRY.register(address(this));
                }
            }
        }
    }

    modifier onlyAllowedOperator(address from) virtual {
        // Allow spending tokens from addresses with balance
        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
        // from an EOA.
        if (from != msg.sender) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    function _checkFilterOperator(address operator) internal view virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"BTCtoSAT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountBTC","type":"uint256"},{"internalType":"uint256","name":"amountSAT","type":"uint256"}],"name":"addLiquidity","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"difficulty","type":"uint256"}],"name":"changeDifficulty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountBTC","type":"uint256"}],"name":"convertBTCtoSAT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountSAT","type":"uint256"}],"name":"convertSATtoBTC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"electricityFeeCollected","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBlockReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assetBoughtAmount","type":"uint256"},{"internalType":"uint256","name":"_assetSoldReserve","type":"uint256"},{"internalType":"uint256","name":"_assetBoughtReserve","type":"uint256"}],"name":"getBuyPrice","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getCurrentChainStatus","outputs":[{"components":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"uint256","name":"blockReward","type":"uint256"},{"internalType":"uint256","name":"nextHalving","type":"uint256"},{"internalType":"uint256","name":"transactionFees","type":"uint256"},{"internalType":"string","name":"currentSupply","type":"string"}],"internalType":"struct BTC1155.chainStatus","name":"cS","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountBTC","type":"uint256"},{"internalType":"uint256","name":"amountSAT","type":"uint256"}],"name":"getETHNeededToAddLiquidity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assetSoldAmount","type":"uint256"},{"internalType":"uint256","name":"_assetSoldReserve","type":"uint256"},{"internalType":"uint256","name":"_assetBoughtReserve","type":"uint256"}],"name":"getSellPrice","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mine","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountLP","type":"uint256"}],"name":"removeLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountBTC","type":"uint256"},{"internalType":"uint256","name":"amountSAT","type":"uint256"}],"name":"swapForETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"name":"swapForExactETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountSAT","type":"uint256"}],"name":"swapForExactSAT","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"swapForSAT","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"}]

66038d7ea4c68000600955600c6101208181526b436861696e2053746174757360a01b610140526080908152600b6101609081526a537761702053746174757360a81b6101805260a05260036101a08181526242544360e81b6101c05260c0526101e09081526214d05560ea1b6102005260e05261026060405260026102209081526104c560f41b61024052610100526200009d9190600562000d8b565b50600d80546001600160a01b031916301790556040805180820190915260078152664254433131353560c81b6020820152600e90620000dd908262000f03565b5060408051808201909152600381526242544360e81b6020820152600f9062000107908262000f03565b503480156200011557600080fd5b506040805180820190915260078152664254433131353560c81b6020820152733cc6cdda760b79bafa08df41ecfa224f810dceb660016daaeb6d7670e522a718067333cd4e3b1562000290578015620001de57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b158015620001bf57600080fd5b505af1158015620001d4573d6000803e3d6000fd5b5050505062000290565b6001600160a01b038216156200022f5760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401620001a4565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200027657600080fd5b505af11580156200028b573d6000803e3d6000fd5b505050505b506200029e90508162000306565b506001600655620002af3362000318565b620002d43360006001604051806020016040528060008152506200036a60201b60201c565b600d5460408051602081019091526000815262000300916001600160a01b03169060019081906200036a565b620011f5565b600262000314828262000f03565b5050565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416620003d05760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084015b60405180910390fd5b336000620003de856200048c565b90506000620003ed856200048c565b90506200040083600089858589620004da565b6000868152602081815260408083206001600160a01b038b168452909152812080548792906200043290849062000fe5565b909155505060408051878152602081018790526001600160a01b03808a169260009291871691600080516020620063ee833981519152910160405180910390a46200048383600089898989620007cb565b50505050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110620004c957620004c962000ffb565b602090810291909101015292915050565b846001600160a01b0316866001600160a01b03161480156200050457506001600160a01b03841615155b80156200051f5750600d546001600160a01b03858116911614155b15620007a857825160008181805b87518110156200063f5760038882815181106200054e576200054e62000ffb565b602002602001015103620005b45780945086818151811062000574576200057462000ffb565b60200260200101518462000589919062000fe5565b93506000878281518110620005a257620005a262000ffb565b6020026020010181815250506200062c565b6002888281518110620005cb57620005cb62000ffb565b6020026020010151036200062c57809250868181518110620005f157620005f162000ffb565b60200260200101518262000606919062000fe5565b915060008782815181106200061f576200061f62000ffb565b6020026020010181815250505b620006378162001011565b90506200052d565b506200064d89600362000997565b6200065a600a8562000fe5565b1162000675576200066f896003600a62000a2d565b62000732565b600a8310620006a2576200068d896003600a62000a2d565b6200069a89600362000997565b925062000732565b80620006b08a600262000997565b1115620006f357620006c6896002600162000a2d565b6200066f896003620006de600a6305f5e1006200102d565b6040805160208101909152600081526200036a565b62000702896002600162000a2d565b6200070f6001826200102d565b905086518403620007325762000732886003620006de600a6305f5e1006200102d565b865184146200075e578286858151811062000751576200075162000ffb565b6020026020010181815250505b865182146200078a57808683815181106200077d576200077d62000ffb565b6020026020010181815250505b600a8060008282546200079e919062000fe5565b9091555050505050505b620007c386868686868662000bce60201b62001c361760201c565b505050505050565b620007ea846001600160a01b031662000d7c60201b62001db81760201c565b15620007c35760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906200082690899089908890889088906004016200108b565b6020604051808303816000875af192505050801562000864575060408051601f3d908101601f191682019092526200086191810190620010d2565b60015b62000924576200087362001105565b806308c379a003620008b357506200088a62001151565b80620008975750620008b5565b8060405162461bcd60e51b8152600401620003c79190620011e0565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401620003c7565b6001600160e01b0319811663f23a6e6160e01b14620004835760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401620003c7565b60006001600160a01b03831662000a045760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b6064820152608401620003c7565b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b6001600160a01b03831662000a915760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401620003c7565b33600062000a9f846200048c565b9050600062000aae846200048c565b905062000ad683876000858560405180602001604052806000815250620004da60201b60201c565b6000858152602081815260408083206001600160a01b038a1684529091529020548481101562000b555760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401620003c7565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a9052909290881691600080516020620063ee833981519152910160405180910390a46200048384886000868660405180602001604052806000815250620007c360201b60201c565b62000be9868686868686620007c360201b62000f651760201c565b6001600160a01b03851662000c7d5760005b835181101562000c7b5782818151811062000c1a5762000c1a62000ffb565b60200260200101516003600086848151811062000c3b5762000c3b62000ffb565b60200260200101518152602001908152602001600020600082825462000c62919062000fe5565b9091555062000c7390508162001011565b905062000bfb565b505b6001600160a01b038416620007c35760005b83518110156200048357600084828151811062000cb05762000cb062000ffb565b60200260200101519050600084838151811062000cd15762000cd162000ffb565b602002602001015190506000600360008481526020019081526020016000205490508181101562000d565760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401620003c7565b6000928352600360205260409092209103905562000d748162001011565b905062000c8f565b6001600160a01b03163b151590565b82805482825590600052602060002090810192821562000dd6579160200282015b8281111562000dd6578251829062000dc5908262000f03565b509160200191906001019062000dac565b5062000de492915062000de8565b5090565b8082111562000de457600062000dff828262000e09565b5060010162000de8565b50805462000e179062000e78565b6000825580601f1062000e28575050565b601f01602090049060005260206000209081019062000e48919062000e4b565b50565b5b8082111562000de4576000815560010162000e4c565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168062000e8d57607f821691505b60208210810362000eae57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000efe57600081815260208120601f850160051c8101602086101562000edd5750805b601f850160051c820191505b81811015620007c35782815560010162000ee9565b505050565b81516001600160401b0381111562000f1f5762000f1f62000e62565b62000f378162000f30845462000e78565b8462000eb4565b602080601f83116001811462000f6f576000841562000f565750858301515b600019600386901b1c1916600185901b178555620007c3565b600085815260208120601f198616915b8281101562000fa05788860151825594840194600190910190840162000f7f565b508582101562000fbf5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b8082018082111562000a275762000a2762000fcf565b634e487b7160e01b600052603260045260246000fd5b60006001820162001026576200102662000fcf565b5060010190565b8181038181111562000a275762000a2762000fcf565b6000815180845260005b818110156200106b576020818501810151868301820152016200104d565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090620010c79083018462001043565b979650505050505050565b600060208284031215620010e557600080fd5b81516001600160e01b031981168114620010fe57600080fd5b9392505050565b600060033d11156200111f5760046000803e5060005160e01c5b90565b601f8201601f191681016001600160401b03811182821017156200114a576200114a62000e62565b6040525050565b600060443d1015620011605790565b6040516003193d81016004833e81513d6001600160401b0380831160248401831017156200119057505050505090565b8285019150815181811115620011a95750505050505090565b843d8701016020828501011115620011c45750505050505090565b620011d56020828601018762001122565b509095945050505050565b602081526000620010fe602083018462001043565b6151e980620012056000396000f3fe60806040526004361061022f5760003560e01c8063715018a61161012e578063be2c2f14116100ab578063f242432a1161006f578063f242432a146106fd578063f2fde38b1461071d578063f89d40861461073d578063fca16c3b14610752578063fe0474a61461077257600080fd5b8063be2c2f1414610632578063c9710fb214610652578063d9cbf77514610672578063e985e9c514610688578063f23a6e61146106d157600080fd5b80639c8f9f23116100f25780639c8f9f231461056d5780639cd441da1461058d578063a22cb465146105a0578063bc197c81146105c0578063bd85b0391461060557600080fd5b8063715018a6146105155780638b7f54cd1461052a5780638da5cb5b1461053257806395d89b411461055057806399f4b2511461056557600080fd5b80632a55205a116101bc5780634e1273f4116101805780634e1273f4146104665780634f558e791461049357806351cff8d9146104c25780636ee8e134146104e2578063706182551461050257600080fd5b80632a55205a1461038d5780632eb2c2d6146103cc57806333c81390146103ec57806341f434341461040c57806344004cc11461044657600080fd5b80630b027d40116102035780630b027d40146102e95780630e89341c1461030b5780631119d1141461032b578063171d0c2f1461034b5780631a6204af1461036d57600080fd5b8062fdd58e1461023457806301ffc9a71461026757806306fdde03146102975780630902f1ac146102b9575b600080fd5b34801561024057600080fd5b5061025461024f366004613bf8565b61078a565b6040519081526020015b60405180910390f35b34801561027357600080fd5b50610287610282366004613c38565b610823565b604051901515815260200161025e565b3480156102a357600080fd5b506102ac61082e565b60405161025e9190613ca5565b3480156102c557600080fd5b506102ce6108bc565b6040805193845260208401929092529082015260600161025e565b3480156102f557600080fd5b50610309610304366004613cb8565b61092b565b005b34801561031757600080fd5b506102ac610326366004613cda565b610a70565b34801561033757600080fd5b50610309610346366004613cda565b610bb2565b34801561035757600080fd5b50610360610ce7565b60405161025e9190613cf3565b34801561037957600080fd5b50610309610388366004613cda565b610dfb565b34801561039957600080fd5b506103ad6103a8366004613cb8565b610e92565b604080516001600160a01b03909316835260208301919091520161025e565b3480156103d857600080fd5b506103096103e7366004613e8a565b610f3e565b3480156103f857600080fd5b50610309610407366004613cda565b610f6d565b34801561041857600080fd5b5061042e6daaeb6d7670e522a718067333cd4e81565b6040516001600160a01b03909116815260200161025e565b34801561045257600080fd5b50610309610461366004613f34565b611009565b34801561047257600080fd5b50610486610481366004613f70565b6110be565b60405161025e9190614076565b34801561049f57600080fd5b506102876104ae366004613cda565b600090815260036020526040902054151590565b3480156104ce57600080fd5b506103096104dd366004614089565b6111e8565b3480156104ee57600080fd5b506102546104fd3660046140a4565b6112bf565b610309610510366004613cda565b611368565b34801561052157600080fd5b50610309611443565b610309611457565b34801561053e57600080fd5b506007546001600160a01b031661042e565b34801561055c57600080fd5b506102ac6114d1565b6103096114de565b34801561057957600080fd5b50610309610588366004613cda565b611601565b61030961059b366004613cb8565b6116e5565b3480156105ac57600080fd5b506103096105bb3660046140de565b6119ec565b3480156105cc57600080fd5b506105ec6105db366004613e8a565b63bc197c8160e01b95945050505050565b6040516001600160e01b0319909116815260200161025e565b34801561061157600080fd5b50610254610620366004613cda565b60009081526003602052604090205490565b34801561063e57600080fd5b5061030961064d366004613cda565b611a00565b34801561065e57600080fd5b5061025461066d366004613cb8565b611a4a565b34801561067e57600080fd5b50610254600b5481565b34801561069457600080fd5b506102876106a3366004614115565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b3480156106dd57600080fd5b506105ec6106ec366004614148565b63f23a6e6160e01b95945050505050565b34801561070957600080fd5b50610309610718366004614148565b611ad8565b34801561072957600080fd5b50610309610738366004614089565b611aff565b34801561074957600080fd5b50610254611b75565b34801561075e57600080fd5b5061025461076d3660046140a4565b611b93565b34801561077e57600080fd5b506102546305f5e10081565b60006001600160a01b0383166107fa5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600061081d82611dc7565b600e805461083b906141ad565b80601f0160208091040260200160405190810160405280929190818152602001828054610867906141ad565b80156108b45780601f10610889576101008083540402835291602001916108b4565b820191906000526020600020905b81548152906001019060200180831161089757829003601f168201915b505050505081565b600d54600090819081906108da906001600160a01b0316600361078a565b600b54600d546108f491906001600160a01b0316316141f7565b600460005260036020527f83ec6a1f0257b830b5e016457c9cf1435391bf56cc98f369a58a54fe9377246554925092509250909192565b610933611dec565b60008061093e6108bc565b50915091508361094f33600261078a565b101561096d5760405162461bcd60e51b81526004016107f19061420a565b8261097933600361078a565b10156109975760405162461bcd60e51b81526004016107f190614232565b83156109de576109a933600286611e45565b600d546109de906001600160a01b031660036109c96305f5e1008861425a565b60405180602001604052806000815250611fd5565b610a1033600d60009054906101000a90046001600160a01b0316600386604051806020016040528060008152506120ef565b336108fc610a3785610a266305f5e1008961425a565b610a309190614271565b85856112bf565b6040518115909202916000818181858888f19350505050158015610a5f573d6000803e3d6000fd5b505050610a6c6001600655565b5050565b60606000600c8381548110610a8757610a87614284565b906000526020600020018054610a9c906141ad565b80601f0160208091040260200160405190810160405280929190818152602001828054610ac8906141ad565b8015610b155780601f10610aea57610100808354040283529160200191610b15565b820191906000526020600020905b815481529060010190602001808311610af857829003601f168201915b5050505050905060006040518060400160405280601a81526020017f412066756e6769626c65204552432d3131353520746f6b656e2e0000000000008152509050610b8a8282610b64876122dc565b604051602001610b76939291906142b6565b604051602081830303815290604052612c4b565b604051602001610b9a9190614357565b60405160208183030381529060405292505050919050565b610bba611dec565b600080610bc56108bc565b5090925090506000610c0084610bdc8560c861425a565b610be6919061425a565b610bf086856141f7565b610bfb9060c761425a565b612d9e565b905080610c0e33600361078a565b10610c4a57610c4533600d60009054906101000a90046001600160a01b0316600384604051806020016040528060008152506120ef565b610ca9565b610c573360026001611e45565b610c773360036305f5e10060405180602001604052806000815250611fd5565b610ca933600d60009054906101000a90046001600160a01b0316600384604051806020016040528060008152506120ef565b604051339085156108fc029086906000818181858888f19350505050158015610cd6573d6000803e3d6000fd5b50505050610ce46001600655565b50565b610d196040518060a0016040528060008152602001600081526020016000815260200160008152602001606081525090565b6008548152610d26611b75565b6020820152600854610d3a610400826143b2565b610d45906001614271565b610d519061040061425a565b610d5b91906141f7565b6040820152600a5460608201819052600260005260036020527fc3a24b0501bd2c13a7e57f2db4369ec4c223447539fc0724a9d55ac4a06ebd4d54610df39190610da9906305f5e10061425a565b600360008190526020527fcbc4e5fb02c3d1de23a9f1e014b4d2ee5aeaea9505df5e855c9210bf472495af54610ddf9190614271565b610de991906141f7565b6305f5e100612dda565b608082015290565b610e03611dec565b6000610e1033600061078a565b11610e835760405162461bcd60e51b815260206004820152603760248201527f4e65656420746f206f776e2074686520737461747573204e465420746f20636860448201527f616e67652074686520656c65637472696369747946656500000000000000000060648201526084016107f1565b6009819055610ce46001600655565b60008281526005602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610f075750604080518082019091526004546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610f26906001600160601b03168761425a565b610f3091906143b2565b915196919550909350505050565b846001600160a01b0381163314610f5857610f5833612f09565b610f658686868686612fc2565b505050505050565b80610f7933600361078a565b1015610f975760405162461bcd60e51b81526004016107f190614232565b610fa56305f5e100826143c6565b15610fe95760405162461bcd60e51b8152602060048201526014602482015273139bdd08185d985a5b18589b1948185b5bdd5b9d60621b60448201526064016107f1565b610ff533600383611e45565b610ce43360026109c96305f5e100856143b2565b611011611dec565b600061101e84600061078a565b1161103b5760405162461bcd60e51b81526004016107f1906143da565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820183905283169063a9059cbb906044016020604051808303816000875af115801561108a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ae9190614430565b506110b96001600655565b505050565b606081518351146111235760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016107f1565b6000835167ffffffffffffffff81111561113f5761113f613d3e565b604051908082528060200260200182016040528015611168578160200160208202803683370190505b50905060005b84518110156111e0576111b385828151811061118c5761118c614284565b60200260200101518583815181106111a6576111a6614284565b602002602001015161078a565b8282815181106111c5576111c5614284565b60209081029190910101526111d98161444d565b905061116e565b509392505050565b6111f0611dec565b60006111fd82600061078a565b1161121a5760405162461bcd60e51b81526004016107f1906143da565b600b546040516000916001600160a01b038416918381818185875af1925050503d8060008114611266576040519150601f19603f3d011682016040523d82523d6000602084013e61126b565b606091505b50506000600b559050806112b45760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b60448201526064016107f1565b50610ce46001600655565b600080831180156112d05750600082115b61131c5760405162461bcd60e51b815260206004820152601d60248201527f45786368616e6765206572726f723a20454d5054595f5245534552564500000060448201526064016107f1565b60006113298560c761425a565b90506000611337848361425a565b90506000826113478760c861425a565b6113519190614271565b905061135d81836143b2565b979650505050505050565b611370611dec565b60008061137b6108bc565b50909250905061138b34826141f7565b905060006113b28261139e8660c861425a565b6113a8919061425a565b610bf086866141f7565b9050803410156113f55760405162461bcd60e51b815260206004820152600e60248201526d08ae8d040dcdee840cadcdeeaced60931b60448201526064016107f1565b336108fc61140383346141f7565b6040518115909202916000818181858888f1935050505015801561142b573d6000803e3d6000fd5b50611436843361300e565b505050610ce46001600655565b61144b613093565b61145560006130ed565b565b61145f611dec565b60008061146a6108bc565b50909250905061147a34826141f7565b90506114c561148a3460c761425a565b6114958360c861425a565b61149f9190614271565b836114ab3460c761425a565b6114b5919061425a565b6114bf91906143b2565b3361300e565b50506114556001600655565b600f805461083b906141ad565b6114e6611dec565b6009543410156115445760405162461bcd60e51b815260206004820152602360248201527f596f75207061792074686520656c6563747269636974792c20646f6e277420796044820152626f753f60e81b60648201526084016107f1565b600954600b60008282546115589190614271565b909155505060085461156d906120009061425a565b4310156115bc5760405162461bcd60e51b815260206004820152601c60248201527f4e65787420626c6f636b206e6f7420617661696c61626c65207965740000000060448201526064016107f1565b600880549060006115cc8361444d565b919050555060006115db611b75565b90506115f1336003600a54846109c99190614271565b506000600a556114556001600655565b611609611dec565b60008060006116166108bc565b9250925092508361162833600461078a565b10156116665760405162461bcd60e51b815260206004820152600d60248201526c098a040dcdee840cadcdeeaced609b1b60448201526064016107f1565b61167233600486611e45565b60008161167f868661425a565b61168991906143b2565b9050611695813361300e565b336108fc836116a4888761425a565b6116ae91906143b2565b6040518115909202916000818181858888f193505050501580156116d6573d6000803e3d6000fd5b5050505050610ce46001600655565b6116ed611dec565b816116f933600261078a565b10156117175760405162461bcd60e51b81526004016107f19061420a565b8061172333600361078a565b10156117415760405162461bcd60e51b81526004016107f190614232565b600080600061174e6108bc565b925092509250806000036118a757600034116117ca5760405162461bcd60e51b815260206004820152603560248201527f596f75206e65656420746f2061646420626f7468204254432f53415420616e6460448201527420455448206174207468652073616d652074696d6560581b60648201526084016107f1565b84156117fc576117dc33600287611e45565b600d546117fc906001600160a01b031660036109c96305f5e1008961425a565b83156118345761183433600d60009054906101000a90046001600160a01b0316600387604051806020016040528060008152506120ef565b6402540be4006118773360048361186d348a6118546305f5e1008e61425a565b61185e9190614271565b611868919061425a565b61313f565b6109c991906141f7565b600d546040805160208101909152600081526118a1916001600160a01b0316906004908490611fd5565b50610a5f565b6118b134836141f7565b915060006118e1856118c76305f5e1008961425a565b6118d19190614271565b6118db908561425a565b85612d9e565b9050803410156119245760405162461bcd60e51b815260206004820152600e60248201526d08ae8d040dcdee840cadcdeeaced60931b60448201526064016107f1565b336108fc61193283346141f7565b6040518115909202916000818181858888f1935050505015801561195a573d6000803e3d6000fd5b50851561198d5761196d33600288611e45565b600d5461198d906001600160a01b031660036109c96305f5e1008a61425a565b84156119c5576119c533600d60009054906101000a90046001600160a01b0316600388604051806020016040528060008152506120ef565b6119de3360046109c984896118546305f5e1008d61425a565b50505050610a6c6001600655565b816119f681612f09565b6110b98383613198565b80611a0c33600261078a565b1015611a2a5760405162461bcd60e51b81526004016107f19061420a565b611a3633600283611e45565b610ce43360036109c96305f5e1008561425a565b600080600080611a586108bc565b92509250925060008111611aae5760405162461bcd60e51b815260206004820152601860248201527f506f6f6c206e6565647320746f2062652063726561746564000000000000000060448201526064016107f1565b600085611abf6305f5e1008961425a565b611ac99190614271565b905061135d6118db828561425a565b846001600160a01b0381163314611af257611af233612f09565b610f6586868686866131a3565b611b07613093565b6001600160a01b038116611b6c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107f1565b610ce4816130ed565b6000610400600854611b8791906143b2565b63035c8ac4901c905090565b60008083118015611ba45750600082115b611bf05760405162461bcd60e51b815260206004820152601d60248201527f45786368616e6765206572726f723a20454d5054595f5245534552564500000060448201526064016107f1565b6000611bfc858561425a565b611c079060c861425a565b90506000611c1586856141f7565b611c209060c761425a565b9050611c2c8282612d9e565b9695505050505050565b6001600160a01b038516611cbd5760005b8351811015611cbb57828181518110611c6257611c62614284565b602002602001015160036000868481518110611c8057611c80614284565b602002602001015181526020019081526020016000206000828254611ca59190614271565b90915550611cb490508161444d565b9050611c47565b505b6001600160a01b038416610f655760005b8351811015611daf576000848281518110611ceb57611ceb614284565b602002602001015190506000848381518110611d0957611d09614284565b6020026020010151905060006003600084815260200190815260200160002054905081811015611d8c5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b60648201526084016107f1565b60009283526003602052604090922091039055611da88161444d565b9050611cce565b50505050505050565b6001600160a01b03163b151590565b60006001600160e01b0319821663152a902d60e11b148061081d575061081d826131e8565b600260065403611e3e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107f1565b6002600655565b6001600160a01b038316611ea75760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016107f1565b336000611eb38461320d565b90506000611ec08461320d565b9050611ee083876000858560405180602001604052806000815250613258565b6000858152602081815260408083206001600160a01b038a16845290915290205484811015611f5d5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016107f1565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052611daf565b6001600160a01b0384166120355760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016107f1565b3360006120418561320d565b9050600061204e8561320d565b905061205f83600089858589613258565b6000868152602081815260408083206001600160a01b038b1684529091528120805487929061208f908490614271565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611daf836000898989896134d7565b6001600160a01b0384166121155760405162461bcd60e51b81526004016107f190614466565b3360006121218561320d565b9050600061212e8561320d565b905061213e838989858589613258565b6000868152602081815260408083206001600160a01b038c16845290915281205482519091839161217157612171614284565b60200260200101518110156121985760405162461bcd60e51b81526004016107f1906144ab565b816000815181106121ab576121ab614284565b602090810291909101810151600089815280835260408082206001600160a01b038e168352909352918220908303905582518391906121ec576121ec614284565b602090810291909101810151600089815280835260408082206001600160a01b038d168352909352918220805491929091612228908490614271565b92505081905550876001600160a01b0316896001600160a01b0316856001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8660008151811061228257612282614284565b60200260200101516040516122a1929190918252602082015260400190565b60405180910390a46122d1848a8a8a866000815181106122c3576122c3614284565b60200260200101518a6134d7565b505050505050505050565b6060816127505760006122ed610ce7565b90506127296123576040518060400160405280600e81526020016d0213637b1b590373ab6b132b91d160951b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001601960f91b8152506001613632565b6123bc6040518060400160405280600e81526020016d0213637b1b5903932bbb0b9321d160951b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001603360f81b8152506001613632565b6124216040518060400160405280600e81526020016d02732bc3a103430b63b34b7339d160951b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001601b60f91b8152506001613632565b61248a6040518060400160405280601281526020017102a3930b739b0b1ba34b7b7103332b2b99d160751b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001600d60fa1b8152506001613632565b6124e960405180604001604052806008815260200167029bab838363c9d160c51b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001603560f81b8152506001613632565b6040516020016124fd9594939291906144f5565b60405160208183030381529060405261255761251c84600001516136a8565b604051806040016040528060018152602001603960f81b815250604051806040016040528060018152602001601960f91b8152506000613632565b6125c161256785602001516136a8565b6040516020016125779190614560565b604051602081830303815290604052604051806040016040528060018152602001603960f81b815250604051806040016040528060018152602001603360f81b8152506000613632565b61262b6125d186604001516136a8565b6040516020016125e19190614588565b604051602081830303815290604052604051806040016040528060018152602001603960f81b815250604051806040016040528060018152602001601b60f91b8152506000613632565b61269561263b87606001516136a8565b60405160200161264b9190614560565b604051602081830303815290604052604051806040016040528060018152602001603960f81b815250604051806040016040528060018152602001600d60fa1b8152506000613632565b6126f787608001516040516020016126ad91906145b5565b604051602081830303815290604052604051806040016040528060018152602001603960f81b815250604051806040016040528060018152602001603560f81b8152506000613632565b60405160200161270b9594939291906144f5565b60408051601f1981840301815290829052610b7692916020016145dd565b604051602001612739919061485b565b604051602081830303815290604052915050919050565b60018203612b7357600d54600090612772906001600160a01b0316600361078a565b600b54600d5491925060009161279291906001600160a01b0316316141f7565b905080156127a057806127aa565b670de0b6b3a76400005b90506060826000036127d6576040518060800160405280605b8152602001615119605b91399050612b36565b6128386040518060400160405280600b81526020016a2837b7b632b21029a0aa1d60a91b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001601960f91b8152506001613632565b61289a6040518060400160405280600b81526020016a2837b7b632b21029a0aa1d60a91b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001603360f81b8152506001613632565b6128fc6040518060400160405280600b81526020016a2837b7b632b21022aa241d60a91b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001600d60fa1b8152506001613632565b61295a604051806040016040528060078152602001663120455448203d60c81b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001603560f81b8152506001613632565b6129b8604051806040016040528060078152602001663120425443203d60c81b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001601b60f91b8152506001613632565b6040516020016129cc9594939291906144f5565b604051602081830303815290604052612a416129e7856136a8565b6040516020016129f79190614560565b604051602081830303815290604052604051806040016040528060018152602001603960f81b815250604051806040016040528060018152602001601960f91b8152506000613632565b612a62612a52866305f5e100612dda565b60405160200161257791906145b5565b612a87612a7786670de0b6b3a7640000612dda565b60405160200161264b91906148a0565b612ab5612aa5612a9f89670de0b6b3a764000061425a565b88612dda565b6040516020016126ad9190614560565b612af2612ae2670de0b6b3a7640000612ad26305f5e1008b61425a565b612adc91906143b2565b8a612dda565b6040516020016125e191906148a0565b604051602001612b069594939291906144f5565b60408051601f1981840301815290829052612b2492916020016148c8565b60405160208183030381529060405290505b612b4a81604051602001610b7691906148f7565b604051602001612b5a919061485b565b6040516020818303038152906040529350505050919050565b6040805160c081018252600060a0820181815282528251602081810185529181528183015282518084018452600580825264312042544360d81b828401528385019190915283518085018552818152640c4814d05560da1b81840152606084015283518085019094526004845263031204c560e41b918401919091526080820192909252612c209184908110612c0b57612c0b614284565b6020020151604051602001610b769190614b6a565b604051602001612c30919061485b565b6040516020818303038152906040529050919050565b919050565b60608151600003612c6a57505060408051602081019091526000815290565b60006040518060600160405280604081526020016151746040913990506000600384516002612c999190614271565b612ca391906143b2565b612cae90600461425a565b67ffffffffffffffff811115612cc657612cc6613d3e565b6040519080825280601f01601f191660200182016040528015612cf0576020820181803683370190505b509050600182016020820185865187015b80821015612d5c576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250612d01565b5050600386510660018114612d785760028114612d8b57612d93565b603d6001830353603d6002830353612d93565b603d60018303535b509195945050505050565b6000612daa82846143c6565b15612dc957612db982846143b2565b612dc4906001614271565b612dd3565b612dd382846143b2565b9392505050565b606081600003612de957600191505b6000612df583856143b2565b90506000612e056103e8856143b2565b612e0f858461425a565b612e1990876141f7565b612e2391906143b2565b90506000821180612e345750600081115b15612ee657612e42826136a8565b60648210612e5f5760405180602001604052806000815250612e7a565b604051806040016040528060018152602001600360fc1b8152505b600a8310612e975760405180602001604052806000815250612eb2565b604051806040016040528060018152602001600360fc1b8152505b612ebb846136a8565b604051602001612ece9493929190614d33565b6040516020818303038152906040529250505061081d565b604051806040016040528060018152602001600360fc1b8152509250505061081d565b6daaeb6d7670e522a718067333cd4e3b15610ce457604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f9a9190614430565b610ce457604051633b79c77360e21b81526001600160a01b03821660048201526024016107f1565b6001600160a01b038516331480612fde5750612fde85336106a3565b612ffa5760405162461bcd60e51b81526004016107f190614d9d565b613007858585858561373b565b5050505050565b6305f5e100821061305d5761302d8160026109c96305f5e100866143b2565b600d5461305d906001600160a01b031660036305f5e10061304e81876143b2565b613058919061425a565b611e45565b600d54610a6c906001600160a01b031682600361307e6305f5e100876143c6565b604051806020016040528060008152506120ef565b6007546001600160a01b031633146114555760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f1565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080600261314f846001614271565b61315991906143b2565b90508291505b818110156131925790508060028161317781866143b2565b6131819190614271565b61318b91906143b2565b905061315f565b50919050565b610a6c33838361391e565b6001600160a01b0385163314806131bf57506131bf85336106a3565b6131db5760405162461bcd60e51b81526004016107f190614d9d565b61300785858585856120ef565b60006001600160e01b03198216630271189760e51b148061081d575061081d826139fe565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061324757613247614284565b602090810291909101015292915050565b846001600160a01b0316866001600160a01b031614801561328157506001600160a01b03841615155b801561329b5750600d546001600160a01b03858116911614155b156134c957825160008181805b875181101561339d5760038882815181106132c5576132c5614284565b602002602001015103613321578094508681815181106132e7576132e7614284565b6020026020010151846132fa9190614271565b9350600087828151811061331057613310614284565b60200260200101818152505061338d565b600288828151811061333557613335614284565b60200260200101510361338d5780925086818151811061335757613357614284565b60200260200101518261336a9190614271565b9150600087828151811061338057613380614284565b6020026020010181815250505b6133968161444d565b90506132a8565b506133a989600361078a565b6133b4600a85614271565b116133cb576133c6896003600a611e45565b61345d565b600a83106133f2576133e0896003600a611e45565b6133eb89600361078a565b925061345d565b806133fe8a600261078a565b1115613426576134118960026001611e45565b6133c68960036109c9600a6305f5e1006141f7565b6134338960026001611e45565b61343e6001826141f7565b90508651840361345d5761345d8860036109c9600a6305f5e1006141f7565b86518414613485578286858151811061347857613478614284565b6020026020010181815250505b865182146134ad57808683815181106134a0576134a0614284565b6020026020010181815250505b600a8060008282546134bf9190614271565b9091555050505050505b610f65868686868686611c36565b6001600160a01b0384163b15610f655760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061351b9089908990889088908890600401614deb565b6020604051808303816000875af1925050508015613556575060408051601f3d908101601f1916820190925261355391810190614e25565b60015b61360257613562614e42565b806308c379a00361359b5750613576614e5e565b80613581575061359d565b8060405162461bcd60e51b81526004016107f19190613ca5565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016107f1565b6001600160e01b0319811663f23a6e6160e01b14611daf5760405162461bcd60e51b81526004016107f190614ee8565b606083838361365a57604051806040016040528060018152602001606560f81b815250613675565b604051806040016040528060018152602001607360f81b8152505b8787878860405160200161368f9796959493929190614f30565b6040516020818303038152906040529050949350505050565b606060006136b583613a4e565b600101905060008167ffffffffffffffff8111156136d5576136d5613d3e565b6040519080825280601f01601f1916602001820160405280156136ff576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461370957509392505050565b815183511461379d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016107f1565b6001600160a01b0384166137c35760405162461bcd60e51b81526004016107f190614466565b336137d2818787878787613258565b60005b84518110156138b85760008582815181106137f2576137f2614284565b60200260200101519050600085838151811061381057613810614284565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156138605760405162461bcd60e51b81526004016107f1906144ab565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061389d908490614271565b92505081905550505050806138b19061444d565b90506137d5565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161390892919061508c565b60405180910390a4610f65818787878787613b26565b816001600160a01b0316836001600160a01b0316036139915760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016107f1565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60006001600160e01b03198216636cdb3d1360e11b1480613a2f57506001600160e01b031982166303a24d0760e21b145b8061081d57506301ffc9a760e01b6001600160e01b031983161461081d565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310613a8d5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613ab9576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310613ad757662386f26fc10000830492506010015b6305f5e1008310613aef576305f5e100830492506008015b6127108310613b0357612710830492506004015b60648310613b15576064830492506002015b600a831061081d5760010192915050565b6001600160a01b0384163b15610f655760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613b6a90899089908890889088906004016150ba565b6020604051808303816000875af1925050508015613ba5575060408051601f3d908101601f19168201909252613ba291810190614e25565b60015b613bb157613562614e42565b6001600160e01b0319811663bc197c8160e01b14611daf5760405162461bcd60e51b81526004016107f190614ee8565b80356001600160a01b0381168114612c4657600080fd5b60008060408385031215613c0b57600080fd5b613c1483613be1565b946020939093013593505050565b6001600160e01b031981168114610ce457600080fd5b600060208284031215613c4a57600080fd5b8135612dd381613c22565b60005b83811015613c70578181015183820152602001613c58565b50506000910152565b60008151808452613c91816020860160208601613c55565b601f01601f19169290920160200192915050565b602081526000612dd36020830184613c79565b60008060408385031215613ccb57600080fd5b50508035926020909101359150565b600060208284031215613cec57600080fd5b5035919050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526000608083015160a080840152613d3660c0840182613c79565b949350505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715613d7a57613d7a613d3e565b6040525050565b600067ffffffffffffffff821115613d9b57613d9b613d3e565b5060051b60200190565b600082601f830112613db657600080fd5b81356020613dc382613d81565b604051613dd08282613d54565b83815260059390931b8501820192828101915086841115613df057600080fd5b8286015b84811015613e0b5780358352918301918301613df4565b509695505050505050565b600082601f830112613e2757600080fd5b813567ffffffffffffffff811115613e4157613e41613d3e565b604051613e58601f8301601f191660200182613d54565b818152846020838601011115613e6d57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215613ea257600080fd5b613eab86613be1565b9450613eb960208701613be1565b9350604086013567ffffffffffffffff80821115613ed657600080fd5b613ee289838a01613da5565b94506060880135915080821115613ef857600080fd5b613f0489838a01613da5565b93506080880135915080821115613f1a57600080fd5b50613f2788828901613e16565b9150509295509295909350565b600080600060608486031215613f4957600080fd5b613f5284613be1565b9250613f6060208501613be1565b9150604084013590509250925092565b60008060408385031215613f8357600080fd5b823567ffffffffffffffff80821115613f9b57600080fd5b818501915085601f830112613faf57600080fd5b81356020613fbc82613d81565b604051613fc98282613d54565b83815260059390931b8501820192828101915089841115613fe957600080fd5b948201945b8386101561400e57613fff86613be1565b82529482019490820190613fee565b9650508601359250508082111561402457600080fd5b5061403185828601613da5565b9150509250929050565b600081518084526020808501945080840160005b8381101561406b5781518752958201959082019060010161404f565b509495945050505050565b602081526000612dd3602083018461403b565b60006020828403121561409b57600080fd5b612dd382613be1565b6000806000606084860312156140b957600080fd5b505081359360208301359350604090920135919050565b8015158114610ce457600080fd5b600080604083850312156140f157600080fd5b6140fa83613be1565b9150602083013561410a816140d0565b809150509250929050565b6000806040838503121561412857600080fd5b61413183613be1565b915061413f60208401613be1565b90509250929050565b600080600080600060a0868803121561416057600080fd5b61416986613be1565b945061417760208701613be1565b93506040860135925060608601359150608086013567ffffffffffffffff8111156141a157600080fd5b613f2788828901613e16565b600181811c908216806141c157607f821691505b60208210810361319257634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561081d5761081d6141e1565b6020808252600e908201526d084a88640dcdee840cadcdeeaced60931b604082015260600190565b6020808252600e908201526d0a682a840dcdee840cadcdeeaced60931b604082015260600190565b808202811582820484141761081d5761081d6141e1565b8082018082111561081d5761081d6141e1565b634e487b7160e01b600052603260045260246000fd5b600081516142ac818560208601613c55565b9290920192915050565b683d913730b6b2911d1160b91b815283516000906142db816009850160208901613c55565b72111610113232b9b1b934b83a34b7b7111d101160691b600991840191820152845161430e81601c840160208901613c55565b6b1116101134b6b0b3b2911d1160a11b601c9290910191820152835161433b816028840160208801613c55565b61227d60f01b60289290910191820152602a0195945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161438f81601d850160208701613c55565b91909101601d0192915050565b634e487b7160e01b600052601260045260246000fd5b6000826143c1576143c161439c565b500490565b6000826143d5576143d561439c565b500690565b60208082526036908201527f4e65656420746f206f776e2074686520737461747573204e465420746f20636c60408201527561696d2074686520656c65637472696369747946656560501b606082015260800190565b60006020828403121561444257600080fd5b8151612dd3816140d0565b60006001820161445f5761445f6141e1565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008651614507818460208b01613c55565b86519083019061451b818360208b01613c55565b865191019061452e818360208a01613c55565b8551910190614541818360208901613c55565b8451910190614554818360208801613c55565b01979650505050505050565b60008251614572818460208701613c55565b630814d05560e21b920191825250600401919050565b6000825161459a818460208701613c55565b6820626c6f636b28732960b81b920191825250600901919050565b600082516145c7818460208701613c55565b632042544360e01b920191825250600401919050565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f737667222077696474683d223130302522206865696768743d2231303060208201527f2522207072657365727665417370656374526174696f3d22784d696e594d696e60408201527f206d656574222076696577426f783d223020302033353020333530223e203c7360608201527f74796c653e2e62207b666f6e742d66616d696c793a2068656c7665746963613b60808201527f20666f6e742d73697a653a20313670783b20646f6d696e616e742d626173656c60a08201527f696e653a20626f74746f6d3b7d2e73207b2066696c6c3a20234630413841413b60c08201527f20746578742d616e63686f723a2073746172743b7d202e65207b66696c6c3a2060e08201527f234535453644393b20746578742d616e63686f723a20656e643b7d3c2f7374796101008201527f6c653e203c726563742077696474683d223130302522206865696768743d22316101208201527f303025222066696c6c3d222332463244333022202f3e3c7465787420783d22356101408201527f30252220793d2238252220646f6d696e616e742d626173656c696e653d226d696101608201527f64646c652220746578742d616e63686f723d226d6964646c652220666f6e742d6101808201527f73697a653d2232307078222066696c6c3d22234535453644392220666f6e742d6101a08201527f66616d696c793d2268656c766574696361223e436861696e207374617475733c6101c08201526517ba32bc3a1f60d11b6101e0820152600061484461483e6101e684018661429a565b8461429a565b651e17b9bb339f60d11b8152600601949350505050565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c00000000000081526000825161489381601a850160208701613c55565b91909101601a0192915050565b600082516148b2818460208701613c55565b630408aa8960e31b920191825250600401919050565b600083516148da818460208801613c55565b8351908301906148ee818360208801613c55565b01949350505050565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f737667222077696474683d223130302522206865696768743d2231303060208201527f2522207072657365727665417370656374526174696f3d22784d696e594d696e60408201527f206d656574222076696577426f783d223020302033353020333530223e203c7360608201527f74796c653e2e62207b666f6e742d66616d696c793a2068656c7665746963613b60808201527f20666f6e742d73697a653a20313670783b20646f6d696e616e742d626173656c60a08201527f696e653a20626f74746f6d3b7d2e73207b2066696c6c3a20234630413841413b60c08201527f20746578742d616e63686f723a2073746172743b7d202e65207b66696c6c3a2060e08201527f234535453644393b20746578742d616e63686f723a20656e643b7d3c2f7374796101008201527f6c653e203c726563742077696474683d223130302522206865696768743d22316101208201527f303025222066696c6c3d222332463244333022202f3e3c7465787420783d22356101408201527f30252220793d2238252220646f6d696e616e742d626173656c696e653d226d696101608201527f64646c652220746578742d616e63686f723d226d6964646c652220666f6e742d6101808201527f73697a653d2232307078222066696c6c3d22234535453644392220666f6e742d6101a08201527f66616d696c793d2268656c766574696361223e53776170207374617475733c2f6101c0820152643a32bc3a1f60d91b6101e08201526000614b546101e583018461429a565b651e17b9bb339f60d11b81526006019392505050565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f737667222077696474683d223130302522206865696768743d2231303060208201527f2522207072657365727665417370656374526174696f3d22784d696e594d696e60408201527f206d656574222076696577426f783d223020302033353020333530223e203c7360608201527f74796c653e2e73207b2066696c6c3a20234646464646463b20666f6e742d666160808201527f6d696c793a2068656c7665746963613b20666f6e742d73697a653a203234707860a08201527f3b20646f6d696e616e742d626173656c696e653a20626f74746f6d3b2074657860c08201527f742d616e63686f723a206d6964646c653b7d203c2f7374796c653e203c72656360e08201527f742077696474683d223130302522206865696768743d2231303025222066696c6101008201526d361e91119818181818181110179f60911b6101208201527f3c7465787420783d223530252220793d223530252220636c6173733d2273223e61012e8201526000614d0d61014e83018461429a565b661e17ba32bc3a1f60c91b8152651e17b9bb339f60d11b6007820152600d019392505050565b60008551614d45818460208a01613c55565b601760f91b9083019081528551614d63816001840160208a01613c55565b8551910190614d79816001840160208901613c55565b8451910190614d8f816001840160208801613c55565b016001019695505050505050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061135d90830184613c79565b600060208284031215614e3757600080fd5b8151612dd381613c22565b600060033d1115614e5b5760046000803e5060005160e01c5b90565b600060443d1015614e6c5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715614e9c57505050505090565b8285019150815181811115614eb45750505050505090565b843d8701016020828501011115614ece5750505050505090565b614edd60208286010187613d54565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b69101e3a32bc3a103c1e9160b11b815287516000906020614f5782600a8601838e01613c55565b66181291103c9e9160c91b600a928501928301528951614f7d8160118501848e01613c55565b6c01812911031b630b9b99e91311609d1b601193909101928301528851614faa81601e8501848d01613c55565b61111f60f11b601e93909101928301528751614fcb81838501848c01613c55565b711e17ba32bc3a1f101e3634b732903c189e9160711b92019081019190915261507e61504361503d61502061501a615006603287018c61429a565b67181291103c989e9160c11b815260080190565b8961429a565b70189291103c191e911c981291103c991e9160791b815260110190565b8661429a565b7f312522207374726f6b653d222341324343443622207374726f6b652d77696474815268341e9118b83c11179f60b91b602082015260290190565b9a9950505050505050505050565b60408152600061509f604083018561403b565b82810360208401526150b1818561403b565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906150e69083018661403b565b82810360608401526150f8818661403b565b9050828103608084015261510c8185613c79565b9897505050505050505056fe3c7465787420783d223530252220793d223530252220746578742d616e63686f723d226d6964646c65222066696c6c3d22234630413841412220636c6173733d2262223e4e6f206c6971756964697479207965743c2f746578743e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212200aa56bf07c7651a310f179ee440f7b979736f84843cc0437504fedb69ffb6e4664736f6c63430008110033c3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62

Deployed Bytecode

0x60806040526004361061022f5760003560e01c8063715018a61161012e578063be2c2f14116100ab578063f242432a1161006f578063f242432a146106fd578063f2fde38b1461071d578063f89d40861461073d578063fca16c3b14610752578063fe0474a61461077257600080fd5b8063be2c2f1414610632578063c9710fb214610652578063d9cbf77514610672578063e985e9c514610688578063f23a6e61146106d157600080fd5b80639c8f9f23116100f25780639c8f9f231461056d5780639cd441da1461058d578063a22cb465146105a0578063bc197c81146105c0578063bd85b0391461060557600080fd5b8063715018a6146105155780638b7f54cd1461052a5780638da5cb5b1461053257806395d89b411461055057806399f4b2511461056557600080fd5b80632a55205a116101bc5780634e1273f4116101805780634e1273f4146104665780634f558e791461049357806351cff8d9146104c25780636ee8e134146104e2578063706182551461050257600080fd5b80632a55205a1461038d5780632eb2c2d6146103cc57806333c81390146103ec57806341f434341461040c57806344004cc11461044657600080fd5b80630b027d40116102035780630b027d40146102e95780630e89341c1461030b5780631119d1141461032b578063171d0c2f1461034b5780631a6204af1461036d57600080fd5b8062fdd58e1461023457806301ffc9a71461026757806306fdde03146102975780630902f1ac146102b9575b600080fd5b34801561024057600080fd5b5061025461024f366004613bf8565b61078a565b6040519081526020015b60405180910390f35b34801561027357600080fd5b50610287610282366004613c38565b610823565b604051901515815260200161025e565b3480156102a357600080fd5b506102ac61082e565b60405161025e9190613ca5565b3480156102c557600080fd5b506102ce6108bc565b6040805193845260208401929092529082015260600161025e565b3480156102f557600080fd5b50610309610304366004613cb8565b61092b565b005b34801561031757600080fd5b506102ac610326366004613cda565b610a70565b34801561033757600080fd5b50610309610346366004613cda565b610bb2565b34801561035757600080fd5b50610360610ce7565b60405161025e9190613cf3565b34801561037957600080fd5b50610309610388366004613cda565b610dfb565b34801561039957600080fd5b506103ad6103a8366004613cb8565b610e92565b604080516001600160a01b03909316835260208301919091520161025e565b3480156103d857600080fd5b506103096103e7366004613e8a565b610f3e565b3480156103f857600080fd5b50610309610407366004613cda565b610f6d565b34801561041857600080fd5b5061042e6daaeb6d7670e522a718067333cd4e81565b6040516001600160a01b03909116815260200161025e565b34801561045257600080fd5b50610309610461366004613f34565b611009565b34801561047257600080fd5b50610486610481366004613f70565b6110be565b60405161025e9190614076565b34801561049f57600080fd5b506102876104ae366004613cda565b600090815260036020526040902054151590565b3480156104ce57600080fd5b506103096104dd366004614089565b6111e8565b3480156104ee57600080fd5b506102546104fd3660046140a4565b6112bf565b610309610510366004613cda565b611368565b34801561052157600080fd5b50610309611443565b610309611457565b34801561053e57600080fd5b506007546001600160a01b031661042e565b34801561055c57600080fd5b506102ac6114d1565b6103096114de565b34801561057957600080fd5b50610309610588366004613cda565b611601565b61030961059b366004613cb8565b6116e5565b3480156105ac57600080fd5b506103096105bb3660046140de565b6119ec565b3480156105cc57600080fd5b506105ec6105db366004613e8a565b63bc197c8160e01b95945050505050565b6040516001600160e01b0319909116815260200161025e565b34801561061157600080fd5b50610254610620366004613cda565b60009081526003602052604090205490565b34801561063e57600080fd5b5061030961064d366004613cda565b611a00565b34801561065e57600080fd5b5061025461066d366004613cb8565b611a4a565b34801561067e57600080fd5b50610254600b5481565b34801561069457600080fd5b506102876106a3366004614115565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b3480156106dd57600080fd5b506105ec6106ec366004614148565b63f23a6e6160e01b95945050505050565b34801561070957600080fd5b50610309610718366004614148565b611ad8565b34801561072957600080fd5b50610309610738366004614089565b611aff565b34801561074957600080fd5b50610254611b75565b34801561075e57600080fd5b5061025461076d3660046140a4565b611b93565b34801561077e57600080fd5b506102546305f5e10081565b60006001600160a01b0383166107fa5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600061081d82611dc7565b600e805461083b906141ad565b80601f0160208091040260200160405190810160405280929190818152602001828054610867906141ad565b80156108b45780601f10610889576101008083540402835291602001916108b4565b820191906000526020600020905b81548152906001019060200180831161089757829003601f168201915b505050505081565b600d54600090819081906108da906001600160a01b0316600361078a565b600b54600d546108f491906001600160a01b0316316141f7565b600460005260036020527f83ec6a1f0257b830b5e016457c9cf1435391bf56cc98f369a58a54fe9377246554925092509250909192565b610933611dec565b60008061093e6108bc565b50915091508361094f33600261078a565b101561096d5760405162461bcd60e51b81526004016107f19061420a565b8261097933600361078a565b10156109975760405162461bcd60e51b81526004016107f190614232565b83156109de576109a933600286611e45565b600d546109de906001600160a01b031660036109c96305f5e1008861425a565b60405180602001604052806000815250611fd5565b610a1033600d60009054906101000a90046001600160a01b0316600386604051806020016040528060008152506120ef565b336108fc610a3785610a266305f5e1008961425a565b610a309190614271565b85856112bf565b6040518115909202916000818181858888f19350505050158015610a5f573d6000803e3d6000fd5b505050610a6c6001600655565b5050565b60606000600c8381548110610a8757610a87614284565b906000526020600020018054610a9c906141ad565b80601f0160208091040260200160405190810160405280929190818152602001828054610ac8906141ad565b8015610b155780601f10610aea57610100808354040283529160200191610b15565b820191906000526020600020905b815481529060010190602001808311610af857829003601f168201915b5050505050905060006040518060400160405280601a81526020017f412066756e6769626c65204552432d3131353520746f6b656e2e0000000000008152509050610b8a8282610b64876122dc565b604051602001610b76939291906142b6565b604051602081830303815290604052612c4b565b604051602001610b9a9190614357565b60405160208183030381529060405292505050919050565b610bba611dec565b600080610bc56108bc565b5090925090506000610c0084610bdc8560c861425a565b610be6919061425a565b610bf086856141f7565b610bfb9060c761425a565b612d9e565b905080610c0e33600361078a565b10610c4a57610c4533600d60009054906101000a90046001600160a01b0316600384604051806020016040528060008152506120ef565b610ca9565b610c573360026001611e45565b610c773360036305f5e10060405180602001604052806000815250611fd5565b610ca933600d60009054906101000a90046001600160a01b0316600384604051806020016040528060008152506120ef565b604051339085156108fc029086906000818181858888f19350505050158015610cd6573d6000803e3d6000fd5b50505050610ce46001600655565b50565b610d196040518060a0016040528060008152602001600081526020016000815260200160008152602001606081525090565b6008548152610d26611b75565b6020820152600854610d3a610400826143b2565b610d45906001614271565b610d519061040061425a565b610d5b91906141f7565b6040820152600a5460608201819052600260005260036020527fc3a24b0501bd2c13a7e57f2db4369ec4c223447539fc0724a9d55ac4a06ebd4d54610df39190610da9906305f5e10061425a565b600360008190526020527fcbc4e5fb02c3d1de23a9f1e014b4d2ee5aeaea9505df5e855c9210bf472495af54610ddf9190614271565b610de991906141f7565b6305f5e100612dda565b608082015290565b610e03611dec565b6000610e1033600061078a565b11610e835760405162461bcd60e51b815260206004820152603760248201527f4e65656420746f206f776e2074686520737461747573204e465420746f20636860448201527f616e67652074686520656c65637472696369747946656500000000000000000060648201526084016107f1565b6009819055610ce46001600655565b60008281526005602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610f075750604080518082019091526004546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610f26906001600160601b03168761425a565b610f3091906143b2565b915196919550909350505050565b846001600160a01b0381163314610f5857610f5833612f09565b610f658686868686612fc2565b505050505050565b80610f7933600361078a565b1015610f975760405162461bcd60e51b81526004016107f190614232565b610fa56305f5e100826143c6565b15610fe95760405162461bcd60e51b8152602060048201526014602482015273139bdd08185d985a5b18589b1948185b5bdd5b9d60621b60448201526064016107f1565b610ff533600383611e45565b610ce43360026109c96305f5e100856143b2565b611011611dec565b600061101e84600061078a565b1161103b5760405162461bcd60e51b81526004016107f1906143da565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820183905283169063a9059cbb906044016020604051808303816000875af115801561108a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ae9190614430565b506110b96001600655565b505050565b606081518351146111235760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016107f1565b6000835167ffffffffffffffff81111561113f5761113f613d3e565b604051908082528060200260200182016040528015611168578160200160208202803683370190505b50905060005b84518110156111e0576111b385828151811061118c5761118c614284565b60200260200101518583815181106111a6576111a6614284565b602002602001015161078a565b8282815181106111c5576111c5614284565b60209081029190910101526111d98161444d565b905061116e565b509392505050565b6111f0611dec565b60006111fd82600061078a565b1161121a5760405162461bcd60e51b81526004016107f1906143da565b600b546040516000916001600160a01b038416918381818185875af1925050503d8060008114611266576040519150601f19603f3d011682016040523d82523d6000602084013e61126b565b606091505b50506000600b559050806112b45760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b60448201526064016107f1565b50610ce46001600655565b600080831180156112d05750600082115b61131c5760405162461bcd60e51b815260206004820152601d60248201527f45786368616e6765206572726f723a20454d5054595f5245534552564500000060448201526064016107f1565b60006113298560c761425a565b90506000611337848361425a565b90506000826113478760c861425a565b6113519190614271565b905061135d81836143b2565b979650505050505050565b611370611dec565b60008061137b6108bc565b50909250905061138b34826141f7565b905060006113b28261139e8660c861425a565b6113a8919061425a565b610bf086866141f7565b9050803410156113f55760405162461bcd60e51b815260206004820152600e60248201526d08ae8d040dcdee840cadcdeeaced60931b60448201526064016107f1565b336108fc61140383346141f7565b6040518115909202916000818181858888f1935050505015801561142b573d6000803e3d6000fd5b50611436843361300e565b505050610ce46001600655565b61144b613093565b61145560006130ed565b565b61145f611dec565b60008061146a6108bc565b50909250905061147a34826141f7565b90506114c561148a3460c761425a565b6114958360c861425a565b61149f9190614271565b836114ab3460c761425a565b6114b5919061425a565b6114bf91906143b2565b3361300e565b50506114556001600655565b600f805461083b906141ad565b6114e6611dec565b6009543410156115445760405162461bcd60e51b815260206004820152602360248201527f596f75207061792074686520656c6563747269636974792c20646f6e277420796044820152626f753f60e81b60648201526084016107f1565b600954600b60008282546115589190614271565b909155505060085461156d906120009061425a565b4310156115bc5760405162461bcd60e51b815260206004820152601c60248201527f4e65787420626c6f636b206e6f7420617661696c61626c65207965740000000060448201526064016107f1565b600880549060006115cc8361444d565b919050555060006115db611b75565b90506115f1336003600a54846109c99190614271565b506000600a556114556001600655565b611609611dec565b60008060006116166108bc565b9250925092508361162833600461078a565b10156116665760405162461bcd60e51b815260206004820152600d60248201526c098a040dcdee840cadcdeeaced609b1b60448201526064016107f1565b61167233600486611e45565b60008161167f868661425a565b61168991906143b2565b9050611695813361300e565b336108fc836116a4888761425a565b6116ae91906143b2565b6040518115909202916000818181858888f193505050501580156116d6573d6000803e3d6000fd5b5050505050610ce46001600655565b6116ed611dec565b816116f933600261078a565b10156117175760405162461bcd60e51b81526004016107f19061420a565b8061172333600361078a565b10156117415760405162461bcd60e51b81526004016107f190614232565b600080600061174e6108bc565b925092509250806000036118a757600034116117ca5760405162461bcd60e51b815260206004820152603560248201527f596f75206e65656420746f2061646420626f7468204254432f53415420616e6460448201527420455448206174207468652073616d652074696d6560581b60648201526084016107f1565b84156117fc576117dc33600287611e45565b600d546117fc906001600160a01b031660036109c96305f5e1008961425a565b83156118345761183433600d60009054906101000a90046001600160a01b0316600387604051806020016040528060008152506120ef565b6402540be4006118773360048361186d348a6118546305f5e1008e61425a565b61185e9190614271565b611868919061425a565b61313f565b6109c991906141f7565b600d546040805160208101909152600081526118a1916001600160a01b0316906004908490611fd5565b50610a5f565b6118b134836141f7565b915060006118e1856118c76305f5e1008961425a565b6118d19190614271565b6118db908561425a565b85612d9e565b9050803410156119245760405162461bcd60e51b815260206004820152600e60248201526d08ae8d040dcdee840cadcdeeaced60931b60448201526064016107f1565b336108fc61193283346141f7565b6040518115909202916000818181858888f1935050505015801561195a573d6000803e3d6000fd5b50851561198d5761196d33600288611e45565b600d5461198d906001600160a01b031660036109c96305f5e1008a61425a565b84156119c5576119c533600d60009054906101000a90046001600160a01b0316600388604051806020016040528060008152506120ef565b6119de3360046109c984896118546305f5e1008d61425a565b50505050610a6c6001600655565b816119f681612f09565b6110b98383613198565b80611a0c33600261078a565b1015611a2a5760405162461bcd60e51b81526004016107f19061420a565b611a3633600283611e45565b610ce43360036109c96305f5e1008561425a565b600080600080611a586108bc565b92509250925060008111611aae5760405162461bcd60e51b815260206004820152601860248201527f506f6f6c206e6565647320746f2062652063726561746564000000000000000060448201526064016107f1565b600085611abf6305f5e1008961425a565b611ac99190614271565b905061135d6118db828561425a565b846001600160a01b0381163314611af257611af233612f09565b610f6586868686866131a3565b611b07613093565b6001600160a01b038116611b6c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107f1565b610ce4816130ed565b6000610400600854611b8791906143b2565b63035c8ac4901c905090565b60008083118015611ba45750600082115b611bf05760405162461bcd60e51b815260206004820152601d60248201527f45786368616e6765206572726f723a20454d5054595f5245534552564500000060448201526064016107f1565b6000611bfc858561425a565b611c079060c861425a565b90506000611c1586856141f7565b611c209060c761425a565b9050611c2c8282612d9e565b9695505050505050565b6001600160a01b038516611cbd5760005b8351811015611cbb57828181518110611c6257611c62614284565b602002602001015160036000868481518110611c8057611c80614284565b602002602001015181526020019081526020016000206000828254611ca59190614271565b90915550611cb490508161444d565b9050611c47565b505b6001600160a01b038416610f655760005b8351811015611daf576000848281518110611ceb57611ceb614284565b602002602001015190506000848381518110611d0957611d09614284565b6020026020010151905060006003600084815260200190815260200160002054905081811015611d8c5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b60648201526084016107f1565b60009283526003602052604090922091039055611da88161444d565b9050611cce565b50505050505050565b6001600160a01b03163b151590565b60006001600160e01b0319821663152a902d60e11b148061081d575061081d826131e8565b600260065403611e3e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107f1565b6002600655565b6001600160a01b038316611ea75760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016107f1565b336000611eb38461320d565b90506000611ec08461320d565b9050611ee083876000858560405180602001604052806000815250613258565b6000858152602081815260408083206001600160a01b038a16845290915290205484811015611f5d5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016107f1565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052611daf565b6001600160a01b0384166120355760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016107f1565b3360006120418561320d565b9050600061204e8561320d565b905061205f83600089858589613258565b6000868152602081815260408083206001600160a01b038b1684529091528120805487929061208f908490614271565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611daf836000898989896134d7565b6001600160a01b0384166121155760405162461bcd60e51b81526004016107f190614466565b3360006121218561320d565b9050600061212e8561320d565b905061213e838989858589613258565b6000868152602081815260408083206001600160a01b038c16845290915281205482519091839161217157612171614284565b60200260200101518110156121985760405162461bcd60e51b81526004016107f1906144ab565b816000815181106121ab576121ab614284565b602090810291909101810151600089815280835260408082206001600160a01b038e168352909352918220908303905582518391906121ec576121ec614284565b602090810291909101810151600089815280835260408082206001600160a01b038d168352909352918220805491929091612228908490614271565b92505081905550876001600160a01b0316896001600160a01b0316856001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8660008151811061228257612282614284565b60200260200101516040516122a1929190918252602082015260400190565b60405180910390a46122d1848a8a8a866000815181106122c3576122c3614284565b60200260200101518a6134d7565b505050505050505050565b6060816127505760006122ed610ce7565b90506127296123576040518060400160405280600e81526020016d0213637b1b590373ab6b132b91d160951b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001601960f91b8152506001613632565b6123bc6040518060400160405280600e81526020016d0213637b1b5903932bbb0b9321d160951b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001603360f81b8152506001613632565b6124216040518060400160405280600e81526020016d02732bc3a103430b63b34b7339d160951b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001601b60f91b8152506001613632565b61248a6040518060400160405280601281526020017102a3930b739b0b1ba34b7b7103332b2b99d160751b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001600d60fa1b8152506001613632565b6124e960405180604001604052806008815260200167029bab838363c9d160c51b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001603560f81b8152506001613632565b6040516020016124fd9594939291906144f5565b60405160208183030381529060405261255761251c84600001516136a8565b604051806040016040528060018152602001603960f81b815250604051806040016040528060018152602001601960f91b8152506000613632565b6125c161256785602001516136a8565b6040516020016125779190614560565b604051602081830303815290604052604051806040016040528060018152602001603960f81b815250604051806040016040528060018152602001603360f81b8152506000613632565b61262b6125d186604001516136a8565b6040516020016125e19190614588565b604051602081830303815290604052604051806040016040528060018152602001603960f81b815250604051806040016040528060018152602001601b60f91b8152506000613632565b61269561263b87606001516136a8565b60405160200161264b9190614560565b604051602081830303815290604052604051806040016040528060018152602001603960f81b815250604051806040016040528060018152602001600d60fa1b8152506000613632565b6126f787608001516040516020016126ad91906145b5565b604051602081830303815290604052604051806040016040528060018152602001603960f81b815250604051806040016040528060018152602001603560f81b8152506000613632565b60405160200161270b9594939291906144f5565b60408051601f1981840301815290829052610b7692916020016145dd565b604051602001612739919061485b565b604051602081830303815290604052915050919050565b60018203612b7357600d54600090612772906001600160a01b0316600361078a565b600b54600d5491925060009161279291906001600160a01b0316316141f7565b905080156127a057806127aa565b670de0b6b3a76400005b90506060826000036127d6576040518060800160405280605b8152602001615119605b91399050612b36565b6128386040518060400160405280600b81526020016a2837b7b632b21029a0aa1d60a91b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001601960f91b8152506001613632565b61289a6040518060400160405280600b81526020016a2837b7b632b21029a0aa1d60a91b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001603360f81b8152506001613632565b6128fc6040518060400160405280600b81526020016a2837b7b632b21022aa241d60a91b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001600d60fa1b8152506001613632565b61295a604051806040016040528060078152602001663120455448203d60c81b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001603560f81b8152506001613632565b6129b8604051806040016040528060078152602001663120425443203d60c81b815250604051806040016040528060018152602001603160f81b815250604051806040016040528060018152602001601b60f91b8152506001613632565b6040516020016129cc9594939291906144f5565b604051602081830303815290604052612a416129e7856136a8565b6040516020016129f79190614560565b604051602081830303815290604052604051806040016040528060018152602001603960f81b815250604051806040016040528060018152602001601960f91b8152506000613632565b612a62612a52866305f5e100612dda565b60405160200161257791906145b5565b612a87612a7786670de0b6b3a7640000612dda565b60405160200161264b91906148a0565b612ab5612aa5612a9f89670de0b6b3a764000061425a565b88612dda565b6040516020016126ad9190614560565b612af2612ae2670de0b6b3a7640000612ad26305f5e1008b61425a565b612adc91906143b2565b8a612dda565b6040516020016125e191906148a0565b604051602001612b069594939291906144f5565b60408051601f1981840301815290829052612b2492916020016148c8565b60405160208183030381529060405290505b612b4a81604051602001610b7691906148f7565b604051602001612b5a919061485b565b6040516020818303038152906040529350505050919050565b6040805160c081018252600060a0820181815282528251602081810185529181528183015282518084018452600580825264312042544360d81b828401528385019190915283518085018552818152640c4814d05560da1b81840152606084015283518085019094526004845263031204c560e41b918401919091526080820192909252612c209184908110612c0b57612c0b614284565b6020020151604051602001610b769190614b6a565b604051602001612c30919061485b565b6040516020818303038152906040529050919050565b919050565b60608151600003612c6a57505060408051602081019091526000815290565b60006040518060600160405280604081526020016151746040913990506000600384516002612c999190614271565b612ca391906143b2565b612cae90600461425a565b67ffffffffffffffff811115612cc657612cc6613d3e565b6040519080825280601f01601f191660200182016040528015612cf0576020820181803683370190505b509050600182016020820185865187015b80821015612d5c576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250612d01565b5050600386510660018114612d785760028114612d8b57612d93565b603d6001830353603d6002830353612d93565b603d60018303535b509195945050505050565b6000612daa82846143c6565b15612dc957612db982846143b2565b612dc4906001614271565b612dd3565b612dd382846143b2565b9392505050565b606081600003612de957600191505b6000612df583856143b2565b90506000612e056103e8856143b2565b612e0f858461425a565b612e1990876141f7565b612e2391906143b2565b90506000821180612e345750600081115b15612ee657612e42826136a8565b60648210612e5f5760405180602001604052806000815250612e7a565b604051806040016040528060018152602001600360fc1b8152505b600a8310612e975760405180602001604052806000815250612eb2565b604051806040016040528060018152602001600360fc1b8152505b612ebb846136a8565b604051602001612ece9493929190614d33565b6040516020818303038152906040529250505061081d565b604051806040016040528060018152602001600360fc1b8152509250505061081d565b6daaeb6d7670e522a718067333cd4e3b15610ce457604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f9a9190614430565b610ce457604051633b79c77360e21b81526001600160a01b03821660048201526024016107f1565b6001600160a01b038516331480612fde5750612fde85336106a3565b612ffa5760405162461bcd60e51b81526004016107f190614d9d565b613007858585858561373b565b5050505050565b6305f5e100821061305d5761302d8160026109c96305f5e100866143b2565b600d5461305d906001600160a01b031660036305f5e10061304e81876143b2565b613058919061425a565b611e45565b600d54610a6c906001600160a01b031682600361307e6305f5e100876143c6565b604051806020016040528060008152506120ef565b6007546001600160a01b031633146114555760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f1565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080600261314f846001614271565b61315991906143b2565b90508291505b818110156131925790508060028161317781866143b2565b6131819190614271565b61318b91906143b2565b905061315f565b50919050565b610a6c33838361391e565b6001600160a01b0385163314806131bf57506131bf85336106a3565b6131db5760405162461bcd60e51b81526004016107f190614d9d565b61300785858585856120ef565b60006001600160e01b03198216630271189760e51b148061081d575061081d826139fe565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061324757613247614284565b602090810291909101015292915050565b846001600160a01b0316866001600160a01b031614801561328157506001600160a01b03841615155b801561329b5750600d546001600160a01b03858116911614155b156134c957825160008181805b875181101561339d5760038882815181106132c5576132c5614284565b602002602001015103613321578094508681815181106132e7576132e7614284565b6020026020010151846132fa9190614271565b9350600087828151811061331057613310614284565b60200260200101818152505061338d565b600288828151811061333557613335614284565b60200260200101510361338d5780925086818151811061335757613357614284565b60200260200101518261336a9190614271565b9150600087828151811061338057613380614284565b6020026020010181815250505b6133968161444d565b90506132a8565b506133a989600361078a565b6133b4600a85614271565b116133cb576133c6896003600a611e45565b61345d565b600a83106133f2576133e0896003600a611e45565b6133eb89600361078a565b925061345d565b806133fe8a600261078a565b1115613426576134118960026001611e45565b6133c68960036109c9600a6305f5e1006141f7565b6134338960026001611e45565b61343e6001826141f7565b90508651840361345d5761345d8860036109c9600a6305f5e1006141f7565b86518414613485578286858151811061347857613478614284565b6020026020010181815250505b865182146134ad57808683815181106134a0576134a0614284565b6020026020010181815250505b600a8060008282546134bf9190614271565b9091555050505050505b610f65868686868686611c36565b6001600160a01b0384163b15610f655760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061351b9089908990889088908890600401614deb565b6020604051808303816000875af1925050508015613556575060408051601f3d908101601f1916820190925261355391810190614e25565b60015b61360257613562614e42565b806308c379a00361359b5750613576614e5e565b80613581575061359d565b8060405162461bcd60e51b81526004016107f19190613ca5565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016107f1565b6001600160e01b0319811663f23a6e6160e01b14611daf5760405162461bcd60e51b81526004016107f190614ee8565b606083838361365a57604051806040016040528060018152602001606560f81b815250613675565b604051806040016040528060018152602001607360f81b8152505b8787878860405160200161368f9796959493929190614f30565b6040516020818303038152906040529050949350505050565b606060006136b583613a4e565b600101905060008167ffffffffffffffff8111156136d5576136d5613d3e565b6040519080825280601f01601f1916602001820160405280156136ff576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461370957509392505050565b815183511461379d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016107f1565b6001600160a01b0384166137c35760405162461bcd60e51b81526004016107f190614466565b336137d2818787878787613258565b60005b84518110156138b85760008582815181106137f2576137f2614284565b60200260200101519050600085838151811061381057613810614284565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156138605760405162461bcd60e51b81526004016107f1906144ab565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061389d908490614271565b92505081905550505050806138b19061444d565b90506137d5565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161390892919061508c565b60405180910390a4610f65818787878787613b26565b816001600160a01b0316836001600160a01b0316036139915760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016107f1565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60006001600160e01b03198216636cdb3d1360e11b1480613a2f57506001600160e01b031982166303a24d0760e21b145b8061081d57506301ffc9a760e01b6001600160e01b031983161461081d565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310613a8d5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613ab9576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310613ad757662386f26fc10000830492506010015b6305f5e1008310613aef576305f5e100830492506008015b6127108310613b0357612710830492506004015b60648310613b15576064830492506002015b600a831061081d5760010192915050565b6001600160a01b0384163b15610f655760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613b6a90899089908890889088906004016150ba565b6020604051808303816000875af1925050508015613ba5575060408051601f3d908101601f19168201909252613ba291810190614e25565b60015b613bb157613562614e42565b6001600160e01b0319811663bc197c8160e01b14611daf5760405162461bcd60e51b81526004016107f190614ee8565b80356001600160a01b0381168114612c4657600080fd5b60008060408385031215613c0b57600080fd5b613c1483613be1565b946020939093013593505050565b6001600160e01b031981168114610ce457600080fd5b600060208284031215613c4a57600080fd5b8135612dd381613c22565b60005b83811015613c70578181015183820152602001613c58565b50506000910152565b60008151808452613c91816020860160208601613c55565b601f01601f19169290920160200192915050565b602081526000612dd36020830184613c79565b60008060408385031215613ccb57600080fd5b50508035926020909101359150565b600060208284031215613cec57600080fd5b5035919050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526000608083015160a080840152613d3660c0840182613c79565b949350505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715613d7a57613d7a613d3e565b6040525050565b600067ffffffffffffffff821115613d9b57613d9b613d3e565b5060051b60200190565b600082601f830112613db657600080fd5b81356020613dc382613d81565b604051613dd08282613d54565b83815260059390931b8501820192828101915086841115613df057600080fd5b8286015b84811015613e0b5780358352918301918301613df4565b509695505050505050565b600082601f830112613e2757600080fd5b813567ffffffffffffffff811115613e4157613e41613d3e565b604051613e58601f8301601f191660200182613d54565b818152846020838601011115613e6d57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215613ea257600080fd5b613eab86613be1565b9450613eb960208701613be1565b9350604086013567ffffffffffffffff80821115613ed657600080fd5b613ee289838a01613da5565b94506060880135915080821115613ef857600080fd5b613f0489838a01613da5565b93506080880135915080821115613f1a57600080fd5b50613f2788828901613e16565b9150509295509295909350565b600080600060608486031215613f4957600080fd5b613f5284613be1565b9250613f6060208501613be1565b9150604084013590509250925092565b60008060408385031215613f8357600080fd5b823567ffffffffffffffff80821115613f9b57600080fd5b818501915085601f830112613faf57600080fd5b81356020613fbc82613d81565b604051613fc98282613d54565b83815260059390931b8501820192828101915089841115613fe957600080fd5b948201945b8386101561400e57613fff86613be1565b82529482019490820190613fee565b9650508601359250508082111561402457600080fd5b5061403185828601613da5565b9150509250929050565b600081518084526020808501945080840160005b8381101561406b5781518752958201959082019060010161404f565b509495945050505050565b602081526000612dd3602083018461403b565b60006020828403121561409b57600080fd5b612dd382613be1565b6000806000606084860312156140b957600080fd5b505081359360208301359350604090920135919050565b8015158114610ce457600080fd5b600080604083850312156140f157600080fd5b6140fa83613be1565b9150602083013561410a816140d0565b809150509250929050565b6000806040838503121561412857600080fd5b61413183613be1565b915061413f60208401613be1565b90509250929050565b600080600080600060a0868803121561416057600080fd5b61416986613be1565b945061417760208701613be1565b93506040860135925060608601359150608086013567ffffffffffffffff8111156141a157600080fd5b613f2788828901613e16565b600181811c908216806141c157607f821691505b60208210810361319257634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561081d5761081d6141e1565b6020808252600e908201526d084a88640dcdee840cadcdeeaced60931b604082015260600190565b6020808252600e908201526d0a682a840dcdee840cadcdeeaced60931b604082015260600190565b808202811582820484141761081d5761081d6141e1565b8082018082111561081d5761081d6141e1565b634e487b7160e01b600052603260045260246000fd5b600081516142ac818560208601613c55565b9290920192915050565b683d913730b6b2911d1160b91b815283516000906142db816009850160208901613c55565b72111610113232b9b1b934b83a34b7b7111d101160691b600991840191820152845161430e81601c840160208901613c55565b6b1116101134b6b0b3b2911d1160a11b601c9290910191820152835161433b816028840160208801613c55565b61227d60f01b60289290910191820152602a0195945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161438f81601d850160208701613c55565b91909101601d0192915050565b634e487b7160e01b600052601260045260246000fd5b6000826143c1576143c161439c565b500490565b6000826143d5576143d561439c565b500690565b60208082526036908201527f4e65656420746f206f776e2074686520737461747573204e465420746f20636c60408201527561696d2074686520656c65637472696369747946656560501b606082015260800190565b60006020828403121561444257600080fd5b8151612dd3816140d0565b60006001820161445f5761445f6141e1565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008651614507818460208b01613c55565b86519083019061451b818360208b01613c55565b865191019061452e818360208a01613c55565b8551910190614541818360208901613c55565b8451910190614554818360208801613c55565b01979650505050505050565b60008251614572818460208701613c55565b630814d05560e21b920191825250600401919050565b6000825161459a818460208701613c55565b6820626c6f636b28732960b81b920191825250600901919050565b600082516145c7818460208701613c55565b632042544360e01b920191825250600401919050565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f737667222077696474683d223130302522206865696768743d2231303060208201527f2522207072657365727665417370656374526174696f3d22784d696e594d696e60408201527f206d656574222076696577426f783d223020302033353020333530223e203c7360608201527f74796c653e2e62207b666f6e742d66616d696c793a2068656c7665746963613b60808201527f20666f6e742d73697a653a20313670783b20646f6d696e616e742d626173656c60a08201527f696e653a20626f74746f6d3b7d2e73207b2066696c6c3a20234630413841413b60c08201527f20746578742d616e63686f723a2073746172743b7d202e65207b66696c6c3a2060e08201527f234535453644393b20746578742d616e63686f723a20656e643b7d3c2f7374796101008201527f6c653e203c726563742077696474683d223130302522206865696768743d22316101208201527f303025222066696c6c3d222332463244333022202f3e3c7465787420783d22356101408201527f30252220793d2238252220646f6d696e616e742d626173656c696e653d226d696101608201527f64646c652220746578742d616e63686f723d226d6964646c652220666f6e742d6101808201527f73697a653d2232307078222066696c6c3d22234535453644392220666f6e742d6101a08201527f66616d696c793d2268656c766574696361223e436861696e207374617475733c6101c08201526517ba32bc3a1f60d11b6101e0820152600061484461483e6101e684018661429a565b8461429a565b651e17b9bb339f60d11b8152600601949350505050565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c00000000000081526000825161489381601a850160208701613c55565b91909101601a0192915050565b600082516148b2818460208701613c55565b630408aa8960e31b920191825250600401919050565b600083516148da818460208801613c55565b8351908301906148ee818360208801613c55565b01949350505050565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f737667222077696474683d223130302522206865696768743d2231303060208201527f2522207072657365727665417370656374526174696f3d22784d696e594d696e60408201527f206d656574222076696577426f783d223020302033353020333530223e203c7360608201527f74796c653e2e62207b666f6e742d66616d696c793a2068656c7665746963613b60808201527f20666f6e742d73697a653a20313670783b20646f6d696e616e742d626173656c60a08201527f696e653a20626f74746f6d3b7d2e73207b2066696c6c3a20234630413841413b60c08201527f20746578742d616e63686f723a2073746172743b7d202e65207b66696c6c3a2060e08201527f234535453644393b20746578742d616e63686f723a20656e643b7d3c2f7374796101008201527f6c653e203c726563742077696474683d223130302522206865696768743d22316101208201527f303025222066696c6c3d222332463244333022202f3e3c7465787420783d22356101408201527f30252220793d2238252220646f6d696e616e742d626173656c696e653d226d696101608201527f64646c652220746578742d616e63686f723d226d6964646c652220666f6e742d6101808201527f73697a653d2232307078222066696c6c3d22234535453644392220666f6e742d6101a08201527f66616d696c793d2268656c766574696361223e53776170207374617475733c2f6101c0820152643a32bc3a1f60d91b6101e08201526000614b546101e583018461429a565b651e17b9bb339f60d11b81526006019392505050565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f737667222077696474683d223130302522206865696768743d2231303060208201527f2522207072657365727665417370656374526174696f3d22784d696e594d696e60408201527f206d656574222076696577426f783d223020302033353020333530223e203c7360608201527f74796c653e2e73207b2066696c6c3a20234646464646463b20666f6e742d666160808201527f6d696c793a2068656c7665746963613b20666f6e742d73697a653a203234707860a08201527f3b20646f6d696e616e742d626173656c696e653a20626f74746f6d3b2074657860c08201527f742d616e63686f723a206d6964646c653b7d203c2f7374796c653e203c72656360e08201527f742077696474683d223130302522206865696768743d2231303025222066696c6101008201526d361e91119818181818181110179f60911b6101208201527f3c7465787420783d223530252220793d223530252220636c6173733d2273223e61012e8201526000614d0d61014e83018461429a565b661e17ba32bc3a1f60c91b8152651e17b9bb339f60d11b6007820152600d019392505050565b60008551614d45818460208a01613c55565b601760f91b9083019081528551614d63816001840160208a01613c55565b8551910190614d79816001840160208901613c55565b8451910190614d8f816001840160208801613c55565b016001019695505050505050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061135d90830184613c79565b600060208284031215614e3757600080fd5b8151612dd381613c22565b600060033d1115614e5b5760046000803e5060005160e01c5b90565b600060443d1015614e6c5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715614e9c57505050505090565b8285019150815181811115614eb45750505050505090565b843d8701016020828501011115614ece5750505050505090565b614edd60208286010187613d54565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b69101e3a32bc3a103c1e9160b11b815287516000906020614f5782600a8601838e01613c55565b66181291103c9e9160c91b600a928501928301528951614f7d8160118501848e01613c55565b6c01812911031b630b9b99e91311609d1b601193909101928301528851614faa81601e8501848d01613c55565b61111f60f11b601e93909101928301528751614fcb81838501848c01613c55565b711e17ba32bc3a1f101e3634b732903c189e9160711b92019081019190915261507e61504361503d61502061501a615006603287018c61429a565b67181291103c989e9160c11b815260080190565b8961429a565b70189291103c191e911c981291103c991e9160791b815260110190565b8661429a565b7f312522207374726f6b653d222341324343443622207374726f6b652d77696474815268341e9118b83c11179f60b91b602082015260290190565b9a9950505050505050505050565b60408152600061509f604083018561403b565b82810360208401526150b1818561403b565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906150e69083018661403b565b82810360608401526150f8818661403b565b9050828103608084015261510c8185613c79565b9897505050505050505056fe3c7465787420783d223530252220793d223530252220746578742d616e63686f723d226d6964646c65222066696c6c3d22234630413841412220636c6173733d2262223e4e6f206c6971756964697479207965743c2f746578743e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212200aa56bf07c7651a310f179ee440f7b979736f84843cc0437504fedb69ffb6e4664736f6c63430008110033

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

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