ETH Price: $3,489.28 (+0.03%)
Gas: 2 Gwei

Contract

0xBcbb1928a72423505f5B479CEd487DA048911669
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw Then Bu...203389932024-07-19 7:10:232 days ago1721373023IN
0xBcbb1928...048911669
0 ETH0.002831717.01830523
Mint Then Deposi...203157852024-07-16 1:28:475 days ago1721093327IN
0xBcbb1928...048911669
0 ETH0.003364116.15642068
Mint Then Deposi...202585492024-07-08 1:35:4713 days ago1720402547IN
0xBcbb1928...048911669
0 ETH0.00380426.2330534
Withdraw Then Bu...202154632024-07-02 1:10:3519 days ago1719882635IN
0xBcbb1928...048911669
0 ETH0.001058342.66474988
Mint Then Deposi...201846982024-06-27 18:04:4723 days ago1719511487IN
0xBcbb1928...048911669
0 ETH0.0120824919.42088826
Withdraw Then Bu...201442552024-06-22 2:25:5929 days ago1719023159IN
0xBcbb1928...048911669
0 ETH0.00116932.94413267
Mint Then Deposi...201414072024-06-21 16:51:3529 days ago1718988695IN
0xBcbb1928...048911669
0 ETH0.004099766.64731263
Withdraw Then Bu...200528992024-06-09 7:53:1142 days ago1717919591IN
0xBcbb1928...048911669
0 ETH0.001516663.69160272
Mint Then Deposi...200313362024-06-06 7:36:2345 days ago1717659383IN
0xBcbb1928...048911669
0 ETH0.0071873811.51983908
Withdraw Then Bu...199834572024-05-30 15:08:5951 days ago1717081739IN
0xBcbb1928...048911669
0 ETH0.0114739228.8897209
Mint Then Deposi...199602412024-05-27 9:13:4754 days ago1716801227IN
0xBcbb1928...048911669
0 ETH0.0077517312.02082051
Withdraw Then Bu...199486182024-05-25 18:15:5956 days ago1716660959IN
0xBcbb1928...048911669
0 ETH0.002321935.26462261
Mint Then Deposi...198049672024-05-05 16:04:3576 days ago1714925075IN
0xBcbb1928...048911669
0 ETH0.004445997.48381597
Withdraw Then Bu...197713622024-04-30 23:20:2381 days ago1714519223IN
0xBcbb1928...048911669
0 ETH0.002324745.47555671
Withdraw Then Bu...195539022024-03-31 12:33:59111 days ago1711888439IN
0xBcbb1928...048911669
0 ETH0.0070732518.53636334
Mint Then Deposi...195462362024-03-30 10:40:11112 days ago1711795211IN
0xBcbb1928...048911669
0 ETH0.0115242320.6450574
Mint Then Deposi...194304342024-03-14 2:57:47129 days ago1710385067IN
0xBcbb1928...048911669
0 ETH0.0263818150.94854513
Mint Then Deposi...194094642024-03-11 4:27:11132 days ago1710131231IN
0xBcbb1928...048911669
0 ETH0.0241651942.54203277
Withdraw Then Bu...194085692024-03-11 1:27:59132 days ago1710120479IN
0xBcbb1928...048911669
0 ETH0.017504445.87251674
Withdraw Then Bu...194085342024-03-11 1:20:59132 days ago1710120059IN
0xBcbb1928...048911669
0 ETH0.0187901145.31123573
Withdraw Then Bu...194085252024-03-11 1:19:11132 days ago1710119951IN
0xBcbb1928...048911669
0 ETH0.022368354.73759691
Mint Then Deposi...193877282024-03-08 3:20:11135 days ago1709868011IN
0xBcbb1928...048911669
0 ETH0.0267935245.02220874
Withdraw Then Bu...193028672024-02-25 6:40:23147 days ago1708843223IN
0xBcbb1928...048911669
0 ETH0.0087990222.15168701
Deposit192038462024-02-11 9:10:59160 days ago1707642659IN
0xBcbb1928...048911669
0 ETH0.0019715724.80650201
Withdraw Then Bu...191168452024-01-30 4:10:11173 days ago1706587811IN
0xBcbb1928...048911669
0 ETH0.0051362811.38558218
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
185311472023-11-09 1:34:35255 days ago1699493675  Contract Creation0 ETH
Loading...
Loading

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

Contract Name:
Wrapper

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 10 runs

Other Settings:
default evmVersion
File 1 of 10 : Wrapper.sol
// 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";

contract Wrapper 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;

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

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

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

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

        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)
     */
    function deposit(uint256 _amount) external nonReentrant {
        UserInfo storage user = userInfo[msg.sender];

        _updatePool();

        if (user.amount > 0) {
            uint256 pending = (user.amount * accTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;
            if (pending > 0) {
                rewardToken.safeTransfer(msg.sender, pending);
            }
        }

        if (_amount > 0) {
            uint256 _amountBefore = IERC20Metadata(stakedToken).balanceOf(address(this));
            stakedToken.safeTransferFrom(msg.sender, address(this), _amount);
            uint256 _amountAfter = IERC20Metadata(stakedToken).balanceOf(address(this));
            _amount = _amountAfter - _amountBefore;
            user.amount = user.amount + _amount;
        }

        user.rewardDebt = (user.amount * 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 _data: payload data from FE side
     */
    function mintThenDeposit(uint256 _amount0, uint _amount1, bytes calldata _data) external nonReentrant {
        require(adapterAddr != address(0), "Adapter address should not be empty");

        UserInfo storage user = userInfo[msg.sender];

        _updatePool();

        if (user.amount > 0) {
            uint256 pending = (user.amount * accTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;
            if (pending > 0) {
                rewardToken.safeTransfer(msg.sender, pending);
            }
        }

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

        user.rewardDebt = (user.amount * 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)
     */
    function withdraw(uint256 _amount) external nonReentrant {
        UserInfo storage user = userInfo[msg.sender];
        require(user.amount >= _amount, "Amount to withdraw too high");

        _updatePool();

        uint256 pending = (user.amount * accTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;

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

        if (pending > 0) {
            rewardToken.safeTransfer(msg.sender, pending);
        }

        user.rewardDebt = (user.amount * 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 _data: payload data from FE side
     */
    function withdrawThenBurn(uint256 _amount, 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");

        _updatePool();

        uint256 pending = (user.amount * accTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;

        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 (pending > 0) {
            rewardToken.safeTransfer(msg.sender, pending);
        }

        user.rewardDebt = (user.amount * 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;
        user.amount = 0;
        user.rewardDebt = 0;

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

        emit EmergencyWithdraw(msg.sender, user.amount);
    }

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

        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");

        _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 pending reward on frontend.
     * @param _user: user address
     * @return Pending reward for a given user
     */
    function pendingReward(address _user) external view returns (uint256) {
        UserInfo storage user = userInfo[_user];
        uint256 stakedTokenSupply = stakedToken.balanceOf(address(this));
        if (block.timestamp > lastRewardTimestamp && stakedTokenSupply != 0) {
            uint256 multiplier = _getMultiplier(lastRewardTimestamp, block.timestamp);
            uint256 cakeReward = multiplier * rewardPerSecond;
            uint256 adjustedTokenPerShare = accTokenPerShare + (cakeReward * PRECISION_FACTOR) / stakedTokenSupply;
            return (user.amount * adjustedTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;
        } else {
            return (user.amount * 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;
        }

        uint256 stakedTokenSupply = stakedToken.balanceOf(address(this));

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

        uint256 multiplier = _getMultiplier(lastRewardTimestamp, block.timestamp);
        uint256 cakeReward = multiplier * rewardPerSecond;
        accTokenPerShare = accTokenPerShare + (cakeReward * PRECISION_FACTOR) / stakedTokenSupply;
        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;
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC20.sol";

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

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

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

File 5 of 10 : IERC20Permit.sol
// 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);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 10 of 10 : IAdapter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IAdapter {
    function initialize(
        address _wrapper,
        address _vault,
        address _token0,
        address _token1,
        address _lpToken,
        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);
}

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

Contract Security Audit

Contract ABI

[{"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":"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":"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":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"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"}],"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":"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":"_user","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":[{"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":"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"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"withdrawThenBurn","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061016a5760003560e01c80630ae503c91461016f5780631959a002146101845780632e1a7d4d146101c55780633279beab146101d8578063392e53cd146101eb5780633f6eef20146102085780634004c8e71461023c578063715018a61461024f578063724148bc1461025757806380dc06721461026a5780638da5cb5b146102725780638f10369a1461027a5780638f662915146102915780639be65a601461029a578063a85adeab146102ad578063b1a5d12d146102b6578063b6b55f25146102c9578063b97c9669146102dc578063bda2a827146102ef578063cc356c5914610302578063cc7a262e14610315578063ccd34cd514610328578063db2e21bc14610331578063e6fd48bc14610339578063f2fde38b14610342578063f40f0f5214610355578063f5e3ee1b14610368578063f7c618c11461037b578063f8077fae1461038e578063f9d3af2b14610397575b600080fd5b61018261017d366004612070565b6103aa565b005b6101ab6101923660046120d0565b600c602052600090815260409020805460019091015482565b604080519283526020830191909152015b60405180910390f35b6101826101d33660046120f4565b61058e565b6101826101e63660046120f4565b6106ad565b6002546101f89060ff1681565b60405190151581526020016101bc565b61022f7f0000000000000000000000000e1aa137b97f57457baa147a4fa2a2a71df318a781565b6040516101bc919061210d565b61018261024a3660046120f4565b6106cc565b61018261080b565b610182610265366004612121565b61081f565b6101826109fd565b61022f610a40565b61028360075481565b6040519081526020016101bc565b61028360035481565b6101826102a83660046120d0565b610a4f565b61028360055481565b6101826102c436600461214d565b610c60565b6101826102d73660046120f4565b610e95565b6101826102ea3660046121b4565b611092565b6101826102fd3660046120f4565b61147a565b610182610310366004612206565b61168d565b60095461022f906001600160a01b031681565b61028360085481565b61018261177a565b61028360045481565b6101826103503660046120d0565b6117fe565b6102836103633660046120d0565b611874565b6101826103763660046120d0565b6119c9565b600a5461022f906001600160a01b031681565b61028360065481565b600b5461022f906001600160a01b031681565b6103b2611a43565b600b546001600160a01b03166103e35760405162461bcd60e51b81526004016103da90612228565b60405180910390fd5b336000908152600c6020526040902080548411156104135760405162461bcd60e51b81526004016103da9061226b565b61041b611a9c565b60008160010154600854600354846000015461043791906122b6565b61044191906122cd565b61044b91906122ef565b905060008086156105005783546104639088906122ef565b8455600b54600954610482916001600160a01b03918216911689611b7e565b600b5460405163062b2b5f60e41b81526001600160a01b03909116906362b2b5f0906104b8908a9033908b908b9060040161232b565b60408051808303816000875af11580156104d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fa9190612360565b90925090505b821561051d57600a5461051d906001600160a01b03163385611c4a565b600854600354855461052f91906122b6565b61053991906122cd565b600185015560405133907f7f0dc8f6f9c24afc0d0a0990b14791952d0bd16f6805f564d7e6674c1d69ce8090610574908a9086908690612384565b60405180910390a25050505061058960018055565b505050565b610596611a43565b336000908152600c6020526040902080548211156105c65760405162461bcd60e51b81526004016103da9061226b565b6105ce611a9c565b6000816001015460085460035484600001546105ea91906122b6565b6105f491906122cd565b6105fe91906122ef565b9050821561062c5781546106139084906122ef565b825560095461062c906001600160a01b03163385611c4a565b801561064957600a54610649906001600160a01b03163383611c4a565b600854600354835461065b91906122b6565b61066591906122cd565b600183015560405183815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a250506106aa60018055565b50565b6106b5611c69565b600a546106aa906001600160a01b03163383611c4a565b6106d4611c69565b60055442106106f55760405162461bcd60e51b81526004016103da9061239a565b600a546040805163313ce56760e01b815290516000926001600160a01b03169163313ce5679160048083019260209291908290030181865afa15801561073f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076391906123c9565b60ff1690506305f5e10061077882600a6124d0565b8360085461078691906122b6565b61079091906122cd565b10156107ae5760405162461bcd60e51b81526004016103da906124dc565b6107b6611a9c565b600754600454600554604080519384526020840186905283019190915260608201527fa4b333dcae2e5aeb8d94686b544ef68feca7bf4b0a26eb4f1d75535ee32057db9060800160405180910390a150600755565b610813611c69565b61081d6000611cc8565b565b610827611c69565b600554421161086f5760405162461bcd60e51b8152602060048201526014602482015273141bdbdb081cda1bdd5b1908189948195b99195960621b60448201526064016103da565b82421061088e5760405162461bcd60e51b81526004016103da90612513565b8183106108ad5760405162461bcd60e51b81526004016103da9061256b565b600a546040805163313ce56760e01b815290516000926001600160a01b03169163313ce5679160048083019260209291908290030181865afa1580156108f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091b91906123c9565b60ff169050601e81106109405760405162461bcd60e51b81526004016103da906125c1565b61094b81601e6122ef565b61095690600a6124d0565b6008556305f5e10061096982600a6124d0565b8360085461097791906122b6565b61098191906122cd565b101561099f5760405162461bcd60e51b81526004016103da906124dc565b6109a7611a9c565b60048490556005839055600782905560068490556040517f70f1d069446b84f9692adeeaced5e59453e7d8d648767a3dd1f6b26339ac260a906109ef90869086908690612384565b60405180910390a150505050565b610a05611c69565b4260058190556040519081527ffed9fcb0ca3d1e761a4b929792bb24082fba92dca81252646ad306d3068065669060200160405180910390a1565b6000546001600160a01b031690565b610a57611c69565b6009546001600160a01b0390811690821603610ac55760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207374616b6560448201526632103a37b5b2b760c91b60648201526084016103da565b600a546001600160a01b0390811690821603610b335760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f76657220726577617260448201526632103a37b5b2b760c91b60648201526084016103da565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610b6290309060040161210d565b602060405180830381865afa158015610b7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba391906125f1565b905080600003610c055760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207a65726f2060448201526662616c616e636560c81b60648201526084016103da565b610c196001600160a01b0383163383611c4a565b816001600160a01b03167f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e9882604051610c5491815260200190565b60405180910390a25050565b60025460ff1615610ca95760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064016103da565b336001600160a01b037f0000000000000000000000000e1aa137b97f57457baa147a4fa2a2a71df318a71614610d0f5760405162461bcd60e51b815260206004820152600b60248201526a4e6f7420666163746f727960a81b60448201526064016103da565b818310610d2e5760405162461bcd60e51b81526004016103da9061256b565b824210610d4d5760405162461bcd60e51b81526004016103da90612513565b6002805460ff19166001179055600980546001600160a01b038089166001600160a01b031992831617909255600a805492881692909116821790556007859055600484815560058490556040805163313ce56760e01b815290516000939263313ce567928082019260209290918290030181865afa158015610dd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df791906123c9565b60ff169050601e8110610e1c5760405162461bcd60e51b81526004016103da906125c1565b610e2781601e6122ef565b610e3290600a6124d0565b6008556305f5e100610e4582600a6124d0565b600754600854610e5591906122b6565b610e5f91906122cd565b1015610e7d5760405162461bcd60e51b81526004016103da906124dc565b600454600655610e8c826117fe565b50505050505050565b610e9d611a43565b336000908152600c60205260409020610eb4611a9c565b805415610f0c57600081600101546008546003548460000154610ed791906122b6565b610ee191906122cd565b610eeb91906122ef565b90508015610f0a57600a54610f0a906001600160a01b03163383611c4a565b505b8115611032576009546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610f4390309060040161210d565b602060405180830381865afa158015610f60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8491906125f1565b600954909150610f9f906001600160a01b0316333086611d18565b6009546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610fd090309060040161210d565b602060405180830381865afa158015610fed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101191906125f1565b905061101d82826122ef565b835490945061102d90859061260a565b835550505b600854600354825461104491906122b6565b61104e91906122cd565b600182015560405182815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2506106aa60018055565b61109a611a43565b600b546001600160a01b03166110c25760405162461bcd60e51b81526004016103da90612228565b336000908152600c602052604090206110d9611a9c565b805415611131576000816001015460085460035484600001546110fc91906122b6565b61110691906122cd565b61111091906122ef565b9050801561112f57600a5461112f906001600160a01b03163383611c4a565b505b84156111d957600b5460408051630dfe168160e01b815290516000926001600160a01b031691630dfe1681916004808301926020929190829003018187875af1158015611182573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a6919061261d565b90506111bd6001600160a01b038216333089611d18565b600b546111d7906001600160a01b03838116911688611b7e565b505b831561128157600b546040805163d21220a760e01b815290516000926001600160a01b03169163d21220a7916004808301926020929190829003018187875af115801561122a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124e919061261d565b90506112656001600160a01b038216333088611d18565b600b5461127f906001600160a01b03838116911687611b7e565b505b6009546040516370a0823160e01b81526000916001600160a01b0316906370a08231906112b290309060040161210d565b602060405180830381865afa1580156112cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f391906125f1565b600b5460405163cb65d22160e01b81529192506001600160a01b03169063cb65d2219061132c908990899033908a908a9060040161263a565b6020604051808303816000875af115801561134b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136f91906125f1565b506009546040516370a0823160e01b81526000916001600160a01b0316906370a08231906113a190309060040161210d565b602060405180830381865afa1580156113be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e291906125f1565b905060006113f083836122ef565b9050801561140857835461140590829061260a565b84555b600854600354855461141a91906122b6565b61142491906122cd565b600185015560405133907fe78a7f198f1f3e5e8a2c36a41efd3ebcbfa8ee51f6f9766e39886d0e987a0b6a9061145f9084908c908c90612384565b60405180910390a25050505061147460018055565b50505050565b611482611a43565b60055442106114a35760405162461bcd60e51b81526004016103da9061239a565b600a546040516370a0823160e01b81526000916001600160a01b0316906370a08231906114d490309060040161210d565b602060405180830381865afa1580156114f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151591906125f1565b600a54909150611530906001600160a01b0316333085611d18565b600a546040516370a0823160e01b81526000916001600160a01b0316906370a082319061156190309060040161210d565b602060405180830381865afa15801561157e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a291906125f1565b905060006115b083836122ef565b90506000600754826115c291906122cd565b6005546115cf919061260a565b905080600554106116405760405162461bcd60e51b815260206004820152603560248201527f4e657720656e6454696d657374616d70206d757374206265206c61726765722060448201527407468616e206f6c6420656e6454696d657374616d7605c1b60648201526084016103da565b6005819055604080518381526020810183905233917f1195d4e0e1fe4c75b7f7afeffe11631cfcb0fddbbc391ff27b4c17d9bd9a02fe910160405180910390a2505050506106aa60018055565b611695611c69565b60045442106116d95760405162461bcd60e51b815260206004820152601060248201526f141bdbdb081a185cc81cdd185c9d195960821b60448201526064016103da565b8082106116f85760405162461bcd60e51b81526004016103da9061256b565b8142106117175760405162461bcd60e51b81526004016103da90612513565b60045460055460075460408051938452602084018690528301919091526060820183905260808201527fcc69e8f80c17756f236b8dc20d419a8907645c008f61695e4c133b1b6db32ce19060a00160405180910390a16004829055600555600655565b611782611a43565b336000908152600c60205260408120805482825560018201929092559080156117bc576009546117bc906001600160a01b03163383611c4a565b815460405190815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a2505061081d60018055565b611806611c69565b6001600160a01b03811661186b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103da565b6106aa81611cc8565b6001600160a01b038082166000908152600c602052604080822060095491516370a0823160e01b8152929390928492909116906370a08231906118bb90309060040161210d565b602060405180830381865afa1580156118d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118fc91906125f1565b90506006544211801561190e57508015155b1561199657600061192160065442611d50565b905060006007548261193391906122b6565b90506000836008548361194691906122b6565b61195091906122cd565b60035461195d919061260a565b9050846001015460085482876000015461197791906122b6565b61198191906122cd565b61198b91906122ef565b979650505050505050565b600182015460085460035484546119ad91906122b6565b6119b791906122cd565b6119c191906122ef565b949350505050565b6119d1611c69565b6001600160a01b0381166119f75760405162461bcd60e51b81526004016103da90612228565b600b80546001600160a01b0319166001600160a01b03831690811790915560405133907fdf69d4ddaf9fd7d35c9293931e2b3f205a06dc3b5b9ca4bef1f1d7c1d420284890600090a350565b600260015403611a955760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103da565b6002600155565b6006544211611aa757565b6009546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611ad890309060040161210d565b602060405180830381865afa158015611af5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b1991906125f1565b905080600003611b2a575042600655565b6000611b3860065442611d50565b9050600060075482611b4a91906122b6565b90508260085482611b5b91906122b6565b611b6591906122cd565b600354611b72919061260a565b60035550504260065550565b600063095ea7b360e01b8383604051602401611b9b929190612668565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050611bd98482611d91565b611474576040516001600160a01b038416602482015260006044820152611c4090859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611e33565b6114748482611e33565b6105898363a9059cbb60e01b8484604051602401611c09929190612668565b33611c72610a40565b6001600160a01b03161461081d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103da565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526114749085906323b872dd60e01b90608401611c09565b60006005548211611d6c57611d6583836122ef565b9050611d8b565b6005548310611d7d57506000611d8b565b82600554611d6591906122ef565b92915050565b6000806000846001600160a01b031684604051611dae91906126a5565b6000604051808303816000865af19150503d8060008114611deb576040519150601f19603f3d011682016040523d82523d6000602084013e611df0565b606091505b5091509150818015611e1a575080511580611e1a575080806020019051810190611e1a91906126c1565b8015611e2a5750611e2a85611f08565b95945050505050565b6000611e88826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611f179092919063ffffffff16565b9050805160001480611ea9575080806020019051810190611ea991906126c1565b6105895760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103da565b6001600160a01b03163b151590565b60606119c1848460008585600080866001600160a01b03168587604051611f3e91906126a5565b60006040518083038185875af1925050503d8060008114611f7b576040519150601f19603f3d011682016040523d82523d6000602084013e611f80565b606091505b509150915061198b8783838760608315611ff9578251600003611ff257611fa685611f08565b611ff25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103da565b50816119c1565b6119c1838381511561200e5781518083602001fd5b8060405162461bcd60e51b81526004016103da91906126e3565b60008083601f84011261203a57600080fd5b5081356001600160401b0381111561205157600080fd5b60208301915083602082850101111561206957600080fd5b9250929050565b60008060006040848603121561208557600080fd5b8335925060208401356001600160401b038111156120a257600080fd5b6120ae86828701612028565b9497909650939450505050565b6001600160a01b03811681146106aa57600080fd5b6000602082840312156120e257600080fd5b81356120ed816120bb565b9392505050565b60006020828403121561210657600080fd5b5035919050565b6001600160a01b0391909116815260200190565b60008060006060848603121561213657600080fd5b505081359360208301359350604090920135919050565b60008060008060008060c0878903121561216657600080fd5b8635612171816120bb565b95506020870135612181816120bb565b945060408701359350606087013592506080870135915060a08701356121a6816120bb565b809150509295509295509295565b600080600080606085870312156121ca57600080fd5b843593506020850135925060408501356001600160401b038111156121ee57600080fd5b6121fa87828801612028565b95989497509550505050565b6000806040838503121561221957600080fd5b50508035926020909101359150565b60208082526023908201527f4164617074657220616464726573732073686f756c64206e6f7420626520656d60408201526270747960e81b606082015260800190565b6020808252601b908201527a082dadeeadce840e8de40eed2e8d0c8e4c2ee40e8dede40d0d2ced602b1b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417611d8b57611d8b6122a0565b6000826122ea57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611d8b57611d8b6122a0565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8481526001600160a01b03841660208201526060604082018190526000906123569083018486612302565b9695505050505050565b6000806040838503121561237357600080fd5b505080516020909101519092909150565b9283526020830191909152604082015260600190565b602080825260159082015274141bdbdb081cda1bdd5b19081b9bdd08195b991959605a1b604082015260600190565b6000602082840312156123db57600080fd5b815160ff811681146120ed57600080fd5b600181815b8085111561242757816000190482111561240d5761240d6122a0565b8085161561241a57918102915b93841c93908002906123f1565b509250929050565b60008261243e57506001611d8b565b8161244b57506000611d8b565b8160018114612461576002811461246b57612487565b6001915050611d8b565b60ff84111561247c5761247c6122a0565b50506001821b611d8b565b5060208310610133831016604e8410600b84101617156124aa575081810a611d8b565b6124b483836123ec565b80600019048211156124c8576124c86122a0565b029392505050565b60006120ed838361242f565b6020808252601e908201527f7265776172645065725365636f6e64206d757374206265206c61726765720000604082015260600190565b60208082526038908201527f4e657720737461727454696d657374616d70206d757374206265206869676865604082015277072207468616e2063757272656e742074696d657374616d760441b606082015260800190565b60208082526036908201527f4e657720737461727454696d657374616d70206d757374206265206c6f7765726040820152750207468616e206e657720656e6454696d657374616d760541b606082015260800190565b60208082526016908201527504d75737420626520696e666572696f7220746f2033360541b604082015260600190565b60006020828403121561260357600080fd5b5051919050565b80820180821115611d8b57611d8b6122a0565b60006020828403121561262f57600080fd5b81516120ed816120bb565b85815284602082015260018060a01b038416604082015260806060820152600061198b608083018486612302565b6001600160a01b03929092168252602082015260400190565b60005b8381101561269c578181015183820152602001612684565b50506000910152565b600082516126b7818460208701612681565b9190910192915050565b6000602082840312156126d357600080fd5b815180151581146120ed57600080fd5b6020815260008251806020840152612702816040850160208701612681565b601f01601f1916919091016040019291505056fea264697066735822122089aa32faab25bb501d4ec292b13575b8f22abb94fbf6175e8e7daad850dee30b64736f6c63430008130033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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