ETH Price: $3,388.17 (+1.28%)

Contract

0x377E168aF6A06075423AEDe50856dE177EfaAc3E
 

Overview

ETH Balance

39.498544863235588538 ETH

Eth Value

$133,827.76 (@ $3,388.17/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim Rewards215021122024-12-28 16:18:5951 mins ago1735402739IN
0x377E168a...77EfaAc3E
0 ETH0.000422466.29309154
Claim Rewards215011392024-12-28 13:03:594 hrs ago1735391039IN
0x377E168a...77EfaAc3E
0 ETH0.000250464.68587501
Claim Rewards215008512024-12-28 12:05:595 hrs ago1735387559IN
0x377E168a...77EfaAc3E
0 ETH0.000267785.00998504
Unstake215005722024-12-28 11:09:356 hrs ago1735384175IN
0x377E168a...77EfaAc3E
0 ETH0.000403864.75327861
Claim Rewards215005682024-12-28 11:08:476 hrs ago1735384127IN
0x377E168a...77EfaAc3E
0 ETH0.000307994.58791924
Unstake215003292024-12-28 10:20:596 hrs ago1735381259IN
0x377E168a...77EfaAc3E
0 ETH0.000391214.34460161
Claim Rewards215002742024-12-28 10:09:477 hrs ago1735380587IN
0x377E168a...77EfaAc3E
0 ETH0.000368475.48891559
Stake214998402024-12-28 8:42:358 hrs ago1735375355IN
0x377E168a...77EfaAc3E
0 ETH0.000462714.18008575
Claim Rewards214996912024-12-28 8:12:478 hrs ago1735373567IN
0x377E168a...77EfaAc3E
0 ETH0.000224594.20195609
Claim Rewards214992652024-12-28 6:47:2310 hrs ago1735368443IN
0x377E168a...77EfaAc3E
0 ETH0.000201123.2433354
Claim Unstaked T...214983682024-12-28 3:46:5913 hrs ago1735357619IN
0x377E168a...77EfaAc3E
0 ETH0.000443515.2958336
Stake214976342024-12-28 1:19:5915 hrs ago1735348799IN
0x377E168a...77EfaAc3E
0 ETH0.000755934.58483997
Stake214973352024-12-28 0:19:5916 hrs ago1735345199IN
0x377E168a...77EfaAc3E
0 ETH0.000533615.03847162
Stake214971682024-12-27 23:46:2317 hrs ago1735343183IN
0x377E168a...77EfaAc3E
0 ETH0.000748564.5401456
Stake214968532024-12-27 22:42:3518 hrs ago1735339355IN
0x377E168a...77EfaAc3E
0 ETH0.000841145.10204604
Stake214966442024-12-27 22:00:3519 hrs ago1735336835IN
0x377E168a...77EfaAc3E
0 ETH0.000916925.56132985
Stake214964512024-12-27 21:21:4719 hrs ago1735334507IN
0x377E168a...77EfaAc3E
0 ETH0.000573356.84894156
Claim Unstaked T...214963902024-12-27 21:09:3520 hrs ago1735333775IN
0x377E168a...77EfaAc3E
0 ETH0.000448375.3538582
Stake214963382024-12-27 20:58:5920 hrs ago1735333139IN
0x377E168a...77EfaAc3E
0 ETH0.000637067.17346191
Stake214962222024-12-27 20:35:4720 hrs ago1735331747IN
0x377E168a...77EfaAc3E
0 ETH0.001036046.28376744
Stake214962002024-12-27 20:31:2320 hrs ago1735331483IN
0x377E168a...77EfaAc3E
0 ETH0.001056336.40682051
Stake214950212024-12-27 16:34:2324 hrs ago1735317263IN
0x377E168a...77EfaAc3E
0 ETH0.000770249.39993017
Stake214949932024-12-27 16:28:4724 hrs ago1735316927IN
0x377E168a...77EfaAc3E
0 ETH0.000713048.7017893
Stake214945962024-12-27 15:08:5926 hrs ago1735312139IN
0x377E168a...77EfaAc3E
0 ETH0.0004994211.42611903
Unstake214945822024-12-27 15:06:1126 hrs ago1735311971IN
0x377E168a...77EfaAc3E
0 ETH0.0008109811.94990221
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
215021122024-12-28 16:18:5951 mins ago1735402739
0x377E168a...77EfaAc3E
0.02155703 ETH
215020702024-12-28 16:10:351 hr ago1735402235
0x377E168a...77EfaAc3E
0.03570077 ETH
215016022024-12-28 14:36:592 hrs ago1735396619
0x377E168a...77EfaAc3E
0.03810854 ETH
215011392024-12-28 13:03:594 hrs ago1735391039
0x377E168a...77EfaAc3E
0.48093241 ETH
215008512024-12-28 12:05:595 hrs ago1735387559
0x377E168a...77EfaAc3E
0.0107425 ETH
215005682024-12-28 11:08:476 hrs ago1735384127
0x377E168a...77EfaAc3E
0.00422903 ETH
215002742024-12-28 10:09:477 hrs ago1735380587
0x377E168a...77EfaAc3E
0.01719479 ETH
215002462024-12-28 10:04:117 hrs ago1735380251
0x377E168a...77EfaAc3E
0.03852038 ETH
215001012024-12-28 9:35:117 hrs ago1735378511
0x377E168a...77EfaAc3E
0 ETH
214996912024-12-28 8:12:478 hrs ago1735373567
0x377E168a...77EfaAc3E
0.04561849 ETH
214992652024-12-28 6:47:2310 hrs ago1735368443
0x377E168a...77EfaAc3E
0.04492214 ETH
214991942024-12-28 6:32:5910 hrs ago1735367579
0x377E168a...77EfaAc3E
0.0373593 ETH
214991902024-12-28 6:32:1110 hrs ago1735367531
0x377E168a...77EfaAc3E
0.0373593 ETH
214986742024-12-28 4:48:2312 hrs ago1735361303
0x377E168a...77EfaAc3E
0.04033664 ETH
214983012024-12-28 3:33:3513 hrs ago1735356815
0x377E168a...77EfaAc3E
0.0380836 ETH
214982052024-12-28 3:14:2313 hrs ago1735355663
0x377E168a...77EfaAc3E
0.00017854 ETH
214967502024-12-27 22:21:4718 hrs ago1735338107
0x377E168a...77EfaAc3E
0.09966619 ETH
214966362024-12-27 21:58:5919 hrs ago1735336739
0x377E168a...77EfaAc3E
0.04013445 ETH
214959752024-12-27 19:46:1121 hrs ago1735328771
0x377E168a...77EfaAc3E
0 ETH
214959722024-12-27 19:45:3521 hrs ago1735328735
0x377E168a...77EfaAc3E
0 ETH
214955792024-12-27 18:26:3522 hrs ago1735323995
0x377E168a...77EfaAc3E
0.03903341 ETH
214949862024-12-27 16:27:2324 hrs ago1735316843
0x377E168a...77EfaAc3E
0.00000001 ETH
214947652024-12-27 15:42:5925 hrs ago1735314179
0x377E168a...77EfaAc3E
0.03926368 ETH
214946552024-12-27 15:20:4725 hrs ago1735312847
0x377E168a...77EfaAc3E
0.03989887 ETH
214945492024-12-27 14:59:3526 hrs ago1735311575
0x377E168a...77EfaAc3E
0.06683375 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ProofStaking

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : ProofStaking.sol
// SPDX-License-Identifier: None
pragma solidity ^0.8.19;

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

import "./interfaces/IProofStaking.sol";

contract ProofStaking is Ownable, IProofStaking {
    using SafeERC20 for IERC20;
    
    mapping(address => UserInfo) public userInfo;
    mapping(address => uint256) public rewardDebt;
    mapping(address => uint256) public totalRewardDeposits;

    uint256 public totalStakedAmount;
    uint256 public unstakeDuration = 2 days;
    uint256 public unallocatedETH;
    uint256 public accRewardsPerShare;
    uint256 public ethDebt;
    uint256 public globalETHCollected;

    address[] userList;
    address[] depositorList;

    IERC20 public immutable proofToken;
    
    event Stake(address indexed user, uint256 amount);
    event Unstake(address indexed user, uint256 amount);
    event Withdraw(address indexed user, uint256 amount);
    event Claim(address indexed user, uint256 amount);

    constructor(address _proofToken) {
        proofToken = IERC20(_proofToken);
    }

    function stake(uint256 _amount) external override {
        UserInfo storage user = userInfo[msg.sender];
        uint256 pending;
        if (_amount == 0) { revert('cant stake 0'); }

        if (!user.existingStaker) {
            user.existingStaker = true;
            userList.push(msg.sender);
        }

        if (user.stakedAmount > 0) {
            pending = ((user.stakedAmount * accRewardsPerShare) / 1e24) - user.rewardDebt;
        }

        uint256 pendingUnstake = user.pendingUnstakeAmount;
        if (pendingUnstake >= _amount) {
            user.pendingUnstakeAmount -= _amount;
        } else {
            uint256 tokensNeeded = _amount - pendingUnstake;
            user.pendingUnstakeAmount = 0;
            proofToken.safeTransferFrom(msg.sender, address(this), tokensNeeded);
        }
        
        user.stakedAmount += _amount;
        user.rewardDebt = user.stakedAmount * accRewardsPerShare / 1e24;
        totalStakedAmount += _amount;

        if(pending > 0) {
            user.claimableRewards += pending;
        }
        
        emit Stake(msg.sender, _amount);
    }


    function unstake(uint256 _amount) external override {
        UserInfo storage user = userInfo[msg.sender];
        if (_amount == 0) { revert('cant unstake 0'); }
        if (user.stakedAmount < _amount) { revert('not enough staked'); }
        uint256 pending = ((user.stakedAmount * accRewardsPerShare) / 1e24) - user.rewardDebt;
        user.stakedAmount -= _amount;
        user.lastUnstakeTime = block.timestamp;
        user.pendingUnstakeAmount += _amount;
        user.rewardDebt = user.stakedAmount * accRewardsPerShare / 1e24;
        totalStakedAmount -= _amount;

        if(pending > 0) {
            user.claimableRewards += pending;
        }

        emit Unstake(msg.sender, _amount);
    }

    function restakeTokens() external override {
        UserInfo storage user = userInfo[msg.sender];
        uint256 pending;
        uint256 amountToRestake = user.pendingUnstakeAmount;
        if (amountToRestake == 0) { revert('No pending unstakes'); }

        if (user.stakedAmount > 0) {
            pending = ((user.stakedAmount * accRewardsPerShare) / 1e24) - user.rewardDebt;
        }

        user.pendingUnstakeAmount = 0;
        user.stakedAmount += amountToRestake;
        user.rewardDebt = user.stakedAmount * accRewardsPerShare / 1e24;
        totalStakedAmount += amountToRestake;

        if(pending > 0) {
            user.claimableRewards += pending;
        }
    }

    function claimUnstakedToken() external override {
        UserInfo storage user = userInfo[msg.sender];
        uint256 toWithdraw = user.pendingUnstakeAmount;
        if (toWithdraw == 0) { revert('No pending unstakes'); }
        if (block.timestamp < user.lastUnstakeTime + unstakeDuration) { revert('unstake not ready'); }
        user.pendingUnstakeAmount = 0;
        proofToken.safeTransfer(msg.sender, toWithdraw);
        emit Withdraw(msg.sender, toWithdraw);
    }


    function claimRewards() public override {
        UserInfo storage user = userInfo[msg.sender];
        user.claimableRewards += ((user.stakedAmount * accRewardsPerShare) / 1e24) - user.rewardDebt;
        uint256 claimable = user.claimableRewards;
        if (claimable == 0) { revert('no rewards to claim'); }  
        user.rewardDebt = user.stakedAmount * accRewardsPerShare / 1e24;
        uint256 amount = address(this).balance > claimable ? claimable : address(this).balance;
        user.claimableRewards -= amount;
        user.claimedAmount += amount; //for analytics only
        (bool sent, ) = msg.sender.call{value: amount}("");
        if (!sent) { revert('sending ETH failed'); }
        emit Claim(msg.sender, amount);
    }
    

    function setUnstakingDuration(uint256 newDuration) external override onlyOwner {
        unstakeDuration = newDuration;
    }

    function refreshPool() external override onlyOwner {
        uint256 amountToAdd = unallocatedETH;
        if (amountToAdd == 0) { revert('no unallocated ETH'); }
        if (totalStakedAmount == 0) { revert('"no holders'); }

        unallocatedETH = 0;
        accRewardsPerShare += (amountToAdd * 1e24) / totalStakedAmount; //precision
    }

    receive() external payable {
        uint256 amount = msg.value;
        if (amount == 0) { revert('no ETH'); }
        if (totalRewardDeposits[msg.sender] == 0) {
            depositorList.push(msg.sender);
        }
        totalRewardDeposits[msg.sender] += amount;
        globalETHCollected += amount;
        if (totalStakedAmount == 0) {
            unallocatedETH += amount;
        } else {
            if (ethDebt == 0) {
                accRewardsPerShare += (amount * 1e24) / totalStakedAmount;
            } else if (ethDebt >= amount) {
                ethDebt -= amount;
            } else { //amount > ethDebt and we have some ethDebt
                accRewardsPerShare += ((amount - ethDebt) * 1e24) / totalStakedAmount;
                ethDebt = 0;
            }
            
        }
    }

    function emergencyWithdrawUnclaimedRewards() external onlyOwner {
        uint256 amount = address(this).balance;
        ethDebt += amount;
        (bool sent, ) = msg.sender.call{value: amount}("");
        if (!sent) { revert('sending ETH failed'); }
    }


    //getters

    function getClaimableRewards(address _staker) external view returns (uint256) {
        UserInfo storage user = userInfo[_staker];
        return user.claimableRewards + ((user.stakedAmount * accRewardsPerShare) / 1e24) - user.rewardDebt;
    }

    function getStakers() external view returns (address[] memory) {
        return userList;
    }

    function getDepositors() external view returns (address[] memory) {
        return depositorList;
    }

    function getClaimableUnstakedToken(address _staker) external view returns (uint256) {
        UserInfo storage user = userInfo[_staker];
        if (block.timestamp >= user.lastUnstakeTime + unstakeDuration) {
            return user.pendingUnstakeAmount;
        } else {
            return 0;
        }
    }

    function getPendingUnstakeAmount(address _staker) external view returns (uint256) {
        return userInfo[_staker].pendingUnstakeAmount;
    }

    function getTotalDepositAmount(address user) external view returns (uint256) {
        return totalRewardDeposits[user];
    }
}

File 2 of 8 : 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 8 : 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 4 of 8 : 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 5 of 8 : 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 6 of 8 : 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 7 of 8 : 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 8 of 8 : IProofStaking.sol
// SPDX-License-Identifier: None
pragma solidity ^0.8.19;

interface IProofStaking {
    struct UserInfo {
        uint256 stakedAmount;
        uint256 rewardDebt;
        uint256 claimedAmount;
        uint256 claimableRewards;
        uint256 lastUnstakeTime;
        uint256 pendingUnstakeAmount;
        bool existingStaker;
    }

    /// @notice Set unstaking duration.
    /// @dev Only owner can call this function.
    function setUnstakingDuration(uint256 _duration) external;

    /// @notice Deposit accumulated ETH to staking pool again.
    /// @dev Only owner can call this function.
    function refreshPool() external;

    /// @notice Stake amount of $PROOF token.
    function stake(uint256 _amount) external;

    /// @notice Unstake amount of $PROOF token.
    /// @dev unstake amount should be less than staked amount.
    function unstake(uint256 _amount) external;

    /// @notice Restake unstaked token again.
    /// @dev All of the token that before unstake duration will be restaked.
    function restakeTokens() external;

    /// @notice Claimed unstaked token after unstaking period.
    function claimUnstakedToken() external;

    /// @notice Claim rewards.
    /// @dev Rewards are distributed as ETH.
    function claimRewards() external;

    /// @notice Get claimable rewards of the staker.
    function getClaimableRewards(
        address _staker
    ) external view returns (uint256);

    /// @notice Get all stakers address.
    function getStakers() external view returns (address[] memory);

    /// @notice Get claimable unstaked token.
    function getClaimableUnstakedToken(
        address _staker
    ) external view returns (uint256);

    /// @notice Get pending unstake amount by user.
    function getPendingUnstakeAmount(
        address _staker
    ) external view returns (uint256);

    function getTotalDepositAmount(address user) external view returns (uint256);

    function getDepositors() external view returns (address[] memory);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_proofToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"accRewardsPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimUnstakedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdrawUnclaimedRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ethDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_staker","type":"address"}],"name":"getClaimableRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_staker","type":"address"}],"name":"getClaimableUnstakedToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDepositors","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_staker","type":"address"}],"name":"getPendingUnstakeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStakers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getTotalDepositAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"globalETHCollected","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":"proofToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refreshPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"restakeTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"setUnstakingDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalRewardDeposits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakedAmount","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":"unallocatedETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unstakeDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"stakedAmount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"claimedAmount","type":"uint256"},{"internalType":"uint256","name":"claimableRewards","type":"uint256"},{"internalType":"uint256","name":"lastUnstakeTime","type":"uint256"},{"internalType":"uint256","name":"pendingUnstakeAmount","type":"uint256"},{"internalType":"bool","name":"existingStaker","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a0346100be57601f6115ee38819003918201601f19168301916001600160401b038311848410176100c3578084926020946040528339810103126100be57516001600160a01b0390818116908190036100be576000543360018060a01b0319821617600055604051923391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36202a30060055560805261151490816100da82396080518181816105320152818161074701526111210152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe60806040818152600491823610156101e3575b50361561001e57600080fd5b34156101b7576000903382526003602052808220541561013c575b3382526003602052812061004e348254611242565b905561005c34600954611242565b60095581548061007a5750505061007534600654611242565b600655005b600854806100cc57505069d3c21bcecceda10000009081340291348304036100b957506100ac906100b4925490611215565b600754611242565b600755005b634e487b7160e01b815260118352602490fd5b919290913481106100ec57505050506100e734600854611235565b600855005b6100f69034611235565b9069d3c21bcecceda1000000918281029281840414901517156101295750610121916100ac91611215565b600755600855005b634e487b7160e01b845260119052602483fd5b600b54600160401b8110156101a4576001810180600b55811015610191577f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180546001600160a01b03191633179055610039565b634e487b7160e01b835260328452602483fd5b634e487b7160e01b835260418452602483fd5b906020606492519162461bcd60e51b835282015260066024820152650dcde408aa8960d31b6044820152fd5b600090813560e01c9081630e94a0ee1461110d57508063156f685a146110ee5780631959a0021461106b5780631967e94514610fa457806327f9c4c1146109305780632e17de7814610e51578063308e401e14610de957806331fd522214610dac578063372500ab14610c455780633e58a27a14610b2e57806343352d6114610aac578063567e98f914610a8e5780635873eb9b14610a545780636c7b7f2e146109c4578063715018a61461096a5780637166465c146109305780637407c695146108f55780637aba20bf146108d65780637cbaccd5146108b75780637dfcdd29146108985780638da5cb5b14610870578063a694fc3a1461060e578063b0541908146104b1578063c42452a614610492578063cd15ab331461046c578063e82b4feb146103e35763f2fde38b03610012579190346103df5760203660031901126103df576001600160a01b038235818116939192908490036103db57610348611194565b831561038957505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8480fd5b8280fd5b509190346103df57826003193601126103df576103fe611194565b828080804761040f81600854611242565b600855335af161041d61138f565b5015610427578280f35b61046892505191829162461bcd60e51b835282016060906020815260126020820152711cd95b991a5b99c81155120819985a5b195960721b60408201520190565b0390fd5b50823461048e57602036600319011261048e57610487611194565b3560055580f35b5080fd5b50903461048e578160031936011261048e576020906005549051908152f35b50903461048e578160031936011261048e573382526001602052808220906005820180549283156105cd578501546005546104eb91611242565b421061059657839055805163a9059cbb60e01b6020820152336024820152604480820184905281526080810167ffffffffffffffff811182821017610583578252610556907f0000000000000000000000000000000000000000000000000000000000000000611287565b519081527f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436460203392a280f35b634e487b7160e01b855260418652602485fd5b815162461bcd60e51b81526020818701526011602482015270756e7374616b65206e6f7420726561647960781b6044820152606490fd5b825162461bcd60e51b81526020818801818152601391810191909152724e6f2070656e64696e6720756e7374616b657360681b604082015281906060010390fd5b509190346103df5760203660031901126103df5781359133845260016020528184208491841561083e5760068201805460ff8116156107b4575b5050815480610783575b5060058201805487908781106106f757505061066f868254611235565b90555b69d3c21bcecceda100000061069761068b878554611242565b808555600754906111ec565b0460018301556106a8858254611242565b9055816106df575b5050519081527febedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a60203392a280f35b60036106ee9101918254611242565b905538806106b0565b6107019088611235565b91558451906323b872dd60e01b602083015233602483015230604483015260648201526064815260a0810181811067ffffffffffffffff82111761077057855261076b907f0000000000000000000000000000000000000000000000000000000000000000611287565b610672565b634e487b7160e01b885260418352602488fd5b6107ad9193506107a169d3c21bcecceda100000091600754906111ec565b04600183015490611235565b9138610652565b60ff19166001179055600a54600160401b81101561082b576001810180600a5581101561081857600a87527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b031916331790553880610648565b634e487b7160e01b875260328252602487fd5b634e487b7160e01b875260418252602487fd5b606490602085519162461bcd60e51b8352820152600c60248201526b063616e74207374616b6520360a41b6044820152fd5b50903461048e578160031936011261048e57905490516001600160a01b039091168152602090f35b50903461048e578160031936011261048e576020906006549051908152f35b50903461048e578160031936011261048e576020906007549051908152f35b50903461048e578160031936011261048e576020906009549051908152f35b5091346103df5760203660031901126103df5735916001600160a01b038316830361092d57506109266020926114a3565b9051908152f35b80fd5b5091346103df5760203660031901126103df57356001600160a01b038116908190036103df57828291602094526003845220549051908152f35b503461092d578060031936011261092d57610983611194565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461092d578060031936011261092d578151918291600b54808552602080950194600b83527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db992905b828210610a3457610a308686610a26828b038361124f565b5191829182611150565b0390f35b83546001600160a01b031687529586019560019384019390910190610a0e565b5091346103df5760203660031901126103df57356001600160a01b038116908190036103df57828291602094526002845220549051908152f35b5091346103df57826003193601126103df5760209250549051908152f35b503461092d578060031936011261092d578151918291600a54808552602080950194600a83527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a892905b828210610b0e57610a308686610a26828b038361124f565b83546001600160a01b031687529586019560019384019390910190610af6565b5091346103df57826003193601126103df573383526001602052818320908392600583018054918215610c0557508584549182610bc0575b610b8584610b9e959469d3c21bcecceda100000094610b919455611242565b808755600754906111ec565b0460018501558254611242565b905581610ba9578280f35b6003610bb89101918254611242565b905538808280f35b9550610b91610b8584610b9e959469d3c21bcecceda100000094610bf686610bea600754856111ec565b0460018c015490611235565b9a945094509450945050610b66565b5162461bcd60e51b81526020818501818152601391810191909152724e6f2070656e64696e6720756e7374616b657360681b604082015281906060010390fd5b509190346103df57826003193601126103df5733835260016020528083209182549269d3c21bcecceda100000080610c7f600754876111ec565b04610c906001840191825490611235565b91610ca060038501938454611242565b968784558715610d735790610cbd600295949392600754906111ec565b049055854711600014610d6857610cd48680611235565b905501610ce2848254611242565b90558380808086335af1610cf461138f565b5015610d285750519081527f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d460203392a280f35b610468915191829162461bcd60e51b835282016060906020815260126020820152711cd95b991a5b99c81155120819985a5b195960721b60408201520190565b610cd4478097611235565b865162461bcd60e51b815260208188015260136024820152726e6f207265776172647320746f20636c61696d60681b6044820152606490fd5b5091346103df5760203660031901126103df57356001600160a01b038116908190036103df57818360059260209552600185522001549051908152f35b5091346103df5760203660031901126103df57356001600160a01b038116908190036103df578183610926926020955260018552206001610e48600383015469d3c21bcecceda1000000610e418554600754906111ec565b0490611242565b91015490611235565b509190346103df5760203660031901126103df5781359133845260016020528184208315610f7057805491848310610f395769d3c21bcecceda100000080610e9b600754866111ec565b0490610edc610eba88610eb46001880195865490611235565b97611235565b808655428587015560058601610ed18a8254611242565b9055600754906111ec565b049055610eea858254611235565b905581610f21575b5050519081527f85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd60203392a280f35b6003610f309101918254611242565b90553880610ef2565b606490602085519162461bcd60e51b835282015260116024820152701b9bdd08195b9bdd59da081cdd185ad959607a1b6044820152fd5b506020606492519162461bcd60e51b8352820152600e60248201526d063616e7420756e7374616b6520360941b6044820152fd5b5091346103df57826003193601126103df57610fbe611194565b60065490811561103357805492831561100057508360065569d3c21bcecceda1000000808302928304036101295750610ffa916100ac91611215565b60075580f35b5162461bcd60e51b8152602091810191909152600b60248201526a226e6f20686f6c6465727360a81b6044820152606490fd5b606490602084519162461bcd60e51b835282015260126024820152710dcde40eadcc2d8d8dec6c2e8cac8408aa8960731b6044820152fd5b5091346103df5760203660031901126103df5780356001600160a01b038116908190036110ea5783839160e0955260016020522080549260018201549260028301546003840154918401549260ff600660058701549601541695815197885260208801528601526060850152608084015260a0830152151560c0820152f35b8380fd5b50903461048e578160031936011261048e576020906008549051908152f35b90503461048e578160031936011261048e577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b6020908160408183019282815285518094520193019160005b828110611177575050505090565b83516001600160a01b031685529381019392810192600101611169565b6000546001600160a01b031633036111a857565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b818102929181159184041417156111ff57565b634e487b7160e01b600052601160045260246000fd5b811561121f570490565b634e487b7160e01b600052601260045260246000fd5b919082039182116111ff57565b919082018092116111ff57565b90601f8019910116810190811067ffffffffffffffff82111761127157604052565b634e487b7160e01b600052604160045260246000fd5b60018060a01b031690604051604081019080821067ffffffffffffffff831117611271576112f9916040526020938482527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858301526000808587829751910182855af16112f361138f565b916113cf565b80519182159184831561136b575b5050509050156113145750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b91938180945001031261048e5782015190811515820361092d575080388084611307565b3d156113ca573d9067ffffffffffffffff821161127157604051916113be601f8201601f19166020018461124f565b82523d6000602084013e565b606090565b9192901561143157508151156113e3575090565b3b156113ec5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156114445750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b82851061148a575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611467565b6001600160a01b0316600090815260016020526040902060048101546005546114cb91611242565b42106114d8576005015490565b5060009056fea264697066735822122045e01373ee1d5583cb299158573a5cad4e42d110c70970d8b1b279488e730a6264736f6c634300081300330000000000000000000000009b4a69de6ca0defdd02c0c4ce6cb84de5202944e

Deployed Bytecode

0x60806040818152600491823610156101e3575b50361561001e57600080fd5b34156101b7576000903382526003602052808220541561013c575b3382526003602052812061004e348254611242565b905561005c34600954611242565b60095581548061007a5750505061007534600654611242565b600655005b600854806100cc57505069d3c21bcecceda10000009081340291348304036100b957506100ac906100b4925490611215565b600754611242565b600755005b634e487b7160e01b815260118352602490fd5b919290913481106100ec57505050506100e734600854611235565b600855005b6100f69034611235565b9069d3c21bcecceda1000000918281029281840414901517156101295750610121916100ac91611215565b600755600855005b634e487b7160e01b845260119052602483fd5b600b54600160401b8110156101a4576001810180600b55811015610191577f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180546001600160a01b03191633179055610039565b634e487b7160e01b835260328452602483fd5b634e487b7160e01b835260418452602483fd5b906020606492519162461bcd60e51b835282015260066024820152650dcde408aa8960d31b6044820152fd5b600090813560e01c9081630e94a0ee1461110d57508063156f685a146110ee5780631959a0021461106b5780631967e94514610fa457806327f9c4c1146109305780632e17de7814610e51578063308e401e14610de957806331fd522214610dac578063372500ab14610c455780633e58a27a14610b2e57806343352d6114610aac578063567e98f914610a8e5780635873eb9b14610a545780636c7b7f2e146109c4578063715018a61461096a5780637166465c146109305780637407c695146108f55780637aba20bf146108d65780637cbaccd5146108b75780637dfcdd29146108985780638da5cb5b14610870578063a694fc3a1461060e578063b0541908146104b1578063c42452a614610492578063cd15ab331461046c578063e82b4feb146103e35763f2fde38b03610012579190346103df5760203660031901126103df576001600160a01b038235818116939192908490036103db57610348611194565b831561038957505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8480fd5b8280fd5b509190346103df57826003193601126103df576103fe611194565b828080804761040f81600854611242565b600855335af161041d61138f565b5015610427578280f35b61046892505191829162461bcd60e51b835282016060906020815260126020820152711cd95b991a5b99c81155120819985a5b195960721b60408201520190565b0390fd5b50823461048e57602036600319011261048e57610487611194565b3560055580f35b5080fd5b50903461048e578160031936011261048e576020906005549051908152f35b50903461048e578160031936011261048e573382526001602052808220906005820180549283156105cd578501546005546104eb91611242565b421061059657839055805163a9059cbb60e01b6020820152336024820152604480820184905281526080810167ffffffffffffffff811182821017610583578252610556907f0000000000000000000000009b4a69de6ca0defdd02c0c4ce6cb84de5202944e611287565b519081527f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436460203392a280f35b634e487b7160e01b855260418652602485fd5b815162461bcd60e51b81526020818701526011602482015270756e7374616b65206e6f7420726561647960781b6044820152606490fd5b825162461bcd60e51b81526020818801818152601391810191909152724e6f2070656e64696e6720756e7374616b657360681b604082015281906060010390fd5b509190346103df5760203660031901126103df5781359133845260016020528184208491841561083e5760068201805460ff8116156107b4575b5050815480610783575b5060058201805487908781106106f757505061066f868254611235565b90555b69d3c21bcecceda100000061069761068b878554611242565b808555600754906111ec565b0460018301556106a8858254611242565b9055816106df575b5050519081527febedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a60203392a280f35b60036106ee9101918254611242565b905538806106b0565b6107019088611235565b91558451906323b872dd60e01b602083015233602483015230604483015260648201526064815260a0810181811067ffffffffffffffff82111761077057855261076b907f0000000000000000000000009b4a69de6ca0defdd02c0c4ce6cb84de5202944e611287565b610672565b634e487b7160e01b885260418352602488fd5b6107ad9193506107a169d3c21bcecceda100000091600754906111ec565b04600183015490611235565b9138610652565b60ff19166001179055600a54600160401b81101561082b576001810180600a5581101561081857600a87527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b031916331790553880610648565b634e487b7160e01b875260328252602487fd5b634e487b7160e01b875260418252602487fd5b606490602085519162461bcd60e51b8352820152600c60248201526b063616e74207374616b6520360a41b6044820152fd5b50903461048e578160031936011261048e57905490516001600160a01b039091168152602090f35b50903461048e578160031936011261048e576020906006549051908152f35b50903461048e578160031936011261048e576020906007549051908152f35b50903461048e578160031936011261048e576020906009549051908152f35b5091346103df5760203660031901126103df5735916001600160a01b038316830361092d57506109266020926114a3565b9051908152f35b80fd5b5091346103df5760203660031901126103df57356001600160a01b038116908190036103df57828291602094526003845220549051908152f35b503461092d578060031936011261092d57610983611194565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461092d578060031936011261092d578151918291600b54808552602080950194600b83527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db992905b828210610a3457610a308686610a26828b038361124f565b5191829182611150565b0390f35b83546001600160a01b031687529586019560019384019390910190610a0e565b5091346103df5760203660031901126103df57356001600160a01b038116908190036103df57828291602094526002845220549051908152f35b5091346103df57826003193601126103df5760209250549051908152f35b503461092d578060031936011261092d578151918291600a54808552602080950194600a83527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a892905b828210610b0e57610a308686610a26828b038361124f565b83546001600160a01b031687529586019560019384019390910190610af6565b5091346103df57826003193601126103df573383526001602052818320908392600583018054918215610c0557508584549182610bc0575b610b8584610b9e959469d3c21bcecceda100000094610b919455611242565b808755600754906111ec565b0460018501558254611242565b905581610ba9578280f35b6003610bb89101918254611242565b905538808280f35b9550610b91610b8584610b9e959469d3c21bcecceda100000094610bf686610bea600754856111ec565b0460018c015490611235565b9a945094509450945050610b66565b5162461bcd60e51b81526020818501818152601391810191909152724e6f2070656e64696e6720756e7374616b657360681b604082015281906060010390fd5b509190346103df57826003193601126103df5733835260016020528083209182549269d3c21bcecceda100000080610c7f600754876111ec565b04610c906001840191825490611235565b91610ca060038501938454611242565b968784558715610d735790610cbd600295949392600754906111ec565b049055854711600014610d6857610cd48680611235565b905501610ce2848254611242565b90558380808086335af1610cf461138f565b5015610d285750519081527f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d460203392a280f35b610468915191829162461bcd60e51b835282016060906020815260126020820152711cd95b991a5b99c81155120819985a5b195960721b60408201520190565b610cd4478097611235565b865162461bcd60e51b815260208188015260136024820152726e6f207265776172647320746f20636c61696d60681b6044820152606490fd5b5091346103df5760203660031901126103df57356001600160a01b038116908190036103df57818360059260209552600185522001549051908152f35b5091346103df5760203660031901126103df57356001600160a01b038116908190036103df578183610926926020955260018552206001610e48600383015469d3c21bcecceda1000000610e418554600754906111ec565b0490611242565b91015490611235565b509190346103df5760203660031901126103df5781359133845260016020528184208315610f7057805491848310610f395769d3c21bcecceda100000080610e9b600754866111ec565b0490610edc610eba88610eb46001880195865490611235565b97611235565b808655428587015560058601610ed18a8254611242565b9055600754906111ec565b049055610eea858254611235565b905581610f21575b5050519081527f85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd60203392a280f35b6003610f309101918254611242565b90553880610ef2565b606490602085519162461bcd60e51b835282015260116024820152701b9bdd08195b9bdd59da081cdd185ad959607a1b6044820152fd5b506020606492519162461bcd60e51b8352820152600e60248201526d063616e7420756e7374616b6520360941b6044820152fd5b5091346103df57826003193601126103df57610fbe611194565b60065490811561103357805492831561100057508360065569d3c21bcecceda1000000808302928304036101295750610ffa916100ac91611215565b60075580f35b5162461bcd60e51b8152602091810191909152600b60248201526a226e6f20686f6c6465727360a81b6044820152606490fd5b606490602084519162461bcd60e51b835282015260126024820152710dcde40eadcc2d8d8dec6c2e8cac8408aa8960731b6044820152fd5b5091346103df5760203660031901126103df5780356001600160a01b038116908190036110ea5783839160e0955260016020522080549260018201549260028301546003840154918401549260ff600660058701549601541695815197885260208801528601526060850152608084015260a0830152151560c0820152f35b8380fd5b50903461048e578160031936011261048e576020906008549051908152f35b90503461048e578160031936011261048e577f0000000000000000000000009b4a69de6ca0defdd02c0c4ce6cb84de5202944e6001600160a01b03168152602090f35b6020908160408183019282815285518094520193019160005b828110611177575050505090565b83516001600160a01b031685529381019392810192600101611169565b6000546001600160a01b031633036111a857565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b818102929181159184041417156111ff57565b634e487b7160e01b600052601160045260246000fd5b811561121f570490565b634e487b7160e01b600052601260045260246000fd5b919082039182116111ff57565b919082018092116111ff57565b90601f8019910116810190811067ffffffffffffffff82111761127157604052565b634e487b7160e01b600052604160045260246000fd5b60018060a01b031690604051604081019080821067ffffffffffffffff831117611271576112f9916040526020938482527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858301526000808587829751910182855af16112f361138f565b916113cf565b80519182159184831561136b575b5050509050156113145750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b91938180945001031261048e5782015190811515820361092d575080388084611307565b3d156113ca573d9067ffffffffffffffff821161127157604051916113be601f8201601f19166020018461124f565b82523d6000602084013e565b606090565b9192901561143157508151156113e3575090565b3b156113ec5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156114445750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b82851061148a575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611467565b6001600160a01b0316600090815260016020526040902060048101546005546114cb91611242565b42106114d8576005015490565b5060009056fea264697066735822122045e01373ee1d5583cb299158573a5cad4e42d110c70970d8b1b279488e730a6264736f6c63430008130033

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

0000000000000000000000009b4a69de6ca0defdd02c0c4ce6cb84de5202944e

-----Decoded View---------------
Arg [0] : _proofToken (address): 0x9B4a69dE6CA0deFDD02c0c4ce6Cb84de5202944E

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000009b4a69de6ca0defdd02c0c4ce6cb84de5202944e


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.