ETH Price: $3,845.05 (-0.10%)

Contract

0x0dD5A35fe4cd65FE7928c7b923902b43d6ea29E7
 
Transaction Hash
Method
Block
From
To
Post God Listing213384302024-12-05 19:37:592 hrs ago1733427479IN
0x0dD5A35f...3d6ea29E7
0 ETH0.001058824.90248875
Withdraw Pending...213272192024-12-04 6:03:1140 hrs ago1733292191IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0005470217.52546395
Post God Listing213186932024-12-03 1:27:352 days ago1733189255IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0007571217.80719295
Post God Listing213113422024-12-02 0:47:233 days ago1733100443IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0006276314.76165837
Post God Listing213064362024-12-01 8:22:234 days ago1733041343IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0004353810.24009811
Claim Eth Reward...213063042024-12-01 7:55:594 days ago1733039759IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0004198810.05213046
Claim Extra Rewa...213062982024-12-01 7:54:474 days ago1733039687IN
0x0dD5A35f...3d6ea29E7
0 ETH0.000773459.81972315
Buy God213055872024-12-01 5:31:594 days ago1733031119IN
0x0dD5A35f...3d6ea29E7
0.08 ETH0.001883677.77117383
Post God Listing213027812024-11-30 20:08:355 days ago1732997315IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0006789915.96955331
Buy God213024212024-11-30 18:56:115 days ago1732992971IN
0x0dD5A35f...3d6ea29E7
0.0607 ETH0.0032613714
Post God Listing213018352024-11-30 16:58:235 days ago1732985903IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0012778416.06990381
Post God Listing212987662024-11-30 6:40:595 days ago1732948859IN
0x0dD5A35f...3d6ea29E7
0 ETH0.000411529.67617524
Post God Listing212875292024-11-28 16:55:597 days ago1732812959IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0005011912.61890663
Post God Listing212875182024-11-28 16:53:477 days ago1732812827IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0005003512.59779158
Post God Listing212821072024-11-27 22:36:477 days ago1732747007IN
0x0dD5A35f...3d6ea29E7
0 ETH0.001358417.08293595
Post God Listing212820992024-11-27 22:35:117 days ago1732746911IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0014091417.721124
Post God Listing212820952024-11-27 22:34:237 days ago1732746863IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0015085618.9713933
Post God Listing212820912024-11-27 22:33:357 days ago1732746815IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0015148819.05085514
Post God Listing212795902024-11-27 14:08:478 days ago1732716527IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0008032520.2238794
Claim Eth Reward...212765302024-11-27 3:53:598 days ago1732679639IN
0x0dD5A35f...3d6ea29E7
0 ETH0.000301987.22950756
Claim Extra Rewa...212765282024-11-27 3:53:358 days ago1732679615IN
0x0dD5A35f...3d6ea29E7
0 ETH0.000587417.45780632
Post God Listing212741042024-11-26 19:46:239 days ago1732650383IN
0x0dD5A35f...3d6ea29E7
0 ETH0.000527813.28878201
Post God Listing212740982024-11-26 19:45:119 days ago1732650311IN
0x0dD5A35f...3d6ea29E7
0 ETH0.000558314.05669626
Post God Listing212740892024-11-26 19:43:239 days ago1732650203IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0005884814.81662647
Post God Listing212732772024-11-26 17:00:239 days ago1732640423IN
0x0dD5A35f...3d6ea29E7
0 ETH0.0006386316.07920508
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
213272192024-12-04 6:03:1140 hrs ago1733292191
0x0dD5A35f...3d6ea29E7
0.074 ETH
213063042024-12-01 7:55:594 days ago1733039759
0x0dD5A35f...3d6ea29E7
0.0062033 ETH
212765302024-11-27 3:53:598 days ago1732679639
0x0dD5A35f...3d6ea29E7
0.00313519 ETH
212603342024-11-24 21:37:1111 days ago1732484231
0x0dD5A35f...3d6ea29E7
0.00237108 ETH
212558612024-11-24 6:37:3511 days ago1732430255
0x0dD5A35f...3d6ea29E7
0.148 ETH
212545472024-11-24 2:13:5911 days ago1732414439
0x0dD5A35f...3d6ea29E7
0.00669031 ETH
212486192024-11-23 6:22:5912 days ago1732342979
0x0dD5A35f...3d6ea29E7
0.58645 ETH
212472762024-11-23 1:53:2312 days ago1732326803
0x0dD5A35f...3d6ea29E7
0.00189605 ETH
212418652024-11-22 7:45:3513 days ago1732261535
0x0dD5A35f...3d6ea29E7
0.58645 ETH
212340432024-11-21 5:33:2314 days ago1732167203
0x0dD5A35f...3d6ea29E7
0.00511839 ETH
212192112024-11-19 3:53:1116 days ago1731988391
0x0dD5A35f...3d6ea29E7
0.00220471 ETH
212029832024-11-16 21:35:2319 days ago1731792923
0x0dD5A35f...3d6ea29E7
0.05594593 ETH
211846772024-11-14 8:15:2321 days ago1731572123
0x0dD5A35f...3d6ea29E7
0.34225 ETH
211686302024-11-12 2:29:5923 days ago1731378599
0x0dD5A35f...3d6ea29E7
0.00537379 ETH
211643482024-11-11 12:09:1124 days ago1731326951
0x0dD5A35f...3d6ea29E7
0.08325 ETH
211486172024-11-09 7:31:1126 days ago1731137471
0x0dD5A35f...3d6ea29E7
0.00165943 ETH
210879922024-10-31 20:23:5935 days ago1730406239
0x0dD5A35f...3d6ea29E7
0.01061009 ETH
210775462024-10-30 9:24:3536 days ago1730280275
0x0dD5A35f...3d6ea29E7
0.00190051 ETH
210578022024-10-27 15:16:5939 days ago1730042219
0x0dD5A35f...3d6ea29E7
0.01514637 ETH
210528782024-10-26 22:47:3539 days ago1729982855
0x0dD5A35f...3d6ea29E7
0.15725 ETH
210097442024-10-20 22:22:2345 days ago1729462943
0x0dD5A35f...3d6ea29E7
0.00570154 ETH
209760952024-10-16 5:40:2350 days ago1729057223
0x0dD5A35f...3d6ea29E7
0.07188884 ETH
209523512024-10-12 21:57:4754 days ago1728770267
0x0dD5A35f...3d6ea29E7
0.08695 ETH
209504632024-10-12 15:38:1154 days ago1728747491
0x0dD5A35f...3d6ea29E7
0.00192415 ETH
209402072024-10-11 5:11:1155 days ago1728623471
0x0dD5A35f...3d6ea29E7
0.076775 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
IdolMarketplace

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 26 : IdolMarketplace.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import "./IdolMain.sol";
import "./VirtueStaking.sol";

/**
  @notice IdolMarketplace is a contract containing functions for listing, bidding on, and exchanging
    God NFTs.
*/
contract IdolMarketplace is VirtueStaking {
  // Listing is a struct which holds metadata for when a user lists a God they own for sale.
  struct Listing {
    // seller indicates the address of who posted the God Listing.
    address seller;

    // minValue specifies the minimum value that the owner will accept when buying through the
    // buyGod function.
    uint minValue;

    // onlySellTo is an optional field that specifies that the God can only be sold to a specific
    // address. Uses the 0x0 address if no specific address is specified.
    address onlySellTo;
  }

  // Bid is a struct holding metadata for when a user bids on a God they are interested in buying.
  struct Bid {
    // bidder indicates the address of who posted the God Bid.
    address bidder;

    // value is the amount (in wei) that the Bid is offering for the God.
    uint value;
  }

  // Royalties that are allocated to the VIRTUE rewards protocol in basis points (100ths of a %).
  uint public constant ROYALTY_BPS = 750;

  // Mapping containing active listings for each god.
  mapping (uint => Listing) public godListings;

  // Mapping containing the active bids for each god.
  mapping (uint => Bid) public godBids;

  // Mapping containing pending balances that users can withdraw.
  mapping (address => uint) public pendingWithdrawals;

  IdolMain public immutable idolMain;

  event GodListed(uint indexed _godId, uint _minValue, address indexed _toAddress);
  event GodBidEntered(uint indexed _godId, uint _value, address indexed _fromAddress);
  event GodBidWithdrawn(uint indexed _godId, uint _value, address indexed _fromAddress);
  event GodBought(uint indexed _godId, uint _value, address indexed _fromAddress, address indexed _toAddress, uint cumulativeETH);
  event GodUnlisted(uint indexed _godId);

  constructor(address _idolMintAddress, address _idolMainAddress, address _virtueTokenAddress)
    VirtueStaking(_idolMintAddress, _virtueTokenAddress)
  {
    idolMain = IdolMain(_idolMainAddress);
  }

  /**
    @notice postGodListing creates a sales listing for a God.
    @param _godId The ID of the God being listed.
    @param _salePriceInWei Specifies the minimum price the God can be bought for using the buyGod function.
  */
  function postGodListing(uint _godId, uint _salePriceInWei) external onlyGodOwner(_godId) nonReentrant {
    godListings[_godId] = Listing(msg.sender, _salePriceInWei, address(0x0));
    emit GodListed(_godId, _salePriceInWei, address(0x0));
  }

  /**
    @notice postGodListingForAddress creates a sales listing for a God exclusively for a single address.
    @param _godId The ID of the God being listed.
    @param _salePriceInWei Specifies the minimum price the God can be bought for using the buyGod function.
    @param _toAddress The address that the Listing is exclusively meant for.
  */
  function postGodListingForAddress(uint _godId, uint _salePriceInWei, address _toAddress) external onlyGodOwner(_godId) nonReentrant {
    godListings[_godId] = Listing(msg.sender, _salePriceInWei, _toAddress);
    emit GodListed(_godId, _salePriceInWei, _toAddress);
  }

  /**
    @notice removeGodListing removes an existing sales listing for a God.
    @param _godId The ID of the God whose listing is being removed.
  */
  function removeGodListing(uint _godId) external nonReentrant {
    require(msg.sender == godListings[_godId].seller, "Can only remove a listing where msg.sender is the seller");
    _removeGodListing(_godId);
  }

  function _removeGodListing(uint _godId) private {
    delete godListings[_godId];
    emit GodUnlisted(_godId);
  }

  /**
    @notice buyGod is used to buy a listed God for the sales price on its Listing. 7.5% of the
      price is also distributed to the VIRTUE rewards controller.
    @param _godId The ID of the God being bought.
  */
  function buyGod(uint _godId) external payable nonReentrant {
    Listing memory listing = godListings[_godId];
    require(listing.minValue > 0, "Can only buy a god that is listed for sale.");
    require(listing.onlySellTo == address(0x0) || listing.onlySellTo == msg.sender, "Owner has reserved god listing for a different address.");
    require(msg.value >= listing.minValue, "Must pay at least the minPrice that the listing specifies.");
    require(listing.seller == idolMain.ownerOf(_godId), "Listing is outdated and was not posted by the god's current owner.");

    address seller = listing.seller;

    _removeGodListing(_godId);
    idolMain.safeTransferFrom(seller, msg.sender, _godId);

    // Reserve royalty for VIRTUE protocol
    uint saleAmount = msg.value;
    uint royalty = saleAmount * ROYALTY_BPS / 10000;
    uint proceeds = saleAmount - royalty;
    pendingWithdrawals[seller] += proceeds;
    _distributeRewards(royalty);
    emit GodBought(_godId, msg.value, seller, msg.sender, cumulativeETH);

    // Check for the case where there is a bid from the new owner and refund it.
    // Any other bid can stay in place.
    if (godBids[_godId].bidder == msg.sender) {
      // Kill bid and refund value
      uint bidValue = godBids[_godId].value;
      delete godBids[_godId];
      pendingWithdrawals[msg.sender] += bidValue;
    }
  }

  /**
    @notice withdrawPendingFunds withdraws any pending funds that the marketplace is holding for
      the user (e.g. through sales or overriden bids).
  */
  function withdrawPendingFunds() external nonReentrant {
    Address.sendValue(payable(msg.sender), pendingWithdrawals[msg.sender]);
    delete pendingWithdrawals[msg.sender];
  }

  /**
    @notice enterBidForGod creates a Bid on the specified God for the amount of ETH passed to the
      function.
    @param _godId The ID of the God to create a Bid for.
  */
  function enterBidForGod(uint _godId) external payable nonReentrant {
    require(idolMain.ownerOf(_godId) != address(0x0), "Cannot bid on god assigned to the 0x0 address.");
    require(idolMain.ownerOf(_godId) != msg.sender, "Cannot bid on a god owned by the bidder.");
    require(msg.value > 0, "Must offer a nonzero amount for bidding.");

    Bid memory existingBid = godBids[_godId];
    require(msg.value > existingBid.value, "A higher bid has already been made for this god.");

    // Refund the existing bid to the original bidder and overwrite with the higher bid.
    if (existingBid.value > 0) {
      pendingWithdrawals[existingBid.bidder] += existingBid.value;
    }
    godBids[_godId] = Bid(msg.sender, msg.value);
    emit GodBidEntered(_godId, msg.value, msg.sender);
  }

  /**
    @notice acceptBidForGod allows a God owner to accept an existing Bid for a God and transfer the
      Bid amount to themselves, in exchange for transferring the God to the bidder. 7.5% of the
      price is also distributed to the VIRTUE rewards controller.
    @param _godId The ID of the God to accept the Bid for.
    @param _minPrice The minimum amount (in wei) that the Bid will be accepted for. Reverts if the
      current Bid is below _minPrice.
  */
  function acceptBidForGod(uint _godId, uint _minPrice) external onlyGodOwner(_godId) nonReentrant {
    Bid memory existingBid = godBids[_godId];
    require(existingBid.value > 0, "Cannot accept a 0 bid.");
    require(existingBid.value >= _minPrice, "Existing bid is lower than the specified _minPrice.");

    delete godListings[_godId];
    idolMain.safeTransferFrom(msg.sender, existingBid.bidder, _godId);

    // Reserve royalty for VIRTUE protocol
    uint saleAmount = existingBid.value;
    delete godBids[_godId];
    uint royalty = saleAmount * ROYALTY_BPS / 10000;
    uint proceeds = saleAmount - royalty;
    pendingWithdrawals[msg.sender] += proceeds;
    _distributeRewards(royalty);
    emit GodBought(_godId, saleAmount, msg.sender, existingBid.bidder,  cumulativeETH);
  }

  /**
    @notice withdrawBidForGod takes down the message sender's previous Bid for a God. It also sends
      them back the funds they had initially sent when creating the Bid.
    @param _godId The ID of the God to withdraw the Bid from.
  */
  function withdrawBidForGod(uint _godId) external nonReentrant {
    require(godBids[_godId].bidder == msg.sender, "Cannot withdraw a bid not made by the sender.");

    uint amount = godBids[_godId].value;
    emit GodBidWithdrawn(_godId, amount, msg.sender);
    delete godBids[_godId];
    Address.sendValue(payable(msg.sender), amount);
  }

  modifier onlyGodOwner(uint _godId) {
    require(msg.sender == idolMain.ownerOf(_godId), "Must own the specified God to call this function.");
    _;
  }
}

File 2 of 26 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

File 3 of 26 : 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 4 of 26 : IdolMain.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "hardhat/console.sol";
import "./VirtueToken.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";

contract IdolMain is ERC721Enumerable, IERC2981, Ownable, ReentrancyGuard {
  // stethPrincipalBalance tracks the treasury's principal stETH balance.
  uint public stethPrincipalBalance;

  // allocatedStethRewards tracks the current amount of stETH that has been allocated to god owners.
  uint public allocatedStethRewards;

  // mintContractAddress holds the address for the minting contract.
  address public immutable mintContractAddress;

  // marketplaceAddress holds the address for the idol marketplace.
  address public marketplaceAddress;

  // teamWalletAddress holds the address that VIRTUE rewards are paid to when claimTeamIdol is
  // called.
  address public immutable teamWalletAddress;

  // steth is a reference to LIDO's stETH token contract.
  IERC20 public immutable steth;

  // virtueToken contains a reference to the protocol's native VIRTUE token contract.
  VirtueToken public virtueToken;

  // rewardPerGod tracks the cumulative amount of stETH awarded for each god since the protocol's
  // inception.
  uint public rewardPerGod;

  // claimedSnapshots stores the amount of rewards per god that each address has claimed thus far.
  mapping(address => uint) public claimedSnapshots;

  // contractWhitelist tracks which contracts are allowed to interact with the god NFTs.
  // (Only used if allowAllContracts is false).
  mapping(address => bool) public contractWhitelist;

  // contractBlacklist tracks which contracts are forbidden from interacting with the god NFTs.
  // (Only used if allowAllContracts is true).
  mapping(address => bool) public contractBlacklist;

  // allowAllContracts will allow all contracts to interact with the god NFTs when set to true.
  bool public allowAllContracts;

  // updateCallerReward expresses, in basis points, the percentage of newRewards paid to the function
  // caller, as an incentive to pay the gas prices for calling update functions.
  uint public updateCallerReward;

  // teamRewards tracks the current amount of VIRTUE accrued for the team.
  uint public teamRewards;

  // deployTime tracks when the contract was deployed.
  uint public deployTime;

  // lockedGods keeps track of which gods (owned by the team) have been locked from transferring/
  // purchasing for a 1-year window.
  mapping(uint => bool) public lockedGods;

  string private baseURI;

  // getVirtueAllowed specifies when users can bond stETH for VIRTUE using the getVirtue function.
  bool public getVirtueAllowed = false;

  // Royalties that are allocated to the VIRTUE rewards protocol in basis points (100ths of a %).
  uint public constant ROYALTY_BPS = 750;

  event RewardPerGodUpdated(uint _rpg, uint _slashAmt, address indexed _callerAddress);
  /**
    Instantiate with the address of LIDO's steth token
    0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84
  */
  constructor(
    address _mintContractAddress,
    address _stethAddr,
    address _teamWalletAddress
  )
    ERC721("Idol", "IDOL")
  {
    mintContractAddress = _mintContractAddress;
    marketplaceAddress = address(0x0);
    teamWalletAddress = _teamWalletAddress;
    steth = IERC20(_stethAddr);
    stethPrincipalBalance = 0;
    allocatedStethRewards = 0;
    rewardPerGod = 0;
    allowAllContracts = true;
    // set caller reward to 1%
    updateCallerReward = 100;
    teamRewards = 0;
    deployTime = block.timestamp;
  }
  /**
    @notice this function set the address of the VIRTUE Token
    @param _virtueTokenAddr the address of the VIRTUE token
  */
  function setVirtueTokenAddr(address _virtueTokenAddr) external onlyMintContract {
    virtueToken = VirtueToken(_virtueTokenAddr);
  }

  /**
    @notice This function sets the address for the Idol Marketplace.
    @param _marketplaceAddr The address for the marketplace
  */
  function setIdolMarketplaceAddr(address _marketplaceAddr) external onlyMintContract {
    marketplaceAddress = _marketplaceAddr;
  }

  /**
    @notice Overrides the ERC721 safeTransferFrom function by also giving the marketplace contract
      universal approval to execute transfers.
  */
  function safeTransferFrom(
    address from,
    address to,
    uint256 tokenId,
    bytes memory _data
  ) public virtual override {
    // Skip approval check for the marketplace address.
    if (msg.sender != marketplaceAddress) {
      require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
    }
    _safeTransfer(from, to, tokenId, _data);
  }

  /**
    @notice setUpdateCallerReward updates the reward percentage paid to the function caller for
      calling updateRewardPerGod.
    @param _amt The amount to set the reward to, in basis points (i.e. 100 = 1%)
  */
  function setUpdateCallerReward(uint _amt)
    external
    onlyOwner
  {
    require(_amt <= 100, "hardcode max caller reward is 1%");
    updateCallerReward = _amt;
  }

  /**
    @notice whitelistAdd function adds an address to the smart contract whitelist.
    @param _addr The address to add to the whitelist.
  */
  function whitelistAdd(address _addr)
    external
    onlyOwner
  {
    contractWhitelist[_addr] = true;
  }

  /**
    @notice whitelistRemove removes an address from the smart contract whitelist.
    @param _addr The address to remove from the whitelist.
  */
  function whitelistRemove(address _addr)
    external
    onlyOwner
  {
    delete contractWhitelist[_addr];
  }


  /**
    @notice blacklistAdd function adds an address to the smart contract blacklist.
    @param _addr The address to add to the blacklist.
  */
  function blacklistAdd(address _addr)
    external
    onlyOwner
  {
    contractBlacklist[_addr] = true;
  }

  /**
    @notice blacklistRemove removes an address from the smart contract blacklist.
    @param _addr The address to remove from the blacklist.
  */
  function blacklistRemove(address _addr)
    external
    onlyOwner
  {
    delete contractBlacklist[_addr];
  }

  /**
    @notice setAllowAllContracts updates the allowAllContracts boolean.
    @param _val The value to set allowAllContracts, if true then all smart contracts will be allowed.
  */
  function setAllowAllContracts(bool _val)
    external
    onlyOwner
  {
    allowAllContracts = _val;
  }

  /**
    @notice _beforeTokenTransfer outlines the logic that should be run before every token transfer.
    @param _from - address of current owner
    @param _to - address of new owner
    @param _tokenId - id of token to transfer
    @dev needs to call claim and update on both '_from' and 'to'
         reverts if 'to' is a non-whitelisted smart contract
  */

  function _beforeTokenTransfer(
    address _from,
    address _to,
    uint256 _tokenId
  )
    internal
    virtual
    override
    onlyAllowedContracts(_to)
  {
    super._beforeTokenTransfer(_from, _to, _tokenId);
    if(_from != address(0x0)){
      if (lockedGods[_tokenId]) {
        require(deployTime + 365 days < block.timestamp,'Token can only be transferred when lock has expired');
      }
      _claimEthRewards(_from);

      // If the user will have 0 NFTs left after this transfer, delete them from claimedSnapshots
      // entirely.
      if(balanceOf(_from) == 1){
        delete claimedSnapshots[_from];
      }
    }

    // It the _to user already has NFTs, claim their rewards.
    if(balanceOf(_to) > 0){
      _claimEthRewards(_to);
    } else {
      claimedSnapshots[_to] = rewardPerGod;
    }
  }

  /**
    @notice override setapproval function to only allow whitelisted addresses
  */
  function setApprovalForAll(
    address _operator,
    bool _approved
  )
    public
    virtual
    override
    onlyAllowedContracts(_operator)
  {
    super.setApprovalForAll(_operator, _approved);
  }

  /**
    @notice override approve function to only allow whitelisted addresses
  */
  function approve(
    address _to,
    uint256 _tokenId
  )
    public
    virtual
    override
    onlyAllowedContracts(_to)
  {
    super.approve(_to, _tokenId);
  }

  /**
    @notice this function deposits steth and increase steth prin bal
    @param _stethAmt - amount to deposit
  */
  function depositSteth(uint _stethAmt)
    public
  {
    require(steth.transferFrom(msg.sender, address(this), _stethAmt));
    stethPrincipalBalance = stethPrincipalBalance + _stethAmt;
  }

  /**
      @notice this function updates rewardPerGod based on the relationship between steth prin bal
      and actual steth in the contract
  */
  function updateRewardPerGod()
      public
      nonReentrant
  {
    uint256 stethBal = steth.balanceOf(address(this));
    // This should only occur if steth has experienced slashing.
    // Reduce stethPrincipalBalance to stethBal minus previously allocated rewards.
    if (stethBal < (stethPrincipalBalance + allocatedStethRewards)) {
      emit RewardPerGodUpdated(rewardPerGod, stethPrincipalBalance + allocatedStethRewards - stethBal, msg.sender);
      stethPrincipalBalance = stethBal - allocatedStethRewards;
      return;
    }
    // Nothing to do if the balances are equal.
    else if (stethBal == (stethPrincipalBalance + allocatedStethRewards)) {
      return;
    }
    // If we have extra stETH, update rewardPerGod, add newRewards to allocatedStethRewards.
    else if (stethBal > (stethPrincipalBalance + allocatedStethRewards)) {
      uint newRewards = stethBal - (stethPrincipalBalance + allocatedStethRewards);
      uint callerReward = newRewards * updateCallerReward / 10000;
      newRewards = newRewards - callerReward;
      rewardPerGod = rewardPerGod + newRewards / totalSupply();
      allocatedStethRewards = allocatedStethRewards + newRewards;
      emit RewardPerGodUpdated(rewardPerGod, 0, msg.sender);
      if(callerReward > 0){
        require(steth.transfer(msg.sender, callerReward));
      }
    }
  }

  /**
    @notice currentUpdateReward shows what the current reward would be for calling
      updateRewardPerGod, as an incentive to spend the gas costs on calling the function.
  */
  function currentUpdateReward()
    public
    view
    returns(uint)
  {
    uint256 stethBal = steth.balanceOf(address(this));
    if (stethBal <= stethPrincipalBalance + allocatedStethRewards) {
      return 0;
    }
    uint newRewards = stethBal - (stethPrincipalBalance + allocatedStethRewards);
    uint callerReward = newRewards * updateCallerReward/10000;
    return callerReward;
  }

  /**
    @notice getPendingStethReward returns the amount of stETH that has accrued to the user
      and has yet to be claimed.
  */
  function getPendingStethReward(address _user)
    public
    view
    returns (uint256)
  {
    return (balanceOf(_user) * (rewardPerGod - claimedSnapshots[_user]));
  }

  /**
    @notice claimEthRewards is called to claim rewards on behalf of a user.
  */
  function claimEthRewards(address _user)
    external
  {
    require(balanceOf(_user) > 0, "Can only claim if balance of user > 0");
    _claimEthRewards(_user);
  }

  /**
    @notice allowGetVirtue is a one-time function that enables the bonding of stETH for VIRTUE
      token. It is intended to only be enabled once the mint has concluded.
  */
  function allowGetVirtue() public onlyOwner {
    getVirtueAllowed = true;
  }

  /**
    @notice getVirtue transfers VIRTUE token to the caller in exchange for stETH.
      It requires that the caller has approved this contract to transfer
      stETH on their behalf.
    @param _stethAmt - The amount of stETH the user would like to deposit to the
      bonding curve in exhange for Idol.
    @param _minVirtue - The minimum amount of VIRTUE that the function needs to return.
      Reverts if returned amount is lower than this.
  */
  function getVirtue(uint256 _stethAmt, uint256 _minVirtue)
    public
    nonReentrant
  {
    require(getVirtueAllowed, "Bonding of stETH for VIRTUE is not yet enabled");
    uint256 virtueToTransfer = virtueToken.getVirtueBondAmt(_stethAmt);
    require(virtueToTransfer >= _minVirtue, "Not enough VIRTUE returned");
    // Update Steth bonded.
    depositSteth(_stethAmt);
    require(virtueToken.transfer(msg.sender, virtueToTransfer));
    virtueToken.incrementBondedSteth(_stethAmt);
    // Accrue team allocation to team.
    teamRewards = teamRewards + virtueToTransfer / 5;
  }

  /**
    @notice claimTeamIdol claims all rewards accrued to the team thus far and sends it to
      teamWalletAddress.
  */
  function claimTeamIdol()
    external
    nonReentrant
  {
    uint currentRewards = teamRewards;
    teamRewards = 0;
    require(virtueToken.transfer(teamWalletAddress, currentRewards));
  }

  /**
    @notice internal helper function for claimEthRewards
  */
  function _claimEthRewards(address _user)
    internal
    nonReentrant
  {
    uint256 currentRewards = getPendingStethReward(_user);
    if (currentRewards > 0) {
      allocatedStethRewards = allocatedStethRewards - currentRewards;
      claimedSnapshots[_user] = rewardPerGod;
      require(steth.transfer(_user, currentRewards));
    }
  }


  /**
    @notice mint function called by the mintContract
  */
  function mint(address _mintAddress, uint _godId, bool _lock)
    external
    onlyMintContract
  {
    if(_lock){
      lockedGods[_godId] = true;
    }
    _safeMint(_mintAddress, _godId);
  }

  function _baseURI() internal view override returns (string memory) {
    return baseURI;
  }

  /**
    @notice Sets the baseURI string for the NFT. Can only be set by the mint contract,
      and cannot be updated once the mint contract is locked.
  */
  function setBaseURI(string memory uri) external onlyMintContract {
    baseURI = uri;
  }

  function royaltyInfo(uint256, uint256 salePrice) external view returns (
    address receiver,
    uint256 royaltyAmount
  ) {
    receiver = marketplaceAddress;
    royaltyAmount = salePrice * ROYALTY_BPS / 10000;
  }

  modifier onlyMintContract {
    require(msg.sender == mintContractAddress);
    _;
  }

  modifier onlyAllowedContracts(address _addr) {
    if (Address.isContract(_addr)) {
      if (!allowAllContracts) {
        require(contractWhitelist[_addr], 'Function can only be called for whitelisted contracts');
      }
      if (allowAllContracts) {
        require(!contractBlacklist[_addr], 'Function cannot be called for blacklisted contracts');
      }
    }
    _;
  }
}

File 5 of 26 : VirtueStaking.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "hardhat/console.sol";
import "./VirtueToken.sol";
import "./interface/IRewards.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

/**
  @notice VirtueStaking is a contract that holds the functionality for staking and claiming VIRTUE
    rewards. It is inherited by the IdolMarketplace, which takes a commission on God NFT sales and
    distributes the commission to the stakers of the VIRTUE token.
*/
contract VirtueStaking is ReentrancyGuard, Ownable {
  // mintContractAddress holds a reference to the address of the minting contract.
  address public immutable mintContractAddress;

  // virtueToken holds a reference to the VirtueToken ERC20 contract.
  VirtueToken public virtueToken;

  // cumulativeETH represents the cumulative amount of rewards that have been earned per staked
  // VIRTUE token since the inception of the protocol. This amount increases whenever
  // distributeRewards is called.
  uint public cumulativeETH;

  // claimedSnapshots is a mapping that stores the amount of ETH that an address is ineligible to
  // claim per VIRTUE token staked. The difference between a user's claimedSnapshot and the current
  // cumulativeETH therefore represents the amount of rewards they are eligible to claim per VIRTUE
  // token staked.
  mapping(address => uint) claimedSnapshots;

  // userStakes tracks how much VIRTUE token a particular address has staked in the protocol.
  mapping(address => uint) userStakes;

  // extraRewards holds the addresses of additional contracts that implement the IRewards interface
  // and provide additional rewards to VIRTUE stakers.
  address[] public extraRewards;

  // DECIMAL_PRECISION is used as a multiplier on cumulativeETH since the ETH/VIRTUE ratio cannot
  // be accurately expressed as a whole integer.
  uint constant DECIMAL_PRECISION = 10**18;

  constructor(address _mintContractAddress, address _virtueTokenAddress)
  {
    cumulativeETH = 0;
    mintContractAddress = _mintContractAddress;
    virtueToken = VirtueToken(_virtueTokenAddress);
  }

  /**
    @notice setVirtueTokenAddr sets the address of the VIRTUE Token ERC20 contract.
    @param _virtueTokenAddr The address of the VIRTUE token contract.
  */
  function setVirtueTokenAddr(address _virtueTokenAddr)
    external
    onlyMintContract
  {
    virtueToken = VirtueToken(_virtueTokenAddr);
  }


  /**
    @notice getTotalVirtueStake returns total amount of VIRTUE Token staked in the protocol.
  */
  function getTotalVirtueStake()
    public
    view
    returns (uint)
  {
    return(virtueToken.balanceOf(address(this)));
  }

  /**
    @notice getUserVirtueStake returns total amount of VIRTUE Token a specific user has staked in the
      protocol.
    @param _user The address of the user to get the stake for.
  */
  function getUserVirtueStake(address _user)
    external
    view
    returns (uint)
  {
    return userStakes[_user];
  }

  /**
    @notice increaseVirtueStake increases a user's VIRTUE stake.
    @param _virtueTokenAmt The amount of VIRTUE to stake on behalf of the user
  */
  function increaseVirtueStake(uint _virtueTokenAmt)
    external
  {
    // Also stake with any linked extraRewards contracts.
    for (uint i = 0; i < extraRewards.length; i++) {
      IRewards(extraRewards[i]).increaseStake(msg.sender, _virtueTokenAmt);
    }

    uint currentStake = userStakes[msg.sender];
    // If the sender has any pending ETH gains from staking, claim them before increasing their stake.
    if (currentStake > 0) {
      claimEthRewards(msg.sender);
    } else {
      claimedSnapshots[msg.sender] = cumulativeETH;
    }
    userStakes[msg.sender] = currentStake + _virtueTokenAmt;
    require(
      virtueToken.transferFrom(msg.sender, address(this), _virtueTokenAmt),
      "Reverting because call to virtueToken.transferFrom returned false"
    );
  }

  /**
    @notice decreaseVirtueStake decreases a user's VIRTUE stake.
    @param _virtueTokenAmt The amount of VIRTUE to unstake on behalf of the user. If this amount exceeds
      the user's current stake, it unstakes their entire stake instead.
  */
  function decreaseVirtueStake(uint _virtueTokenAmt)
    external
  {
    uint currentStake = userStakes[msg.sender];
    require(currentStake > 0, "User must have current stake in order to unstake");

    // Also decrease stake with any linked extraRewards contracts.
    for (uint i = 0; i < extraRewards.length; i++) {
      IRewards(extraRewards[i]).decreaseStake(msg.sender, _virtueTokenAmt);
    }

    // Before unstaking, claim any pending staking gains.
    claimEthRewards(msg.sender);
    if (currentStake <= _virtueTokenAmt) {
      delete(userStakes[msg.sender]);
      delete(claimedSnapshots[msg.sender]);
      console.log("here");
      require(
        virtueToken.transfer(msg.sender, currentStake),
        "Reverting because call to virtueToken.transfer returned false"
      );
    }
    else {
      userStakes[msg.sender] = currentStake - _virtueTokenAmt;
      console.log("there");
      require(
        virtueToken.transfer(msg.sender, _virtueTokenAmt),
        "Reverting because call to virtueToken.transfer returned false"
      );
    }
  }

  /**
    @notice extraRewardsLength returns the length of the extraRewards array.
    @return (uint256) The length of the extraRewards array. Duh.
  */
  function extraRewardsLength() external view returns (uint256) {
    return extraRewards.length;
  }

  /**
    @notice addExtraReward appends a reward contract address to the extraRewards array.
    @param _rewardContractAddress The address of the IRewards contract to add.
  */
  function addExtraReward(address _rewardContractAddress) external onlyOwner {
    extraRewards.push(_rewardContractAddress);
  }

  /**
    @notice clearExtraRewards removes all entries from the extraRewards array.
  */
  function clearExtraRewards() external onlyOwner {
    delete extraRewards;
  }

  /**
    @notice getPendingETHGain returns how much in staking rewards are currently available and
      still unclaimed by the user.
  */
  function getPendingETHGain(address _user)
    public
    view
    returns(uint)
  {
    return (userStakes[_user] * (cumulativeETH - claimedSnapshots[_user]) / DECIMAL_PRECISION);
  }
  /**
    @notice distributeRewards is a payable function that takes ETH from sender and allocates the
      ETH sent as rewards to all current stakers.
  */
  function distributeRewards()
    external
    payable
  {
    _distributeRewards(msg.value);
  }

  /**
    @notice This contract's receive function also calls _distributeRewards if any ETH is sent to
      the contract.
  */
  receive() external payable {
    _distributeRewards(msg.value);
  }

  function _distributeRewards(uint _ethAmt)
    internal
  {
    cumulativeETH = cumulativeETH + (_ethAmt * DECIMAL_PRECISION) / getTotalVirtueStake();
  }

  /**
    @notice claimEthRewards is called to claim ETH rewards on behalf of a user.
    @param _user Address to claim rewards for
  */
  function claimEthRewards(address _user)
    public
    nonReentrant
  {
    uint currentRewards = getPendingETHGain(_user);
    if (currentRewards > 0) {
      claimedSnapshots[_user] = cumulativeETH;
      Address.sendValue(payable(_user), currentRewards);
    }
  }

  /**
    @notice claimExtraRewards is called to claim any rewards from linked extraRewards contracts
      on behalf of a user.
    @param _user Address to claim rewards for.
  */
  function claimExtraRewards(address _user) public nonReentrant {
    for (uint i = 0; i < extraRewards.length; i++) {
      IRewards(extraRewards[i]).claimRewards(_user);
    }
  }

  modifier onlyMintContract {
    require(msg.sender == mintContractAddress);
    _;
  }
}

File 6 of 26 : console.sol
// SPDX-License-Identifier: MIT
pragma solidity >= 0.4.22 <0.9.0;

library console {
	address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);

	function _sendLogPayload(bytes memory payload) private view {
		uint256 payloadLength = payload.length;
		address consoleAddress = CONSOLE_ADDRESS;
		assembly {
			let payloadStart := add(payload, 32)
			let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)
		}
	}

	function log() internal view {
		_sendLogPayload(abi.encodeWithSignature("log()"));
	}

	function logInt(int p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(int)", p0));
	}

	function logUint(uint p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
	}

	function logString(string memory p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
	}

	function logBool(bool p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
	}

	function logAddress(address p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
	}

	function logBytes(bytes memory p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes)", p0));
	}

	function logBytes1(bytes1 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0));
	}

	function logBytes2(bytes2 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0));
	}

	function logBytes3(bytes3 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0));
	}

	function logBytes4(bytes4 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0));
	}

	function logBytes5(bytes5 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0));
	}

	function logBytes6(bytes6 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0));
	}

	function logBytes7(bytes7 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0));
	}

	function logBytes8(bytes8 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0));
	}

	function logBytes9(bytes9 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0));
	}

	function logBytes10(bytes10 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0));
	}

	function logBytes11(bytes11 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0));
	}

	function logBytes12(bytes12 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0));
	}

	function logBytes13(bytes13 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0));
	}

	function logBytes14(bytes14 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0));
	}

	function logBytes15(bytes15 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0));
	}

	function logBytes16(bytes16 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0));
	}

	function logBytes17(bytes17 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0));
	}

	function logBytes18(bytes18 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0));
	}

	function logBytes19(bytes19 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0));
	}

	function logBytes20(bytes20 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0));
	}

	function logBytes21(bytes21 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0));
	}

	function logBytes22(bytes22 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0));
	}

	function logBytes23(bytes23 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0));
	}

	function logBytes24(bytes24 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0));
	}

	function logBytes25(bytes25 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0));
	}

	function logBytes26(bytes26 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0));
	}

	function logBytes27(bytes27 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0));
	}

	function logBytes28(bytes28 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0));
	}

	function logBytes29(bytes29 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0));
	}

	function logBytes30(bytes30 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0));
	}

	function logBytes31(bytes31 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0));
	}

	function logBytes32(bytes32 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0));
	}

	function log(uint p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
	}

	function log(string memory p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
	}

	function log(bool p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
	}

	function log(address p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
	}

	function log(uint p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1));
	}

	function log(uint p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1));
	}

	function log(uint p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1));
	}

	function log(uint p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1));
	}

	function log(string memory p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1));
	}

	function log(string memory p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
	}

	function log(string memory p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1));
	}

	function log(string memory p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1));
	}

	function log(bool p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1));
	}

	function log(bool p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1));
	}

	function log(bool p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1));
	}

	function log(bool p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1));
	}

	function log(address p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1));
	}

	function log(address p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1));
	}

	function log(address p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1));
	}

	function log(address p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1));
	}

	function log(uint p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2));
	}

	function log(uint p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2));
	}

	function log(uint p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2));
	}

	function log(uint p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2));
	}

	function log(uint p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2));
	}

	function log(uint p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2));
	}

	function log(uint p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2));
	}

	function log(uint p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2));
	}

	function log(uint p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2));
	}

	function log(uint p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2));
	}

	function log(uint p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2));
	}

	function log(uint p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2));
	}

	function log(string memory p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2));
	}

	function log(string memory p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2));
	}

	function log(string memory p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2));
	}

	function log(string memory p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2));
	}

	function log(bool p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2));
	}

	function log(bool p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2));
	}

	function log(bool p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2));
	}

	function log(bool p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2));
	}

	function log(bool p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2));
	}

	function log(bool p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2));
	}

	function log(bool p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2));
	}

	function log(bool p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2));
	}

	function log(bool p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2));
	}

	function log(bool p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2));
	}

	function log(bool p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2));
	}

	function log(bool p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2));
	}

	function log(address p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2));
	}

	function log(address p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2));
	}

	function log(address p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2));
	}

	function log(address p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2));
	}

	function log(address p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2));
	}

	function log(address p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2));
	}

	function log(address p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2));
	}

	function log(address p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2));
	}

	function log(address p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2));
	}

	function log(address p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2));
	}

	function log(address p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2));
	}

	function log(address p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2));
	}

	function log(address p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2));
	}

	function log(address p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2));
	}

	function log(address p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2));
	}

	function log(address p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2));
	}

	function log(uint p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3));
	}

}

File 7 of 26 : VirtueToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

/// @author 0xNeptune
/**
  @notice VirtueToken initializes both the VIRTUE token and the VIRTUE token's associated bonding curve.
    The bonding curve is a linear interpolation of an expontential curve.
    The 'start_x' of the first bondSlice within bondCurve will be set to the
    amount of Steth within the treasury post mint but prior to the deployment
    of this contract.
*/
contract VirtueToken is ERC20Burnable {
  uint public bondedSteth;
  address public immutable idolMainAddress;
  address public immutable idolMarketAddress;

  struct bondSlice{
    uint start_x;
    int slope;
    int intercept;
  }

  bondSlice[19] internal bondCurve;

  // Curve below is for illustrative purposes, final curve will not be decided until after the mint has occured.
  constructor(
    string memory name,
    string memory symbol,
    uint256 treasurySupply,
    address treasuryAddr,
    uint256 bondSupply,
    address idolContract,
    address marketContract)
    ERC20(name, symbol)
  {
    bondedSteth = 0;
    bondCurve[0] = bondSlice({start_x:0,slope:-228248550476,intercept:75000000000000000000000000});
    bondCurve[1] = bondSlice({start_x:25000000000000000000000,slope:-210882750211,intercept:74565854993372400000000000});
    bondCurve[2] = bondSlice({start_x:50000000000000000000000,slope:-194838189526,intercept:73763626959115100000000000});
    bondCurve[3] = bondSlice({start_x:75000000000000000000000,slope:-180014344747,intercept:72651838600692400000000000});
    bondCurve[4] = bondSlice({start_x:100000000000000000000000,slope:-159991353646,intercept:70649539490591900000000000});
    bondCurve[5] = bondSlice({start_x:150000000000000000000000,slope:-136572283238,intercept:67136678929379100000000000});
    bondCurve[6] = bondSlice({start_x:200000000000000000000000,slope:-116581228446,intercept:63138467970989800000000000});
    bondCurve[7] = bondSlice({start_x:250000000000000000000000,slope:-95780563826,intercept:57938301816001500000000000});
    bondCurve[8] = bondSlice({start_x:325000000000000000000000,slope:-75539912086,intercept:51360090000505800000000000});
    bondCurve[9] = bondSlice({start_x:400000000000000000000000,slope:-57369920299,intercept:44092093285737000000000000});
    bondCurve[10] = bondSlice({start_x:500000000000000000000000,slope:-40276389676,intercept:35545327974265900000000000});
    bondCurve[11] = bondSlice({start_x:625000000000000000000000,slope:-27115378872,intercept:27319696221780300000000000});
    bondCurve[12] = bondSlice({start_x:750000000000000000000000,slope:-18254957241,intercept:20674379998547900000000000});
    bondCurve[13] = bondSlice({start_x:875000000000000000000000,slope:-12289832477,intercept:15454895830019000000000000});
    bondCurve[14] = bondSlice({start_x:1000000000000000000000000,slope:-6922093002,intercept:10087156355048300000000000});
    bondCurve[15] = bondSlice({start_x:1250000000000000000000000,slope:-3137384279,intercept:5356270451292460000000000});
    bondCurve[16] = bondSlice({start_x:1500000000000000000000000,slope:-622755295,intercept:1584326975368420000000000});
    bondCurve[17] = bondSlice({start_x:2500000000000000000000000,slope:-27508,intercept:27507507410700400000000});
    bondCurve[18] = bondSlice({start_x:250000000000000000000000000,slope:0,intercept:0});
    _mint(treasuryAddr, treasurySupply);
    _mint(idolContract, bondSupply);
    idolMainAddress = idolContract;
    idolMarketAddress = marketContract;
  }

  /**
    @notice transferFrom overrides ERC20's transferFrom function. It is written so that the
      marketplace contract automatically has approval to transfer VIRTUE for other addresses.
  */
  function transferFrom(
    address sender,
    address recipient,
    uint256 amount
  ) public virtual override returns (bool) {

    // Automatically give the marketplace approval to transfer VIRTUE to save the user gas fees spent
    // on approval.
    if (msg.sender == idolMarketAddress){
      _transfer(sender, recipient, amount);
      return true;
    }
    else {
      return super.transferFrom(sender, recipient, amount);
    }
  }

  /**
    @notice virtueBondCum is a helper function for getVirtueBondAmt. This function takes
      an amount of stETH (_stethAmt) as input and returns the cumulative amount
      of VIRTUE remaining in the bonding curve if the treasury had _stethAmt of Steth.
  */
  function virtueBondCum(uint _stethAmt)
    public
    view
    returns (uint)
  {
    uint index;
    for (index = 0; index <= 18; index++) {
      if(bondCurve[index].start_x > _stethAmt){
        break;
      }
    }
    require(index > 0, "Amount is below the start of the Bonding Curve");
    int current_slope = bondCurve[index-1].slope;
    int current_int = bondCurve[index-1].intercept;

    return uint(int(_stethAmt) * current_slope / (10**9) + current_int);
  }

  /**
    @notice incrementBondedSteth updates the bondedSteth variable -- only the idol main contract
      is allowed to call it.
  */
  function incrementBondedSteth(uint256 _incAmt)
    external
    onlyIdolMain
  {
    bondedSteth = bondedSteth + _incAmt;
  }

  /**
    @notice getVirtueBondAmt takes an amount of stETH as input and returns the amount of VIRTUE that the
      bonding curve is currently offering in exchange for that amount of stETH.
    @param _stethAmt - the amount of stETH that the user would like to exchange for VIRTUE via the
      bonding curve.
    @return (uint256) the amount of VIRTUE that the user would receive if they deposited the specified
      amount of stETH the bonding curve at this moment.
  */
  function getVirtueBondAmt(uint256 _stethAmt)
    public
    view
    returns (uint256)
  {
    return virtueBondCum(bondedSteth) - virtueBondCum(bondedSteth + _stethAmt);
  }

  modifier onlyIdolMain {
    require(msg.sender == idolMainAddress, "Function can only be called by IdolMain");
    _;
  }
}

File 8 of 26 : 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 9 of 26 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

    /**
     * @dev 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` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * 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 override {
        super._beforeTokenTransfer(from, to, tokenId);

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

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 26 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

File 11 of 26 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 12 of 26 : ERC20Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        _spendAllowance(account, _msgSender(), amount);
        _burn(account, amount);
    }
}

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

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, _allowances[owner][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = _allowances[owner][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

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

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

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

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens 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 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 14 of 26 : 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 15 of 26 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 16 of 26 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 17 of 26 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

    /**
     * @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 {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

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

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

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

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not 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 {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: 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 _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);

        _balances[to] += 1;
        _owners[tokenId] = to;

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

        _afterTokenTransfer(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);

        _balances[owner] -= 1;
        delete _owners[tokenId];

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

        _afterTokenTransfer(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 from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(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 Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

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

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 19 of 26 : 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 20 of 26 : 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 21 of 26 : 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 22 of 26 : 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 23 of 26 : 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 24 of 26 : 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 25 of 26 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

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

File 26 of 26 : IRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

interface IRewards {
  function increaseStake(address, uint256) external;
  function decreaseStake(address, uint256) external;
  function claimRewards(address) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_idolMintAddress","type":"address"},{"internalType":"address","name":"_idolMainAddress","type":"address"},{"internalType":"address","name":"_virtueTokenAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_godId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"},{"indexed":true,"internalType":"address","name":"_fromAddress","type":"address"}],"name":"GodBidEntered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_godId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"},{"indexed":true,"internalType":"address","name":"_fromAddress","type":"address"}],"name":"GodBidWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_godId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"},{"indexed":true,"internalType":"address","name":"_fromAddress","type":"address"},{"indexed":true,"internalType":"address","name":"_toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"cumulativeETH","type":"uint256"}],"name":"GodBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_godId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_minValue","type":"uint256"},{"indexed":true,"internalType":"address","name":"_toAddress","type":"address"}],"name":"GodListed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_godId","type":"uint256"}],"name":"GodUnlisted","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"},{"inputs":[],"name":"ROYALTY_BPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_godId","type":"uint256"},{"internalType":"uint256","name":"_minPrice","type":"uint256"}],"name":"acceptBidForGod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardContractAddress","type":"address"}],"name":"addExtraReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_godId","type":"uint256"}],"name":"buyGod","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"claimEthRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"claimExtraRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"clearExtraRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cumulativeETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_virtueTokenAmt","type":"uint256"}],"name":"decreaseVirtueStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributeRewards","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_godId","type":"uint256"}],"name":"enterBidForGod","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"extraRewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"extraRewardsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getPendingETHGain","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalVirtueStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserVirtueStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"godBids","outputs":[{"internalType":"address","name":"bidder","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"godListings","outputs":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"minValue","type":"uint256"},{"internalType":"address","name":"onlySellTo","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"idolMain","outputs":[{"internalType":"contract IdolMain","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_virtueTokenAmt","type":"uint256"}],"name":"increaseVirtueStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"pendingWithdrawals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_godId","type":"uint256"},{"internalType":"uint256","name":"_salePriceInWei","type":"uint256"}],"name":"postGodListing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_godId","type":"uint256"},{"internalType":"uint256","name":"_salePriceInWei","type":"uint256"},{"internalType":"address","name":"_toAddress","type":"address"}],"name":"postGodListingForAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_godId","type":"uint256"}],"name":"removeGodListing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_virtueTokenAddr","type":"address"}],"name":"setVirtueTokenAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"virtueToken","outputs":[{"internalType":"contract VirtueToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_godId","type":"uint256"}],"name":"withdrawBidForGod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawPendingFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c06040523480156200001157600080fd5b5060405162004a2c38038062004a2c833981810160405281019062000037919062000255565b8281600160008190555062000061620000556200011d60201b60201c565b6200012560201b60201c565b60006003819055508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1681525050505050620002b1565b600033905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200021d82620001f0565b9050919050565b6200022f8162000210565b81146200023b57600080fd5b50565b6000815190506200024f8162000224565b92915050565b600080600060608486031215620002715762000270620001eb565b5b600062000281868287016200023e565b935050602062000294868287016200023e565b9250506040620002a7868287016200023e565b9150509250925092565b60805160a05161471662000316600039600081816107db015281816108f201528181610ee3015281816118d701528181611a0301528181611cce01528181612aaf01528181612d8f0152612f7d015260008181612066015261211d01526147166000f3fe6080604052600436106101e65760003560e01c80637e89236f11610102578063d55a23f411610095578063ec81290e11610064578063ec81290e1461067d578063eee10501146106a6578063f2fde38b146106d1578063f3f43703146106fa576101f6565b8063d55a23f4146105c3578063da2d09c1146105ee578063dbe1499a14610617578063ddeeacec14610640576101f6565b80638da5cb5b116100d15780638da5cb5b1461051b578063a41ba44f14610546578063a65705f51461056f578063c115b22c1461059a576101f6565b80637e89236f1461044e578063804cc7771461047757806386eebfba146104a05780638b9345ad146104de576101f6565b8063483c2d6e1161017a5780635e43c47b116101495780635e43c47b146103d9578063682dd599146104025780636f4a2cd01461042d578063715018a614610437576101f6565b8063483c2d6e1461033e57806349c657db1461035a57806358cd5272146103855780635b1161ac146103b0576101f6565b8063217847d8116101b6578063217847d8146102705780632533a8c1146102af57806340c35446146102d857806340d391af14610315576101f6565b8062b82784146101fb5780630569d388146102175780630a7636ac1461022e5780630ff24edb14610245576101f6565b366101f6576101f434610737565b005b600080fd5b61021560048036038101906102109190613448565b610773565b005b34801561022357600080fd5b5061022c610c54565b005b34801561023a57600080fd5b50610243610ce0565b005b34801561025157600080fd5b5061025a610dc4565b6040516102679190613484565b60405180910390f35b34801561027c57600080fd5b5061029760048036038101906102929190613448565b610e76565b6040516102a6939291906134e0565b60405180910390f35b3480156102bb57600080fd5b506102d660048036038101906102d19190613517565b610ee0565b005b3480156102e457600080fd5b506102ff60048036038101906102fa9190613448565b611198565b60405161030c9190613557565b60405180910390f35b34801561032157600080fd5b5061033c60048036038101906103379190613448565b6111d7565b005b61035860048036038101906103539190613448565b611674565b005b34801561036657600080fd5b5061036f611cbf565b60405161037c9190613484565b60405180910390f35b34801561039157600080fd5b5061039a611cc5565b6040516103a79190613484565b60405180910390f35b3480156103bc57600080fd5b506103d760048036038101906103d2919061359e565b611ccb565b005b3480156103e557600080fd5b5061040060048036038101906103fb91906135f1565b611f82565b005b34801561040e57600080fd5b50610417612064565b6040516104249190613557565b60405180910390f35b610435612088565b005b34801561044357600080fd5b5061044c612093565b005b34801561045a57600080fd5b50610475600480360381019061047091906135f1565b61211b565b005b34801561048357600080fd5b5061049e60048036038101906104999190613448565b6121b7565b005b3480156104ac57600080fd5b506104c760048036038101906104c29190613448565b61236e565b6040516104d592919061361e565b60405180910390f35b3480156104ea57600080fd5b50610505600480360381019061050091906135f1565b6123b2565b6040516105129190613484565b60405180910390f35b34801561052757600080fd5b50610530612465565b60405161053d9190613557565b60405180910390f35b34801561055257600080fd5b5061056d600480360381019061056891906135f1565b61248f565b005b34801561057b57600080fd5b506105846125b5565b60405161059191906136a6565b60405180910390f35b3480156105a657600080fd5b506105c160048036038101906105bc91906135f1565b6125db565b005b3480156105cf57600080fd5b506105d861269c565b6040516105e59190613484565b60405180910390f35b3480156105fa57600080fd5b5061061560048036038101906106109190613448565b6126a9565b005b34801561062357600080fd5b5061063e60048036038101906106399190613448565b61295d565b005b34801561064c57600080fd5b50610667600480360381019061066291906135f1565b612a63565b6040516106749190613484565b60405180910390f35b34801561068957600080fd5b506106a4600480360381019061069f9190613517565b612aac565b005b3480156106b257600080fd5b506106bb612f7b565b6040516106c891906136e2565b60405180910390f35b3480156106dd57600080fd5b506106f860048036038101906106f391906135f1565b612f9f565b005b34801561070657600080fd5b50610721600480360381019061071c91906135f1565b613097565b60405161072e9190613484565b60405180910390f35b61073f610dc4565b670de0b6b3a764000082610753919061372c565b61075d91906137b5565b60035461076a91906137e6565b60038190555050565b600260005414156107b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b090613899565b60405180910390fd5b6002600081905550600073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016108329190613484565b60206040518083038186803b15801561084a57600080fd5b505afa15801561085e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088291906138ce565b73ffffffffffffffffffffffffffffffffffffffff1614156108d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d09061396d565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016109499190613484565b60206040518083038186803b15801561096157600080fd5b505afa158015610975573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099991906138ce565b73ffffffffffffffffffffffffffffffffffffffff1614156109f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e7906139ff565b60405180910390fd5b60003411610a33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2a90613a91565b60405180910390fd5b6000600860008381526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481525050905080602001513411610afb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610af290613b23565b60405180910390fd5b600081602001511115610b6757806020015160096000836000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b5f91906137e6565b925050819055505b60405180604001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001348152506008600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101559050503373ffffffffffffffffffffffffffffffffffffffff16827fd7a3862e3e7daca19b2761a32e2720e9beac70cfadbd48bc3c91af7b71d8706034604051610c409190613484565b60405180910390a350600160008190555050565b610c5c6130af565b73ffffffffffffffffffffffffffffffffffffffff16610c7a612465565b73ffffffffffffffffffffffffffffffffffffffff1614610cd0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc790613b8f565b60405180910390fd5b60066000610cde91906133cf565b565b60026000541415610d26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1d90613899565b60405180910390fd5b6002600081905550610d7733600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546130b7565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600090556001600081905550565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610e219190613557565b60206040518083038186803b158015610e3957600080fd5b505afa158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e719190613bc4565b905090565b60076020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083565b817f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff1660e01b8152600401610f3a9190613484565b60206040518083038186803b158015610f5257600080fd5b505afa158015610f66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8a91906138ce565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ff7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fee90613c63565b60405180910390fd5b6002600054141561103d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103490613899565b60405180910390fd5b600260008190555060405180606001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001838152602001600073ffffffffffffffffffffffffffffffffffffffff168152506007600085815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050600073ffffffffffffffffffffffffffffffffffffffff16837fb4068a58f26236f9510889485e92ef54b0ff6efea8e4d8067b8839e77fa9997a846040516111839190613484565b60405180910390a36001600081905550505050565b600681815481106111a857600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811161125e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125590613cf5565b60405180910390fd5b60005b60068054905081101561132c576006818154811061128257611281613d15565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631a73ba0133856040518363ffffffff1660e01b81526004016112e792919061361e565b600060405180830381600087803b15801561130157600080fd5b505af1158015611315573d6000803e3d6000fd5b50505050808061132490613d44565b915050611261565b50611336336125db565b8181116114f457600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009055600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600090556114016040518060400160405280600481526020017f68657265000000000000000000000000000000000000000000000000000000008152506131ab565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b815260040161145e92919061361e565b602060405180830381600087803b15801561147857600080fd5b505af115801561148c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b09190613dc5565b6114ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e690613e64565b60405180910390fd5b611670565b81816115009190613e84565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506115816040518060400160405280600581526020017f74686572650000000000000000000000000000000000000000000000000000008152506131ab565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b81526004016115de92919061361e565b602060405180830381600087803b1580156115f857600080fd5b505af115801561160c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116309190613dc5565b61166f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166690613e64565b60405180910390fd5b5b5050565b600260005414156116ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b190613899565b60405180910390fd5b60026000819055506000600760008381526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050905060008160200151116117e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d890613f2a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff16148061184f57503373ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff16145b61188e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188590613fbc565b60405180910390fd5b80602001513410156118d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118cc9061404e565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b815260040161192e9190613484565b60206040518083038186803b15801561194657600080fd5b505afa15801561195a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197e91906138ce565b73ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16146119ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e690614106565b60405180910390fd5b600081600001519050611a0183613244565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166342842e0e8233866040518463ffffffff1660e01b8152600401611a5e93929190614126565b600060405180830381600087803b158015611a7857600080fd5b505af1158015611a8c573d6000803e3d6000fd5b50505050600034905060006127106102ee83611aa8919061372c565b611ab291906137b5565b905060008183611ac29190613e84565b905080600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611b1391906137e6565b92505081905550611b2382610737565b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16877f10da7de539762d5a4215e91a34acd5eba17edf57b64b53ed63b52bfb248b655134600354604051611b8592919061415d565b60405180910390a43373ffffffffffffffffffffffffffffffffffffffff166008600088815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611caf5760006008600088815260200190815260200160002060010154905060086000888152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160009055505080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611ca691906137e6565b92505081905550505b5050505050600160008190555050565b6102ee81565b60035481565b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff1660e01b8152600401611d259190613484565b60206040518083038186803b158015611d3d57600080fd5b505afa158015611d51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d7591906138ce565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611de2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd990613c63565b60405180910390fd5b60026000541415611e28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e1f90613899565b60405180910390fd5b600260008190555060405180606001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff168152506007600086815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050508173ffffffffffffffffffffffffffffffffffffffff16847fb4068a58f26236f9510889485e92ef54b0ff6efea8e4d8067b8839e77fa9997a85604051611f6c9190613484565b60405180910390a3600160008190555050505050565b611f8a6130af565b73ffffffffffffffffffffffffffffffffffffffff16611fa8612465565b73ffffffffffffffffffffffffffffffffffffffff1614611ffe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ff590613b8f565b60405180910390fd5b6006819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b7f000000000000000000000000000000000000000000000000000000000000000081565b61209134610737565b565b61209b6130af565b73ffffffffffffffffffffffffffffffffffffffff166120b9612465565b73ffffffffffffffffffffffffffffffffffffffff161461210f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161210690613b8f565b60405180910390fd5b61211960006132e0565b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461217357600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260005414156121fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f490613899565b60405180910390fd5b60026000819055503373ffffffffffffffffffffffffffffffffffffffff166008600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146122a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122a0906141f8565b60405180910390fd5b6000600860008381526020019081526020016000206001015490503373ffffffffffffffffffffffffffffffffffffffff16827fef51c4d065b866a9c198da97f97048098ecfff666a93233dc909f8f2dfe02a228360405161230b9190613484565b60405180910390a360086000838152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160009055505061236233826130b7565b50600160008190555050565b60086020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b6000670de0b6b3a7640000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460035461240a9190613e84565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612454919061372c565b61245e91906137b5565b9050919050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260005414156124d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124cc90613899565b60405180910390fd5b600260008190555060005b6006805490508110156125a9576006818154811061250157612500613d15565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ef5cfb8c836040518263ffffffff1660e01b81526004016125649190613557565b600060405180830381600087803b15801561257e57600080fd5b505af1158015612592573d6000803e3d6000fd5b5050505080806125a190613d44565b9150506124e0565b50600160008190555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026000541415612621576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161261890613899565b60405180910390fd5b60026000819055506000612634826123b2565b9050600081111561269057600354600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061268f82826130b7565b5b50600160008190555050565b6000600680549050905090565b60005b60068054905081101561277757600681815481106126cd576126cc613d15565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635d7e946733846040518363ffffffff1660e01b815260040161273292919061361e565b600060405180830381600087803b15801561274c57600080fd5b505af1158015612760573d6000803e3d6000fd5b50505050808061276f90613d44565b9150506126ac565b506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111156127d3576127ce336125db565b61281a565b600354600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b818161282691906137e6565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b81526004016128c893929190614126565b602060405180830381600087803b1580156128e257600080fd5b505af11580156128f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061291a9190613dc5565b612959576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612950906142b0565b60405180910390fd5b5050565b600260005414156129a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161299a90613899565b60405180910390fd5b60026000819055506007600082815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a4690614342565b60405180910390fd5b612a5881613244565b600160008190555050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b817f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff1660e01b8152600401612b069190613484565b60206040518083038186803b158015612b1e57600080fd5b505afa158015612b32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b5691906138ce565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612bc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bba90613c63565b60405180910390fd5b60026000541415612c09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c0090613899565b60405180910390fd5b60026000819055506000600860008581526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505090506000816020015111612cda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cd1906143ae565b60405180910390fd5b8281602001511015612d21576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d1890614440565b60405180910390fd5b60076000858152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166342842e0e338360000151876040518463ffffffff1660e01b8152600401612dee93929190614126565b600060405180830381600087803b158015612e0857600080fd5b505af1158015612e1c573d6000803e3d6000fd5b5050505060008160200151905060086000868152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160009055505060006127106102ee83612e81919061372c565b612e8b91906137b5565b905060008183612e9b9190613e84565b905080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612eec91906137e6565b92505081905550612efc82610737565b836000015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16887f10da7de539762d5a4215e91a34acd5eba17edf57b64b53ed63b52bfb248b655186600354604051612f6292919061415d565b60405180910390a4505050506001600081905550505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b612fa76130af565b73ffffffffffffffffffffffffffffffffffffffff16612fc5612465565b73ffffffffffffffffffffffffffffffffffffffff161461301b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161301290613b8f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561308b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613082906144d2565b60405180910390fd5b613094816132e0565b50565b60096020528060005260406000206000915090505481565b600033905090565b804710156130fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130f19061453e565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff16826040516131209061458f565b60006040518083038185875af1925050503d806000811461315d576040519150601f19603f3d011682016040523d82523d6000602084013e613162565b606091505b50509050806131a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161319d90614616565b60405180910390fd5b505050565b613241816040516024016131bf91906146be565b6040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506133a6565b50565b60076000828152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050807f8cf331587d51f02fe3cd55b9d645a7a01c2b76d0477e35348e21b1344b9d79bc60405160405180910390a250565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b50805460008255906000526020600020908101906133ed91906133f0565b50565b5b808211156134095760008160009055506001016133f1565b5090565b600080fd5b6000819050919050565b61342581613412565b811461343057600080fd5b50565b6000813590506134428161341c565b92915050565b60006020828403121561345e5761345d61340d565b5b600061346c84828501613433565b91505092915050565b61347e81613412565b82525050565b60006020820190506134996000830184613475565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006134ca8261349f565b9050919050565b6134da816134bf565b82525050565b60006060820190506134f560008301866134d1565b6135026020830185613475565b61350f60408301846134d1565b949350505050565b6000806040838503121561352e5761352d61340d565b5b600061353c85828601613433565b925050602061354d85828601613433565b9150509250929050565b600060208201905061356c60008301846134d1565b92915050565b61357b816134bf565b811461358657600080fd5b50565b60008135905061359881613572565b92915050565b6000806000606084860312156135b7576135b661340d565b5b60006135c586828701613433565b93505060206135d686828701613433565b92505060406135e786828701613589565b9150509250925092565b6000602082840312156136075761360661340d565b5b600061361584828501613589565b91505092915050565b600060408201905061363360008301856134d1565b6136406020830184613475565b9392505050565b6000819050919050565b600061366c6136676136628461349f565b613647565b61349f565b9050919050565b600061367e82613651565b9050919050565b600061369082613673565b9050919050565b6136a081613685565b82525050565b60006020820190506136bb6000830184613697565b92915050565b60006136cc82613673565b9050919050565b6136dc816136c1565b82525050565b60006020820190506136f760008301846136d3565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061373782613412565b915061374283613412565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561377b5761377a6136fd565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006137c082613412565b91506137cb83613412565b9250826137db576137da613786565b5b828204905092915050565b60006137f182613412565b91506137fc83613412565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613831576138306136fd565b5b828201905092915050565b600082825260208201905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613883601f8361383c565b915061388e8261384d565b602082019050919050565b600060208201905081810360008301526138b281613876565b9050919050565b6000815190506138c881613572565b92915050565b6000602082840312156138e4576138e361340d565b5b60006138f2848285016138b9565b91505092915050565b7f43616e6e6f7420626964206f6e20676f642061737369676e656420746f20746860008201527f652030783020616464726573732e000000000000000000000000000000000000602082015250565b6000613957602e8361383c565b9150613962826138fb565b604082019050919050565b600060208201905081810360008301526139868161394a565b9050919050565b7f43616e6e6f7420626964206f6e206120676f64206f776e65642062792074686560008201527f206269646465722e000000000000000000000000000000000000000000000000602082015250565b60006139e960288361383c565b91506139f48261398d565b604082019050919050565b60006020820190508181036000830152613a18816139dc565b9050919050565b7f4d757374206f666665722061206e6f6e7a65726f20616d6f756e7420666f722060008201527f62696464696e672e000000000000000000000000000000000000000000000000602082015250565b6000613a7b60288361383c565b9150613a8682613a1f565b604082019050919050565b60006020820190508181036000830152613aaa81613a6e565b9050919050565b7f4120686967686572206269642068617320616c7265616479206265656e206d6160008201527f646520666f72207468697320676f642e00000000000000000000000000000000602082015250565b6000613b0d60308361383c565b9150613b1882613ab1565b604082019050919050565b60006020820190508181036000830152613b3c81613b00565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613b7960208361383c565b9150613b8482613b43565b602082019050919050565b60006020820190508181036000830152613ba881613b6c565b9050919050565b600081519050613bbe8161341c565b92915050565b600060208284031215613bda57613bd961340d565b5b6000613be884828501613baf565b91505092915050565b7f4d757374206f776e207468652073706563696669656420476f6420746f20636160008201527f6c6c20746869732066756e6374696f6e2e000000000000000000000000000000602082015250565b6000613c4d60318361383c565b9150613c5882613bf1565b604082019050919050565b60006020820190508181036000830152613c7c81613c40565b9050919050565b7f55736572206d75737420686176652063757272656e74207374616b6520696e2060008201527f6f7264657220746f20756e7374616b6500000000000000000000000000000000602082015250565b6000613cdf60308361383c565b9150613cea82613c83565b604082019050919050565b60006020820190508181036000830152613d0e81613cd2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000613d4f82613412565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613d8257613d816136fd565b5b600182019050919050565b60008115159050919050565b613da281613d8d565b8114613dad57600080fd5b50565b600081519050613dbf81613d99565b92915050565b600060208284031215613ddb57613dda61340d565b5b6000613de984828501613db0565b91505092915050565b7f526576657274696e6720626563617573652063616c6c20746f2076697274756560008201527f546f6b656e2e7472616e736665722072657475726e65642066616c7365000000602082015250565b6000613e4e603d8361383c565b9150613e5982613df2565b604082019050919050565b60006020820190508181036000830152613e7d81613e41565b9050919050565b6000613e8f82613412565b9150613e9a83613412565b925082821015613ead57613eac6136fd565b5b828203905092915050565b7f43616e206f6e6c7920627579206120676f642074686174206973206c6973746560008201527f6420666f722073616c652e000000000000000000000000000000000000000000602082015250565b6000613f14602b8361383c565b9150613f1f82613eb8565b604082019050919050565b60006020820190508181036000830152613f4381613f07565b9050919050565b7f4f776e65722068617320726573657276656420676f64206c697374696e67206660008201527f6f72206120646966666572656e7420616464726573732e000000000000000000602082015250565b6000613fa660378361383c565b9150613fb182613f4a565b604082019050919050565b60006020820190508181036000830152613fd581613f99565b9050919050565b7f4d75737420706179206174206c6561737420746865206d696e5072696365207460008201527f68617420746865206c697374696e67207370656369666965732e000000000000602082015250565b6000614038603a8361383c565b915061404382613fdc565b604082019050919050565b600060208201905081810360008301526140678161402b565b9050919050565b7f4c697374696e67206973206f7574646174656420616e6420776173206e6f742060008201527f706f737465642062792074686520676f6427732063757272656e74206f776e6560208201527f722e000000000000000000000000000000000000000000000000000000000000604082015250565b60006140f060428361383c565b91506140fb8261406e565b606082019050919050565b6000602082019050818103600083015261411f816140e3565b9050919050565b600060608201905061413b60008301866134d1565b61414860208301856134d1565b6141556040830184613475565b949350505050565b60006040820190506141726000830185613475565b61417f6020830184613475565b9392505050565b7f43616e6e6f74207769746864726177206120626964206e6f74206d616465206260008201527f79207468652073656e6465722e00000000000000000000000000000000000000602082015250565b60006141e2602d8361383c565b91506141ed82614186565b604082019050919050565b60006020820190508181036000830152614211816141d5565b9050919050565b7f526576657274696e6720626563617573652063616c6c20746f2076697274756560008201527f546f6b656e2e7472616e7366657246726f6d2072657475726e65642066616c7360208201527f6500000000000000000000000000000000000000000000000000000000000000604082015250565b600061429a60418361383c565b91506142a582614218565b606082019050919050565b600060208201905081810360008301526142c98161428d565b9050919050565b7f43616e206f6e6c792072656d6f76652061206c697374696e672077686572652060008201527f6d73672e73656e646572206973207468652073656c6c65720000000000000000602082015250565b600061432c60388361383c565b9150614337826142d0565b604082019050919050565b6000602082019050818103600083015261435b8161431f565b9050919050565b7f43616e6e6f742061636365707420612030206269642e00000000000000000000600082015250565b600061439860168361383c565b91506143a382614362565b602082019050919050565b600060208201905081810360008301526143c78161438b565b9050919050565b7f4578697374696e6720626964206973206c6f776572207468616e20746865207360008201527f7065636966696564205f6d696e50726963652e00000000000000000000000000602082015250565b600061442a60338361383c565b9150614435826143ce565b604082019050919050565b600060208201905081810360008301526144598161441d565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006144bc60268361383c565b91506144c782614460565b604082019050919050565b600060208201905081810360008301526144eb816144af565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b6000614528601d8361383c565b9150614533826144f2565b602082019050919050565b600060208201905081810360008301526145578161451b565b9050919050565b600081905092915050565b50565b600061457960008361455e565b915061458482614569565b600082019050919050565b600061459a8261456c565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b6000614600603a8361383c565b915061460b826145a4565b604082019050919050565b6000602082019050818103600083015261462f816145f3565b9050919050565b600081519050919050565b60005b8381101561465f578082015181840152602081019050614644565b8381111561466e576000848401525b50505050565b6000601f19601f8301169050919050565b600061469082614636565b61469a818561383c565b93506146aa818560208601614641565b6146b381614674565b840191505092915050565b600060208201905081810360008301526146d88184614685565b90509291505056fea26469706673582212202d6938282c9d665a3deb5e71fc9c6512a652aee3543b375ec10e9a000ab4bc1064736f6c634300080900330000000000000000000000007b4b02372d8e54c1c0454d97f01d85ef203cdc5e000000000000000000000000439cac149b935ae1d726569800972e1669d170940000000000000000000000009416ba76e88d873050a06e5956a3ebf10386b863

Deployed Bytecode

0x6080604052600436106101e65760003560e01c80637e89236f11610102578063d55a23f411610095578063ec81290e11610064578063ec81290e1461067d578063eee10501146106a6578063f2fde38b146106d1578063f3f43703146106fa576101f6565b8063d55a23f4146105c3578063da2d09c1146105ee578063dbe1499a14610617578063ddeeacec14610640576101f6565b80638da5cb5b116100d15780638da5cb5b1461051b578063a41ba44f14610546578063a65705f51461056f578063c115b22c1461059a576101f6565b80637e89236f1461044e578063804cc7771461047757806386eebfba146104a05780638b9345ad146104de576101f6565b8063483c2d6e1161017a5780635e43c47b116101495780635e43c47b146103d9578063682dd599146104025780636f4a2cd01461042d578063715018a614610437576101f6565b8063483c2d6e1461033e57806349c657db1461035a57806358cd5272146103855780635b1161ac146103b0576101f6565b8063217847d8116101b6578063217847d8146102705780632533a8c1146102af57806340c35446146102d857806340d391af14610315576101f6565b8062b82784146101fb5780630569d388146102175780630a7636ac1461022e5780630ff24edb14610245576101f6565b366101f6576101f434610737565b005b600080fd5b61021560048036038101906102109190613448565b610773565b005b34801561022357600080fd5b5061022c610c54565b005b34801561023a57600080fd5b50610243610ce0565b005b34801561025157600080fd5b5061025a610dc4565b6040516102679190613484565b60405180910390f35b34801561027c57600080fd5b5061029760048036038101906102929190613448565b610e76565b6040516102a6939291906134e0565b60405180910390f35b3480156102bb57600080fd5b506102d660048036038101906102d19190613517565b610ee0565b005b3480156102e457600080fd5b506102ff60048036038101906102fa9190613448565b611198565b60405161030c9190613557565b60405180910390f35b34801561032157600080fd5b5061033c60048036038101906103379190613448565b6111d7565b005b61035860048036038101906103539190613448565b611674565b005b34801561036657600080fd5b5061036f611cbf565b60405161037c9190613484565b60405180910390f35b34801561039157600080fd5b5061039a611cc5565b6040516103a79190613484565b60405180910390f35b3480156103bc57600080fd5b506103d760048036038101906103d2919061359e565b611ccb565b005b3480156103e557600080fd5b5061040060048036038101906103fb91906135f1565b611f82565b005b34801561040e57600080fd5b50610417612064565b6040516104249190613557565b60405180910390f35b610435612088565b005b34801561044357600080fd5b5061044c612093565b005b34801561045a57600080fd5b50610475600480360381019061047091906135f1565b61211b565b005b34801561048357600080fd5b5061049e60048036038101906104999190613448565b6121b7565b005b3480156104ac57600080fd5b506104c760048036038101906104c29190613448565b61236e565b6040516104d592919061361e565b60405180910390f35b3480156104ea57600080fd5b50610505600480360381019061050091906135f1565b6123b2565b6040516105129190613484565b60405180910390f35b34801561052757600080fd5b50610530612465565b60405161053d9190613557565b60405180910390f35b34801561055257600080fd5b5061056d600480360381019061056891906135f1565b61248f565b005b34801561057b57600080fd5b506105846125b5565b60405161059191906136a6565b60405180910390f35b3480156105a657600080fd5b506105c160048036038101906105bc91906135f1565b6125db565b005b3480156105cf57600080fd5b506105d861269c565b6040516105e59190613484565b60405180910390f35b3480156105fa57600080fd5b5061061560048036038101906106109190613448565b6126a9565b005b34801561062357600080fd5b5061063e60048036038101906106399190613448565b61295d565b005b34801561064c57600080fd5b50610667600480360381019061066291906135f1565b612a63565b6040516106749190613484565b60405180910390f35b34801561068957600080fd5b506106a4600480360381019061069f9190613517565b612aac565b005b3480156106b257600080fd5b506106bb612f7b565b6040516106c891906136e2565b60405180910390f35b3480156106dd57600080fd5b506106f860048036038101906106f391906135f1565b612f9f565b005b34801561070657600080fd5b50610721600480360381019061071c91906135f1565b613097565b60405161072e9190613484565b60405180910390f35b61073f610dc4565b670de0b6b3a764000082610753919061372c565b61075d91906137b5565b60035461076a91906137e6565b60038190555050565b600260005414156107b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b090613899565b60405180910390fd5b6002600081905550600073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000439cac149b935ae1d726569800972e1669d1709473ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016108329190613484565b60206040518083038186803b15801561084a57600080fd5b505afa15801561085e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088291906138ce565b73ffffffffffffffffffffffffffffffffffffffff1614156108d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d09061396d565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000439cac149b935ae1d726569800972e1669d1709473ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016109499190613484565b60206040518083038186803b15801561096157600080fd5b505afa158015610975573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099991906138ce565b73ffffffffffffffffffffffffffffffffffffffff1614156109f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e7906139ff565b60405180910390fd5b60003411610a33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2a90613a91565b60405180910390fd5b6000600860008381526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481525050905080602001513411610afb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610af290613b23565b60405180910390fd5b600081602001511115610b6757806020015160096000836000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b5f91906137e6565b925050819055505b60405180604001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001348152506008600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101559050503373ffffffffffffffffffffffffffffffffffffffff16827fd7a3862e3e7daca19b2761a32e2720e9beac70cfadbd48bc3c91af7b71d8706034604051610c409190613484565b60405180910390a350600160008190555050565b610c5c6130af565b73ffffffffffffffffffffffffffffffffffffffff16610c7a612465565b73ffffffffffffffffffffffffffffffffffffffff1614610cd0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc790613b8f565b60405180910390fd5b60066000610cde91906133cf565b565b60026000541415610d26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1d90613899565b60405180910390fd5b6002600081905550610d7733600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546130b7565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600090556001600081905550565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610e219190613557565b60206040518083038186803b158015610e3957600080fd5b505afa158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e719190613bc4565b905090565b60076020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083565b817f000000000000000000000000439cac149b935ae1d726569800972e1669d1709473ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff1660e01b8152600401610f3a9190613484565b60206040518083038186803b158015610f5257600080fd5b505afa158015610f66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8a91906138ce565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ff7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fee90613c63565b60405180910390fd5b6002600054141561103d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103490613899565b60405180910390fd5b600260008190555060405180606001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001838152602001600073ffffffffffffffffffffffffffffffffffffffff168152506007600085815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050600073ffffffffffffffffffffffffffffffffffffffff16837fb4068a58f26236f9510889485e92ef54b0ff6efea8e4d8067b8839e77fa9997a846040516111839190613484565b60405180910390a36001600081905550505050565b600681815481106111a857600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811161125e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125590613cf5565b60405180910390fd5b60005b60068054905081101561132c576006818154811061128257611281613d15565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631a73ba0133856040518363ffffffff1660e01b81526004016112e792919061361e565b600060405180830381600087803b15801561130157600080fd5b505af1158015611315573d6000803e3d6000fd5b50505050808061132490613d44565b915050611261565b50611336336125db565b8181116114f457600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009055600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600090556114016040518060400160405280600481526020017f68657265000000000000000000000000000000000000000000000000000000008152506131ab565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b815260040161145e92919061361e565b602060405180830381600087803b15801561147857600080fd5b505af115801561148c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b09190613dc5565b6114ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e690613e64565b60405180910390fd5b611670565b81816115009190613e84565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506115816040518060400160405280600581526020017f74686572650000000000000000000000000000000000000000000000000000008152506131ab565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b81526004016115de92919061361e565b602060405180830381600087803b1580156115f857600080fd5b505af115801561160c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116309190613dc5565b61166f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166690613e64565b60405180910390fd5b5b5050565b600260005414156116ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b190613899565b60405180910390fd5b60026000819055506000600760008381526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050905060008160200151116117e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d890613f2a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff16148061184f57503373ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff16145b61188e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188590613fbc565b60405180910390fd5b80602001513410156118d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118cc9061404e565b60405180910390fd5b7f000000000000000000000000439cac149b935ae1d726569800972e1669d1709473ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b815260040161192e9190613484565b60206040518083038186803b15801561194657600080fd5b505afa15801561195a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197e91906138ce565b73ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16146119ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e690614106565b60405180910390fd5b600081600001519050611a0183613244565b7f000000000000000000000000439cac149b935ae1d726569800972e1669d1709473ffffffffffffffffffffffffffffffffffffffff166342842e0e8233866040518463ffffffff1660e01b8152600401611a5e93929190614126565b600060405180830381600087803b158015611a7857600080fd5b505af1158015611a8c573d6000803e3d6000fd5b50505050600034905060006127106102ee83611aa8919061372c565b611ab291906137b5565b905060008183611ac29190613e84565b905080600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611b1391906137e6565b92505081905550611b2382610737565b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16877f10da7de539762d5a4215e91a34acd5eba17edf57b64b53ed63b52bfb248b655134600354604051611b8592919061415d565b60405180910390a43373ffffffffffffffffffffffffffffffffffffffff166008600088815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611caf5760006008600088815260200190815260200160002060010154905060086000888152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160009055505080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611ca691906137e6565b92505081905550505b5050505050600160008190555050565b6102ee81565b60035481565b827f000000000000000000000000439cac149b935ae1d726569800972e1669d1709473ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff1660e01b8152600401611d259190613484565b60206040518083038186803b158015611d3d57600080fd5b505afa158015611d51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d7591906138ce565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611de2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd990613c63565b60405180910390fd5b60026000541415611e28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e1f90613899565b60405180910390fd5b600260008190555060405180606001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff168152506007600086815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050508173ffffffffffffffffffffffffffffffffffffffff16847fb4068a58f26236f9510889485e92ef54b0ff6efea8e4d8067b8839e77fa9997a85604051611f6c9190613484565b60405180910390a3600160008190555050505050565b611f8a6130af565b73ffffffffffffffffffffffffffffffffffffffff16611fa8612465565b73ffffffffffffffffffffffffffffffffffffffff1614611ffe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ff590613b8f565b60405180910390fd5b6006819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b7f0000000000000000000000007b4b02372d8e54c1c0454d97f01d85ef203cdc5e81565b61209134610737565b565b61209b6130af565b73ffffffffffffffffffffffffffffffffffffffff166120b9612465565b73ffffffffffffffffffffffffffffffffffffffff161461210f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161210690613b8f565b60405180910390fd5b61211960006132e0565b565b7f0000000000000000000000007b4b02372d8e54c1c0454d97f01d85ef203cdc5e73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461217357600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260005414156121fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f490613899565b60405180910390fd5b60026000819055503373ffffffffffffffffffffffffffffffffffffffff166008600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146122a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122a0906141f8565b60405180910390fd5b6000600860008381526020019081526020016000206001015490503373ffffffffffffffffffffffffffffffffffffffff16827fef51c4d065b866a9c198da97f97048098ecfff666a93233dc909f8f2dfe02a228360405161230b9190613484565b60405180910390a360086000838152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160009055505061236233826130b7565b50600160008190555050565b60086020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b6000670de0b6b3a7640000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460035461240a9190613e84565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612454919061372c565b61245e91906137b5565b9050919050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260005414156124d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124cc90613899565b60405180910390fd5b600260008190555060005b6006805490508110156125a9576006818154811061250157612500613d15565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ef5cfb8c836040518263ffffffff1660e01b81526004016125649190613557565b600060405180830381600087803b15801561257e57600080fd5b505af1158015612592573d6000803e3d6000fd5b5050505080806125a190613d44565b9150506124e0565b50600160008190555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026000541415612621576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161261890613899565b60405180910390fd5b60026000819055506000612634826123b2565b9050600081111561269057600354600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061268f82826130b7565b5b50600160008190555050565b6000600680549050905090565b60005b60068054905081101561277757600681815481106126cd576126cc613d15565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635d7e946733846040518363ffffffff1660e01b815260040161273292919061361e565b600060405180830381600087803b15801561274c57600080fd5b505af1158015612760573d6000803e3d6000fd5b50505050808061276f90613d44565b9150506126ac565b506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111156127d3576127ce336125db565b61281a565b600354600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b818161282691906137e6565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b81526004016128c893929190614126565b602060405180830381600087803b1580156128e257600080fd5b505af11580156128f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061291a9190613dc5565b612959576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612950906142b0565b60405180910390fd5b5050565b600260005414156129a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161299a90613899565b60405180910390fd5b60026000819055506007600082815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a4690614342565b60405180910390fd5b612a5881613244565b600160008190555050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b817f000000000000000000000000439cac149b935ae1d726569800972e1669d1709473ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff1660e01b8152600401612b069190613484565b60206040518083038186803b158015612b1e57600080fd5b505afa158015612b32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b5691906138ce565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612bc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bba90613c63565b60405180910390fd5b60026000541415612c09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c0090613899565b60405180910390fd5b60026000819055506000600860008581526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505090506000816020015111612cda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cd1906143ae565b60405180910390fd5b8281602001511015612d21576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d1890614440565b60405180910390fd5b60076000858152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550507f000000000000000000000000439cac149b935ae1d726569800972e1669d1709473ffffffffffffffffffffffffffffffffffffffff166342842e0e338360000151876040518463ffffffff1660e01b8152600401612dee93929190614126565b600060405180830381600087803b158015612e0857600080fd5b505af1158015612e1c573d6000803e3d6000fd5b5050505060008160200151905060086000868152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160009055505060006127106102ee83612e81919061372c565b612e8b91906137b5565b905060008183612e9b9190613e84565b905080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612eec91906137e6565b92505081905550612efc82610737565b836000015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16887f10da7de539762d5a4215e91a34acd5eba17edf57b64b53ed63b52bfb248b655186600354604051612f6292919061415d565b60405180910390a4505050506001600081905550505050565b7f000000000000000000000000439cac149b935ae1d726569800972e1669d1709481565b612fa76130af565b73ffffffffffffffffffffffffffffffffffffffff16612fc5612465565b73ffffffffffffffffffffffffffffffffffffffff161461301b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161301290613b8f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561308b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613082906144d2565b60405180910390fd5b613094816132e0565b50565b60096020528060005260406000206000915090505481565b600033905090565b804710156130fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130f19061453e565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff16826040516131209061458f565b60006040518083038185875af1925050503d806000811461315d576040519150601f19603f3d011682016040523d82523d6000602084013e613162565b606091505b50509050806131a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161319d90614616565b60405180910390fd5b505050565b613241816040516024016131bf91906146be565b6040516020818303038152906040527f41304fac000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506133a6565b50565b60076000828152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050807f8cf331587d51f02fe3cd55b9d645a7a01c2b76d0477e35348e21b1344b9d79bc60405160405180910390a250565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008151905060006a636f6e736f6c652e6c6f679050602083016000808483855afa5050505050565b50805460008255906000526020600020908101906133ed91906133f0565b50565b5b808211156134095760008160009055506001016133f1565b5090565b600080fd5b6000819050919050565b61342581613412565b811461343057600080fd5b50565b6000813590506134428161341c565b92915050565b60006020828403121561345e5761345d61340d565b5b600061346c84828501613433565b91505092915050565b61347e81613412565b82525050565b60006020820190506134996000830184613475565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006134ca8261349f565b9050919050565b6134da816134bf565b82525050565b60006060820190506134f560008301866134d1565b6135026020830185613475565b61350f60408301846134d1565b949350505050565b6000806040838503121561352e5761352d61340d565b5b600061353c85828601613433565b925050602061354d85828601613433565b9150509250929050565b600060208201905061356c60008301846134d1565b92915050565b61357b816134bf565b811461358657600080fd5b50565b60008135905061359881613572565b92915050565b6000806000606084860312156135b7576135b661340d565b5b60006135c586828701613433565b93505060206135d686828701613433565b92505060406135e786828701613589565b9150509250925092565b6000602082840312156136075761360661340d565b5b600061361584828501613589565b91505092915050565b600060408201905061363360008301856134d1565b6136406020830184613475565b9392505050565b6000819050919050565b600061366c6136676136628461349f565b613647565b61349f565b9050919050565b600061367e82613651565b9050919050565b600061369082613673565b9050919050565b6136a081613685565b82525050565b60006020820190506136bb6000830184613697565b92915050565b60006136cc82613673565b9050919050565b6136dc816136c1565b82525050565b60006020820190506136f760008301846136d3565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061373782613412565b915061374283613412565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561377b5761377a6136fd565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006137c082613412565b91506137cb83613412565b9250826137db576137da613786565b5b828204905092915050565b60006137f182613412565b91506137fc83613412565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613831576138306136fd565b5b828201905092915050565b600082825260208201905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613883601f8361383c565b915061388e8261384d565b602082019050919050565b600060208201905081810360008301526138b281613876565b9050919050565b6000815190506138c881613572565b92915050565b6000602082840312156138e4576138e361340d565b5b60006138f2848285016138b9565b91505092915050565b7f43616e6e6f7420626964206f6e20676f642061737369676e656420746f20746860008201527f652030783020616464726573732e000000000000000000000000000000000000602082015250565b6000613957602e8361383c565b9150613962826138fb565b604082019050919050565b600060208201905081810360008301526139868161394a565b9050919050565b7f43616e6e6f7420626964206f6e206120676f64206f776e65642062792074686560008201527f206269646465722e000000000000000000000000000000000000000000000000602082015250565b60006139e960288361383c565b91506139f48261398d565b604082019050919050565b60006020820190508181036000830152613a18816139dc565b9050919050565b7f4d757374206f666665722061206e6f6e7a65726f20616d6f756e7420666f722060008201527f62696464696e672e000000000000000000000000000000000000000000000000602082015250565b6000613a7b60288361383c565b9150613a8682613a1f565b604082019050919050565b60006020820190508181036000830152613aaa81613a6e565b9050919050565b7f4120686967686572206269642068617320616c7265616479206265656e206d6160008201527f646520666f72207468697320676f642e00000000000000000000000000000000602082015250565b6000613b0d60308361383c565b9150613b1882613ab1565b604082019050919050565b60006020820190508181036000830152613b3c81613b00565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613b7960208361383c565b9150613b8482613b43565b602082019050919050565b60006020820190508181036000830152613ba881613b6c565b9050919050565b600081519050613bbe8161341c565b92915050565b600060208284031215613bda57613bd961340d565b5b6000613be884828501613baf565b91505092915050565b7f4d757374206f776e207468652073706563696669656420476f6420746f20636160008201527f6c6c20746869732066756e6374696f6e2e000000000000000000000000000000602082015250565b6000613c4d60318361383c565b9150613c5882613bf1565b604082019050919050565b60006020820190508181036000830152613c7c81613c40565b9050919050565b7f55736572206d75737420686176652063757272656e74207374616b6520696e2060008201527f6f7264657220746f20756e7374616b6500000000000000000000000000000000602082015250565b6000613cdf60308361383c565b9150613cea82613c83565b604082019050919050565b60006020820190508181036000830152613d0e81613cd2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000613d4f82613412565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613d8257613d816136fd565b5b600182019050919050565b60008115159050919050565b613da281613d8d565b8114613dad57600080fd5b50565b600081519050613dbf81613d99565b92915050565b600060208284031215613ddb57613dda61340d565b5b6000613de984828501613db0565b91505092915050565b7f526576657274696e6720626563617573652063616c6c20746f2076697274756560008201527f546f6b656e2e7472616e736665722072657475726e65642066616c7365000000602082015250565b6000613e4e603d8361383c565b9150613e5982613df2565b604082019050919050565b60006020820190508181036000830152613e7d81613e41565b9050919050565b6000613e8f82613412565b9150613e9a83613412565b925082821015613ead57613eac6136fd565b5b828203905092915050565b7f43616e206f6e6c7920627579206120676f642074686174206973206c6973746560008201527f6420666f722073616c652e000000000000000000000000000000000000000000602082015250565b6000613f14602b8361383c565b9150613f1f82613eb8565b604082019050919050565b60006020820190508181036000830152613f4381613f07565b9050919050565b7f4f776e65722068617320726573657276656420676f64206c697374696e67206660008201527f6f72206120646966666572656e7420616464726573732e000000000000000000602082015250565b6000613fa660378361383c565b9150613fb182613f4a565b604082019050919050565b60006020820190508181036000830152613fd581613f99565b9050919050565b7f4d75737420706179206174206c6561737420746865206d696e5072696365207460008201527f68617420746865206c697374696e67207370656369666965732e000000000000602082015250565b6000614038603a8361383c565b915061404382613fdc565b604082019050919050565b600060208201905081810360008301526140678161402b565b9050919050565b7f4c697374696e67206973206f7574646174656420616e6420776173206e6f742060008201527f706f737465642062792074686520676f6427732063757272656e74206f776e6560208201527f722e000000000000000000000000000000000000000000000000000000000000604082015250565b60006140f060428361383c565b91506140fb8261406e565b606082019050919050565b6000602082019050818103600083015261411f816140e3565b9050919050565b600060608201905061413b60008301866134d1565b61414860208301856134d1565b6141556040830184613475565b949350505050565b60006040820190506141726000830185613475565b61417f6020830184613475565b9392505050565b7f43616e6e6f74207769746864726177206120626964206e6f74206d616465206260008201527f79207468652073656e6465722e00000000000000000000000000000000000000602082015250565b60006141e2602d8361383c565b91506141ed82614186565b604082019050919050565b60006020820190508181036000830152614211816141d5565b9050919050565b7f526576657274696e6720626563617573652063616c6c20746f2076697274756560008201527f546f6b656e2e7472616e7366657246726f6d2072657475726e65642066616c7360208201527f6500000000000000000000000000000000000000000000000000000000000000604082015250565b600061429a60418361383c565b91506142a582614218565b606082019050919050565b600060208201905081810360008301526142c98161428d565b9050919050565b7f43616e206f6e6c792072656d6f76652061206c697374696e672077686572652060008201527f6d73672e73656e646572206973207468652073656c6c65720000000000000000602082015250565b600061432c60388361383c565b9150614337826142d0565b604082019050919050565b6000602082019050818103600083015261435b8161431f565b9050919050565b7f43616e6e6f742061636365707420612030206269642e00000000000000000000600082015250565b600061439860168361383c565b91506143a382614362565b602082019050919050565b600060208201905081810360008301526143c78161438b565b9050919050565b7f4578697374696e6720626964206973206c6f776572207468616e20746865207360008201527f7065636966696564205f6d696e50726963652e00000000000000000000000000602082015250565b600061442a60338361383c565b9150614435826143ce565b604082019050919050565b600060208201905081810360008301526144598161441d565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006144bc60268361383c565b91506144c782614460565b604082019050919050565b600060208201905081810360008301526144eb816144af565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b6000614528601d8361383c565b9150614533826144f2565b602082019050919050565b600060208201905081810360008301526145578161451b565b9050919050565b600081905092915050565b50565b600061457960008361455e565b915061458482614569565b600082019050919050565b600061459a8261456c565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b6000614600603a8361383c565b915061460b826145a4565b604082019050919050565b6000602082019050818103600083015261462f816145f3565b9050919050565b600081519050919050565b60005b8381101561465f578082015181840152602081019050614644565b8381111561466e576000848401525b50505050565b6000601f19601f8301169050919050565b600061469082614636565b61469a818561383c565b93506146aa818560208601614641565b6146b381614674565b840191505092915050565b600060208201905081810360008301526146d88184614685565b90509291505056fea26469706673582212202d6938282c9d665a3deb5e71fc9c6512a652aee3543b375ec10e9a000ab4bc1064736f6c63430008090033

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

0000000000000000000000007b4b02372d8e54c1c0454d97f01d85ef203cdc5e000000000000000000000000439cac149b935ae1d726569800972e1669d170940000000000000000000000009416ba76e88d873050a06e5956a3ebf10386b863

-----Decoded View---------------
Arg [0] : _idolMintAddress (address): 0x7B4b02372d8e54c1C0454D97F01D85eF203cdC5e
Arg [1] : _idolMainAddress (address): 0x439cac149B935AE1D726569800972E1669d17094
Arg [2] : _virtueTokenAddress (address): 0x9416bA76e88D873050A06e5956A3EBF10386b863

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000007b4b02372d8e54c1c0454d97f01d85ef203cdc5e
Arg [1] : 000000000000000000000000439cac149b935ae1d726569800972e1669d17094
Arg [2] : 0000000000000000000000009416ba76e88d873050a06e5956a3ebf10386b863


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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