ETH Price: $2,516.04 (-0.27%)

Contract

0x80B73eF4534FE245300017A5197451973559c00f
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Stake210941412024-11-01 16:58:231 hr ago1730480303IN
0x80B73eF4...73559c00f
0 ETH0.0014698718.12243716
Stake210938892024-11-01 16:07:352 hrs ago1730477255IN
0x80B73eF4...73559c00f
0 ETH0.0018566520.31794194
Stake210936362024-11-01 15:16:473 hrs ago1730474207IN
0x80B73eF4...73559c00f
0 ETH0.0015967518.57293814
Stake210932202024-11-01 13:53:354 hrs ago1730469215IN
0x80B73eF4...73559c00f
0 ETH0.0013415514.68487333
Stake210927192024-11-01 12:12:476 hrs ago1730463167IN
0x80B73eF4...73559c00f
0 ETH0.000748519.22992649
Stake210924402024-11-01 11:16:477 hrs ago1730459807IN
0x80B73eF4...73559c00f
0 ETH0.000566496.5901628
Stake210924342024-11-01 11:15:357 hrs ago1730459735IN
0x80B73eF4...73559c00f
0 ETH0.000452835.58559903
Stake210921742024-11-01 10:23:118 hrs ago1730456591IN
0x80B73eF4...73559c00f
0 ETH0.000493255.73664511
Stake210919992024-11-01 9:48:118 hrs ago1730454491IN
0x80B73eF4...73559c00f
0 ETH0.0004845.96919791
Stake210913052024-11-01 7:28:5911 hrs ago1730446139IN
0x80B73eF4...73559c00f
0 ETH0.000645457.06337086
Stake210909182024-11-01 6:11:1112 hrs ago1730441471IN
0x80B73eF4...73559c00f
0 ETH0.0003755.41671585
Stake210908762024-11-01 6:02:4712 hrs ago1730440967IN
0x80B73eF4...73559c00f
0 ETH0.000364214.49110318
Unstake210908062024-11-01 5:48:3512 hrs ago1730440115IN
0x80B73eF4...73559c00f
0 ETH0.000369935.43828936
Stake210907082024-11-01 5:28:4713 hrs ago1730438927IN
0x80B73eF4...73559c00f
0 ETH0.00049545.73769409
Stake210906012024-11-01 5:07:2313 hrs ago1730437643IN
0x80B73eF4...73559c00f
0 ETH0.000479775.25167229
Stake210905202024-11-01 4:51:1113 hrs ago1730436671IN
0x80B73eF4...73559c00f
0 ETH0.000465865.09808098
Stake210902942024-11-01 4:05:5914 hrs ago1730433959IN
0x80B73eF4...73559c00f
0 ETH0.000525736.11515082
Stake210899842024-11-01 3:03:5915 hrs ago1730430239IN
0x80B73eF4...73559c00f
0 ETH0.000575016.29421106
Stake210898602024-11-01 2:38:4715 hrs ago1730428727IN
0x80B73eF4...73559c00f
0 ETH0.000532587.69025857
Stake210897912024-11-01 2:24:5916 hrs ago1730427899IN
0x80B73eF4...73559c00f
0 ETH0.0009432110.92255164
Stake210894442024-11-01 1:15:1117 hrs ago1730423711IN
0x80B73eF4...73559c00f
0 ETH0.0005286.50572361
Stake210894122024-11-01 1:08:4717 hrs ago1730423327IN
0x80B73eF4...73559c00f
0 ETH0.000475235.85464035
Stake210888822024-10-31 23:22:4719 hrs ago1730416967IN
0x80B73eF4...73559c00f
0 ETH0.00051965.68617896
Stake210888102024-10-31 23:08:2319 hrs ago1730416103IN
0x80B73eF4...73559c00f
0 ETH0.000481955.58189331
Stake210887582024-10-31 22:57:4719 hrs ago1730415467IN
0x80B73eF4...73559c00f
0 ETH0.000579547.14073165
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:
LevelUsdPointsFarm

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
No with 200 runs

Other Settings:
paris EvmVersion
File 1 of 10 : LevelUsdPointsFarm.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.24;

import "@openzeppelin/contracts/access/Ownable2Step.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "./interface/ILevelUsdPointsFarm.sol";

/**
 * @title LevelUsdPointsFarm
 * Forked from EthenaLPStaking
 * @notice Allows users to deposit tokens (including LP tokens) to earn
 * Level XP; also includes a cooldown period set by the admin
 * to control for withdrawals when redemptions are gated.
 */

contract LevelUsdPointsFarm is
    Ownable2Step,
    ILevelUsdPointsFarm,
    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) Ownable(_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 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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 3 of 10 : Ownable2Step.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.20;

import {Ownable} from "./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.
 *
 * The initial owner is specified at deployment time in the constructor for `Ownable`. 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();
        if (pendingOwner() != sender) {
            revert OwnableUnauthorizedAccount(sender);
        }
        _transferOwnership(sender);
    }
}

File 4 of 10 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @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 5 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

File 6 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../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 An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, 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);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @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.encodeCall(token.approve, (spender, value));

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

    /**
     * @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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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(token).code.length > 0;
    }
}

File 7 of 10 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) 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 FailedInnerCall();
        }
    }
}

File 8 of 10 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @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 9 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

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

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    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
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // 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 10 of 10 : ILevelUsdPointsFarm.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.24;

interface ILevelUsdPointsFarm {
    /// @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();
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_initialOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"CantRenounceOwnership","type":"error"},{"inputs":[],"name":"CooldownNotOver","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"InvalidEpoch","type":"error"},{"inputs":[],"name":"InvariantBroken","type":"error"},{"inputs":[],"name":"MaxCooldownExceeded","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","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"}]

60806040523480156200001157600080fd5b5060405162002736380380620027368339818101604052810190620000379190620002ad565b80600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000ad5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620000a49190620002f0565b60405180910390fd5b620000be816200014660201b60201c565b506001600281905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036200012e576040517fb2335f2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200013f816200014660201b60201c565b506200030d565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556200017c816200017f60201b60201c565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002758262000248565b9050919050565b620002878162000268565b81146200029357600080fd5b50565b600081519050620002a7816200027c565b92915050565b600060208284031215620002c657620002c562000243565b5b6000620002d68482850162000296565b91505092915050565b620002ea8162000268565b82525050565b6000602082019050620003076000830184620002df565b92915050565b612419806200031d6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063a4e47b661161008c578063cea9d26f11610066578063cea9d26f146101fd578063e30c397814610219578063e76c3f5514610237578063f2fde38b1461026b576100ea565b8063a4e47b6614610193578063b3dd411d146101c5578063b5a2e01b146101e1576100ea565b8063715018a6116100c8578063715018a614610143578063766718081461014d57806379ba50971461016b5780638da5cb5b14610175576100ea565b806317105417146100ef57806321ec52b41461010b5780636ab498a314610127575b600080fd5b61010960048036038101906101049190611c50565b610287565b005b61012560048036038101906101209190611cfc565b610417565b005b610141600480360381019061013c9190611cfc565b61078a565b005b61014b610b3f565b005b610155610b79565b6040516101629190611d4b565b60405180910390f35b610173610b8c565b005b61017d610c1b565b60405161018a9190611d75565b60405180910390f35b6101ad60048036038101906101a89190611d90565b610c44565b6040516101bc93929190611e26565b60405180910390f35b6101df60048036038101906101da9190611cfc565b610cb3565b005b6101fb60048036038101906101f69190611e5d565b611021565b005b61021760048036038101906102129190611eb6565b6110d8565b005b610221611321565b60405161022e9190611d75565b60405180910390f35b610251600480360381019061024c9190611f09565b61134b565b604051610262959493929190611f54565b60405180910390f35b61028560048036038101906102809190611f09565b6113fd565b005b61028f6114aa565b6276a70065ffffffffffff168165ffffffffffff1611156102dc576040517f97e2d36d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050838160000160006101000a81548160ff021916908360ff160217905550828160000160016101000a8154817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1602179055508181600101601a6101000a81548165ffffffffffff021916908365ffffffffffff1602179055508360ff168573ffffffffffffffffffffffffffffffffffffffff167fe9ea56618d31afea8558726ec90e5fef0c46d19e0674b8462b208da51359ed798585604051610408929190611fe2565b60405180910390a35050505050565b61041f611531565b806cffffffffffffffffffffffffff1660008103610469576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050836cffffffffffffffffffffffffff1681600001541015610579576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836cffffffffffffffffffffffffff1681600001600082825461059c919061203a565b92505081905550836cffffffffffffffffffffffffff168160010160008282829054906101000a900472ffffffffffffffffffffffffffffffffffffff166105e4919061206e565b92506101000a81548172ffffffffffffffffffffffffffffffffffffff021916908372ffffffffffffffffffffffffffffffffffffff160217905550428160010160136101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff160217905550838260010160008282829054906101000a90046cffffffffffffffffffffffffff1661068191906120b5565b92506101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff1602179055508382600101600d8282829054906101000a90046cffffffffffffffffffffffffff166106dd91906120f6565b92506101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff16021790555061071685611575565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f390b1276974b9463e5d66ab10df69b6f3d7b930eb066a0e66df327edd2cc811c866040516107739190612168565b60405180910390a35050506107866116c9565b5050565b610792611531565b806cffffffffffffffffffffffffff16600081036107dc576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050836cffffffffffffffffffffffffff168160010160009054906101000a900472ffffffffffffffffffffffffffffffffffffff1672ffffffffffffffffffffffffffffffffffffff161015610920576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600101601a9054906101000a900465ffffffffffff1665ffffffffffff168160010160139054906101000a90046cffffffffffffffffffffffffff1661096791906120f6565b6cffffffffffffffffffffffffff164210156109af576040517fae04b1c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836cffffffffffffffffffffffffff168160010160008282829054906101000a900472ffffffffffffffffffffffffffffffffffffff166109f09190612183565b92506101000a81548172ffffffffffffffffffffffffffffffffffffff021916908372ffffffffffffffffffffffffffffffffffffff1602179055508382600101600d8282829054906101000a90046cffffffffffffffffffffffffff16610a5891906120b5565b92506101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff160217905550610ac233856cffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff166116d39092919063ffffffff16565b610acb85611575565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb86604051610b289190612168565b60405180910390a3505050610b3b6116c9565b5050565b610b476114aa565b6040517f185b73b100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360009054906101000a900460ff1681565b6000610b96611752565b90508073ffffffffffffffffffffffffffffffffffffffff16610bb7611321565b73ffffffffffffffffffffffffffffffffffffffff1614610c0f57806040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610c069190611d75565b60405180910390fd5b610c188161175a565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6004602052816000526040600020602052806000526040600020600091509150508060000154908060010160009054906101000a900472ffffffffffffffffffffffffffffffffffffff16908060010160139054906101000a90046cffffffffffffffffffffffffff16905083565b610cbb611531565b806cffffffffffffffffffffffffff1660008103610d05576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff1660ff16600360009054906101000a900460ff1660ff1614610da7576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060000160019054906101000a90047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16838260010160009054906101000a90046cffffffffffffffffffffffffff16610e2191906120f6565b6cffffffffffffffffffffffffff161115610e68576040517ff897f62800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828160010160008282829054906101000a90046cffffffffffffffffffffffffff16610e9491906120f6565b92506101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff160217905550826cffffffffffffffffffffffffff16600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000828254610f6291906121ca565b92505081905550610fa53330856cffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1661178b909392919063ffffffff16565b610fae84611575565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f99039fcf0a98f484616c5196ee8b2ecfa971babf0b519848289ea4db381f85f78560405161100b9190612168565b60405180910390a3505061101d6116c9565b5050565b6110296114aa565b600360009054906101000a900460ff1660ff168160ff1603611077576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360009054906101000a900460ff1660ff168160ff167f168c41a8a7f5d81176dd8b849fe1dd8791803a3b75f63bd1987452a09385b90a60405160405180910390a380600360006101000a81548160ff021916908360ff16021790555050565b6110e06114aa565b6110e8611531565b8060008103611123576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611189576040517fb2335f2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036112795760008373ffffffffffffffffffffffffffffffffffffffff16836040516111f69061222f565b60006040518083038185875af1925050503d8060008114611233576040519150601f19603f3d011682016040523d82523d6000602084013e611238565b606091505b5050905080611273576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506112ae565b6112a483838673ffffffffffffffffffffffffffffffffffffffff166116d39092919063ffffffff16565b6112ad84611575565b5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f77023e19c7343ad491fd706c36335ca0e738340a91f29b1fd81e2673d44896c48460405161130b9190612244565b60405180910390a35061131c6116c9565b505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60056020528060005260406000206000915090508060000160009054906101000a900460ff16908060000160019054906101000a90047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a90046cffffffffffffffffffffffffff169080600101600d9054906101000a90046cffffffffffffffffffffffffff169080600101601a9054906101000a900465ffffffffffff16905085565b6114056114aa565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16611465610c1b565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6114b2611752565b73ffffffffffffffffffffffffffffffffffffffff166114d0610c1b565b73ffffffffffffffffffffffffffffffffffffffff161461152f576114f3611752565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016115269190611d75565b60405180910390fd5b565b600280540361156c576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028081905550565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016115f39190611d75565b602060405180830381865afa158015611610573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116349190612274565b905081600101600d9054906101000a90046cffffffffffffffffffffffffff168260010160009054906101000a90046cffffffffffffffffffffffffff1661167c91906120f6565b6cffffffffffffffffffffffffff168110156116c4576040517fb215190700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6001600281905550565b61174d838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016117069291906122a1565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061180d565b505050565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055611788816118a4565b50565b611807848573ffffffffffffffffffffffffffffffffffffffff166323b872dd8686866040516024016117c0939291906122ca565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061180d565b50505050565b6000611838828473ffffffffffffffffffffffffffffffffffffffff1661196890919063ffffffff16565b9050600081511415801561185d57508080602001905181019061185b9190612339565b155b1561189f57826040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016118969190611d75565b60405180910390fd5b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60606119768383600061197e565b905092915050565b6060814710156119c557306040517fcd7860590000000000000000000000000000000000000000000000000000000081526004016119bc9190611d75565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1684866040516119ee91906123cc565b60006040518083038185875af1925050503d8060008114611a2b576040519150601f19603f3d011682016040523d82523d6000602084013e611a30565b606091505b5091509150611a40868383611a4b565b925050509392505050565b606082611a6057611a5b82611ada565b611ad2565b60008251148015611a88575060008473ffffffffffffffffffffffffffffffffffffffff163b145b15611aca57836040517f9996b315000000000000000000000000000000000000000000000000000000008152600401611ac19190611d75565b60405180910390fd5b819050611ad3565b5b9392505050565b600081511115611aed5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611b4f82611b24565b9050919050565b611b5f81611b44565b8114611b6a57600080fd5b50565b600081359050611b7c81611b56565b92915050565b600060ff82169050919050565b611b9881611b82565b8114611ba357600080fd5b50565b600081359050611bb581611b8f565b92915050565b60007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82169050919050565b611bef81611bbb565b8114611bfa57600080fd5b50565b600081359050611c0c81611be6565b92915050565b600065ffffffffffff82169050919050565b611c2d81611c12565b8114611c3857600080fd5b50565b600081359050611c4a81611c24565b92915050565b60008060008060808587031215611c6a57611c69611b1f565b5b6000611c7887828801611b6d565b9450506020611c8987828801611ba6565b9350506040611c9a87828801611bfd565b9250506060611cab87828801611c3b565b91505092959194509250565b60006cffffffffffffffffffffffffff82169050919050565b611cd981611cb7565b8114611ce457600080fd5b50565b600081359050611cf681611cd0565b92915050565b60008060408385031215611d1357611d12611b1f565b5b6000611d2185828601611b6d565b9250506020611d3285828601611ce7565b9150509250929050565b611d4581611b82565b82525050565b6000602082019050611d606000830184611d3c565b92915050565b611d6f81611b44565b82525050565b6000602082019050611d8a6000830184611d66565b92915050565b60008060408385031215611da757611da6611b1f565b5b6000611db585828601611b6d565b9250506020611dc685828601611b6d565b9150509250929050565b6000819050919050565b611de381611dd0565b82525050565b600072ffffffffffffffffffffffffffffffffffffff82169050919050565b611e1181611de9565b82525050565b611e2081611cb7565b82525050565b6000606082019050611e3b6000830186611dda565b611e486020830185611e08565b611e556040830184611e17565b949350505050565b600060208284031215611e7357611e72611b1f565b5b6000611e8184828501611ba6565b91505092915050565b611e9381611dd0565b8114611e9e57600080fd5b50565b600081359050611eb081611e8a565b92915050565b600080600060608486031215611ecf57611ece611b1f565b5b6000611edd86828701611b6d565b9350506020611eee86828701611b6d565b9250506040611eff86828701611ea1565b9150509250925092565b600060208284031215611f1f57611f1e611b1f565b5b6000611f2d84828501611b6d565b91505092915050565b611f3f81611bbb565b82525050565b611f4e81611c12565b82525050565b600060a082019050611f696000830188611d3c565b611f766020830187611f36565b611f836040830186611e17565b611f906060830185611e17565b611f9d6080830184611f45565b9695505050505050565b6000819050919050565b6000611fcc611fc7611fc284611c12565b611fa7565b611cb7565b9050919050565b611fdc81611fb1565b82525050565b6000604082019050611ff76000830185611f36565b6120046020830184611fd3565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061204582611dd0565b915061205083611dd0565b92508282039050818111156120685761206761200b565b5b92915050565b600061207982611de9565b915061208483611de9565b9250828201905072ffffffffffffffffffffffffffffffffffffff8111156120af576120ae61200b565b5b92915050565b60006120c082611cb7565b91506120cb83611cb7565b925082820390506cffffffffffffffffffffffffff8111156120f0576120ef61200b565b5b92915050565b600061210182611cb7565b915061210c83611cb7565b925082820190506cffffffffffffffffffffffffff8111156121315761213061200b565b5b92915050565b600061215261214d61214884611cb7565b611fa7565b611dd0565b9050919050565b61216281612137565b82525050565b600060208201905061217d6000830184612159565b92915050565b600061218e82611de9565b915061219983611de9565b9250828203905072ffffffffffffffffffffffffffffffffffffff8111156121c4576121c361200b565b5b92915050565b60006121d582611dd0565b91506121e083611dd0565b92508282019050808211156121f8576121f761200b565b5b92915050565b600081905092915050565b50565b60006122196000836121fe565b915061222482612209565b600082019050919050565b600061223a8261220c565b9150819050919050565b60006020820190506122596000830184611dda565b92915050565b60008151905061226e81611e8a565b92915050565b60006020828403121561228a57612289611b1f565b5b60006122988482850161225f565b91505092915050565b60006040820190506122b66000830185611d66565b6122c36020830184611dda565b9392505050565b60006060820190506122df6000830186611d66565b6122ec6020830185611d66565b6122f96040830184611dda565b949350505050565b60008115159050919050565b61231681612301565b811461232157600080fd5b50565b6000815190506123338161230d565b92915050565b60006020828403121561234f5761234e611b1f565b5b600061235d84828501612324565b91505092915050565b600081519050919050565b60005b8381101561238f578082015181840152602081019050612374565b60008484015250505050565b60006123a682612366565b6123b081856121fe565b93506123c0818560208601612371565b80840191505092915050565b60006123d8828461239b565b91508190509291505056fea2646970667358221220a3fa82f32dc78f0d94af52a04915af9bafea1c7126f43aecb04ee27adcf5195d64736f6c63430008180033000000000000000000000000343acce723339d5a417411d8ff57fde8886e91dc

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063a4e47b661161008c578063cea9d26f11610066578063cea9d26f146101fd578063e30c397814610219578063e76c3f5514610237578063f2fde38b1461026b576100ea565b8063a4e47b6614610193578063b3dd411d146101c5578063b5a2e01b146101e1576100ea565b8063715018a6116100c8578063715018a614610143578063766718081461014d57806379ba50971461016b5780638da5cb5b14610175576100ea565b806317105417146100ef57806321ec52b41461010b5780636ab498a314610127575b600080fd5b61010960048036038101906101049190611c50565b610287565b005b61012560048036038101906101209190611cfc565b610417565b005b610141600480360381019061013c9190611cfc565b61078a565b005b61014b610b3f565b005b610155610b79565b6040516101629190611d4b565b60405180910390f35b610173610b8c565b005b61017d610c1b565b60405161018a9190611d75565b60405180910390f35b6101ad60048036038101906101a89190611d90565b610c44565b6040516101bc93929190611e26565b60405180910390f35b6101df60048036038101906101da9190611cfc565b610cb3565b005b6101fb60048036038101906101f69190611e5d565b611021565b005b61021760048036038101906102129190611eb6565b6110d8565b005b610221611321565b60405161022e9190611d75565b60405180910390f35b610251600480360381019061024c9190611f09565b61134b565b604051610262959493929190611f54565b60405180910390f35b61028560048036038101906102809190611f09565b6113fd565b005b61028f6114aa565b6276a70065ffffffffffff168165ffffffffffff1611156102dc576040517f97e2d36d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050838160000160006101000a81548160ff021916908360ff160217905550828160000160016101000a8154817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1602179055508181600101601a6101000a81548165ffffffffffff021916908365ffffffffffff1602179055508360ff168573ffffffffffffffffffffffffffffffffffffffff167fe9ea56618d31afea8558726ec90e5fef0c46d19e0674b8462b208da51359ed798585604051610408929190611fe2565b60405180910390a35050505050565b61041f611531565b806cffffffffffffffffffffffffff1660008103610469576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050836cffffffffffffffffffffffffff1681600001541015610579576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836cffffffffffffffffffffffffff1681600001600082825461059c919061203a565b92505081905550836cffffffffffffffffffffffffff168160010160008282829054906101000a900472ffffffffffffffffffffffffffffffffffffff166105e4919061206e565b92506101000a81548172ffffffffffffffffffffffffffffffffffffff021916908372ffffffffffffffffffffffffffffffffffffff160217905550428160010160136101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff160217905550838260010160008282829054906101000a90046cffffffffffffffffffffffffff1661068191906120b5565b92506101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff1602179055508382600101600d8282829054906101000a90046cffffffffffffffffffffffffff166106dd91906120f6565b92506101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff16021790555061071685611575565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f390b1276974b9463e5d66ab10df69b6f3d7b930eb066a0e66df327edd2cc811c866040516107739190612168565b60405180910390a35050506107866116c9565b5050565b610792611531565b806cffffffffffffffffffffffffff16600081036107dc576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050836cffffffffffffffffffffffffff168160010160009054906101000a900472ffffffffffffffffffffffffffffffffffffff1672ffffffffffffffffffffffffffffffffffffff161015610920576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600101601a9054906101000a900465ffffffffffff1665ffffffffffff168160010160139054906101000a90046cffffffffffffffffffffffffff1661096791906120f6565b6cffffffffffffffffffffffffff164210156109af576040517fae04b1c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836cffffffffffffffffffffffffff168160010160008282829054906101000a900472ffffffffffffffffffffffffffffffffffffff166109f09190612183565b92506101000a81548172ffffffffffffffffffffffffffffffffffffff021916908372ffffffffffffffffffffffffffffffffffffff1602179055508382600101600d8282829054906101000a90046cffffffffffffffffffffffffff16610a5891906120b5565b92506101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff160217905550610ac233856cffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff166116d39092919063ffffffff16565b610acb85611575565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb86604051610b289190612168565b60405180910390a3505050610b3b6116c9565b5050565b610b476114aa565b6040517f185b73b100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360009054906101000a900460ff1681565b6000610b96611752565b90508073ffffffffffffffffffffffffffffffffffffffff16610bb7611321565b73ffffffffffffffffffffffffffffffffffffffff1614610c0f57806040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610c069190611d75565b60405180910390fd5b610c188161175a565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6004602052816000526040600020602052806000526040600020600091509150508060000154908060010160009054906101000a900472ffffffffffffffffffffffffffffffffffffff16908060010160139054906101000a90046cffffffffffffffffffffffffff16905083565b610cbb611531565b806cffffffffffffffffffffffffff1660008103610d05576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff1660ff16600360009054906101000a900460ff1660ff1614610da7576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060000160019054906101000a90047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16838260010160009054906101000a90046cffffffffffffffffffffffffff16610e2191906120f6565b6cffffffffffffffffffffffffff161115610e68576040517ff897f62800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828160010160008282829054906101000a90046cffffffffffffffffffffffffff16610e9491906120f6565b92506101000a8154816cffffffffffffffffffffffffff02191690836cffffffffffffffffffffffffff160217905550826cffffffffffffffffffffffffff16600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000828254610f6291906121ca565b92505081905550610fa53330856cffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1661178b909392919063ffffffff16565b610fae84611575565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f99039fcf0a98f484616c5196ee8b2ecfa971babf0b519848289ea4db381f85f78560405161100b9190612168565b60405180910390a3505061101d6116c9565b5050565b6110296114aa565b600360009054906101000a900460ff1660ff168160ff1603611077576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360009054906101000a900460ff1660ff168160ff167f168c41a8a7f5d81176dd8b849fe1dd8791803a3b75f63bd1987452a09385b90a60405160405180910390a380600360006101000a81548160ff021916908360ff16021790555050565b6110e06114aa565b6110e8611531565b8060008103611123576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611189576040517fb2335f2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036112795760008373ffffffffffffffffffffffffffffffffffffffff16836040516111f69061222f565b60006040518083038185875af1925050503d8060008114611233576040519150601f19603f3d011682016040523d82523d6000602084013e611238565b606091505b5050905080611273576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506112ae565b6112a483838673ffffffffffffffffffffffffffffffffffffffff166116d39092919063ffffffff16565b6112ad84611575565b5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f77023e19c7343ad491fd706c36335ca0e738340a91f29b1fd81e2673d44896c48460405161130b9190612244565b60405180910390a35061131c6116c9565b505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60056020528060005260406000206000915090508060000160009054906101000a900460ff16908060000160019054906101000a90047effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a90046cffffffffffffffffffffffffff169080600101600d9054906101000a90046cffffffffffffffffffffffffff169080600101601a9054906101000a900465ffffffffffff16905085565b6114056114aa565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16611465610c1b565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6114b2611752565b73ffffffffffffffffffffffffffffffffffffffff166114d0610c1b565b73ffffffffffffffffffffffffffffffffffffffff161461152f576114f3611752565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016115269190611d75565b60405180910390fd5b565b600280540361156c576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028081905550565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016115f39190611d75565b602060405180830381865afa158015611610573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116349190612274565b905081600101600d9054906101000a90046cffffffffffffffffffffffffff168260010160009054906101000a90046cffffffffffffffffffffffffff1661167c91906120f6565b6cffffffffffffffffffffffffff168110156116c4576040517fb215190700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6001600281905550565b61174d838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016117069291906122a1565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061180d565b505050565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055611788816118a4565b50565b611807848573ffffffffffffffffffffffffffffffffffffffff166323b872dd8686866040516024016117c0939291906122ca565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061180d565b50505050565b6000611838828473ffffffffffffffffffffffffffffffffffffffff1661196890919063ffffffff16565b9050600081511415801561185d57508080602001905181019061185b9190612339565b155b1561189f57826040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016118969190611d75565b60405180910390fd5b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60606119768383600061197e565b905092915050565b6060814710156119c557306040517fcd7860590000000000000000000000000000000000000000000000000000000081526004016119bc9190611d75565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1684866040516119ee91906123cc565b60006040518083038185875af1925050503d8060008114611a2b576040519150601f19603f3d011682016040523d82523d6000602084013e611a30565b606091505b5091509150611a40868383611a4b565b925050509392505050565b606082611a6057611a5b82611ada565b611ad2565b60008251148015611a88575060008473ffffffffffffffffffffffffffffffffffffffff163b145b15611aca57836040517f9996b315000000000000000000000000000000000000000000000000000000008152600401611ac19190611d75565b60405180910390fd5b819050611ad3565b5b9392505050565b600081511115611aed5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611b4f82611b24565b9050919050565b611b5f81611b44565b8114611b6a57600080fd5b50565b600081359050611b7c81611b56565b92915050565b600060ff82169050919050565b611b9881611b82565b8114611ba357600080fd5b50565b600081359050611bb581611b8f565b92915050565b60007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82169050919050565b611bef81611bbb565b8114611bfa57600080fd5b50565b600081359050611c0c81611be6565b92915050565b600065ffffffffffff82169050919050565b611c2d81611c12565b8114611c3857600080fd5b50565b600081359050611c4a81611c24565b92915050565b60008060008060808587031215611c6a57611c69611b1f565b5b6000611c7887828801611b6d565b9450506020611c8987828801611ba6565b9350506040611c9a87828801611bfd565b9250506060611cab87828801611c3b565b91505092959194509250565b60006cffffffffffffffffffffffffff82169050919050565b611cd981611cb7565b8114611ce457600080fd5b50565b600081359050611cf681611cd0565b92915050565b60008060408385031215611d1357611d12611b1f565b5b6000611d2185828601611b6d565b9250506020611d3285828601611ce7565b9150509250929050565b611d4581611b82565b82525050565b6000602082019050611d606000830184611d3c565b92915050565b611d6f81611b44565b82525050565b6000602082019050611d8a6000830184611d66565b92915050565b60008060408385031215611da757611da6611b1f565b5b6000611db585828601611b6d565b9250506020611dc685828601611b6d565b9150509250929050565b6000819050919050565b611de381611dd0565b82525050565b600072ffffffffffffffffffffffffffffffffffffff82169050919050565b611e1181611de9565b82525050565b611e2081611cb7565b82525050565b6000606082019050611e3b6000830186611dda565b611e486020830185611e08565b611e556040830184611e17565b949350505050565b600060208284031215611e7357611e72611b1f565b5b6000611e8184828501611ba6565b91505092915050565b611e9381611dd0565b8114611e9e57600080fd5b50565b600081359050611eb081611e8a565b92915050565b600080600060608486031215611ecf57611ece611b1f565b5b6000611edd86828701611b6d565b9350506020611eee86828701611b6d565b9250506040611eff86828701611ea1565b9150509250925092565b600060208284031215611f1f57611f1e611b1f565b5b6000611f2d84828501611b6d565b91505092915050565b611f3f81611bbb565b82525050565b611f4e81611c12565b82525050565b600060a082019050611f696000830188611d3c565b611f766020830187611f36565b611f836040830186611e17565b611f906060830185611e17565b611f9d6080830184611f45565b9695505050505050565b6000819050919050565b6000611fcc611fc7611fc284611c12565b611fa7565b611cb7565b9050919050565b611fdc81611fb1565b82525050565b6000604082019050611ff76000830185611f36565b6120046020830184611fd3565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061204582611dd0565b915061205083611dd0565b92508282039050818111156120685761206761200b565b5b92915050565b600061207982611de9565b915061208483611de9565b9250828201905072ffffffffffffffffffffffffffffffffffffff8111156120af576120ae61200b565b5b92915050565b60006120c082611cb7565b91506120cb83611cb7565b925082820390506cffffffffffffffffffffffffff8111156120f0576120ef61200b565b5b92915050565b600061210182611cb7565b915061210c83611cb7565b925082820190506cffffffffffffffffffffffffff8111156121315761213061200b565b5b92915050565b600061215261214d61214884611cb7565b611fa7565b611dd0565b9050919050565b61216281612137565b82525050565b600060208201905061217d6000830184612159565b92915050565b600061218e82611de9565b915061219983611de9565b9250828203905072ffffffffffffffffffffffffffffffffffffff8111156121c4576121c361200b565b5b92915050565b60006121d582611dd0565b91506121e083611dd0565b92508282019050808211156121f8576121f761200b565b5b92915050565b600081905092915050565b50565b60006122196000836121fe565b915061222482612209565b600082019050919050565b600061223a8261220c565b9150819050919050565b60006020820190506122596000830184611dda565b92915050565b60008151905061226e81611e8a565b92915050565b60006020828403121561228a57612289611b1f565b5b60006122988482850161225f565b91505092915050565b60006040820190506122b66000830185611d66565b6122c36020830184611dda565b9392505050565b60006060820190506122df6000830186611d66565b6122ec6020830185611d66565b6122f96040830184611dda565b949350505050565b60008115159050919050565b61231681612301565b811461232157600080fd5b50565b6000815190506123338161230d565b92915050565b60006020828403121561234f5761234e611b1f565b5b600061235d84828501612324565b91505092915050565b600081519050919050565b60005b8381101561238f578082015181840152602081019050612374565b60008484015250505050565b60006123a682612366565b6123b081856121fe565b93506123c0818560208601612371565b80840191505092915050565b60006123d8828461239b565b91508190509291505056fea2646970667358221220a3fa82f32dc78f0d94af52a04915af9bafea1c7126f43aecb04ee27adcf5195d64736f6c63430008180033

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

000000000000000000000000343acce723339d5a417411d8ff57fde8886e91dc

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

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000343acce723339d5a417411d8ff57fde8886e91dc


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.