ETH Price: $2,812.22 (+7.14%)
 

Overview

TokenID

12823

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

The Creepz presents the reptile armoury. The most high-tech interstellar gizmos to upgrade your army in the invasion of earth. T&Cs apply: requires Creepz to be staked to yield. You may also need to pay scavengers for extra parts.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
ReptileArmoury

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.8.7;

import "../utils/ERC721Enumerable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

interface ILOOMI {
  function spendLoomi(address user, uint256 amount) external;
  function getUserBalance(address user) external view returns (uint256);
}

interface ISTAKING {
  function registerDeposit(address owner, address contractAddress, uint256 tokenId) external;
}

/**
 * @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 ReptileArmoury is Context, ERC721Enumerable, VRFConsumerBase, Ownable, ReentrancyGuard  {
    using SafeMath for uint256;
    using Strings for uint256;

    // currentSupply
    uint256 private currentSupply;

    // Provenance hash
    string public PROVENANCE_HASH;

    // Base URI
    string private _armsBaseURI;

    // Starting Index
    uint256 public startingIndex;

    // Max number of NFTs
    uint256 public constant MAX_SUPPLY = 20000;
    uint256 public constant BASE_RATE_TOKENS = 3;
    uint256 public _basePrice;
    uint256 public _incrementRate;

    bool public saleIsActive;
    bool public metadataFinalised;
    bool public startingIndexSet;

    // Royalty info
    address public royaltyAddress;
    uint256 public ROYALTY_SIZE = 750;
    uint256 public ROYALTY_DENOMINATOR = 10000;
    mapping(uint256 => address) private _royaltyReceivers;

    // Loomi contract
    ILOOMI public LOOMI;
    ISTAKING public STAKING;

    // Stores the number of minted tokens by user
    mapping(address => uint256) public _mintedByAddress;

    bytes32 internal keyHash;
    uint256 internal fee;

    event TokensMinted(
      address indexed mintedBy,
      uint256 indexed tokensNumber
    );

    event startingIndexFinalized(
      uint256 indexed startingIndex
    );

    event baseUriUpdated(
      string oldBaseUri,
      string newBaseUri
    );

    constructor(address _royaltyAddress, address _loomi, address _staking, string memory _baseURI)
    ERC721("Reptile Armoury", "ARMS")
    VRFConsumerBase(
      0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
      0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
    )
    {
      royaltyAddress = _royaltyAddress;

      LOOMI = ILOOMI(_loomi);
      STAKING = ISTAKING(_staking);

      keyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445;
      fee = 2 * 10 ** 18;

      _armsBaseURI = _baseURI;
    }

    function armsPurchase(uint256 tokensToMint, bool autoStake) public nonReentrant {
      if (_msgSender() != owner()) require(saleIsActive, "The mint has not started yet");

      require(tokensToMint > 0, "Min mint is 1 token");
      require(tokensToMint <= 50, "You can mint max 50 tokens per transaction");
      require(totalSupply().add(tokensToMint) <= MAX_SUPPLY, "Mint more tokens than allowed");

      if (_msgSender() != owner()) {
        uint256 batchPrice = getTokenPrice(_msgSender(), tokensToMint);

        LOOMI.spendLoomi(_msgSender(), batchPrice);
        _mintedByAddress[_msgSender()] += tokensToMint;
      }

      address to = autoStake ? address(STAKING) : _msgSender();

      for(uint256 i = 0; i < tokensToMint; i++) {
        uint256 tokenId = totalSupply();
        _safeMint(to, tokenId);
        if (autoStake) STAKING.registerDeposit(_msgSender(), address(this), tokenId);
      }

      emit TokensMinted(_msgSender(), tokensToMint);
    }

    function getTokenPrice(address user, uint256 amount) public view returns (uint256) {
      uint256 minted = _mintedByAddress[user];
      if (minted.add(amount) <= BASE_RATE_TOKENS) return amount.mul(_basePrice);

      uint256 totalPrice;
      for (uint256 i; i < amount; i++) {
        minted = minted.add(1);
        if(minted <= BASE_RATE_TOKENS) {
          totalPrice = totalPrice.add(_basePrice);
          continue;
        }
        totalPrice += _basePrice.add((minted.sub(BASE_RATE_TOKENS).mul(_incrementRate)));
      }
      return totalPrice;
    }

    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
      uint256 amount = _salePrice.mul(ROYALTY_SIZE).div(ROYALTY_DENOMINATOR);
      address royaltyReceiver = _royaltyReceivers[_tokenId] != address(0) ? _royaltyReceivers[_tokenId] : royaltyAddress;
      return (royaltyReceiver, amount);
    }

    function addRoyaltyReceiverForTokenId(address receiver, uint256 tokenId) public onlyOwner {
      _royaltyReceivers[tokenId] = receiver;
    }

    function updateSaleStatus(bool status) public onlyOwner {
      saleIsActive = status;
    }

    function updateBasePrice(uint256 _newPrice) public onlyOwner {
      require(!saleIsActive, "Pause sale before price update");
      _basePrice = _newPrice;
    }

    function updateIncrementRate(uint256 _newRate) public onlyOwner {
      require(!saleIsActive, "Pause sale before price update");
      _incrementRate = _newRate;
    }

    function setProvenanceHash(string memory provenanceHash) public onlyOwner {
      require(bytes(PROVENANCE_HASH).length == 0, "Provenance hash has already been set");
      PROVENANCE_HASH = provenanceHash;
    }

    function setBaseURI(string memory newBaseURI) public onlyOwner {
      require(!metadataFinalised, "Metadata already finalised");

      string memory currentURI = _armsBaseURI;
      _armsBaseURI = newBaseURI;
      emit baseUriUpdated(currentURI, newBaseURI);
    }

    function finalizeStartingIndex() public onlyOwner returns (bytes32 requestId) {
      require(!startingIndexSet, 'startingIndex already set');

      require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK - fill contract with faucet");
      return requestRandomness(keyHash, fee);
    }

    /**
     * Callback function used by VRF Coordinator
     */
    function fulfillRandomness(bytes32, uint256 randomness) internal override {
        startingIndex = (randomness % MAX_SUPPLY);
        startingIndexSet = true;
        emit startingIndexFinalized(startingIndex);
    }

    function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {
      require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

      return string(abi.encodePacked(_armsBaseURI, tokenId.toString()));
    }

    function finalizeMetadata() public onlyOwner {
      require(!metadataFinalised, "Metadata already finalised");
      metadataFinalised = true;
    }

    function withdraw() external onlyOwner {
      uint256 balance = address(this).balance;
      payable(owner()).transfer(balance);
    }
}

File 2 of 17 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.7;

import "./ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/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 but rips out the core of the gas-wasting processing that comes from OpenZeppelin.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    /**
     * @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-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _owners.length;
    }

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

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

        uint count;
        for(uint i; i < _owners.length; i++){
            if(owner == _owners[i]){
                if(count == index) return i;
                else count++;
            }
        }

        revert("ERC721Enumerable: owner index out of bounds");
    }
}

File 3 of 17 : VRFConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interfaces/LinkTokenInterface.sol";

import "./VRFRequestIDBase.sol";

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constuctor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator, _link) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash), and have told you the minimum LINK
 * @dev price for VRF service. Make sure your contract has sufficient LINK, and
 * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you
 * @dev want to generate randomness from.
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomness method.
 *
 * @dev The randomness argument to fulfillRandomness is the actual random value
 * @dev generated from your seed.
 *
 * @dev The requestId argument is generated from the keyHash and the seed by
 * @dev makeRequestId(keyHash, seed). If your contract could have concurrent
 * @dev requests open, you can use the requestId to track which seed is
 * @dev associated with which randomness. See VRFRequestIDBase.sol for more
 * @dev details. (See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.)
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ. (Which is critical to making unpredictable randomness! See the
 * @dev next section.)
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the ultimate input to the VRF is mixed with the block hash of the
 * @dev block in which the request is made, user-provided seeds have no impact
 * @dev on its economic security properties. They are only included for API
 * @dev compatability with previous versions of this contract.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request.
 */
abstract contract VRFConsumerBase is VRFRequestIDBase {

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

  /**
   * @dev In order to keep backwards compatibility we have kept the user
   * seed field around. We remove the use of it because given that the blockhash
   * enters later, it overrides whatever randomness the used seed provides.
   * Given that it adds no security, and can easily lead to misunderstandings,
   * we have removed it from usage and can now provide a simpler API.
   */
  uint256 constant private USER_SEED_PLACEHOLDER = 0;

  /**
   * @notice requestRandomness initiates a request for VRF output given _seed
   *
   * @dev The fulfillRandomness method receives the output, once it's provided
   * @dev by the Oracle, and verified by the vrfCoordinator.
   *
   * @dev The _keyHash must already be registered with the VRFCoordinator, and
   * @dev the _fee must exceed the fee specified during registration of the
   * @dev _keyHash.
   *
   * @dev The _seed parameter is vestigial, and is kept only for API
   * @dev compatibility with older versions. It can't *hurt* to mix in some of
   * @dev your own randomness, here, but it's not necessary because the VRF
   * @dev oracle will mix the hash of the block containing your request into the
   * @dev VRF seed it ultimately uses.
   *
   * @param _keyHash ID of public key against which randomness is generated
   * @param _fee The amount of LINK to send with the request
   *
   * @return requestId unique ID for this request
   *
   * @dev The returned requestId can be used to distinguish responses to
   * @dev concurrent requests. It is passed as the first argument to
   * @dev fulfillRandomness.
   */
  function requestRandomness(
    bytes32 _keyHash,
    uint256 _fee
  )
    internal
    returns (
      bytes32 requestId
    )
  {
    LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER));
    // This is the seed passed to VRFCoordinator. The oracle will mix this with
    // the hash of the block containing this request to obtain the seed/input
    // which is finally passed to the VRF cryptographic machinery.
    uint256 vRFSeed  = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]);
    // nonces[_keyHash] must stay in sync with
    // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above
    // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).
    // This provides protection against the user repeating their input seed,
    // which would result in a predictable/duplicate output, if multiple such
    // requests appeared in the same block.
    nonces[_keyHash] = nonces[_keyHash] + 1;
    return makeRequestId(_keyHash, vRFSeed);
  }

  LinkTokenInterface immutable internal LINK;
  address immutable private vrfCoordinator;

  // Nonces for each VRF key from which randomness has been requested.
  //
  // Must stay in sync with VRFCoordinator[_keyHash][this]
  mapping(bytes32 /* keyHash */ => uint256 /* nonce */) private nonces;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   * @param _link address of LINK token contract
   *
   * @dev https://docs.chain.link/docs/link-token-contracts
   */
  constructor(
    address _vrfCoordinator,
    address _link
  ) {
    vrfCoordinator = _vrfCoordinator;
    LINK = LinkTokenInterface(_link);
  }

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomness(
    bytes32 requestId,
    uint256 randomness
  )
    external
  {
    require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill");
    fulfillRandomness(requestId, randomness);
  }
}

File 4 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

File 5 of 17 : 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 6 of 17 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 8 of 17 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.7;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

library Address {
    function isContract(address account) internal view returns (bool) {
        uint size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }
}

abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;
    
    string private _name;
    string private _symbol;

    // Mapping from token ID to owner address
    address[] internal _owners;

    mapping(uint256 => address) private _tokenApprovals;
    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 (uint) 
    {
        require(owner != address(0), "ERC721: balance query for the zero address");

        uint count;
        for( uint i; i < _owners.length; ++i ){
          if( owner == _owners[i] )
            ++count;
        }
        return count;
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId)
        public
        view
        virtual
        override
        returns (address)
    {
        address owner = _owners[tokenId];
        require(
            owner != address(0),
            "ERC721: owner query for nonexistent token"
        );
        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 {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 owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId)
        public
        view
        virtual
        override
        returns (address)
    {
        require(
            _exists(tokenId),
            "ERC721: approved query for nonexistent token"
        );

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved)
        public
        virtual
        override
    {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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: transfer caller is not owner nor 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: transfer caller is not owner nor 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 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 tokenId < _owners.length && _owners[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)
    {
        require(
            _exists(tokenId),
            "ERC721: operator query for nonexistent token"
        );
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner ||
            getApproved(tokenId) == spender ||
            isApprovedForAll(owner, 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);
        _owners.push(to);

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

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

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

        // Clear approvals
        _approve(address(0), tokenId);
        _owners[tokenId] = address(0);

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

    /**
     * @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 of token that is not own"
        );
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

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

    /**
     * @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 {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 9 of 17 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 tokenId);

    /**
     * @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 10 of 17 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

File 11 of 17 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 12 of 17 : 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 13 of 17 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 16 of 17 : LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface LinkTokenInterface {

  function allowance(
    address owner,
    address spender
  )
    external
    view
    returns (
      uint256 remaining
    );

  function approve(
    address spender,
    uint256 value
  )
    external
    returns (
      bool success
    );

  function balanceOf(
    address owner
  )
    external
    view
    returns (
      uint256 balance
    );

  function decimals()
    external
    view
    returns (
      uint8 decimalPlaces
    );

  function decreaseApproval(
    address spender,
    uint256 addedValue
  )
    external
    returns (
      bool success
    );

  function increaseApproval(
    address spender,
    uint256 subtractedValue
  ) external;

  function name()
    external
    view
    returns (
      string memory tokenName
    );

  function symbol()
    external
    view
    returns (
      string memory tokenSymbol
    );

  function totalSupply()
    external
    view
    returns (
      uint256 totalTokensIssued
    );

  function transfer(
    address to,
    uint256 value
  )
    external
    returns (
      bool success
    );

  function transferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  )
    external
    returns (
      bool success
    );

  function transferFrom(
    address from,
    address to,
    uint256 value
  )
    external
    returns (
      bool success
    );

}

File 17 of 17 : VRFRequestIDBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract VRFRequestIDBase {

  /**
   * @notice returns the seed which is actually input to the VRF coordinator
   *
   * @dev To prevent repetition of VRF output due to repetition of the
   * @dev user-supplied seed, that seed is combined in a hash with the
   * @dev user-specific nonce, and the address of the consuming contract. The
   * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in
   * @dev the final seed, but the nonce does protect against repetition in
   * @dev requests which are included in a single block.
   *
   * @param _userSeed VRF seed input provided by user
   * @param _requester Address of the requesting contract
   * @param _nonce User-specific nonce at the time of the request
   */
  function makeVRFInputSeed(
    bytes32 _keyHash,
    uint256 _userSeed,
    address _requester,
    uint256 _nonce
  )
    internal
    pure
    returns (
      uint256
    )
  {
    return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));
  }

  /**
   * @notice Returns the id for this request
   * @param _keyHash The serviceAgreement ID to be used for this request
   * @param _vRFInputSeed The seed to be passed directly to the VRF
   * @return The id for this request
   *
   * @dev Note that _vRFInputSeed is not the seed passed by the consuming
   * @dev contract, but the one generated by makeVRFInputSeed
   */
  function makeRequestId(
    bytes32 _keyHash,
    uint256 _vRFInputSeed
  )
    internal
    pure
    returns (
      bytes32
    )
  {
    return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));
  }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_royaltyAddress","type":"address"},{"internalType":"address","name":"_loomi","type":"address"},{"internalType":"address","name":"_staking","type":"address"},{"internalType":"string","name":"_baseURI","type":"string"}],"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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"mintedBy","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokensNumber","type":"uint256"}],"name":"TokensMinted","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"oldBaseUri","type":"string"},{"indexed":false,"internalType":"string","name":"newBaseUri","type":"string"}],"name":"baseUriUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"startingIndex","type":"uint256"}],"name":"startingIndexFinalized","type":"event"},{"inputs":[],"name":"BASE_RATE_TOKENS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOOMI","outputs":[{"internalType":"contract ILOOMI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROVENANCE_HASH","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROYALTY_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROYALTY_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAKING","outputs":[{"internalType":"contract ISTAKING","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_basePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_incrementRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_mintedByAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"addRoyaltyReceiverForTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokensToMint","type":"uint256"},{"internalType":"bool","name":"autoStake","type":"bool"}],"name":"armsPurchase","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":[],"name":"finalizeMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finalizeStartingIndex","outputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"stateMutability":"nonpayable","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":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getTokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"metadataFinalised","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":"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":[],"name":"saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"provenanceHash","type":"string"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startingIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startingIndexSet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"tokenId","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"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"updateBasePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newRate","type":"uint256"}],"name":"updateIncrementRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"updateSaleStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040526102ee600f556127106010553480156200001d57600080fd5b5060405162002fcd38038062002fcd8339810160408190526200004091620002c0565b604080518082018252600f81526e52657074696c652041726d6f75727960881b60208083019182528351808501909452600484526341524d5360e01b90840152815173f0d54349addcf704f77ae15b96510dea15cb79529373514910771af9ca656af840dff83e8264ecf986ca93929091620000bf91600091620001fd565b508051620000d5906001906020840190620001fd565b5050506001600160601b0319606092831b811660a052911b1660805262000103620000fd3390565b620001ab565b6001600755600e80546001600160a01b038087166301000000026301000000600160b81b031990921691909117909155601280548583166001600160a01b03199182161790915560138054928516929091169190911790557faa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445601555671bc16d674ec800006016558051620001a090600a906020840190620001fd565b505050505062000428565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200020b90620003d5565b90600052602060002090601f0160209004810192826200022f57600085556200027a565b82601f106200024a57805160ff19168380011785556200027a565b828001600101855582156200027a579182015b828111156200027a5782518255916020019190600101906200025d565b50620002889291506200028c565b5090565b5b808211156200028857600081556001016200028d565b80516001600160a01b0381168114620002bb57600080fd5b919050565b60008060008060808587031215620002d757600080fd5b620002e285620002a3565b93506020620002f3818701620002a3565b93506200030360408701620002a3565b60608701519093506001600160401b03808211156200032157600080fd5b818801915088601f8301126200033657600080fd5b8151818111156200034b576200034b62000412565b604051601f8201601f19908116603f0116810190838211818310171562000376576200037662000412565b816040528281528b868487010111156200038f57600080fd5b600093505b82841015620003b3578484018601518185018701529285019262000394565b82841115620003c55760008684830101525b989b979a50959850505050505050565b600181811c90821680620003ea57607f821691505b602082108114156200040c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160601c60a05160601c612b6b62000462600039600081816110530152611de5015260008181610f510152611db60152612b6b6000f3fe608060405234801561001057600080fd5b50600436106102955760003560e01c8063785f403d11610167578063c87b56dd116100ce578063e985e9c511610087578063e985e9c514610596578063eb8d2444146105d2578063f2fde38b146105df578063f4a560a5146105f2578063fd5baa88146105fa578063ff1b65561461060d57600080fd5b8063c87b56dd1461052b578063c9f7153c1461053e578063cb774d4714610551578063cd6a3ea51461055a578063cdfa59a91461056d578063df173dba1461058d57600080fd5b806397610f301161012057806397610f30146104b2578063a22cb465146104c5578063ad2f852a146104d8578063b87e3f49146104f2578063b88d4fde14610505578063c2f6d7e31461051857600080fd5b8063785f403d146104595780637a1e228d146104615780637c86bcb8146104745780638da5cb5b1461048657806394985ddd1461049757806395d89b41146104aa57600080fd5b806332cb6b0c1161020b57806355f804b3116101c457806355f804b3146103fd5780636352211e1461041057806370a0823114610423578063715018a61461043657806374df39c91461043e578063774960f71461044657600080fd5b806332cb6b0c146103b45780633ccfd60b146103bd5780633ef24839146103c557806342842e0e146103ce57806344cf661f146103e15780634f6ccce7146103ea57600080fd5b80630a0889491161025d5780630a0889491461032e578063109695231461034157806318160ddd1461035457806323b872dd1461035c5780632a55205a1461036f5780632f745c59146103a157600080fd5b806301ffc9a71461029a57806306fdde03146102c2578063081812fc146102d7578063095ea7b314610302578063099becfb14610317575b600080fd5b6102ad6102a8366004612639565b610615565b60405190151581526020015b60405180910390f35b6102ca610640565b6040516102b99190612866565b6102ea6102e53660046126bc565b6106d2565b6040516001600160a01b0390911681526020016102b9565b6103156103103660046125b3565b61075f565b005b610320600f5481565b6040519081526020016102b9565b61031561033c3660046125dd565b610875565b61031561034f366004612673565b6108b2565b600254610320565b61031561036a3660046124c4565b61095b565b61038261037d366004612617565b61098c565b604080516001600160a01b0390931683526020830191909152016102b9565b6103206103af3660046125b3565b610a0f565b610320614e2081565b610315610ac2565b610320600d5481565b6103156103dc3660046124c4565b610b37565b610320600c5481565b6103206103f83660046126bc565b610b52565b61031561040b366004612673565b610bbf565b6102ea61041e3660046126bc565b610d23565b610320610431366004612476565b610daf565b610315610e7d565b610320610eb3565b600e546102ad9062010000900460ff1681565b610320600381565b6012546102ea906001600160a01b031681565b600e546102ad90610100900460ff1681565b6006546001600160a01b03166102ea565b6103156104a5366004612617565b611048565b6102ca6110ca565b6013546102ea906001600160a01b031681565b6103156104d336600461257c565b6110d9565b600e546102ea90630100000090046001600160a01b031681565b6103156105003660046126bc565b61119e565b610315610513366004612500565b611220565b6103156105263660046126ee565b611258565b6102ca6105393660046126bc565b6115ff565b61032061054c3660046125b3565b6116a0565b610320600b5481565b6103156105683660046125b3565b611763565b61032061057b366004612476565b60146020526000908152604090205481565b61032060105481565b6102ad6105a4366004612491565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b600e546102ad9060ff1681565b6103156105ed366004612476565b6117bb565b610315611856565b6103156106083660046126bc565b6118e9565b6102ca61196b565b60006001600160e01b0319821663780e9d6360e01b148061063a575061063a826119f9565b92915050565b60606000805461064f90612a4f565b80601f016020809104026020016040519081016040528092919081815260200182805461067b90612a4f565b80156106c85780601f1061069d576101008083540402835291602001916106c8565b820191906000526020600020905b8154815290600101906020018083116106ab57829003601f168201915b5050505050905090565b60006106dd82611a49565b6107435760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600360205260409020546001600160a01b031690565b600061076a82610d23565b9050806001600160a01b0316836001600160a01b031614156107d85760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161073a565b336001600160a01b03821614806107f457506107f481336105a4565b6108665760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161073a565b6108708383611a93565b505050565b6006546001600160a01b0316331461089f5760405162461bcd60e51b815260040161073a9061293b565b600e805460ff1916911515919091179055565b6006546001600160a01b031633146108dc5760405162461bcd60e51b815260040161073a9061293b565b600980546108e990612a4f565b1590506109445760405162461bcd60e51b8152602060048201526024808201527f50726f76656e616e636520686173682068617320616c7265616479206265656e604482015263081cd95d60e21b606482015260840161073a565b8051610957906009906020840190612354565b5050565b6109653382611b01565b6109815760405162461bcd60e51b815260040161073a90612970565b610870838383611beb565b60008060006109b26010546109ac600f5487611d4190919063ffffffff16565b90611d54565b600086815260116020526040812054919250906001600160a01b03166109ea57600e54630100000090046001600160a01b0316610a03565b6000868152601160205260409020546001600160a01b03165b96919550909350505050565b6000610a1a83610daf565b8210610a385760405162461bcd60e51b815260040161073a9061289e565b6000805b600254811015610aa95760028181548110610a5957610a59612ae5565b6000918252602090912001546001600160a01b0386811691161415610a975783821415610a8957915061063a9050565b81610a9381612a8a565b9250505b80610aa181612a8a565b915050610a3c565b5060405162461bcd60e51b815260040161073a9061289e565b6006546001600160a01b03163314610aec5760405162461bcd60e51b815260040161073a9061293b565b47610aff6006546001600160a01b031690565b6001600160a01b03166108fc829081150290604051600060405180830381858888f19350505050158015610957573d6000803e3d6000fd5b61087083838360405180602001604052806000815250611220565b6002546000908210610bbb5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161073a565b5090565b6006546001600160a01b03163314610be95760405162461bcd60e51b815260040161073a9061293b565b600e54610100900460ff1615610c415760405162461bcd60e51b815260206004820152601a60248201527f4d6574616461746120616c72656164792066696e616c69736564000000000000604482015260640161073a565b6000600a8054610c5090612a4f565b80601f0160208091040260200160405190810160405280929190818152602001828054610c7c90612a4f565b8015610cc95780601f10610c9e57610100808354040283529160200191610cc9565b820191906000526020600020905b815481529060010190602001808311610cac57829003601f168201915b50508551939450610ce593600a93506020870192509050612354565b507f9f02bf4cb60375a0a74d238c76d002df33d30d2b85e9e677f03455a22d96c14d8183604051610d17929190612879565b60405180910390a15050565b60008060028381548110610d3957610d39612ae5565b6000918252602090912001546001600160a01b031690508061063a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161073a565b60006001600160a01b038216610e1a5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161073a565b6000805b600254811015610e765760028181548110610e3b57610e3b612ae5565b6000918252602090912001546001600160a01b0385811691161415610e6657610e6382612a8a565b91505b610e6f81612a8a565b9050610e1e565b5092915050565b6006546001600160a01b03163314610ea75760405162461bcd60e51b815260040161073a9061293b565b610eb16000611d60565b565b6006546000906001600160a01b03163314610ee05760405162461bcd60e51b815260040161073a9061293b565b600e5462010000900460ff1615610f395760405162461bcd60e51b815260206004820152601960248201527f7374617274696e67496e64657820616c72656164792073657400000000000000604482015260640161073a565b6016546040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015610f9b57600080fd5b505afa158015610faf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd391906126d5565b10156110355760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e74726163742060448201526a1dda5d1a0819985d58d95d60aa1b606482015260840161073a565b611043601554601654611db2565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146110c05760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015260640161073a565b6109578282611f3d565b60606001805461064f90612a4f565b6001600160a01b0382163314156111325760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161073a565b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6006546001600160a01b031633146111c85760405162461bcd60e51b815260040161073a9061293b565b600e5460ff161561121b5760405162461bcd60e51b815260206004820152601e60248201527f50617573652073616c65206265666f7265207072696365207570646174650000604482015260640161073a565b600d55565b61122a3383611b01565b6112465760405162461bcd60e51b815260040161073a90612970565b61125284848484611f8c565b50505050565b600260075414156112ab5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161073a565b60026007556006546001600160a01b0316331461131457600e5460ff166113145760405162461bcd60e51b815260206004820152601c60248201527f546865206d696e7420686173206e6f7420737461727465642079657400000000604482015260640161073a565b6000821161135a5760405162461bcd60e51b815260206004820152601360248201527226b4b71036b4b73a1034b99018903a37b5b2b760691b604482015260640161073a565b60328211156113be5760405162461bcd60e51b815260206004820152602a60248201527f596f752063616e206d696e74206d617820353020746f6b656e732070657220746044820152693930b739b0b1ba34b7b760b11b606482015260840161073a565b614e206113d4836113ce60025490565b90611fbf565b11156114225760405162461bcd60e51b815260206004820152601d60248201527f4d696e74206d6f726520746f6b656e73207468616e20616c6c6f776564000000604482015260640161073a565b6006546001600160a01b031633146114f757600061144033846116a0565b6012549091506001600160a01b031663bfd77e2b336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b15801561149d57600080fd5b505af11580156114b1573d6000803e3d6000fd5b5050505082601460006114c13390565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114f091906129c1565b9091555050505b6000816115045733611511565b6013546001600160a01b03165b905060005b838110156115c757600061152960025490565b90506115358382611fcb565b83156115b4576013546001600160a01b03166352a664d9336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015230602482015260448101849052606401600060405180830381600087803b15801561159b57600080fd5b505af11580156115af573d6000803e3d6000fd5b505050505b50806115bf81612a8a565b915050611516565b50604051839033907f3f2c9d57c068687834f0de942a9babb9e5acab57d516d3480a3c16ee165a427390600090a35050600160075550565b606061160a82611a49565b61166e5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161073a565b600a61167983611fe5565b60405160200161168a92919061275b565b6040516020818303038152906040529050919050565b6001600160a01b03821660009081526014602052604081205460036116c58285611fbf565b116116e057600c546116d8908490611d41565b91505061063a565b6000805b8481101561175a576116f7836001611fbf565b92506003831161171657600c5461170f908390611fbf565b9150611748565b600d5461173b906117329061172c8660036120e3565b90611d41565b600c5490611fbf565b61174590836129c1565b91505b8061175281612a8a565b9150506116e4565b50949350505050565b6006546001600160a01b0316331461178d5760405162461bcd60e51b815260040161073a9061293b565b600090815260116020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031633146117e55760405162461bcd60e51b815260040161073a9061293b565b6001600160a01b03811661184a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161073a565b61185381611d60565b50565b6006546001600160a01b031633146118805760405162461bcd60e51b815260040161073a9061293b565b600e54610100900460ff16156118d85760405162461bcd60e51b815260206004820152601a60248201527f4d6574616461746120616c72656164792066696e616c69736564000000000000604482015260640161073a565b600e805461ff001916610100179055565b6006546001600160a01b031633146119135760405162461bcd60e51b815260040161073a9061293b565b600e5460ff16156119665760405162461bcd60e51b815260206004820152601e60248201527f50617573652073616c65206265666f7265207072696365207570646174650000604482015260640161073a565b600c55565b6009805461197890612a4f565b80601f01602080910402602001604051908101604052809291908181526020018280546119a490612a4f565b80156119f15780601f106119c6576101008083540402835291602001916119f1565b820191906000526020600020905b8154815290600101906020018083116119d457829003601f168201915b505050505081565b60006001600160e01b031982166380ac58cd60e01b1480611a2a57506001600160e01b03198216635b5e139f60e01b145b8061063a57506301ffc9a760e01b6001600160e01b031983161461063a565b6002546000908210801561063a575060006001600160a01b031660028381548110611a7657611a76612ae5565b6000918252602090912001546001600160a01b0316141592915050565b600081815260036020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611ac882610d23565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611b0c82611a49565b611b6d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161073a565b6000611b7883610d23565b9050806001600160a01b0316846001600160a01b03161480611bb35750836001600160a01b0316611ba8846106d2565b6001600160a01b0316145b80611be357506001600160a01b0380821660009081526004602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611bfe82610d23565b6001600160a01b031614611c665760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161073a565b6001600160a01b038216611cc85760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161073a565b611cd3600082611a93565b8160028281548110611ce757611ce7612ae5565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b6000611d4d82846129ed565b9392505050565b6000611d4d82846129d9565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001611e22929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611e4f9392919061283f565b602060405180830381600087803b158015611e6957600080fd5b505af1158015611e7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea191906125fa565b50600083815260056020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052611efd9060016129c1565b600085815260056020526040902055611be38482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b611f49614e2082612aa5565b600b819055600e805462ff00001916620100001790556040517fd738450068ceb43722c6da761380091d49fa4203f48516f781c16eeb9a42c31690600090a25050565b611f97848484611beb565b611fa3848484846120ef565b6112525760405162461bcd60e51b815260040161073a906128e9565b6000611d4d82846129c1565b6109578282604051806020016040528060008152506121f9565b6060816120095750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612033578061201d81612a8a565b915061202c9050600a836129d9565b915061200d565b60008167ffffffffffffffff81111561204e5761204e612afb565b6040519080825280601f01601f191660200182016040528015612078576020820181803683370190505b5090505b8415611be35761208d600183612a0c565b915061209a600a86612aa5565b6120a59060306129c1565b60f81b8183815181106120ba576120ba612ae5565b60200101906001600160f81b031916908160001a9053506120dc600a866129d9565b945061207c565b6000611d4d8284612a0c565b60006001600160a01b0384163b156121f157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612133903390899088908890600401612802565b602060405180830381600087803b15801561214d57600080fd5b505af192505050801561217d575060408051601f3d908101601f1916820190925261217a91810190612656565b60015b6121d7573d8080156121ab576040519150601f19603f3d011682016040523d82523d6000602084013e6121b0565b606091505b5080516121cf5760405162461bcd60e51b815260040161073a906128e9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611be3565b506001611be3565b612203838361222c565b61221060008484846120ef565b6108705760405162461bcd60e51b815260040161073a906128e9565b6001600160a01b0382166122825760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161073a565b61228b81611a49565b156122d85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161073a565b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461236090612a4f565b90600052602060002090601f01602090048101928261238257600085556123c8565b82601f1061239b57805160ff19168380011785556123c8565b828001600101855582156123c8579182015b828111156123c85782518255916020019190600101906123ad565b50610bbb9291505b80821115610bbb57600081556001016123d0565b600067ffffffffffffffff808411156123ff576123ff612afb565b604051601f8501601f19908116603f0116810190828211818310171561242757612427612afb565b8160405280935085815286868601111561244057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461247157600080fd5b919050565b60006020828403121561248857600080fd5b611d4d8261245a565b600080604083850312156124a457600080fd5b6124ad8361245a565b91506124bb6020840161245a565b90509250929050565b6000806000606084860312156124d957600080fd5b6124e28461245a565b92506124f06020850161245a565b9150604084013590509250925092565b6000806000806080858703121561251657600080fd5b61251f8561245a565b935061252d6020860161245a565b925060408501359150606085013567ffffffffffffffff81111561255057600080fd5b8501601f8101871361256157600080fd5b612570878235602084016123e4565b91505092959194509250565b6000806040838503121561258f57600080fd5b6125988361245a565b915060208301356125a881612b11565b809150509250929050565b600080604083850312156125c657600080fd5b6125cf8361245a565b946020939093013593505050565b6000602082840312156125ef57600080fd5b8135611d4d81612b11565b60006020828403121561260c57600080fd5b8151611d4d81612b11565b6000806040838503121561262a57600080fd5b50508035926020909101359150565b60006020828403121561264b57600080fd5b8135611d4d81612b1f565b60006020828403121561266857600080fd5b8151611d4d81612b1f565b60006020828403121561268557600080fd5b813567ffffffffffffffff81111561269c57600080fd5b8201601f810184136126ad57600080fd5b611be3848235602084016123e4565b6000602082840312156126ce57600080fd5b5035919050565b6000602082840312156126e757600080fd5b5051919050565b6000806040838503121561270157600080fd5b8235915060208301356125a881612b11565b6000815180845261272b816020860160208601612a23565b601f01601f19169290920160200192915050565b60008151612751818560208601612a23565b9290920192915050565b600080845481600182811c91508083168061277757607f831692505b602080841082141561279757634e487b7160e01b86526022600452602486fd5b8180156127ab57600181146127bc576127e9565b60ff198616895284890196506127e9565b60008b81526020902060005b868110156127e15781548b8201529085019083016127c8565b505084890196505b5050505050506127f9818561273f565b95945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061283590830184612713565b9695505050505050565b60018060a01b03841681528260208201526060604082015260006127f96060830184612713565b602081526000611d4d6020830184612713565b60408152600061288c6040830185612713565b82810360208401526127f98185612713565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b600082198211156129d4576129d4612ab9565b500190565b6000826129e8576129e8612acf565b500490565b6000816000190483118215151615612a0757612a07612ab9565b500290565b600082821015612a1e57612a1e612ab9565b500390565b60005b83811015612a3e578181015183820152602001612a26565b838111156112525750506000910152565b600181811c90821680612a6357607f821691505b60208210811415612a8457634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612a9e57612a9e612ab9565b5060010190565b600082612ab457612ab4612acf565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461185357600080fd5b6001600160e01b03198116811461185357600080fdfea2646970667358221220a6827e49ee6f333c43e8d7b5dd86fb74ef9bb775e7e7a1c13f77931a28f23b1164736f6c634300080700330000000000000000000000000175a6fd9711bdd3dd692459e78dfaac5aad0e27000000000000000000000000eb57bf569ad976974c1f861a5923a59f40222451000000000000000000000000c3503192343eae4b435e4a1211c5d28bf6f6a6960000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001f68747470733a2f2f6d6574612e63726565707a2e636f2f61726d6f7572792f00

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102955760003560e01c8063785f403d11610167578063c87b56dd116100ce578063e985e9c511610087578063e985e9c514610596578063eb8d2444146105d2578063f2fde38b146105df578063f4a560a5146105f2578063fd5baa88146105fa578063ff1b65561461060d57600080fd5b8063c87b56dd1461052b578063c9f7153c1461053e578063cb774d4714610551578063cd6a3ea51461055a578063cdfa59a91461056d578063df173dba1461058d57600080fd5b806397610f301161012057806397610f30146104b2578063a22cb465146104c5578063ad2f852a146104d8578063b87e3f49146104f2578063b88d4fde14610505578063c2f6d7e31461051857600080fd5b8063785f403d146104595780637a1e228d146104615780637c86bcb8146104745780638da5cb5b1461048657806394985ddd1461049757806395d89b41146104aa57600080fd5b806332cb6b0c1161020b57806355f804b3116101c457806355f804b3146103fd5780636352211e1461041057806370a0823114610423578063715018a61461043657806374df39c91461043e578063774960f71461044657600080fd5b806332cb6b0c146103b45780633ccfd60b146103bd5780633ef24839146103c557806342842e0e146103ce57806344cf661f146103e15780634f6ccce7146103ea57600080fd5b80630a0889491161025d5780630a0889491461032e578063109695231461034157806318160ddd1461035457806323b872dd1461035c5780632a55205a1461036f5780632f745c59146103a157600080fd5b806301ffc9a71461029a57806306fdde03146102c2578063081812fc146102d7578063095ea7b314610302578063099becfb14610317575b600080fd5b6102ad6102a8366004612639565b610615565b60405190151581526020015b60405180910390f35b6102ca610640565b6040516102b99190612866565b6102ea6102e53660046126bc565b6106d2565b6040516001600160a01b0390911681526020016102b9565b6103156103103660046125b3565b61075f565b005b610320600f5481565b6040519081526020016102b9565b61031561033c3660046125dd565b610875565b61031561034f366004612673565b6108b2565b600254610320565b61031561036a3660046124c4565b61095b565b61038261037d366004612617565b61098c565b604080516001600160a01b0390931683526020830191909152016102b9565b6103206103af3660046125b3565b610a0f565b610320614e2081565b610315610ac2565b610320600d5481565b6103156103dc3660046124c4565b610b37565b610320600c5481565b6103206103f83660046126bc565b610b52565b61031561040b366004612673565b610bbf565b6102ea61041e3660046126bc565b610d23565b610320610431366004612476565b610daf565b610315610e7d565b610320610eb3565b600e546102ad9062010000900460ff1681565b610320600381565b6012546102ea906001600160a01b031681565b600e546102ad90610100900460ff1681565b6006546001600160a01b03166102ea565b6103156104a5366004612617565b611048565b6102ca6110ca565b6013546102ea906001600160a01b031681565b6103156104d336600461257c565b6110d9565b600e546102ea90630100000090046001600160a01b031681565b6103156105003660046126bc565b61119e565b610315610513366004612500565b611220565b6103156105263660046126ee565b611258565b6102ca6105393660046126bc565b6115ff565b61032061054c3660046125b3565b6116a0565b610320600b5481565b6103156105683660046125b3565b611763565b61032061057b366004612476565b60146020526000908152604090205481565b61032060105481565b6102ad6105a4366004612491565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b600e546102ad9060ff1681565b6103156105ed366004612476565b6117bb565b610315611856565b6103156106083660046126bc565b6118e9565b6102ca61196b565b60006001600160e01b0319821663780e9d6360e01b148061063a575061063a826119f9565b92915050565b60606000805461064f90612a4f565b80601f016020809104026020016040519081016040528092919081815260200182805461067b90612a4f565b80156106c85780601f1061069d576101008083540402835291602001916106c8565b820191906000526020600020905b8154815290600101906020018083116106ab57829003601f168201915b5050505050905090565b60006106dd82611a49565b6107435760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600360205260409020546001600160a01b031690565b600061076a82610d23565b9050806001600160a01b0316836001600160a01b031614156107d85760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161073a565b336001600160a01b03821614806107f457506107f481336105a4565b6108665760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161073a565b6108708383611a93565b505050565b6006546001600160a01b0316331461089f5760405162461bcd60e51b815260040161073a9061293b565b600e805460ff1916911515919091179055565b6006546001600160a01b031633146108dc5760405162461bcd60e51b815260040161073a9061293b565b600980546108e990612a4f565b1590506109445760405162461bcd60e51b8152602060048201526024808201527f50726f76656e616e636520686173682068617320616c7265616479206265656e604482015263081cd95d60e21b606482015260840161073a565b8051610957906009906020840190612354565b5050565b6109653382611b01565b6109815760405162461bcd60e51b815260040161073a90612970565b610870838383611beb565b60008060006109b26010546109ac600f5487611d4190919063ffffffff16565b90611d54565b600086815260116020526040812054919250906001600160a01b03166109ea57600e54630100000090046001600160a01b0316610a03565b6000868152601160205260409020546001600160a01b03165b96919550909350505050565b6000610a1a83610daf565b8210610a385760405162461bcd60e51b815260040161073a9061289e565b6000805b600254811015610aa95760028181548110610a5957610a59612ae5565b6000918252602090912001546001600160a01b0386811691161415610a975783821415610a8957915061063a9050565b81610a9381612a8a565b9250505b80610aa181612a8a565b915050610a3c565b5060405162461bcd60e51b815260040161073a9061289e565b6006546001600160a01b03163314610aec5760405162461bcd60e51b815260040161073a9061293b565b47610aff6006546001600160a01b031690565b6001600160a01b03166108fc829081150290604051600060405180830381858888f19350505050158015610957573d6000803e3d6000fd5b61087083838360405180602001604052806000815250611220565b6002546000908210610bbb5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161073a565b5090565b6006546001600160a01b03163314610be95760405162461bcd60e51b815260040161073a9061293b565b600e54610100900460ff1615610c415760405162461bcd60e51b815260206004820152601a60248201527f4d6574616461746120616c72656164792066696e616c69736564000000000000604482015260640161073a565b6000600a8054610c5090612a4f565b80601f0160208091040260200160405190810160405280929190818152602001828054610c7c90612a4f565b8015610cc95780601f10610c9e57610100808354040283529160200191610cc9565b820191906000526020600020905b815481529060010190602001808311610cac57829003601f168201915b50508551939450610ce593600a93506020870192509050612354565b507f9f02bf4cb60375a0a74d238c76d002df33d30d2b85e9e677f03455a22d96c14d8183604051610d17929190612879565b60405180910390a15050565b60008060028381548110610d3957610d39612ae5565b6000918252602090912001546001600160a01b031690508061063a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161073a565b60006001600160a01b038216610e1a5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161073a565b6000805b600254811015610e765760028181548110610e3b57610e3b612ae5565b6000918252602090912001546001600160a01b0385811691161415610e6657610e6382612a8a565b91505b610e6f81612a8a565b9050610e1e565b5092915050565b6006546001600160a01b03163314610ea75760405162461bcd60e51b815260040161073a9061293b565b610eb16000611d60565b565b6006546000906001600160a01b03163314610ee05760405162461bcd60e51b815260040161073a9061293b565b600e5462010000900460ff1615610f395760405162461bcd60e51b815260206004820152601960248201527f7374617274696e67496e64657820616c72656164792073657400000000000000604482015260640161073a565b6016546040516370a0823160e01b81523060048201527f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316906370a082319060240160206040518083038186803b158015610f9b57600080fd5b505afa158015610faf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd391906126d5565b10156110355760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e74726163742060448201526a1dda5d1a0819985d58d95d60aa1b606482015260840161073a565b611043601554601654611db2565b905090565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795216146110c05760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015260640161073a565b6109578282611f3d565b60606001805461064f90612a4f565b6001600160a01b0382163314156111325760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161073a565b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6006546001600160a01b031633146111c85760405162461bcd60e51b815260040161073a9061293b565b600e5460ff161561121b5760405162461bcd60e51b815260206004820152601e60248201527f50617573652073616c65206265666f7265207072696365207570646174650000604482015260640161073a565b600d55565b61122a3383611b01565b6112465760405162461bcd60e51b815260040161073a90612970565b61125284848484611f8c565b50505050565b600260075414156112ab5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161073a565b60026007556006546001600160a01b0316331461131457600e5460ff166113145760405162461bcd60e51b815260206004820152601c60248201527f546865206d696e7420686173206e6f7420737461727465642079657400000000604482015260640161073a565b6000821161135a5760405162461bcd60e51b815260206004820152601360248201527226b4b71036b4b73a1034b99018903a37b5b2b760691b604482015260640161073a565b60328211156113be5760405162461bcd60e51b815260206004820152602a60248201527f596f752063616e206d696e74206d617820353020746f6b656e732070657220746044820152693930b739b0b1ba34b7b760b11b606482015260840161073a565b614e206113d4836113ce60025490565b90611fbf565b11156114225760405162461bcd60e51b815260206004820152601d60248201527f4d696e74206d6f726520746f6b656e73207468616e20616c6c6f776564000000604482015260640161073a565b6006546001600160a01b031633146114f757600061144033846116a0565b6012549091506001600160a01b031663bfd77e2b336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b15801561149d57600080fd5b505af11580156114b1573d6000803e3d6000fd5b5050505082601460006114c13390565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114f091906129c1565b9091555050505b6000816115045733611511565b6013546001600160a01b03165b905060005b838110156115c757600061152960025490565b90506115358382611fcb565b83156115b4576013546001600160a01b03166352a664d9336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015230602482015260448101849052606401600060405180830381600087803b15801561159b57600080fd5b505af11580156115af573d6000803e3d6000fd5b505050505b50806115bf81612a8a565b915050611516565b50604051839033907f3f2c9d57c068687834f0de942a9babb9e5acab57d516d3480a3c16ee165a427390600090a35050600160075550565b606061160a82611a49565b61166e5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161073a565b600a61167983611fe5565b60405160200161168a92919061275b565b6040516020818303038152906040529050919050565b6001600160a01b03821660009081526014602052604081205460036116c58285611fbf565b116116e057600c546116d8908490611d41565b91505061063a565b6000805b8481101561175a576116f7836001611fbf565b92506003831161171657600c5461170f908390611fbf565b9150611748565b600d5461173b906117329061172c8660036120e3565b90611d41565b600c5490611fbf565b61174590836129c1565b91505b8061175281612a8a565b9150506116e4565b50949350505050565b6006546001600160a01b0316331461178d5760405162461bcd60e51b815260040161073a9061293b565b600090815260116020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031633146117e55760405162461bcd60e51b815260040161073a9061293b565b6001600160a01b03811661184a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161073a565b61185381611d60565b50565b6006546001600160a01b031633146118805760405162461bcd60e51b815260040161073a9061293b565b600e54610100900460ff16156118d85760405162461bcd60e51b815260206004820152601a60248201527f4d6574616461746120616c72656164792066696e616c69736564000000000000604482015260640161073a565b600e805461ff001916610100179055565b6006546001600160a01b031633146119135760405162461bcd60e51b815260040161073a9061293b565b600e5460ff16156119665760405162461bcd60e51b815260206004820152601e60248201527f50617573652073616c65206265666f7265207072696365207570646174650000604482015260640161073a565b600c55565b6009805461197890612a4f565b80601f01602080910402602001604051908101604052809291908181526020018280546119a490612a4f565b80156119f15780601f106119c6576101008083540402835291602001916119f1565b820191906000526020600020905b8154815290600101906020018083116119d457829003601f168201915b505050505081565b60006001600160e01b031982166380ac58cd60e01b1480611a2a57506001600160e01b03198216635b5e139f60e01b145b8061063a57506301ffc9a760e01b6001600160e01b031983161461063a565b6002546000908210801561063a575060006001600160a01b031660028381548110611a7657611a76612ae5565b6000918252602090912001546001600160a01b0316141592915050565b600081815260036020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611ac882610d23565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611b0c82611a49565b611b6d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161073a565b6000611b7883610d23565b9050806001600160a01b0316846001600160a01b03161480611bb35750836001600160a01b0316611ba8846106d2565b6001600160a01b0316145b80611be357506001600160a01b0380821660009081526004602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611bfe82610d23565b6001600160a01b031614611c665760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161073a565b6001600160a01b038216611cc85760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161073a565b611cd3600082611a93565b8160028281548110611ce757611ce7612ae5565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b6000611d4d82846129ed565b9392505050565b6000611d4d82846129d9565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795284866000604051602001611e22929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611e4f9392919061283f565b602060405180830381600087803b158015611e6957600080fd5b505af1158015611e7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea191906125fa565b50600083815260056020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052611efd9060016129c1565b600085815260056020526040902055611be38482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b611f49614e2082612aa5565b600b819055600e805462ff00001916620100001790556040517fd738450068ceb43722c6da761380091d49fa4203f48516f781c16eeb9a42c31690600090a25050565b611f97848484611beb565b611fa3848484846120ef565b6112525760405162461bcd60e51b815260040161073a906128e9565b6000611d4d82846129c1565b6109578282604051806020016040528060008152506121f9565b6060816120095750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612033578061201d81612a8a565b915061202c9050600a836129d9565b915061200d565b60008167ffffffffffffffff81111561204e5761204e612afb565b6040519080825280601f01601f191660200182016040528015612078576020820181803683370190505b5090505b8415611be35761208d600183612a0c565b915061209a600a86612aa5565b6120a59060306129c1565b60f81b8183815181106120ba576120ba612ae5565b60200101906001600160f81b031916908160001a9053506120dc600a866129d9565b945061207c565b6000611d4d8284612a0c565b60006001600160a01b0384163b156121f157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612133903390899088908890600401612802565b602060405180830381600087803b15801561214d57600080fd5b505af192505050801561217d575060408051601f3d908101601f1916820190925261217a91810190612656565b60015b6121d7573d8080156121ab576040519150601f19603f3d011682016040523d82523d6000602084013e6121b0565b606091505b5080516121cf5760405162461bcd60e51b815260040161073a906128e9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611be3565b506001611be3565b612203838361222c565b61221060008484846120ef565b6108705760405162461bcd60e51b815260040161073a906128e9565b6001600160a01b0382166122825760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161073a565b61228b81611a49565b156122d85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161073a565b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461236090612a4f565b90600052602060002090601f01602090048101928261238257600085556123c8565b82601f1061239b57805160ff19168380011785556123c8565b828001600101855582156123c8579182015b828111156123c85782518255916020019190600101906123ad565b50610bbb9291505b80821115610bbb57600081556001016123d0565b600067ffffffffffffffff808411156123ff576123ff612afb565b604051601f8501601f19908116603f0116810190828211818310171561242757612427612afb565b8160405280935085815286868601111561244057600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461247157600080fd5b919050565b60006020828403121561248857600080fd5b611d4d8261245a565b600080604083850312156124a457600080fd5b6124ad8361245a565b91506124bb6020840161245a565b90509250929050565b6000806000606084860312156124d957600080fd5b6124e28461245a565b92506124f06020850161245a565b9150604084013590509250925092565b6000806000806080858703121561251657600080fd5b61251f8561245a565b935061252d6020860161245a565b925060408501359150606085013567ffffffffffffffff81111561255057600080fd5b8501601f8101871361256157600080fd5b612570878235602084016123e4565b91505092959194509250565b6000806040838503121561258f57600080fd5b6125988361245a565b915060208301356125a881612b11565b809150509250929050565b600080604083850312156125c657600080fd5b6125cf8361245a565b946020939093013593505050565b6000602082840312156125ef57600080fd5b8135611d4d81612b11565b60006020828403121561260c57600080fd5b8151611d4d81612b11565b6000806040838503121561262a57600080fd5b50508035926020909101359150565b60006020828403121561264b57600080fd5b8135611d4d81612b1f565b60006020828403121561266857600080fd5b8151611d4d81612b1f565b60006020828403121561268557600080fd5b813567ffffffffffffffff81111561269c57600080fd5b8201601f810184136126ad57600080fd5b611be3848235602084016123e4565b6000602082840312156126ce57600080fd5b5035919050565b6000602082840312156126e757600080fd5b5051919050565b6000806040838503121561270157600080fd5b8235915060208301356125a881612b11565b6000815180845261272b816020860160208601612a23565b601f01601f19169290920160200192915050565b60008151612751818560208601612a23565b9290920192915050565b600080845481600182811c91508083168061277757607f831692505b602080841082141561279757634e487b7160e01b86526022600452602486fd5b8180156127ab57600181146127bc576127e9565b60ff198616895284890196506127e9565b60008b81526020902060005b868110156127e15781548b8201529085019083016127c8565b505084890196505b5050505050506127f9818561273f565b95945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061283590830184612713565b9695505050505050565b60018060a01b03841681528260208201526060604082015260006127f96060830184612713565b602081526000611d4d6020830184612713565b60408152600061288c6040830185612713565b82810360208401526127f98185612713565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b600082198211156129d4576129d4612ab9565b500190565b6000826129e8576129e8612acf565b500490565b6000816000190483118215151615612a0757612a07612ab9565b500290565b600082821015612a1e57612a1e612ab9565b500390565b60005b83811015612a3e578181015183820152602001612a26565b838111156112525750506000910152565b600181811c90821680612a6357607f821691505b60208210811415612a8457634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612a9e57612a9e612ab9565b5060010190565b600082612ab457612ab4612acf565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461185357600080fd5b6001600160e01b03198116811461185357600080fdfea2646970667358221220a6827e49ee6f333c43e8d7b5dd86fb74ef9bb775e7e7a1c13f77931a28f23b1164736f6c63430008070033

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

0000000000000000000000000175a6fd9711bdd3dd692459e78dfaac5aad0e27000000000000000000000000eb57bf569ad976974c1f861a5923a59f40222451000000000000000000000000c3503192343eae4b435e4a1211c5d28bf6f6a6960000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001f68747470733a2f2f6d6574612e63726565707a2e636f2f61726d6f7572792f00

-----Decoded View---------------
Arg [0] : _royaltyAddress (address): 0x0175a6fD9711bDd3Dd692459e78DFAAc5aad0e27
Arg [1] : _loomi (address): 0xEb57Bf569Ad976974C1F861a5923A59F40222451
Arg [2] : _staking (address): 0xC3503192343EAE4B435E4A1211C5d28BF6f6a696
Arg [3] : _baseURI (string): https://meta.creepz.co/armoury/

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000175a6fd9711bdd3dd692459e78dfaac5aad0e27
Arg [1] : 000000000000000000000000eb57bf569ad976974c1f861a5923a59f40222451
Arg [2] : 000000000000000000000000c3503192343eae4b435e4a1211c5d28bf6f6a696
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [4] : 000000000000000000000000000000000000000000000000000000000000001f
Arg [5] : 68747470733a2f2f6d6574612e63726565707a2e636f2f61726d6f7572792f00


Loading...
Loading
Loading...
Loading
[ 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.