ETH Price: $2,456.75 (-1.38%)

Contract

0xC73B93885F10c5eAf8Cb126495bBD14D3B9b7BaF
 

Overview

ETH Balance

10.831872938986931196 ETH

Eth Value

$26,611.18 (@ $2,456.75/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...144390922022-03-22 23:27:49957 days ago1647991669IN
0xC73B9388...D3B9b7BaF
0 ETH0.0008908330.64959073
0x60c06040144390902022-03-22 23:27:38957 days ago1647991658IN
 Create: VirtueEthRewards
0 ETH0.0659270833.46898969

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
210879962024-10-31 20:24:473 days ago1730406287
0xC73B9388...D3B9b7BaF
0.00974923 ETH
210775492024-10-30 9:25:114 days ago1730280311
0xC73B9388...D3B9b7BaF
0.00902804 ETH
210097492024-10-20 22:23:2314 days ago1729463003
0xC73B9388...D3B9b7BaF
0.02684267 ETH
209504692024-10-12 15:39:2322 days ago1728747563
0xC73B9388...D3B9b7BaF
0.00809565 ETH
209317022024-10-10 0:44:1124 days ago1728521051
0xC73B9388...D3B9b7BaF
0.00738349 ETH
206279802024-08-28 15:27:4767 days ago1724858867
0xC73B9388...D3B9b7BaF
0.00107331 ETH
206104922024-08-26 4:51:2369 days ago1724647883
0xC73B9388...D3B9b7BaF
0.0070389 ETH
206035012024-08-25 5:24:1170 days ago1724563451
0xC73B9388...D3B9b7BaF
0.00617085 ETH
205985942024-08-24 12:55:5971 days ago1724504159
0xC73B9388...D3B9b7BaF
0.01963569 ETH
205591232024-08-19 0:33:2376 days ago1724027603
0xC73B9388...D3B9b7BaF
0.05392163 ETH
204957412024-08-10 4:12:1185 days ago1723263131
0xC73B9388...D3B9b7BaF
0.00144003 ETH
204389112024-08-02 5:55:4793 days ago1722578147
0xC73B9388...D3B9b7BaF
0.017384 ETH
204146112024-07-29 20:27:5997 days ago1722284879
0xC73B9388...D3B9b7BaF
0.04535751 ETH
204090602024-07-29 1:52:5997 days ago1722217979
0xC73B9388...D3B9b7BaF
0.01060168 ETH
203898832024-07-26 9:39:11100 days ago1721986751
0xC73B9388...D3B9b7BaF
0.00831989 ETH
203769012024-07-24 14:08:47102 days ago1721830127
0xC73B9388...D3B9b7BaF
0.0071254 ETH
203390372024-07-19 7:19:11107 days ago1721373551
0xC73B9388...D3B9b7BaF
0.02447893 ETH
202634202024-07-08 17:56:35118 days ago1720461395
0xC73B9388...D3B9b7BaF
0.01539447 ETH
202279272024-07-03 18:58:59123 days ago1720033139
0xC73B9388...D3B9b7BaF
0.42686259 ETH
202100482024-07-01 7:02:11125 days ago1719817331
0xC73B9388...D3B9b7BaF
0.05805642 ETH
202031342024-06-30 7:53:35126 days ago1719734015
0xC73B9388...D3B9b7BaF
0.00102776 ETH
201743842024-06-26 7:30:59130 days ago1719387059
0xC73B9388...D3B9b7BaF
0.00049298 ETH
201659242024-06-25 3:10:35131 days ago1719285035
0xC73B9388...D3B9b7BaF
0.01433497 ETH
201337602024-06-20 15:13:23136 days ago1718896403
0xC73B9388...D3B9b7BaF
0.020777 ETH
201240042024-06-19 6:29:47137 days ago1718778587
0xC73B9388...D3B9b7BaF
0.00673323 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VirtueEthRewards

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
No with 200 runs

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

import "./VirtueStaking.sol";
import "./interface/IRewards.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";

/**
  @notice VirtueEthRewards implements the IRewards interface and is meant to be added as an extra
    reward to the VirtueStaking contract through its addExtraReward function. It streams rewards
    of ETH to VIRTUE stakers at a constant rate over a defined period of time, with each user's
    share of the rewards doled out proportionally to the amount of VIRTUE they have staked.
*/
contract VirtueEthRewards is IRewards, ReentrancyGuard, Ownable {
  // stakingToken references the ERC20 token that is staked to claim rewards from this contract.
  // Should be VIRTUE for this particular contract.
  IERC20 public immutable stakingToken;

  // virtueStakingContract references the base VirtueStaking contract that this rewards contract
  // is being added to. VirtueStaking should be calling the stake/reward functions on this contract,
  // rather than users calling this contract's functions directly.
  VirtueStaking public immutable virtueStakingContract;

  // rewardsPeriodFinish holds the UNIX timestamp for when the rewards are scheduled to finish
  // being distributed.
  uint256 public rewardsPeriodFinish = 0;

  // rewardsDuration stores, in seconds, how long the rewards period should last for. Default is
  // 15 days = 15 * 24 * 60 * 60 = 1296000.
  uint256 public rewardsDuration = 15 days;

  // rewardsRefreshWindow stores the amount of time before the end of the rewards duration where
  // addReward can be called again to refresh the rewards period.
  uint256 public rewardsRefreshWindow = 1 days;

  // rewardRate stores the total amount of ETH that is distributed across all VIRTUE
  // stakers per second.
  uint256 public rewardRate;

  // rewardPerTokenStored stores the last recorded amount of ETH that is eligible to be
  // claimed per token of staked VIRTUE.
  uint256 public rewardPerTokenStored;

  // lastUpdateTime stores the last time the rewardPerTokenStored was updated.
  uint256 public lastUpdateTime;

  // userRewardPerTokenPaid stores, per user, how much ETH the user is no longer eligible to claim
  // per staked VIRTUE token.
  mapping(address => uint256) public userRewardPerTokenPaid;

  // rewards stores the amount of ETH that a user is eligible to claim since the last time
  // updateReward was called for that user.
  mapping(address => uint256) public rewards;

  // DECIMAL_PRECISION is used as a multiplier on the rewardPerTokenStored since the ratio cannot
  // always be accurately represented as a whole integer.
  uint constant DECIMAL_PRECISION = 10**18;

  // rewardsCollectorAddress stores the address of the RewardsCollector contract that this contract
  // expects to receive rewards from.
  address public rewardsCollectorAddress;

  constructor(address _stakingTokenAddress, address payable _virtueStakingAddress, address _rewardsCollectorAddress) {
    stakingToken = IERC20(_stakingTokenAddress);
    virtueStakingContract = VirtueStaking(_virtueStakingAddress);
    rewardsCollectorAddress = _rewardsCollectorAddress;
  }

  /**
    @notice totalStaked returns the total amount of VIRTUE token that is staked in the VirtueStaking
      contract.
  */
  function totalStaked() public view returns (uint256) {
    return stakingToken.balanceOf(address(virtueStakingContract));
  }

  /**
    @notice userStaked returns the amount of VIRTUE token that a particular user has staked in the
      VirtueStaking contract.
    @param _account The user to get VIRTUE stake for.
  */
  function userStaked(address _account) public view returns (uint256) {
    return virtueStakingContract.getUserVirtueStake(_account);
  }

  /**
    @notice lastTimeRewardApplicable returns the most recent timestamp where the rewards period was
      still active (which is the current timestamp is the rewards period is currently active).
  */
  function lastTimeRewardApplicable() public view returns (uint256) {
    return block.timestamp < rewardsPeriodFinish ? block.timestamp : rewardsPeriodFinish;
  }

  /**
    @notice rewardPerToken returns the amount of ETH that is currently eligible to be claimed per
      staked VIRTUE token.
  */
  function rewardPerToken() public view returns (uint256) {
    if (totalStaked() == 0) {
      return rewardPerTokenStored;
    }
    return rewardPerTokenStored + (lastTimeRewardApplicable() - lastUpdateTime) * rewardRate * DECIMAL_PRECISION / totalStaked();
  }

  /**
    @notice earned returns the amount that a specified user is currently eligible to claim.
    @param _account The user to view earned rewards for.
  */
  function earned(address _account) public view returns (uint256) {
    return rewards[_account] + userStaked(_account) * (rewardPerToken() - userRewardPerTokenPaid[_account]) / DECIMAL_PRECISION;
  }

  /**
    @notice getRewardForDuration returns the total amount of rewards that were set to be distributed
      over the most recent rewards period.
  */
  function getRewardForDuration() external view returns (uint256) {
    return rewardRate * rewardsDuration;
  }

  /**
    @notice increaseStake is called for a user when their VIRTUE stake in the VirtueStaking contract
      is increased.
    @param _for The address of the user whose VIRTUE stake has been increased.
    @param _amount The amount of VIRTUE staked.
  */
  function increaseStake(address _for, uint256 _amount) external onlyStakingContract updateReward(_for) {
    // This function actually does nothing other than call updateReward since staking balances are
    // stored in the VirtueStaking contract.
  }

  /**
    @notice decreaseStake is called for a user when their VIRTUE stake in the VirtueStaking contract
      is decreased.
    @param _for The address of the user whose VIRTUE stake has been decreased.
    @param _amount The amount of VIRTUE stake withdrawn.
  */
  function decreaseStake(address _for, uint256 _amount) external onlyStakingContract updateReward(_for) {
    // This function actually does nothing other than call updateReward since staking balances are
    // stored in the VirtueStaking contract.
  }

  /**
    @notice claimRewards takes the amount of ETH that a user is eligible to claim and transfers the
      ETH to their address.
    @param _for The address to claim rewards for.
  */
  function claimRewards(address _for) external onlyStakingContract updateReward(_for) {
    uint256 reward = rewards[_for];
    if (reward > 0) {
      rewards[_for] = 0;
      Address.sendValue(payable(_for), reward);
    }
  }

  /**
    @notice addReward allocates a certain amount of ETH to be distributed amongst
      VIRTUE stakers over the current rewardsDuration. If a previous reward is still actively being
      distributed, the remaining undistributed amount is added to _rewardAmount and the duration
      of the rewards period is overwritten to start at the current timestamp.
  */
  function addReward() external payable onlyRewardsCollector updateReward(address(0)) {
    if (block.timestamp < rewardsPeriodFinish) {
      require(rewardsPeriodFinish - block.timestamp <= rewardsRefreshWindow, "Too early to call addReward during current rewards period");
    }

    uint rewardAmount = msg.value;
    if (block.timestamp >= rewardsPeriodFinish) {
      rewardRate = rewardAmount / rewardsDuration;
    } else {
      uint256 remainingTime = rewardsPeriodFinish - block.timestamp;
      uint256 leftoverReward = remainingTime * rewardRate;
      uint256 newRewardRate = (rewardAmount + leftoverReward) / rewardsDuration;
      rewardRate = newRewardRate;
    }

    // Ensure the provided reward amount is not more than the balance in the contract.
    // This keeps the reward rate in the right range, preventing overflows due to
    // very high values of rewardRate in the earned and rewardsPerToken functions;
    // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow.
    uint balance = address(this).balance;
    require(rewardRate <= balance / rewardsDuration, "Provided reward too high");

    lastUpdateTime = block.timestamp;
    rewardsPeriodFinish = block.timestamp + rewardsDuration;
  }

  /**
    @notice setRewardsDuration is used to update the duration of the reward period.
    @param _rewardsDuration The length of the new rewards period, in seconds.
  */
  function setRewardsDuration(uint256 _rewardsDuration) external onlyOwner {
    require(block.timestamp > rewardsPeriodFinish, "Previous rewards period must be completed before updating duration");
    rewardsDuration = _rewardsDuration;
  }

  function setRewardsRefreshWindow(uint256 _rewardsRefreshWindow) external onlyOwner {
    rewardsRefreshWindow = _rewardsRefreshWindow;
  }

  function setRewardsCollectorAddress(address _rewardsCollectorAddress) external onlyOwner {
    rewardsCollectorAddress = _rewardsCollectorAddress;
  }

  modifier onlyStakingContract {
    require(msg.sender == address(virtueStakingContract), "Can only be called by the operating VirtueStaking contract");
    _;
  }

  modifier onlyRewardsCollector {
    require(msg.sender == rewardsCollectorAddress, "Can only be called by the RewardsCollector contract");
    _;
  }

  /**
    @notice updateReward is called to update a user's rewards whenever their stake is updated or
      they want to claim their existing rewards.
    @param _for The address to update rewards for.
  */
  modifier updateReward(address _for) {
    rewardPerTokenStored = rewardPerToken();
    lastUpdateTime = lastTimeRewardApplicable();
    if (_for != address(0)) {
      rewards[_for] = earned(_for);
      userRewardPerTokenPaid[_for] = rewardPerTokenStored;
    }
    _;
  }
}

File 2 of 14 : 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]);
      require(
        virtueToken.transfer(msg.sender, currentStake),
        "Reverting because call to virtueToken.transfer returned false"
      );
    }
    else {
      userStakes[msg.sender] = currentStake - _virtueTokenAmt;
      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 3 of 14 : 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;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 5 of 14 : 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 6 of 14 : 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 7 of 14 : 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 8 of 14 : 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 9 of 14 : 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 10 of 14 : 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 11 of 14 : 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 12 of 14 : 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 13 of 14 : 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 14 of 14 : 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);
}

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":"_stakingTokenAddress","type":"address"},{"internalType":"address payable","name":"_virtueStakingAddress","type":"address"},{"internalType":"address","name":"_rewardsCollectorAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"addReward","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_for","type":"address"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_for","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"decreaseStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_for","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"increaseStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsCollectorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsPeriodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsRefreshWindow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsCollectorAddress","type":"address"}],"name":"setRewardsCollectorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"}],"name":"setRewardsDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardsRefreshWindow","type":"uint256"}],"name":"setRewardsRefreshWindow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"userStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"virtueStakingContract","outputs":[{"internalType":"contract VirtueStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60c060405260006002556213c680600355620151806004553480156200002457600080fd5b50604051620023d1380380620023d183398181016040528101906200004a9190620002a1565b600160008190555062000072620000666200012460201b60201c565b6200012c60201b60201c565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff168152505080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050620002fd565b600033905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200022482620001f7565b9050919050565b620002368162000217565b81146200024257600080fd5b50565b60008151905062000256816200022b565b92915050565b60006200026982620001f7565b9050919050565b6200027b816200025c565b81146200028757600080fd5b50565b6000815190506200029b8162000270565b92915050565b600080600060608486031215620002bd57620002bc620001f2565b5b6000620002cd8682870162000245565b9350506020620002e0868287016200028a565b9250506040620002f38682870162000245565b9150509250925092565b60805160a0516120846200034d60003960008181610713015281816109330152818161095701528181610cbe01528181610d9a0152611251015260008181610c3c0152610c8201526120846000f3fe60806040526004361061019b5760003560e01c80637b0a47ee116100ec578063c8f33c911161008a578063df136d6511610064578063df136d65146105a7578063e59a58ee146105d2578063ef5cfb8c146105dc578063f2fde38b146106055761019b565b8063c8f33c9114610528578063cc1a378f14610553578063cd3daf9d1461057c5761019b565b80638b876347116100c65780638b876347146104585780638da5cb5b146104955780639851993a146104c0578063acc3a939146104eb5761019b565b80637b0a47ee146103d757806380faa57d14610402578063817b1cd21461042d5761019b565b80633a70733911610159578063606d809311610133578063606d809314610341578063715018a61461036a57806371e786ac1461038157806372f702f3146103ac5761019b565b80633a707339146102c457806345e1980a146102ed5780635d7e9467146103185761019b565b80628cc262146101a05780630700037d146101dd5780631a73ba011461021a5780631c1f78eb146102435780632115e5dd1461026e578063386a952514610299575b600080fd5b3480156101ac57600080fd5b506101c760048036038101906101c29190611780565b61062e565b6040516101d491906117c6565b60405180910390f35b3480156101e957600080fd5b5061020460048036038101906101ff9190611780565b6106f9565b60405161021191906117c6565b60405180910390f35b34801561022657600080fd5b50610241600480360381019061023c919061180d565b610711565b005b34801561024f57600080fd5b50610258610888565b60405161026591906117c6565b60405180910390f35b34801561027a57600080fd5b5061028361089f565b60405161029091906117c6565b60405180910390f35b3480156102a557600080fd5b506102ae6108a5565b6040516102bb91906117c6565b60405180910390f35b3480156102d057600080fd5b506102eb60048036038101906102e6919061184d565b6108ab565b005b3480156102f957600080fd5b50610302610931565b60405161030f91906118d9565b60405180910390f35b34801561032457600080fd5b5061033f600480360381019061033a919061180d565b610955565b005b34801561034d57600080fd5b5061036860048036038101906103639190611780565b610acc565b005b34801561037657600080fd5b5061037f610b8c565b005b34801561038d57600080fd5b50610396610c14565b6040516103a39190611903565b60405180910390f35b3480156103b857600080fd5b506103c1610c3a565b6040516103ce9190611951565b60405180910390f35b3480156103e357600080fd5b506103ec610c5e565b6040516103f991906117c6565b60405180910390f35b34801561040e57600080fd5b50610417610c64565b60405161042491906117c6565b60405180910390f35b34801561043957600080fd5b50610442610c7e565b60405161044f91906117c6565b60405180910390f35b34801561046457600080fd5b5061047f600480360381019061047a9190611780565b610d4e565b60405161048c91906117c6565b60405180910390f35b3480156104a157600080fd5b506104aa610d66565b6040516104b79190611903565b60405180910390f35b3480156104cc57600080fd5b506104d5610d90565b6040516104e291906117c6565b60405180910390f35b3480156104f757600080fd5b50610512600480360381019061050d9190611780565b610d96565b60405161051f91906117c6565b60405180910390f35b34801561053457600080fd5b5061053d610e48565b60405161054a91906117c6565b60405180910390f35b34801561055f57600080fd5b5061057a6004803603810190610575919061184d565b610e4e565b005b34801561058857600080fd5b50610591610f18565b60405161059e91906117c6565b60405180910390f35b3480156105b357600080fd5b506105bc610f8d565b6040516105c991906117c6565b60405180910390f35b6105da610f93565b005b3480156105e857600080fd5b5061060360048036038101906105fe9190611780565b61124f565b005b34801561061157600080fd5b5061062c60048036038101906106279190611780565b611463565b005b6000670de0b6b3a7640000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610681610f18565b61068b919061199b565b61069484610d96565b61069e91906119cf565b6106a89190611a58565b600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106f29190611a89565b9050919050565b60096020528060005260406000206000915090505481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461079f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079690611b62565b60405180910390fd5b816107a8610f18565b6006819055506107b6610c64565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610883576107f98161062e565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600654600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b600060035460055461089a91906119cf565b905090565b60025481565b60035481565b6108b361155b565b73ffffffffffffffffffffffffffffffffffffffff166108d1610d66565b73ffffffffffffffffffffffffffffffffffffffff1614610927576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091e90611bce565b60405180910390fd5b8060048190555050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109da90611b62565b60405180910390fd5b816109ec610f18565b6006819055506109fa610c64565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610ac757610a3d8161062e565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600654600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b610ad461155b565b73ffffffffffffffffffffffffffffffffffffffff16610af2610d66565b73ffffffffffffffffffffffffffffffffffffffff1614610b48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3f90611bce565b60405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610b9461155b565b73ffffffffffffffffffffffffffffffffffffffff16610bb2610d66565b73ffffffffffffffffffffffffffffffffffffffff1614610c08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bff90611bce565b60405180910390fd5b610c126000611563565b565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b60055481565b60006002544210610c7757600254610c79565b425b905090565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a082317f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610cf99190611903565b60206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d499190611c03565b905090565b60086020528060005260406000206000915090505481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60045481565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ddeeacec836040518263ffffffff1660e01b8152600401610df19190611903565b60206040518083038186803b158015610e0957600080fd5b505afa158015610e1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e419190611c03565b9050919050565b60075481565b610e5661155b565b73ffffffffffffffffffffffffffffffffffffffff16610e74610d66565b73ffffffffffffffffffffffffffffffffffffffff1614610eca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec190611bce565b60405180910390fd5b6002544211610f0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0590611cc8565b60405180910390fd5b8060038190555050565b600080610f23610c7e565b1415610f33576006549050610f8a565b610f3b610c7e565b670de0b6b3a7640000600554600754610f52610c64565b610f5c919061199b565b610f6691906119cf565b610f7091906119cf565b610f7a9190611a58565b600654610f879190611a89565b90505b90565b60065481565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611023576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101a90611d5a565b60405180910390fd5b600061102d610f18565b60068190555061103b610c64565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111085761107e8161062e565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600654600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6002544210156111655760045442600254611123919061199b565b1115611164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115b90611dec565b60405180910390fd5b5b6000349050600254421061118c57600354816111819190611a58565b6005819055506111d8565b60004260025461119c919061199b565b90506000600554826111ae91906119cf565b9050600060035482856111c19190611a89565b6111cb9190611a58565b9050806005819055505050505b6000479050600354816111eb9190611a58565b600554111561122f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122690611e58565b60405180910390fd5b42600781905550600354426112449190611a89565b600281905550505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146112dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d490611b62565b60405180910390fd5b806112e6610f18565b6006819055506112f4610c64565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146113c1576113378161062e565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600654600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600081111561145e576000600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061145d8382611629565b5b505050565b61146b61155b565b73ffffffffffffffffffffffffffffffffffffffff16611489610d66565b73ffffffffffffffffffffffffffffffffffffffff16146114df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d690611bce565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561154f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154690611eea565b60405180910390fd5b61155881611563565b50565b600033905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8047101561166c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166390611f56565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405161169290611fa7565b60006040518083038185875af1925050503d80600081146116cf576040519150601f19603f3d011682016040523d82523d6000602084013e6116d4565b606091505b5050905080611718576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170f9061202e565b60405180910390fd5b505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061174d82611722565b9050919050565b61175d81611742565b811461176857600080fd5b50565b60008135905061177a81611754565b92915050565b6000602082840312156117965761179561171d565b5b60006117a48482850161176b565b91505092915050565b6000819050919050565b6117c0816117ad565b82525050565b60006020820190506117db60008301846117b7565b92915050565b6117ea816117ad565b81146117f557600080fd5b50565b600081359050611807816117e1565b92915050565b600080604083850312156118245761182361171d565b5b60006118328582860161176b565b9250506020611843858286016117f8565b9150509250929050565b6000602082840312156118635761186261171d565b5b6000611871848285016117f8565b91505092915050565b6000819050919050565b600061189f61189a61189584611722565b61187a565b611722565b9050919050565b60006118b182611884565b9050919050565b60006118c3826118a6565b9050919050565b6118d3816118b8565b82525050565b60006020820190506118ee60008301846118ca565b92915050565b6118fd81611742565b82525050565b600060208201905061191860008301846118f4565b92915050565b600061192982611884565b9050919050565b600061193b8261191e565b9050919050565b61194b81611930565b82525050565b60006020820190506119666000830184611942565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006119a6826117ad565b91506119b1836117ad565b9250828210156119c4576119c361196c565b5b828203905092915050565b60006119da826117ad565b91506119e5836117ad565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611a1e57611a1d61196c565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000611a63826117ad565b9150611a6e836117ad565b925082611a7e57611a7d611a29565b5b828204905092915050565b6000611a94826117ad565b9150611a9f836117ad565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611ad457611ad361196c565b5b828201905092915050565b600082825260208201905092915050565b7f43616e206f6e6c792062652063616c6c656420627920746865206f706572617460008201527f696e67205669727475655374616b696e6720636f6e7472616374000000000000602082015250565b6000611b4c603a83611adf565b9150611b5782611af0565b604082019050919050565b60006020820190508181036000830152611b7b81611b3f565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000611bb8602083611adf565b9150611bc382611b82565b602082019050919050565b60006020820190508181036000830152611be781611bab565b9050919050565b600081519050611bfd816117e1565b92915050565b600060208284031215611c1957611c1861171d565b5b6000611c2784828501611bee565b91505092915050565b7f50726576696f7573207265776172647320706572696f64206d7573742062652060008201527f636f6d706c65746564206265666f7265207570646174696e672064757261746960208201527f6f6e000000000000000000000000000000000000000000000000000000000000604082015250565b6000611cb2604283611adf565b9150611cbd82611c30565b606082019050919050565b60006020820190508181036000830152611ce181611ca5565b9050919050565b7f43616e206f6e6c792062652063616c6c6564206279207468652052657761726460008201527f73436f6c6c6563746f7220636f6e747261637400000000000000000000000000602082015250565b6000611d44603383611adf565b9150611d4f82611ce8565b604082019050919050565b60006020820190508181036000830152611d7381611d37565b9050919050565b7f546f6f206561726c7920746f2063616c6c20616464526577617264206475726960008201527f6e672063757272656e74207265776172647320706572696f6400000000000000602082015250565b6000611dd6603983611adf565b9150611de182611d7a565b604082019050919050565b60006020820190508181036000830152611e0581611dc9565b9050919050565b7f50726f76696465642072657761726420746f6f20686967680000000000000000600082015250565b6000611e42601883611adf565b9150611e4d82611e0c565b602082019050919050565b60006020820190508181036000830152611e7181611e35565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000611ed4602683611adf565b9150611edf82611e78565b604082019050919050565b60006020820190508181036000830152611f0381611ec7565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b6000611f40601d83611adf565b9150611f4b82611f0a565b602082019050919050565b60006020820190508181036000830152611f6f81611f33565b9050919050565b600081905092915050565b50565b6000611f91600083611f76565b9150611f9c82611f81565b600082019050919050565b6000611fb282611f84565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b6000612018603a83611adf565b915061202382611fbc565b604082019050919050565b600060208201905081810360008301526120478161200b565b905091905056fea2646970667358221220c4b2ee3642812993bc2c5cc4a3d18c99b50175cd021fe1a123d1eb78c4d43f2b64736f6c634300080900330000000000000000000000009416ba76e88d873050a06e5956a3ebf10386b8630000000000000000000000000dd5a35fe4cd65fe7928c7b923902b43d6ea29e70000000000000000000000007d624c34e475a2eca893d0c118527b6e2061256a

Deployed Bytecode

0x60806040526004361061019b5760003560e01c80637b0a47ee116100ec578063c8f33c911161008a578063df136d6511610064578063df136d65146105a7578063e59a58ee146105d2578063ef5cfb8c146105dc578063f2fde38b146106055761019b565b8063c8f33c9114610528578063cc1a378f14610553578063cd3daf9d1461057c5761019b565b80638b876347116100c65780638b876347146104585780638da5cb5b146104955780639851993a146104c0578063acc3a939146104eb5761019b565b80637b0a47ee146103d757806380faa57d14610402578063817b1cd21461042d5761019b565b80633a70733911610159578063606d809311610133578063606d809314610341578063715018a61461036a57806371e786ac1461038157806372f702f3146103ac5761019b565b80633a707339146102c457806345e1980a146102ed5780635d7e9467146103185761019b565b80628cc262146101a05780630700037d146101dd5780631a73ba011461021a5780631c1f78eb146102435780632115e5dd1461026e578063386a952514610299575b600080fd5b3480156101ac57600080fd5b506101c760048036038101906101c29190611780565b61062e565b6040516101d491906117c6565b60405180910390f35b3480156101e957600080fd5b5061020460048036038101906101ff9190611780565b6106f9565b60405161021191906117c6565b60405180910390f35b34801561022657600080fd5b50610241600480360381019061023c919061180d565b610711565b005b34801561024f57600080fd5b50610258610888565b60405161026591906117c6565b60405180910390f35b34801561027a57600080fd5b5061028361089f565b60405161029091906117c6565b60405180910390f35b3480156102a557600080fd5b506102ae6108a5565b6040516102bb91906117c6565b60405180910390f35b3480156102d057600080fd5b506102eb60048036038101906102e6919061184d565b6108ab565b005b3480156102f957600080fd5b50610302610931565b60405161030f91906118d9565b60405180910390f35b34801561032457600080fd5b5061033f600480360381019061033a919061180d565b610955565b005b34801561034d57600080fd5b5061036860048036038101906103639190611780565b610acc565b005b34801561037657600080fd5b5061037f610b8c565b005b34801561038d57600080fd5b50610396610c14565b6040516103a39190611903565b60405180910390f35b3480156103b857600080fd5b506103c1610c3a565b6040516103ce9190611951565b60405180910390f35b3480156103e357600080fd5b506103ec610c5e565b6040516103f991906117c6565b60405180910390f35b34801561040e57600080fd5b50610417610c64565b60405161042491906117c6565b60405180910390f35b34801561043957600080fd5b50610442610c7e565b60405161044f91906117c6565b60405180910390f35b34801561046457600080fd5b5061047f600480360381019061047a9190611780565b610d4e565b60405161048c91906117c6565b60405180910390f35b3480156104a157600080fd5b506104aa610d66565b6040516104b79190611903565b60405180910390f35b3480156104cc57600080fd5b506104d5610d90565b6040516104e291906117c6565b60405180910390f35b3480156104f757600080fd5b50610512600480360381019061050d9190611780565b610d96565b60405161051f91906117c6565b60405180910390f35b34801561053457600080fd5b5061053d610e48565b60405161054a91906117c6565b60405180910390f35b34801561055f57600080fd5b5061057a6004803603810190610575919061184d565b610e4e565b005b34801561058857600080fd5b50610591610f18565b60405161059e91906117c6565b60405180910390f35b3480156105b357600080fd5b506105bc610f8d565b6040516105c991906117c6565b60405180910390f35b6105da610f93565b005b3480156105e857600080fd5b5061060360048036038101906105fe9190611780565b61124f565b005b34801561061157600080fd5b5061062c60048036038101906106279190611780565b611463565b005b6000670de0b6b3a7640000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610681610f18565b61068b919061199b565b61069484610d96565b61069e91906119cf565b6106a89190611a58565b600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106f29190611a89565b9050919050565b60096020528060005260406000206000915090505481565b7f0000000000000000000000000dd5a35fe4cd65fe7928c7b923902b43d6ea29e773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461079f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079690611b62565b60405180910390fd5b816107a8610f18565b6006819055506107b6610c64565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610883576107f98161062e565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600654600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b600060035460055461089a91906119cf565b905090565b60025481565b60035481565b6108b361155b565b73ffffffffffffffffffffffffffffffffffffffff166108d1610d66565b73ffffffffffffffffffffffffffffffffffffffff1614610927576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091e90611bce565b60405180910390fd5b8060048190555050565b7f0000000000000000000000000dd5a35fe4cd65fe7928c7b923902b43d6ea29e781565b7f0000000000000000000000000dd5a35fe4cd65fe7928c7b923902b43d6ea29e773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109da90611b62565b60405180910390fd5b816109ec610f18565b6006819055506109fa610c64565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610ac757610a3d8161062e565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600654600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b610ad461155b565b73ffffffffffffffffffffffffffffffffffffffff16610af2610d66565b73ffffffffffffffffffffffffffffffffffffffff1614610b48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3f90611bce565b60405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610b9461155b565b73ffffffffffffffffffffffffffffffffffffffff16610bb2610d66565b73ffffffffffffffffffffffffffffffffffffffff1614610c08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bff90611bce565b60405180910390fd5b610c126000611563565b565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f0000000000000000000000009416ba76e88d873050a06e5956a3ebf10386b86381565b60055481565b60006002544210610c7757600254610c79565b425b905090565b60007f0000000000000000000000009416ba76e88d873050a06e5956a3ebf10386b86373ffffffffffffffffffffffffffffffffffffffff166370a082317f0000000000000000000000000dd5a35fe4cd65fe7928c7b923902b43d6ea29e76040518263ffffffff1660e01b8152600401610cf99190611903565b60206040518083038186803b158015610d1157600080fd5b505afa158015610d25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d499190611c03565b905090565b60086020528060005260406000206000915090505481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60045481565b60007f0000000000000000000000000dd5a35fe4cd65fe7928c7b923902b43d6ea29e773ffffffffffffffffffffffffffffffffffffffff1663ddeeacec836040518263ffffffff1660e01b8152600401610df19190611903565b60206040518083038186803b158015610e0957600080fd5b505afa158015610e1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e419190611c03565b9050919050565b60075481565b610e5661155b565b73ffffffffffffffffffffffffffffffffffffffff16610e74610d66565b73ffffffffffffffffffffffffffffffffffffffff1614610eca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec190611bce565b60405180910390fd5b6002544211610f0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0590611cc8565b60405180910390fd5b8060038190555050565b600080610f23610c7e565b1415610f33576006549050610f8a565b610f3b610c7e565b670de0b6b3a7640000600554600754610f52610c64565b610f5c919061199b565b610f6691906119cf565b610f7091906119cf565b610f7a9190611a58565b600654610f879190611a89565b90505b90565b60065481565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611023576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101a90611d5a565b60405180910390fd5b600061102d610f18565b60068190555061103b610c64565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111085761107e8161062e565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600654600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6002544210156111655760045442600254611123919061199b565b1115611164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115b90611dec565b60405180910390fd5b5b6000349050600254421061118c57600354816111819190611a58565b6005819055506111d8565b60004260025461119c919061199b565b90506000600554826111ae91906119cf565b9050600060035482856111c19190611a89565b6111cb9190611a58565b9050806005819055505050505b6000479050600354816111eb9190611a58565b600554111561122f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122690611e58565b60405180910390fd5b42600781905550600354426112449190611a89565b600281905550505050565b7f0000000000000000000000000dd5a35fe4cd65fe7928c7b923902b43d6ea29e773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146112dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d490611b62565b60405180910390fd5b806112e6610f18565b6006819055506112f4610c64565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146113c1576113378161062e565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600654600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600081111561145e576000600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061145d8382611629565b5b505050565b61146b61155b565b73ffffffffffffffffffffffffffffffffffffffff16611489610d66565b73ffffffffffffffffffffffffffffffffffffffff16146114df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d690611bce565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561154f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154690611eea565b60405180910390fd5b61155881611563565b50565b600033905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8047101561166c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166390611f56565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405161169290611fa7565b60006040518083038185875af1925050503d80600081146116cf576040519150601f19603f3d011682016040523d82523d6000602084013e6116d4565b606091505b5050905080611718576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170f9061202e565b60405180910390fd5b505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061174d82611722565b9050919050565b61175d81611742565b811461176857600080fd5b50565b60008135905061177a81611754565b92915050565b6000602082840312156117965761179561171d565b5b60006117a48482850161176b565b91505092915050565b6000819050919050565b6117c0816117ad565b82525050565b60006020820190506117db60008301846117b7565b92915050565b6117ea816117ad565b81146117f557600080fd5b50565b600081359050611807816117e1565b92915050565b600080604083850312156118245761182361171d565b5b60006118328582860161176b565b9250506020611843858286016117f8565b9150509250929050565b6000602082840312156118635761186261171d565b5b6000611871848285016117f8565b91505092915050565b6000819050919050565b600061189f61189a61189584611722565b61187a565b611722565b9050919050565b60006118b182611884565b9050919050565b60006118c3826118a6565b9050919050565b6118d3816118b8565b82525050565b60006020820190506118ee60008301846118ca565b92915050565b6118fd81611742565b82525050565b600060208201905061191860008301846118f4565b92915050565b600061192982611884565b9050919050565b600061193b8261191e565b9050919050565b61194b81611930565b82525050565b60006020820190506119666000830184611942565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006119a6826117ad565b91506119b1836117ad565b9250828210156119c4576119c361196c565b5b828203905092915050565b60006119da826117ad565b91506119e5836117ad565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611a1e57611a1d61196c565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000611a63826117ad565b9150611a6e836117ad565b925082611a7e57611a7d611a29565b5b828204905092915050565b6000611a94826117ad565b9150611a9f836117ad565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611ad457611ad361196c565b5b828201905092915050565b600082825260208201905092915050565b7f43616e206f6e6c792062652063616c6c656420627920746865206f706572617460008201527f696e67205669727475655374616b696e6720636f6e7472616374000000000000602082015250565b6000611b4c603a83611adf565b9150611b5782611af0565b604082019050919050565b60006020820190508181036000830152611b7b81611b3f565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000611bb8602083611adf565b9150611bc382611b82565b602082019050919050565b60006020820190508181036000830152611be781611bab565b9050919050565b600081519050611bfd816117e1565b92915050565b600060208284031215611c1957611c1861171d565b5b6000611c2784828501611bee565b91505092915050565b7f50726576696f7573207265776172647320706572696f64206d7573742062652060008201527f636f6d706c65746564206265666f7265207570646174696e672064757261746960208201527f6f6e000000000000000000000000000000000000000000000000000000000000604082015250565b6000611cb2604283611adf565b9150611cbd82611c30565b606082019050919050565b60006020820190508181036000830152611ce181611ca5565b9050919050565b7f43616e206f6e6c792062652063616c6c6564206279207468652052657761726460008201527f73436f6c6c6563746f7220636f6e747261637400000000000000000000000000602082015250565b6000611d44603383611adf565b9150611d4f82611ce8565b604082019050919050565b60006020820190508181036000830152611d7381611d37565b9050919050565b7f546f6f206561726c7920746f2063616c6c20616464526577617264206475726960008201527f6e672063757272656e74207265776172647320706572696f6400000000000000602082015250565b6000611dd6603983611adf565b9150611de182611d7a565b604082019050919050565b60006020820190508181036000830152611e0581611dc9565b9050919050565b7f50726f76696465642072657761726420746f6f20686967680000000000000000600082015250565b6000611e42601883611adf565b9150611e4d82611e0c565b602082019050919050565b60006020820190508181036000830152611e7181611e35565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000611ed4602683611adf565b9150611edf82611e78565b604082019050919050565b60006020820190508181036000830152611f0381611ec7565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b6000611f40601d83611adf565b9150611f4b82611f0a565b602082019050919050565b60006020820190508181036000830152611f6f81611f33565b9050919050565b600081905092915050565b50565b6000611f91600083611f76565b9150611f9c82611f81565b600082019050919050565b6000611fb282611f84565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b6000612018603a83611adf565b915061202382611fbc565b604082019050919050565b600060208201905081810360008301526120478161200b565b905091905056fea2646970667358221220c4b2ee3642812993bc2c5cc4a3d18c99b50175cd021fe1a123d1eb78c4d43f2b64736f6c63430008090033

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

0000000000000000000000009416ba76e88d873050a06e5956a3ebf10386b8630000000000000000000000000dd5a35fe4cd65fe7928c7b923902b43d6ea29e70000000000000000000000007d624c34e475a2eca893d0c118527b6e2061256a

-----Decoded View---------------
Arg [0] : _stakingTokenAddress (address): 0x9416bA76e88D873050A06e5956A3EBF10386b863
Arg [1] : _virtueStakingAddress (address): 0x0dD5A35fe4cd65FE7928c7b923902b43d6ea29E7
Arg [2] : _rewardsCollectorAddress (address): 0x7D624c34E475a2eCa893d0C118527b6e2061256A

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000009416ba76e88d873050a06e5956a3ebf10386b863
Arg [1] : 0000000000000000000000000dd5a35fe4cd65fe7928c7b923902b43d6ea29e7
Arg [2] : 0000000000000000000000007d624c34e475a2eca893d0c118527b6e2061256a


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.