ETH Price: $2,939.37 (-0.70%)

Contract

0x4283BCB20b96a5c71b6E9c7D1596de4Af5564f26

Overview

ETH Balance

Linea Mainnet LogoLinea Mainnet LogoLinea Mainnet Logo0 ETH

ETH Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Withdraw Then Bu...273099692026-01-01 18:24:1423 days ago1767291854IN
0x4283BCB2...Af5564f26
0 ETH0.000027380.03168495
Withdraw Then Bu...231948032025-09-11 12:22:56135 days ago1757593376IN
0x4283BCB2...Af5564f26
0 ETH0.000035120.03814723
Withdraw Then Bu...231938562025-09-11 11:18:36135 days ago1757589516IN
0x4283BCB2...Af5564f26
0 ETH0.000030760.03819686
Withdraw Then Bu...231937652025-09-11 11:12:27135 days ago1757589147IN
0x4283BCB2...Af5564f26
0 ETH0.000035640.03814214
Withdraw Then Bu...225833932025-08-27 16:51:14150 days ago1756313474IN
0x4283BCB2...Af5564f26
0 ETH0.00003460.03815493
Withdraw Then Bu...211412292025-07-22 6:44:34186 days ago1753166674IN
0x4283BCB2...Af5564f26
0 ETH0.000042430.04998073
Withdraw Then Bu...184269342025-04-27 2:40:13273 days ago1745721613IN
0x4283BCB2...Af5564f26
0 ETH0.000021390.0390373
Deposit184269212025-04-27 2:39:47273 days ago1745721587IN
0x4283BCB2...Af5564f26
0 ETH0.00000430.04355887
Mint Then Deposi...161971362025-02-24 4:16:12335 days ago1740370572IN
0x4283BCB2...Af5564f26
0 ETH0.000063030.10742857
Withdraw Then Bu...149789642025-01-24 10:33:57365 days ago1737714837IN
0x4283BCB2...Af5564f26
0 ETH0.000019750.04026035
Withdraw Then Bu...141866652025-01-05 0:51:49385 days ago1736038309IN
0x4283BCB2...Af5564f26
0 ETH0.000016270.03750949
Withdraw Then Bu...126989452024-11-29 21:14:43421 days ago1732914883IN
0x4283BCB2...Af5564f26
0 ETH0.000017060.04095332
Withdraw Then Bu...126903032024-11-29 16:16:42421 days ago1732897002IN
0x4283BCB2...Af5564f26
0 ETH0.00001670.04290571
Withdraw Then Bu...125478792024-11-26 6:30:54424 days ago1732602654IN
0x4283BCB2...Af5564f26
0 ETH0.000287510.68993204
Withdraw Then Bu...124603312024-11-24 3:53:08427 days ago1732420388IN
0x4283BCB2...Af5564f26
0 ETH0.000019520.04200576
Mint Then Deposi...123700182024-11-22 1:01:52429 days ago1732237312IN
0x4283BCB2...Af5564f26
0 ETH0.000024460.04106284
Withdraw Then Bu...116666322024-11-05 10:57:39445 days ago1730804259IN
0x4283BCB2...Af5564f26
0 ETH0.000016460.04076319
Deposit116666182024-11-05 10:57:11445 days ago1730804231IN
0x4283BCB2...Af5564f26
0 ETH0.000004140.04971589
Withdraw Then Bu...114069362024-10-30 8:58:44451 days ago1730278724IN
0x4283BCB2...Af5564f26
0 ETH0.000019450.04333115
Mint Then Deposi...104975442024-10-08 22:29:13473 days ago1728426553IN
0x4283BCB2...Af5564f26
0 ETH0.000113220.241
Deposit104974582024-10-08 22:26:09473 days ago1728426369IN
0x4283BCB2...Af5564f26
0 ETH0.000020110.241
Deposit99876102024-09-27 0:27:43485 days ago1727396863IN
0x4283BCB2...Af5564f26
0 ETH0.000009490.11373324
Withdraw Then Bu...96327032024-09-18 17:38:28493 days ago1726681108IN
0x4283BCB2...Af5564f26
0 ETH0.000028980.06454574
Withdraw Then Bu...88377332024-08-31 7:15:46511 days ago1725088546IN
0x4283BCB2...Af5564f26
0 ETH0.000026130.0582
Withdraw Then Bu...88294502024-08-31 2:39:05512 days ago1725071945IN
0x4283BCB2...Af5564f26
0 ETH0.000030680.062
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
273099692026-01-01 18:24:1423 days ago1767291854
0x4283BCB2...Af5564f26
0 ETH
273099692026-01-01 18:24:1423 days ago1767291854
0x4283BCB2...Af5564f26
0 ETH
231948032025-09-11 12:22:56135 days ago1757593376
0x4283BCB2...Af5564f26
0 ETH
231948032025-09-11 12:22:56135 days ago1757593376
0x4283BCB2...Af5564f26
0 ETH
231948032025-09-11 12:22:56135 days ago1757593376
0x4283BCB2...Af5564f26
0 ETH
231938562025-09-11 11:18:36135 days ago1757589516
0x4283BCB2...Af5564f26
0 ETH
231938562025-09-11 11:18:36135 days ago1757589516
0x4283BCB2...Af5564f26
0 ETH
231938562025-09-11 11:18:36135 days ago1757589516
0x4283BCB2...Af5564f26
0 ETH
231937652025-09-11 11:12:27135 days ago1757589147
0x4283BCB2...Af5564f26
0 ETH
231937652025-09-11 11:12:27135 days ago1757589147
0x4283BCB2...Af5564f26
0 ETH
231937652025-09-11 11:12:27135 days ago1757589147
0x4283BCB2...Af5564f26
0 ETH
225833932025-08-27 16:51:14150 days ago1756313474
0x4283BCB2...Af5564f26
0 ETH
225833932025-08-27 16:51:14150 days ago1756313474
0x4283BCB2...Af5564f26
0 ETH
225833932025-08-27 16:51:14150 days ago1756313474
0x4283BCB2...Af5564f26
0 ETH
211412292025-07-22 6:44:34186 days ago1753166674
0x4283BCB2...Af5564f26
0 ETH
211412292025-07-22 6:44:34186 days ago1753166674
0x4283BCB2...Af5564f26
0 ETH
211412292025-07-22 6:44:34186 days ago1753166674
0x4283BCB2...Af5564f26
0 ETH
184269342025-04-27 2:40:13273 days ago1745721613
0x4283BCB2...Af5564f26
0 ETH
184269342025-04-27 2:40:13273 days ago1745721613
0x4283BCB2...Af5564f26
0 ETH
184269212025-04-27 2:39:47273 days ago1745721587
0x4283BCB2...Af5564f26
0 ETH
161971362025-02-24 4:16:12335 days ago1740370572
0x4283BCB2...Af5564f26
0 ETH
161971362025-02-24 4:16:12335 days ago1740370572
0x4283BCB2...Af5564f26
0 ETH
161971362025-02-24 4:16:12335 days ago1740370572
0x4283BCB2...Af5564f26
0 ETH
161971362025-02-24 4:16:12335 days ago1740370572
0x4283BCB2...Af5564f26
0 ETH
161971362025-02-24 4:16:12335 days ago1740370572
0x4283BCB2...Af5564f26
0 ETH
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x416dC8c3...cf5Ae8b20
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
ALMWrapper

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 10 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
pragma abicoder v2;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "../interfaces/IAdapter.sol";

// need to call FarmBooster
import "../interfaces/IFarmBooster.sol";

contract ALMWrapper is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20Metadata;
    using SafeERC20 for IERC20;

    // The address of the wrapper factory
    address public immutable WRAPPER_FACTORY;

    // Whether it is initialized
    bool public isInitialized;

    // Accrued token per share
    uint256 public accTokenPerShare;

    // The timestamp when reward token mining starts
    uint256 public startTimestamp;

    // The timestamp when reward token mining ends
    uint256 public endTimestamp;

    // The timestamp of the last reward token update
    uint256 public lastRewardTimestamp;

    // reward tokens created per second
    uint256 public rewardPerSecond;

    // The precision factor
    uint256 public PRECISION_FACTOR;

    // The staked token
    IERC20Metadata public stakedToken;

    // The reward token
    IERC20Metadata public rewardToken;

    // The adapter address
    address payable public adapterAddr;

    // The contract handles the share boosts.
    address public boostContract;

    // The total boosted share
    uint256 public totalBoostedShare;

    // Basic boost factor, none boosted user's boost factor
    uint256 public constant BOOST_PRECISION = 100 * 1e10;
    // Hard limit for maximum boost factor, it must greater than BOOST_PRECISION
    uint256 public constant MAX_BOOST_PRECISION = 300 * 1e10;

    // Info of each user that stakes tokens (stakedToken)
    mapping(address => UserInfo) public userInfo;

    struct UserInfo {
        uint256 amount; // How many staked tokens the user has provided
        uint256 rewardDebt;
        uint256 boostMultiplier; // currently active multiplier
        uint256 boostedAmount; // combined boosted amount
        uint256 unsettledRewards; // rewards haven't been transferred to users but already accounted in rewardDebt
    }

    event Deposit(address indexed user, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 amount);
    event NewStartAndEndTimestamp(uint256 oldStartTimestamp, uint256 newStartTimestamp, uint256 oldEndTimestamp, uint256 newEndTimestamp, uint256 rewardPerSecond);
    event Restart(uint256 startTimestamp, uint256 endTimestamp, uint256 rewardPerSecond);
    event NewRewardPerSecond(uint256 oldRewardPerSecond, uint256 newRewardPerSecond, uint256 startTimestamp, uint256 endTimestamp);
    event NewPoolLimit(uint256 poolLimitPerUser);
    event RewardsStop(uint256 blockNumber);
    event TokenRecovery(address indexed token, uint256 amount);
    event Withdraw(address indexed user, uint256 amount);
    event DepositAndExpend(address indexed user, uint256 amount, uint256 endTimestamp);
    event MintThenDeposit(address indexed user, uint256 amount, uint256 amount0, uint256 amount1);
    event WithdrawThenBurn(address indexed user, uint256 amount, uint256 amount0, uint256 amount1);
    event AdapterUpdated(address indexed user, address indexed newAdapterAddr);
    event BoostContractUpdated(address indexed boostContract);
    event BoostMultiplierUpdated(address indexed user, uint256 oldMultiplier, uint256 newMultiplier);


    /**
     * @notice Constructor
     */
    constructor() {
        WRAPPER_FACTORY = msg.sender;
    }

    /**
     * @dev Throws if caller is not the boost contract.
     */
    modifier onlyBoostContract() {
        require(boostContract == msg.sender, "Ownable: caller is not the boost contract");
        _;
    }

    /*
     * @notice Initialize the contract
     * @param _stakedToken: staked token address
     * @param _rewardToken: reward token address
     * @param _rewardPerSecond: reward per second (in rewardToken)
     * @param _startTimestamp: start timestamp
     * @param _endTimestamp: end timestamp
     * @param _admin: admin address with ownership
     */
    function initialize(
        IERC20Metadata _stakedToken,
        IERC20Metadata _rewardToken,
        uint256 _rewardPerSecond,
        uint256 _startTimestamp,
        uint256 _endTimestamp,
        address _admin,
	    address _boostContract
    ) external {
        require(!isInitialized, "Already initialized");
        require(msg.sender == WRAPPER_FACTORY, "Not factory");
        require(_startTimestamp < _endTimestamp, "New startTimestamp must be lower than new endTimestamp");
        require(block.timestamp < _startTimestamp, "New startTimestamp must be higher than current timestamp");

        // Make this contract initialized
        isInitialized = true;

        stakedToken = _stakedToken;
        rewardToken = _rewardToken;
        rewardPerSecond = _rewardPerSecond;
        startTimestamp = _startTimestamp;
        endTimestamp = _endTimestamp;
	    boostContract = _boostContract;

        uint256 decimalsRewardToken = uint256(rewardToken.decimals());
        require(decimalsRewardToken < 30, "Must be inferior to 30");

        PRECISION_FACTOR = uint256(10**(uint256(30) - decimalsRewardToken));
        require(PRECISION_FACTOR * rewardPerSecond / (10**decimalsRewardToken) >= 100_000_000, "rewardPerSecond must be larger");

        // Set the lastRewardBlock as the startTimestamp
        lastRewardTimestamp = startTimestamp;

        // Transfer ownership to the admin address who becomes owner of the contract
        transferOwnership(_admin);
    }

    /*
     * @notice Deposit staked tokens and collect reward tokens (if any)
     * @param _amount: amount to deposit (in stakeToken)
     * @param _noHarvest: flag for harvest or not
     */
    function deposit(uint256 _amount, bool _noHarvest) external nonReentrant {
        UserInfo storage user = userInfo[msg.sender];

        // always update pool to be safe
        _updatePool();

        if (user.amount > 0) {
            // get user unaccounted pending rewards and add to unsettledRewards
            user.unsettledRewards += _pendingReward(msg.sender);

            // transfer the rewards and clear `unsettledRewards`
            if (!_noHarvest && user.unsettledRewards > 0) {
                // SafeTransfer CAKE
                rewardToken.safeTransfer(msg.sender, user.unsettledRewards);

                // reset accumulative value
                user.unsettledRewards = 0;
            }
        }

        if (_amount > 0) {
            // get true deposit amount (safe tax/rebase token)
            uint256 _amountBefore = IERC20Metadata(stakedToken).balanceOf(address(this));
            stakedToken.safeTransferFrom(msg.sender, address(this), _amount);
            uint256 _amountAfter = IERC20Metadata(stakedToken).balanceOf(address(this));
            _amount = _amountAfter - _amountBefore;

            // update user.amount
            user.amount = user.amount + _amount;
        }

        // update multiplier
        _updateBoostMultiplier(msg.sender, 0);

        // update debt
        user.rewardDebt = (user.boostedAmount * accTokenPerShare) / PRECISION_FACTOR;

        emit Deposit(msg.sender, _amount);
    }

    /*
     * @notice Deposit reward tokens and expand end timestamp
     * @param _amount: amount to deposit (in stakeToken)
     */
    function depositRewardAndExpend(uint256 _amount) external nonReentrant {
        require(block.timestamp < endTimestamp, "Pool should not ended");

        uint256 _rewardAmountBefore = IERC20Metadata(rewardToken).balanceOf(address(this));
        IERC20Metadata(rewardToken).safeTransferFrom(msg.sender, address(this), _amount);
        uint256 _rewardAmountAfter = IERC20Metadata(rewardToken).balanceOf(address(this));
        uint256 _rewardAmount = _rewardAmountAfter - _rewardAmountBefore;

        uint256 newEndTimestamp = endTimestamp + _rewardAmount / rewardPerSecond;

        require(endTimestamp < newEndTimestamp, "New endTimestamp must be larger than old endTimestamp");

        endTimestamp = newEndTimestamp;

        emit DepositAndExpend(msg.sender, _rewardAmount, endTimestamp);
    }

    /*
     * @notice Mint then deposit staked tokens and collect reward tokens (if any)
     * @param _amount0: token0 amount to deposit (in token0)
     * @param _amount1: token0 amount to deposit (in token1)
     * @param _noHarvest: flag for harvest or not
     * @param _data: payload data from FE side
     */
    function mintThenDeposit(uint256 _amount0, uint _amount1, bool _noHarvest, bytes calldata _data) external nonReentrant {
        require(adapterAddr != address(0), "Adapter address should not be empty");

        UserInfo storage user = userInfo[msg.sender];

        // always update pool to be safe
        _updatePool();

        if (user.amount > 0) {
            // get user unaccounted pending rewards and add to unsettledRewards
            user.unsettledRewards += _pendingReward(msg.sender);

            if (!_noHarvest && user.unsettledRewards > 0) {
                // transfer the rewards and clear `unsettledRewards`
                rewardToken.safeTransfer(msg.sender, user.unsettledRewards);

                // reset accumulative value
                user.unsettledRewards = 0;
            }
        }

        if (_amount0 > 0) {
            address token0 = IAdapter(adapterAddr).token0();
            IERC20(token0).safeTransferFrom(msg.sender, address(this), _amount0);
            IERC20(token0).forceApprove(adapterAddr, _amount0);
        }

        if (_amount1 > 0) {
            address token1 = IAdapter(adapterAddr).token1();
            IERC20(token1).safeTransferFrom(msg.sender, address(this), _amount1);
            IERC20(token1).forceApprove(adapterAddr, _amount1);
        }

        // call adapter
        uint256 _amountBefore = IERC20Metadata(stakedToken).balanceOf(address(this));
        IAdapter(adapterAddr).deposit(_amount0, _amount1, msg.sender, _data);
        uint256 _amountAfter = IERC20Metadata(stakedToken).balanceOf(address(this));
        uint256 _amount = _amountAfter - _amountBefore;

        if (_amount > 0) {
            user.amount = user.amount + _amount;
        }

        // update multiplier
        _updateBoostMultiplier(msg.sender, 0);

        // update debt
        user.rewardDebt = (user.boostedAmount * accTokenPerShare) / PRECISION_FACTOR;

        emit MintThenDeposit(msg.sender, _amount, _amount0, _amount1);
    }

    /*
     * @notice Withdraw staked tokens and collect reward tokens
     * @param _amount: amount to withdraw (in rewardToken)
     * @param _noHarvest: flag for harvest or not
     */
    function withdraw(uint256 _amount, bool _noHarvest) external nonReentrant {
        UserInfo storage user = userInfo[msg.sender];
        require(user.amount >= _amount, "Amount to withdraw too high");

        // always update pool to be safe
        _updatePool();

        // get user unaccounted pending rewards and add to unsettledRewards
        user.unsettledRewards += _pendingReward(msg.sender);

        if (_amount > 0) {
            user.amount = user.amount - _amount;
            stakedToken.safeTransfer(msg.sender, _amount);
        }

        // transfer the rewards and clear `unsettledRewards`
        if (!_noHarvest && user.unsettledRewards > 0) {
            // SafeTransfer CAKE
            rewardToken.safeTransfer(msg.sender, user.unsettledRewards);

            // reset accumulative value
            user.unsettledRewards = 0;
        }

        // update multiplier
        _updateBoostMultiplier(msg.sender, 0);

        // update debt
        user.rewardDebt = (user.boostedAmount * accTokenPerShare) / PRECISION_FACTOR;

        emit Withdraw(msg.sender, _amount);
    }

    /*
     * @notice Withdraw then burn staked tokens and collect reward tokens
     * @param _amount: amount to withdraw (in rewardToken)
     * @param _noHarvest: flag for harvest or not
     * @param _data: payload data from FE side
     */
    function withdrawThenBurn(uint256 _amount, bool _noHarvest, bytes calldata _data) external nonReentrant {
        require(adapterAddr != address(0), "Adapter address should not be empty");

        UserInfo storage user = userInfo[msg.sender];
        require(user.amount >= _amount, "Amount to withdraw too high");

        // always update pool to be safe
        _updatePool();

        // get user unaccounted pending rewards and add to unsettledRewards
        user.unsettledRewards += _pendingReward(msg.sender);

        uint256 _amount0;
        uint256 _amount1;

        if (_amount > 0) {
            user.amount = user.amount - _amount;

            IERC20(stakedToken).forceApprove(adapterAddr, _amount);

            // call adapter
            (_amount0, _amount1) = IAdapter(adapterAddr).withdraw(_amount, msg.sender, _data);
        }

        if (!_noHarvest && user.unsettledRewards > 0) {
            // SafeTransfer CAKE
            rewardToken.safeTransfer(msg.sender, user.unsettledRewards);

            // reset accumulative value
            user.unsettledRewards = 0;
        }

        // update multiplier
        _updateBoostMultiplier(msg.sender, 0);

        // update debt
        user.rewardDebt = (user.boostedAmount * accTokenPerShare) / PRECISION_FACTOR;

        emit WithdrawThenBurn(msg.sender, _amount, _amount0, _amount1);
    }

    /*
     * @notice Withdraw staked tokens without caring about rewards rewards
     * @dev Needs to be for emergency.
     */
    function emergencyWithdraw() external nonReentrant {
        UserInfo storage user = userInfo[msg.sender];
        uint256 amountToTransfer = user.amount;

        // remove boosted amount from total share first
        totalBoostedShare = totalBoostedShare > user.boostedAmount ? totalBoostedShare - user.boostedAmount : 0;

        // reset everything
        user.amount = 0;
        user.boostMultiplier = BOOST_PRECISION;
        user.boostedAmount = 0;
        user.rewardDebt = 0;
        // reset accumulative value
        user.unsettledRewards = 0;

        if (amountToTransfer > 0) {
            stakedToken.safeTransfer(msg.sender, amountToTransfer);
        }

        emit EmergencyWithdraw(msg.sender, amountToTransfer);
    }

    /*
     * @notice Stop rewards
     * @dev Only callable by owner. Needs to be for emergency.
     */
    function emergencyRewardWithdraw(uint256 _amount) external onlyOwner {
        rewardToken.safeTransfer(msg.sender, _amount);
    }

    /**
    * @notice Allows the owner to recover tokens sent to the contract by mistake
     * @param _token: token address
     * @dev Callable by owner
     */
    function recoverToken(address _token) external onlyOwner {
        require(_token != address(stakedToken), "Operations: Cannot recover staked token");
        require(_token != address(rewardToken), "Operations: Cannot recover reward token");

        uint256 balance = IERC20Metadata(_token).balanceOf(address(this));
        require(balance != 0, "Operations: Cannot recover zero balance");

        IERC20Metadata(_token).safeTransfer(msg.sender, balance);

        emit TokenRecovery(_token, balance);
    }

    /*
     * @notice Stop rewards
     * @dev Only callable by owner
     */
    function stopReward() external onlyOwner {
        endTimestamp = block.timestamp;
        emit RewardsStop(endTimestamp);
    }

    /*
     * @notice Update reward per block, if campaign is ended, admin can call restart and update rewardPerSecond there
     * @dev Only callable by owner.
     * @param _rewardPerSecond: the reward per second
     */
    function updateRewardPerSecond(uint256 _rewardPerSecond) external onlyOwner {
        require(block.timestamp < endTimestamp, "Pool should not ended");
        uint256 decimalsRewardToken = uint256(rewardToken.decimals());
        require(PRECISION_FACTOR * _rewardPerSecond / (10**decimalsRewardToken) >= 100_000_000, "rewardPerSecond must be larger");

        _updatePool();

        emit NewRewardPerSecond(rewardPerSecond, _rewardPerSecond, startTimestamp, endTimestamp);

        rewardPerSecond = _rewardPerSecond;
    }

    /**
     * @notice It allows the admin to update start and end blocks
     * @dev This function is only callable by owner.
     * @param _startTimestamp: the new start timestamp
     * @param _endTimestamp: the new end timestamp
     */
    function updateStartAndEndTimestamp(uint256 _startTimestamp, uint256 _endTimestamp) external onlyOwner {
        require(block.timestamp < startTimestamp, "Pool has started");
        require(_startTimestamp < _endTimestamp, "New startTimestamp must be lower than new endTimestamp");
        require(block.timestamp < _startTimestamp, "New startTimestamp must be higher than current timestamp");

        emit NewStartAndEndTimestamp(startTimestamp, _startTimestamp, endTimestamp, _endTimestamp, rewardPerSecond);

        startTimestamp = _startTimestamp;
        endTimestamp = _endTimestamp;

        // Set the lastRewardTimestamp as the startTimestamp
        lastRewardTimestamp = startTimestamp;
    }

    /**
     * @notice It allows the admin to update adapter address
     * @dev This function is only callable by owner.
     * @param _adapterAddr: the address of new adapter
     */
    function updateAdapterAddress(address _adapterAddr) external onlyOwner {
        require(_adapterAddr != address(0), "Adapter address should not be empty");
        adapterAddr = payable(_adapterAddr);
        emit AdapterUpdated(msg.sender, _adapterAddr);
    }

    /// @notice Update boost contract address and max boost factor.
    /// @param _newBoostContract The new address for handling all the share boosts.
    function updateBoostContract(address _newBoostContract) external onlyOwner {
        require(
            _newBoostContract != address(0) && _newBoostContract != boostContract,
            "New boost contract address must be valid"
        );

        boostContract = _newBoostContract;
        emit BoostContractUpdated(_newBoostContract);
    }

    /// @notice Update user boost factor from boost contract.
    /// @param _userAddress The user address for boost factor updates.
    function updateBoostMultiplierByUser(
        address _userAddress
    ) external nonReentrant {
        UserInfo storage user = userInfo[_userAddress];

        // always update pool to be safe
        _updatePool();

        if (user.amount > 0) {
            // get user unaccounted pending rewards and add to unsettledRewards
            user.unsettledRewards += _pendingReward(_userAddress);
        }

        // update multiplier based on the latest user.amount
        _updateBoostMultiplier(_userAddress, 0);

        // update debt
        user.rewardDebt = (user.boostedAmount * accTokenPerShare) / PRECISION_FACTOR;
    }

    /// @notice Update user boost factor from boost contract.
    /// @param _userAddress The user address for boost factor updates.
    /// @param _newMultiplier The multiplier update to user.
    function updateBoostMultiplier(
        address _userAddress,
        uint256 _newMultiplier
    ) external onlyBoostContract nonReentrant {
        UserInfo storage user = userInfo[_userAddress];

        // always update pool to be safe
        _updatePool();

        if (user.amount > 0) {
            // get user unaccounted pending rewards and add to unsettledRewards
            user.unsettledRewards += _pendingReward(_userAddress);
        }

        // update multiplier based on the latest user.amount
        _updateBoostMultiplier(_userAddress, _newMultiplier);

        // update debt
        user.rewardDebt = (user.boostedAmount * accTokenPerShare) / PRECISION_FACTOR;
    }

    /**
     * @notice It allows the admin to restart
     * @dev This function is only callable by owner.
     * @param _startTimestamp: the new start timestamp
     * @param _endTimestamp: the new end timestamp
     * @param _rewardPerSecond: the new rewardPerSecond
     */
    function restart(uint256 _startTimestamp, uint256 _endTimestamp, uint256 _rewardPerSecond) external onlyOwner {
        require(block.timestamp > endTimestamp, "Pool should be ended");
        require(block.timestamp <= _startTimestamp, "New startTimestamp must be higher than current timestamp");
        require(_startTimestamp < _endTimestamp, "New startTimestamp must be lower than new endTimestamp");

        // always update pool to be safe
        _updatePool();

        startTimestamp = _startTimestamp;
        endTimestamp = _endTimestamp;
        rewardPerSecond = _rewardPerSecond;

        // Set the lastRewardTimestamp as the startTimestamp
        lastRewardTimestamp = _startTimestamp;

        emit Restart(_startTimestamp, _endTimestamp, _rewardPerSecond);
    }

    /*
     * @notice View function to see total pending reward, including accounted but unsettled 
     * @param _userAddress: user address
     * @return Pending + Unsettled reward for a given user
     */
    function pendingReward(address _userAddress) external view returns (uint256) {
        UserInfo memory user = userInfo[_userAddress];
        return user.unsettledRewards + _pendingReward(_userAddress);
    }
    
    /*
     * @notice View function to see pending reward based on accTokenPerShare&rewardDebt calculation
     * @param _userAddress: user address
     * @return Pending reward for a given user
     */
    function _pendingReward(address _userAddress) internal view returns (uint256) {
        UserInfo storage user = userInfo[_userAddress];

        if (block.timestamp > lastRewardTimestamp && totalBoostedShare != 0) {
            uint256 multiplier = _getMultiplier(lastRewardTimestamp, block.timestamp);
            uint256 cakeReward = multiplier * rewardPerSecond;
            uint256 adjustedTokenPerShare = accTokenPerShare + (cakeReward * PRECISION_FACTOR) / totalBoostedShare;
            return (user.boostedAmount * adjustedTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;
        } else {
            return (user.boostedAmount * accTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;
        }
    }

    /*
     * @notice Update reward variables of the given pool to be up-to-date.
     */
    function _updatePool() internal {
        if (block.timestamp <= lastRewardTimestamp) {
            return;
        }

        if (totalBoostedShare == 0) {
            lastRewardTimestamp = block.timestamp;
            return;
        }

        uint256 multiplier = _getMultiplier(lastRewardTimestamp, block.timestamp);
        uint256 cakeReward = multiplier * rewardPerSecond;
        accTokenPerShare = accTokenPerShare + (cakeReward * PRECISION_FACTOR) / totalBoostedShare;
        lastRewardTimestamp = block.timestamp;
    }

    /*
     * @notice Return reward multiplier over the given _from to _to block.
     * @param _from: block to start
     * @param _to: block to finish
     */
    function _getMultiplier(uint256 _from, uint256 _to) internal view returns (uint256) {
        if (_to <= endTimestamp) {
            return _to - _from;
        } else if (_from >= endTimestamp) {
            return 0;
        } else {
            return endTimestamp - _from;
        }
    }

    /// @notice Update user boost factor.
    /// @param _userAddress The user address for boost factor updates.
    /// @param _newMultiplier The multiplier update to user.
    function _updateBoostMultiplier(
        address _userAddress,
        uint256 _newMultiplier
    ) internal {
        require(_userAddress != address(0), "The user address must be valid");

        UserInfo storage user = userInfo[_userAddress];

        if (_newMultiplier == 0) {
            _newMultiplier = BOOST_PRECISION;

            if (address(boostContract) != address(0)) {
                _newMultiplier = IFarmBooster(boostContract).updatePositionBoostMultiplier(_userAddress);
            }
        }

        // filter the invalid value
        if (_newMultiplier < BOOST_PRECISION) {
            _newMultiplier = BOOST_PRECISION;
        }
        if (_newMultiplier > MAX_BOOST_PRECISION) {
            _newMultiplier = MAX_BOOST_PRECISION;
        }

        // get current multiplier
        uint256 _oldMultiplier = user.boostMultiplier;
        uint256 _oldBoostedAmount = user.boostedAmount;

        // set new multiplier and calculate user's boosted shares
        user.boostMultiplier = _newMultiplier;
        user.boostedAmount = user.amount * _newMultiplier / BOOST_PRECISION;

        // add user's new boosted shares to total
        totalBoostedShare = totalBoostedShare + user.boostedAmount - _oldBoostedAmount;
        
        emit BoostMultiplierUpdated(_userAddress, _oldMultiplier, _newMultiplier);
    }

}

// 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);
    }
}

// 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;
    }
}

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

pragma solidity ^0.8.0;

import "../IERC20.sol";

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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.
 */
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].
     */
    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);
}

// 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);
}

// 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));
    }
}

// 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);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IAdapter {
    function initialize(
        address _wrapper,
        address _vault,
        address _admin
    ) external;

    function wrapper() external returns(address);

    function vault() external returns(address);

    function token0() external returns(address);

    function token1() external returns(address);

    function lpToken() external returns(address);

    function PROTOCOL() external returns(string memory);

    function VERSION() external returns(uint8);

    function PRECISION() external returns(uint256);

    function totalSupply() external view returns(uint256);

    function tokenPerShare() external view returns(uint256 _token0PerShare, uint256 _token1PerShare);

    function pool() external view returns(address);

    function deposit(
        uint256 _amount0,
        uint256 _amount1,
        address _user,
        bytes calldata _data
    ) external returns(uint256 _share);

    function withdraw(
        uint256 _share,
        address _user,
        bytes calldata _data
    ) external returns(uint256 _amount0, uint256 _amount1);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IFarmBooster {
    function updatePositionBoostMultiplier(address user) external returns (uint256 _multiplier);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newAdapterAddr","type":"address"}],"name":"AdapterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"boostContract","type":"address"}],"name":"BoostContractUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldMultiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMultiplier","type":"uint256"}],"name":"BoostMultiplierUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTimestamp","type":"uint256"}],"name":"DepositAndExpend","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"MintThenDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"poolLimitPerUser","type":"uint256"}],"name":"NewPoolLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldRewardPerSecond","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRewardPerSecond","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTimestamp","type":"uint256"}],"name":"NewRewardPerSecond","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldStartTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newStartTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldEndTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newEndTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardPerSecond","type":"uint256"}],"name":"NewStartAndEndTimestamp","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":false,"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardPerSecond","type":"uint256"}],"name":"Restart","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"RewardsStop","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenRecovery","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"WithdrawThenBurn","type":"event"},{"inputs":[],"name":"BOOST_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_BOOST_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRECISION_FACTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WRAPPER_FACTORY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accTokenPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adapterAddr","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boostContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_noHarvest","type":"bool"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositRewardAndExpend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyRewardWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20Metadata","name":"_stakedToken","type":"address"},{"internalType":"contract IERC20Metadata","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_rewardPerSecond","type":"uint256"},{"internalType":"uint256","name":"_startTimestamp","type":"uint256"},{"internalType":"uint256","name":"_endTimestamp","type":"uint256"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_boostContract","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastRewardTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount0","type":"uint256"},{"internalType":"uint256","name":"_amount1","type":"uint256"},{"internalType":"bool","name":"_noHarvest","type":"bool"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"mintThenDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_userAddress","type":"address"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTimestamp","type":"uint256"},{"internalType":"uint256","name":"_endTimestamp","type":"uint256"},{"internalType":"uint256","name":"_rewardPerSecond","type":"uint256"}],"name":"restart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20Metadata","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakedToken","outputs":[{"internalType":"contract IERC20Metadata","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stopReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalBoostedShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_adapterAddr","type":"address"}],"name":"updateAdapterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newBoostContract","type":"address"}],"name":"updateBoostContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_userAddress","type":"address"},{"internalType":"uint256","name":"_newMultiplier","type":"uint256"}],"name":"updateBoostMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_userAddress","type":"address"}],"name":"updateBoostMultiplierByUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardPerSecond","type":"uint256"}],"name":"updateRewardPerSecond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTimestamp","type":"uint256"},{"internalType":"uint256","name":"_endTimestamp","type":"uint256"}],"name":"updateStartAndEndTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"boostMultiplier","type":"uint256"},{"internalType":"uint256","name":"boostedAmount","type":"uint256"},{"internalType":"uint256","name":"unsettledRewards","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_noHarvest","type":"bool"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_noHarvest","type":"bool"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"withdrawThenBurn","outputs":[],"stateMutability":"nonpayable","type":"function"}]

0x60a060405234801561001057600080fd5b5061001a33610027565b6001805533608052610077565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b608051612ca46200009a6000396000818161029601526104d00152612ca46000f3fe608060405234801561001057600080fd5b50600436106101b75760003560e01c80630729da0b146101bc5780630d3b23bb146101d15780631959a002146101ed57806331e0f0241461023b5780633279beab1461024e57806338d0743614610261578063392e53cd146102745780633f6eef20146102915780634004c8e7146102c557806369b02128146102d8578063715018a6146102e5578063724148bc146102ed57806380dc0672146103005780638da5cb5b146103085780638f10369a146103105780638f662915146103195780639424f4a1146103225780639a408321146103355780639be65a60146103485780639dd2fcc31461035b578063a85adeab1461036e578063acb4019214610377578063b1b1a7951461038a578063bda2a8271461039d578063cc356c59146103b0578063cc6db2da146103c3578063cc7a262e146103cf578063ccd34cd5146103e2578063db2e21bc146103eb578063dfcedeee146103f3578063e6fd48bc14610406578063f2fde38b1461040f578063f40f0f5214610422578063f5e3ee1b14610435578063f7c618c114610448578063f8077fae1461045b578063f9d3af2b14610464575b600080fd5b6101cf6101ca366004612513565b610477565b005b6101da600d5481565b6040519081526020015b60405180910390f35b61022a6101fb36600461258e565b600e60205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b6040516101e49594939291906125ab565b6101cf610249366004612624565b6106ec565b6101cf61025c36600461267f565b6108e6565b6101cf61026f366004612698565b610908565b6002546102819060ff1681565b60405190151581526020016101e4565b6102b87f000000000000000000000000000000000000000000000000000000000000000081565b6040516101e491906126c8565b6101cf6102d336600461267f565b610a46565b6101da6502ba7def300081565b6101cf610b85565b6101cf6102fb3660046126dc565b610b99565b6101cf610c85565b6102b8610cc8565b6101da60075481565b6101da60035481565b6101cf61033036600461258e565b610cd7565b6101cf610343366004612698565b610d5d565b6101cf61035636600461258e565b610f69565b6101cf61036936600461258e565b61117a565b6101da60055481565b6101cf610385366004612708565b61124f565b6101cf610398366004612734565b611341565b6101cf6103ab36600461267f565b611746565b6101cf6103be36600461279d565b611959565b6101da64e8d4a5100081565b6009546102b8906001600160a01b031681565b6101da60085481565b6101cf611a35565b600c546102b8906001600160a01b031681565b6101da60045481565b6101cf61041d36600461258e565b611af7565b6101da61043036600461258e565b611b6d565b6101cf61044336600461258e565b611bde565b600a546102b8906001600160a01b031681565b6101da60065481565b600b546102b8906001600160a01b031681565b60025460ff16156104c55760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064015b60405180910390fd5b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461052b5760405162461bcd60e51b815260206004820152600b60248201526a4e6f7420666163746f727960a81b60448201526064016104bc565b82841061054a5760405162461bcd60e51b81526004016104bc906127bf565b8342106105695760405162461bcd60e51b81526004016104bc90612815565b6002805460ff19166001179055600980546001600160a01b03808a166001600160a01b031992831617909255600a80548984169083168117909155600788905560048781556005879055600c805494861694909316939093179091556040805163313ce56760e01b8152905160009363313ce567928082019260209290918290030181865afa158015610600573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610624919061286d565b60ff169050601e81106106725760405162461bcd60e51b815260206004820152601660248201527504d75737420626520696e666572696f7220746f2033360541b60448201526064016104bc565b61067d81601e6128a6565b61068890600a61299d565b6008556305f5e10061069b82600a61299d565b6007546008546106ab91906129a9565b6106b591906129c0565b10156106d35760405162461bcd60e51b81526004016104bc906129e2565b6004546006556106e283611af7565b5050505050505050565b6106f4611c58565b600b546001600160a01b031661071c5760405162461bcd60e51b81526004016104bc90612a19565b336000908152600e60205260409020805485111561074c5760405162461bcd60e51b81526004016104bc90612a5c565b610754611cb1565b61075d33611d21565b8160040160008282546107709190612a91565b909155506000905080861561082957825461078c9088906128a6565b8355600b546009546107ab916001600160a01b03918216911689611e02565b600b5460405163062b2b5f60e41b81526001600160a01b03909116906362b2b5f0906107e1908a9033908a908a90600401612acd565b60408051808303816000875af11580156107ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108239190612af8565b90925090505b8515801561083b575060008360040154115b15610867576004830154600a5461085f916001600160a01b03909116903390611ece565b600060048401555b610872336000611ef2565b600854600354846003015461088791906129a9565b61089191906129c0565b600184015560405133907f7f0dc8f6f9c24afc0d0a0990b14791952d0bd16f6805f564d7e6674c1d69ce80906108cc908a9086908690612b1c565b60405180910390a25050506108e060018055565b50505050565b6108ee6120c2565b600a54610905906001600160a01b03163383611ece565b50565b610910611c58565b336000908152600e6020526040902080548311156109405760405162461bcd60e51b81526004016104bc90612a5c565b610948611cb1565b61095133611d21565b8160040160008282546109649190612a91565b9091555050821561099557805461097c9084906128a6565b8155600954610995906001600160a01b03163385611ece565b811580156109a7575060008160040154115b156109d3576004810154600a546109cb916001600160a01b03909116903390611ece565b600060048201555b6109de336000611ef2565b60085460035482600301546109f391906129a9565b6109fd91906129c0565b600182015560405183815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a250610a4260018055565b5050565b610a4e6120c2565b6005544210610a6f5760405162461bcd60e51b81526004016104bc90612b32565b600a546040805163313ce56760e01b815290516000926001600160a01b03169163313ce5679160048083019260209291908290030181865afa158015610ab9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610add919061286d565b60ff1690506305f5e100610af282600a61299d565b83600854610b0091906129a9565b610b0a91906129c0565b1015610b285760405162461bcd60e51b81526004016104bc906129e2565b610b30611cb1565b600754600454600554604080519384526020840186905283019190915260608201527fa4b333dcae2e5aeb8d94686b544ef68feca7bf4b0a26eb4f1d75535ee32057db9060800160405180910390a150600755565b610b8d6120c2565b610b976000612121565b565b610ba16120c2565b6005544211610be95760405162461bcd60e51b8152602060048201526014602482015273141bdbdb081cda1bdd5b1908189948195b99195960621b60448201526064016104bc565b82421115610c095760405162461bcd60e51b81526004016104bc90612815565b818310610c285760405162461bcd60e51b81526004016104bc906127bf565b610c30611cb1565b60048390556005829055600781905560068390556040517f70f1d069446b84f9692adeeaced5e59453e7d8d648767a3dd1f6b26339ac260a90610c7890859085908590612b1c565b60405180910390a1505050565b610c8d6120c2565b4260058190556040519081527ffed9fcb0ca3d1e761a4b929792bb24082fba92dca81252646ad306d3068065669060200160405180910390a1565b6000546001600160a01b031690565b610cdf611c58565b6001600160a01b0381166000908152600e60205260409020610cff611cb1565b805415610d2857610d0f82611d21565b816004016000828254610d229190612a91565b90915550505b610d33826000611ef2565b6008546003548260030154610d4891906129a9565b610d5291906129c0565b600191820155805550565b610d65611c58565b336000908152600e60205260409020610d7c611cb1565b805415610de257610d8c33611d21565b816004016000828254610d9f9190612a91565b909155505081158015610db6575060008160040154115b15610de2576004810154600a54610dda916001600160a01b03909116903390611ece565b600060048201555b8215610f08576009546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610e199030906004016126c8565b602060405180830381865afa158015610e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5a9190612b61565b600954909150610e75906001600160a01b0316333087612171565b6009546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610ea69030906004016126c8565b602060405180830381865afa158015610ec3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee79190612b61565b9050610ef382826128a6565b8354909550610f03908690612a91565b835550505b610f13336000611ef2565b6008546003548260030154610f2891906129a9565b610f3291906129c0565b600182015560405183815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c90602001610a30565b610f716120c2565b6009546001600160a01b0390811690821603610fdf5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207374616b6560448201526632103a37b5b2b760c91b60648201526084016104bc565b600a546001600160a01b039081169082160361104d5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f76657220726577617260448201526632103a37b5b2b760c91b60648201526084016104bc565b6040516370a0823160e01b81526000906001600160a01b038316906370a082319061107c9030906004016126c8565b602060405180830381865afa158015611099573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110bd9190612b61565b90508060000361111f5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207a65726f2060448201526662616c616e636560c81b60648201526084016104bc565b6111336001600160a01b0383163383611ece565b816001600160a01b03167f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e988260405161116e91815260200190565b60405180910390a25050565b6111826120c2565b6001600160a01b038116158015906111a85750600c546001600160a01b03828116911614155b6112055760405162461bcd60e51b815260206004820152602860248201527f4e657720626f6f737420636f6e74726163742061646472657373206d757374206044820152671899481d985b1a5960c21b60648201526084016104bc565b600c80546001600160a01b0319166001600160a01b0383169081179091556040517f9db3257d8452dc29fc64768708740e3e68aa80c4561af2e8fd1b00c978a80ead90600090a250565b600c546001600160a01b031633146112bb5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f73746044820152680818dbdb9d1c9858dd60ba1b60648201526084016104bc565b6112c3611c58565b6001600160a01b0382166000908152600e602052604090206112e3611cb1565b80541561130c576112f383611d21565b8160040160008282546113069190612a91565b90915550505b6113168383611ef2565b600854600354826003015461132b91906129a9565b61133591906129c0565b60019182015580555050565b611349611c58565b600b546001600160a01b03166113715760405162461bcd60e51b81526004016104bc90612a19565b336000908152600e60205260409020611388611cb1565b8054156113ee5761139833611d21565b8160040160008282546113ab9190612a91565b9091555050831580156113c2575060008160040154115b156113ee576004810154600a546113e6916001600160a01b03909116903390611ece565b600060048201555b851561149657600b5460408051630dfe168160e01b815290516000926001600160a01b031691630dfe1681916004808301926020929190829003018187875af115801561143f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114639190612b7a565b905061147a6001600160a01b03821633308a612171565b600b54611494906001600160a01b03838116911689611e02565b505b841561153e57600b546040805163d21220a760e01b815290516000926001600160a01b03169163d21220a7916004808301926020929190829003018187875af11580156114e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150b9190612b7a565b90506115226001600160a01b038216333089612171565b600b5461153c906001600160a01b03838116911688611e02565b505b6009546040516370a0823160e01b81526000916001600160a01b0316906370a082319061156f9030906004016126c8565b602060405180830381865afa15801561158c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b09190612b61565b600b5460405163cb65d22160e01b81529192506001600160a01b03169063cb65d221906115e9908a908a9033908a908a90600401612b97565b6020604051808303816000875af1158015611608573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162c9190612b61565b506009546040516370a0823160e01b81526000916001600160a01b0316906370a082319061165e9030906004016126c8565b602060405180830381865afa15801561167b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169f9190612b61565b905060006116ad83836128a6565b905080156116c55783546116c2908290612a91565b84555b6116d0336000611ef2565b60085460035485600301546116e591906129a9565b6116ef91906129c0565b600185015560405133907fe78a7f198f1f3e5e8a2c36a41efd3ebcbfa8ee51f6f9766e39886d0e987a0b6a9061172a9084908d908d90612b1c565b60405180910390a25050505061173f60018055565b5050505050565b61174e611c58565b600554421061176f5760405162461bcd60e51b81526004016104bc90612b32565b600a546040516370a0823160e01b81526000916001600160a01b0316906370a08231906117a09030906004016126c8565b602060405180830381865afa1580156117bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e19190612b61565b600a549091506117fc906001600160a01b0316333085612171565b600a546040516370a0823160e01b81526000916001600160a01b0316906370a082319061182d9030906004016126c8565b602060405180830381865afa15801561184a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186e9190612b61565b9050600061187c83836128a6565b905060006007548261188e91906129c0565b60055461189b9190612a91565b9050806005541061190c5760405162461bcd60e51b815260206004820152603560248201527f4e657720656e6454696d657374616d70206d757374206265206c61726765722060448201527407468616e206f6c6420656e6454696d657374616d7605c1b60648201526084016104bc565b6005819055604080518381526020810183905233917f1195d4e0e1fe4c75b7f7afeffe11631cfcb0fddbbc391ff27b4c17d9bd9a02fe910160405180910390a25050505061090560018055565b6119616120c2565b60045442106119a55760405162461bcd60e51b815260206004820152601060248201526f141bdbdb081a185cc81cdd185c9d195960821b60448201526064016104bc565b8082106119c45760405162461bcd60e51b81526004016104bc906127bf565b8142106119e35760405162461bcd60e51b81526004016104bc90612815565b7fcc69e8f80c17756f236b8dc20d419a8907645c008f61695e4c133b1b6db32ce16004548360055484600754604051611a209594939291906125ab565b60405180910390a16004829055600555600655565b611a3d611c58565b336000908152600e6020526040902080546003820154600d5411611a62576000611a74565b8160030154600d54611a7491906128a6565b600d55600080835564e8d4a510006002840155600383018190556001830181905560048301558015611ab757600954611ab7906001600160a01b03163383611ece565b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a25050610b9760018055565b611aff6120c2565b6001600160a01b038116611b645760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104bc565b61090581612121565b6001600160a01b0381166000908152600e60209081526040808320815160a0810183528154815260018201549381019390935260028101549183019190915260038101546060830152600401546080820152611bc883611d21565b8160800151611bd79190612a91565b9392505050565b611be66120c2565b6001600160a01b038116611c0c5760405162461bcd60e51b81526004016104bc90612a19565b600b80546001600160a01b0319166001600160a01b03831690811790915560405133907fdf69d4ddaf9fd7d35c9293931e2b3f205a06dc3b5b9ca4bef1f1d7c1d420284890600090a350565b600260015403611caa5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104bc565b6002600155565b6006544211611cbc57565b600d54600003611ccc5742600655565b6000611cda600654426121a9565b9050600060075482611cec91906129a9565b9050600d5460085482611cff91906129a9565b611d0991906129c0565b600354611d169190612a91565b600355505042600655565b6001600160a01b0381166000908152600e6020526040812060065442118015611d4b5750600d5415155b15611dd4576000611d5e600654426121a9565b9050600060075482611d7091906129a9565b90506000600d5460085483611d8591906129a9565b611d8f91906129c0565b600354611d9c9190612a91565b90508360010154600854828660030154611db691906129a9565b611dc091906129c0565b611dca91906128a6565b9695505050505050565b80600101546008546003548360030154611dee91906129a9565b611df891906129c0565b611bd791906128a6565b600063095ea7b360e01b8383604051602401611e1f929190612bc5565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050611e5d84826121ea565b6108e0576040516001600160a01b038416602482015260006044820152611ec490859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261228c565b6108e0848261228c565b611eed8363a9059cbb60e01b8484604051602401611e8d929190612bc5565b505050565b6001600160a01b038216611f485760405162461bcd60e51b815260206004820152601e60248201527f54686520757365722061646472657373206d7573742062652076616c6964000060448201526064016104bc565b6001600160a01b0382166000908152600e6020526040812090829003611ff757600c5464e8d4a5100092506001600160a01b031615611ff757600c54604051638ba8d8bd60e01b81526001600160a01b0390911690638ba8d8bd90611fb19086906004016126c8565b6020604051808303816000875af1158015611fd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff49190612b61565b91505b64e8d4a5100082101561200d5764e8d4a5100091505b6502ba7def3000821115612025576502ba7def300091505b600281018054600383015491849055825490919064e8d4a510009061204b9086906129a9565b61205591906129c0565b60038401819055600d54829161206a91612a91565b61207491906128a6565b600d5560408051838152602081018690526001600160a01b038716917f459e4a2a3fe3fe5e131eabea44bfaf73943a596de711a1a1aba95eade5b36a76910160405180910390a25050505050565b336120cb610cc8565b6001600160a01b031614610b975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526108e09085906323b872dd60e01b90608401611e8d565b600060055482116121c5576121be83836128a6565b90506121e4565b60055483106121d6575060006121e4565b826005546121be91906128a6565b92915050565b6000806000846001600160a01b0316846040516122079190612c02565b6000604051808303816000865af19150503d8060008114612244576040519150601f19603f3d011682016040523d82523d6000602084013e612249565b606091505b50915091508180156122735750805115806122735750808060200190518101906122739190612c1e565b8015612283575061228385612361565b95945050505050565b60006122e1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123709092919063ffffffff16565b90508051600014806123025750808060200190518101906123029190612c1e565b611eed5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104bc565b6001600160a01b03163b151590565b606061237f8484600085612387565b949350505050565b6060824710156123e85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104bc565b600080866001600160a01b031685876040516124049190612c02565b60006040518083038185875af1925050503d8060008114612441576040519150601f19603f3d011682016040523d82523d6000602084013e612446565b606091505b509150915061245787838387612462565b979650505050505050565b606083156124cf5782516000036124c85761247c85612361565b6124c85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104bc565b508161237f565b61237f83838151156124e45781518083602001fd5b8060405162461bcd60e51b81526004016104bc9190612c3b565b6001600160a01b038116811461090557600080fd5b600080600080600080600060e0888a03121561252e57600080fd5b8735612539816124fe565b96506020880135612549816124fe565b955060408801359450606088013593506080880135925060a088013561256e816124fe565b915060c088013561257e816124fe565b8091505092959891949750929550565b6000602082840312156125a057600080fd5b8135611bd7816124fe565b948552602085019390935260408401919091526060830152608082015260a00190565b801515811461090557600080fd5b60008083601f8401126125ee57600080fd5b5081356001600160401b0381111561260557600080fd5b60208301915083602082850101111561261d57600080fd5b9250929050565b6000806000806060858703121561263a57600080fd5b84359350602085013561264c816125ce565b925060408501356001600160401b0381111561266757600080fd5b612673878288016125dc565b95989497509550505050565b60006020828403121561269157600080fd5b5035919050565b600080604083850312156126ab57600080fd5b8235915060208301356126bd816125ce565b809150509250929050565b6001600160a01b0391909116815260200190565b6000806000606084860312156126f157600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561271b57600080fd5b8235612726816124fe565b946020939093013593505050565b60008060008060006080868803121561274c57600080fd5b85359450602086013593506040860135612765816125ce565b925060608601356001600160401b0381111561278057600080fd5b61278c888289016125dc565b969995985093965092949392505050565b600080604083850312156127b057600080fd5b50508035926020909101359150565b60208082526036908201527f4e657720737461727454696d657374616d70206d757374206265206c6f7765726040820152750207468616e206e657720656e6454696d657374616d760541b606082015260800190565b60208082526038908201527f4e657720737461727454696d657374616d70206d757374206265206869676865604082015277072207468616e2063757272656e742074696d657374616d760441b606082015260800190565b60006020828403121561287f57600080fd5b815160ff81168114611bd757600080fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156121e4576121e4612890565b600181815b808511156128f45781600019048211156128da576128da612890565b808516156128e757918102915b93841c93908002906128be565b509250929050565b60008261290b575060016121e4565b81612918575060006121e4565b816001811461292e576002811461293857612954565b60019150506121e4565b60ff84111561294957612949612890565b50506001821b6121e4565b5060208310610133831016604e8410600b8410161715612977575081810a6121e4565b61298183836128b9565b806000190482111561299557612995612890565b029392505050565b6000611bd783836128fc565b80820281158282048414176121e4576121e4612890565b6000826129dd57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601e908201527f7265776172645065725365636f6e64206d757374206265206c61726765720000604082015260600190565b60208082526023908201527f4164617074657220616464726573732073686f756c64206e6f7420626520656d60408201526270747960e81b606082015260800190565b6020808252601b908201527a082dadeeadce840e8de40eed2e8d0c8e4c2ee40e8dede40d0d2ced602b1b604082015260600190565b808201808211156121e4576121e4612890565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8481526001600160a01b0384166020820152606060408201819052600090611dca9083018486612aa4565b60008060408385031215612b0b57600080fd5b505080516020909101519092909150565b9283526020830191909152604082015260600190565b602080825260159082015274141bdbdb081cda1bdd5b19081b9bdd08195b991959605a1b604082015260600190565b600060208284031215612b7357600080fd5b5051919050565b600060208284031215612b8c57600080fd5b8151611bd7816124fe565b85815284602082015260018060a01b0384166040820152608060608201526000612457608083018486612aa4565b6001600160a01b03929092168252602082015260400190565b60005b83811015612bf9578181015183820152602001612be1565b50506000910152565b60008251612c14818460208701612bde565b9190910192915050565b600060208284031215612c3057600080fd5b8151611bd7816125ce565b6020815260008251806020840152612c5a816040850160208701612bde565b601f01601f1916919091016040019291505056fea2646970667358221220076ac5eee30956b97c5376fa45a6209e8a5f187531ac00b96b61fe1a91fd00d364736f6c63430008130033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101b75760003560e01c80630729da0b146101bc5780630d3b23bb146101d15780631959a002146101ed57806331e0f0241461023b5780633279beab1461024e57806338d0743614610261578063392e53cd146102745780633f6eef20146102915780634004c8e7146102c557806369b02128146102d8578063715018a6146102e5578063724148bc146102ed57806380dc0672146103005780638da5cb5b146103085780638f10369a146103105780638f662915146103195780639424f4a1146103225780639a408321146103355780639be65a60146103485780639dd2fcc31461035b578063a85adeab1461036e578063acb4019214610377578063b1b1a7951461038a578063bda2a8271461039d578063cc356c59146103b0578063cc6db2da146103c3578063cc7a262e146103cf578063ccd34cd5146103e2578063db2e21bc146103eb578063dfcedeee146103f3578063e6fd48bc14610406578063f2fde38b1461040f578063f40f0f5214610422578063f5e3ee1b14610435578063f7c618c114610448578063f8077fae1461045b578063f9d3af2b14610464575b600080fd5b6101cf6101ca366004612513565b610477565b005b6101da600d5481565b6040519081526020015b60405180910390f35b61022a6101fb36600461258e565b600e60205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b6040516101e49594939291906125ab565b6101cf610249366004612624565b6106ec565b6101cf61025c36600461267f565b6108e6565b6101cf61026f366004612698565b610908565b6002546102819060ff1681565b60405190151581526020016101e4565b6102b87f000000000000000000000000b3df6321c8e3f71bf15bc8810c26bd4200bffda281565b6040516101e491906126c8565b6101cf6102d336600461267f565b610a46565b6101da6502ba7def300081565b6101cf610b85565b6101cf6102fb3660046126dc565b610b99565b6101cf610c85565b6102b8610cc8565b6101da60075481565b6101da60035481565b6101cf61033036600461258e565b610cd7565b6101cf610343366004612698565b610d5d565b6101cf61035636600461258e565b610f69565b6101cf61036936600461258e565b61117a565b6101da60055481565b6101cf610385366004612708565b61124f565b6101cf610398366004612734565b611341565b6101cf6103ab36600461267f565b611746565b6101cf6103be36600461279d565b611959565b6101da64e8d4a5100081565b6009546102b8906001600160a01b031681565b6101da60085481565b6101cf611a35565b600c546102b8906001600160a01b031681565b6101da60045481565b6101cf61041d36600461258e565b611af7565b6101da61043036600461258e565b611b6d565b6101cf61044336600461258e565b611bde565b600a546102b8906001600160a01b031681565b6101da60065481565b600b546102b8906001600160a01b031681565b60025460ff16156104c55760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064015b60405180910390fd5b336001600160a01b037f000000000000000000000000b3df6321c8e3f71bf15bc8810c26bd4200bffda2161461052b5760405162461bcd60e51b815260206004820152600b60248201526a4e6f7420666163746f727960a81b60448201526064016104bc565b82841061054a5760405162461bcd60e51b81526004016104bc906127bf565b8342106105695760405162461bcd60e51b81526004016104bc90612815565b6002805460ff19166001179055600980546001600160a01b03808a166001600160a01b031992831617909255600a80548984169083168117909155600788905560048781556005879055600c805494861694909316939093179091556040805163313ce56760e01b8152905160009363313ce567928082019260209290918290030181865afa158015610600573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610624919061286d565b60ff169050601e81106106725760405162461bcd60e51b815260206004820152601660248201527504d75737420626520696e666572696f7220746f2033360541b60448201526064016104bc565b61067d81601e6128a6565b61068890600a61299d565b6008556305f5e10061069b82600a61299d565b6007546008546106ab91906129a9565b6106b591906129c0565b10156106d35760405162461bcd60e51b81526004016104bc906129e2565b6004546006556106e283611af7565b5050505050505050565b6106f4611c58565b600b546001600160a01b031661071c5760405162461bcd60e51b81526004016104bc90612a19565b336000908152600e60205260409020805485111561074c5760405162461bcd60e51b81526004016104bc90612a5c565b610754611cb1565b61075d33611d21565b8160040160008282546107709190612a91565b909155506000905080861561082957825461078c9088906128a6565b8355600b546009546107ab916001600160a01b03918216911689611e02565b600b5460405163062b2b5f60e41b81526001600160a01b03909116906362b2b5f0906107e1908a9033908a908a90600401612acd565b60408051808303816000875af11580156107ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108239190612af8565b90925090505b8515801561083b575060008360040154115b15610867576004830154600a5461085f916001600160a01b03909116903390611ece565b600060048401555b610872336000611ef2565b600854600354846003015461088791906129a9565b61089191906129c0565b600184015560405133907f7f0dc8f6f9c24afc0d0a0990b14791952d0bd16f6805f564d7e6674c1d69ce80906108cc908a9086908690612b1c565b60405180910390a25050506108e060018055565b50505050565b6108ee6120c2565b600a54610905906001600160a01b03163383611ece565b50565b610910611c58565b336000908152600e6020526040902080548311156109405760405162461bcd60e51b81526004016104bc90612a5c565b610948611cb1565b61095133611d21565b8160040160008282546109649190612a91565b9091555050821561099557805461097c9084906128a6565b8155600954610995906001600160a01b03163385611ece565b811580156109a7575060008160040154115b156109d3576004810154600a546109cb916001600160a01b03909116903390611ece565b600060048201555b6109de336000611ef2565b60085460035482600301546109f391906129a9565b6109fd91906129c0565b600182015560405183815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a250610a4260018055565b5050565b610a4e6120c2565b6005544210610a6f5760405162461bcd60e51b81526004016104bc90612b32565b600a546040805163313ce56760e01b815290516000926001600160a01b03169163313ce5679160048083019260209291908290030181865afa158015610ab9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610add919061286d565b60ff1690506305f5e100610af282600a61299d565b83600854610b0091906129a9565b610b0a91906129c0565b1015610b285760405162461bcd60e51b81526004016104bc906129e2565b610b30611cb1565b600754600454600554604080519384526020840186905283019190915260608201527fa4b333dcae2e5aeb8d94686b544ef68feca7bf4b0a26eb4f1d75535ee32057db9060800160405180910390a150600755565b610b8d6120c2565b610b976000612121565b565b610ba16120c2565b6005544211610be95760405162461bcd60e51b8152602060048201526014602482015273141bdbdb081cda1bdd5b1908189948195b99195960621b60448201526064016104bc565b82421115610c095760405162461bcd60e51b81526004016104bc90612815565b818310610c285760405162461bcd60e51b81526004016104bc906127bf565b610c30611cb1565b60048390556005829055600781905560068390556040517f70f1d069446b84f9692adeeaced5e59453e7d8d648767a3dd1f6b26339ac260a90610c7890859085908590612b1c565b60405180910390a1505050565b610c8d6120c2565b4260058190556040519081527ffed9fcb0ca3d1e761a4b929792bb24082fba92dca81252646ad306d3068065669060200160405180910390a1565b6000546001600160a01b031690565b610cdf611c58565b6001600160a01b0381166000908152600e60205260409020610cff611cb1565b805415610d2857610d0f82611d21565b816004016000828254610d229190612a91565b90915550505b610d33826000611ef2565b6008546003548260030154610d4891906129a9565b610d5291906129c0565b600191820155805550565b610d65611c58565b336000908152600e60205260409020610d7c611cb1565b805415610de257610d8c33611d21565b816004016000828254610d9f9190612a91565b909155505081158015610db6575060008160040154115b15610de2576004810154600a54610dda916001600160a01b03909116903390611ece565b600060048201555b8215610f08576009546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610e199030906004016126c8565b602060405180830381865afa158015610e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5a9190612b61565b600954909150610e75906001600160a01b0316333087612171565b6009546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610ea69030906004016126c8565b602060405180830381865afa158015610ec3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee79190612b61565b9050610ef382826128a6565b8354909550610f03908690612a91565b835550505b610f13336000611ef2565b6008546003548260030154610f2891906129a9565b610f3291906129c0565b600182015560405183815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c90602001610a30565b610f716120c2565b6009546001600160a01b0390811690821603610fdf5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207374616b6560448201526632103a37b5b2b760c91b60648201526084016104bc565b600a546001600160a01b039081169082160361104d5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f76657220726577617260448201526632103a37b5b2b760c91b60648201526084016104bc565b6040516370a0823160e01b81526000906001600160a01b038316906370a082319061107c9030906004016126c8565b602060405180830381865afa158015611099573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110bd9190612b61565b90508060000361111f5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207a65726f2060448201526662616c616e636560c81b60648201526084016104bc565b6111336001600160a01b0383163383611ece565b816001600160a01b03167f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e988260405161116e91815260200190565b60405180910390a25050565b6111826120c2565b6001600160a01b038116158015906111a85750600c546001600160a01b03828116911614155b6112055760405162461bcd60e51b815260206004820152602860248201527f4e657720626f6f737420636f6e74726163742061646472657373206d757374206044820152671899481d985b1a5960c21b60648201526084016104bc565b600c80546001600160a01b0319166001600160a01b0383169081179091556040517f9db3257d8452dc29fc64768708740e3e68aa80c4561af2e8fd1b00c978a80ead90600090a250565b600c546001600160a01b031633146112bb5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f73746044820152680818dbdb9d1c9858dd60ba1b60648201526084016104bc565b6112c3611c58565b6001600160a01b0382166000908152600e602052604090206112e3611cb1565b80541561130c576112f383611d21565b8160040160008282546113069190612a91565b90915550505b6113168383611ef2565b600854600354826003015461132b91906129a9565b61133591906129c0565b60019182015580555050565b611349611c58565b600b546001600160a01b03166113715760405162461bcd60e51b81526004016104bc90612a19565b336000908152600e60205260409020611388611cb1565b8054156113ee5761139833611d21565b8160040160008282546113ab9190612a91565b9091555050831580156113c2575060008160040154115b156113ee576004810154600a546113e6916001600160a01b03909116903390611ece565b600060048201555b851561149657600b5460408051630dfe168160e01b815290516000926001600160a01b031691630dfe1681916004808301926020929190829003018187875af115801561143f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114639190612b7a565b905061147a6001600160a01b03821633308a612171565b600b54611494906001600160a01b03838116911689611e02565b505b841561153e57600b546040805163d21220a760e01b815290516000926001600160a01b03169163d21220a7916004808301926020929190829003018187875af11580156114e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150b9190612b7a565b90506115226001600160a01b038216333089612171565b600b5461153c906001600160a01b03838116911688611e02565b505b6009546040516370a0823160e01b81526000916001600160a01b0316906370a082319061156f9030906004016126c8565b602060405180830381865afa15801561158c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b09190612b61565b600b5460405163cb65d22160e01b81529192506001600160a01b03169063cb65d221906115e9908a908a9033908a908a90600401612b97565b6020604051808303816000875af1158015611608573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162c9190612b61565b506009546040516370a0823160e01b81526000916001600160a01b0316906370a082319061165e9030906004016126c8565b602060405180830381865afa15801561167b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169f9190612b61565b905060006116ad83836128a6565b905080156116c55783546116c2908290612a91565b84555b6116d0336000611ef2565b60085460035485600301546116e591906129a9565b6116ef91906129c0565b600185015560405133907fe78a7f198f1f3e5e8a2c36a41efd3ebcbfa8ee51f6f9766e39886d0e987a0b6a9061172a9084908d908d90612b1c565b60405180910390a25050505061173f60018055565b5050505050565b61174e611c58565b600554421061176f5760405162461bcd60e51b81526004016104bc90612b32565b600a546040516370a0823160e01b81526000916001600160a01b0316906370a08231906117a09030906004016126c8565b602060405180830381865afa1580156117bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e19190612b61565b600a549091506117fc906001600160a01b0316333085612171565b600a546040516370a0823160e01b81526000916001600160a01b0316906370a082319061182d9030906004016126c8565b602060405180830381865afa15801561184a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186e9190612b61565b9050600061187c83836128a6565b905060006007548261188e91906129c0565b60055461189b9190612a91565b9050806005541061190c5760405162461bcd60e51b815260206004820152603560248201527f4e657720656e6454696d657374616d70206d757374206265206c61726765722060448201527407468616e206f6c6420656e6454696d657374616d7605c1b60648201526084016104bc565b6005819055604080518381526020810183905233917f1195d4e0e1fe4c75b7f7afeffe11631cfcb0fddbbc391ff27b4c17d9bd9a02fe910160405180910390a25050505061090560018055565b6119616120c2565b60045442106119a55760405162461bcd60e51b815260206004820152601060248201526f141bdbdb081a185cc81cdd185c9d195960821b60448201526064016104bc565b8082106119c45760405162461bcd60e51b81526004016104bc906127bf565b8142106119e35760405162461bcd60e51b81526004016104bc90612815565b7fcc69e8f80c17756f236b8dc20d419a8907645c008f61695e4c133b1b6db32ce16004548360055484600754604051611a209594939291906125ab565b60405180910390a16004829055600555600655565b611a3d611c58565b336000908152600e6020526040902080546003820154600d5411611a62576000611a74565b8160030154600d54611a7491906128a6565b600d55600080835564e8d4a510006002840155600383018190556001830181905560048301558015611ab757600954611ab7906001600160a01b03163383611ece565b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a25050610b9760018055565b611aff6120c2565b6001600160a01b038116611b645760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104bc565b61090581612121565b6001600160a01b0381166000908152600e60209081526040808320815160a0810183528154815260018201549381019390935260028101549183019190915260038101546060830152600401546080820152611bc883611d21565b8160800151611bd79190612a91565b9392505050565b611be66120c2565b6001600160a01b038116611c0c5760405162461bcd60e51b81526004016104bc90612a19565b600b80546001600160a01b0319166001600160a01b03831690811790915560405133907fdf69d4ddaf9fd7d35c9293931e2b3f205a06dc3b5b9ca4bef1f1d7c1d420284890600090a350565b600260015403611caa5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104bc565b6002600155565b6006544211611cbc57565b600d54600003611ccc5742600655565b6000611cda600654426121a9565b9050600060075482611cec91906129a9565b9050600d5460085482611cff91906129a9565b611d0991906129c0565b600354611d169190612a91565b600355505042600655565b6001600160a01b0381166000908152600e6020526040812060065442118015611d4b5750600d5415155b15611dd4576000611d5e600654426121a9565b9050600060075482611d7091906129a9565b90506000600d5460085483611d8591906129a9565b611d8f91906129c0565b600354611d9c9190612a91565b90508360010154600854828660030154611db691906129a9565b611dc091906129c0565b611dca91906128a6565b9695505050505050565b80600101546008546003548360030154611dee91906129a9565b611df891906129c0565b611bd791906128a6565b600063095ea7b360e01b8383604051602401611e1f929190612bc5565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050611e5d84826121ea565b6108e0576040516001600160a01b038416602482015260006044820152611ec490859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261228c565b6108e0848261228c565b611eed8363a9059cbb60e01b8484604051602401611e8d929190612bc5565b505050565b6001600160a01b038216611f485760405162461bcd60e51b815260206004820152601e60248201527f54686520757365722061646472657373206d7573742062652076616c6964000060448201526064016104bc565b6001600160a01b0382166000908152600e6020526040812090829003611ff757600c5464e8d4a5100092506001600160a01b031615611ff757600c54604051638ba8d8bd60e01b81526001600160a01b0390911690638ba8d8bd90611fb19086906004016126c8565b6020604051808303816000875af1158015611fd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff49190612b61565b91505b64e8d4a5100082101561200d5764e8d4a5100091505b6502ba7def3000821115612025576502ba7def300091505b600281018054600383015491849055825490919064e8d4a510009061204b9086906129a9565b61205591906129c0565b60038401819055600d54829161206a91612a91565b61207491906128a6565b600d5560408051838152602081018690526001600160a01b038716917f459e4a2a3fe3fe5e131eabea44bfaf73943a596de711a1a1aba95eade5b36a76910160405180910390a25050505050565b336120cb610cc8565b6001600160a01b031614610b975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526108e09085906323b872dd60e01b90608401611e8d565b600060055482116121c5576121be83836128a6565b90506121e4565b60055483106121d6575060006121e4565b826005546121be91906128a6565b92915050565b6000806000846001600160a01b0316846040516122079190612c02565b6000604051808303816000865af19150503d8060008114612244576040519150601f19603f3d011682016040523d82523d6000602084013e612249565b606091505b50915091508180156122735750805115806122735750808060200190518101906122739190612c1e565b8015612283575061228385612361565b95945050505050565b60006122e1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123709092919063ffffffff16565b90508051600014806123025750808060200190518101906123029190612c1e565b611eed5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104bc565b6001600160a01b03163b151590565b606061237f8484600085612387565b949350505050565b6060824710156123e85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104bc565b600080866001600160a01b031685876040516124049190612c02565b60006040518083038185875af1925050503d8060008114612441576040519150601f19603f3d011682016040523d82523d6000602084013e612446565b606091505b509150915061245787838387612462565b979650505050505050565b606083156124cf5782516000036124c85761247c85612361565b6124c85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104bc565b508161237f565b61237f83838151156124e45781518083602001fd5b8060405162461bcd60e51b81526004016104bc9190612c3b565b6001600160a01b038116811461090557600080fd5b600080600080600080600060e0888a03121561252e57600080fd5b8735612539816124fe565b96506020880135612549816124fe565b955060408801359450606088013593506080880135925060a088013561256e816124fe565b915060c088013561257e816124fe565b8091505092959891949750929550565b6000602082840312156125a057600080fd5b8135611bd7816124fe565b948552602085019390935260408401919091526060830152608082015260a00190565b801515811461090557600080fd5b60008083601f8401126125ee57600080fd5b5081356001600160401b0381111561260557600080fd5b60208301915083602082850101111561261d57600080fd5b9250929050565b6000806000806060858703121561263a57600080fd5b84359350602085013561264c816125ce565b925060408501356001600160401b0381111561266757600080fd5b612673878288016125dc565b95989497509550505050565b60006020828403121561269157600080fd5b5035919050565b600080604083850312156126ab57600080fd5b8235915060208301356126bd816125ce565b809150509250929050565b6001600160a01b0391909116815260200190565b6000806000606084860312156126f157600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561271b57600080fd5b8235612726816124fe565b946020939093013593505050565b60008060008060006080868803121561274c57600080fd5b85359450602086013593506040860135612765816125ce565b925060608601356001600160401b0381111561278057600080fd5b61278c888289016125dc565b969995985093965092949392505050565b600080604083850312156127b057600080fd5b50508035926020909101359150565b60208082526036908201527f4e657720737461727454696d657374616d70206d757374206265206c6f7765726040820152750207468616e206e657720656e6454696d657374616d760541b606082015260800190565b60208082526038908201527f4e657720737461727454696d657374616d70206d757374206265206869676865604082015277072207468616e2063757272656e742074696d657374616d760441b606082015260800190565b60006020828403121561287f57600080fd5b815160ff81168114611bd757600080fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156121e4576121e4612890565b600181815b808511156128f45781600019048211156128da576128da612890565b808516156128e757918102915b93841c93908002906128be565b509250929050565b60008261290b575060016121e4565b81612918575060006121e4565b816001811461292e576002811461293857612954565b60019150506121e4565b60ff84111561294957612949612890565b50506001821b6121e4565b5060208310610133831016604e8410600b8410161715612977575081810a6121e4565b61298183836128b9565b806000190482111561299557612995612890565b029392505050565b6000611bd783836128fc565b80820281158282048414176121e4576121e4612890565b6000826129dd57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601e908201527f7265776172645065725365636f6e64206d757374206265206c61726765720000604082015260600190565b60208082526023908201527f4164617074657220616464726573732073686f756c64206e6f7420626520656d60408201526270747960e81b606082015260800190565b6020808252601b908201527a082dadeeadce840e8de40eed2e8d0c8e4c2ee40e8dede40d0d2ced602b1b604082015260600190565b808201808211156121e4576121e4612890565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8481526001600160a01b0384166020820152606060408201819052600090611dca9083018486612aa4565b60008060408385031215612b0b57600080fd5b505080516020909101519092909150565b9283526020830191909152604082015260600190565b602080825260159082015274141bdbdb081cda1bdd5b19081b9bdd08195b991959605a1b604082015260600190565b600060208284031215612b7357600080fd5b5051919050565b600060208284031215612b8c57600080fd5b8151611bd7816124fe565b85815284602082015260018060a01b0384166040820152608060608201526000612457608083018486612aa4565b6001600160a01b03929092168252602082015260400190565b60005b83811015612bf9578181015183820152602001612be1565b50506000910152565b60008251612c14818460208701612bde565b9190910192915050565b600060208284031215612c3057600080fd5b8151611bd7816125ce565b6020815260008251806020840152612c5a816040850160208701612bde565b601f01601f1916919091016040019291505056fea2646970667358221220076ac5eee30956b97c5376fa45a6209e8a5f187531ac00b96b61fe1a91fd00d364736f6c63430008130033

Block Transaction Gas Used Reward
view all blocks sequenced

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

Validator Index Block Amount
View All Withdrawals

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

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