ETH Price: $3,326.21 (-1.00%)

Contract

0x8707f238936c12c309bfc2B9959C35828AcFc512
 

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0xf6ab48f2372d2124d732dcc5a1647956caf417cdacd68ab3a29ad328c7e9bd5a Withdraw(pending)2024-11-22 13:01:4010 hrs ago1732280500IN
Ethena: Ethena LP Staking
0 ETH(Pending)(Pending)
0x00f1c4e1fc8acab64411ce5d99554ffcb69d259749e10d5b98b8f951690b7acc Stake(pending)2024-11-21 0:07:2347 hrs ago1732147643IN
Ethena: Ethena LP Staking
0 ETH(Pending)(Pending)
0x20d621aa864f02fd333316d18966509bba09619deef1d504c60d2fcda292e71a Stake(pending)2024-11-21 0:07:0747 hrs ago1732147627IN
Ethena: Ethena LP Staking
0 ETH(Pending)(Pending)
0x23344fb83b41d98e194538078e52e2a15d35fbed999521eb10341efd3a154f64 Unstake(pending)2024-11-07 13:37:4015 days ago1730986660IN
Ethena: Ethena LP Staking
0 ETH(Pending)(Pending)
0x4149ac812213079244cd152d82d7f591488074eae9ffda5fc762a12f90a6acc7 Stake(pending)2024-11-03 2:25:4219 days ago1730600742IN
Ethena: Ethena LP Staking
0 ETH(Pending)(Pending)
Unstake212465592024-11-22 23:29:357 mins ago1732318175IN
Ethena: Ethena LP Staking
0 ETH0.0009092213.28603219
Stake212465332024-11-22 23:24:2313 mins ago1732317863IN
Ethena: Ethena LP Staking
0 ETH0.0011634813.42434607
Stake212464652024-11-22 23:10:3526 mins ago1732317035IN
Ethena: Ethena LP Staking
0 ETH0.001275614.6741399
Stake212464632024-11-22 23:10:1127 mins ago1732317011IN
Ethena: Ethena LP Staking
0 ETH0.0009332313.40970232
Stake212464142024-11-22 23:00:2337 mins ago1732316423IN
Ethena: Ethena LP Staking
0 ETH0.0009415614.91087909
Stake212464112024-11-22 22:59:4737 mins ago1732316387IN
Ethena: Ethena LP Staking
0 ETH0.0012521514.44737346
Stake212463752024-11-22 22:52:3544 mins ago1732315955IN
Ethena: Ethena LP Staking
0 ETH0.0013868715.95633533
Unstake212463622024-11-22 22:49:5947 mins ago1732315799IN
Ethena: Ethena LP Staking
0 ETH0.000893714.57585871
Withdraw212463302024-11-22 22:43:3553 mins ago1732315415IN
Ethena: Ethena LP Staking
0 ETH0.00083815.06073883
Unstake212463232024-11-22 22:42:1155 mins ago1732315331IN
Ethena: Ethena LP Staking
0 ETH0.00091814.97291027
Unstake212463172024-11-22 22:40:5956 mins ago1732315259IN
Ethena: Ethena LP Staking
0 ETH0.0011163218.1996295
Unstake212463132024-11-22 22:40:1157 mins ago1732315211IN
Ethena: Ethena LP Staking
0 ETH0.0010898517.77232328
Unstake212462682024-11-22 22:30:591 hr ago1732314659IN
Ethena: Ethena LP Staking
0 ETH0.0012472518.22540181
Stake212462572024-11-22 22:28:471 hr ago1732314527IN
Ethena: Ethena LP Staking
0 ETH0.0014979317.23882759
Stake212461732024-11-22 22:11:591 hr ago1732313519IN
Ethena: Ethena LP Staking
0 ETH0.0017457120.13651247
Withdraw212461342024-11-22 22:04:111 hr ago1732313051IN
Ethena: Ethena LP Staking
0 ETH0.0015611221.45169217
Withdraw212461042024-11-22 21:58:111 hr ago1732312691IN
Ethena: Ethena LP Staking
0 ETH0.0015291321.00861117
Withdraw212460372024-11-22 21:44:351 hr ago1732311875IN
Ethena: Ethena LP Staking
0 ETH0.0016117522.15468092
Withdraw212460312024-11-22 21:43:231 hr ago1732311803IN
Ethena: Ethena LP Staking
0 ETH0.0011438720.54894224
Unstake212459382024-11-22 21:24:472 hrs ago1732310687IN
Ethena: Ethena LP Staking
0 ETH0.0010299816.7920231
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EthenaLPStaking

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 20000 runs

Other Settings:
shanghai EvmVersion
File 1 of 10 : EthenaLPStaking.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.20;

import "@openzeppelin/contracts/access/Ownable2Step.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./interfaces/IEthenaLPStakingDefinitions.sol";

/**
 * @title EthenaLPStaking
 * @notice Allows liquidity providers in various USDe pools to stake their LP tokens
 * in order to earn shards toward the Ethena airdrop. There will be a series of epochs,
 * with certain pools eligible to stake in a given epoch. Reward computation and distribution
 * is handled off-chain.  This contract is only used to hold the staked LP tokens with a
 * cooldown period on withdrawing stakes.
 */

contract EthenaLPStaking is Ownable2Step, IEthenaLPStakingDefinitions, ReentrancyGuard {
  using SafeERC20 for IERC20;

  // ---------------------- Constants -----------------------

  /// @notice placeholder address for ETH
  address internal constant _ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

  /// @notice the maximum cooldown period the owner can set for any LP token
  uint48 internal constant _MAX_COOLDOWN_PERIOD = 90 days;

  // ----------------------- Storage ------------------------

  /// @notice tracks the current epoch
  uint8 public currentEpoch;

  /// @notice tracks all stakes, indexed by user and LP token
  mapping(address => mapping(address => StakeData)) public stakes;

  /// @notice tracks stake parameters for each LP token, indexed by LP token address
  mapping(address => StakeParameters) public stakeParametersByToken;

  // --------------------- Constructor ----------------------

  constructor(address _initialOwner) {
    if (_initialOwner == address(0)) revert ZeroAddressException();
    _transferOwnership(_initialOwner);
  }

  // ---------------------- Modifiers -----------------------

  /**
   * @notice checks that the amount is not 0
   * @param amount the amount to check
   */
  modifier checkAmount(uint256 amount) {
    if (amount == 0) revert InvalidAmount();
    _;
  }

  // ------------------- Owner Functions --------------------

  /**
   * @notice owner can change epoch
   * @param newEpoch the new epoch
   */
  function setEpoch(uint8 newEpoch) external onlyOwner {
    if (newEpoch == currentEpoch) revert InvalidEpoch();
    emit NewEpoch(newEpoch, currentEpoch);
    currentEpoch = newEpoch;
  }

  /**
   * @notice owner can add/update stake parameters for a given LP token
   * @param token the LP token to update stake parameters for
   * @param epoch the epoch the token is eligible for staking
   * @param stakeLimit the maximum amount of LP tokens that can be staked
   * @param cooldown the cooldown period for withdrawing LP tokens
   */
  function updateStakeParameters(address token, uint8 epoch, uint248 stakeLimit, uint48 cooldown) external onlyOwner {
    if (cooldown > _MAX_COOLDOWN_PERIOD) revert MaxCooldownExceeded();
    StakeParameters storage stakeParameters = stakeParametersByToken[token];
    // owner cannot modify total staked or cooling down
    stakeParameters.epoch = epoch;
    stakeParameters.stakeLimit = stakeLimit;
    stakeParameters.cooldown = cooldown;
    emit StakeParametersUpdated(token, epoch, stakeLimit, cooldown);
  }

  /**
   * @notice owner can rescue tokens that were accidentally sent to the contract
   * @param token the token to transfer
   * @param to the address to send the tokens to
   * @param amount the amount of tokens to send
   */
  function rescueTokens(address token, address to, uint256 amount) external onlyOwner nonReentrant checkAmount(amount) {
    if (to == address(0)) revert ZeroAddressException();
    // contract should never hold ETH
    if (token == _ETH_ADDRESS) {
      (bool success,) = to.call{value: amount}("");
      if (!success) revert TransferFailed();
    } else {
      IERC20(token).safeTransfer(to, amount);
      _checkInvariant(token);
    }
    emit TokensRescued(token, to, amount);
  }

  /// @notice Prevents the owner from renouncing ownership, must be transferred in 2 steps
  function renounceOwnership() public view override onlyOwner {
    revert CantRenounceOwnership();
  }

  // ----------------------- User Functions ------------------------

  /**
   * @notice users can stake LP tokens to earn shards toward airdrop
   * @param token the LP token to stake
   * @param amount the amount of LP tokens to stake
   */
  function stake(address token, uint104 amount) external nonReentrant checkAmount(amount) {
    StakeParameters storage stakeParameters = stakeParametersByToken[token];
    // can only stake when it is the correct epoch
    if (currentEpoch != stakeParameters.epoch) revert InvalidEpoch();
    if (stakeParameters.totalStaked + amount > stakeParameters.stakeLimit) revert StakeLimitExceeded();
    stakeParameters.totalStaked += amount;
    stakes[msg.sender][token].stakedAmount += amount;
    IERC20(token).safeTransferFrom(msg.sender, address(this), amount);
    _checkInvariant(token);
    emit Stake(msg.sender, token, amount);
  }

  /**
   * @notice users can unstake LP tokens to initiate the cooldown period.
   * They will not be able to withdraw until the cooldown period has passed and do not earn rewards during this period.
   * @param token the LP token to unstake
   * @param amount the amount of LP tokens to unstake
   */
  function unstake(address token, uint104 amount) external nonReentrant checkAmount(amount) {
    StakeParameters storage stakeParameters = stakeParametersByToken[token];
    StakeData storage stakeData = stakes[msg.sender][token];
    if (stakeData.stakedAmount < amount) revert InvalidAmount();
    stakeData.stakedAmount -= amount;
    stakeData.coolingDownAmount += amount;
    stakeData.cooldownStartTimestamp = uint104(block.timestamp);
    stakeParameters.totalStaked -= amount;
    stakeParameters.totalCoolingDown += amount;
    _checkInvariant(token);
    emit Unstake(msg.sender, token, amount);
  }

  /**
   * @notice users can withdraw LP tokens after the cooldown period has passed
   * @param token the LP token to withdraw
   * @param amount the amount of LP tokens to withdraw
   */
  function withdraw(address token, uint104 amount) external nonReentrant checkAmount(amount) {
    StakeParameters storage stakeParameters = stakeParametersByToken[token];
    StakeData storage stakeData = stakes[msg.sender][token];
    if (stakeData.coolingDownAmount < amount) revert InvalidAmount();
    if (block.timestamp < stakeData.cooldownStartTimestamp + stakeParameters.cooldown) revert CooldownNotOver();
    stakeData.coolingDownAmount -= amount;
    stakeParameters.totalCoolingDown -= amount;
    IERC20(token).safeTransfer(msg.sender, amount);
    _checkInvariant(token);
    emit Withdraw(msg.sender, token, amount);
  }

  // ----------------------- Internal Functions ------------------------

  /**
   * @notice checks that the invariant is not broken
   * @param token the LP token to check
   * @dev the invariant is that the contract should never hold less of a token than the total staked and cooling down
   * @dev despite the higher gas cost of an extra sload here, we intentionally do not pass in the stake parameters
   * because we want to ensure that the invariant is checked against the current state of the contract
   */
  function _checkInvariant(address token) internal view {
    StakeParameters storage stakeParameters = stakeParametersByToken[token];
    uint256 balance = IERC20(token).balanceOf(address(this));
    if (balance < stakeParameters.totalStaked + stakeParameters.totalCoolingDown) revert InvariantBroken();
  }
}

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

pragma solidity ^0.8.0;

import "./Ownable.sol";

/**
 * @dev Contract module which provides 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} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

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

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

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
        _transferOwnership(sender);
    }
}

File 3 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

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

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

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

File 5 of 10 : IEthenaLPStakingDefinitions.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.20;

interface IEthenaLPStakingDefinitions {
  /// @notice information about staking for a particular LP token
  struct StakeParameters {
    uint8 epoch;
    uint248 stakeLimit;
    uint104 totalStaked; // total deposited and not in cooldown
    uint104 totalCoolingDown;
    uint48 cooldown;
  }

  /// @notice information about a particular stake by user and LP token
  struct StakeData {
    uint256 stakedAmount;
    uint152 coolingDownAmount;
    uint104 cooldownStartTimestamp;
  }

  /// @notice emitted when an epoch begins
  event NewEpoch(uint8 indexed newEpoch, uint8 indexed previousEpoch);

  /// @notice emitted when staking parameters are added/updated for an LP token
  event StakeParametersUpdated(address indexed lpToken, uint8 indexed epoch, uint248 stakeLimit, uint104 cooldown);

  /// @notice emitted when a user stakes
  event Stake(address indexed user, address indexed lpToken, uint256 amount);

  /// @notice emitted when a user unstakes
  event Unstake(address indexed user, address indexed lpToken, uint256 amount);

  /// @notice emitted when a user withdraws
  event Withdraw(address indexed user, address indexed lpToken, uint256 amount);

  /// @notice emitted when tokens are rescued by owner
  event TokensRescued(address indexed token, address indexed to, uint256 amount);

  /// @notice ownership cannot be renounced
  error CantRenounceOwnership();

  /// @notice Error returned when a user tries staking more than the limit for a given token
  error StakeLimitExceeded();

  /// @notice Error returned when staking LP token during wrong epoch
  error InvalidEpoch();

  /// @notice zero amount or amount greater than a max such as amount staked
  error InvalidAmount();

  /// @notice Error returned when native ETH transfer fails
  error TransferFailed();

  /// @notice Error returned when excess balance of an LP token is less than 0
  error InvariantBroken();

  /// @notice Error returned when owner sets cooldown > 1 year
  error MaxCooldownExceeded();

  /// @notice Error returned when user attempts to withdraw before cooldown period is over
  error CooldownNotOver();

  /// @notice This error is returned if the zero address is used
  error ZeroAddressException();
}

File 6 of 10 : 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);
    }
}

File 7 of 10 : 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 8 of 10 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 9 of 10 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 10 of 10 : 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;
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 20000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "shanghai",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_initialOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CantRenounceOwnership","type":"error"},{"inputs":[],"name":"CooldownNotOver","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"InvalidEpoch","type":"error"},{"inputs":[],"name":"InvariantBroken","type":"error"},{"inputs":[],"name":"MaxCooldownExceeded","type":"error"},{"inputs":[],"name":"StakeLimitExceeded","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"ZeroAddressException","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"newEpoch","type":"uint8"},{"indexed":true,"internalType":"uint8","name":"previousEpoch","type":"uint8"}],"name":"NewEpoch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","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":true,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"lpToken","type":"address"},{"indexed":true,"internalType":"uint8","name":"epoch","type":"uint8"},{"indexed":false,"internalType":"uint248","name":"stakeLimit","type":"uint248"},{"indexed":false,"internalType":"uint104","name":"cooldown","type":"uint104"}],"name":"StakeParametersUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensRescued","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentEpoch","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"newEpoch","type":"uint8"}],"name":"setEpoch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint104","name":"amount","type":"uint104"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakeParametersByToken","outputs":[{"internalType":"uint8","name":"epoch","type":"uint8"},{"internalType":"uint248","name":"stakeLimit","type":"uint248"},{"internalType":"uint104","name":"totalStaked","type":"uint104"},{"internalType":"uint104","name":"totalCoolingDown","type":"uint104"},{"internalType":"uint48","name":"cooldown","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"stakes","outputs":[{"internalType":"uint256","name":"stakedAmount","type":"uint256"},{"internalType":"uint152","name":"coolingDownAmount","type":"uint152"},{"internalType":"uint104","name":"cooldownStartTimestamp","type":"uint104"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint104","name":"amount","type":"uint104"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint8","name":"epoch","type":"uint8"},{"internalType":"uint248","name":"stakeLimit","type":"uint248"},{"internalType":"uint48","name":"cooldown","type":"uint48"}],"name":"updateStakeParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint104","name":"amount","type":"uint104"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801562000010575f80fd5b5060405162001d7638038062001d768339810160408190526200003391620000ea565b6200003e336200007d565b60016002556001600160a01b0381166200006b57604051635919af9760e11b815260040160405180910390fd5b62000076816200007d565b5062000119565b600180546001600160a01b031916905562000098816200009b565b50565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f60208284031215620000fb575f80fd5b81516001600160a01b038116811462000112575f80fd5b9392505050565b611c4f80620001275f395ff3fe608060405234801561000f575f80fd5b50600436106100e5575f3560e01c8063a4e47b6611610088578063cea9d26f11610063578063cea9d26f14610268578063e30c39781461027b578063e76c3f5514610299578063f2fde38b1461039e575f80fd5b8063a4e47b6614610196578063b3dd411d14610242578063b5a2e01b14610255575f80fd5b8063715018a6116100c3578063715018a614610124578063766718081461012c57806379ba5097146101505780638da5cb5b14610158575f80fd5b806317105417146100e957806321ec52b4146100fe5780636ab498a314610111575b5f80fd5b6100fc6100f73660046118e7565b6103b1565b005b6100fc61010c366004611969565b610517565b6100fc61011f366004611969565b6107ca565b6100fc610acf565b6003546101399060ff1681565b60405160ff90911681526020015b60405180910390f35b6100fc610b09565b5f5473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610147565b6102046101a43660046119af565b600460209081525f92835260408084209091529082529020805460019091015472ffffffffffffffffffffffffffffffffffffff81169073010000000000000000000000000000000000000090046cffffffffffffffffffffffffff1683565b6040805193845272ffffffffffffffffffffffffffffffffffffff90921660208401526cffffffffffffffffffffffffff1690820152606001610147565b6100fc610250366004611969565b610bc3565b6100fc6102633660046119e0565b610e40565b6100fc610276366004611a00565b610ef2565b60015473ffffffffffffffffffffffffffffffffffffffff16610171565b6103386102a7366004611a39565b60056020525f90815260409020805460019091015460ff82169161010090047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16906cffffffffffffffffffffffffff808216916d01000000000000000000000000008104909116907a010000000000000000000000000000000000000000000000000000900465ffffffffffff1685565b6040805160ff90961686527effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90941660208601526cffffffffffffffffffffffffff9283169385019390935216606083015265ffffffffffff16608082015260a001610147565b6100fc6103ac366004611a39565b611103565b6103b96111b2565b6276a70065ffffffffffff821611156103fe576040517f97e2d36d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84165f81815260056020526040908190207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85166101000260ff8716908117825560018201805465ffffffffffff87167a0100000000000000000000000000000000000000000000000000000279ffffffffffffffffffffffffffffffffffffffffffffffffffff90911617905591519092907fe9ea56618d31afea8558726ec90e5fef0c46d19e0674b8462b208da51359ed799061050890879087907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92909216825265ffffffffffff16602082015260400190565b60405180910390a35050505050565b61051f611234565b806cffffffffffffffffffffffffff16805f03610568576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f8181526005602090815260408083203384526004835281842094845293909152902080546cffffffffffffffffffffffffff851611156105ec576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836cffffffffffffffffffffffffff16815f015f82825461060d9190611a7f565b90915550506001810180546cffffffffffffffffffffffffff861691905f9061064c90849072ffffffffffffffffffffffffffffffffffffff16611a98565b825472ffffffffffffffffffffffffffffffffffffff9182166101009390930a928302928202191691909117909155600183810180546cffffffffffffffffffffffffff42811673010000000000000000000000000000000000000002919094161790558401805487935090915f916106c791859116611acb565b92506101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff1602179055508382600101600d8282829054906101000a90046cffffffffffffffffffffffffff166107239190611af1565b92506101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff16021790555061075c856112a5565b6040516cffffffffffffffffffffffffff8516815273ffffffffffffffffffffffffffffffffffffffff86169033907f390b1276974b9463e5d66ab10df69b6f3d7b930eb066a0e66df327edd2cc811c906020015b60405180910390a35050506107c66001600255565b5050565b6107d2611234565b806cffffffffffffffffffffffffff16805f0361081b576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f8181526005602090815260408083203384526004835281842094845293909152902060018101546cffffffffffffffffffffffffff851672ffffffffffffffffffffffffffffffffffffff90911610156108b9576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018281015490820154610919917a010000000000000000000000000000000000000000000000000000900465ffffffffffff169073010000000000000000000000000000000000000090046cffffffffffffffffffffffffff16611af1565b6cffffffffffffffffffffffffff16421015610961576040517fae04b1c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810180546cffffffffffffffffffffffffff861691905f9061099b90849072ffffffffffffffffffffffffffffffffffffff16611b17565b92506101000a81548172ffffffffffffffffffffffffffffffffffffff021916908372ffffffffffffffffffffffffffffffffffffff1602179055508382600101600d8282829054906101000a90046cffffffffffffffffffffffffff16610a039190611acb565b92506101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff160217905550610a6d33856cffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff166113bc9092919063ffffffff16565b610a76856112a5565b6040516cffffffffffffffffffffffffff8516815273ffffffffffffffffffffffffffffffffffffffff86169033907f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb906020016107b1565b610ad76111b2565b6040517f185b73b100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600154339073ffffffffffffffffffffffffffffffffffffffff168114610bb7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610bc081611490565b50565b610bcb611234565b806cffffffffffffffffffffffffff16805f03610c14576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f908152600560205260409020805460035460ff908116911614610c7b576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460018201546101009091047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690610cc49085906cffffffffffffffffffffffffff16611af1565b6cffffffffffffffffffffffffff161115610d0b576040517ff897f62800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810180548491905f90610d309084906cffffffffffffffffffffffffff16611af1565b82546101009290920a6cffffffffffffffffffffffffff818102199093169183160217909155335f90815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8a16845290915281208054928716935091610d98908490611b43565b90915550610dcf905073ffffffffffffffffffffffffffffffffffffffff851633306cffffffffffffffffffffffffff87166114c1565b610dd8846112a5565b6040516cffffffffffffffffffffffffff8416815273ffffffffffffffffffffffffffffffffffffffff85169033907f99039fcf0a98f484616c5196ee8b2ecfa971babf0b519848289ea4db381f85f79060200160405180910390a350506107c66001600255565b610e486111b2565b60035460ff90811690821603610e8a576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035460405160ff918216918316907f168c41a8a7f5d81176dd8b849fe1dd8791803a3b75f63bd1987452a09385b90a905f90a3600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff92909216919091179055565b610efa6111b2565b610f02611234565b80805f03610f3c576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316610f89576040517fb2335f2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff851601611062575f8373ffffffffffffffffffffffffffffffffffffffff16836040515f6040518083038185875af1925050503d805f811461101c576040519150601f19603f3d011682016040523d82523d5f602084013e611021565b606091505b505090508061105c576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061108c565b61108373ffffffffffffffffffffffffffffffffffffffff851684846113bc565b61108c846112a5565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f77023e19c7343ad491fd706c36335ca0e738340a91f29b1fd81e2673d44896c4846040516110eb91815260200190565b60405180910390a3506110fe6001600255565b505050565b61110b6111b2565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915561116d5f5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b5f5473ffffffffffffffffffffffffffffffffffffffff163314611232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bae565b565b600280540361129f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bae565b60028055565b73ffffffffffffffffffffffffffffffffffffffff81165f8181526005602052604080822090517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529092906370a0823190602401602060405180830381865afa15801561131c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113409190611b56565b6001830154909150611374906cffffffffffffffffffffffffff6d0100000000000000000000000000820481169116611af1565b6cffffffffffffffffffffffffff168110156110fe576040517fb215190700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526110fe9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611525565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610bc081611632565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261151f9085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161140e565b50505050565b5f611586826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166116a69092919063ffffffff16565b905080515f14806115a65750808060200190518101906115a69190611b6d565b6110fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610bae565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60606116b484845f856116bc565b949350505050565b60608247101561174e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610bae565b5f808673ffffffffffffffffffffffffffffffffffffffff1685876040516117769190611bae565b5f6040518083038185875af1925050503d805f81146117b0576040519150601f19603f3d011682016040523d82523d5f602084013e6117b5565b606091505b50915091506117c6878383876117d1565b979650505050505050565b606083156118665782515f0361185f5773ffffffffffffffffffffffffffffffffffffffff85163b61185f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610bae565b50816116b4565b6116b4838381511561187b5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bae9190611bc9565b803573ffffffffffffffffffffffffffffffffffffffff811681146118d2575f80fd5b919050565b803560ff811681146118d2575f80fd5b5f805f80608085870312156118fa575f80fd5b611903856118af565b9350611911602086016118d7565b925060408501357effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168114611944575f80fd5b9150606085013565ffffffffffff8116811461195e575f80fd5b939692955090935050565b5f806040838503121561197a575f80fd5b611983836118af565b915060208301356cffffffffffffffffffffffffff811681146119a4575f80fd5b809150509250929050565b5f80604083850312156119c0575f80fd5b6119c9836118af565b91506119d7602084016118af565b90509250929050565b5f602082840312156119f0575f80fd5b6119f9826118d7565b9392505050565b5f805f60608486031215611a12575f80fd5b611a1b846118af565b9250611a29602085016118af565b9150604084013590509250925092565b5f60208284031215611a49575f80fd5b6119f9826118af565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115611a9257611a92611a52565b92915050565b72ffffffffffffffffffffffffffffffffffffff818116838216019080821115611ac457611ac4611a52565b5092915050565b6cffffffffffffffffffffffffff828116828216039080821115611ac457611ac4611a52565b6cffffffffffffffffffffffffff818116838216019080821115611ac457611ac4611a52565b72ffffffffffffffffffffffffffffffffffffff828116828216039080821115611ac457611ac4611a52565b80820180821115611a9257611a92611a52565b5f60208284031215611b66575f80fd5b5051919050565b5f60208284031215611b7d575f80fd5b815180151581146119f9575f80fd5b5f5b83811015611ba6578181015183820152602001611b8e565b50505f910152565b5f8251611bbf818460208701611b8c565b9190910192915050565b602081525f8251806020840152611be7816040850160208701611b8c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea264697066735822122067657973fc1ef5bedb641d3d4db5ea1ef0ec154f72e0744603d4381d862bbc3264736f6c634300081400330000000000000000000000003aa3fd1b762cac519d405297ce630bed30430b00

Deployed Bytecode

0x608060405234801561000f575f80fd5b50600436106100e5575f3560e01c8063a4e47b6611610088578063cea9d26f11610063578063cea9d26f14610268578063e30c39781461027b578063e76c3f5514610299578063f2fde38b1461039e575f80fd5b8063a4e47b6614610196578063b3dd411d14610242578063b5a2e01b14610255575f80fd5b8063715018a6116100c3578063715018a614610124578063766718081461012c57806379ba5097146101505780638da5cb5b14610158575f80fd5b806317105417146100e957806321ec52b4146100fe5780636ab498a314610111575b5f80fd5b6100fc6100f73660046118e7565b6103b1565b005b6100fc61010c366004611969565b610517565b6100fc61011f366004611969565b6107ca565b6100fc610acf565b6003546101399060ff1681565b60405160ff90911681526020015b60405180910390f35b6100fc610b09565b5f5473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610147565b6102046101a43660046119af565b600460209081525f92835260408084209091529082529020805460019091015472ffffffffffffffffffffffffffffffffffffff81169073010000000000000000000000000000000000000090046cffffffffffffffffffffffffff1683565b6040805193845272ffffffffffffffffffffffffffffffffffffff90921660208401526cffffffffffffffffffffffffff1690820152606001610147565b6100fc610250366004611969565b610bc3565b6100fc6102633660046119e0565b610e40565b6100fc610276366004611a00565b610ef2565b60015473ffffffffffffffffffffffffffffffffffffffff16610171565b6103386102a7366004611a39565b60056020525f90815260409020805460019091015460ff82169161010090047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16906cffffffffffffffffffffffffff808216916d01000000000000000000000000008104909116907a010000000000000000000000000000000000000000000000000000900465ffffffffffff1685565b6040805160ff90961686527effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90941660208601526cffffffffffffffffffffffffff9283169385019390935216606083015265ffffffffffff16608082015260a001610147565b6100fc6103ac366004611a39565b611103565b6103b96111b2565b6276a70065ffffffffffff821611156103fe576040517f97e2d36d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84165f81815260056020526040908190207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85166101000260ff8716908117825560018201805465ffffffffffff87167a0100000000000000000000000000000000000000000000000000000279ffffffffffffffffffffffffffffffffffffffffffffffffffff90911617905591519092907fe9ea56618d31afea8558726ec90e5fef0c46d19e0674b8462b208da51359ed799061050890879087907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92909216825265ffffffffffff16602082015260400190565b60405180910390a35050505050565b61051f611234565b806cffffffffffffffffffffffffff16805f03610568576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f8181526005602090815260408083203384526004835281842094845293909152902080546cffffffffffffffffffffffffff851611156105ec576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836cffffffffffffffffffffffffff16815f015f82825461060d9190611a7f565b90915550506001810180546cffffffffffffffffffffffffff861691905f9061064c90849072ffffffffffffffffffffffffffffffffffffff16611a98565b825472ffffffffffffffffffffffffffffffffffffff9182166101009390930a928302928202191691909117909155600183810180546cffffffffffffffffffffffffff42811673010000000000000000000000000000000000000002919094161790558401805487935090915f916106c791859116611acb565b92506101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff1602179055508382600101600d8282829054906101000a90046cffffffffffffffffffffffffff166107239190611af1565b92506101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff16021790555061075c856112a5565b6040516cffffffffffffffffffffffffff8516815273ffffffffffffffffffffffffffffffffffffffff86169033907f390b1276974b9463e5d66ab10df69b6f3d7b930eb066a0e66df327edd2cc811c906020015b60405180910390a35050506107c66001600255565b5050565b6107d2611234565b806cffffffffffffffffffffffffff16805f0361081b576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f8181526005602090815260408083203384526004835281842094845293909152902060018101546cffffffffffffffffffffffffff851672ffffffffffffffffffffffffffffffffffffff90911610156108b9576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018281015490820154610919917a010000000000000000000000000000000000000000000000000000900465ffffffffffff169073010000000000000000000000000000000000000090046cffffffffffffffffffffffffff16611af1565b6cffffffffffffffffffffffffff16421015610961576040517fae04b1c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810180546cffffffffffffffffffffffffff861691905f9061099b90849072ffffffffffffffffffffffffffffffffffffff16611b17565b92506101000a81548172ffffffffffffffffffffffffffffffffffffff021916908372ffffffffffffffffffffffffffffffffffffff1602179055508382600101600d8282829054906101000a90046cffffffffffffffffffffffffff16610a039190611acb565b92506101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff160217905550610a6d33856cffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff166113bc9092919063ffffffff16565b610a76856112a5565b6040516cffffffffffffffffffffffffff8516815273ffffffffffffffffffffffffffffffffffffffff86169033907f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb906020016107b1565b610ad76111b2565b6040517f185b73b100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600154339073ffffffffffffffffffffffffffffffffffffffff168114610bb7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610bc081611490565b50565b610bcb611234565b806cffffffffffffffffffffffffff16805f03610c14576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f908152600560205260409020805460035460ff908116911614610c7b576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805460018201546101009091047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690610cc49085906cffffffffffffffffffffffffff16611af1565b6cffffffffffffffffffffffffff161115610d0b576040517ff897f62800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810180548491905f90610d309084906cffffffffffffffffffffffffff16611af1565b82546101009290920a6cffffffffffffffffffffffffff818102199093169183160217909155335f90815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8a16845290915281208054928716935091610d98908490611b43565b90915550610dcf905073ffffffffffffffffffffffffffffffffffffffff851633306cffffffffffffffffffffffffff87166114c1565b610dd8846112a5565b6040516cffffffffffffffffffffffffff8416815273ffffffffffffffffffffffffffffffffffffffff85169033907f99039fcf0a98f484616c5196ee8b2ecfa971babf0b519848289ea4db381f85f79060200160405180910390a350506107c66001600255565b610e486111b2565b60035460ff90811690821603610e8a576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035460405160ff918216918316907f168c41a8a7f5d81176dd8b849fe1dd8791803a3b75f63bd1987452a09385b90a905f90a3600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff92909216919091179055565b610efa6111b2565b610f02611234565b80805f03610f3c576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316610f89576040517fb2335f2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff851601611062575f8373ffffffffffffffffffffffffffffffffffffffff16836040515f6040518083038185875af1925050503d805f811461101c576040519150601f19603f3d011682016040523d82523d5f602084013e611021565b606091505b505090508061105c576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061108c565b61108373ffffffffffffffffffffffffffffffffffffffff851684846113bc565b61108c846112a5565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f77023e19c7343ad491fd706c36335ca0e738340a91f29b1fd81e2673d44896c4846040516110eb91815260200190565b60405180910390a3506110fe6001600255565b505050565b61110b6111b2565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915561116d5f5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b5f5473ffffffffffffffffffffffffffffffffffffffff163314611232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bae565b565b600280540361129f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bae565b60028055565b73ffffffffffffffffffffffffffffffffffffffff81165f8181526005602052604080822090517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529092906370a0823190602401602060405180830381865afa15801561131c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113409190611b56565b6001830154909150611374906cffffffffffffffffffffffffff6d0100000000000000000000000000820481169116611af1565b6cffffffffffffffffffffffffff168110156110fe576040517fb215190700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526110fe9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611525565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610bc081611632565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261151f9085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161140e565b50505050565b5f611586826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166116a69092919063ffffffff16565b905080515f14806115a65750808060200190518101906115a69190611b6d565b6110fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610bae565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60606116b484845f856116bc565b949350505050565b60608247101561174e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610bae565b5f808673ffffffffffffffffffffffffffffffffffffffff1685876040516117769190611bae565b5f6040518083038185875af1925050503d805f81146117b0576040519150601f19603f3d011682016040523d82523d5f602084013e6117b5565b606091505b50915091506117c6878383876117d1565b979650505050505050565b606083156118665782515f0361185f5773ffffffffffffffffffffffffffffffffffffffff85163b61185f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610bae565b50816116b4565b6116b4838381511561187b5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bae9190611bc9565b803573ffffffffffffffffffffffffffffffffffffffff811681146118d2575f80fd5b919050565b803560ff811681146118d2575f80fd5b5f805f80608085870312156118fa575f80fd5b611903856118af565b9350611911602086016118d7565b925060408501357effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168114611944575f80fd5b9150606085013565ffffffffffff8116811461195e575f80fd5b939692955090935050565b5f806040838503121561197a575f80fd5b611983836118af565b915060208301356cffffffffffffffffffffffffff811681146119a4575f80fd5b809150509250929050565b5f80604083850312156119c0575f80fd5b6119c9836118af565b91506119d7602084016118af565b90509250929050565b5f602082840312156119f0575f80fd5b6119f9826118d7565b9392505050565b5f805f60608486031215611a12575f80fd5b611a1b846118af565b9250611a29602085016118af565b9150604084013590509250925092565b5f60208284031215611a49575f80fd5b6119f9826118af565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115611a9257611a92611a52565b92915050565b72ffffffffffffffffffffffffffffffffffffff818116838216019080821115611ac457611ac4611a52565b5092915050565b6cffffffffffffffffffffffffff828116828216039080821115611ac457611ac4611a52565b6cffffffffffffffffffffffffff818116838216019080821115611ac457611ac4611a52565b72ffffffffffffffffffffffffffffffffffffff828116828216039080821115611ac457611ac4611a52565b80820180821115611a9257611a92611a52565b5f60208284031215611b66575f80fd5b5051919050565b5f60208284031215611b7d575f80fd5b815180151581146119f9575f80fd5b5f5b83811015611ba6578181015183820152602001611b8e565b50505f910152565b5f8251611bbf818460208701611b8c565b9190910192915050565b602081525f8251806020840152611be7816040850160208701611b8c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea264697066735822122067657973fc1ef5bedb641d3d4db5ea1ef0ec154f72e0744603d4381d862bbc3264736f6c63430008140033

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

0000000000000000000000003aa3fd1b762cac519d405297ce630bed30430b00

-----Decoded View---------------
Arg [0] : _initialOwner (address): 0x3Aa3Fd1B762CaC519D405297CE630beD30430b00

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003aa3fd1b762cac519d405297ce630bed30430b00


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  ]

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.