ETH Price: $2,346.01 (-24.69%)
 

Overview

ETH Balance

0.003139566004782134 ETH

Eth Value

$7.37 (@ $2,346.01/ETH)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw217623522025-02-03 0:17:471 hr ago1738541867IN
0xa8893C8e...C847268ad
0 ETH0.0018159410.62722515
Withdraw217583992025-02-02 11:02:1115 hrs ago1738494131IN
0xa8893C8e...C847268ad
0 ETH0.00031221.82740597
Stake217537052025-02-01 19:17:2330 hrs ago1738437443IN
0xa8893C8e...C847268ad
0 ETH0.000806053.59672802
Withdraw217521862025-02-01 14:11:5935 hrs ago1738419119IN
0xa8893C8e...C847268ad
0 ETH0.000944625.53406465
Stake217521752025-02-01 14:09:4736 hrs ago1738418987IN
0xa8893C8e...C847268ad
0 ETH0.000960925.35136557
Stake217521452025-02-01 14:03:4736 hrs ago1738418627IN
0xa8893C8e...C847268ad
0 ETH0.000668913.72516847
Stake217521212025-02-01 13:58:5936 hrs ago1738418339IN
0xa8893C8e...C847268ad
0 ETH0.000531544.11801963
Stake217520162025-02-01 13:37:4736 hrs ago1738417067IN
0xa8893C8e...C847268ad
0 ETH0.000395272.20168071
Stake217520042025-02-01 13:35:2336 hrs ago1738416923IN
0xa8893C8e...C847268ad
0 ETH0.00043692.43352792
Compound217494052025-02-01 4:52:4745 hrs ago1738385567IN
0xa8893C8e...C847268ad
0 ETH0.00030022.06264648
Compound217493982025-02-01 4:51:2345 hrs ago1738385483IN
0xa8893C8e...C847268ad
0 ETH0.000304222.08893949
Withdraw217493902025-02-01 4:49:4745 hrs ago1738385387IN
0xa8893C8e...C847268ad
0 ETH0.000613473.59080357
Withdraw217486562025-02-01 2:22:2347 hrs ago1738376543IN
0xa8893C8e...C847268ad
0 ETH0.000312041.82680427
Claim217474802025-01-31 22:25:472 days ago1738362347IN
0xa8893C8e...C847268ad
0 ETH0.000511183.41340726
Claim217473392025-01-31 21:57:352 days ago1738360655IN
0xa8893C8e...C847268ad
0 ETH0.000608284.06441483
Withdraw217463922025-01-31 18:47:232 days ago1738349243IN
0xa8893C8e...C847268ad
0 ETH0.000277489.62217175
Claim217463912025-01-31 18:47:112 days ago1738349231IN
0xa8893C8e...C847268ad
0 ETH0.001371719.17131592
Stake217448562025-01-31 13:38:112 days ago1738330691IN
0xa8893C8e...C847268ad
0 ETH0.001114566.20255817
Withdraw217448102025-01-31 13:28:592 days ago1738330139IN
0xa8893C8e...C847268ad
0 ETH0.000878465.14165728
Stake217448052025-01-31 13:27:592 days ago1738330079IN
0xa8893C8e...C847268ad
0 ETH0.000538994.17610716
Withdraw217444102025-01-31 12:08:352 days ago1738325315IN
0xa8893C8e...C847268ad
0 ETH0.000758844.44336152
Withdraw217444022025-01-31 12:06:592 days ago1738325219IN
0xa8893C8e...C847268ad
0 ETH0.000701244.10613557
Withdraw217443952025-01-31 12:05:352 days ago1738325135IN
0xa8893C8e...C847268ad
0 ETH0.000742554.34965325
Withdraw217443952025-01-31 12:05:352 days ago1738325135IN
0xa8893C8e...C847268ad
0 ETH0.00019033.74985325
Withdraw217443642025-01-31 11:59:232 days ago1738324763IN
0xa8893C8e...C847268ad
0 ETH0.000573913.36054881
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
217296882025-01-29 10:48:234 days ago1738147703
0xa8893C8e...C847268ad
0.00313956 ETH
217296882025-01-29 10:48:234 days ago1738147703
0xa8893C8e...C847268ad
0.06995117 ETH
217245582025-01-28 17:37:115 days ago1738085831
0xa8893C8e...C847268ad
0.00288286 ETH
217245582025-01-28 17:37:115 days ago1738085831
0xa8893C8e...C847268ad
0.03665346 ETH
217105312025-01-26 18:38:357 days ago1737916715
0xa8893C8e...C847268ad
0.00276933 ETH
217105312025-01-26 18:38:357 days ago1737916715
0xa8893C8e...C847268ad
0.03159675 ETH
216925412025-01-24 6:22:479 days ago1737699767
0xa8893C8e...C847268ad
0.00268713 ETH
216925412025-01-24 6:22:479 days ago1737699767
0xa8893C8e...C847268ad
0.00319953 ETH
216894952025-01-23 20:10:3510 days ago1737663035
0xa8893C8e...C847268ad
0.00268598 ETH
216894952025-01-23 20:10:3510 days ago1737663035
0xa8893C8e...C847268ad
0.00911651 ETH
216585852025-01-19 12:39:1114 days ago1737290351
0xa8893C8e...C847268ad
0.00267168 ETH
216585852025-01-19 12:39:1114 days ago1737290351
0xa8893C8e...C847268ad
0.09779708 ETH
216484942025-01-18 2:50:1115 days ago1737168611
0xa8893C8e...C847268ad
0.00227791 ETH
216484942025-01-18 2:50:1115 days ago1737168611
0xa8893C8e...C847268ad
0.35397549 ETH
216459902025-01-17 18:25:4716 days ago1737138347
0xa8893C8e...C847268ad
0.00023761 ETH
216459902025-01-17 18:25:4716 days ago1737138347
0xa8893C8e...C847268ad
0.09259748 ETH
216452422025-01-17 15:55:4716 days ago1737129347
0xa8893C8e...C847268ad
0.00004813 ETH
216452422025-01-17 15:55:4716 days ago1737129347
0xa8893C8e...C847268ad
0.02086348 ETH
216444992025-01-17 13:25:3516 days ago1737120335
0xa8893C8e...C847268ad
0.00000122 ETH
216444992025-01-17 13:25:3516 days ago1737120335
0xa8893C8e...C847268ad
0.00080761 ETH
216434452025-01-17 9:54:1116 days ago1737107651
0xa8893C8e...C847268ad
0.00000031 ETH
216434452025-01-17 9:54:1116 days ago1737107651
0xa8893C8e...C847268ad
0.00449715 ETH
216433582025-01-17 9:36:2316 days ago1737106583
0xa8893C8e...C847268ad
0.00017048 ETH
216433462025-01-17 9:33:4716 days ago1737106427
0xa8893C8e...C847268ad
0.00219817 ETH
216431512025-01-17 8:54:4716 days ago1737104087
0xa8893C8e...C847268ad
0.00721173 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SingleSidedSoup

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
File 1 of 12 : SingleSidedSoup.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import './Game.sol';
import './interfaces/ISoup.sol';
import './interfaces/ILiquidityPot.sol';
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';

// Join us: https://soup.game

/**
 * @title SingleSidedSoup
 * @dev Allows users to stake Soup tokens in a single-sided manner and earn rewards over a set duration. 
 * Rewards are updated based on protocol-defined parameters from the Game contract, with functionality 
 * to deposit, withdraw, claim, and compound Soup holdings.
 *
 * Key Features:
 * - Single-token staking using only Soup.
 * - Proportional reward distribution, updated periodically or upon user actions.
 * - Configurable lock durations, reward rates, and retrieval intervals.
 * - Security checks and non-reentrant operations to safeguard user funds.
 */

contract SingleSidedSoup is Ownable, ReentrancyGuard {
  IUniswapV2Router02 public router;
  address public wethAddress;

  uint256 public constant PRECISION = 10**10;

  uint256 public rewardDuration = 7 days;
  uint256 public totalUnderlyingStaked;
  uint256 public nextRewardRetrieval;
  uint256 public rewardsPerSecond;
  uint256 public claimableBalance;
  uint256 public rewardsPerStake;
  uint256 public rewardEndTime;
  uint256 public totalStaked;
  uint256 public updatedAt;

  Game public game;
  ISoup public soup;
  ILiquidityPot public liquidityPot;

  mapping(address => uint256) unlockAt;

  struct Stake {
    uint256 excluded;
    uint256 underlyingAmount;
  }

  struct UserInfo {
    uint256 stakingTokenBalance;
    uint256 userAllocatedAmount;
    uint256 nextRewardRetrieval;
    uint256 userStakedAmount;
    uint256 rewardsPerSecond;
    uint256 rewardsPerStake;
    uint256 rewardEndTime;
    uint256 lockDuration;
    uint256 totalStaked;
    uint256 unlockAt;
  }

  mapping(address => Stake) public stakes;

  event Staked(address indexed user, uint256 amount, uint256 underlyingAmount);
  event Withdrawn(address indexed user, uint256 amount);
  event RewardClaimed(address indexed user, uint256 reward);
  event AddedToLiquidityPot(address indexed user, uint256 lpAmount, uint256 soupAmount, uint256 ethAmount);
  event EpochDurationUpdated(uint256 duration);
  event RewardDurationUpdated(uint256 duration);
  event RewardsUpdated(uint256 rewardsPerSecond);

  /**
  * @dev Constructor for LPFarm contract initializing staking and reward tokens, and osakCollector fees interface.
  * @param _soup Address of the reward token contract
  * @param _game Address of the game variables contract
  */
  constructor(ISoup _soup, Game _game, ILiquidityPot _liquidityPot) {
    game = _game;
    soup = _soup;
    liquidityPot = _liquidityPot;
    wethAddress = liquidityPot.wethAddress();
    router = IUniswapV2Router02(liquidityPot.router());
  }

    /**
    * @dev Returns user info, including staking balance and rewards info.
    * @param user The address of the user to retrieve info for
    * @return UserInfo struct containing detailed user information
    */
  function getInfo(address user) public view returns (UserInfo memory) {
    uint256 userAllocatedAmount;
    uint256 stakingTokenBalance;
    uint256 userStakedAmount;
    uint256 unlocksAt;

    if (user != address(0)) {
      unlocksAt = unlockAt[user];
      stakingTokenBalance = soup.balanceOf(user);
      userAllocatedAmount = allocatedAmount(user);
      userStakedAmount = soup.soupToFragment(stakes[user].underlyingAmount);
    }

    return UserInfo({
      totalStaked: soup.soupToFragment(totalStaked),
      lockDuration: game.get('sssLockDuration'),
      userAllocatedAmount: userAllocatedAmount,
      stakingTokenBalance: stakingTokenBalance,
      nextRewardRetrieval: nextRewardRetrieval,
      userStakedAmount: userStakedAmount,
      rewardsPerSecond: rewardsPerSecond,
      rewardsPerStake: rewardsPerStake,
      rewardEndTime: rewardEndTime,
      unlockAt: unlocksAt
    });
  }

  /**
  * @dev Sets the reward duration.
  * @param _rewardDuration The new reward duration in seconds
  */
  function setRewardDuration(uint256 _rewardDuration) external onlyOwner {
    require(_rewardDuration <= 2 weeks, "Reward duration must be less than 2 weeks");
    require(_rewardDuration > 1 days, "Reward duration must not be 1 day");

    rewardDuration = _rewardDuration;
    emit RewardDurationUpdated(_rewardDuration);
  }

  /**
  * @dev Stakes a specified amount of tokens.
  * @param amount The amount of tokens to stake
  */
  function stake(uint256 amount) external {
    stakeFor(msg.sender, amount);
  }

  /**
   * @dev Stakes a specified amount of tokens on behalf of another address.
   * @param user The address on whose behalf to stake
   * @param _amount The amount of tokens to stake
   */
  function stakeFor(address user, uint256 _amount) public nonReentrant {
    require(game.get('publicDepositsEnabled') > 0, "deposits disabled");
    require(_amount > 0, "Cannot stake 0");

    unlockAt[user] = block.timestamp + game.get('sssLockDuration');

    uint256 underlyingAmount = soup.fragmentToSoup(_amount);
    totalUnderlyingStaked += underlyingAmount;

    // Always taking from the msg.sender.
    // stakeFor is intended for a zap function, in which the stakingTokens
    // would come from the zap contract.
    soup.transferFrom(msg.sender, address(this), _amount);

    bool isFirstStake = totalStaked == 0;
    _claim(user);

    totalStaked += underlyingAmount;
    stakes[user].underlyingAmount += underlyingAmount;

    if (isFirstStake) _retrieveAndReward();
    emit Staked(user, _amount, underlyingAmount);
  }

  /**
  * @dev Withdraws staked tokens.
  * @param _amount The amount of tokens to withdraw
  */
  function withdraw(uint256 _amount) external nonReentrant {
    require(unlockAt[msg.sender] < block.timestamp, 'tokens not yet unlocked');
    unlockAt[msg.sender] = block.timestamp + game.get('sssLockDuration');

    uint256 underlyingAmount = soup.fragmentToSoup(_amount);
    require(underlyingAmount <= stakes[msg.sender].underlyingAmount, "Withdraw amount exceeds balance");

    _claim(msg.sender);
    totalStaked -= underlyingAmount;
    totalUnderlyingStaked -= underlyingAmount;
    stakes[msg.sender].underlyingAmount -= underlyingAmount;
    soup.transferUnderlying(msg.sender, underlyingAmount);

    emit Withdrawn(msg.sender, _amount);
  }

  /**
  * @dev Claims the accumulated rewards for the caller.
  */
  function claim() external nonReentrant {
    _claim(msg.sender);
  }

  /**
  * @dev Internal function to handle the claiming process for rewards.
  * @param user The user who is claiming their rewards
  */
  function _claim(address user) internal {
    uint256 reward = allocatedUnderlyingAmount(user) / PRECISION;
    unlockAt[user] = block.timestamp + game.get('sssLockDuration');

    if (block.timestamp >= nextRewardRetrieval && totalStaked > 0)
      _retrieveAndReward();
    else updateRewards();

    claimableBalance -= reward;

    stakes[user].excluded = rewardsPerStake;
    if (reward > 0) {
      soup.transferUnderlying(user, reward);
      emit RewardClaimed(user, soup.soupToFragment(reward));
    }

    soup.debase();
  }

  /**
  * @dev External function to trigger the reward retrieval and distribution.
  */
  function retrieveAndReward() external nonReentrant {
    require(totalStaked > 0, "Can not update rewards until users have staked");
    if (rewardsPerSecond != 0)
      require(block.timestamp >= nextRewardRetrieval, "Cannot update rewards yet");

    _retrieveAndReward();
  }

  /**
   * @dev Internal function to update the rewards for the entire pool.
   */
  function updateRewards() internal {
    if (totalStaked == 0) return;
    uint256 currentAllocation = currentAllocationPeriod() * rewardsPerSecond;
    rewardsPerStake += currentAllocation / totalStaked;
    claimableBalance += currentAllocation / PRECISION;
    updatedAt = block.timestamp;
    emit RewardsUpdated(rewardsPerSecond);
  }

  /**
   * @dev Internal function to retrieve external fees and update the reward rate.
   */
  function _retrieveAndReward() internal {
    nextRewardRetrieval = block.timestamp + rewardDuration;

    try soup.requestRewards(game.get('sssRewardBips')) { } catch { }
    uint256 balance = soup.balanceOfUnderlying(address(this));

    updateRewards();

    int256 remainder = int256(balance) - int256(totalUnderlyingStaked) - int256(claimableBalance);
    if (remainder <= 0) rewardsPerSecond = 0;
    else rewardsPerSecond = PRECISION * uint256(remainder) / rewardDuration;

    rewardEndTime = rewardDuration + block.timestamp;
  }

  function allocatedAmount(address user) public view returns (uint256) {
    return soup.soupToFragment(allocatedUnderlyingAmount(user) / PRECISION);
  }

  /**
   * @dev Calculates the allocated underlyingAmount of rewards for a user.
   * @param user The user for whom to calculate the allocated rewards
   * @return The underlyingAmount of allocated rewards for the user
   */
  function allocatedUnderlyingAmount(address user) public view returns (uint256) {
    if (totalStaked == 0) return 0;
    uint256 currentAllocation = currentAllocationPeriod() * rewardsPerSecond * stakes[user].underlyingAmount / totalStaked;
    uint256 previousAllocation = stakes[user].underlyingAmount * (rewardsPerStake - stakes[user].excluded);

    return (previousAllocation + currentAllocation);
  }

  /**
  * @dev Calculates the current allocation period based on the last update time and current time.
  * @return The number of seconds in the current allocation period
  */
  function currentAllocationPeriod() public view returns (uint256) {
    if (rewardEndTime <= updatedAt) return 0;

    return Math.min(rewardEndTime, block.timestamp) - updatedAt;
  }

  /**
   * @notice Compounds user's rewards back into their staked tokens
   */
  function compound() external payable {
    unlockAt[msg.sender] = block.timestamp + game.get('sssLockDuration');

    uint256 underlyingReward = allocatedUnderlyingAmount(msg.sender) / PRECISION;
		require(underlyingReward > 0, 'nothing to compound');

    if (block.timestamp >= nextRewardRetrieval)
      _retrieveAndReward();
    else updateRewards();

    claimableBalance -= underlyingReward;
    totalUnderlyingStaked += underlyingReward;
    stakes[msg.sender].excluded = rewardsPerStake;

    totalStaked += underlyingReward;
    stakes[msg.sender].underlyingAmount += underlyingReward;

    emit Staked(msg.sender, soup.soupToFragment(underlyingReward), underlyingReward);

    soup.debase();
  }

  /**
   * @notice Compounds user's rewards into LP and stakes
   */
  function compoundRewardToLiquidityPot() external payable {
    uint256 underlyingReward = allocatedUnderlyingAmount(msg.sender) / PRECISION;
		require(underlyingReward > 0, 'nothing to compound');

    if (block.timestamp >= nextRewardRetrieval)
      _retrieveAndReward();
    else updateRewards();

    claimableBalance -= underlyingReward;
    stakes[msg.sender].excluded = rewardsPerStake;

    address[] memory path = new address[](2);
    path[0] = wethAddress; path[1] = address(soup);
    uint256[] memory amounts = router.getAmountsOut(msg.value, path);
		uint256 reward = soup.soupToFragment(underlyingReward);

    require(amounts[1] > (reward * liquiditySlippage())/100,
      'Supplied ETH should be worth the reward amount after slippage is applied');

    _addLiquidity(reward, address(this));


    IERC20 lpToken = liquidityPot.stakingToken();
    uint256 lpBalance = lpToken.balanceOf(address(this));
    lpToken.approve(address(liquidityPot), lpBalance);
    liquidityPot.stakeFor(msg.sender, lpBalance);

    emit AddedToLiquidityPot(msg.sender, lpBalance, reward, msg.value);

    soup.debase();
  }

  /**
   * @notice Get the permitted liquidity slippage
   * @return The permitted liquidity slippage
   */
  function liquiditySlippage() public view returns (uint256) {
    return game.get('liquiditySlippage');
  }

  /**
   * @notice Internal function to add liquidity to the Uniswap pool
   * @param soupAmount The amount of soup tokens to add
   * @param recipient The recipient address for LP tokens
   */
  function _addLiquidity(uint256 soupAmount, address recipient) internal {
    // Approve the router to spend the specified amount of soup tokens
    soup.approve(address(router), soupAmount);

    // Add liquidity to the Uniswap pool
    // Approve the router to spend the specified amount of soup tokens
    router.addLiquidityETH{ value: address(this).balance }(
      address(soup),               // Token address
      soupAmount,                 // Amount of tokens to add
      0,                         // Minimum amount of tokens to add (slippage protection)
      0,                        // Minimum amount of ETH to add (slippage protection)
      recipient,               // Recipient address for LP tokens
      block.timestamp + 1800  // Deadline: 30 minutes from the current block time
    );
  }

  /**
   * @dev Allows a user to withdraw some or all of their staked Soup without claiming
   * any pending rewards. Respects the lock time, so cannot be called if the user
   * is still locked. By skipping `_claim`, the user forfeits any unclaimed rewards.
   *
   * @param amount The amount of Soup (in fragments) to withdraw.
   */
  function emergencyWithdraw(uint256 amount) external nonReentrant {
    // Ensure the user's stake is currently unlocked.
    require(unlockAt[msg.sender] <= block.timestamp, "tokens not yet unlocked");

    // Convert the fragment-based amount to underlying Soup units.
    uint256 underlyingAmount = soup.fragmentToSoup(amount);

    // Make sure the user has enough staked Soup to withdraw.
    require(underlyingAmount <= stakes[msg.sender].underlyingAmount, "Withdraw exceeds staked balance");

    // Forfeit any pending rewards by resetting 'excluded' to the current 'rewardsPerStake',
    // effectively zeroing out the user's unclaimed reward portion.
    stakes[msg.sender].excluded = rewardsPerStake;

    totalStaked -= underlyingAmount;
    totalUnderlyingStaked -= underlyingAmount;
    stakes[msg.sender].underlyingAmount -= underlyingAmount;

    // Transfer the underlying Soup tokens to the user.
    soup.transferUnderlying(msg.sender, underlyingAmount);

    // Emit a withdraw event (or a dedicated "EmergencyWithdraw" event, if you prefer).
    emit Withdrawn(msg.sender, amount);
  }

  receive() external payable {}
  fallback() external payable {}

}

File 2 of 12 : ISoup.sol
pragma solidity ^0.8.22;

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

interface ISoup is IERC20 {
  function debase() external;
  function burn(uint256 amount) external;
  function freeze(uint256 amount) external;
  function mint(address to, uint256 amount) external;
  function deflationRate() external returns (int128);
  function requestRewards(uint256 rewardBips) external;
  function totalLiquidSupply() external view returns (uint256);
  function accountForDefrostedDeflation(uint256 leftover) external;
  function unfreeze(address to, uint256 amount) external returns (bool);
  function soupToFragment(uint256 soup) external view returns (uint256);
  function fragmentToSoup(uint256 value) external view returns (uint256);
  function balanceOfUnderlying(address who) external view returns (uint256);
  function transferUnderlying(address to, uint256 value) external returns (bool);
}

File 3 of 12 : ILiquidityPot.sol
pragma solidity ^0.8.22;

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

interface ILiquidityPot {
  function router() external returns (address);
  function wethAddress() external returns (address);
  function stakingToken() external returns (IERC20);
  function stakeFor(address user, uint256 amount) external;
}

File 4 of 12 : Game.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;

import '@openzeppelin/contracts/access/Ownable.sol';
import "abdk-libraries-solidity/ABDKMath64x64.sol";

/**
 * @title Game
 * @dev Serves as a central configuration contract for the Soup ecosystem, storing adjustable variables 
 * that can be updated or permanently renounced. These variables control parameters such as batch sizes,
 * reward rates, freezer settings, rental prices, and time durations. Ownership is restricted, ensuring 
 * only the contract owner can make changes or renounce them.
 *
 * Key Features:
 * - Variable storage: Keeps track of integer values under string identifiers, adjustable by the owner.
 * - Renounce mechanism: Once renounced, a variable can no longer be changed.
 * - Freezer and rental setups: Defines separate configurations (e.g., capacity, basePrice, expoRate) 
 *   and multiple rental price tiers.
 * - Event logging: Emits events on every update or renouncement for transparent off-chain monitoring.
 */

contract Game is Ownable {
  using ABDKMath64x64 for int128;

	// Struct to hold the value and renounce status of a variable
	struct Variable {
		uint256 value;
		bool isRenounced;
	}

	struct FreezerConfig {
		int128 expoRate;
    uint256 capacity;
    uint256 basePrice;
    uint256 _nextMintCost;
	}

	// Mapping to store the variables with string identifiers
	mapping(string => Variable) public variables;

	FreezerConfig[] public freezers;

	uint256[] public rentalPrices;

	// Event to log changes to variables
	event VariableChanged(string indexed name, uint256 newValue);

	// Event to log renouncement of variables
	event VariableRenounced(string indexed name);

  event FreezerChanged(uint256 index, uint256 capacity, uint256 basePrice, uint256 expoRateBips);
  event RentalPriceChanged(uint256 index, uint256 soupPerSecond);

  constructor() {
		//batch sizes divided by 100_000
    set('minBatchSize', 50); // 50 => 0.05% of the circulating liquid supply
    set('maxBatchSize', 250); // 250 => 0.25% of the circulating supply

    set('lpRewardBips', 2700); // 27% of remaining rewards
    set('sssRewardBips', 300); // 3% of remaining rewards

    set('lpLockDuration', 24 hours);
    set('sssLockDuration', 24 hours);

    set('freezerCapacity', 320);
    set('publicDepositsEnabled', 0);
    set('batchDefrostTime', 3 days);
    set('freezerGracePeriod', 7 days);
    set('rewardRetrievalDuration', 7 days);

    set('liquiditySlippage', 95);

    // rental price % in bips
    setRentalPrice(0, 30);
    setRentalPrice(1, 50);
    setRentalPrice(2, 100);

    setFreezer(0, 10, 1 ether, 50);
    setFreezer(1, 25, 2 ether, 75);
    setFreezer(2, 50, 3 ether, 100);
	}

	// Modifier to check if a variable is renounced
	modifier notRenounced(string memory name) {
		require(!variables[name].isRenounced, "Variable has been renounced");
		_;
	}

  function freezerCount() public view returns (uint256) {
    return freezers.length;
  }

  function rentalPriceCount() public view returns (uint256) {
    return rentalPrices.length;
  }

  function getRentalPrice(uint256 index) public view returns (uint256){
    require(index < rentalPrices.length, "Invalid rental price index");
    return rentalPrices[index];
  }

	// Function to create or change a rental price option
	function setRentalPrice(uint256 index, uint256 soupPerSecond) public notRenounced('rentalPrices') onlyOwner {
    require(index <= rentalPrices.length, "Invalid index");
    if (rentalPrices.length == index) rentalPrices.push();

    rentalPrices[index] = soupPerSecond;
		emit RentalPriceChanged(index, soupPerSecond);
	}

  // Function to get a freezer configuration
  function getFreezer(uint256 freezerIndex) public view returns (FreezerConfig memory) {
    require(freezerIndex < freezers.length, "Invalid freezer size");
    return freezers[freezerIndex];
  }

	// Function to create or change a freezer configuration
	function setFreezer(uint256 index, uint256 capacity, uint256 basePrice, uint256 expoRateBips) public notRenounced('freezers') onlyOwner {
    require(index <= freezers.length, "Invalid index");
    if (freezers.length == index) freezers.push();

    freezers[index].capacity = capacity;
    freezers[index].basePrice = basePrice;

    int128 one = ABDKMath64x64.fromUInt(1);
    freezers[index].expoRate = one.add(ABDKMath64x64.divu(expoRateBips, 10000));

		emit FreezerChanged(index, capacity, basePrice, expoRateBips);
	}

	// Function to set the value of a variable
	function set(string memory name, uint256 newValue) public notRenounced(name) onlyOwner {
		variables[name].value = newValue;
		emit VariableChanged(name, newValue);
	}

	// Function to renounce a variable
	function renounce(string memory name) external notRenounced(name) onlyOwner {
		variables[name].isRenounced = true;
		emit VariableRenounced(name);
	}

	// Function to get the value of a variable
	function get(string memory name) external view returns (uint256) {
		return variables[name].value;
	}

	// Function to check if a variable is renounced
	function isRenounced(string memory name) external view returns (bool) {
		return variables[name].isRenounced;
	}
}

File 5 of 12 : ABDKMath64x64.sol
// SPDX-License-Identifier: BSD-4-Clause
/*
 * ABDK Math 64.64 Smart Contract Library.  Copyright © 2019 by ABDK Consulting.
 * Author: Mikhail Vladimirov <[email protected]>
 */
pragma solidity ^0.8.0;

/**
 * Smart contract library of mathematical functions operating with signed
 * 64.64-bit fixed point numbers.  Signed 64.64-bit fixed point number is
 * basically a simple fraction whose numerator is signed 128-bit integer and
 * denominator is 2^64.  As long as denominator is always the same, there is no
 * need to store it, thus in Solidity signed 64.64-bit fixed point numbers are
 * represented by int128 type holding only the numerator.
 */
library ABDKMath64x64 {
  /*
   * Minimum value signed 64.64-bit fixed point number may have. 
   */
  int128 private constant MIN_64x64 = -0x80000000000000000000000000000000;

  /*
   * Maximum value signed 64.64-bit fixed point number may have. 
   */
  int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;

  /**
   * Convert signed 256-bit integer number into signed 64.64-bit fixed point
   * number.  Revert on overflow.
   *
   * @param x signed 256-bit integer number
   * @return signed 64.64-bit fixed point number
   */
  function fromInt (int256 x) internal pure returns (int128) {
    unchecked {
      require (x >= -0x8000000000000000 && x <= 0x7FFFFFFFFFFFFFFF);
      return int128 (x << 64);
    }
  }

  /**
   * Convert signed 64.64 fixed point number into signed 64-bit integer number
   * rounding down.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64-bit integer number
   */
  function toInt (int128 x) internal pure returns (int64) {
    unchecked {
      return int64 (x >> 64);
    }
  }

  /**
   * Convert unsigned 256-bit integer number into signed 64.64-bit fixed point
   * number.  Revert on overflow.
   *
   * @param x unsigned 256-bit integer number
   * @return signed 64.64-bit fixed point number
   */
  function fromUInt (uint256 x) internal pure returns (int128) {
    unchecked {
      require (x <= 0x7FFFFFFFFFFFFFFF);
      return int128 (int256 (x << 64));
    }
  }

  /**
   * Convert signed 64.64 fixed point number into unsigned 64-bit integer
   * number rounding down.  Revert on underflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @return unsigned 64-bit integer number
   */
  function toUInt (int128 x) internal pure returns (uint64) {
    unchecked {
      require (x >= 0);
      return uint64 (uint128 (x >> 64));
    }
  }

  /**
   * Convert signed 128.128 fixed point number into signed 64.64-bit fixed point
   * number rounding down.  Revert on overflow.
   *
   * @param x signed 128.128-bin fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function from128x128 (int256 x) internal pure returns (int128) {
    unchecked {
      int256 result = x >> 64;
      require (result >= MIN_64x64 && result <= MAX_64x64);
      return int128 (result);
    }
  }

  /**
   * Convert signed 64.64 fixed point number into signed 128.128 fixed point
   * number.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 128.128 fixed point number
   */
  function to128x128 (int128 x) internal pure returns (int256) {
    unchecked {
      return int256 (x) << 64;
    }
  }

  /**
   * Calculate x + y.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @param y signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function add (int128 x, int128 y) internal pure returns (int128) {
    unchecked {
      int256 result = int256(x) + y;
      require (result >= MIN_64x64 && result <= MAX_64x64);
      return int128 (result);
    }
  }

  /**
   * Calculate x - y.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @param y signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function sub (int128 x, int128 y) internal pure returns (int128) {
    unchecked {
      int256 result = int256(x) - y;
      require (result >= MIN_64x64 && result <= MAX_64x64);
      return int128 (result);
    }
  }

  /**
   * Calculate x * y rounding down.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @param y signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function mul (int128 x, int128 y) internal pure returns (int128) {
    unchecked {
      int256 result = int256(x) * y >> 64;
      require (result >= MIN_64x64 && result <= MAX_64x64);
      return int128 (result);
    }
  }

  /**
   * Calculate x * y rounding towards zero, where x is signed 64.64 fixed point
   * number and y is signed 256-bit integer number.  Revert on overflow.
   *
   * @param x signed 64.64 fixed point number
   * @param y signed 256-bit integer number
   * @return signed 256-bit integer number
   */
  function muli (int128 x, int256 y) internal pure returns (int256) {
    unchecked {
      if (x == MIN_64x64) {
        require (y >= -0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF &&
          y <= 0x1000000000000000000000000000000000000000000000000);
        return -y << 63;
      } else {
        bool negativeResult = false;
        if (x < 0) {
          x = -x;
          negativeResult = true;
        }
        if (y < 0) {
          y = -y; // We rely on overflow behavior here
          negativeResult = !negativeResult;
        }
        uint256 absoluteResult = mulu (x, uint256 (y));
        if (negativeResult) {
          require (absoluteResult <=
            0x8000000000000000000000000000000000000000000000000000000000000000);
          return -int256 (absoluteResult); // We rely on overflow behavior here
        } else {
          require (absoluteResult <=
            0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
          return int256 (absoluteResult);
        }
      }
    }
  }

  /**
   * Calculate x * y rounding down, where x is signed 64.64 fixed point number
   * and y is unsigned 256-bit integer number.  Revert on overflow.
   *
   * @param x signed 64.64 fixed point number
   * @param y unsigned 256-bit integer number
   * @return unsigned 256-bit integer number
   */
  function mulu (int128 x, uint256 y) internal pure returns (uint256) {
    unchecked {
      if (y == 0) return 0;

      require (x >= 0);

      uint256 lo = (uint256 (int256 (x)) * (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) >> 64;
      uint256 hi = uint256 (int256 (x)) * (y >> 128);

      require (hi <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
      hi <<= 64;

      require (hi <=
        0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - lo);
      return hi + lo;
    }
  }

  /**
   * Calculate x / y rounding towards zero.  Revert on overflow or when y is
   * zero.
   *
   * @param x signed 64.64-bit fixed point number
   * @param y signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function div (int128 x, int128 y) internal pure returns (int128) {
    unchecked {
      require (y != 0);
      int256 result = (int256 (x) << 64) / y;
      require (result >= MIN_64x64 && result <= MAX_64x64);
      return int128 (result);
    }
  }

  /**
   * Calculate x / y rounding towards zero, where x and y are signed 256-bit
   * integer numbers.  Revert on overflow or when y is zero.
   *
   * @param x signed 256-bit integer number
   * @param y signed 256-bit integer number
   * @return signed 64.64-bit fixed point number
   */
  function divi (int256 x, int256 y) internal pure returns (int128) {
    unchecked {
      require (y != 0);

      bool negativeResult = false;
      if (x < 0) {
        x = -x; // We rely on overflow behavior here
        negativeResult = true;
      }
      if (y < 0) {
        y = -y; // We rely on overflow behavior here
        negativeResult = !negativeResult;
      }
      uint128 absoluteResult = divuu (uint256 (x), uint256 (y));
      if (negativeResult) {
        require (absoluteResult <= 0x80000000000000000000000000000000);
        return -int128 (absoluteResult); // We rely on overflow behavior here
      } else {
        require (absoluteResult <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
        return int128 (absoluteResult); // We rely on overflow behavior here
      }
    }
  }

  /**
   * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit
   * integer numbers.  Revert on overflow or when y is zero.
   *
   * @param x unsigned 256-bit integer number
   * @param y unsigned 256-bit integer number
   * @return signed 64.64-bit fixed point number
   */
  function divu (uint256 x, uint256 y) internal pure returns (int128) {
    unchecked {
      require (y != 0);
      uint128 result = divuu (x, y);
      require (result <= uint128 (MAX_64x64));
      return int128 (result);
    }
  }

  /**
   * Calculate -x.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function neg (int128 x) internal pure returns (int128) {
    unchecked {
      require (x != MIN_64x64);
      return -x;
    }
  }

  /**
   * Calculate |x|.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function abs (int128 x) internal pure returns (int128) {
    unchecked {
      require (x != MIN_64x64);
      return x < 0 ? -x : x;
    }
  }

  /**
   * Calculate 1 / x rounding towards zero.  Revert on overflow or when x is
   * zero.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function inv (int128 x) internal pure returns (int128) {
    unchecked {
      require (x != 0);
      int256 result = int256 (0x100000000000000000000000000000000) / x;
      require (result >= MIN_64x64 && result <= MAX_64x64);
      return int128 (result);
    }
  }

  /**
   * Calculate arithmetics average of x and y, i.e. (x + y) / 2 rounding down.
   *
   * @param x signed 64.64-bit fixed point number
   * @param y signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function avg (int128 x, int128 y) internal pure returns (int128) {
    unchecked {
      return int128 ((int256 (x) + int256 (y)) >> 1);
    }
  }

  /**
   * Calculate geometric average of x and y, i.e. sqrt (x * y) rounding down.
   * Revert on overflow or in case x * y is negative.
   *
   * @param x signed 64.64-bit fixed point number
   * @param y signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function gavg (int128 x, int128 y) internal pure returns (int128) {
    unchecked {
      int256 m = int256 (x) * int256 (y);
      require (m >= 0);
      require (m <
          0x4000000000000000000000000000000000000000000000000000000000000000);
      return int128 (sqrtu (uint256 (m)));
    }
  }

  /**
   * Calculate x^y assuming 0^0 is 1, where x is signed 64.64 fixed point number
   * and y is unsigned 256-bit integer number.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @param y uint256 value
   * @return signed 64.64-bit fixed point number
   */
  function pow (int128 x, uint256 y) internal pure returns (int128) {
    unchecked {
      bool negative = x < 0 && y & 1 == 1;

      uint256 absX = uint128 (x < 0 ? -x : x);
      uint256 absResult;
      absResult = 0x100000000000000000000000000000000;

      if (absX <= 0x10000000000000000) {
        absX <<= 63;
        while (y != 0) {
          if (y & 0x1 != 0) {
            absResult = absResult * absX >> 127;
          }
          absX = absX * absX >> 127;

          if (y & 0x2 != 0) {
            absResult = absResult * absX >> 127;
          }
          absX = absX * absX >> 127;

          if (y & 0x4 != 0) {
            absResult = absResult * absX >> 127;
          }
          absX = absX * absX >> 127;

          if (y & 0x8 != 0) {
            absResult = absResult * absX >> 127;
          }
          absX = absX * absX >> 127;

          y >>= 4;
        }

        absResult >>= 64;
      } else {
        uint256 absXShift = 63;
        if (absX < 0x1000000000000000000000000) { absX <<= 32; absXShift -= 32; }
        if (absX < 0x10000000000000000000000000000) { absX <<= 16; absXShift -= 16; }
        if (absX < 0x1000000000000000000000000000000) { absX <<= 8; absXShift -= 8; }
        if (absX < 0x10000000000000000000000000000000) { absX <<= 4; absXShift -= 4; }
        if (absX < 0x40000000000000000000000000000000) { absX <<= 2; absXShift -= 2; }
        if (absX < 0x80000000000000000000000000000000) { absX <<= 1; absXShift -= 1; }

        uint256 resultShift = 0;
        while (y != 0) {
          require (absXShift < 64);

          if (y & 0x1 != 0) {
            absResult = absResult * absX >> 127;
            resultShift += absXShift;
            if (absResult > 0x100000000000000000000000000000000) {
              absResult >>= 1;
              resultShift += 1;
            }
          }
          absX = absX * absX >> 127;
          absXShift <<= 1;
          if (absX >= 0x100000000000000000000000000000000) {
              absX >>= 1;
              absXShift += 1;
          }

          y >>= 1;
        }

        require (resultShift < 64);
        absResult >>= 64 - resultShift;
      }
      int256 result = negative ? -int256 (absResult) : int256 (absResult);
      require (result >= MIN_64x64 && result <= MAX_64x64);
      return int128 (result);
    }
  }

  /**
   * Calculate sqrt (x) rounding down.  Revert if x < 0.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function sqrt (int128 x) internal pure returns (int128) {
    unchecked {
      require (x >= 0);
      return int128 (sqrtu (uint256 (int256 (x)) << 64));
    }
  }

  /**
   * Calculate binary logarithm of x.  Revert if x <= 0.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function log_2 (int128 x) internal pure returns (int128) {
    unchecked {
      require (x > 0);

      int256 msb = 0;
      int256 xc = x;
      if (xc >= 0x10000000000000000) { xc >>= 64; msb += 64; }
      if (xc >= 0x100000000) { xc >>= 32; msb += 32; }
      if (xc >= 0x10000) { xc >>= 16; msb += 16; }
      if (xc >= 0x100) { xc >>= 8; msb += 8; }
      if (xc >= 0x10) { xc >>= 4; msb += 4; }
      if (xc >= 0x4) { xc >>= 2; msb += 2; }
      if (xc >= 0x2) msb += 1;  // No need to shift xc anymore

      int256 result = msb - 64 << 64;
      uint256 ux = uint256 (int256 (x)) << uint256 (127 - msb);
      for (int256 bit = 0x8000000000000000; bit > 0; bit >>= 1) {
        ux *= ux;
        uint256 b = ux >> 255;
        ux >>= 127 + b;
        result += bit * int256 (b);
      }

      return int128 (result);
    }
  }

  /**
   * Calculate natural logarithm of x.  Revert if x <= 0.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function ln (int128 x) internal pure returns (int128) {
    unchecked {
      require (x > 0);

      return int128 (int256 (
          uint256 (int256 (log_2 (x))) * 0xB17217F7D1CF79ABC9E3B39803F2F6AF >> 128));
    }
  }

  /**
   * Calculate binary exponent of x.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function exp_2 (int128 x) internal pure returns (int128) {
    unchecked {
      require (x < 0x400000000000000000); // Overflow

      if (x < -0x400000000000000000) return 0; // Underflow

      uint256 result = 0x80000000000000000000000000000000;

      if (x & 0x8000000000000000 > 0)
        result = result * 0x16A09E667F3BCC908B2FB1366EA957D3E >> 128;
      if (x & 0x4000000000000000 > 0)
        result = result * 0x1306FE0A31B7152DE8D5A46305C85EDEC >> 128;
      if (x & 0x2000000000000000 > 0)
        result = result * 0x1172B83C7D517ADCDF7C8C50EB14A791F >> 128;
      if (x & 0x1000000000000000 > 0)
        result = result * 0x10B5586CF9890F6298B92B71842A98363 >> 128;
      if (x & 0x800000000000000 > 0)
        result = result * 0x1059B0D31585743AE7C548EB68CA417FD >> 128;
      if (x & 0x400000000000000 > 0)
        result = result * 0x102C9A3E778060EE6F7CACA4F7A29BDE8 >> 128;
      if (x & 0x200000000000000 > 0)
        result = result * 0x10163DA9FB33356D84A66AE336DCDFA3F >> 128;
      if (x & 0x100000000000000 > 0)
        result = result * 0x100B1AFA5ABCBED6129AB13EC11DC9543 >> 128;
      if (x & 0x80000000000000 > 0)
        result = result * 0x10058C86DA1C09EA1FF19D294CF2F679B >> 128;
      if (x & 0x40000000000000 > 0)
        result = result * 0x1002C605E2E8CEC506D21BFC89A23A00F >> 128;
      if (x & 0x20000000000000 > 0)
        result = result * 0x100162F3904051FA128BCA9C55C31E5DF >> 128;
      if (x & 0x10000000000000 > 0)
        result = result * 0x1000B175EFFDC76BA38E31671CA939725 >> 128;
      if (x & 0x8000000000000 > 0)
        result = result * 0x100058BA01FB9F96D6CACD4B180917C3D >> 128;
      if (x & 0x4000000000000 > 0)
        result = result * 0x10002C5CC37DA9491D0985C348C68E7B3 >> 128;
      if (x & 0x2000000000000 > 0)
        result = result * 0x1000162E525EE054754457D5995292026 >> 128;
      if (x & 0x1000000000000 > 0)
        result = result * 0x10000B17255775C040618BF4A4ADE83FC >> 128;
      if (x & 0x800000000000 > 0)
        result = result * 0x1000058B91B5BC9AE2EED81E9B7D4CFAB >> 128;
      if (x & 0x400000000000 > 0)
        result = result * 0x100002C5C89D5EC6CA4D7C8ACC017B7C9 >> 128;
      if (x & 0x200000000000 > 0)
        result = result * 0x10000162E43F4F831060E02D839A9D16D >> 128;
      if (x & 0x100000000000 > 0)
        result = result * 0x100000B1721BCFC99D9F890EA06911763 >> 128;
      if (x & 0x80000000000 > 0)
        result = result * 0x10000058B90CF1E6D97F9CA14DBCC1628 >> 128;
      if (x & 0x40000000000 > 0)
        result = result * 0x1000002C5C863B73F016468F6BAC5CA2B >> 128;
      if (x & 0x20000000000 > 0)
        result = result * 0x100000162E430E5A18F6119E3C02282A5 >> 128;
      if (x & 0x10000000000 > 0)
        result = result * 0x1000000B1721835514B86E6D96EFD1BFE >> 128;
      if (x & 0x8000000000 > 0)
        result = result * 0x100000058B90C0B48C6BE5DF846C5B2EF >> 128;
      if (x & 0x4000000000 > 0)
        result = result * 0x10000002C5C8601CC6B9E94213C72737A >> 128;
      if (x & 0x2000000000 > 0)
        result = result * 0x1000000162E42FFF037DF38AA2B219F06 >> 128;
      if (x & 0x1000000000 > 0)
        result = result * 0x10000000B17217FBA9C739AA5819F44F9 >> 128;
      if (x & 0x800000000 > 0)
        result = result * 0x1000000058B90BFCDEE5ACD3C1CEDC823 >> 128;
      if (x & 0x400000000 > 0)
        result = result * 0x100000002C5C85FE31F35A6A30DA1BE50 >> 128;
      if (x & 0x200000000 > 0)
        result = result * 0x10000000162E42FF0999CE3541B9FFFCF >> 128;
      if (x & 0x100000000 > 0)
        result = result * 0x100000000B17217F80F4EF5AADDA45554 >> 128;
      if (x & 0x80000000 > 0)
        result = result * 0x10000000058B90BFBF8479BD5A81B51AD >> 128;
      if (x & 0x40000000 > 0)
        result = result * 0x1000000002C5C85FDF84BD62AE30A74CC >> 128;
      if (x & 0x20000000 > 0)
        result = result * 0x100000000162E42FEFB2FED257559BDAA >> 128;
      if (x & 0x10000000 > 0)
        result = result * 0x1000000000B17217F7D5A7716BBA4A9AE >> 128;
      if (x & 0x8000000 > 0)
        result = result * 0x100000000058B90BFBE9DDBAC5E109CCE >> 128;
      if (x & 0x4000000 > 0)
        result = result * 0x10000000002C5C85FDF4B15DE6F17EB0D >> 128;
      if (x & 0x2000000 > 0)
        result = result * 0x1000000000162E42FEFA494F1478FDE05 >> 128;
      if (x & 0x1000000 > 0)
        result = result * 0x10000000000B17217F7D20CF927C8E94C >> 128;
      if (x & 0x800000 > 0)
        result = result * 0x1000000000058B90BFBE8F71CB4E4B33D >> 128;
      if (x & 0x400000 > 0)
        result = result * 0x100000000002C5C85FDF477B662B26945 >> 128;
      if (x & 0x200000 > 0)
        result = result * 0x10000000000162E42FEFA3AE53369388C >> 128;
      if (x & 0x100000 > 0)
        result = result * 0x100000000000B17217F7D1D351A389D40 >> 128;
      if (x & 0x80000 > 0)
        result = result * 0x10000000000058B90BFBE8E8B2D3D4EDE >> 128;
      if (x & 0x40000 > 0)
        result = result * 0x1000000000002C5C85FDF4741BEA6E77E >> 128;
      if (x & 0x20000 > 0)
        result = result * 0x100000000000162E42FEFA39FE95583C2 >> 128;
      if (x & 0x10000 > 0)
        result = result * 0x1000000000000B17217F7D1CFB72B45E1 >> 128;
      if (x & 0x8000 > 0)
        result = result * 0x100000000000058B90BFBE8E7CC35C3F0 >> 128;
      if (x & 0x4000 > 0)
        result = result * 0x10000000000002C5C85FDF473E242EA38 >> 128;
      if (x & 0x2000 > 0)
        result = result * 0x1000000000000162E42FEFA39F02B772C >> 128;
      if (x & 0x1000 > 0)
        result = result * 0x10000000000000B17217F7D1CF7D83C1A >> 128;
      if (x & 0x800 > 0)
        result = result * 0x1000000000000058B90BFBE8E7BDCBE2E >> 128;
      if (x & 0x400 > 0)
        result = result * 0x100000000000002C5C85FDF473DEA871F >> 128;
      if (x & 0x200 > 0)
        result = result * 0x10000000000000162E42FEFA39EF44D91 >> 128;
      if (x & 0x100 > 0)
        result = result * 0x100000000000000B17217F7D1CF79E949 >> 128;
      if (x & 0x80 > 0)
        result = result * 0x10000000000000058B90BFBE8E7BCE544 >> 128;
      if (x & 0x40 > 0)
        result = result * 0x1000000000000002C5C85FDF473DE6ECA >> 128;
      if (x & 0x20 > 0)
        result = result * 0x100000000000000162E42FEFA39EF366F >> 128;
      if (x & 0x10 > 0)
        result = result * 0x1000000000000000B17217F7D1CF79AFA >> 128;
      if (x & 0x8 > 0)
        result = result * 0x100000000000000058B90BFBE8E7BCD6D >> 128;
      if (x & 0x4 > 0)
        result = result * 0x10000000000000002C5C85FDF473DE6B2 >> 128;
      if (x & 0x2 > 0)
        result = result * 0x1000000000000000162E42FEFA39EF358 >> 128;
      if (x & 0x1 > 0)
        result = result * 0x10000000000000000B17217F7D1CF79AB >> 128;

      result >>= uint256 (int256 (63 - (x >> 64)));
      require (result <= uint256 (int256 (MAX_64x64)));

      return int128 (int256 (result));
    }
  }

  /**
   * Calculate natural exponent of x.  Revert on overflow.
   *
   * @param x signed 64.64-bit fixed point number
   * @return signed 64.64-bit fixed point number
   */
  function exp (int128 x) internal pure returns (int128) {
    unchecked {
      require (x < 0x400000000000000000); // Overflow

      if (x < -0x400000000000000000) return 0; // Underflow

      return exp_2 (
          int128 (int256 (x) * 0x171547652B82FE1777D0FFDA0D23A7D12 >> 128));
    }
  }

  /**
   * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit
   * integer numbers.  Revert on overflow or when y is zero.
   *
   * @param x unsigned 256-bit integer number
   * @param y unsigned 256-bit integer number
   * @return unsigned 64.64-bit fixed point number
   */
  function divuu (uint256 x, uint256 y) private pure returns (uint128) {
    unchecked {
      require (y != 0);

      uint256 result;

      if (x <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
        result = (x << 64) / y;
      else {
        uint256 msb = 192;
        uint256 xc = x >> 192;
        if (xc >= 0x100000000) { xc >>= 32; msb += 32; }
        if (xc >= 0x10000) { xc >>= 16; msb += 16; }
        if (xc >= 0x100) { xc >>= 8; msb += 8; }
        if (xc >= 0x10) { xc >>= 4; msb += 4; }
        if (xc >= 0x4) { xc >>= 2; msb += 2; }
        if (xc >= 0x2) msb += 1;  // No need to shift xc anymore

        result = (x << 255 - msb) / ((y - 1 >> msb - 191) + 1);
        require (result <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);

        uint256 hi = result * (y >> 128);
        uint256 lo = result * (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);

        uint256 xh = x >> 192;
        uint256 xl = x << 64;

        if (xl < lo) xh -= 1;
        xl -= lo; // We rely on overflow behavior here
        lo = hi << 128;
        if (xl < lo) xh -= 1;
        xl -= lo; // We rely on overflow behavior here

        result += xh == hi >> 128 ? xl / y : 1;
      }

      require (result <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
      return uint128 (result);
    }
  }

  /**
   * Calculate sqrt (x) rounding down, where x is unsigned 256-bit integer
   * number.
   *
   * @param x unsigned 256-bit integer number
   * @return unsigned 128-bit integer number
   */
  function sqrtu (uint256 x) private pure returns (uint128) {
    unchecked {
      if (x == 0) return 0;
      else {
        uint256 xx = x;
        uint256 r = 1;
        if (xx >= 0x100000000000000000000000000000000) { xx >>= 128; r <<= 64; }
        if (xx >= 0x10000000000000000) { xx >>= 64; r <<= 32; }
        if (xx >= 0x100000000) { xx >>= 32; r <<= 16; }
        if (xx >= 0x10000) { xx >>= 16; r <<= 8; }
        if (xx >= 0x100) { xx >>= 8; r <<= 4; }
        if (xx >= 0x10) { xx >>= 4; r <<= 2; }
        if (xx >= 0x4) { r <<= 1; }
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1; // Seven iterations should be enough
        uint256 r1 = x / r;
        return uint128 (r < r1 ? r : r1);
      }
    }
  }
}

File 6 of 12 : IUniswapV2Router02.sol
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 7 of 12 : IUniswapV2Router01.sol
pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 8 of 12 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 9 of 12 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 11 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract ISoup","name":"_soup","type":"address"},{"internalType":"contract Game","name":"_game","type":"address"},{"internalType":"contract ILiquidityPot","name":"_liquidityPot","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"lpAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"soupAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"}],"name":"AddedToLiquidityPot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"EpochDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"RewardDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardsPerSecond","type":"uint256"}],"name":"RewardsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"underlyingAmount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"allocatedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"allocatedUnderlyingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimableBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"compound","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"compoundRewardToLiquidityPot","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"currentAllocationPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"game","outputs":[{"internalType":"contract Game","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getInfo","outputs":[{"components":[{"internalType":"uint256","name":"stakingTokenBalance","type":"uint256"},{"internalType":"uint256","name":"userAllocatedAmount","type":"uint256"},{"internalType":"uint256","name":"nextRewardRetrieval","type":"uint256"},{"internalType":"uint256","name":"userStakedAmount","type":"uint256"},{"internalType":"uint256","name":"rewardsPerSecond","type":"uint256"},{"internalType":"uint256","name":"rewardsPerStake","type":"uint256"},{"internalType":"uint256","name":"rewardEndTime","type":"uint256"},{"internalType":"uint256","name":"lockDuration","type":"uint256"},{"internalType":"uint256","name":"totalStaked","type":"uint256"},{"internalType":"uint256","name":"unlockAt","type":"uint256"}],"internalType":"struct SingleSidedSoup.UserInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityPot","outputs":[{"internalType":"contract ILiquidityPot","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquiditySlippage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextRewardRetrieval","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":"retrieveAndReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsPerStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardDuration","type":"uint256"}],"name":"setRewardDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"soup","outputs":[{"internalType":"contract ISoup","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stakeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakes","outputs":[{"internalType":"uint256","name":"excluded","type":"uint256"},{"internalType":"uint256","name":"underlyingAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUnderlyingStaked","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":[],"name":"updatedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wethAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604090808252346101895760608161271a8038038091610021828561018d565b8339810103126101895780516001600160a01b039081811690819003610189576020908184015193838516809503610189578501519383851680950361018957829060045f545f60018060a01b031998338a84161782558a5196879586948b3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08680a36001805562093a8086558b600d541617600d558a600e541617600e55808a600f541617600f55634f0e0ef360e01b83525af180156101625783915f9161016c575b50168360035416176003555f8183600f541660048751809481936303e21fa960e61b83525af1918215610162575f92610135575b5050169060025416176002555161253690816101e48239f35b6101549250803d1061015b575b61014c818361018d565b8101906101c4565b5f8061011c565b503d610142565b85513d5f823e3d90fd5b6101839150833d851161015b5761014c818361018d565b5f6100e8565b5f80fd5b601f909101601f19168101906001600160401b038211908210176101b057604052565b634e487b7160e01b5f52604160045260245ffd5b9081602091031261018957516001600160a01b0381168103610189579056fe608060409080825260049081361015610020575b505050361561001e57005b005b5f905f3560e01c90816316934fc414611c11575080632e1a7d4d14611a2b5780632ee4090814611746578063310bf1c81461172857806333bcfcbe1461165157806337e9f64a14611633578063417d020b146116155780634e71d92d146115ee5780634f0e0ef3146115c65780635312ea8e146113e75780636faa5b5c146113cb578063715018a6146113745780637519ab5014611356578063817b1cd2146113385780638da5cb5b146113115780638ea42976146112ec5780639f62db78146112c4578063a694fc3a14610fe7578063a78793b614610fc2578063a8fcdb01146109ac578063aaf5eb681461098c578063b4852e7a14610963578063c0ed00c914610860578063c3fe3e2814610837578063c4f4542314610818578063d545e0a2146107f4578063e89fc526146107d5578063eacdaabc146107b6578063f2fde38b146106eb578063f520e7e5146106c8578063f69e2046146104ae578063f887ea40146104855763ffdd5cf1036100135734610482576020918260031936011261047e576101ae611c50565b918451926101bb84611cda565b818452818585015281868501528160608501528160808501528160a08501528160c08501528160e085015261010091808386015280610120809601528081968298839660018060a01b03958681168061038f575b505085600e54169583600b5460248551809a819363170ddc3160e11b8352878301525afa968715610385578697610354575b50610264918491600d54168451808095819463349f642f60e11b83528201611d19565b03915afa948515610349579461030e575b50906101409989939260065460075493600954958c600a549885519061029a82611cda565b8152838101928352858101948552606081019687526080810197885260a0810198895260c08101998a5260e081019a8b528c81019b8c52019b8c5283519d8e5251908d015251908b01525160608a01525160808901525160a08801525160c08701525160e086015251908401525190820152f35b92918091945083813d8311610342575b6103288183611cf7565b8101031261033e57915192909190610140610275565b5f80fd5b503d61031e565b8251903d90823e3d90fd5b9096508381813d831161037e575b61036c8183611cf7565b8101031261033e575195610264610241565b503d610362565b83513d88823e3d90fd5b945099509950955081835260108152858320549584600e541681516370a0823160e01b8152848c8201528381602481855afa801561038557869061044f575b6103d991509a611e40565b93855260118352826001838720015460248d8551948593849263170ddc3160e11b84528301525afa908115610445578591610418575b50995f8061020f565b90508281813d831161043e575b61042f8183611cf7565b8101031261033e57515f61040f565b503d610425565b82513d87823e3d90fd5b508381813d8311610477575b6104658183611cf7565b8101031261033e576103d990516103ce565b503d61045b565b5080fd5b80fd5b50823461047e578160031936011261047e5760025490516001600160a01b039091168152602090f35b50809183826003193601126106c457600d54815163349f642f60e11b81526001600160a01b0393916020919082908290871681806104ed818901611d19565b03915afa9081156106ba578691610686575b5061050a9042611d43565b33865260108252838620556402540be40061052433611e9f565b0493610531851515611f26565b600654421061067957610542612265565b61054e85600854611d64565b60085561055d85600554611d43565b600555600954338752601183528487205561057a85600b54611d43565b600b5533865260118252600184872001610595868254611d43565b9055600e54169383519163170ddc3160e11b835281848401528083602481895afa92831561066f57879361063d575b5084519283528201527f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90833392a2823b156106385781516332111c0560e11b81529284918491829084905af190811561062f575061061f5750f35b61062890611cb2565b6104825780f35b513d84823e3d90fd5b505050fd5b809750818094503d8311610668575b6106568183611cf7565b8101031261033e5786955191886105c4565b503d61064c565b85513d89823e3d90fd5b610681612480565b610542565b809650828092503d83116106b3575b61069f8183611cf7565b8101031261033e5761050a869551906104ff565b503d610695565b84513d88823e3d90fd5b5050fd5b509190346106e757826003193601126106e75760209250549051908152f35b8280fd5b509190346106e75760203660031901126106e757610707611c50565b90610710612429565b6001600160a01b039182169283156107645750505f54826bffffffffffffffffffffffff60a01b8216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b50823461047e578160031936011261047e576020906007549051908152f35b50823461047e578160031936011261047e576020906005549051908152f35b50823461047e578160031936011261047e57602090610811611f8c565b9051908152f35b50823461047e578160031936011261047e576020906008549051908152f35b50823461047e578160031936011261047e57600d5490516001600160a01b039091168152602090f35b5091346106e75760203660031901126106e75781359161087e612429565b62127500831161090f57620151808311156108c35791602091817ffeece2f615b2fecca6c26deadea49416a6ba6b52b2cd2613065fd6a787cf1240945551908152a180f35b6020608492519162461bcd60e51b8352820152602160248201527f526577617264206475726174696f6e206d757374206e6f7420626520312064616044820152607960f81b6064820152fd5b6020608492519162461bcd60e51b8352820152602960248201527f526577617264206475726174696f6e206d757374206265206c657373207468616044820152686e2032207765656b7360b81b6064820152fd5b50823461047e578160031936011261047e57600e5490516001600160a01b039091168152602090f35b50823461047e578160031936011261047e57602090516402540be4008152f35b50905f36600319011261033e576402540be4006109c833611e9f565b04926109d5841515611f26565b6006544210610fb5576109e6612265565b6109f284600854611d64565b600855600954335f5260209060118252825f2055815160608082019267ffffffffffffffff9383811085821117610fa2578552600283528083018536823760035484516001600160a01b03969187169015610f8f57825285600e54169182610a5987611f68565b5286600254169188519163d06ca61f60e01b83528260448101348d8301526024998c8b840152518091526064820192905f5b898d838310610f77575050505050805f920381865afa918215610f6d575f92610ed1575b505087519a63170ddc3160e11b8c52898c0152838b8781865afa9a8b15610ec7575f9b610e96575b50610ae190611f68565b516064610af5610aef611d89565b8d611e8c565b041015610e1d57865163095ea7b360e01b8082526001600160a01b03909216818a01908152602081018c9052919290918491839182905f90829060400103925af18015610d8157610e00575b5084600254164786600e5416916107084201804211610dee578a87938e959360c4938d51978896879563f305d71960e01b87528601528c8501525f60448501525f606485015230608485015260a48401525af18015610d8157908491610dc5575b50505f8286600f5416898951809481936372f702f360e01b83525af1908115610d81579086915f91610d8b575b501682875180966370a0823160e01b8252308b83015281845afa948515610d81575f95610d50575b50600f54875192835286166001600160a01b0316888301908152602081018690528391839182905f90829060400103925af18015610d1957610d23575b5083600f5416803b1561033e5785516305dc812160e31b8152338189019081526020810186905290915f9183919082908490829060400103925af18015610d1957610ce2575b509086977f99082720b1979c9cb4d4828fa54b1029b4f9ce9fdf788123e3814018c338ac7d92865194855284015234858401523392a2600e541691823b156106385781516332111c0560e11b81529284918491829084905af190811561062f575061061f5750f35b7f99082720b1979c9cb4d4828fa54b1029b4f9ce9fdf788123e3814018c338ac7d92919750610d1090611cb2565b5f969091610c7a565b86513d5f823e3d90fd5b610d4290823d8411610d49575b610d3a8183611cf7565b810190611d71565b505f610c34565b503d610d30565b909194508281813d8311610d7a575b610d698183611cf7565b8101031261033e5751939082610bf7565b503d610d5f565b87513d5f823e3d90fd5b809250848092503d8311610dbe575b610da48183611cf7565b8101031261033e5751858116810361033e5785905f610bcf565b503d610d9a565b813d8311610de7575b610dd88183611cf7565b8101031261033e57825f610ba2565b503d610dce565b8760118c634e487b7160e01b5f52525ffd5b610e1690833d8511610d4957610d3a8183611cf7565b505f610b41565b865162461bcd60e51b81528089018490526048818701527f537570706c696564204554482073686f756c6420626520776f7274682074686560448201527f2072657761726420616d6f756e7420616674657220736c69707061676520697360648201526708185c1c1b1a595960c21b608482015260a490fd5b909a508381813d8311610ec0575b610eae8183611cf7565b8101031261033e575199610ae1610ad7565b503d610ea4565b88513d5f823e3d90fd5b9091503d805f833e610ee38183611cf7565b810190858183031261033e5780519083821161033e570181601f8201121561033e578051928311610f5b578260051b908a5193610f2288840186611cf7565b8452868085019282010192831161033e5786809101915b838310610f4b57505050505f80610aaf565b8251815291810191879101610f39565b8760418c634e487b7160e01b5f52525ffd5b89513d5f823e3d90fd5b84511686529485019487945090920191600101610a8b565b603289634e487b7160e01b5f525260245ffd5b604187634e487b7160e01b5f525260245ffd5b610fbd612480565b6109e6565b833461033e57602036600319011261033e57602090610811610fe2611c50565b611e9f565b50503461033e576020918260031936011261033e57813591611007611fac565b600d54825163349f642f60e11b80825283820187905260156024830152741c1d589b1a58d1195c1bdcda5d1cd15b98589b1959605a1b60448301526001600160a01b03928316918781606481865afa908115610d19575f91611297575b501561126057851561122c578690855192839182528180611086888201611d19565b03915afa80156111f3575f906111fd575b6110a2915042611d43565b335f5260108652835f2055600e54169382519163dfe6fd0960e01b835284818401528183602481895afa9283156111f3575f936111c4575b505f95606483926110ed86600554611d43565b600555865198899384926323b872dd60e01b845233908401523060248401528960448401525af19485156111ba577f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90949561119d575b50600b541561115133612002565b61115d83600b54611d43565b600b55335f52601182526001845f2001611178848254611d43565b9055611190575b82519485528401523392a260018055005b611198612265565b61117f565b6111b390823d8411610d4957610d3a8183611cf7565b505f611143565b83513d5f823e3d90fd5b9092508181813d83116111ec575b6111dc8183611cf7565b8101031261033e5751915f6110da565b503d6111d2565b84513d5f823e3d90fd5b508581813d8311611225575b6112138183611cf7565b8101031261033e576110a29051611097565b503d611209565b845162461bcd60e51b8152808501889052600e60248201526d043616e6e6f74207374616b6520360941b6044820152606490fd5b845162461bcd60e51b8152808501889052601160248201527019195c1bdcda5d1cc8191a5cd8589b1959607a1b6044820152606490fd5b90508781813d83116112bd575b6112ae8183611cf7565b8101031261033e57515f611064565b503d6112a4565b833461033e575f36600319011261033e57600f5490516001600160a01b039091168152602090f35b833461033e57602036600319011261033e5760209061081161130c611c50565b611e40565b833461033e575f36600319011261033e575f5490516001600160a01b039091168152602090f35b833461033e575f36600319011261033e57602090600b549051908152f35b833461033e575f36600319011261033e57602090600c549051908152f35b3461033e575f36600319011261033e5761138c612429565b5f80546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b833461033e575f36600319011261033e57602090610811611d89565b50503461033e5760208060031936011261033e57602492823592611409611fac565b335f526010835261141f825f2054421015611c66565b600e54825163dfe6fd0960e01b8152828101869052956001600160a01b039185918891829085165afa9586156111ba575f96611597575b50335f52601184526001835f2001548611611555579483916114ed96600954335f5260118552855f205561148c83600b54611d64565b600b5561149b83600554611d64565b600555335f52601184526001855f20016114b6848254611d64565b9055600e5485516319b6934960e11b815233938101938452602084019490945292978893919091169183915f918391604090910190565b03925af193841561154b577f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5939461152e575b50519283523392a260018055005b61154490833d8511610d4957610d3a8183611cf7565b505f611520565b50513d5f823e3d90fd5b5082606492519162461bcd60e51b8352820152601f60248201527f57697468647261772065786365656473207374616b65642062616c616e6365006044820152fd5b9095508381813d83116115bf575b6115af8183611cf7565b8101031261033e5751945f611456565b503d6115a5565b833461033e575f36600319011261033e5760035490516001600160a01b039091168152602090f35b3461033e575f36600319011261033e57611606611fac565b61160f33612002565b60018055005b833461033e575f36600319011261033e576020906006549051908152f35b833461033e575f36600319011261033e57602090600a549051908152f35b50503461033e575f36600319011261033e5761166b611fac565b600b54156116cf57600754611683575b61160f612265565b60065442101561167b576020606492519162461bcd60e51b8352820152601960248201527f43616e6e6f7420757064617465207265776172647320796574000000000000006044820152fd5b6020608492519162461bcd60e51b8352820152602e60248201527f43616e206e6f7420757064617465207265776172647320756e74696c2075736560448201526d1c9cc81a185d99481cdd185ad95960921b6064820152fd5b833461033e575f36600319011261033e576020906009549051908152f35b82843461033e578060031936011261033e57611760611c50565b9060249283359061176f611fac565b600d54835163349f642f60e11b8082526020848301819052601589840152741c1d589b1a58d1195c1bdcda5d1cd15b98589b1959605a1b60448401526001600160a01b03979093909290881691908481606481865afa908115610ec7575f916119fe575b50156119c85785156119955783908751928391825281806117f5898201611d19565b03915afa8015610d19575f90611966575b611811915042611d43565b9580821696875f5260108452865f2055600e54169685519363dfe6fd0960e01b85528581860152838583818c5afa948515610d81575f95611934575b50906064849261185f87600554611d43565b6005555f89519b8c9485936323b872dd60e01b8552339085015230908401528960448401525af196871561192a577f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90969761190d575b506118c3600b541591612002565b6118cf83600b54611d43565b600b55865f52601182526001855f20016118ea848254611d43565b9055611900575b8351928352820152a260018055005b611908612265565b6118f1565b61192390833d8511610d4957610d3a8183611cf7565b50876118b5565b85513d5f823e3d90fd5b919094508382813d831161195f575b61194d8183611cf7565b8101031261033e57905193606461184d565b503d611943565b508281813d831161198e575b61197c8183611cf7565b8101031261033e576118119051611806565b503d611972565b865162461bcd60e51b8152808601859052600e818b01526d043616e6e6f74207374616b6520360941b6044820152606490fd5b865162461bcd60e51b81528086018590526011818b01527019195c1bdcda5d1cc8191a5cd8589b1959607a1b6044820152606490fd5b90508481813d8311611a24575b611a158183611cf7565b8101031261033e57518a6117d3565b503d611a0b565b82843461033e5760208060031936011261033e57823591611a4a611fac565b335f5260108252611a5f815f20544211611c66565b600d54815163349f642f60e11b815294906001600160a01b03908490879083168180611a8c818801611d19565b03915afa9586156111ba575f96611be0575b50611aab60249642611d43565b335f5260108552835f20558381600e541684519788809263dfe6fd0960e01b825289878301525afa9586156111ba575f96611bb1575b50335f52601184526001835f2001548611611b6f57948391611b1296611b0633612002565b61148c83600b54611d64565b03925af193841561154b577f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59394611b525750519283523392a260018055005b611b6890833d8511610d4957610d3a8183611cf7565b5084611520565b5082606492519162461bcd60e51b8352820152601f60248201527f576974686472617720616d6f756e7420657863656564732062616c616e6365006044820152fd5b9095508381813d8311611bd9575b611bc98183611cf7565b8101031261033e57519486611ae1565b503d611bbf565b95508386813d8311611c0a575b611bf78183611cf7565b8101031261033e57945194611aab611a9e565b503d611bed565b84903461033e57602036600319011261033e576001600160a01b03611c34611c50565b165f526011602052815f20600181549101549082526020820152f35b600435906001600160a01b038216820361033e57565b15611c6d57565b60405162461bcd60e51b815260206004820152601760248201527f746f6b656e73206e6f742079657420756e6c6f636b65640000000000000000006044820152606490fd5b67ffffffffffffffff8111611cc657604052565b634e487b7160e01b5f52604160045260245ffd5b610140810190811067ffffffffffffffff821117611cc657604052565b90601f8019910116810190811067ffffffffffffffff821117611cc657604052565b60609060208152600f60208201526e39b9b9a637b1b5a23ab930ba34b7b760891b60408201520190565b91908201809211611d5057565b634e487b7160e01b5f52601160045260245ffd5b91908203918211611d5057565b9081602091031261033e5751801515810361033e5790565b600d5460405163349f642f60e11b815260206004820181905260116024830152706c6971756964697479536c69707061676560781b60448301529091829060649082906001600160a01b03165afa908115611e17575f91611de8575090565b90506020813d602011611e0f575b81611e0360209383611cf7565b8101031261033e575190565b3d9150611df6565b6040513d5f823e3d90fd5b8115611e2c570490565b634e487b7160e01b5f52601260045260245ffd5b600e546001600160a01b0316906020906402540be40090611e6090611e9f565b0460246040518094819363170ddc3160e11b835260048301525afa908115611e17575f91611de8575090565b81810292918115918404141715611d5057565b600b54908115611f2057611eef611f1d92611eea611ec7611ebe611f8c565b60075490611e8c565b6001600160a01b039094165f818152601160205260409020600101549094611e8c565b611e22565b905f526011602052611f1860405f20611f12600182015491600954905490611d64565b90611e8c565b611d43565b90565b50505f90565b15611f2d57565b60405162461bcd60e51b81526020600482015260136024820152721b9bdd1a1a5b99c81d1bc818dbdb5c1bdd5b99606a1b6044820152606490fd5b805160011015611f785760400190565b634e487b7160e01b5f52603260045260245ffd5b600a54600c5480821115611f2057611f1d91428110611d64575042611d64565b600260015414611fbd576002600155565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b6402540be40061201182611e9f565b600d546040805163349f642f60e11b815290946001600160a01b03949093049160209190829082908716818061204960048201611d19565b03915afa8015610d19575f9061221e575b612065915042611d43565b9284811693845f5260108352865f205560065442101580612213575b156122065761208e612265565b61209a83600854611d64565b600855600954845f5260118352865f2055826120fb575b50505050600e541690813b1561033e575f809260048351809581936332111c0560e11b83525af19081156120f257506120e75750565b6120f090611cb2565b565b513d5f823e3d90fd5b600e5486516319b6934960e11b81526001600160a01b03929092166004830152602482018490528290829060449082905f908a165af18015610d19576121e9575b508084600e541692602487518095819363170ddc3160e11b835260048301525afa801561192a575f9061219c575b7f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f724192508551908152a25f8080806120b1565b508082813d83116121e2575b6121b28183611cf7565b8101031261033e577f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f7241915161216a565b503d6121a8565b6121ff90823d8411610d4957610d3a8183611cf7565b505f61213c565b61220e612480565b61208e565b50600b541515612081565b508181813d8311612246575b6122348183611cf7565b8101031261033e57612065905161205a565b503d61222a565b81810392915f138015828513169184121617611d5057565b600480546122745f9142611d43565b60065560018060a01b0380600e54169080600d541691604051809363349f642f60e11b82528160646020968793848b830152600d60248301526c7373735265776172644269707360981b60448301525afa908115611e17575f916123fc575b50813b1561033e575f91602483926040519485938492637705a5f760e11b84528b8401525af16123e9575b5081602491600e541660405192838092633af9e66960e01b825230898301525afa9182156123de5783926123ac575b50506123476123509161233e612480565b6005549061224d565b6008549061224d565b81811361236d5750600755612368905b429054611d43565b600a55565b906402540be400918083029283040361239957509061239161236892825490611e22565b600755612360565b634e487b7160e01b815260118352602490fd5b90809250813d83116123d7575b6123c38183611cf7565b8101031261033e575161234761235061232d565b503d6123b9565b6040513d85823e3d90fd5b6123f4919350611cb2565b5f91816122fe565b90508381813d8311612422575b6124138183611cf7565b8101031261033e57515f6122d3565b503d612409565b5f546001600160a01b0316330361243c57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b600b5480156124fd5760207fc9a5a3fd7d347387e8e94486e0a318555c954a59ef909437cba032eabbd87def916124ed6402540be4006124be611f8c565b926124e16124d96124d26007548097611e8c565b9283611e22565b600954611d43565b60095504600854611d43565b60085542600c55604051908152a1565b5056fea2646970667358221220fd1a5a908c405f55171267508d62c79d91431ea7ed75e11109cc6a58f2f3513664736f6c6343000819003300000000000000000000000028cfe98c33b8a8bb5f5ac5068a95d9db6bee5ffd000000000000000000000000791d99e6287ec2ca7e0244e96f51b884b725394d0000000000000000000000002218abd4b87df01679ff79547a8a079de4daeac9

Deployed Bytecode

0x608060409080825260049081361015610020575b505050361561001e57005b005b5f905f3560e01c90816316934fc414611c11575080632e1a7d4d14611a2b5780632ee4090814611746578063310bf1c81461172857806333bcfcbe1461165157806337e9f64a14611633578063417d020b146116155780634e71d92d146115ee5780634f0e0ef3146115c65780635312ea8e146113e75780636faa5b5c146113cb578063715018a6146113745780637519ab5014611356578063817b1cd2146113385780638da5cb5b146113115780638ea42976146112ec5780639f62db78146112c4578063a694fc3a14610fe7578063a78793b614610fc2578063a8fcdb01146109ac578063aaf5eb681461098c578063b4852e7a14610963578063c0ed00c914610860578063c3fe3e2814610837578063c4f4542314610818578063d545e0a2146107f4578063e89fc526146107d5578063eacdaabc146107b6578063f2fde38b146106eb578063f520e7e5146106c8578063f69e2046146104ae578063f887ea40146104855763ffdd5cf1036100135734610482576020918260031936011261047e576101ae611c50565b918451926101bb84611cda565b818452818585015281868501528160608501528160808501528160a08501528160c08501528160e085015261010091808386015280610120809601528081968298839660018060a01b03958681168061038f575b505085600e54169583600b5460248551809a819363170ddc3160e11b8352878301525afa968715610385578697610354575b50610264918491600d54168451808095819463349f642f60e11b83528201611d19565b03915afa948515610349579461030e575b50906101409989939260065460075493600954958c600a549885519061029a82611cda565b8152838101928352858101948552606081019687526080810197885260a0810198895260c08101998a5260e081019a8b528c81019b8c52019b8c5283519d8e5251908d015251908b01525160608a01525160808901525160a08801525160c08701525160e086015251908401525190820152f35b92918091945083813d8311610342575b6103288183611cf7565b8101031261033e57915192909190610140610275565b5f80fd5b503d61031e565b8251903d90823e3d90fd5b9096508381813d831161037e575b61036c8183611cf7565b8101031261033e575195610264610241565b503d610362565b83513d88823e3d90fd5b945099509950955081835260108152858320549584600e541681516370a0823160e01b8152848c8201528381602481855afa801561038557869061044f575b6103d991509a611e40565b93855260118352826001838720015460248d8551948593849263170ddc3160e11b84528301525afa908115610445578591610418575b50995f8061020f565b90508281813d831161043e575b61042f8183611cf7565b8101031261033e57515f61040f565b503d610425565b82513d87823e3d90fd5b508381813d8311610477575b6104658183611cf7565b8101031261033e576103d990516103ce565b503d61045b565b5080fd5b80fd5b50823461047e578160031936011261047e5760025490516001600160a01b039091168152602090f35b50809183826003193601126106c457600d54815163349f642f60e11b81526001600160a01b0393916020919082908290871681806104ed818901611d19565b03915afa9081156106ba578691610686575b5061050a9042611d43565b33865260108252838620556402540be40061052433611e9f565b0493610531851515611f26565b600654421061067957610542612265565b61054e85600854611d64565b60085561055d85600554611d43565b600555600954338752601183528487205561057a85600b54611d43565b600b5533865260118252600184872001610595868254611d43565b9055600e54169383519163170ddc3160e11b835281848401528083602481895afa92831561066f57879361063d575b5084519283528201527f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90833392a2823b156106385781516332111c0560e11b81529284918491829084905af190811561062f575061061f5750f35b61062890611cb2565b6104825780f35b513d84823e3d90fd5b505050fd5b809750818094503d8311610668575b6106568183611cf7565b8101031261033e5786955191886105c4565b503d61064c565b85513d89823e3d90fd5b610681612480565b610542565b809650828092503d83116106b3575b61069f8183611cf7565b8101031261033e5761050a869551906104ff565b503d610695565b84513d88823e3d90fd5b5050fd5b509190346106e757826003193601126106e75760209250549051908152f35b8280fd5b509190346106e75760203660031901126106e757610707611c50565b90610710612429565b6001600160a01b039182169283156107645750505f54826bffffffffffffffffffffffff60a01b8216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b50823461047e578160031936011261047e576020906007549051908152f35b50823461047e578160031936011261047e576020906005549051908152f35b50823461047e578160031936011261047e57602090610811611f8c565b9051908152f35b50823461047e578160031936011261047e576020906008549051908152f35b50823461047e578160031936011261047e57600d5490516001600160a01b039091168152602090f35b5091346106e75760203660031901126106e75781359161087e612429565b62127500831161090f57620151808311156108c35791602091817ffeece2f615b2fecca6c26deadea49416a6ba6b52b2cd2613065fd6a787cf1240945551908152a180f35b6020608492519162461bcd60e51b8352820152602160248201527f526577617264206475726174696f6e206d757374206e6f7420626520312064616044820152607960f81b6064820152fd5b6020608492519162461bcd60e51b8352820152602960248201527f526577617264206475726174696f6e206d757374206265206c657373207468616044820152686e2032207765656b7360b81b6064820152fd5b50823461047e578160031936011261047e57600e5490516001600160a01b039091168152602090f35b50823461047e578160031936011261047e57602090516402540be4008152f35b50905f36600319011261033e576402540be4006109c833611e9f565b04926109d5841515611f26565b6006544210610fb5576109e6612265565b6109f284600854611d64565b600855600954335f5260209060118252825f2055815160608082019267ffffffffffffffff9383811085821117610fa2578552600283528083018536823760035484516001600160a01b03969187169015610f8f57825285600e54169182610a5987611f68565b5286600254169188519163d06ca61f60e01b83528260448101348d8301526024998c8b840152518091526064820192905f5b898d838310610f77575050505050805f920381865afa918215610f6d575f92610ed1575b505087519a63170ddc3160e11b8c52898c0152838b8781865afa9a8b15610ec7575f9b610e96575b50610ae190611f68565b516064610af5610aef611d89565b8d611e8c565b041015610e1d57865163095ea7b360e01b8082526001600160a01b03909216818a01908152602081018c9052919290918491839182905f90829060400103925af18015610d8157610e00575b5084600254164786600e5416916107084201804211610dee578a87938e959360c4938d51978896879563f305d71960e01b87528601528c8501525f60448501525f606485015230608485015260a48401525af18015610d8157908491610dc5575b50505f8286600f5416898951809481936372f702f360e01b83525af1908115610d81579086915f91610d8b575b501682875180966370a0823160e01b8252308b83015281845afa948515610d81575f95610d50575b50600f54875192835286166001600160a01b0316888301908152602081018690528391839182905f90829060400103925af18015610d1957610d23575b5083600f5416803b1561033e5785516305dc812160e31b8152338189019081526020810186905290915f9183919082908490829060400103925af18015610d1957610ce2575b509086977f99082720b1979c9cb4d4828fa54b1029b4f9ce9fdf788123e3814018c338ac7d92865194855284015234858401523392a2600e541691823b156106385781516332111c0560e11b81529284918491829084905af190811561062f575061061f5750f35b7f99082720b1979c9cb4d4828fa54b1029b4f9ce9fdf788123e3814018c338ac7d92919750610d1090611cb2565b5f969091610c7a565b86513d5f823e3d90fd5b610d4290823d8411610d49575b610d3a8183611cf7565b810190611d71565b505f610c34565b503d610d30565b909194508281813d8311610d7a575b610d698183611cf7565b8101031261033e5751939082610bf7565b503d610d5f565b87513d5f823e3d90fd5b809250848092503d8311610dbe575b610da48183611cf7565b8101031261033e5751858116810361033e5785905f610bcf565b503d610d9a565b813d8311610de7575b610dd88183611cf7565b8101031261033e57825f610ba2565b503d610dce565b8760118c634e487b7160e01b5f52525ffd5b610e1690833d8511610d4957610d3a8183611cf7565b505f610b41565b865162461bcd60e51b81528089018490526048818701527f537570706c696564204554482073686f756c6420626520776f7274682074686560448201527f2072657761726420616d6f756e7420616674657220736c69707061676520697360648201526708185c1c1b1a595960c21b608482015260a490fd5b909a508381813d8311610ec0575b610eae8183611cf7565b8101031261033e575199610ae1610ad7565b503d610ea4565b88513d5f823e3d90fd5b9091503d805f833e610ee38183611cf7565b810190858183031261033e5780519083821161033e570181601f8201121561033e578051928311610f5b578260051b908a5193610f2288840186611cf7565b8452868085019282010192831161033e5786809101915b838310610f4b57505050505f80610aaf565b8251815291810191879101610f39565b8760418c634e487b7160e01b5f52525ffd5b89513d5f823e3d90fd5b84511686529485019487945090920191600101610a8b565b603289634e487b7160e01b5f525260245ffd5b604187634e487b7160e01b5f525260245ffd5b610fbd612480565b6109e6565b833461033e57602036600319011261033e57602090610811610fe2611c50565b611e9f565b50503461033e576020918260031936011261033e57813591611007611fac565b600d54825163349f642f60e11b80825283820187905260156024830152741c1d589b1a58d1195c1bdcda5d1cd15b98589b1959605a1b60448301526001600160a01b03928316918781606481865afa908115610d19575f91611297575b501561126057851561122c578690855192839182528180611086888201611d19565b03915afa80156111f3575f906111fd575b6110a2915042611d43565b335f5260108652835f2055600e54169382519163dfe6fd0960e01b835284818401528183602481895afa9283156111f3575f936111c4575b505f95606483926110ed86600554611d43565b600555865198899384926323b872dd60e01b845233908401523060248401528960448401525af19485156111ba577f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90949561119d575b50600b541561115133612002565b61115d83600b54611d43565b600b55335f52601182526001845f2001611178848254611d43565b9055611190575b82519485528401523392a260018055005b611198612265565b61117f565b6111b390823d8411610d4957610d3a8183611cf7565b505f611143565b83513d5f823e3d90fd5b9092508181813d83116111ec575b6111dc8183611cf7565b8101031261033e5751915f6110da565b503d6111d2565b84513d5f823e3d90fd5b508581813d8311611225575b6112138183611cf7565b8101031261033e576110a29051611097565b503d611209565b845162461bcd60e51b8152808501889052600e60248201526d043616e6e6f74207374616b6520360941b6044820152606490fd5b845162461bcd60e51b8152808501889052601160248201527019195c1bdcda5d1cc8191a5cd8589b1959607a1b6044820152606490fd5b90508781813d83116112bd575b6112ae8183611cf7565b8101031261033e57515f611064565b503d6112a4565b833461033e575f36600319011261033e57600f5490516001600160a01b039091168152602090f35b833461033e57602036600319011261033e5760209061081161130c611c50565b611e40565b833461033e575f36600319011261033e575f5490516001600160a01b039091168152602090f35b833461033e575f36600319011261033e57602090600b549051908152f35b833461033e575f36600319011261033e57602090600c549051908152f35b3461033e575f36600319011261033e5761138c612429565b5f80546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b833461033e575f36600319011261033e57602090610811611d89565b50503461033e5760208060031936011261033e57602492823592611409611fac565b335f526010835261141f825f2054421015611c66565b600e54825163dfe6fd0960e01b8152828101869052956001600160a01b039185918891829085165afa9586156111ba575f96611597575b50335f52601184526001835f2001548611611555579483916114ed96600954335f5260118552855f205561148c83600b54611d64565b600b5561149b83600554611d64565b600555335f52601184526001855f20016114b6848254611d64565b9055600e5485516319b6934960e11b815233938101938452602084019490945292978893919091169183915f918391604090910190565b03925af193841561154b577f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5939461152e575b50519283523392a260018055005b61154490833d8511610d4957610d3a8183611cf7565b505f611520565b50513d5f823e3d90fd5b5082606492519162461bcd60e51b8352820152601f60248201527f57697468647261772065786365656473207374616b65642062616c616e6365006044820152fd5b9095508381813d83116115bf575b6115af8183611cf7565b8101031261033e5751945f611456565b503d6115a5565b833461033e575f36600319011261033e5760035490516001600160a01b039091168152602090f35b3461033e575f36600319011261033e57611606611fac565b61160f33612002565b60018055005b833461033e575f36600319011261033e576020906006549051908152f35b833461033e575f36600319011261033e57602090600a549051908152f35b50503461033e575f36600319011261033e5761166b611fac565b600b54156116cf57600754611683575b61160f612265565b60065442101561167b576020606492519162461bcd60e51b8352820152601960248201527f43616e6e6f7420757064617465207265776172647320796574000000000000006044820152fd5b6020608492519162461bcd60e51b8352820152602e60248201527f43616e206e6f7420757064617465207265776172647320756e74696c2075736560448201526d1c9cc81a185d99481cdd185ad95960921b6064820152fd5b833461033e575f36600319011261033e576020906009549051908152f35b82843461033e578060031936011261033e57611760611c50565b9060249283359061176f611fac565b600d54835163349f642f60e11b8082526020848301819052601589840152741c1d589b1a58d1195c1bdcda5d1cd15b98589b1959605a1b60448401526001600160a01b03979093909290881691908481606481865afa908115610ec7575f916119fe575b50156119c85785156119955783908751928391825281806117f5898201611d19565b03915afa8015610d19575f90611966575b611811915042611d43565b9580821696875f5260108452865f2055600e54169685519363dfe6fd0960e01b85528581860152838583818c5afa948515610d81575f95611934575b50906064849261185f87600554611d43565b6005555f89519b8c9485936323b872dd60e01b8552339085015230908401528960448401525af196871561192a577f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90969761190d575b506118c3600b541591612002565b6118cf83600b54611d43565b600b55865f52601182526001855f20016118ea848254611d43565b9055611900575b8351928352820152a260018055005b611908612265565b6118f1565b61192390833d8511610d4957610d3a8183611cf7565b50876118b5565b85513d5f823e3d90fd5b919094508382813d831161195f575b61194d8183611cf7565b8101031261033e57905193606461184d565b503d611943565b508281813d831161198e575b61197c8183611cf7565b8101031261033e576118119051611806565b503d611972565b865162461bcd60e51b8152808601859052600e818b01526d043616e6e6f74207374616b6520360941b6044820152606490fd5b865162461bcd60e51b81528086018590526011818b01527019195c1bdcda5d1cc8191a5cd8589b1959607a1b6044820152606490fd5b90508481813d8311611a24575b611a158183611cf7565b8101031261033e57518a6117d3565b503d611a0b565b82843461033e5760208060031936011261033e57823591611a4a611fac565b335f5260108252611a5f815f20544211611c66565b600d54815163349f642f60e11b815294906001600160a01b03908490879083168180611a8c818801611d19565b03915afa9586156111ba575f96611be0575b50611aab60249642611d43565b335f5260108552835f20558381600e541684519788809263dfe6fd0960e01b825289878301525afa9586156111ba575f96611bb1575b50335f52601184526001835f2001548611611b6f57948391611b1296611b0633612002565b61148c83600b54611d64565b03925af193841561154b577f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59394611b525750519283523392a260018055005b611b6890833d8511610d4957610d3a8183611cf7565b5084611520565b5082606492519162461bcd60e51b8352820152601f60248201527f576974686472617720616d6f756e7420657863656564732062616c616e6365006044820152fd5b9095508381813d8311611bd9575b611bc98183611cf7565b8101031261033e57519486611ae1565b503d611bbf565b95508386813d8311611c0a575b611bf78183611cf7565b8101031261033e57945194611aab611a9e565b503d611bed565b84903461033e57602036600319011261033e576001600160a01b03611c34611c50565b165f526011602052815f20600181549101549082526020820152f35b600435906001600160a01b038216820361033e57565b15611c6d57565b60405162461bcd60e51b815260206004820152601760248201527f746f6b656e73206e6f742079657420756e6c6f636b65640000000000000000006044820152606490fd5b67ffffffffffffffff8111611cc657604052565b634e487b7160e01b5f52604160045260245ffd5b610140810190811067ffffffffffffffff821117611cc657604052565b90601f8019910116810190811067ffffffffffffffff821117611cc657604052565b60609060208152600f60208201526e39b9b9a637b1b5a23ab930ba34b7b760891b60408201520190565b91908201809211611d5057565b634e487b7160e01b5f52601160045260245ffd5b91908203918211611d5057565b9081602091031261033e5751801515810361033e5790565b600d5460405163349f642f60e11b815260206004820181905260116024830152706c6971756964697479536c69707061676560781b60448301529091829060649082906001600160a01b03165afa908115611e17575f91611de8575090565b90506020813d602011611e0f575b81611e0360209383611cf7565b8101031261033e575190565b3d9150611df6565b6040513d5f823e3d90fd5b8115611e2c570490565b634e487b7160e01b5f52601260045260245ffd5b600e546001600160a01b0316906020906402540be40090611e6090611e9f565b0460246040518094819363170ddc3160e11b835260048301525afa908115611e17575f91611de8575090565b81810292918115918404141715611d5057565b600b54908115611f2057611eef611f1d92611eea611ec7611ebe611f8c565b60075490611e8c565b6001600160a01b039094165f818152601160205260409020600101549094611e8c565b611e22565b905f526011602052611f1860405f20611f12600182015491600954905490611d64565b90611e8c565b611d43565b90565b50505f90565b15611f2d57565b60405162461bcd60e51b81526020600482015260136024820152721b9bdd1a1a5b99c81d1bc818dbdb5c1bdd5b99606a1b6044820152606490fd5b805160011015611f785760400190565b634e487b7160e01b5f52603260045260245ffd5b600a54600c5480821115611f2057611f1d91428110611d64575042611d64565b600260015414611fbd576002600155565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b6402540be40061201182611e9f565b600d546040805163349f642f60e11b815290946001600160a01b03949093049160209190829082908716818061204960048201611d19565b03915afa8015610d19575f9061221e575b612065915042611d43565b9284811693845f5260108352865f205560065442101580612213575b156122065761208e612265565b61209a83600854611d64565b600855600954845f5260118352865f2055826120fb575b50505050600e541690813b1561033e575f809260048351809581936332111c0560e11b83525af19081156120f257506120e75750565b6120f090611cb2565b565b513d5f823e3d90fd5b600e5486516319b6934960e11b81526001600160a01b03929092166004830152602482018490528290829060449082905f908a165af18015610d19576121e9575b508084600e541692602487518095819363170ddc3160e11b835260048301525afa801561192a575f9061219c575b7f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f724192508551908152a25f8080806120b1565b508082813d83116121e2575b6121b28183611cf7565b8101031261033e577f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f7241915161216a565b503d6121a8565b6121ff90823d8411610d4957610d3a8183611cf7565b505f61213c565b61220e612480565b61208e565b50600b541515612081565b508181813d8311612246575b6122348183611cf7565b8101031261033e57612065905161205a565b503d61222a565b81810392915f138015828513169184121617611d5057565b600480546122745f9142611d43565b60065560018060a01b0380600e54169080600d541691604051809363349f642f60e11b82528160646020968793848b830152600d60248301526c7373735265776172644269707360981b60448301525afa908115611e17575f916123fc575b50813b1561033e575f91602483926040519485938492637705a5f760e11b84528b8401525af16123e9575b5081602491600e541660405192838092633af9e66960e01b825230898301525afa9182156123de5783926123ac575b50506123476123509161233e612480565b6005549061224d565b6008549061224d565b81811361236d5750600755612368905b429054611d43565b600a55565b906402540be400918083029283040361239957509061239161236892825490611e22565b600755612360565b634e487b7160e01b815260118352602490fd5b90809250813d83116123d7575b6123c38183611cf7565b8101031261033e575161234761235061232d565b503d6123b9565b6040513d85823e3d90fd5b6123f4919350611cb2565b5f91816122fe565b90508381813d8311612422575b6124138183611cf7565b8101031261033e57515f6122d3565b503d612409565b5f546001600160a01b0316330361243c57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b600b5480156124fd5760207fc9a5a3fd7d347387e8e94486e0a318555c954a59ef909437cba032eabbd87def916124ed6402540be4006124be611f8c565b926124e16124d96124d26007548097611e8c565b9283611e22565b600954611d43565b60095504600854611d43565b60085542600c55604051908152a1565b5056fea2646970667358221220fd1a5a908c405f55171267508d62c79d91431ea7ed75e11109cc6a58f2f3513664736f6c63430008190033

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

00000000000000000000000028cfe98c33b8a8bb5f5ac5068a95d9db6bee5ffd000000000000000000000000791d99e6287ec2ca7e0244e96f51b884b725394d0000000000000000000000002218abd4b87df01679ff79547a8a079de4daeac9

-----Decoded View---------------
Arg [0] : _soup (address): 0x28cFE98c33b8A8Bb5F5aC5068A95D9db6bEE5FfD
Arg [1] : _game (address): 0x791d99E6287ec2ca7E0244e96F51b884B725394D
Arg [2] : _liquidityPot (address): 0x2218abD4B87DF01679Ff79547a8A079DE4DAEaC9

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000028cfe98c33b8a8bb5f5ac5068a95d9db6bee5ffd
Arg [1] : 000000000000000000000000791d99e6287ec2ca7e0244e96f51b884b725394d
Arg [2] : 0000000000000000000000002218abd4b87df01679ff79547a8a079de4daeac9


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.