ETH Price: $2,479.63 (-0.79%)

Token

WRAPPED REAPER (WRG)
 

Overview

Max Total Supply

0.00000000000000005 WRG

Holders

32

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
techspec.eth
Balance
0.000000000000000001 WRG
0xeA3246957e3548fAdf56301Af6e020Fa288AF8BA
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
WrappedReaper

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 100000000 runs

Other Settings:
default evmVersion
File 1 of 22 : WrappedReaper.sol
/// SPDX-License-Identifier CC0-1.0
pragma solidity 0.8.17;

import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";

import {IERC4906} from "./IERC4906.sol";
import {IReapersGambit} from "./IReapersGambit.sol";
import {IWrappedReaperRenderer} from "./IWrappedReaperRenderer.sol";

import "./WrappedReaperUtils.sol";

// &&&&&&&&&&&&&&&&&&&&%#%#%%%%%##///*****,,****////((((((#####%%%%%%%%%&&&&&&&&&&&
// &&&&&&&&&&&&&&%%%%##(((((##((*,,..........(,,,,,,**//((((((###%%%%#%%%%%%%%%%&&&
// &&&&&&%&&&%%##((//*,...,,,,,.. c@&*      &&@&......,**////((((####((####%%%%%&&&
// &&&&&&%%%%%%###*,,,.....a@&&@&,(&#/     #@@@@@     ..,,**//////((((((((###%%%%%&
// &&&&&&&&&%%%%#(/*,,..@@ ..   .   &    &@@@@@@@&     ....,,,*****///((((###%%%%%%
// &&&&&&&&&&%%%#((//#&....,,....   &  *&&@@@@@@@@@&   ......,,,,***///(((###%%%%%%
// &&&&&&&&%%%%##((/(,,,,...,,...   & ,@&@@@@@@@@@@@(   .....,,,,***///(((###%%%%%%
// &&&&&&&&%%%%%##((/******,,,,.... &#@@@@@@@@@@@@@@@   ....,,,,***//(((####%%%%%%%
// &&&&&&&&&%%%%%##(((////**,,,,....@@&@@@@@@@@@@@@@@@ ...,,,,**///(((#####%%%%%%%%
// &&&&&&&&&&%%%%%##w((((//***,,,.. @@@&&&@@@@@@@@&@@@@...,,**///(((######%%%%%%%%%
// &&&&&&&&&&&%%%%%####(((//***,,,..&...&&@@@@@@@@&.&@&.,,,**///((((#####%%%%%%%%%&
// &&&&&&&&&&&%%%%%%###((((//***,,,.#...&&@@@@@@@@@#@@&,,,,**///(((((#####%%%%%%%%%
// &&&&&&&&&%%%%%%%####(((///***,,,,,...&@@@@@@@@@@&(@f,,,,****////(((((#####%%%%%%
// &&&&%%%%%%%%####(((((////****,,,, *.,@&@@@@@@@@@&..,,,,,,******/////(((((######%
// %%%%%%#####(((((/////*****,,,,,,..%.&@@@%@@@@@@@@.,,,,,,,,,,,******/////((((((##
// #######(((((////******,,,,,,,,....&&@@@@@@@@@@@@@,,,.,,,,,,,,,,,*****////((((((#
// #####(((((////*****,,,,,,,,,.....@&@@@@@@@@@@@@@&..,...,,,,,,,,,,****/////(((((#
// ######(((((//*****,,,,,,,,....r%#@@@@@&&@&&&&&&%%......,,,,,,,,,*****////(((((##
// #######((((////*****,,,,,....*#,#@@@@&@@&&&&%#%##.......,,,,,,*****///(((((#####
// #######((((((/////****,,,,,,..@@@@&/@&&&&&%%####,,,,.,,,,,***////((((((#####%%%%
// %%%%###########(((((((///*e#%%%%%%%&&&&%%%%%%%#(*****/*/(/((##((((#%%%%%%%%&&&&&
// &&&&&&&&&&&@@@@@&&&&&%%%%%(#####&&&&&@&@@@@@e&&&&&&&&%#&%%#%#%%&&&&&&&&&&&&&@@@@

/// @title WrappedReaper.sol
/// @author unknown
/// @notice Behold, O seeker of arcane wisdom!
///         The enigmatic WrappedReaper grants the mages of minting a sanctuary to safeguard their precious
///         $RG from the clutches of the reaper herself. It bestows upon them the ability to engage in secure exchanges.
///         Yet, lo and behold, in return for these mystical boons, minters must offer up a sacrificial offering,
///         meticulously calculated using the enchanted scythe's bonding curve.
/// @custom:warning This smart contract has **not** been audited. Use at your own risk.
contract WrappedReaper is IERC4906, ERC721, ERC721Enumerable, ReentrancyGuard {

  /// @notice The Bar struct maintains the properties specific to a minted token.
  /// @param minter The address who originally minted the token.
  /// @param mintBlock The block number when the mint occurred.
  /// @param deathBlock The block the number when the minter's fate would be sealed.
  /// @param stake The number of tokens staked inside the bar.
  /// @param blockTimestamp The UNIX timestamp of when the bar was minted.
  struct Bar {
    address minter;
    uint256 mintBlock;
    uint256 deathBlock;
    uint256 stake;
    uint256 blockTimestamp;
  }

  /// @notice The Burn struct captures properties of a burn.
  /// @param burnBlock The block at which the token was burned.
  /// @param stake The amount of $RG which was originally staked.
  struct Burn {
    uint256 burnBlock;
    uint256 stake;
  }

  uint256 private constant _BP = 10000;
  uint256 private constant _GRACE_PERIOD = 64800;
  uint256 private constant _MIN_STAKE =   666_666 * 10 ** WrappedReaperUtils.DECIMALS;   //     666,666 $RG
  uint256 private constant _MAX_STAKE = 100_000_000 * 10 ** WrappedReaperUtils.DECIMALS; // 100,000,000 $RG

  IReapersGambit private immutable _reapersGambit;
  IWrappedReaperRenderer private immutable _wrappedReaperRenderer;

  uint256 private immutable _maxSupply;
  uint256 private immutable _minTaxBasisPoints;
  uint256 private immutable _maxTaxBasisPoints;
  uint256 private immutable _bladeWidth;
  uint256 private immutable _bladeDiscountBasisPoints;

  mapping(uint256 => Bar) private _bars;
  mapping(uint256 => Burn) private _burns;
  uint256 private _nextTokenId;

  /// @notice WrappedReaper constructor.
  /// @param reapersGambit The address of the deployment of ReapersGambit.
  /// @param maxSupply_ The maximum possible circulating supply of the token. Invariant.
  /// @param minTaxBasisPoints__ The absolute minimum tribute which must be paid for a mint.
  /// @param maxTaxBasisPoints__ The absolute maximum tribute which must be paid for a mint.
  /// @param bladeWidth__ The size of the blade of the scythe (#tokens up to maxSupply which receive a discount).
  /// @param bladeDiscountBasisPoints__ The maximum discount that can be applied to minters within the bladeWidth__.
  constructor(
    address reapersGambit,
    address wrappedReaperRenderer,
    uint256 maxSupply_,
    uint256 minTaxBasisPoints__,
    uint256 maxTaxBasisPoints__,
    uint256 bladeWidth__,
    uint256 bladeDiscountBasisPoints__
) ERC721("WRAPPED REAPER", "WRG") {
    require(minTaxBasisPoints__ <= maxTaxBasisPoints__);
    require(bladeWidth__ <= maxSupply_);
    require(bladeDiscountBasisPoints__ <= (maxTaxBasisPoints__ - minTaxBasisPoints__));
    require(_MIN_STAKE >= _BP);
    require(_MIN_STAKE <= _MAX_STAKE);

    _reapersGambit = IReapersGambit(reapersGambit);
    _wrappedReaperRenderer = IWrappedReaperRenderer(wrappedReaperRenderer);
    _maxSupply = maxSupply_;
    _minTaxBasisPoints = minTaxBasisPoints__;
    _maxTaxBasisPoints = maxTaxBasisPoints__;
    _bladeWidth = bladeWidth__;
    _bladeDiscountBasisPoints = bladeDiscountBasisPoints__;

    require(_reapersGambit.approve(address(this), 2**256 - 1));
  }

  /// @notice Use the babylonian method to find the square root of an unsigned integer.
  /// @custom:url https://github.com/Uniswap/v2-core/blob/4dd59067c76dea4a0e8e4bfdda41877a6b16dedc/contracts/libraries/Math.sol#L11
  function sqrt(uint y) internal pure returns (uint z) {
    if (y > 3) {
      z = y;
      uint x = y / 2 + 1;
      while (x < z) {
        z = x;
        x = (y / x + x) / 2;
      }
    } else if (y != 0) {
      z = 1;
    }
  }

  /// @notice Scales an input value as per the specified basis points.
  function costBasis(uint256 value, uint256 basisPoints) public pure returns (uint256) {
    /// @dev Ensure that we don't underflow representation.
    require(value >= _BP);
    // A basis point is a hundredth of a percent. 1% = 100 basis points.
    return (value * basisPoints) / _BP;
  }

  /// @notice Calculates the size of the tribute measured in $RG which must be paid for new mints.
  /// @param currentSupply The current circulating supply of WrappedReaper.
  /// @param stake_ The amount the caller intends to stake.
  /// @return The total price of the mint; this is the base price plus the tribute.
  function scythe(uint256 currentSupply, uint256 stake_) public view returns (uint256) {
    require(currentSupply < _maxSupply, "WRG: supply cap reached");

    /// @dev Defines the token values which lie within the period of linear taxation.
    uint256 handleWidth = _maxSupply - _bladeWidth;

    uint256 maxTax = costBasis(stake_, _maxTaxBasisPoints);
    uint256 minTax = costBasis(stake_, _minTaxBasisPoints);
    uint256 bladeDiscount = costBasis(stake_, _bladeDiscountBasisPoints);

    /// @dev Calculates the linear tax allocation assuming it would go on forever without entering
    ///      the blade of the curve. This makes it capable of expressing values of tax that are larger
    ///      than the specified maximum.
    ///
    ///      Within the handle interval, An a increment of tax is accumulated for each new token identifier,
    ///      making them increasingly more costly to create.
    ///
    ///      This is effectively (currentNumberOfTokens * amountOfLinearTaxToAddPerToken) + minimumTaxPerToken.
    ///
    ///      If there is no handle width, then we assume a cutoff at the maxTax (since this is where the blade
    ///      begins).
    uint256 linearTax = handleWidth > 0
      ? (((maxTax - minTax) * currentSupply) / handleWidth) + minTax
      : maxTax;

    /// @dev Enforces that tax will never exceed the specified maxTax. The only point along the scythe where
    ///      tax values would be computed greater than the maxTax is when the currentSupply exceeds the handle
    ///      width. At this point, we initialize the blade calculation.
    uint256 linearPrice = stake_ + (linearTax < maxTax ? linearTax : maxTax);

    /// @dev If the currentSupply exceeds the handleWidth, we are inside the vicinity of the scythe curve, and can
    ///      start applying price discounts for the length of the blade.
    if (currentSupply > handleWidth)
      /// @dev Assuming a quadratic curve with the formula y = x ** 2, we can interpret the maximum_discount y to
      ///      resolve to an x position of sqrt(y). Taking x to represent a unitless axis, we can transpose increments
      ///      in currentSupply to represent equivalent increments along the x axis. We can therefore calculate the
      ///      equivalent y on the quadratic curve by using this position, which yields the shape of the blade.
      return linearPrice - ((((currentSupply - handleWidth) * sqrt(bladeDiscount)) / _bladeWidth) ** 2);

    /// @dev Returns the linear taxation price.
    return linearPrice;
  }

  function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize)
  internal
  override(ERC721, ERC721Enumerable)
  {
    super._beforeTokenTransfer(from, to, tokenId, batchSize);
  }

  function supportsInterface(bytes4 interfaceId)
  public
  view
  override(IERC165, ERC721, ERC721Enumerable)
  returns (bool)
  {
    /// @custom:url https://eips.ethereum.org/EIPS/eip-4906#reference-implementation
    /// @dev See {IERC165-supportsInterface}.
    return interfaceId == bytes4(0x49064906) || super.supportsInterface(interfaceId);
  }

  /// @notice Mints a WrappedReaper NFT in exchange for the base price and tribute as calculated by
  ///         the scythe curve. The tribute is immediately burned. The price of the NFT is bound
  ///         inside of the token and can be retrieved upon burning the token.
  ///         The scythe curve is a function of the currentSupply; different values of the currentSupply
  ///         will result in different values of tribute required.
  ///         The contract also imposes a maximum limit to the circulating supply of the collection.
  /// @notice Callers must ReapersGambit.approve() the WrappedReaper before attempting to mint.
  /// @param amountToStake The amount of $RG the caller wishes to lock in.
  /// @param maximumPrice Enable frontrun protection for the caller. Here, the caller can specify the maximum
  ///        price to ensure the price of a token remains within a tolerable bound and has not been manipulated
  ///        by searchers in an effort to pay an unexpectedly higher tribute.
  function mint(uint256 amountToStake, uint256 maximumPrice) external nonReentrant returns (bool) {
    uint256 currentSupply = totalSupply();

    require(amountToStake >= _MIN_STAKE && amountToStake <= _MAX_STAKE && amountToStake <= maximumPrice, "WRG: invalid stake");
    require(currentSupply < _maxSupply, "WRG: supply cap reached");

    uint256 total = scythe(currentSupply, amountToStake);
    require(total <= maximumPrice && total >= amountToStake, "WRG: frontrun protection");

    Bar memory bar = Bar(msg.sender, block.number, _reapersGambit.KnowDeath(msg.sender), amountToStake, block.timestamp);

    /// @notice It is possible to attain $RG and mint $WRG within the same block; however, it is not
    ///         possible to transfer $RG from an account that has reached its deathBlock.
    /// @dev We are making a conscious decision here to disable immortal accounts from minting.
    ///      Immortal accounts have a deathBlock of zero.
    require(bar.deathBlock > bar.mintBlock && proximity(bar.deathBlock, bar.mintBlock) <= _GRACE_PERIOD, "cannot escape death");

    _bars[_nextTokenId] = bar;

    /// @dev Ensure the caller has configured a sufficient allowance for this action.
    require(_reapersGambit.allowance(msg.sender, address(this)) >= total, "ERC20: insufficient allowance");

    /// @dev Ensure the caller has sufficient balance for these transactions.
    require(_reapersGambit.balanceOf(msg.sender) >= total, "ERC20: transfer amount exceeds balance");

    /// @notice Transfer the total cost from the caller to this contract.
    /// @dev The caller must have approved a sufficient allowance for this to succeed.
    require(_reapersGambit.transferFrom(msg.sender, address(this), amountToStake), "WRG: failed to transfer");

    /// @notice If the total amount transferred is greater than the price of the token, the caller has
    ///         provided a tribute which must be burned.
    if (total > amountToStake)
      /// @dev Transfers the tribute to the vanity burn address.
      require(_reapersGambit.transferFrom(msg.sender, address(0x000000000000000000000000000000000000dEaD), total - amountToStake), "WRG: failed to burn");

    _safeMint(msg.sender, _nextTokenId++);

    return true;
  }

  /// @notice Allows the owner of a token to burn and redeem funds to a specified address.
  ///         Be careful! It is possible to burn tokens to an address which may already
  ///         have died...
  /// @dev We don't use ERC721Burnable because we require the specification of a custom to address.
  ///      Without this, it's highly likely that anyone who attempted to redeem the token would get
  ///      rekt, since it is likely that sufficient time would have passed that the address would
  ///      have been lost to the reaper by that point.
  /// @param to The address to unlock staked $RG to.
  function burn(uint256 tokenId, address to) external nonReentrant {
    /// @custom:url https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/token/ERC721/extensions/ERC721Burnable.sol#L23
    require(_isApprovedOrOwner(msg.sender, tokenId), "ERC721: caller is not token owner or approved");

    Bar memory bar = _bars[tokenId];

    require(bar.deathBlock > 0 && bar.stake > 0, "WRG: invalid token");

    delete _bars[tokenId];

    _burn(tokenId);

    Burn memory burned = Burn(block.number, bar.stake);

    _burns[tokenId] = burned;

    require(_reapersGambit.transferFrom(address(this), to, bar.stake), "WRG: failed to transfer");

    /// @notice Ensure OpenSea updates the metadata for burned tokens to avoid confusion on the frontend.
    /// @custom:url https://eips.ethereum.org/EIPS/eip-4906
    emit MetadataUpdate(tokenId);
  }

  // @notice Returns a string representing a json-encoded OpenSea metadata trait.
  // @param traitType The trait type.
  // @param value The value of the trait.
  function _tokenURIJsonTrait(
    string memory traitType,
    string memory value
  ) private pure returns (bytes memory) {
    return abi.encodePacked(
      '{',
        '"trait_type":"', traitType, '",',
        '"value":', value,
      '}'
    );
  }

  /// @notice Calculates the corresponding saturation for a given stake.
  /// @dev The amount staked.
  /// @return The saturation value (0 -> 3).
  function saturation(uint256 stake) public pure returns (uint256) {
    // slither-disable-next-line incorrect-equality
    if (stake <= _MIN_STAKE) return 0;
    // slither-disable-next-line incorrect-equality
    if (stake >= _MAX_STAKE) return 3;

    // slither-disable-next-line incorrect-equality
    if (stake >= 7_000_000 * 10 ** WrappedReaperUtils.DECIMALS) return 3;
    // slither-disable-next-line incorrect-equality
    if (stake >= 3_000_000 * 10 ** WrappedReaperUtils.DECIMALS) return 2;
    // slither-disable-next-line incorrect-equality
    if (stake >= 1_000_000 * 10 ** WrappedReaperUtils.DECIMALS) return 1;

    return 0;
  }

  /// @notice Calculates the phase for a given deathBlock.
  /// @param deathBlock The block depth of death at the time of mint.
  /// @param mintBlock The block depth at time of mint.
  /// @return The phase of the death.
  function phase(uint256 deathBlock, uint256 mintBlock) public pure returns (uint256) {
    uint256 delta = deathBlock - mintBlock;
    // slither-disable-next-line incorrect-equality
    return (delta <= 1800) ? 3 : (delta <= 22800) ? 2 : (delta <= 43800) ? 1 : 0;
  }


  /// @notice Computes how close a mint was to death. The closer to death, the higher the value.
  /// @dev Relies on the fact that deathBlock must be >= mintBlock, and the difference between
  ///      these must be <= to the Reaper's nine day grace period. Also depends on 0.8.x's builtin
  ///      underflow protection.
  /// @return The proximity of the token to death.
  function proximity(uint256 deathBlock, uint256 mintBlock) public pure returns (uint256) {
    return _GRACE_PERIOD - (deathBlock - mintBlock);
  }

  /// @notice Returns the title for the phase attribute.
  /// @param phase_ The phase parameter.
  /// @return The equivalent title for the value of phase.
  function _phaseTitle(uint256 phase_) private pure returns (string memory) {
    string[4] memory phases__ = ["Spirited", "Intrepid", "Daring", "Indomitable"];
    return phases__[phase_];
  }

  /// @notice Returns the title for the saturation attribute based on the level of saturation.
  /// @param saturation_ The saturation parameter.
  /// @return The equivalent title for the value of saturation.
  function _saturationTitle(uint256 saturation_) private pure returns (string memory) {
    string[4] memory saturations__ = ["Daylight", "Twilight", "Dusk", "Moonlight"];
    return saturations__[saturation_];
  }

  /// @notice Computes the name for an item of the collection.
  /// @param tokenId The token identifier.
  /// @param suffix Characters to render immediately after the collection title.
  /// @return The name for the tokenId.
  function _tokenURIName(uint256 tokenId, string memory suffix) private pure returns (bytes memory) {
    return abi.encodePacked("WRAPPED REAPER #", Strings.toString(tokenId), suffix);
  }

  /// @notice Defines the core skeleton of generated on-chain metadata.
  /// @param name Readable name of the token.
  /// @param imageData Plaintext image data string.
  /// @param attributes Plaintext OpenSea metadata JSON attributes, without enclosing brackets.
  /// @return a Base64 encoded JSON string.
  function tokenURISkeleton(
    bytes memory name,
    bytes memory imageData,
    bytes memory attributes
  ) private pure returns (string memory) {
    return string(
      abi.encodePacked(
        "data:application/json;base64,",
        Base64.encode(
          bytes(
            abi.encodePacked(
              '{',
              '"name":"', name, '",',
              '"description":', '"', unicode"💀 ⚔️ CHEAT DEATH ⚔️ 💀\\n\\nWrapped Reaper is a community extension to the Reaper's Gambit ecosystem that enables holders to safeguard their hoard from the clutches of the reaper.\\n\\n$RG can be staked inside of Wrapped Reaper in exchange for a tribute to the burn address.\\n\\nLearn more at https://reapersgambit.com", '",',
              '"image":"data:image/svg+xml;base64,', Base64.encode(imageData), '",',
              '"attributes":[', attributes, ']',
              '}'
            )
          )
        )
      )
    );
  }

  /// @notice Computes the Base64 encoded JSON metadata compatible with the OpenSea metadata standard.
  ///         Alongside image attributes, the on-chain SVG is delivered via the `image` attribute opposed
  ///         to image_data; this is because the image data is itself a Base64 encoded XML URI, which this
  ///         compliant with the rendering specification.
  /// @param tokenId The identifier of the token.
  /// @param stake The amount of $RG locked inside the token.
  /// @param deathBlock The block depth at which the minter of the block were to perish.
  /// @param mintBlock The block depth when the token was originally minted.
  /// @param minter The address responsible for minting the block.
  /// @param blockTimestamp The block timestamp when the token was minted.
  /// @return a Base64 encoded JSON string.
  function barTokenURIData(
    uint256 tokenId,
    uint256 stake,
    uint256 deathBlock,
    uint256 mintBlock,
    address minter,
    uint256 blockTimestamp
  ) public view returns (string memory) {

    uint256 saturation_ = saturation(stake);
    uint256 phase_ = phase(deathBlock, mintBlock);

    bytes memory attributes = abi.encodePacked(
      _tokenURIJsonTrait("Burned", '"No"'), ',',
      _tokenURIJsonTrait("Staked", Strings.toString(stake / 10 ** WrappedReaperUtils.DECIMALS)), ',',
      _tokenURIJsonTrait("Phase", string(abi.encodePacked('"', _phaseTitle(phase_), '"'))), ',',
      _tokenURIJsonTrait("Saturation", string(abi.encodePacked('"', _saturationTitle(saturation_), '"'))), ',',
      string(abi.encodePacked('{"display_type": "number", "trait_type": "Proximity", "value": ', Strings.toString(proximity(deathBlock, mintBlock)), '}')), ',',
      _tokenURIJsonTrait("Minter", string(abi.encodePacked('"', WrappedReaperUtils.short(minter), '"'))), ',',
      string(abi.encodePacked('{"display_type": "date", "trait_type": "Minted", "value": ', Strings.toString(blockTimestamp), '}'))
    );

    return tokenURISkeleton(
      _tokenURIName(tokenId, ""),
      _wrappedReaperRenderer.barTokenURIDataImage(tokenId, stake, mintBlock, minter, saturation_, phase_),
      attributes
    );
  }

  /// @notice Computes a base64-encoded OpenSea-compatible metadata json for an active stake.
  /// @param tokenId Identifier of the token.
  /// @param bar The Bar object which corresponds to the provided tokenId.
  /// @return The base64-encoded tokenURI.
  function _barTokenURI(uint256 tokenId, Bar memory bar) private view returns (string memory) {
    // Redirect call to underlying implementation.
    return barTokenURIData(tokenId, bar.stake, bar.deathBlock, bar.mintBlock, bar.minter, bar.blockTimestamp);
  }

  /// @notice Computes a base64-encoded OpenSea-compatible metadata json for a burned stake.
  /// @param tokenId Identifier of the token.
  /// @param stake The amount which was originall staked in the burned token.
  /// @return The base64-encoded tokenURI.
  function burnTokenURIData(
    uint256 tokenId,
    uint256 stake
  ) public view returns (string memory) {
    uint256 saturation_ = saturation(stake);

    return tokenURISkeleton(
      _tokenURIName(tokenId, " [BURNED]"),
      _wrappedReaperRenderer.burnTokenURIDataImage(saturation_),
      _tokenURIJsonTrait("Burned", '"Yes"')
    );
  }

  /// @notice Computes a base64-encoded OpenSea-compatible metadata json for a burned stake.
  /// @param tokenId Identifier of the token.
  /// @param burned The Burn object which corresponds to the provided tokenId.
  /// @return The base64-encoded tokenURI.
  function _burnTokenURI(uint256 tokenId, Burn memory burned) private view returns (string memory) {
    return burnTokenURIData(tokenId, burned.stake);
    // Redirect call to underlying implementation.
    uint256 saturation_ = saturation(burned.stake);
  }

  /// @notice Attempts to return the base64 encoded tokenURI for existing tokens.
  /// @dev Will fail for tokens which have not been created - these are tokens which
  ///      possess EITHER a corresponding Bar instance OR a Burn instance.
  /// @dev It is not be possible to mint bars with a zero deathBlock.
  /// @return The tokenURI.
  function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
    Burn memory burned = _burns[tokenId];

    if (burned.burnBlock > 0) return _burnTokenURI(tokenId, burned);

    Bar memory bar = _bars[tokenId];

    require(bar.deathBlock > 0, "ERC721: invalid token ID");

    return _barTokenURI(tokenId, bar);
  }

  /// @return The minimum possible amount of $RG that can be staked.
  function minStake() external pure returns (uint256){
    return _MIN_STAKE;
  }

  /// @return The maximum possible amount of $RG that can be staked.
  function maxStake() external pure returns (uint256){
    return _MAX_STAKE;
  }

  /// @return The decimal units of $RG.
  function decimals() external pure returns (uint256){
    return WrappedReaperUtils.DECIMALS;
  }

  /// @return The maximum possible supply of tokens at any one time. Invariant.
  ///         If the limit is reached, burning new tokens will permit new tokens
  ///         to be created.
  function maxSupply() external view returns (uint256){
    return _maxSupply;
  }

  /// @return The minimum possible fee to pay for a mint.
  function minTaxBasisPoints() external view returns (uint256){
    return _minTaxBasisPoints;
  }

  /// @return The maximum possible additional fee to pay for a mint.
  function maxTaxBasisPoints() external view returns (uint256){
    return _maxTaxBasisPoints;
  }

  /// @return The width of the blade. This is the number of tokens
  ///         leading up to the maximum supply which are subject to
  ///         a discount on the scythe curve.
  function bladeWidth() external view returns (uint256){
    return _bladeWidth;
  }

  /// @return The maximum possible discount from the maxTax, in $RG.
  /// @dev For a nonzero bladeWidth, the maximum discount is applied
  ///      to the maximum supply token.
  function bladeDiscountBasisPoints() external view returns (uint256){
    return _bladeDiscountBasisPoints;
  }

  /// @notice Computes the total cost for the intention of staking the
  ///         caller-defined stake.
  /// @param stake__ The amount of $RG intended to be staked.
  /// @return The current position of the scythe for the specified staking amount.
  // slither-disable-next-line naming-convention
  function currentScythe(uint256 stake__) public view returns (uint256) {
    return scythe(totalSupply(), stake__);
  }

}

File 2 of 22 : 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 3 of 22 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.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 `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

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

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 4 of 22 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

File 5 of 22 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev See {ERC721-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, firstTokenId, batchSize);

        if (batchSize > 1) {
            // Will only trigger during construction. Batch transferring (minting) is not available afterwards.
            revert("ERC721Enumerable: consecutive transfers not supported");
        }

        uint256 tokenId = firstTokenId;

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 6 of 22 : IERC4906.sol
// SPDX-License-Identifier: CC0-1.0

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

/// @title EIP-721 Metadata Update Extension
/// @custom:url https://eips.ethereum.org/EIPS/eip-4906#specification
interface IERC4906 is IERC165, IERC721 {
    /// @dev This event emits when the metadata of a token is changed.
    /// So that the third-party platforms such as NFT market could
    /// timely update the images and related attributes of the NFT.
    event MetadataUpdate(uint256 _tokenId);

    /// @dev This event emits when the metadata of a range of tokens is changed.
    /// So that the third-party platforms such as NFT market could
    /// timely update the images and related attributes of the NFTs.
    event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);
}

File 7 of 22 : IReapersGambit.sol
/// SPDX-License-Identifier CC0-1.0
pragma solidity 0.8.17;

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

interface IReapersGambit is IERC20 {
  function CheatDeath(address account) external;
  function AcceptDeath(address account) external;
  function KnowDeath(address account) external view returns (uint256);
}

File 8 of 22 : IWrappedReaperRenderer.sol
/// SPDX-License-Identifier CC0-1.0
pragma solidity 0.8.17;

/// @title IWrappedReaperRenderer.sol
/// @author unknown
/// @notice Defines the high-level interface to the decoupled on-chain renderer.
interface IWrappedReaperRenderer {

  /// @notice Computes a raw WrappedReaper Bar token SVG for the provided parameters.
  /// @param tokenId Identifier of the token.
  /// @param stake The amount of $RG staked inside the token.
  /// @param mintBlock The block depth when the token was minted.
  /// @param minter The address responsible for minting the token.
  /// @param saturation_ Color vividness (0 -> 3).
  /// @param phase_ Shadow positioning (0 -> 3).
  /// @return SVG XML string.
  function barTokenURIDataImage(uint256 tokenId, uint256 stake, uint256 mintBlock, address minter, uint256 saturation_, uint256 phase_) external pure returns (bytes memory);

  /// @notice Computes a raw WrappedReaper Burn token SVG for the provided parameters.
  /// @param saturation_ Color vividness (0 -> 3).
  /// @return SVG XML string.
  function burnTokenURIDataImage(uint256 saturation_) external pure returns (bytes memory);

}

File 9 of 22 : WrappedReaperUtils.sol
/// SPDX-License-Identifier CC0-1.0
pragma solidity 0.8.17;

library WrappedReaperUtils {

  /// @notice An uppercase version of: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5420879d9b834a0579423d668fb60c5fc13b60cc/contracts/utils/Strings.sol#L13
  /// @dev We use this for evaluation of OpenSea style short addresses.
  bytes16 private constant __SYMBOLS = "0123456789ABCDEF";

  /// @notice Decimal precision of ReapersGambit.
  uint256 public constant DECIMALS = 18;

  /// @notice Computes the short address string for an address.
  /// @param a Address to create a short address for.
  /// @return A shorthand of a string address of length 6 (without 0x prefix).
  function short(address a) public pure returns (string memory) {
    bytes memory buffer = new bytes(6);

    uint256 value = uint160(a) >> 34 * 4;

    for (uint256 i = 0; i < 6; i += 1) {
      buffer[5 - i] = __SYMBOLS[value & 0xf];
      value >>= 4;
    }

    return string(buffer);
  }

  // @notice Converts the provided color into an SVG hexadecimal color string.
  // @dev Logic ported across from OpenZeppelin for runtime gas efficiency:
  //      https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/utils/Strings.sol#L13
  // @param color The color to stringify.
  // @return An SVG-compliant color.
  function color(uint24 color_) public pure returns (string memory) {
    bytes memory buffer = new bytes(7);
    buffer[0] = "#";

    for (uint256 i = 6; i >= 1; i -= 1) {
      buffer[i] = __SYMBOLS[color_ & 0xf];
      color_ >>= 4;
    }

    return string(buffer);
  }

}

File 10 of 22 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 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 256, 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 << 3) < value ? 1 : 0);
        }
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

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

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

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

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

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

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _ownerOf(tokenId);
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not token owner or approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
        _safeTransfer(from, to, tokenId, data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _ownerOf(tokenId) != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId, 1);

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId, 1);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId, 1);

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId, 1);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(address from, address to, uint256 tokenId) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId, 1);

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @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, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant
     * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such
     * that `ownerOf(tokenId)` is `a`.
     */
    // solhint-disable-next-line func-name-mixedcase
    function __unsafe_increaseBalance(address account, uint256 amount) internal {
        _balances[account] += amount;
    }
}

File 13 of 22 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 14 of 22 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

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

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

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

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

File 15 of 22 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

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

File 16 of 22 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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 17 of 22 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 18 of 22 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 19 of 22 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [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://consensys.net/diligence/blog/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.8.0/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 20 of 22 : 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 21 of 22 : 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 22 of 22 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

Settings
{
  "remappings": [
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 100000000
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {
    "src/WrappedReaperUtils.sol": {
      "WrappedReaperUtils": "0x157e43fd2C7285172bd3B2826c2E7c5D790D8bb6"
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"reapersGambit","type":"address"},{"internalType":"address","name":"wrappedReaperRenderer","type":"address"},{"internalType":"uint256","name":"maxSupply_","type":"uint256"},{"internalType":"uint256","name":"minTaxBasisPoints__","type":"uint256"},{"internalType":"uint256","name":"maxTaxBasisPoints__","type":"uint256"},{"internalType":"uint256","name":"bladeWidth__","type":"uint256"},{"internalType":"uint256","name":"bladeDiscountBasisPoints__","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"stake","type":"uint256"},{"internalType":"uint256","name":"deathBlock","type":"uint256"},{"internalType":"uint256","name":"mintBlock","type":"uint256"},{"internalType":"address","name":"minter","type":"address"},{"internalType":"uint256","name":"blockTimestamp","type":"uint256"}],"name":"barTokenURIData","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bladeDiscountBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bladeWidth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"stake","type":"uint256"}],"name":"burnTokenURIData","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"basisPoints","type":"uint256"}],"name":"costBasis","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"stake__","type":"uint256"}],"name":"currentScythe","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTaxBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"minTaxBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountToStake","type":"uint256"},{"internalType":"uint256","name":"maximumPrice","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"deathBlock","type":"uint256"},{"internalType":"uint256","name":"mintBlock","type":"uint256"}],"name":"phase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"deathBlock","type":"uint256"},{"internalType":"uint256","name":"mintBlock","type":"uint256"}],"name":"proximity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","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":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stake","type":"uint256"}],"name":"saturation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"currentSupply","type":"uint256"},{"internalType":"uint256","name":"stake_","type":"uint256"}],"name":"scythe","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"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":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101606040523480156200001257600080fd5b506040516200520338038062005203833981016040819052620000359162000218565b6040518060400160405280600e81526020016d2ba920a82822a2102922a0a822a960911b8152506040518060400160405280600381526020016257524760e81b815250816000908162000089919062000324565b50600162000098828262000324565b50506001600a555082841115620000ae57600080fd5b84821115620000bc57600080fd5b620000c8848462000406565b811115620000d557600080fd5b612710620000e66012600a6200051f565b620000f590620a2c2a62000534565b10156200010157600080fd5b6200010f6012600a6200051f565b6200011f906305f5e10062000534565b6200012d6012600a6200051f565b6200013c90620a2c2a62000534565b11156200014857600080fd5b6001600160a01b03878116608081905290871660a05260c086905260e085905261010084905261012083905261014082905260405163095ea7b360e01b8152306004820152600019602482015263095ea7b3906044016020604051808303816000875af1158015620001be573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001e491906200054e565b620001ee57600080fd5b5050505050505062000572565b80516001600160a01b03811681146200021357600080fd5b919050565b600080600080600080600060e0888a0312156200023457600080fd5b6200023f88620001fb565b96506200024f60208901620001fb565b604089015160608a015160808b015160a08c015160c0909c01519a9d939c50919a90999198509650945092505050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620002aa57607f821691505b602082108103620002cb57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200031f57600081815260208120601f850160051c81016020861015620002fa5750805b601f850160051c820191505b818110156200031b5782815560010162000306565b5050505b505050565b81516001600160401b038111156200034057620003406200027f565b620003588162000351845462000295565b84620002d1565b602080601f831160018114620003905760008415620003775750858301515b600019600386901b1c1916600185901b1785556200031b565b600085815260208120601f198616915b82811015620003c157888601518255948401946001909101908401620003a0565b5085821015620003e05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b818103818111156200041c576200041c620003f0565b92915050565b600181815b8085111562000463578160001904821115620004475762000447620003f0565b808516156200045557918102915b93841c939080029062000427565b509250929050565b6000826200047c575060016200041c565b816200048b575060006200041c565b8160018114620004a45760028114620004af57620004cf565b60019150506200041c565b60ff841115620004c357620004c3620003f0565b50506001821b6200041c565b5060208310610133831016604e8410600b8410161715620004f4575081810a6200041c565b62000500838362000422565b8060001904821115620005175762000517620003f0565b029392505050565b60006200052d83836200046b565b9392505050565b80820281158282048414176200041c576200041c620003f0565b6000602082840312156200056157600080fd5b815180151581146200052d57600080fd5b60805160a05160c05160e051610100516101205161014051614bd46200062f600039600081816104230152611f4501526000818161037001528181611e9a0152611fd001526000818161051f0152611ee901526000818161046f0152611f17015260008181610495015281816108d501528181611e0c0152611ebb015260008181611608015261191d015260008181610a3e01528181610bfe01528181610d0301528181610e4c01528181610f5301526122960152614bd46000f3fe608060405234801561001057600080fd5b50600436106102265760003560e01c806370662cc11161012a578063c87b56dd116100bd578063e985e9c51161008c578063f0627ea211610071578063f0627ea21461050a578063f56b6ad91461051d578063fcd3533c1461054357600080fd5b8063e985e9c5146104b9578063ea1b28e01461050257600080fd5b8063c87b56dd14610447578063d039f7b01461045a578063d06a5b081461046d578063d5abeb011461049357600080fd5b80639dc899cf116100f95780639dc899cf146103e8578063a22cb465146103fb578063b88d4fde1461040e578063bf3843441461042157600080fd5b806370662cc1146103a757806370a08231146103ba5780638ad7b28c146103cd57806395d89b41146103e057600080fd5b8063313ce567116101bd5780634545c05c1161018c5780636352211e116101715780636352211e1461035b57806363fbe3621461036e57806369c8faac1461039457600080fd5b80634545c05c146103355780634f6ccce71461034857600080fd5b8063313ce5671461030057806333fcd78d14610307578063375b3c0a1461031a57806342842e0e1461032257600080fd5b806318160ddd116101f957806318160ddd146102b55780631b2ef1ca146102c757806323b872dd146102da5780632f745c59146102ed57600080fd5b806301ffc9a71461022b57806306fdde0314610253578063081812fc14610268578063095ea7b3146102a0575b600080fd5b61023e610239366004613bcb565b610556565b60405190151581526020015b60405180910390f35b61025b6105b2565b60405161024a9190613c56565b61027b610276366004613c69565b610644565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161024a565b6102b36102ae366004613ca6565b610678565b005b6008545b60405190815260200161024a565b61023e6102d5366004613cd0565b610809565b6102b36102e8366004613cf2565b6110b9565b6102b96102fb366004613ca6565b61115a565b60126102b9565b61025b610315366004613d2e565b611229565b6102b96116a9565b6102b3610330366004613cf2565b6116c9565b6102b9610343366004613cd0565b6116e4565b6102b9610356366004613c69565b611734565b61027b610369366004613c69565b6117f2565b7f00000000000000000000000000000000000000000000000000000000000000006102b9565b6102b96103a2366004613cd0565b61187e565b61025b6103b5366004613cd0565b61189d565b6102b96103c8366004613d7f565b611a40565b6102b96103db366004613cd0565b611b0e565b61025b611b36565b6102b96103f6366004613c69565b611b45565b6102b3610409366004613da8565b611c13565b6102b361041c366004613ea3565b611c22565b7f00000000000000000000000000000000000000000000000000000000000000006102b9565b61025b610455366004613c69565b611cca565b6102b9610468366004613c69565b611dd8565b7f00000000000000000000000000000000000000000000000000000000000000006102b9565b7f00000000000000000000000000000000000000000000000000000000000000006102b9565b61023e6104c7366004613f4e565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102b9611dec565b6102b9610518366004613cd0565b611e08565b7f00000000000000000000000000000000000000000000000000000000000000006102b9565b6102b3610551366004613f81565b612043565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f490649060000000000000000000000000000000000000000000000000000000014806105ac57506105ac826123a8565b92915050565b6060600080546105c190613fa4565b80601f01602080910402602001604051908101604052809291908181526020018280546105ed90613fa4565b801561063a5780601f1061060f5761010080835404028352916020019161063a565b820191906000526020600020905b81548152906001019060200180831161061d57829003601f168201915b5050505050905090565b600061064f826123fe565b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610683826117f2565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff8216148061076e575061076e81336104c7565b6107fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161073c565b610804838361248c565b505050565b600061081361252c565b600061081e60085490565b905061082c6012600a614140565b61083990620a2c2a61414c565b8410158015610861575061084f6012600a614140565b61085d906305f5e10061414c565b8411155b801561086d5750828411155b6108d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f5752473a20696e76616c6964207374616b650000000000000000000000000000604482015260640161073c565b7f0000000000000000000000000000000000000000000000000000000000000000811061095c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5752473a20737570706c79206361702072656163686564000000000000000000604482015260640161073c565b60006109688286611e08565b905083811115801561097a5750848110155b6109e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5752473a2066726f6e7472756e2070726f74656374696f6e0000000000000000604482015260640161073c565b6040805160a0810182523380825243602083015282517f119ff0bf000000000000000000000000000000000000000000000000000000008152600481019190915260009282019073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063119ff0bf90602401602060405180830381865afa158015610a85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa99190614163565b815260200187815260200142815250905080602001518160400151118015610ae4575061fd20610ae18260400151836020015161187e565b11155b610b4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f63616e6e6f742065736361706520646561746800000000000000000000000000604482015260640161073c565b600d546000908152600b6020908152604091829020835181547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff91821617825591840151600182015583830151600282015560608401516003820155608084015160049182015591517fdd62ed3e000000000000000000000000000000000000000000000000000000008152339281019290925230602483015283917f00000000000000000000000000000000000000000000000000000000000000009091169063dd62ed3e90604401602060405180830381865afa158015610c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6b9190614163565b1015610cd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161073c565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015282907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610d5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d839190614163565b1015610e11576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161073c565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd906064016020604051808303816000875af1158015610eaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ece919061417c565b610f34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5752473a206661696c656420746f207472616e73666572000000000000000000604482015260640161073c565b858211156110895773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166323b872dd3361dead610f868a87614199565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260448201526064016020604051808303816000875af1158015610fff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611023919061417c565b611089576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f5752473a206661696c656420746f206275726e00000000000000000000000000604482015260640161073c565b600d80546110a891339190600061109f836141ac565b9190505561259f565b600193505050506105ac6001600a55565b6110c333826125b9565b61114f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f76656400000000000000000000000000000000000000606482015260840161073c565b610804838383612678565b600061116583611a40565b82106111f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e6473000000000000000000000000000000000000000000606482015260840161073c565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600660209081526040808320938352929052205490565b6060600061123687611b45565b9050600061124487876116e4565b905060006112bc6040518060400160405280600681526020017f4275726e656400000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f224e6f2200000000000000000000000000000000000000000000000000000000815250612980565b60408051808201909152600681527f5374616b656400000000000000000000000000000000000000000000000000006020820152611317906113126113036012600a614140565b61130d908e6141e4565b6129ac565b612980565b61137d6040518060400160405280600581526020017f506861736500000000000000000000000000000000000000000000000000000081525061135986612a6a565b604051602001611369919061423b565b604051602081830303815290604052612980565b6113bf6040518060400160405280600a81526020017f53617475726174696f6e0000000000000000000000000000000000000000000081525061135988612b6c565b6113cc61130d8d8d61187e565b6040516020016113dc9190614285565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282018252600683527f4d696e7465720000000000000000000000000000000000000000000000000000602084015290517f25b1f78000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8d16600482015290916114ff9173157e43fd2c7285172bd3b2826c2e7c5d790d8bb6906325b1f78090602401600060405180830381865af41580156114b9573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526113599190810190614347565b6115088b6129ac565b6040516020016115189190614390565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261155997969594939291602001614422565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181526020830190915260008252915061169b906115a0908c90612c79565b6040517f7539837e000000000000000000000000000000000000000000000000000000008152600481018d9052602481018c9052604481018a905273ffffffffffffffffffffffffffffffffffffffff89811660648301526084820187905260a482018690527f00000000000000000000000000000000000000000000000000000000000000001690637539837e9060c401600060405180830381865afa15801561164f573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526116959190810190614347565b83612c96565b9a9950505050505050505050565b60006116b76012600a614140565b6116c490620a2c2a61414c565b905090565b61080483838360405180602001604052806000815250611c22565b6000806116f18385614199565b90506107088111156117265761591081111561171f5761ab18811115611718576000611729565b6001611729565b6002611729565b60035b60ff16949350505050565b600061173f60085490565b82106117cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e64730000000000000000000000000000000000000000606482015260840161073c565b600882815481106117e0576117e0614529565b90600052602060002001549050919050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff16806105ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604482015260640161073c565b600061188a8284614199565b6118969061fd20614199565b9392505050565b606060006118aa83611b45565b9050611a386118ee856040518060400160405280600981526020017f205b4255524e45445d0000000000000000000000000000000000000000000000815250612c79565b6040517f1682a92f000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690631682a92f90602401600060405180830381865afa158015611979573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526119bf9190810190614347565b611a336040518060400160405280600681526020017f4275726e656400000000000000000000000000000000000000000000000000008152506040518060400160405280600581526020017f2259657322000000000000000000000000000000000000000000000000000000815250612980565b612c96565b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff8216611ae5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e65720000000000000000000000000000000000000000000000606482015260840161073c565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b6000612710831015611b1f57600080fd5b612710611b2c838561414c565b61189691906141e4565b6060600180546105c190613fa4565b6000611b536012600a614140565b611b6090620a2c2a61414c565b8211611b6e57506000919050565b611b7a6012600a614140565b611b88906305f5e10061414c565b8210611b9657506003919050565b611ba26012600a614140565b611baf90626acfc061414c565b8210611bbd57506003919050565b611bc96012600a614140565b611bd690622dc6c061414c565b8210611be457506002919050565b611bf06012600a614140565b611bfd90620f424061414c565b8210611c0b57506001919050565b506000919050565b611c1e338383612cf4565b5050565b611c2c33836125b9565b611cb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f76656400000000000000000000000000000000000000606482015260840161073c565b611cc484848484612e21565b50505050565b6000818152600c602090815260409182902082518084019093528054808452600190910154918301919091526060919015611d09576118968382612ec4565b6000838152600b6020908152604091829020825160a081018452815473ffffffffffffffffffffffffffffffffffffffff16815260018201549281019290925260028101549282018390526003810154606083015260040154608082015290611dce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604482015260640161073c565b611a388482612edb565b60006105ac611de660085490565b83611e08565b6000611dfa6012600a614140565b6116c4906305f5e10061414c565b60007f00000000000000000000000000000000000000000000000000000000000000008310611e93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5752473a20737570706c79206361702072656163686564000000000000000000604482015260640161073c565b6000611edf7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000614199565b90506000611f0d847f0000000000000000000000000000000000000000000000000000000000000000611b0e565b90506000611f3b857f0000000000000000000000000000000000000000000000000000000000000000611b0e565b90506000611f69867f0000000000000000000000000000000000000000000000000000000000000000611b0e565b90506000808511611f7a5783611fa5565b828589611f878388614199565b611f91919061414c565b611f9b91906141e4565b611fa59190614558565b90506000848210611fb65784611fb8565b815b611fc29089614558565b9050858911156120375760027f0000000000000000000000000000000000000000000000000000000000000000611ff885612eff565b612002898d614199565b61200c919061414c565b61201691906141e4565b612020919061456b565b61202a9082614199565b96505050505050506105ac565b98975050505050505050565b61204b61252c565b61205533836125b9565b6120e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f76656400000000000000000000000000000000000000606482015260840161073c565b6000828152600b6020908152604091829020825160a081018452815473ffffffffffffffffffffffffffffffffffffffff1681526001820154928101929092526002810154928201839052600381015460608301526004015460808201529015801590612152575060008160600151115b6121b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f5752473a20696e76616c696420746f6b656e0000000000000000000000000000604482015260640161073c565b6000838152600b6020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681556001810182905560028101829055600381018290556004015561220e83612f6f565b60408051808201825243815260608301805160208084019182526000888152600c9091528490208351815590516001909101555191517f23b872dd00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8581166024830152604482019390935290917f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af11580156122df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612303919061417c565b612369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5752473a206661696c656420746f207472616e73666572000000000000000000604482015260640161073c565b6040518481527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79060200160405180910390a15050611c1e6001600a55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d630000000000000000000000000000000000000000000000000000000014806105ac57506105ac82613055565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16612489576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604482015260640161073c565b50565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841690811790915581906124e6826117f2565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6002600a5403612598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161073c565b6002600a55565b611c1e828260405180602001604052806000815250613138565b6000806125c5836117f2565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612633575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b80611a3857508373ffffffffffffffffffffffffffffffffffffffff1661265984610644565b73ffffffffffffffffffffffffffffffffffffffff1614949350505050565b8273ffffffffffffffffffffffffffffffffffffffff16612698826117f2565b73ffffffffffffffffffffffffffffffffffffffff161461273b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e6572000000000000000000000000000000000000000000000000000000606482015260840161073c565b73ffffffffffffffffffffffffffffffffffffffff82166127dd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161073c565b6127ea83838360016131db565b8273ffffffffffffffffffffffffffffffffffffffff1661280a826117f2565b73ffffffffffffffffffffffffffffffffffffffff16146128ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e6572000000000000000000000000000000000000000000000000000000606482015260840161073c565b600081815260046020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff8781168086526003855283862080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6060828260405160200161299592919061457a565b604051602081830303815290604052905092915050565b606060006129b9836131e7565b600101905060008167ffffffffffffffff8111156129d9576129d9613ddf565b6040519080825280601f01601f191660200182016040528015612a03576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084612a0d57509392505050565b6040805160c0810182526008608082018181527f537069726974656400000000000000000000000000000000000000000000000060a08401528252825180840184529081527f496e7472657069640000000000000000000000000000000000000000000000006020828101919091528083019190915282518084018452600681527f446172696e67000000000000000000000000000000000000000000000000000081830152828401528251808401909352600b83527f496e646f6d697461626c6500000000000000000000000000000000000000000090830152606081810192909252808360048110612b6057612b60614529565b60200201519392505050565b6060600060405180608001604052806040518060400160405280600881526020017f4461796c6967687400000000000000000000000000000000000000000000000081525081526020016040518060400160405280600881526020017f5477696c6967687400000000000000000000000000000000000000000000000081525081526020016040518060400160405280600481526020017f4475736b0000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600981526020017f4d6f6f6e6c6967687400000000000000000000000000000000000000000000008152508152509050808360048110612b6057612b60614529565b6060612c84836129ac565b82604051602001612995929190614671565b6060612ccc84612ca5856132c9565b84604051602001612cb8939291906146cc565b6040516020818303038152906040526132c9565b604051602001612cdc9190614a8e565b60405160208183030381529060405290509392505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612d89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161073c565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612e2c848484612678565b612e388484848461341c565b611cc4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161073c565b6060612ed483836020015161189d565b90506105ac565b60606118968383606001518460400151856020015186600001518760800151611229565b60006003821115612f605750806000612f196002836141e4565b612f24906001614558565b90505b81811015612f5a57905080600281612f3f81866141e4565b612f499190614558565b612f5391906141e4565b9050612f27565b50919050565b8115612f6a575060015b919050565b6000612f7a826117f2565b9050612f8a8160008460016131db565b612f93826117f2565b600083815260046020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff85168085526003845282852080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806130e857507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806105ac57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146105ac565b613142838361360f565b61314f600084848461341c565b610804576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161073c565b611cc484848484613842565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613230577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831061325c576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061327a57662386f26fc10000830492506010015b6305f5e1008310613292576305f5e100830492506008015b61271083106132a657612710830492506004015b606483106132b8576064830492506002015b600a83106105ac5760010192915050565b606081516000036132e857505060408051602081019091526000815290565b6000604051806060016040528060408152602001614b5f60409139905060006003845160026133179190614558565b61332191906141e4565b61332c90600461414c565b67ffffffffffffffff81111561334457613344613ddf565b6040519080825280601f01601f19166020018201604052801561336e576020820181803683370190505b509050600182016020820185865187015b808210156133da576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f811685015184535060018301925061337f565b50506003865106600181146133f6576002811461340957613411565b603d6001830353603d6002830353613411565b603d60018303535b509195945050505050565b600073ffffffffffffffffffffffffffffffffffffffff84163b15613604576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613493903390899088908890600401614ad3565b6020604051808303816000875af19250505080156134ec575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526134e991810190614b12565b60015b6135b9573d80801561351a576040519150601f19603f3d011682016040523d82523d6000602084013e61351f565b606091505b5080516000036135b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161073c565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050611a38565b506001949350505050565b73ffffffffffffffffffffffffffffffffffffffff821661368c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161073c565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613718576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161073c565b6137266000838360016131db565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16156137b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161073c565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260036020908152604080832080546001019055848352600290915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60018111156138d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e736563757469766520747260448201527f616e7366657273206e6f7420737570706f727465640000000000000000000000606482015260840161073c565b8173ffffffffffffffffffffffffffffffffffffffff851661393c5761393781600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613979565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146139795761397985826139e6565b73ffffffffffffffffffffffffffffffffffffffff84166139a25761399d81613a9d565b6139df565b8473ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146139df576139df8482613b4c565b5050505050565b600060016139f384611a40565b6139fd9190614199565b600083815260076020526040902054909150808214613a5d5773ffffffffffffffffffffffffffffffffffffffff841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b50600091825260076020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600681528383209183525290812055565b600854600090613aaf90600190614199565b60008381526009602052604081205460088054939450909284908110613ad757613ad7614529565b906000526020600020015490508060088381548110613af857613af8614529565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480613b3057613b30614b2f565b6001900381819060005260206000200160009055905550505050565b6000613b5783611a40565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461248957600080fd5b600060208284031215613bdd57600080fd5b813561189681613b9d565b60005b83811015613c03578181015183820152602001613beb565b50506000910152565b60008151808452613c24816020860160208601613be8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006118966020830184613c0c565b600060208284031215613c7b57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114612f6a57600080fd5b60008060408385031215613cb957600080fd5b613cc283613c82565b946020939093013593505050565b60008060408385031215613ce357600080fd5b50508035926020909101359150565b600080600060608486031215613d0757600080fd5b613d1084613c82565b9250613d1e60208501613c82565b9150604084013590509250925092565b60008060008060008060c08789031215613d4757600080fd5b86359550602087013594506040870135935060608701359250613d6c60808801613c82565b915060a087013590509295509295509295565b600060208284031215613d9157600080fd5b61189682613c82565b801515811461248957600080fd5b60008060408385031215613dbb57600080fd5b613dc483613c82565b91506020830135613dd481613d9a565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613e5557613e55613ddf565b604052919050565b600067ffffffffffffffff821115613e7757613e77613ddf565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008060008060808587031215613eb957600080fd5b613ec285613c82565b9350613ed060208601613c82565b925060408501359150606085013567ffffffffffffffff811115613ef357600080fd5b8501601f81018713613f0457600080fd5b8035613f17613f1282613e5d565b613e0e565b818152886020838501011115613f2c57600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215613f6157600080fd5b613f6a83613c82565b9150613f7860208401613c82565b90509250929050565b60008060408385031215613f9457600080fd5b82359150613f7860208401613c82565b600181811c90821680613fb857607f821691505b602082108103612f5a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600181815b8085111561407957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561405f5761405f613ff1565b8085161561406c57918102915b93841c9390800290614025565b509250929050565b600082614090575060016105ac565b8161409d575060006105ac565b81600181146140b357600281146140bd576140d9565b60019150506105ac565b60ff8411156140ce576140ce613ff1565b50506001821b6105ac565b5060208310610133831016604e8410600b84101617156140fc575081810a6105ac565b6141068383614020565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561413857614138613ff1565b029392505050565b60006118968383614081565b80820281158282048414176105ac576105ac613ff1565b60006020828403121561417557600080fd5b5051919050565b60006020828403121561418e57600080fd5b815161189681613d9a565b818103818111156105ac576105ac613ff1565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036141dd576141dd613ff1565b5060010190565b60008261421a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60008151614231818560208601613be8565b9290920192915050565b60007f22000000000000000000000000000000000000000000000000000000000000008083528351614274816001860160208801613be8565b600193019283015250600201919050565b7f7b22646973706c61795f74797065223a20226e756d626572222c20227472616981527f745f74797065223a202250726f78696d697479222c202276616c7565223a20006020820152600082516142e381603f850160208701613be8565b7f7d00000000000000000000000000000000000000000000000000000000000000603f939091019283015250604001919050565b6000614325613f1284613e5d565b905082815283838301111561433957600080fd5b611896836020830184613be8565b60006020828403121561435957600080fd5b815167ffffffffffffffff81111561437057600080fd5b8201601f8101841361438157600080fd5b611a3884825160208401614317565b7f7b22646973706c61795f74797065223a202264617465222c202274726169745f81527f74797065223a20224d696e746564222c202276616c7565223a200000000000006020820152600082516143ee81603a850160208701613be8565b7f7d00000000000000000000000000000000000000000000000000000000000000603a939091019283015250603b01919050565b6000885160206144358285838e01613be8565b81840191507f2c000000000000000000000000000000000000000000000000000000000000008083528a516144708160018601858f01613be8565b60019301928301819052895161448c8160028601858e01613be8565b6002930192830181905288516144a88160038601858d01613be8565b6003930192830181905287516144c48160048601858c01613be8565b600493019283015285516144de8160058501848a01613be8565b6145196145136005838601017f2c00000000000000000000000000000000000000000000000000000000000000815260010190565b8761421f565b9c9b505050505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b808201808211156105ac576105ac613ff1565b600061189660ff841683614081565b7f7b0000000000000000000000000000000000000000000000000000000000000081527f2274726169745f74797065223a220000000000000000000000000000000000006001820152600083516145d881600f850160208801613be8565b7f222c000000000000000000000000000000000000000000000000000000000000600f918401918201527f2276616c7565223a0000000000000000000000000000000000000000000000006011820152835161463b816019840160208801613be8565b7f7d0000000000000000000000000000000000000000000000000000000000000060199290910191820152601a01949350505050565b7f57524150504544205245415045522023000000000000000000000000000000008152600083516146a9816010850160208801613be8565b8351908301906146c0816010840160208801613be8565b01601001949350505050565b7f7b0000000000000000000000000000000000000000000000000000000000000081527f226e616d65223a2200000000000000000000000000000000000000000000000060018201526000845161472a816009850160208901613be8565b7f222c0000000000000000000000000000000000000000000000000000000000006009918401918201527f226465736372697074696f6e223a000000000000000000000000000000000000600b8201527f220000000000000000000000000000000000000000000000000000000000000060198201527ff09f928020e29a94efb88f20434845415420444541544820e29a94efb88f20f0601a8201527f9f92805c6e5c6e5772617070656420526561706572206973206120636f6d6d75603a8201527f6e69747920657874656e73696f6e20746f207468652052656170657227732047605a8201527f616d6269742065636f73797374656d207468617420656e61626c657320686f6c607a8201527f6465727320746f2073616665677561726420746865697220686f617264206672609a8201527f6f6d2074686520636c757463686573206f6620746865207265617065722e5c6e60ba8201527f5c6e2452472063616e206265207374616b656420696e73696465206f6620577260da8201527f61707065642052656170657220696e2065786368616e676520666f722061207460fa8201527f72696275746520746f20746865206275726e20616464726573732e5c6e5c6e4c61011a8201527f6561726e206d6f72652061742068747470733a2f2f7265617065727367616d6261013a8201527f69742e636f6d000000000000000000000000000000000000000000000000000061015a820152614a84614a5b614a32614513614a096149e06149da61498b61016089017f222c000000000000000000000000000000000000000000000000000000000000815260020190565b7f22696d616765223a22646174613a696d6167652f7376672b786d6c3b6261736581527f36342c0000000000000000000000000000000000000000000000000000000000602082015260230190565b8b61421f565b7f222c000000000000000000000000000000000000000000000000000000000000815260020190565b7f2261747472696275746573223a5b0000000000000000000000000000000000008152600e0190565b7f5d00000000000000000000000000000000000000000000000000000000000000815260010190565b7f7d00000000000000000000000000000000000000000000000000000000000000815260010190565b9695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251614ac681601d850160208701613be8565b91909101601d0192915050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152614a846080830184613c0c565b600060208284031215614b2457600080fd5b815161189681613b9d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220e0339d6c641ff364806f7ee68b35a91adbb7fbd7c4eb42c21e54b841a6bb81cf64736f6c634300081100330000000000000000000000002c91d908e9fab2dd2441532a04182d791e590f2d000000000000000000000000549f1387948dcd57bf1e48ed9f977b5bc9bdd26d000000000000000000000000000000000000000000000000000000000000006300000000000000000000000000000000000000000000000000000000000003840000000000000000000000000000000000000000000000000000000000000ce4000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000004b0

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102265760003560e01c806370662cc11161012a578063c87b56dd116100bd578063e985e9c51161008c578063f0627ea211610071578063f0627ea21461050a578063f56b6ad91461051d578063fcd3533c1461054357600080fd5b8063e985e9c5146104b9578063ea1b28e01461050257600080fd5b8063c87b56dd14610447578063d039f7b01461045a578063d06a5b081461046d578063d5abeb011461049357600080fd5b80639dc899cf116100f95780639dc899cf146103e8578063a22cb465146103fb578063b88d4fde1461040e578063bf3843441461042157600080fd5b806370662cc1146103a757806370a08231146103ba5780638ad7b28c146103cd57806395d89b41146103e057600080fd5b8063313ce567116101bd5780634545c05c1161018c5780636352211e116101715780636352211e1461035b57806363fbe3621461036e57806369c8faac1461039457600080fd5b80634545c05c146103355780634f6ccce71461034857600080fd5b8063313ce5671461030057806333fcd78d14610307578063375b3c0a1461031a57806342842e0e1461032257600080fd5b806318160ddd116101f957806318160ddd146102b55780631b2ef1ca146102c757806323b872dd146102da5780632f745c59146102ed57600080fd5b806301ffc9a71461022b57806306fdde0314610253578063081812fc14610268578063095ea7b3146102a0575b600080fd5b61023e610239366004613bcb565b610556565b60405190151581526020015b60405180910390f35b61025b6105b2565b60405161024a9190613c56565b61027b610276366004613c69565b610644565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161024a565b6102b36102ae366004613ca6565b610678565b005b6008545b60405190815260200161024a565b61023e6102d5366004613cd0565b610809565b6102b36102e8366004613cf2565b6110b9565b6102b96102fb366004613ca6565b61115a565b60126102b9565b61025b610315366004613d2e565b611229565b6102b96116a9565b6102b3610330366004613cf2565b6116c9565b6102b9610343366004613cd0565b6116e4565b6102b9610356366004613c69565b611734565b61027b610369366004613c69565b6117f2565b7f00000000000000000000000000000000000000000000000000000000000000286102b9565b6102b96103a2366004613cd0565b61187e565b61025b6103b5366004613cd0565b61189d565b6102b96103c8366004613d7f565b611a40565b6102b96103db366004613cd0565b611b0e565b61025b611b36565b6102b96103f6366004613c69565b611b45565b6102b3610409366004613da8565b611c13565b6102b361041c366004613ea3565b611c22565b7f00000000000000000000000000000000000000000000000000000000000004b06102b9565b61025b610455366004613c69565b611cca565b6102b9610468366004613c69565b611dd8565b7f00000000000000000000000000000000000000000000000000000000000003846102b9565b7f00000000000000000000000000000000000000000000000000000000000000636102b9565b61023e6104c7366004613f4e565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102b9611dec565b6102b9610518366004613cd0565b611e08565b7f0000000000000000000000000000000000000000000000000000000000000ce46102b9565b6102b3610551366004613f81565b612043565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f490649060000000000000000000000000000000000000000000000000000000014806105ac57506105ac826123a8565b92915050565b6060600080546105c190613fa4565b80601f01602080910402602001604051908101604052809291908181526020018280546105ed90613fa4565b801561063a5780601f1061060f5761010080835404028352916020019161063a565b820191906000526020600020905b81548152906001019060200180831161061d57829003601f168201915b5050505050905090565b600061064f826123fe565b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610683826117f2565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff8216148061076e575061076e81336104c7565b6107fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161073c565b610804838361248c565b505050565b600061081361252c565b600061081e60085490565b905061082c6012600a614140565b61083990620a2c2a61414c565b8410158015610861575061084f6012600a614140565b61085d906305f5e10061414c565b8411155b801561086d5750828411155b6108d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f5752473a20696e76616c6964207374616b650000000000000000000000000000604482015260640161073c565b7f0000000000000000000000000000000000000000000000000000000000000063811061095c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5752473a20737570706c79206361702072656163686564000000000000000000604482015260640161073c565b60006109688286611e08565b905083811115801561097a5750848110155b6109e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5752473a2066726f6e7472756e2070726f74656374696f6e0000000000000000604482015260640161073c565b6040805160a0810182523380825243602083015282517f119ff0bf000000000000000000000000000000000000000000000000000000008152600481019190915260009282019073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002c91d908e9fab2dd2441532a04182d791e590f2d169063119ff0bf90602401602060405180830381865afa158015610a85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa99190614163565b815260200187815260200142815250905080602001518160400151118015610ae4575061fd20610ae18260400151836020015161187e565b11155b610b4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f63616e6e6f742065736361706520646561746800000000000000000000000000604482015260640161073c565b600d546000908152600b6020908152604091829020835181547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff91821617825591840151600182015583830151600282015560608401516003820155608084015160049182015591517fdd62ed3e000000000000000000000000000000000000000000000000000000008152339281019290925230602483015283917f0000000000000000000000002c91d908e9fab2dd2441532a04182d791e590f2d9091169063dd62ed3e90604401602060405180830381865afa158015610c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6b9190614163565b1015610cd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161073c565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015282907f0000000000000000000000002c91d908e9fab2dd2441532a04182d791e590f2d73ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610d5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d839190614163565b1015610e11576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161073c565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790527f0000000000000000000000002c91d908e9fab2dd2441532a04182d791e590f2d73ffffffffffffffffffffffffffffffffffffffff16906323b872dd906064016020604051808303816000875af1158015610eaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ece919061417c565b610f34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5752473a206661696c656420746f207472616e73666572000000000000000000604482015260640161073c565b858211156110895773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002c91d908e9fab2dd2441532a04182d791e590f2d166323b872dd3361dead610f868a87614199565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260448201526064016020604051808303816000875af1158015610fff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611023919061417c565b611089576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f5752473a206661696c656420746f206275726e00000000000000000000000000604482015260640161073c565b600d80546110a891339190600061109f836141ac565b9190505561259f565b600193505050506105ac6001600a55565b6110c333826125b9565b61114f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f76656400000000000000000000000000000000000000606482015260840161073c565b610804838383612678565b600061116583611a40565b82106111f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e6473000000000000000000000000000000000000000000606482015260840161073c565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600660209081526040808320938352929052205490565b6060600061123687611b45565b9050600061124487876116e4565b905060006112bc6040518060400160405280600681526020017f4275726e656400000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f224e6f2200000000000000000000000000000000000000000000000000000000815250612980565b60408051808201909152600681527f5374616b656400000000000000000000000000000000000000000000000000006020820152611317906113126113036012600a614140565b61130d908e6141e4565b6129ac565b612980565b61137d6040518060400160405280600581526020017f506861736500000000000000000000000000000000000000000000000000000081525061135986612a6a565b604051602001611369919061423b565b604051602081830303815290604052612980565b6113bf6040518060400160405280600a81526020017f53617475726174696f6e0000000000000000000000000000000000000000000081525061135988612b6c565b6113cc61130d8d8d61187e565b6040516020016113dc9190614285565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282018252600683527f4d696e7465720000000000000000000000000000000000000000000000000000602084015290517f25b1f78000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8d16600482015290916114ff9173157e43fd2c7285172bd3b2826c2e7c5d790d8bb6906325b1f78090602401600060405180830381865af41580156114b9573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526113599190810190614347565b6115088b6129ac565b6040516020016115189190614390565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261155997969594939291602001614422565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181526020830190915260008252915061169b906115a0908c90612c79565b6040517f7539837e000000000000000000000000000000000000000000000000000000008152600481018d9052602481018c9052604481018a905273ffffffffffffffffffffffffffffffffffffffff89811660648301526084820187905260a482018690527f000000000000000000000000549f1387948dcd57bf1e48ed9f977b5bc9bdd26d1690637539837e9060c401600060405180830381865afa15801561164f573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526116959190810190614347565b83612c96565b9a9950505050505050505050565b60006116b76012600a614140565b6116c490620a2c2a61414c565b905090565b61080483838360405180602001604052806000815250611c22565b6000806116f18385614199565b90506107088111156117265761591081111561171f5761ab18811115611718576000611729565b6001611729565b6002611729565b60035b60ff16949350505050565b600061173f60085490565b82106117cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e64730000000000000000000000000000000000000000606482015260840161073c565b600882815481106117e0576117e0614529565b90600052602060002001549050919050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff16806105ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604482015260640161073c565b600061188a8284614199565b6118969061fd20614199565b9392505050565b606060006118aa83611b45565b9050611a386118ee856040518060400160405280600981526020017f205b4255524e45445d0000000000000000000000000000000000000000000000815250612c79565b6040517f1682a92f000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000549f1387948dcd57bf1e48ed9f977b5bc9bdd26d73ffffffffffffffffffffffffffffffffffffffff1690631682a92f90602401600060405180830381865afa158015611979573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526119bf9190810190614347565b611a336040518060400160405280600681526020017f4275726e656400000000000000000000000000000000000000000000000000008152506040518060400160405280600581526020017f2259657322000000000000000000000000000000000000000000000000000000815250612980565b612c96565b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff8216611ae5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e65720000000000000000000000000000000000000000000000606482015260840161073c565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b6000612710831015611b1f57600080fd5b612710611b2c838561414c565b61189691906141e4565b6060600180546105c190613fa4565b6000611b536012600a614140565b611b6090620a2c2a61414c565b8211611b6e57506000919050565b611b7a6012600a614140565b611b88906305f5e10061414c565b8210611b9657506003919050565b611ba26012600a614140565b611baf90626acfc061414c565b8210611bbd57506003919050565b611bc96012600a614140565b611bd690622dc6c061414c565b8210611be457506002919050565b611bf06012600a614140565b611bfd90620f424061414c565b8210611c0b57506001919050565b506000919050565b611c1e338383612cf4565b5050565b611c2c33836125b9565b611cb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f76656400000000000000000000000000000000000000606482015260840161073c565b611cc484848484612e21565b50505050565b6000818152600c602090815260409182902082518084019093528054808452600190910154918301919091526060919015611d09576118968382612ec4565b6000838152600b6020908152604091829020825160a081018452815473ffffffffffffffffffffffffffffffffffffffff16815260018201549281019290925260028101549282018390526003810154606083015260040154608082015290611dce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604482015260640161073c565b611a388482612edb565b60006105ac611de660085490565b83611e08565b6000611dfa6012600a614140565b6116c4906305f5e10061414c565b60007f00000000000000000000000000000000000000000000000000000000000000638310611e93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5752473a20737570706c79206361702072656163686564000000000000000000604482015260640161073c565b6000611edf7f00000000000000000000000000000000000000000000000000000000000000287f0000000000000000000000000000000000000000000000000000000000000063614199565b90506000611f0d847f0000000000000000000000000000000000000000000000000000000000000ce4611b0e565b90506000611f3b857f0000000000000000000000000000000000000000000000000000000000000384611b0e565b90506000611f69867f00000000000000000000000000000000000000000000000000000000000004b0611b0e565b90506000808511611f7a5783611fa5565b828589611f878388614199565b611f91919061414c565b611f9b91906141e4565b611fa59190614558565b90506000848210611fb65784611fb8565b815b611fc29089614558565b9050858911156120375760027f0000000000000000000000000000000000000000000000000000000000000028611ff885612eff565b612002898d614199565b61200c919061414c565b61201691906141e4565b612020919061456b565b61202a9082614199565b96505050505050506105ac565b98975050505050505050565b61204b61252c565b61205533836125b9565b6120e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f76656400000000000000000000000000000000000000606482015260840161073c565b6000828152600b6020908152604091829020825160a081018452815473ffffffffffffffffffffffffffffffffffffffff1681526001820154928101929092526002810154928201839052600381015460608301526004015460808201529015801590612152575060008160600151115b6121b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f5752473a20696e76616c696420746f6b656e0000000000000000000000000000604482015260640161073c565b6000838152600b6020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681556001810182905560028101829055600381018290556004015561220e83612f6f565b60408051808201825243815260608301805160208084019182526000888152600c9091528490208351815590516001909101555191517f23b872dd00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8581166024830152604482019390935290917f0000000000000000000000002c91d908e9fab2dd2441532a04182d791e590f2d16906323b872dd906064016020604051808303816000875af11580156122df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612303919061417c565b612369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5752473a206661696c656420746f207472616e73666572000000000000000000604482015260640161073c565b6040518481527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79060200160405180910390a15050611c1e6001600a55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d630000000000000000000000000000000000000000000000000000000014806105ac57506105ac82613055565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16612489576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604482015260640161073c565b50565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841690811790915581906124e6826117f2565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6002600a5403612598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161073c565b6002600a55565b611c1e828260405180602001604052806000815250613138565b6000806125c5836117f2565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612633575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b80611a3857508373ffffffffffffffffffffffffffffffffffffffff1661265984610644565b73ffffffffffffffffffffffffffffffffffffffff1614949350505050565b8273ffffffffffffffffffffffffffffffffffffffff16612698826117f2565b73ffffffffffffffffffffffffffffffffffffffff161461273b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e6572000000000000000000000000000000000000000000000000000000606482015260840161073c565b73ffffffffffffffffffffffffffffffffffffffff82166127dd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161073c565b6127ea83838360016131db565b8273ffffffffffffffffffffffffffffffffffffffff1661280a826117f2565b73ffffffffffffffffffffffffffffffffffffffff16146128ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e6572000000000000000000000000000000000000000000000000000000606482015260840161073c565b600081815260046020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff8781168086526003855283862080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6060828260405160200161299592919061457a565b604051602081830303815290604052905092915050565b606060006129b9836131e7565b600101905060008167ffffffffffffffff8111156129d9576129d9613ddf565b6040519080825280601f01601f191660200182016040528015612a03576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084612a0d57509392505050565b6040805160c0810182526008608082018181527f537069726974656400000000000000000000000000000000000000000000000060a08401528252825180840184529081527f496e7472657069640000000000000000000000000000000000000000000000006020828101919091528083019190915282518084018452600681527f446172696e67000000000000000000000000000000000000000000000000000081830152828401528251808401909352600b83527f496e646f6d697461626c6500000000000000000000000000000000000000000090830152606081810192909252808360048110612b6057612b60614529565b60200201519392505050565b6060600060405180608001604052806040518060400160405280600881526020017f4461796c6967687400000000000000000000000000000000000000000000000081525081526020016040518060400160405280600881526020017f5477696c6967687400000000000000000000000000000000000000000000000081525081526020016040518060400160405280600481526020017f4475736b0000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600981526020017f4d6f6f6e6c6967687400000000000000000000000000000000000000000000008152508152509050808360048110612b6057612b60614529565b6060612c84836129ac565b82604051602001612995929190614671565b6060612ccc84612ca5856132c9565b84604051602001612cb8939291906146cc565b6040516020818303038152906040526132c9565b604051602001612cdc9190614a8e565b60405160208183030381529060405290509392505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612d89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161073c565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612e2c848484612678565b612e388484848461341c565b611cc4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161073c565b6060612ed483836020015161189d565b90506105ac565b60606118968383606001518460400151856020015186600001518760800151611229565b60006003821115612f605750806000612f196002836141e4565b612f24906001614558565b90505b81811015612f5a57905080600281612f3f81866141e4565b612f499190614558565b612f5391906141e4565b9050612f27565b50919050565b8115612f6a575060015b919050565b6000612f7a826117f2565b9050612f8a8160008460016131db565b612f93826117f2565b600083815260046020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff85168085526003845282852080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806130e857507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806105ac57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146105ac565b613142838361360f565b61314f600084848461341c565b610804576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161073c565b611cc484848484613842565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613230577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831061325c576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061327a57662386f26fc10000830492506010015b6305f5e1008310613292576305f5e100830492506008015b61271083106132a657612710830492506004015b606483106132b8576064830492506002015b600a83106105ac5760010192915050565b606081516000036132e857505060408051602081019091526000815290565b6000604051806060016040528060408152602001614b5f60409139905060006003845160026133179190614558565b61332191906141e4565b61332c90600461414c565b67ffffffffffffffff81111561334457613344613ddf565b6040519080825280601f01601f19166020018201604052801561336e576020820181803683370190505b509050600182016020820185865187015b808210156133da576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f811685015184535060018301925061337f565b50506003865106600181146133f6576002811461340957613411565b603d6001830353603d6002830353613411565b603d60018303535b509195945050505050565b600073ffffffffffffffffffffffffffffffffffffffff84163b15613604576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613493903390899088908890600401614ad3565b6020604051808303816000875af19250505080156134ec575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526134e991810190614b12565b60015b6135b9573d80801561351a576040519150601f19603f3d011682016040523d82523d6000602084013e61351f565b606091505b5080516000036135b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161073c565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050611a38565b506001949350505050565b73ffffffffffffffffffffffffffffffffffffffff821661368c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161073c565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613718576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161073c565b6137266000838360016131db565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16156137b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161073c565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260036020908152604080832080546001019055848352600290915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60018111156138d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e736563757469766520747260448201527f616e7366657273206e6f7420737570706f727465640000000000000000000000606482015260840161073c565b8173ffffffffffffffffffffffffffffffffffffffff851661393c5761393781600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613979565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146139795761397985826139e6565b73ffffffffffffffffffffffffffffffffffffffff84166139a25761399d81613a9d565b6139df565b8473ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146139df576139df8482613b4c565b5050505050565b600060016139f384611a40565b6139fd9190614199565b600083815260076020526040902054909150808214613a5d5773ffffffffffffffffffffffffffffffffffffffff841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b50600091825260076020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600681528383209183525290812055565b600854600090613aaf90600190614199565b60008381526009602052604081205460088054939450909284908110613ad757613ad7614529565b906000526020600020015490508060088381548110613af857613af8614529565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480613b3057613b30614b2f565b6001900381819060005260206000200160009055905550505050565b6000613b5783611a40565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461248957600080fd5b600060208284031215613bdd57600080fd5b813561189681613b9d565b60005b83811015613c03578181015183820152602001613beb565b50506000910152565b60008151808452613c24816020860160208601613be8565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006118966020830184613c0c565b600060208284031215613c7b57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114612f6a57600080fd5b60008060408385031215613cb957600080fd5b613cc283613c82565b946020939093013593505050565b60008060408385031215613ce357600080fd5b50508035926020909101359150565b600080600060608486031215613d0757600080fd5b613d1084613c82565b9250613d1e60208501613c82565b9150604084013590509250925092565b60008060008060008060c08789031215613d4757600080fd5b86359550602087013594506040870135935060608701359250613d6c60808801613c82565b915060a087013590509295509295509295565b600060208284031215613d9157600080fd5b61189682613c82565b801515811461248957600080fd5b60008060408385031215613dbb57600080fd5b613dc483613c82565b91506020830135613dd481613d9a565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613e5557613e55613ddf565b604052919050565b600067ffffffffffffffff821115613e7757613e77613ddf565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008060008060808587031215613eb957600080fd5b613ec285613c82565b9350613ed060208601613c82565b925060408501359150606085013567ffffffffffffffff811115613ef357600080fd5b8501601f81018713613f0457600080fd5b8035613f17613f1282613e5d565b613e0e565b818152886020838501011115613f2c57600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215613f6157600080fd5b613f6a83613c82565b9150613f7860208401613c82565b90509250929050565b60008060408385031215613f9457600080fd5b82359150613f7860208401613c82565b600181811c90821680613fb857607f821691505b602082108103612f5a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600181815b8085111561407957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561405f5761405f613ff1565b8085161561406c57918102915b93841c9390800290614025565b509250929050565b600082614090575060016105ac565b8161409d575060006105ac565b81600181146140b357600281146140bd576140d9565b60019150506105ac565b60ff8411156140ce576140ce613ff1565b50506001821b6105ac565b5060208310610133831016604e8410600b84101617156140fc575081810a6105ac565b6141068383614020565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561413857614138613ff1565b029392505050565b60006118968383614081565b80820281158282048414176105ac576105ac613ff1565b60006020828403121561417557600080fd5b5051919050565b60006020828403121561418e57600080fd5b815161189681613d9a565b818103818111156105ac576105ac613ff1565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036141dd576141dd613ff1565b5060010190565b60008261421a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60008151614231818560208601613be8565b9290920192915050565b60007f22000000000000000000000000000000000000000000000000000000000000008083528351614274816001860160208801613be8565b600193019283015250600201919050565b7f7b22646973706c61795f74797065223a20226e756d626572222c20227472616981527f745f74797065223a202250726f78696d697479222c202276616c7565223a20006020820152600082516142e381603f850160208701613be8565b7f7d00000000000000000000000000000000000000000000000000000000000000603f939091019283015250604001919050565b6000614325613f1284613e5d565b905082815283838301111561433957600080fd5b611896836020830184613be8565b60006020828403121561435957600080fd5b815167ffffffffffffffff81111561437057600080fd5b8201601f8101841361438157600080fd5b611a3884825160208401614317565b7f7b22646973706c61795f74797065223a202264617465222c202274726169745f81527f74797065223a20224d696e746564222c202276616c7565223a200000000000006020820152600082516143ee81603a850160208701613be8565b7f7d00000000000000000000000000000000000000000000000000000000000000603a939091019283015250603b01919050565b6000885160206144358285838e01613be8565b81840191507f2c000000000000000000000000000000000000000000000000000000000000008083528a516144708160018601858f01613be8565b60019301928301819052895161448c8160028601858e01613be8565b6002930192830181905288516144a88160038601858d01613be8565b6003930192830181905287516144c48160048601858c01613be8565b600493019283015285516144de8160058501848a01613be8565b6145196145136005838601017f2c00000000000000000000000000000000000000000000000000000000000000815260010190565b8761421f565b9c9b505050505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b808201808211156105ac576105ac613ff1565b600061189660ff841683614081565b7f7b0000000000000000000000000000000000000000000000000000000000000081527f2274726169745f74797065223a220000000000000000000000000000000000006001820152600083516145d881600f850160208801613be8565b7f222c000000000000000000000000000000000000000000000000000000000000600f918401918201527f2276616c7565223a0000000000000000000000000000000000000000000000006011820152835161463b816019840160208801613be8565b7f7d0000000000000000000000000000000000000000000000000000000000000060199290910191820152601a01949350505050565b7f57524150504544205245415045522023000000000000000000000000000000008152600083516146a9816010850160208801613be8565b8351908301906146c0816010840160208801613be8565b01601001949350505050565b7f7b0000000000000000000000000000000000000000000000000000000000000081527f226e616d65223a2200000000000000000000000000000000000000000000000060018201526000845161472a816009850160208901613be8565b7f222c0000000000000000000000000000000000000000000000000000000000006009918401918201527f226465736372697074696f6e223a000000000000000000000000000000000000600b8201527f220000000000000000000000000000000000000000000000000000000000000060198201527ff09f928020e29a94efb88f20434845415420444541544820e29a94efb88f20f0601a8201527f9f92805c6e5c6e5772617070656420526561706572206973206120636f6d6d75603a8201527f6e69747920657874656e73696f6e20746f207468652052656170657227732047605a8201527f616d6269742065636f73797374656d207468617420656e61626c657320686f6c607a8201527f6465727320746f2073616665677561726420746865697220686f617264206672609a8201527f6f6d2074686520636c757463686573206f6620746865207265617065722e5c6e60ba8201527f5c6e2452472063616e206265207374616b656420696e73696465206f6620577260da8201527f61707065642052656170657220696e2065786368616e676520666f722061207460fa8201527f72696275746520746f20746865206275726e20616464726573732e5c6e5c6e4c61011a8201527f6561726e206d6f72652061742068747470733a2f2f7265617065727367616d6261013a8201527f69742e636f6d000000000000000000000000000000000000000000000000000061015a820152614a84614a5b614a32614513614a096149e06149da61498b61016089017f222c000000000000000000000000000000000000000000000000000000000000815260020190565b7f22696d616765223a22646174613a696d6167652f7376672b786d6c3b6261736581527f36342c0000000000000000000000000000000000000000000000000000000000602082015260230190565b8b61421f565b7f222c000000000000000000000000000000000000000000000000000000000000815260020190565b7f2261747472696275746573223a5b0000000000000000000000000000000000008152600e0190565b7f5d00000000000000000000000000000000000000000000000000000000000000815260010190565b7f7d00000000000000000000000000000000000000000000000000000000000000815260010190565b9695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251614ac681601d850160208701613be8565b91909101601d0192915050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152614a846080830184613c0c565b600060208284031215614b2457600080fd5b815161189681613b9d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220e0339d6c641ff364806f7ee68b35a91adbb7fbd7c4eb42c21e54b841a6bb81cf64736f6c63430008110033

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

0000000000000000000000002c91d908e9fab2dd2441532a04182d791e590f2d000000000000000000000000549f1387948dcd57bf1e48ed9f977b5bc9bdd26d000000000000000000000000000000000000000000000000000000000000006300000000000000000000000000000000000000000000000000000000000003840000000000000000000000000000000000000000000000000000000000000ce4000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000004b0

-----Decoded View---------------
Arg [0] : reapersGambit (address): 0x2C91D908E9fab2dD2441532a04182d791e590f2d
Arg [1] : wrappedReaperRenderer (address): 0x549f1387948DcD57bF1e48eD9f977B5BC9BDd26d
Arg [2] : maxSupply_ (uint256): 99
Arg [3] : minTaxBasisPoints__ (uint256): 900
Arg [4] : maxTaxBasisPoints__ (uint256): 3300
Arg [5] : bladeWidth__ (uint256): 40
Arg [6] : bladeDiscountBasisPoints__ (uint256): 1200

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000002c91d908e9fab2dd2441532a04182d791e590f2d
Arg [1] : 000000000000000000000000549f1387948dcd57bf1e48ed9f977b5bc9bdd26d
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000063
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000384
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000ce4
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000028
Arg [6] : 00000000000000000000000000000000000000000000000000000000000004b0


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.