ETH Price: $3,250.63 (-2.46%)
Gas: 8.04 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deposit216798072025-01-22 11:43:479 hrs ago1737546227IN
0x1906eDbD...033930454
0 ETH0.000768737.93075986
Withdraw All216783622025-01-22 6:53:3514 hrs ago1737528815IN
0x1906eDbD...033930454
0 ETH0.000701928.88215848
Deposit216705202025-01-21 4:37:1140 hrs ago1737434231IN
0x1906eDbD...033930454
0 ETH0.001231112.70078818
Withdraw All216698912025-01-21 2:30:4742 hrs ago1737426647IN
0x1906eDbD...033930454
0 ETH0.0011730214.84359394
Deposit216694842025-01-21 1:07:5944 hrs ago1737421679IN
0x1906eDbD...033930454
0 ETH0.0012671711.89760589
Deposit216674552025-01-20 18:20:112 days ago1737397211IN
0x1906eDbD...033930454
0 ETH0.0022030634.85260066
Withdraw All216650062025-01-20 10:07:592 days ago1737367679IN
0x1906eDbD...033930454
0 ETH0.0020696326.18930353
Deposit216571372025-01-19 7:47:233 days ago1737272843IN
0x1906eDbD...033930454
0 ETH0.0011280415.49785207
Deposit216570172025-01-19 7:23:233 days ago1737271403IN
0x1906eDbD...033930454
0 ETH0.0015716714.75651168
Deposit216539142025-01-18 20:58:594 days ago1737233939IN
0x1906eDbD...033930454
0 ETH0.001024810.07601651
Deposit216510082025-01-18 11:15:114 days ago1737198911IN
0x1906eDbD...033930454
0 ETH0.000918714.53953279
Deposit216509922025-01-18 11:11:594 days ago1737198719IN
0x1906eDbD...033930454
0 ETH0.0014165114.61905061
Deposit216479142025-01-18 0:52:354 days ago1737161555IN
0x1906eDbD...033930454
0 ETH0.000607016.26236737
Deposit216428052025-01-17 7:44:595 days ago1737099899IN
0x1906eDbD...033930454
0 ETH0.000700097.22263933
Deposit216426522025-01-17 7:13:595 days ago1737098039IN
0x1906eDbD...033930454
0 ETH0.000474564.89707705
Deposit216414192025-01-17 3:06:355 days ago1737083195IN
0x1906eDbD...033930454
0 ETH0.000480474.95684825
Deposit216396952025-01-16 21:19:476 days ago1737062387IN
0x1906eDbD...033930454
0 ETH0.000583669.23532402
Deposit216396532025-01-16 21:11:236 days ago1737061883IN
0x1906eDbD...033930454
0 ETH0.000814017.64282301
Deposit216394822025-01-16 20:37:116 days ago1737059831IN
0x1906eDbD...033930454
0 ETH0.000754737.41893277
Deposit216394122025-01-16 20:23:116 days ago1737058991IN
0x1906eDbD...033930454
0 ETH0.000739197.62598743
Deposit216380202025-01-16 15:44:116 days ago1737042251IN
0x1906eDbD...033930454
0 ETH0.0014960714.0467748
Deposit216361012025-01-16 9:18:236 days ago1737019103IN
0x1906eDbD...033930454
0 ETH0.000480414.95629575
Deposit216324842025-01-15 21:10:477 days ago1736975447IN
0x1906eDbD...033930454
0 ETH0.0007308811.5648775
Withdraw All216307362025-01-15 15:20:117 days ago1736954411IN
0x1906eDbD...033930454
0 ETH0.0016890421.3732329
Deposit216295502025-01-15 11:21:237 days ago1736940083IN
0x1906eDbD...033930454
0 ETH0.000300553.1006954
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FameStaking

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 8 : FameStaking.sol
// SPDX-License-Identifier: MIT

pragma solidity =0.8.22;

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

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { uncheckedInc } from "./utils/Unchecked.sol";


/**
 * Stake and lock FAME and EARN FAME
 */
contract FameStaking is Ownable {

    using SafeERC20 for IERC20;
    
    // EVENTS
    event Withdraw(address indexed user, uint256 amount);
    event Deposit(address indexed user, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 amount);
    
   
    // ERROR
    error SetupError();
    error NotYet();
    error NoShares();
    error Locked();
    error InvalidAmount();
    error NotEnoughTokens();
    error NotEnoughReward();

    address public token;
    uint public lastUpdateTime;
    uint public totalAmount;
    uint public tokenPerSec;
    uint public accTokenPerShare;
    uint constant public ACC_PRECISION = 1e18;
    uint constant public LOCK_PERIOD = 7 days;

    mapping(address => UserInfo) public userInfos;

    struct UserInfo {
        uint amount;
        uint lockTimeStamp;
        uint pendingReward;
        uint rewardDebt;
    }
    
    constructor(
        address _token, 
        uint _startTime, 
        uint _tokenPerSec
    )
        Ownable(msg.sender)
    {
        if(_startTime < block.timestamp) revert SetupError();

        lastUpdateTime = _startTime;
        token = _token;
        tokenPerSec = _tokenPerSec;
    }

    /*
     * @notice set token per sec, onlyOwner. will update pool before execution.
     */
    function setTokenPerSec(uint _tokenPerSec) external onlyOwner {
        update();
        tokenPerSec = _tokenPerSec;
    }
    
    /*
     * @notice update pool status: accTokenPerShare & lastUpdateTime
     */
    function update() public  {
        if(lastUpdateTime >= block.timestamp) return;
        if(totalAmount == 0) {
            lastUpdateTime = block.timestamp;
            return;
        }

        uint256 multiplier = _getMultiplier(lastUpdateTime, block.timestamp);
        
        uint256 pending = multiplier * tokenPerSec;
        if(pending > 0) {
            accTokenPerShare = accTokenPerShare + (pending * ACC_PRECISION) / totalAmount;
            
            lastUpdateTime = block.timestamp;
        }
    }


    function _getMultiplier(uint _lastUpdateTime, uint _now) internal pure returns (uint) {
        if(_lastUpdateTime >= _now) return 0;
        return _now - _lastUpdateTime;
    }


    /*
     * @notice Deposit staked tokens
     * @param _amount: amount to withdraw (in rewardToken)
     */
    function deposit(uint256 _amount) external {
        UserInfo storage user = userInfos[msg.sender];
        
        update();
        
        if (user.amount > 0) {
            uint256 pending = user.amount * accTokenPerShare / ACC_PRECISION - user.rewardDebt;
            if (pending > 0) {
                user.pendingReward = user.pendingReward + pending;
            }
        }

        if (_amount > 0) {
            user.amount = user.amount + _amount;
            totalAmount = totalAmount + _amount;
            IERC20(token).safeTransferFrom(address(msg.sender), address(this), _amount);
        }
        user.rewardDebt = user.amount * accTokenPerShare / ACC_PRECISION;
        user.lockTimeStamp = block.timestamp;
        
        emit Deposit(msg.sender, _amount);
    }

    
    /*
     * @notice internal function to withdraw staked tokens and collect reward tokens
     * @param _amount: amount to withdraw (in rewardToken)
     */
    function withdraw(uint256 _amount) internal {
        if(userInfos[msg.sender].amount == 0) revert NoShares();

        UserInfo storage user = userInfos[msg.sender];
        if(user.lockTimeStamp + LOCK_PERIOD > block.timestamp) revert Locked();
        if(user.amount < _amount) revert InvalidAmount();

        update();

        if (_amount > 0) {
            if(totalAmount < _amount) 
                revert InvalidAmount();
            uint256 pending = user.amount * accTokenPerShare / ACC_PRECISION - user.rewardDebt + user.pendingReward;
            // if not enough to distribute reward
            if(pending > _getRewardTokenBalance()) 
                revert NotEnoughReward();
            
            totalAmount = totalAmount - _amount;
            user.amount = user.amount - _amount;
            user.pendingReward = 0;
            if(user.amount == 0) user.lockTimeStamp = 0;

            IERC20(token).safeTransfer(address(msg.sender), _amount + pending);
        }

        user.rewardDebt = user.amount * accTokenPerShare / ACC_PRECISION;

        emit Withdraw(msg.sender, _amount);
    }

    /*
     * @notice Withdraw and collect reward. Always withdraw all staked amount.
     */
    function withdrawAll() external {
        UserInfo memory user = userInfos[msg.sender];
        withdraw(user.amount);
    }

    
    /*
     * @notice View function to check pending reward
     * @param _user: user address
     * @return Pending reward for a given user
     */
    function getPendingReward(address _user) external view returns (uint256) {
        UserInfo storage user = userInfos[_user];
        // uint256 stakedTokenSupply = stakedToken.balanceOf(address(this));
        if (block.timestamp > lastUpdateTime && totalAmount != 0) {
            uint256 multiplier = _getMultiplier(lastUpdateTime, block.timestamp);
            uint256 reward = multiplier * tokenPerSec;
            uint256 adjustedTokenPerShare =
                accTokenPerShare + reward * ACC_PRECISION / totalAmount;
            return user.pendingReward + user.amount * adjustedTokenPerShare / ACC_PRECISION - user.rewardDebt;
        } else {
            return user.pendingReward + user.amount * accTokenPerShare / ACC_PRECISION - user.rewardDebt;
        }
    }
    
    
    function _getRewardTokenBalance() internal view returns (uint256 rewardBalance) {
        rewardBalance = IERC20(token).balanceOf(address(this));
        if(rewardBalance >= totalAmount) {
            rewardBalance = rewardBalance - totalAmount;
        }else {
            rewardBalance = 0;
        }
        
    }

    /*
     * @notice Withdraw staked tokens without caring about rewards rewards
     * @dev Needs to be for emergency.
     */
    function emergencyWithdraw() external {
        if(lastUpdateTime > block.timestamp) revert NotYet();
        if(userInfos[msg.sender].amount == 0) revert NoShares();

        UserInfo storage user = userInfos[msg.sender];
        if(user.lockTimeStamp + LOCK_PERIOD > block.timestamp) revert Locked();        

        uint256 amountToTransfer = user.amount;
        if(totalAmount < amountToTransfer) revert NotEnoughTokens();

        totalAmount = totalAmount - amountToTransfer;
        user.amount = 0;
        user.pendingReward = 0;
        user.rewardDebt = 0;
        user.lockTimeStamp = 0;

        if (amountToTransfer > 0) {
            IERC20(token).safeTransfer(address(msg.sender), amountToTransfer);
        }

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


    /*
     * @notice Stop rewards
     * @dev Only callable by owner. Needs to be for emergency.
     */
    function emergencyRewardWithdraw(uint256 _amount) external onlyOwner {
        if(_getRewardTokenBalance() < _amount) revert NotEnoughTokens();

        IERC20(token).safeTransfer(msg.sender, _amount);
    }
    
    

    

}

File 2 of 8 : 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 8 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/Address.sol";

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

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

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

File 7 of 8 : 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 8 of 8 : Unchecked.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.22;

function uncheckedInc(uint256 i) pure returns (uint256) {
    unchecked {
        return i + 1;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "remappings": [
    "forge-std/=lib/forge-std/src/",
    "script/=script/",
    "test/=contracts/test/",
    "ds-test/=lib/forge-std/lib/ds-test/src/"
  ],
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_tokenPerSec","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"Locked","type":"error"},{"inputs":[],"name":"NoShares","type":"error"},{"inputs":[],"name":"NotEnoughReward","type":"error"},{"inputs":[],"name":"NotEnoughTokens","type":"error"},{"inputs":[],"name":"NotYet","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":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"SetupError","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","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":"Withdraw","type":"event"},{"inputs":[],"name":"ACC_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCK_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accTokenPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyRewardWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getPendingReward","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenPerSec","type":"uint256"}],"name":"setTokenPerSec","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenPerSec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAmount","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":"update","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfos","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"lockTimeStamp","type":"uint256"},{"internalType":"uint256","name":"pendingReward","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051610f12380380610f1283398101604081905261002f916100ff565b338061005557604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61005e816100af565b5042821015610080576040516304b80b4560e21b815260040160405180910390fd5b600291909155600180546001600160a01b0319166001600160a01b039390931692909217909155600455610142565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060006060848603121561011457600080fd5b83516001600160a01b038116811461012b57600080fd5b602085015160409095015190969495509392505050565b610dc1806101516000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063853828b6116100a2578063b6b55f2511610071578063b6b55f251461022f578063c8f33c9114610242578063db2e21bc1461024b578063f2fde38b14610253578063fc0c546a1461026657600080fd5b8063853828b6146101f15780638da5cb5b146101f95780638f6629151461021e578063a2e620451461022757600080fd5b806332fcd966116100e957806332fcd9661461016957806343b0215f146101785780634df9d6ba146101cd57806350fd1f3e146101e0578063715018a6146101e957600080fd5b80631820cabb1461011b5780631a39d8ef146101385780631bf5a92d146101415780633279beab14610156575b600080fd5b61012562093a8081565b6040519081526020015b60405180910390f35b61012560035481565b61015461014f366004610c6a565b610279565b005b610154610164366004610c6a565b61028e565b610125670de0b6b3a764000081565b6101ad610186366004610c83565b60066020526000908152604090208054600182015460028301546003909301549192909184565b60408051948552602085019390935291830152606082015260800161012f565b6101256101db366004610c83565b6102d8565b61012560045481565b6101546103ed565b610154610401565b6000546001600160a01b03165b6040516001600160a01b03909116815260200161012f565b61012560055481565b61015461044b565b61015461023d366004610c6a565b6104c6565b61012560025481565b6101546105df565b610154610261366004610c83565b610714565b600154610206906001600160a01b031681565b610281610754565b61028961044b565b600455565b610296610754565b8061029f610781565b10156102be576040516308aeed0f60e21b815260040160405180910390fd5b6001546102d5906001600160a01b03163383610811565b50565b6001600160a01b038116600090815260066020526040812060025442118015610302575060035415155b156103a657600061031560025442610875565b90506000600454826103279190610cc2565b90506000600354670de0b6b3a7640000836103429190610cc2565b61034c9190610cd9565b6005546103599190610cfb565b90508360030154670de0b6b3a76400008286600001546103799190610cc2565b6103839190610cd9565b85600201546103929190610cfb565b61039c9190610d0e565b9695505050505050565b60038101546005548254670de0b6b3a7640000916103c391610cc2565b6103cd9190610cd9565b82600201546103dc9190610cfb565b6103e69190610d0e565b9392505050565b6103f5610754565b6103ff6000610899565b565b33600090815260066020908152604091829020825160808101845281548082526001830154938201939093526002820154938101939093526003015460608301526102d5906108e9565b426002541061045657565b6003546000036104665742600255565b600061047460025442610875565b90506000600454826104869190610cc2565b905080156104c2576003546104a3670de0b6b3a764000083610cc2565b6104ad9190610cd9565b6005546104ba9190610cfb565b600555426002555b5050565b3360009081526006602052604090206104dd61044b565b80541561053a5760008160030154670de0b6b3a764000060055484600001546105069190610cc2565b6105109190610cd9565b61051a9190610d0e565b90508015610538578082600201546105329190610cfb565b60028301555b505b811561057857805461054d908390610cfb565b815560035461055d908390610cfb565b600355600154610578906001600160a01b0316333085610ad0565b6005548154670de0b6b3a76400009161059091610cc2565b61059a9190610cd9565b600382015542600182015560405182815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c906020015b60405180910390a25050565b4260025411156106025760405163069fbbbb60e11b815260040160405180910390fd5b3360009081526006602052604081205490036106315760405163b317087b60e01b815260040160405180910390fd5b336000908152600660205260409020600181015442906106559062093a8090610cfb565b1115610674576040516303cb96db60e21b815260040160405180910390fd5b8054600354811115610699576040516308aeed0f60e21b815260040160405180910390fd5b806003546106a79190610d0e565b6003908155600080845560028401819055908301819055600183015580156106e0576001546106e0906001600160a01b03163383610811565b815460405190815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695906020016105d3565b61071c610754565b6001600160a01b03811661074b57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6102d581610899565b6000546001600160a01b031633146103ff5760405163118cdaa760e01b8152336004820152602401610742565b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156107ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ee9190610d21565b9050600354811061080b576003546108069082610d0e565b905090565b50600090565b6040516001600160a01b0383811660248301526044820183905261087091859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610b0f565b505050565b600081831061088657506000610893565b6108908383610d0e565b90505b92915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b3360009081526006602052604081205490036109185760405163b317087b60e01b815260040160405180910390fd5b3360009081526006602052604090206001810154429061093c9062093a8090610cfb565b111561095b576040516303cb96db60e21b815260040160405180910390fd5b805482111561097d5760405163162908e360e11b815260040160405180910390fd5b61098561044b565b8115610a77578160035410156109ae5760405163162908e360e11b815260040160405180910390fd5b600081600201548260030154670de0b6b3a764000060055485600001546109d59190610cc2565b6109df9190610cd9565b6109e99190610d0e565b6109f39190610cfb565b90506109fd610781565b811115610a1d5760405163193a582f60e31b815260040160405180910390fd5b82600354610a2b9190610d0e565b6003558154610a3b908490610d0e565b80835560006002840181905503610a5457600060018301555b610a7533610a628386610cfb565b6001546001600160a01b03169190610811565b505b6005548154670de0b6b3a764000091610a8f91610cc2565b610a999190610cd9565b600382015560405182815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020016105d3565b6040516001600160a01b038481166024830152838116604483015260648201839052610b099186918216906323b872dd9060840161083e565b50505050565b6000610b246001600160a01b03841683610b72565b90508051600014158015610b49575080806020019051810190610b479190610d3a565b155b1561087057604051635274afe760e01b81526001600160a01b0384166004820152602401610742565b60606108908383600084600080856001600160a01b03168486604051610b989190610d5c565b60006040518083038185875af1925050503d8060008114610bd5576040519150601f19603f3d011682016040523d82523d6000602084013e610bda565b606091505b509150915061039c868383606082610bfa57610bf582610c41565b6103e6565b8151158015610c1157506001600160a01b0384163b155b15610c3a57604051639996b31560e01b81526001600160a01b0385166004820152602401610742565b50806103e6565b805115610c515780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b600060208284031215610c7c57600080fd5b5035919050565b600060208284031215610c9557600080fd5b81356001600160a01b03811681146103e657600080fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761089357610893610cac565b600082610cf657634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561089357610893610cac565b8181038181111561089357610893610cac565b600060208284031215610d3357600080fd5b5051919050565b600060208284031215610d4c57600080fd5b815180151581146103e657600080fd5b6000825160005b81811015610d7d5760208186018101518583015201610d63565b50600092019182525091905056fea26469706673582212207c31298a0c09510b9f102411db1c9a1b96833cf256741bc205ea2c2ac4d248cc64736f6c634300081600330000000000000000000000006bfdb6f4e65ead27118592a41eb927cea695619800000000000000000000000000000000000000000000000000000000657aa7810000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063853828b6116100a2578063b6b55f2511610071578063b6b55f251461022f578063c8f33c9114610242578063db2e21bc1461024b578063f2fde38b14610253578063fc0c546a1461026657600080fd5b8063853828b6146101f15780638da5cb5b146101f95780638f6629151461021e578063a2e620451461022757600080fd5b806332fcd966116100e957806332fcd9661461016957806343b0215f146101785780634df9d6ba146101cd57806350fd1f3e146101e0578063715018a6146101e957600080fd5b80631820cabb1461011b5780631a39d8ef146101385780631bf5a92d146101415780633279beab14610156575b600080fd5b61012562093a8081565b6040519081526020015b60405180910390f35b61012560035481565b61015461014f366004610c6a565b610279565b005b610154610164366004610c6a565b61028e565b610125670de0b6b3a764000081565b6101ad610186366004610c83565b60066020526000908152604090208054600182015460028301546003909301549192909184565b60408051948552602085019390935291830152606082015260800161012f565b6101256101db366004610c83565b6102d8565b61012560045481565b6101546103ed565b610154610401565b6000546001600160a01b03165b6040516001600160a01b03909116815260200161012f565b61012560055481565b61015461044b565b61015461023d366004610c6a565b6104c6565b61012560025481565b6101546105df565b610154610261366004610c83565b610714565b600154610206906001600160a01b031681565b610281610754565b61028961044b565b600455565b610296610754565b8061029f610781565b10156102be576040516308aeed0f60e21b815260040160405180910390fd5b6001546102d5906001600160a01b03163383610811565b50565b6001600160a01b038116600090815260066020526040812060025442118015610302575060035415155b156103a657600061031560025442610875565b90506000600454826103279190610cc2565b90506000600354670de0b6b3a7640000836103429190610cc2565b61034c9190610cd9565b6005546103599190610cfb565b90508360030154670de0b6b3a76400008286600001546103799190610cc2565b6103839190610cd9565b85600201546103929190610cfb565b61039c9190610d0e565b9695505050505050565b60038101546005548254670de0b6b3a7640000916103c391610cc2565b6103cd9190610cd9565b82600201546103dc9190610cfb565b6103e69190610d0e565b9392505050565b6103f5610754565b6103ff6000610899565b565b33600090815260066020908152604091829020825160808101845281548082526001830154938201939093526002820154938101939093526003015460608301526102d5906108e9565b426002541061045657565b6003546000036104665742600255565b600061047460025442610875565b90506000600454826104869190610cc2565b905080156104c2576003546104a3670de0b6b3a764000083610cc2565b6104ad9190610cd9565b6005546104ba9190610cfb565b600555426002555b5050565b3360009081526006602052604090206104dd61044b565b80541561053a5760008160030154670de0b6b3a764000060055484600001546105069190610cc2565b6105109190610cd9565b61051a9190610d0e565b90508015610538578082600201546105329190610cfb565b60028301555b505b811561057857805461054d908390610cfb565b815560035461055d908390610cfb565b600355600154610578906001600160a01b0316333085610ad0565b6005548154670de0b6b3a76400009161059091610cc2565b61059a9190610cd9565b600382015542600182015560405182815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c906020015b60405180910390a25050565b4260025411156106025760405163069fbbbb60e11b815260040160405180910390fd5b3360009081526006602052604081205490036106315760405163b317087b60e01b815260040160405180910390fd5b336000908152600660205260409020600181015442906106559062093a8090610cfb565b1115610674576040516303cb96db60e21b815260040160405180910390fd5b8054600354811115610699576040516308aeed0f60e21b815260040160405180910390fd5b806003546106a79190610d0e565b6003908155600080845560028401819055908301819055600183015580156106e0576001546106e0906001600160a01b03163383610811565b815460405190815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695906020016105d3565b61071c610754565b6001600160a01b03811661074b57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6102d581610899565b6000546001600160a01b031633146103ff5760405163118cdaa760e01b8152336004820152602401610742565b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156107ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ee9190610d21565b9050600354811061080b576003546108069082610d0e565b905090565b50600090565b6040516001600160a01b0383811660248301526044820183905261087091859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610b0f565b505050565b600081831061088657506000610893565b6108908383610d0e565b90505b92915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b3360009081526006602052604081205490036109185760405163b317087b60e01b815260040160405180910390fd5b3360009081526006602052604090206001810154429061093c9062093a8090610cfb565b111561095b576040516303cb96db60e21b815260040160405180910390fd5b805482111561097d5760405163162908e360e11b815260040160405180910390fd5b61098561044b565b8115610a77578160035410156109ae5760405163162908e360e11b815260040160405180910390fd5b600081600201548260030154670de0b6b3a764000060055485600001546109d59190610cc2565b6109df9190610cd9565b6109e99190610d0e565b6109f39190610cfb565b90506109fd610781565b811115610a1d5760405163193a582f60e31b815260040160405180910390fd5b82600354610a2b9190610d0e565b6003558154610a3b908490610d0e565b80835560006002840181905503610a5457600060018301555b610a7533610a628386610cfb565b6001546001600160a01b03169190610811565b505b6005548154670de0b6b3a764000091610a8f91610cc2565b610a999190610cd9565b600382015560405182815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020016105d3565b6040516001600160a01b038481166024830152838116604483015260648201839052610b099186918216906323b872dd9060840161083e565b50505050565b6000610b246001600160a01b03841683610b72565b90508051600014158015610b49575080806020019051810190610b479190610d3a565b155b1561087057604051635274afe760e01b81526001600160a01b0384166004820152602401610742565b60606108908383600084600080856001600160a01b03168486604051610b989190610d5c565b60006040518083038185875af1925050503d8060008114610bd5576040519150601f19603f3d011682016040523d82523d6000602084013e610bda565b606091505b509150915061039c868383606082610bfa57610bf582610c41565b6103e6565b8151158015610c1157506001600160a01b0384163b155b15610c3a57604051639996b31560e01b81526001600160a01b0385166004820152602401610742565b50806103e6565b805115610c515780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b600060208284031215610c7c57600080fd5b5035919050565b600060208284031215610c9557600080fd5b81356001600160a01b03811681146103e657600080fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761089357610893610cac565b600082610cf657634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561089357610893610cac565b8181038181111561089357610893610cac565b600060208284031215610d3357600080fd5b5051919050565b600060208284031215610d4c57600080fd5b815180151581146103e657600080fd5b6000825160005b81811015610d7d5760208186018101518583015201610d63565b50600092019182525091905056fea26469706673582212207c31298a0c09510b9f102411db1c9a1b96833cf256741bc205ea2c2ac4d248cc64736f6c63430008160033

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

0000000000000000000000006bfdb6f4e65ead27118592a41eb927cea695619800000000000000000000000000000000000000000000000000000000657aa7810000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _token (address): 0x6bfDB6f4E65Ead27118592A41eB927cEa6956198
Arg [1] : _startTime (uint256): 1702537089
Arg [2] : _tokenPerSec (uint256): 0

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000006bfdb6f4e65ead27118592a41eb927cea6956198
Arg [1] : 00000000000000000000000000000000000000000000000000000000657aa781
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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