MNT Price: $0.71 (+1.68%)

Contract

0x9f39dC8eA0a73ab462d23104699AFAE9c30d1E4f
 

Overview

MNT Balance

Mantle Mainnet Network LogoMantle Mainnet Network LogoMantle Mainnet Network Logo870,210.433982220818000001 MNT

MNT Value

$617,165.54 (@ $0.71/MNT)

Token Holdings

Transaction Hash
Method
Block
From
To
Withdraw786154792025-04-22 22:34:308 hrs ago1745361270IN
0x9f39dC8e...9c30d1E4f
0 MNT0.003070730.0202
Withdraw785901312025-04-22 8:29:3422 hrs ago1745310574IN
0x9f39dC8e...9c30d1E4f
0 MNT0.002836360.02
Withdraw785578512025-04-21 14:33:3440 hrs ago1745246014IN
0x9f39dC8e...9c30d1E4f
0 MNT0.004018380.02
Withdraw784713592025-04-19 14:30:303 days ago1745073030IN
0x9f39dC8e...9c30d1E4f
0 MNT0.007060880.03
Withdraw784679012025-04-19 12:35:143 days ago1745066114IN
0x9f39dC8e...9c30d1E4f
0 MNT0.003909090.02
Withdraw784581152025-04-19 7:09:023 days ago1745046542IN
0x9f39dC8e...9c30d1E4f
0 MNT0.003951180.0202
Withdraw784373282025-04-18 19:36:084 days ago1745004968IN
0x9f39dC8e...9c30d1E4f
0 MNT0.00305840.02
Withdraw784274332025-04-18 14:06:184 days ago1744985178IN
0x9f39dC8e...9c30d1E4f
0 MNT0.004667540.02
Withdraw784222192025-04-18 11:12:304 days ago1744974750IN
0x9f39dC8e...9c30d1E4f
0 MNT0.003859270.02
Withdraw784161822025-04-18 7:51:164 days ago1744962676IN
0x9f39dC8e...9c30d1E4f
0 MNT0.005753620.03
Withdraw783402602025-04-16 13:40:326 days ago1744810832IN
0x9f39dC8e...9c30d1E4f
0 MNT0.003904060.03
Withdraw783341262025-04-16 10:16:046 days ago1744798564IN
0x9f39dC8e...9c30d1E4f
0 MNT0.003674350.0202
Withdraw783020002025-04-15 16:25:127 days ago1744734312IN
0x9f39dC8e...9c30d1E4f
0 MNT0.005547950.03
Withdraw782994772025-04-15 15:01:067 days ago1744729266IN
0x9f39dC8e...9c30d1E4f
0 MNT0.002714840.02
Withdraw782811712025-04-15 4:50:548 days ago1744692654IN
0x9f39dC8e...9c30d1E4f
0 MNT0.005643640.03
Withdraw782592832025-04-14 16:41:188 days ago1744648878IN
0x9f39dC8e...9c30d1E4f
0 MNT0.004206670.03
Withdraw782510732025-04-14 12:07:388 days ago1744632458IN
0x9f39dC8e...9c30d1E4f
0 MNT0.003253670.02
Withdraw782471062025-04-14 9:55:248 days ago1744624524IN
0x9f39dC8e...9c30d1E4f
0 MNT0.007609470.04
Withdraw782166182025-04-13 16:59:089 days ago1744563548IN
0x9f39dC8e...9c30d1E4f
0 MNT0.003091640.03
Withdraw782165992025-04-13 16:58:309 days ago1744563510IN
0x9f39dC8e...9c30d1E4f
0 MNT0.003934210.03
Withdraw782129562025-04-13 14:57:049 days ago1744556224IN
0x9f39dC8e...9c30d1E4f
0 MNT0.002609430.02
Withdraw782058602025-04-13 11:00:329 days ago1744542032IN
0x9f39dC8e...9c30d1E4f
0 MNT0.006655380.03
Withdraw781729582025-04-12 16:43:4810 days ago1744476228IN
0x9f39dC8e...9c30d1E4f
0 MNT0.002691620.02
Withdraw781685172025-04-12 14:15:4610 days ago1744467346IN
0x9f39dC8e...9c30d1E4f
0 MNT0.004086420.03
Withdraw781666532025-04-12 13:13:3810 days ago1744463618IN
0x9f39dC8e...9c30d1E4f
0 MNT0.002665290.0202
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
786154792025-04-22 22:34:308 hrs ago1745361270
0x9f39dC8e...9c30d1E4f
603 MNT
785901312025-04-22 8:29:3422 hrs ago1745310574
0x9f39dC8e...9c30d1E4f
0.01 MNT
785578512025-04-21 14:33:3440 hrs ago1745246014
0x9f39dC8e...9c30d1E4f
20 MNT
784713592025-04-19 14:30:303 days ago1745073030
0x9f39dC8e...9c30d1E4f
45 MNT
784679012025-04-19 12:35:143 days ago1745066114
0x9f39dC8e...9c30d1E4f
5 MNT
784581152025-04-19 7:09:023 days ago1745046542
0x9f39dC8e...9c30d1E4f
2 MNT
784373282025-04-18 19:36:084 days ago1745004968
0x9f39dC8e...9c30d1E4f
10 MNT
784274332025-04-18 14:06:184 days ago1744985178
0x9f39dC8e...9c30d1E4f
1 MNT
784222192025-04-18 11:12:304 days ago1744974750
0x9f39dC8e...9c30d1E4f
63 MNT
784161822025-04-18 7:51:164 days ago1744962676
0x9f39dC8e...9c30d1E4f
12 MNT
783402602025-04-16 13:40:326 days ago1744810832
0x9f39dC8e...9c30d1E4f
40 MNT
783341262025-04-16 10:16:046 days ago1744798564
0x9f39dC8e...9c30d1E4f
62.5 MNT
783020002025-04-15 16:25:127 days ago1744734312
0x9f39dC8e...9c30d1E4f
4 MNT
782994772025-04-15 15:01:067 days ago1744729266
0x9f39dC8e...9c30d1E4f
355 MNT
782811712025-04-15 4:50:548 days ago1744692654
0x9f39dC8e...9c30d1E4f
3 MNT
782592832025-04-14 16:41:188 days ago1744648878
0x9f39dC8e...9c30d1E4f
55 MNT
782510732025-04-14 12:07:388 days ago1744632458
0x9f39dC8e...9c30d1E4f
180 MNT
782471062025-04-14 9:55:248 days ago1744624524
0x9f39dC8e...9c30d1E4f
1.5 MNT
782165992025-04-13 16:58:309 days ago1744563510
0x9f39dC8e...9c30d1E4f
1 MNT
782129562025-04-13 14:57:049 days ago1744556224
0x9f39dC8e...9c30d1E4f
470 MNT
782058602025-04-13 11:00:329 days ago1744542032
0x9f39dC8e...9c30d1E4f
2 MNT
781729582025-04-12 16:43:4810 days ago1744476228
0x9f39dC8e...9c30d1E4f
85 MNT
781685172025-04-12 14:15:4610 days ago1744467346
0x9f39dC8e...9c30d1E4f
300 MNT
781666532025-04-12 13:13:3810 days ago1744463618
0x9f39dC8e...9c30d1E4f
1.05 MNT
781652002025-04-12 12:25:1210 days ago1744460712
0x9f39dC8e...9c30d1E4f
1 MNT
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MntStakeV2Contract

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 12 : StakeV2.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";

contract MntStakeV2Contract is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    /* ========== STATE VARIABLES ========== */

    IERC20 public rewardToken; // rewardToken
    uint256 public constant TOTAL_REWARD = 2_500_000_000 * 1e18;

    uint256 public constant REWARD_DURATION = 30 days;
    uint256 public constant UNLOCK_TIME = 2 days;

    uint256 public immutable startTime;
    uint256 public immutable periodFinish;

    uint256 public rewardClaimPeriod = 9;
    uint256 public totalStakedAmount; // Total staked MNT
    uint256 public totalStakerCount; // Total stake address
    uint256 public rewardRate = TOTAL_REWARD / REWARD_DURATION; // rewards per second
    uint256 public lastUpdateTime; // Update time
    uint256 public rewardPerTokenStored; // Reward token amount  (* rewardRate)

    bool public paused;
    // user cumulative value
    mapping(address => uint256) public userRewardPerTokenPaid;
    //  current rewards
    mapping(address => uint256) public rewards;
    // Mapping to keep track of user balances
    mapping(address => uint256) public balances;

    /* ========== EVENTS ========== */

    event Stake(address indexed staker, uint256 amount);
    event Withdrawal(address indexed staker, uint256 amount);
    event RewardPaid(address indexed user, uint256 reward);

    modifier notPaused() {
        require(!paused, "Contract is paused");
        _;
    }

    modifier updateReward(address account) {
        if (block.timestamp >= startTime + UNLOCK_TIME) {
            // Update、 accumulate
            rewardPerTokenStored = rewardPerToken();
            // Update timestamp
            lastUpdateTime = lastTimeRewardApplicable();

            rewards[account] = earned(account);
            userRewardPerTokenPaid[account] = rewardPerTokenStored;
        }
        _;
    }

    constructor(address _rewardToken) Ownable(msg.sender) {
        rewardToken = IERC20(_rewardToken);
        startTime = block.timestamp;
        lastUpdateTime = startTime + UNLOCK_TIME;
        periodFinish = startTime + UNLOCK_TIME + REWARD_DURATION;
    }

    /// @notice Pauses the contract
    function pause() external onlyOwner {
        paused = true;
    }

    /// @notice Unpauses the contract
    function unpause() external onlyOwner {
        paused = false;
    }

    /// @notice Sets the period in which rewards can be claimed after distribution ends
    /// @dev Can only be called by the contract owner
    /// @param _days The number of days to set as the reward claim period
    function setRewardClaimPeriod(uint256 _days) external onlyOwner {
        rewardClaimPeriod = _days;
    }

    /// @notice Calculates the accumulated reward per token staked
    /// @dev This is a view function and does not modify state
    /// @return The calculated reward per token
    function rewardPerToken() public view returns (uint256) {
        if (totalStakedAmount == 0 || block.timestamp < startTime + UNLOCK_TIME) {
            return rewardPerTokenStored;
        }
        // accumulated value ( last accumulated value + next block ...)
        return rewardPerTokenStored
            + (rewardRate * (lastTimeRewardApplicable() - lastUpdateTime) * 1e18) / totalStakedAmount;
    }

    /// @notice Determines the last applicable timestamp for reward calculations
    /// @dev Used to ensure rewards are not calculated beyond the distribution finish time
    /// @return The last applicable timestamp for reward calculations
    function lastTimeRewardApplicable() public view returns (uint256) {
        return block.timestamp < periodFinish ? block.timestamp : periodFinish;
    }

    /// @notice Calculates the total rewards earned by an account
    /// @dev Includes both newly earned rewards and previously accumulated rewards
    /// @param account The account to calculate rewards for
    /// @return The total rewards earned by the account
    function earned(address account) public view returns (uint256) {
        uint256 currentBalance = balances[account];
        // cumulative value
        uint256 amountPaid = userRewardPerTokenPaid[account];
        return (currentBalance * (rewardPerToken() - amountPaid)) / 1e18 + rewards[account];
    }

    /// @notice Allows a user to stake their tokens into the contract
    /// @dev Payable function that updates the user's staked balance and total staked amount
    function stake() external payable notPaused nonReentrant updateReward(msg.sender) {
        require(msg.value > 0, "Cannot stake 0");

        if (balances[msg.sender] == 0) {
            totalStakerCount += 1;
        }

        balances[msg.sender] += msg.value;
        totalStakedAmount += msg.value;

        emit Stake(msg.sender, msg.value);
    }

    /// @notice Withdraws all staked tokens for the sender
    /// @dev Withdraws the sender's balance and updates the staker count accordingly
    function withdrawAll() external {
        withdraw(balances[msg.sender]);
    }

    /// @notice Withdraws a specified amount of staked tokens for the sender
    /// @param amount The amount to withdraw
    function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
        require(amount > 0, "Cannot withdraw 0");
        require(amount <= balances[msg.sender], "Insufficient balance to withdraw");
        // Effects
        balances[msg.sender] -= amount;
        totalStakedAmount -= amount;
        if (balances[msg.sender] == 0) {
            totalStakerCount -= 1;
        }

        // Interaction
        (bool success,) = msg.sender.call{value: amount}("");
        require(success, "Transfer failed.");

        emit Withdrawal(msg.sender, amount);
    }

    /// @notice Allows a user to claim their accrued reward tokens
    /// @dev Transfers the appropriate reward amount to the sender if within the claim period
    function claimReward() public notPaused nonReentrant updateReward(msg.sender) {
        // Ensure that this function is called within 7 days after rewards have finished
        require(block.timestamp <= periodFinish + (rewardClaimPeriod * 1 days), "Reward period has expired");
        // Calculate the amount of reward tokens earned by the sender
        uint256 reward = earned(msg.sender);

        if (reward > 0) {
            rewards[msg.sender] = 0;
            // Transfer the claimed tokens to the sender
            rewardToken.safeTransfer(msg.sender, reward);
            // Emit an event for successful reward claim
            emit RewardPaid(msg.sender, reward);
        }
    }

    /// @notice Allows the owner to withdraw any unclaimed rewards after the reward claim period
    /// @dev Transfers the remaining unclaimed rewards to the owner
    function withdrawRemainingRewards() external onlyOwner {
        require(block.timestamp > periodFinish + (rewardClaimPeriod * 1 days), "The reward period has not ended yet");
        uint256 remainingRewards = rewardToken.balanceOf(address(this));
        require(remainingRewards > 0, "No remaining rewards to withdraw");

        rewardToken.safeTransfer(owner(), remainingRewards);

        emit RewardPaid(owner(), remainingRewards);
    }
}

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

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

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

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

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

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

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

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

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
import {Address} from "../../../utils/Address.sol";

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

    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

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

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

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

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

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

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

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

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

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

        bytes memory returndata = address(token).functionCall(data);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

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

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

File 4 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

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

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

    uint256 private _status;

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

    constructor() {
        _status = NOT_ENTERED;
    }

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

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

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

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

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

pragma solidity ^0.8.20;

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

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

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

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

File 7 of 12 : IERC1363.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

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

pragma solidity ^0.8.20;

import {Errors} from "./Errors.sol";

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert Errors.InsufficientBalance(address(this).balance, value);
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

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

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

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

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

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

File 9 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

File 10 of 12 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

File 11 of 12 : Errors.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

/**
 * @dev Collection of common custom errors used in multiple contracts
 *
 * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
 * It is recommended to avoid relying on the error API for critical functionality.
 */
library Errors {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error InsufficientBalance(uint256 balance, uint256 needed);

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

    /**
     * @dev The deployment failed.
     */
    error FailedDeployment();
}

File 12 of 12 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[],"name":"REWARD_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_REWARD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNLOCK_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardClaimPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_days","type":"uint256"}],"name":"setRewardClaimPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawRemainingRewards","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405260096003556200002462278d006b0813f3978f8940984400000062000140565b6006553480156200003457600080fd5b506040516200153438038062001534833981016040819052620000579162000163565b33806200007e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200008981620000f0565b5060018055600280546001600160a01b0319166001600160a01b038316179055426080819052620000bf906202a3009062000195565b60075560805162278d0090620000da906202a3009062000195565b620000e6919062000195565b60a05250620001bd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826200015e57634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156200017657600080fd5b81516001600160a01b03811681146200018e57600080fd5b9392505050565b80820180821115620001b757634e487b7160e01b600052601160045260246000fd5b92915050565b60805160a0516113196200021b600039600081816104db0152818161084c01528181610bf601528181610c1e0152610d5c01526000818161037d015281816105d701528181610a5c01528181610cd10152610e6301526113196000f3fe6080604052600436106101cc5760003560e01c80637b0a47ee116100f7578063c8333bb211610095578063ebe2b12b11610064578063ebe2b12b146104c9578063f2bc4c9c146104fd578063f2fde38b14610513578063f7c618c11461053357600080fd5b8063c8333bb214610468578063c8f33c9114610488578063cd3daf9d1461049e578063df136d65146104b357600080fd5b8063853828b6116100d1578063853828b6146103df5780638b876347146103f45780638da5cb5b14610421578063b88a802f1461045357600080fd5b80637b0a47ee1461039f57806380faa57d146103b55780638456cb59146103ca57600080fd5b80633a7e98fd1161016f5780635ade228a1161013e5780635ade228a146103155780635c975abb1461032c578063715018a61461035657806378e979251461036b57600080fd5b80633a7e98fd146102b35780633f4ba83a146102d357806341319831146102e8578063567e98f9146102ff57600080fd5b8063299cf3e0116101ab578063299cf3e01461025e5780632e1a7d4d1461027457806330865362146102965780633a4b66f1146102ab57600080fd5b80628cc262146101d15780630700037d1461020457806327e235e314610231575b600080fd5b3480156101dd57600080fd5b506101f16101ec3660046111c2565b610553565b6040519081526020015b60405180910390f35b34801561021057600080fd5b506101f161021f3660046111c2565b600b6020526000908152604090205481565b34801561023d57600080fd5b506101f161024c3660046111c2565b600c6020526000908152604090205481565b34801561026a57600080fd5b506101f160035481565b34801561028057600080fd5b5061029461028f3660046111eb565b6105c5565b005b3480156102a257600080fd5b5061029461082e565b610294610a02565b3480156102bf57600080fd5b506102946102ce3660046111eb565b610bbf565b3480156102df57600080fd5b50610294610bcc565b3480156102f457600080fd5b506101f16202a30081565b34801561030b57600080fd5b506101f160045481565b34801561032157600080fd5b506101f162278d0081565b34801561033857600080fd5b506009546103469060ff1681565b60405190151581526020016101fb565b34801561036257600080fd5b50610294610be0565b34801561037757600080fd5b506101f17f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ab57600080fd5b506101f160065481565b3480156103c157600080fd5b506101f1610bf2565b3480156103d657600080fd5b50610294610c47565b3480156103eb57600080fd5b50610294610c5e565b34801561040057600080fd5b506101f161040f3660046111c2565b600a6020526000908152604090205481565b34801561042d57600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020016101fb565b34801561045f57600080fd5b50610294610c77565b34801561047457600080fd5b506101f16b0813f3978f8940984400000081565b34801561049457600080fd5b506101f160075481565b3480156104aa57600080fd5b506101f1610e4c565b3480156104bf57600080fd5b506101f160085481565b3480156104d557600080fd5b506101f17f000000000000000000000000000000000000000000000000000000000000000081565b34801561050957600080fd5b506101f160055481565b34801561051f57600080fd5b5061029461052e3660046111c2565b610ee4565b34801561053f57600080fd5b5060025461043b906001600160a01b031681565b6001600160a01b0381166000908152600c6020908152604080832054600a835281842054600b90935290832054909190670de0b6b3a764000082610595610e4c565b61059f919061121a565b6105a9908561122d565b6105b39190611244565b6105bd9190611266565b949350505050565b6105cd610f1f565b336105fb6202a3007f0000000000000000000000000000000000000000000000000000000000000000611266565b421061064c57610609610e4c565b600855610614610bf2565b60075561062081610553565b6001600160a01b0382166000908152600b6020908152604080832093909355600854600a909152919020555b600082116106955760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b60448201526064015b60405180910390fd5b336000908152600c60205260409020548211156106f45760405162461bcd60e51b815260206004820181905260248201527f496e73756666696369656e742062616c616e636520746f207769746864726177604482015260640161068c565b336000908152600c60205260408120805484929061071390849061121a565b92505081905550816004600082825461072c919061121a565b9091555050336000908152600c602052604081205490036107605760016005600082825461075a919061121a565b90915550505b604051600090339084908381818185875af1925050503d80600081146107a2576040519150601f19603f3d011682016040523d82523d6000602084013e6107a7565b606091505b50509050806107eb5760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b604482015260640161068c565b60405183815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a2505061082b60018055565b50565b610836610f49565b600354610846906201518061122d565b610870907f0000000000000000000000000000000000000000000000000000000000000000611266565b42116108ca5760405162461bcd60e51b815260206004820152602360248201527f5468652072657761726420706572696f6420686173206e6f7420656e646564206044820152621e595d60ea1b606482015260840161068c565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109379190611279565b9050600081116109895760405162461bcd60e51b815260206004820181905260248201527f4e6f2072656d61696e696e67207265776172647320746f207769746864726177604482015260640161068c565b6109b161099e6000546001600160a01b031690565b6002546001600160a01b03169083610f76565b6000546001600160a01b03166001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486826040516109f791815260200190565b60405180910390a250565b60095460ff1615610a4a5760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b604482015260640161068c565b610a52610f1f565b33610a806202a3007f0000000000000000000000000000000000000000000000000000000000000000611266565b4210610ad157610a8e610e4c565b600855610a99610bf2565b600755610aa581610553565b6001600160a01b0382166000908152600b6020908152604080832093909355600854600a909152919020555b60003411610b125760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015260640161068c565b336000908152600c60205260408120549003610b4157600160056000828254610b3b9190611266565b90915550505b336000908152600c602052604081208054349290610b60908490611266565b925050819055503460046000828254610b799190611266565b909155505060405134815233907febedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a9060200160405180910390a250610bbd60018055565b565b610bc7610f49565b600355565b610bd4610f49565b6009805460ff19169055565b610be8610f49565b610bbd6000610fcd565b60007f00000000000000000000000000000000000000000000000000000000000000004210610c4057507f000000000000000000000000000000000000000000000000000000000000000090565b425b905090565b610c4f610f49565b6009805460ff19166001179055565b336000908152600c6020526040902054610bbd906105c5565b60095460ff1615610cbf5760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b604482015260640161068c565b610cc7610f1f565b33610cf56202a3007f0000000000000000000000000000000000000000000000000000000000000000611266565b4210610d4657610d03610e4c565b600855610d0e610bf2565b600755610d1a81610553565b6001600160a01b0382166000908152600b6020908152604080832093909355600854600a909152919020555b600354610d56906201518061122d565b610d80907f0000000000000000000000000000000000000000000000000000000000000000611266565b421115610dcf5760405162461bcd60e51b815260206004820152601960248201527f52657761726420706572696f6420686173206578706972656400000000000000604482015260640161068c565b6000610dda33610553565b90508015610e4157336000818152600b6020526040812055600254610e0b916001600160a01b039091169083610f76565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a25b5050610bbd60018055565b600060045460001480610e8a5750610e876202a3007f0000000000000000000000000000000000000000000000000000000000000000611266565b42105b15610e96575060085490565b600454600754610ea4610bf2565b610eae919061121a565b600654610ebb919061122d565b610ecd90670de0b6b3a764000061122d565b610ed79190611244565b600854610c429190611266565b610eec610f49565b6001600160a01b038116610f1657604051631e4fbdf760e01b81526000600482015260240161068c565b61082b81610fcd565b600260015403610f4257604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b6000546001600160a01b03163314610bbd5760405163118cdaa760e01b815233600482015260240161068c565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610fc890849061101d565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006110326001600160a01b03841683611080565b905080516000141580156110575750808060200190518101906110559190611292565b155b15610fc857604051635274afe760e01b81526001600160a01b038416600482015260240161068c565b606061108e83836000611097565b90505b92915050565b6060814710156110c35760405163cf47918160e01b81524760048201526024810183905260440161068c565b600080856001600160a01b031684866040516110df91906112b4565b60006040518083038185875af1925050503d806000811461111c576040519150601f19603f3d011682016040523d82523d6000602084013e611121565b606091505b509150915061113186838361113d565b925050505b9392505050565b6060826111525761114d82611199565b611136565b815115801561116957506001600160a01b0384163b155b1561119257604051639996b31560e01b81526001600160a01b038516600482015260240161068c565b5080611136565b8051156111a95780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b6000602082840312156111d457600080fd5b81356001600160a01b038116811461113657600080fd5b6000602082840312156111fd57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561109157611091611204565b808202811582820484141761109157611091611204565b60008261126157634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561109157611091611204565b60006020828403121561128b57600080fd5b5051919050565b6000602082840312156112a457600080fd5b8151801515811461113657600080fd5b6000825160005b818110156112d557602081860181015185830152016112bb565b50600092019182525091905056fea2646970667358221220f8347b45f025f58ef0fbb7df70ece2b9ee51e4a7d4bda811fb7f22f7068005df64736f6c63430008180033000000000000000000000000d7782b99671dd23203ebd4584fc71cf2b3dbb111

Deployed Bytecode

0x6080604052600436106101cc5760003560e01c80637b0a47ee116100f7578063c8333bb211610095578063ebe2b12b11610064578063ebe2b12b146104c9578063f2bc4c9c146104fd578063f2fde38b14610513578063f7c618c11461053357600080fd5b8063c8333bb214610468578063c8f33c9114610488578063cd3daf9d1461049e578063df136d65146104b357600080fd5b8063853828b6116100d1578063853828b6146103df5780638b876347146103f45780638da5cb5b14610421578063b88a802f1461045357600080fd5b80637b0a47ee1461039f57806380faa57d146103b55780638456cb59146103ca57600080fd5b80633a7e98fd1161016f5780635ade228a1161013e5780635ade228a146103155780635c975abb1461032c578063715018a61461035657806378e979251461036b57600080fd5b80633a7e98fd146102b35780633f4ba83a146102d357806341319831146102e8578063567e98f9146102ff57600080fd5b8063299cf3e0116101ab578063299cf3e01461025e5780632e1a7d4d1461027457806330865362146102965780633a4b66f1146102ab57600080fd5b80628cc262146101d15780630700037d1461020457806327e235e314610231575b600080fd5b3480156101dd57600080fd5b506101f16101ec3660046111c2565b610553565b6040519081526020015b60405180910390f35b34801561021057600080fd5b506101f161021f3660046111c2565b600b6020526000908152604090205481565b34801561023d57600080fd5b506101f161024c3660046111c2565b600c6020526000908152604090205481565b34801561026a57600080fd5b506101f160035481565b34801561028057600080fd5b5061029461028f3660046111eb565b6105c5565b005b3480156102a257600080fd5b5061029461082e565b610294610a02565b3480156102bf57600080fd5b506102946102ce3660046111eb565b610bbf565b3480156102df57600080fd5b50610294610bcc565b3480156102f457600080fd5b506101f16202a30081565b34801561030b57600080fd5b506101f160045481565b34801561032157600080fd5b506101f162278d0081565b34801561033857600080fd5b506009546103469060ff1681565b60405190151581526020016101fb565b34801561036257600080fd5b50610294610be0565b34801561037757600080fd5b506101f17f0000000000000000000000000000000000000000000000000000000066014c4881565b3480156103ab57600080fd5b506101f160065481565b3480156103c157600080fd5b506101f1610bf2565b3480156103d657600080fd5b50610294610c47565b3480156103eb57600080fd5b50610294610c5e565b34801561040057600080fd5b506101f161040f3660046111c2565b600a6020526000908152604090205481565b34801561042d57600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020016101fb565b34801561045f57600080fd5b50610294610c77565b34801561047457600080fd5b506101f16b0813f3978f8940984400000081565b34801561049457600080fd5b506101f160075481565b3480156104aa57600080fd5b506101f1610e4c565b3480156104bf57600080fd5b506101f160085481565b3480156104d557600080fd5b506101f17f00000000000000000000000000000000000000000000000000000000662b7c4881565b34801561050957600080fd5b506101f160055481565b34801561051f57600080fd5b5061029461052e3660046111c2565b610ee4565b34801561053f57600080fd5b5060025461043b906001600160a01b031681565b6001600160a01b0381166000908152600c6020908152604080832054600a835281842054600b90935290832054909190670de0b6b3a764000082610595610e4c565b61059f919061121a565b6105a9908561122d565b6105b39190611244565b6105bd9190611266565b949350505050565b6105cd610f1f565b336105fb6202a3007f0000000000000000000000000000000000000000000000000000000066014c48611266565b421061064c57610609610e4c565b600855610614610bf2565b60075561062081610553565b6001600160a01b0382166000908152600b6020908152604080832093909355600854600a909152919020555b600082116106955760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b60448201526064015b60405180910390fd5b336000908152600c60205260409020548211156106f45760405162461bcd60e51b815260206004820181905260248201527f496e73756666696369656e742062616c616e636520746f207769746864726177604482015260640161068c565b336000908152600c60205260408120805484929061071390849061121a565b92505081905550816004600082825461072c919061121a565b9091555050336000908152600c602052604081205490036107605760016005600082825461075a919061121a565b90915550505b604051600090339084908381818185875af1925050503d80600081146107a2576040519150601f19603f3d011682016040523d82523d6000602084013e6107a7565b606091505b50509050806107eb5760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b604482015260640161068c565b60405183815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a2505061082b60018055565b50565b610836610f49565b600354610846906201518061122d565b610870907f00000000000000000000000000000000000000000000000000000000662b7c48611266565b42116108ca5760405162461bcd60e51b815260206004820152602360248201527f5468652072657761726420706572696f6420686173206e6f7420656e646564206044820152621e595d60ea1b606482015260840161068c565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109379190611279565b9050600081116109895760405162461bcd60e51b815260206004820181905260248201527f4e6f2072656d61696e696e67207265776172647320746f207769746864726177604482015260640161068c565b6109b161099e6000546001600160a01b031690565b6002546001600160a01b03169083610f76565b6000546001600160a01b03166001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486826040516109f791815260200190565b60405180910390a250565b60095460ff1615610a4a5760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b604482015260640161068c565b610a52610f1f565b33610a806202a3007f0000000000000000000000000000000000000000000000000000000066014c48611266565b4210610ad157610a8e610e4c565b600855610a99610bf2565b600755610aa581610553565b6001600160a01b0382166000908152600b6020908152604080832093909355600854600a909152919020555b60003411610b125760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015260640161068c565b336000908152600c60205260408120549003610b4157600160056000828254610b3b9190611266565b90915550505b336000908152600c602052604081208054349290610b60908490611266565b925050819055503460046000828254610b799190611266565b909155505060405134815233907febedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a9060200160405180910390a250610bbd60018055565b565b610bc7610f49565b600355565b610bd4610f49565b6009805460ff19169055565b610be8610f49565b610bbd6000610fcd565b60007f00000000000000000000000000000000000000000000000000000000662b7c484210610c4057507f00000000000000000000000000000000000000000000000000000000662b7c4890565b425b905090565b610c4f610f49565b6009805460ff19166001179055565b336000908152600c6020526040902054610bbd906105c5565b60095460ff1615610cbf5760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b604482015260640161068c565b610cc7610f1f565b33610cf56202a3007f0000000000000000000000000000000000000000000000000000000066014c48611266565b4210610d4657610d03610e4c565b600855610d0e610bf2565b600755610d1a81610553565b6001600160a01b0382166000908152600b6020908152604080832093909355600854600a909152919020555b600354610d56906201518061122d565b610d80907f00000000000000000000000000000000000000000000000000000000662b7c48611266565b421115610dcf5760405162461bcd60e51b815260206004820152601960248201527f52657761726420706572696f6420686173206578706972656400000000000000604482015260640161068c565b6000610dda33610553565b90508015610e4157336000818152600b6020526040812055600254610e0b916001600160a01b039091169083610f76565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a25b5050610bbd60018055565b600060045460001480610e8a5750610e876202a3007f0000000000000000000000000000000000000000000000000000000066014c48611266565b42105b15610e96575060085490565b600454600754610ea4610bf2565b610eae919061121a565b600654610ebb919061122d565b610ecd90670de0b6b3a764000061122d565b610ed79190611244565b600854610c429190611266565b610eec610f49565b6001600160a01b038116610f1657604051631e4fbdf760e01b81526000600482015260240161068c565b61082b81610fcd565b600260015403610f4257604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b6000546001600160a01b03163314610bbd5760405163118cdaa760e01b815233600482015260240161068c565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610fc890849061101d565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006110326001600160a01b03841683611080565b905080516000141580156110575750808060200190518101906110559190611292565b155b15610fc857604051635274afe760e01b81526001600160a01b038416600482015260240161068c565b606061108e83836000611097565b90505b92915050565b6060814710156110c35760405163cf47918160e01b81524760048201526024810183905260440161068c565b600080856001600160a01b031684866040516110df91906112b4565b60006040518083038185875af1925050503d806000811461111c576040519150601f19603f3d011682016040523d82523d6000602084013e611121565b606091505b509150915061113186838361113d565b925050505b9392505050565b6060826111525761114d82611199565b611136565b815115801561116957506001600160a01b0384163b155b1561119257604051639996b31560e01b81526001600160a01b038516600482015260240161068c565b5080611136565b8051156111a95780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b6000602082840312156111d457600080fd5b81356001600160a01b038116811461113657600080fd5b6000602082840312156111fd57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561109157611091611204565b808202811582820484141761109157611091611204565b60008261126157634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561109157611091611204565b60006020828403121561128b57600080fd5b5051919050565b6000602082840312156112a457600080fd5b8151801515811461113657600080fd5b6000825160005b818110156112d557602081860181015185830152016112bb565b50600092019182525091905056fea2646970667358221220f8347b45f025f58ef0fbb7df70ece2b9ee51e4a7d4bda811fb7f22f7068005df64736f6c63430008180033

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

000000000000000000000000d7782b99671dd23203ebd4584fc71cf2b3dbb111

-----Decoded View---------------
Arg [0] : _rewardToken (address): 0xD7782b99671DD23203eBd4584FC71cf2B3dbB111

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000d7782b99671dd23203ebd4584fc71cf2b3dbb111


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
[ 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.