Latest 25 from a total of 2,086 transactions
| Transaction Hash | 
                                         
                                           Method 
                                             
                                     | 
                                    
                                         
                                            
                                                Block
                                            
                                            
                                         
                                     | 
                                    
                                         
                                            
                                                From
                                            
                                             
                                     | 
                                    
                                         | 
                                    
                                         
                                            
                                                To
                                            
                                             
                                     | 
                                    ||||
|---|---|---|---|---|---|---|---|---|---|
| Withdraw Stake | 23721145 | 9 hrs ago | IN | 0 ETH | 0.00004777 | ||||
| Withdraw Stake | 23684370 | 5 days ago | IN | 0 ETH | 0.00011706 | ||||
| Claim Rewards | 23684350 | 5 days ago | IN | 0 ETH | 0.00011932 | ||||
| Withdraw Stake | 23650425 | 10 days ago | IN | 0 ETH | 0.00010455 | ||||
| Claim Rewards | 23650414 | 10 days ago | IN | 0 ETH | 0.00014084 | ||||
| Withdraw Stake | 23648130 | 10 days ago | IN | 0 ETH | 0.00014407 | ||||
| Claim Rewards | 23648118 | 10 days ago | IN | 0 ETH | 0.00015121 | ||||
| Withdraw Stake | 23647132 | 10 days ago | IN | 0 ETH | 0.00010464 | ||||
| Claim Rewards | 23647130 | 10 days ago | IN | 0 ETH | 0.00014121 | ||||
| Withdraw Stake | 23642753 | 11 days ago | IN | 0 ETH | 0.00010805 | ||||
| Claim Rewards | 23642747 | 11 days ago | IN | 0 ETH | 0.00014581 | ||||
| Withdraw Stake | 23636865 | 12 days ago | IN | 0 ETH | 0.00010494 | ||||
| Claim Rewards | 23636863 | 12 days ago | IN | 0 ETH | 0.00014185 | ||||
| Withdraw Stake | 23634774 | 12 days ago | IN | 0 ETH | 0.00010853 | ||||
| Claim Rewards | 23634772 | 12 days ago | IN | 0 ETH | 0.00014564 | ||||
| Withdraw Stake | 23632971 | 12 days ago | IN | 0 ETH | 0.00001188 | ||||
| Claim Rewards | 23632966 | 12 days ago | IN | 0 ETH | 0.00001261 | ||||
| Withdraw Stake | 23629908 | 13 days ago | IN | 0 ETH | 0.00007985 | ||||
| Claim Rewards | 23629902 | 13 days ago | IN | 0 ETH | 0.00010759 | ||||
| Withdraw Stake | 23628953 | 13 days ago | IN | 0 ETH | 0.00008886 | ||||
| Withdraw Stake | 23624223 | 13 days ago | IN | 0 ETH | 0.00007987 | ||||
| Claim Rewards | 23624215 | 13 days ago | IN | 0 ETH | 0.00010854 | ||||
| Withdraw Stake | 23624131 | 13 days ago | IN | 0 ETH | 0.00008142 | ||||
| Claim Rewards | 23624122 | 13 days ago | IN | 0 ETH | 0.00010812 | ||||
| Withdraw Stake | 23620287 | 14 days ago | IN | 0 ETH | 0.0000809 | 
View more zero value Internal Transactions in Advanced View mode
                                    
                                    
                                    
                                         Advanced mode:
                                    
                                    
                                    
                                        
                                    
                                
                            Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
                                        
                                            ERC20TRUUStaking
                                        
                                    Compiler Version
                                        
                                            v0.8.30+commit.73712a01
                                        
                                    Optimization Enabled:
                                        
                                            Yes with 1000000 runs
                                        
                                    Other Settings:
                                        
                                            paris EvmVersion
                                        
                                    Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
/**
 * @title ERC20 TRUU Staking Contract
 * @dev Users can stake ERC20 TRUU tokens for a fixed 14-week period,
 * earning 1% per week, up to a total cap of 7.14 billion TRUU staked.
 */
contract ERC20TRUUStaking is Ownable {
  using SafeERC20 for IERC20;
  IERC20 public immutable truuToken;
  uint256 public immutable stakeStart;
  uint256 public immutable stakeEnd;
  uint256 public immutable withdrawStart;
  uint256 public immutable gracePeriodEnd;
  uint256 public constant DECIMALS = 10;
  uint256 public constant STAKING_CAP = 7_140_000_000 * (10 ** DECIMALS);
  uint256 public constant TOTAL_WEEKS = 14;
  uint256 public constant ONE_WEEK = 1 weeks;
  uint256 public totalStaked;
  struct UserStake {
    uint128 amount;
    uint16 lastClaimedWeek;
  }
  mapping(address => UserStake) public stakes;
  event Staked(address indexed user, uint256 amount);
  event RewardClaimed(address indexed user, uint256 amount, uint256 weekNumber);
  event StakeWithdrawn(address indexed user, uint256 amount);
  event RewardsDeposited(uint256 amount);
  event RewardsWithdrawn(uint256 amount);
  error AddressIsZero();
  error AmountIsZero();
  error ExceedsCap();
  error InGracePeriod();
  error InvalidStart();
  error NoActiveStake();
  error NoRewardsDue();
  error NoUnusedRewards();
  error RewardsNotOpen();
  error RewardsToClaim();
  error StakeLocked();
  error StakingClosed();
  /**
   * @param _token Address of the ERC20 TRUU token (10 decimals)
   * @param _startTimestamp Unix timestamp when staking window opens
   */
  constructor(address _token, uint256 _startTimestamp) {
    if (_token == address(0)) revert AddressIsZero();
    if (_startTimestamp < block.timestamp) revert InvalidStart();
    truuToken = IERC20(_token);
    stakeStart = _startTimestamp;
    stakeEnd = _startTimestamp + ONE_WEEK;
    withdrawStart = stakeEnd + TOTAL_WEEKS * ONE_WEEK;
    gracePeriodEnd = withdrawStart + ONE_WEEK;
  }
  /**
   * @notice Stake TRUU tokens during the open window
   * @param amount Number of tokens to stake (in token units)
   */
  function stake(uint256 amount) external {
    if (block.timestamp < stakeStart || block.timestamp > stakeEnd) revert StakingClosed();
    if (amount == 0) revert AmountIsZero();
    unchecked {
      totalStaked += amount;
    }
    if (totalStaked > STAKING_CAP) revert ExceedsCap();
    truuToken.safeTransferFrom(msg.sender, address(this), amount);
    UserStake storage userStake = stakes[msg.sender];
    unchecked {
      userStake.amount += uint128(amount);
    }
    emit Staked(msg.sender, amount);
  }
  /**
     * @notice Stake TRUU tokens during the open window via a permit instead of prior approval
     * @param amount Number of tokens to stake (in token units)
     * @param deadline Permit valid until timestamp
     * @param v Permit v value
     * @param r Permit r value
     * @param s Permit s value
     */
  function stakeWithPermit(uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external {
    if (block.timestamp < stakeStart || block.timestamp > stakeEnd) revert StakingClosed();
    if (amount == 0) revert AmountIsZero();
    unchecked {
      totalStaked += amount;
    }
    if (totalStaked > STAKING_CAP) revert ExceedsCap();
    IERC20Permit(address(truuToken)).permit(msg.sender, address(this), amount, deadline, v, r, s);
    truuToken.safeTransferFrom(msg.sender, address(this), amount);
    UserStake storage userStake = stakes[msg.sender];
    unchecked {
      userStake.amount += uint128(amount);
    }
    emit Staked(msg.sender, amount);
  }
  /**
   * @notice Claim all available weekly rewards (1% per week)
   */
  function claimRewards() external {
    UserStake storage userStake = stakes[msg.sender];
    if (userStake.amount == 0) revert NoActiveStake();
    if (block.timestamp <= stakeEnd + ONE_WEEK) revert RewardsNotOpen();
    uint256 weeksElapsed = (block.timestamp - stakeEnd) / ONE_WEEK;
    if (weeksElapsed > TOTAL_WEEKS) weeksElapsed = TOTAL_WEEKS;
    uint256 weeksToClaim;
    unchecked {
      weeksToClaim = weeksElapsed - userStake.lastClaimedWeek;
    }
    if (weeksToClaim == 0) revert NoRewardsDue();
    uint256 reward;
    unchecked {
      reward = (userStake.amount * weeksToClaim) / 100;
    } // 1 % per week
    userStake.lastClaimedWeek = uint16(weeksElapsed);
    truuToken.safeTransfer(msg.sender, reward);
    emit RewardClaimed(msg.sender, reward, weeksElapsed);
  }
  /**
   * @notice Withdraw original stake after the 14-week period
   */
  function withdrawStake() external {
    UserStake storage userStake = stakes[msg.sender];
    uint256 amount = userStake.amount;
    if (amount == 0) revert NoActiveStake();
    if (block.timestamp < withdrawStart) revert StakeLocked();
    if (block.timestamp <= gracePeriodEnd && userStake.lastClaimedWeek != TOTAL_WEEKS) revert RewardsToClaim();
    delete stakes[msg.sender];
    unchecked {
      totalStaked -= amount;
    }
    truuToken.safeTransfer(msg.sender, amount);
    emit StakeWithdrawn(msg.sender, amount);
  }
  /**
   * @notice Deposit reward tokens to fund the weekly payouts
   * @param amount Number of reward tokens to deposit
   */
  function depositRewards(uint256 amount) external onlyOwner {
    if (amount == 0) revert AmountIsZero();
    truuToken.safeTransferFrom(msg.sender, address(this), amount);
    emit RewardsDeposited(amount);
  }
  /**
   * @notice Withdraw any unused rewards one week after staking and reward periods
   */
  function withdrawUnusedRewards() external onlyOwner {
    if (block.timestamp <= gracePeriodEnd && totalStaked != 0) revert InGracePeriod();
    uint256 withdrawable = truuToken.balanceOf(address(this)) - totalStaked;
    if (withdrawable == 0) revert NoUnusedRewards();
    truuToken.safeTransfer(msg.sender, withdrawable);
    emit RewardsWithdrawn(withdrawable);
  }
  /**
   * @notice Returns pending rewards for a user if any
   * @param user The address to query
   */
  function rewardsDue(address user) external view returns (uint256 reward, uint256 weeksToClaim) {
    UserStake storage s = stakes[user];
    if (s.amount == 0 || block.timestamp <= stakeEnd + ONE_WEEK) return (0, 0);
    uint256 weeksElapsed = (block.timestamp - stakeEnd) / ONE_WEEK;
    if (weeksElapsed > TOTAL_WEEKS) weeksElapsed = TOTAL_WEEKS;
    if (weeksElapsed <= s.lastClaimedWeek) return (0, 0);
    weeksToClaim = weeksElapsed - s.lastClaimedWeek;
    reward = (s.amount * weeksToClaim) / 100;
  }
  /**
   * @notice Returns reward shortfall (if any) required to cover total rewards
   */
  function deficit() external view returns (uint256 shortfall) {
    uint256 required = (totalStaked * TOTAL_WEEKS) / 100;
    uint256 rewardBalance = truuToken.balanceOf(address(this)) - totalStaked;
    if (rewardBalance < required) {
      shortfall = required - rewardBalance;
    }
  }
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }
    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }
    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }
    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }
    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }
    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }
    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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.
 *
 * ==== 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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);
    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);
    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);
    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);
    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);
    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);
    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;
    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }
    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }
    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }
    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }
    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }
    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }
    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }
    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.
        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }
    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.
        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.
        return account.code.length > 0;
    }
    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");
        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }
    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }
    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }
    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }
    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }
    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }
    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }
    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }
    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }
    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }
    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }
    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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;
    }
    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}{
  "optimizer": {
    "enabled": true,
    "runs": 1000000,
    "details": {
      "yul": true
    }
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
 
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_startTimestamp","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AddressIsZero","type":"error"},{"inputs":[],"name":"AmountIsZero","type":"error"},{"inputs":[],"name":"ExceedsCap","type":"error"},{"inputs":[],"name":"InGracePeriod","type":"error"},{"inputs":[],"name":"InvalidStart","type":"error"},{"inputs":[],"name":"NoActiveStake","type":"error"},{"inputs":[],"name":"NoRewardsDue","type":"error"},{"inputs":[],"name":"NoUnusedRewards","type":"error"},{"inputs":[],"name":"RewardsNotOpen","type":"error"},{"inputs":[],"name":"RewardsToClaim","type":"error"},{"inputs":[],"name":"StakeLocked","type":"error"},{"inputs":[],"name":"StakingClosed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"weekNumber","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakeWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"inputs":[],"name":"DECIMALS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ONE_WEEK","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAKING_CAP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_WEEKS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deficit","outputs":[{"internalType":"uint256","name":"shortfall","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gracePeriodEnd","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":"address","name":"user","type":"address"}],"name":"rewardsDue","outputs":[{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"weeksToClaim","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakeStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"stakeWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakes","outputs":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint16","name":"lastClaimedWeek","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","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":"truuToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawUnusedRewards","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
61012060405234801561001157600080fd5b50604051611ddd380380611ddd8339810160408190526100309161012d565b610039336100dd565b6001600160a01b0382166100605760405163867915ab60e01b815260040160405180910390fd5b4281101561008157604051630e0d5b9360e21b815260040160405180910390fd5b6001600160a01b03821660805260a08190526100a062093a808261017d565b60c0526100b162093a80600e610196565b60c0516100be919061017d565b60e08190526100d19062093a809061017d565b61010052506101ad9050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806040838503121561014057600080fd5b82516001600160a01b038116811461015757600080fd5b6020939093015192949293505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561019057610190610167565b92915050565b808202811582820484141761019057610190610167565b60805160a05160c05160e05161010051611b6061027d6000396000818161039001528181610c0801526110be0152600081816102550152610bae01526000818161022601528181610465015281816104cc01528181610688015281816106cc015281816109880152610d650152600081816103610152818161095f0152610d3c0152600081816102c7015281816105d4015281816107fd015281816108fe01528181610a9201528181610ccc01528181610eae01528181610f390152818161116e01526112390152611b606000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c80638513010b116100d8578063ae4844eb1161008c578063ecd9ba8211610066578063ecd9ba82146103b2578063f2fde38b146103c5578063f399741e146103d857600080fd5b8063ae4844eb1461035c578063bed9d86114610383578063dae2a76c1461038b57600080fd5b80638da5cb5b116100bd5780638da5cb5b146103215780638e6f6b771461033f578063a694fc3a1461034957600080fd5b80638513010b146102c25780638bdf67f21461030e57600080fd5b8063353619091161013a5780635426fa8a116101145780635426fa8a146102a9578063715018a6146102b1578063817b1cd2146102b957600080fd5b80633536190914610250578063372500ab146102775780633d79c69b1461028157600080fd5b806316934fc41161016b57806316934fc4146101aa5780631dc03fdd146102215780632e0f26251461024857600080fd5b80630329914d146101875780630af083c2146101a2575b600080fd5b61018f6103e0565b6040519081526020015b60405180910390f35b61018f600e81565b6101f66101b83660046117e1565b6002602052600090815260409020546fffffffffffffffffffffffffffffffff811690700100000000000000000000000000000000900461ffff1682565b604080516fffffffffffffffffffffffffffffffff909316835261ffff909116602083015201610199565b61018f7f000000000000000000000000000000000000000000000000000000000000000081565b61018f600a81565b61018f7f000000000000000000000000000000000000000000000000000000000000000081565b61027f6103fd565b005b61029461028f3660046117e1565b61063c565b60408051928352602083019190915201610199565b61018f610793565b61027f61088e565b61018f60015481565b6102e97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610199565b61027f61031c36600461181e565b6108a2565b60005473ffffffffffffffffffffffffffffffffffffffff166102e9565b61018f62093a8081565b61027f61035736600461181e565b61095d565b61018f7f000000000000000000000000000000000000000000000000000000000000000081565b61027f610b4b565b61018f7f000000000000000000000000000000000000000000000000000000000000000081565b61027f6103c0366004611837565b610d3a565b61027f6103d33660046117e1565b610ff8565b61027f6110b4565b6103eb600a806119da565b6103fa906401a993c1006119e6565b81565b336000908152600260205260408120805490916fffffffffffffffffffffffffffffffff909116900361045c576040517ffb34894200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61048962093a807f00000000000000000000000000000000000000000000000000000000000000006119fd565b42116104c1576040517ff4e40d5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600062093a806104f17f000000000000000000000000000000000000000000000000000000000000000042611a10565b6104fb9190611a23565b9050600e81111561050a5750600e5b8154700100000000000000000000000000000000900461ffff1681036000819003610561576040517f359b98a500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b825461ffff8316700100000000000000000000000000000000027fffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffff821617845560646fffffffffffffffffffffffffffffffff9091168202046105fb73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163383611290565b604080518281526020810185905233917ff01da32686223933d8a18a391060918c7f11a3648639edd87ae013e2e2731743910160405180910390a250505050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040812080548291906fffffffffffffffffffffffffffffffff1615806106b057506106ac62093a807f00000000000000000000000000000000000000000000000000000000000000006119fd565b4211155b156106c15750600093849350915050565b600062093a806106f17f000000000000000000000000000000000000000000000000000000000000000042611a10565b6106fb9190611a23565b9050600e81111561070a5750600e5b8154700100000000000000000000000000000000900461ffff168111610737575060009485945092505050565b815461075b90700100000000000000000000000000000000900461ffff1682611a10565b82549093506064906107809085906fffffffffffffffffffffffffffffffff166119e6565b61078a9190611a23565b93505050915091565b6000806064600e6001546107a791906119e6565b6107b19190611a23565b6001546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015291925060009173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610844573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108689190611a5e565b6108729190611a10565b905081811015610889576108868183611a10565b92505b505090565b610896611369565b6108a060006113ea565b565b6108aa611369565b806000036108e4576040517f43ad20fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61092673ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633308461145f565b6040518181527f4e9221f2cca6ca0397acc6004ea0b716798254f5abcf53924fab34f0373e5d4e906020015b60405180910390a150565b7f00000000000000000000000000000000000000000000000000000000000000004210806109aa57507f000000000000000000000000000000000000000000000000000000000000000042115b156109e1576040517f5e0ff49500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610a1b576040517f43ad20fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805482019055610a2e600a806119da565b610a3d906401a993c1006119e6565b6001541115610a78576040517f2edaff4300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aba73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633308461145f565b336000818152600260205260409081902080546fffffffffffffffffffffffffffffffff8082168601167fffffffffffffffffffffffffffffffff0000000000000000000000000000000090911617815590519091907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90610b3f9085815260200190565b60405180910390a25050565b336000908152600260205260408120805490916fffffffffffffffffffffffffffffffff90911690819003610bac576040517ffb34894200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000421015610c06576040517f14d10a0200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000004211158015610c515750815461ffff70010000000000000000000000000000000090910416600e14155b15610c88576040517f51492c3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600081815260026020526040902080547fffffffffffffffffffffffffffff000000000000000000000000000000000000169055600180548390039055610d08907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169083611290565b60405181815233907f8108595eb6bad3acefa9da467d90cc2217686d5c5ac85460f8b7849c840645fc90602001610b3f565b7f0000000000000000000000000000000000000000000000000000000000000000421080610d8757507f000000000000000000000000000000000000000000000000000000000000000042115b15610dbe576040517f5e0ff49500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84600003610df8576040517f43ad20fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805486019055610e0b600a806119da565b610e1a906401a993c1006119e6565b6001541115610e55576040517f2edaff4300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018690526064810185905260ff8416608482015260a4810183905260c481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063d505accf9060e401600060405180830381600087803b158015610f0757600080fd5b505af1158015610f1b573d6000803e3d6000fd5b50610f6392505073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016905033308861145f565b336000818152600260205260409081902080546fffffffffffffffffffffffffffffffff8082168a01167fffffffffffffffffffffffffffffffff0000000000000000000000000000000090911617815590519091907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90610fe89089815260200190565b60405180910390a2505050505050565b611000611369565b73ffffffffffffffffffffffffffffffffffffffff81166110a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6110b1816113ea565b50565b6110bc611369565b7f000000000000000000000000000000000000000000000000000000000000000042111580156110ed575060015415155b15611124576040517f260ee9ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000919073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156111b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d99190611a5e565b6111e39190611a10565b90508060000361121f576040517f844aebd900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61126073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163383611290565b6040518181527f7c087d7d3fa0d567fd03d7feb4cd3edacd2a08580cdbb2bc2f86e671279ea01d90602001610952565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526113649084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526114c3565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161109f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526114bd9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016112e2565b50505050565b6000611525826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166115d29092919063ffffffff16565b90508051600014806115465750808060200190518101906115469190611a77565b611364576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161109f565b60606115e184846000856115e9565b949350505050565b60608247101561167b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161109f565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516116a49190611abd565b60006040518083038185875af1925050503d80600081146116e1576040519150601f19603f3d011682016040523d82523d6000602084013e6116e6565b606091505b50915091506116f787838387611702565b979650505050505050565b606083156117985782516000036117915773ffffffffffffffffffffffffffffffffffffffff85163b611791576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161109f565b50816115e1565b6115e183838151156117ad5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109f9190611ad9565b6000602082840312156117f357600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461181757600080fd5b9392505050565b60006020828403121561183057600080fd5b5035919050565b600080600080600060a0868803121561184f57600080fd5b8535945060208601359350604086013560ff8116811461186e57600080fd5b94979396509394606081013594506080013592915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001815b60018411156118f0578085048111156118d4576118d4611886565b60018416156118e257908102905b60019390931c9280026118b9565b935093915050565b600082611907575060016119d4565b81611914575060006119d4565b816001811461192a576002811461193457611950565b60019150506119d4565b60ff84111561194557611945611886565b50506001821b6119d4565b5060208310610133831016604e8410600b8410161715611973575081810a6119d4565b61199e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84846118b5565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156119d0576119d0611886565b0290505b92915050565b600061181783836118f8565b80820281158282048414176119d4576119d4611886565b808201808211156119d4576119d4611886565b818103818111156119d4576119d4611886565b600082611a59577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060208284031215611a7057600080fd5b5051919050565b600060208284031215611a8957600080fd5b8151801515811461181757600080fd5b60005b83811015611ab4578181015183820152602001611a9c565b50506000910152565b60008251611acf818460208701611a99565b9190910192915050565b6020815260008251806020840152611af8816040850160208701611a99565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220a9cb07cca0976d4e13969149354c6cde3ae0f8d7a617f3483dd351cd2379aed964736f6c634300081e0033000000000000000000000000dae0fafd65385e7775cf75b1398735155ef6acd200000000000000000000000000000000000000000000000000000000685add14
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101825760003560e01c80638513010b116100d8578063ae4844eb1161008c578063ecd9ba8211610066578063ecd9ba82146103b2578063f2fde38b146103c5578063f399741e146103d857600080fd5b8063ae4844eb1461035c578063bed9d86114610383578063dae2a76c1461038b57600080fd5b80638da5cb5b116100bd5780638da5cb5b146103215780638e6f6b771461033f578063a694fc3a1461034957600080fd5b80638513010b146102c25780638bdf67f21461030e57600080fd5b8063353619091161013a5780635426fa8a116101145780635426fa8a146102a9578063715018a6146102b1578063817b1cd2146102b957600080fd5b80633536190914610250578063372500ab146102775780633d79c69b1461028157600080fd5b806316934fc41161016b57806316934fc4146101aa5780631dc03fdd146102215780632e0f26251461024857600080fd5b80630329914d146101875780630af083c2146101a2575b600080fd5b61018f6103e0565b6040519081526020015b60405180910390f35b61018f600e81565b6101f66101b83660046117e1565b6002602052600090815260409020546fffffffffffffffffffffffffffffffff811690700100000000000000000000000000000000900461ffff1682565b604080516fffffffffffffffffffffffffffffffff909316835261ffff909116602083015201610199565b61018f7f000000000000000000000000000000000000000000000000000000006864179481565b61018f600a81565b61018f7f0000000000000000000000000000000000000000000000000000000068e54a9481565b61027f6103fd565b005b61029461028f3660046117e1565b61063c565b60408051928352602083019190915201610199565b61018f610793565b61027f61088e565b61018f60015481565b6102e97f000000000000000000000000dae0fafd65385e7775cf75b1398735155ef6acd281565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610199565b61027f61031c36600461181e565b6108a2565b60005473ffffffffffffffffffffffffffffffffffffffff166102e9565b61018f62093a8081565b61027f61035736600461181e565b61095d565b61018f7f00000000000000000000000000000000000000000000000000000000685add1481565b61027f610b4b565b61018f7f0000000000000000000000000000000000000000000000000000000068ee851481565b61027f6103c0366004611837565b610d3a565b61027f6103d33660046117e1565b610ff8565b61027f6110b4565b6103eb600a806119da565b6103fa906401a993c1006119e6565b81565b336000908152600260205260408120805490916fffffffffffffffffffffffffffffffff909116900361045c576040517ffb34894200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61048962093a807f00000000000000000000000000000000000000000000000000000000686417946119fd565b42116104c1576040517ff4e40d5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600062093a806104f17f000000000000000000000000000000000000000000000000000000006864179442611a10565b6104fb9190611a23565b9050600e81111561050a5750600e5b8154700100000000000000000000000000000000900461ffff1681036000819003610561576040517f359b98a500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b825461ffff8316700100000000000000000000000000000000027fffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffff821617845560646fffffffffffffffffffffffffffffffff9091168202046105fb73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000dae0fafd65385e7775cf75b1398735155ef6acd2163383611290565b604080518281526020810185905233917ff01da32686223933d8a18a391060918c7f11a3648639edd87ae013e2e2731743910160405180910390a250505050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040812080548291906fffffffffffffffffffffffffffffffff1615806106b057506106ac62093a807f00000000000000000000000000000000000000000000000000000000686417946119fd565b4211155b156106c15750600093849350915050565b600062093a806106f17f000000000000000000000000000000000000000000000000000000006864179442611a10565b6106fb9190611a23565b9050600e81111561070a5750600e5b8154700100000000000000000000000000000000900461ffff168111610737575060009485945092505050565b815461075b90700100000000000000000000000000000000900461ffff1682611a10565b82549093506064906107809085906fffffffffffffffffffffffffffffffff166119e6565b61078a9190611a23565b93505050915091565b6000806064600e6001546107a791906119e6565b6107b19190611a23565b6001546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015291925060009173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000dae0fafd65385e7775cf75b1398735155ef6acd216906370a0823190602401602060405180830381865afa158015610844573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108689190611a5e565b6108729190611a10565b905081811015610889576108868183611a10565b92505b505090565b610896611369565b6108a060006113ea565b565b6108aa611369565b806000036108e4576040517f43ad20fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61092673ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000dae0fafd65385e7775cf75b1398735155ef6acd21633308461145f565b6040518181527f4e9221f2cca6ca0397acc6004ea0b716798254f5abcf53924fab34f0373e5d4e906020015b60405180910390a150565b7f00000000000000000000000000000000000000000000000000000000685add144210806109aa57507f000000000000000000000000000000000000000000000000000000006864179442115b156109e1576040517f5e0ff49500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610a1b576040517f43ad20fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805482019055610a2e600a806119da565b610a3d906401a993c1006119e6565b6001541115610a78576040517f2edaff4300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aba73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000dae0fafd65385e7775cf75b1398735155ef6acd21633308461145f565b336000818152600260205260409081902080546fffffffffffffffffffffffffffffffff8082168601167fffffffffffffffffffffffffffffffff0000000000000000000000000000000090911617815590519091907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90610b3f9085815260200190565b60405180910390a25050565b336000908152600260205260408120805490916fffffffffffffffffffffffffffffffff90911690819003610bac576040517ffb34894200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000068e54a94421015610c06576040517f14d10a0200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000068ee85144211158015610c515750815461ffff70010000000000000000000000000000000090910416600e14155b15610c88576040517f51492c3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600081815260026020526040902080547fffffffffffffffffffffffffffff000000000000000000000000000000000000169055600180548390039055610d08907f000000000000000000000000dae0fafd65385e7775cf75b1398735155ef6acd273ffffffffffffffffffffffffffffffffffffffff169083611290565b60405181815233907f8108595eb6bad3acefa9da467d90cc2217686d5c5ac85460f8b7849c840645fc90602001610b3f565b7f00000000000000000000000000000000000000000000000000000000685add14421080610d8757507f000000000000000000000000000000000000000000000000000000006864179442115b15610dbe576040517f5e0ff49500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84600003610df8576040517f43ad20fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805486019055610e0b600a806119da565b610e1a906401a993c1006119e6565b6001541115610e55576040517f2edaff4300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018690526064810185905260ff8416608482015260a4810183905260c481018290527f000000000000000000000000dae0fafd65385e7775cf75b1398735155ef6acd273ffffffffffffffffffffffffffffffffffffffff169063d505accf9060e401600060405180830381600087803b158015610f0757600080fd5b505af1158015610f1b573d6000803e3d6000fd5b50610f6392505073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000dae0fafd65385e7775cf75b1398735155ef6acd216905033308861145f565b336000818152600260205260409081902080546fffffffffffffffffffffffffffffffff8082168a01167fffffffffffffffffffffffffffffffff0000000000000000000000000000000090911617815590519091907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90610fe89089815260200190565b60405180910390a2505050505050565b611000611369565b73ffffffffffffffffffffffffffffffffffffffff81166110a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6110b1816113ea565b50565b6110bc611369565b7f0000000000000000000000000000000000000000000000000000000068ee851442111580156110ed575060015415155b15611124576040517f260ee9ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000919073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000dae0fafd65385e7775cf75b1398735155ef6acd216906370a0823190602401602060405180830381865afa1580156111b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d99190611a5e565b6111e39190611a10565b90508060000361121f576040517f844aebd900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61126073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000dae0fafd65385e7775cf75b1398735155ef6acd2163383611290565b6040518181527f7c087d7d3fa0d567fd03d7feb4cd3edacd2a08580cdbb2bc2f86e671279ea01d90602001610952565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526113649084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526114c3565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161109f565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526114bd9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016112e2565b50505050565b6000611525826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166115d29092919063ffffffff16565b90508051600014806115465750808060200190518101906115469190611a77565b611364576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161109f565b60606115e184846000856115e9565b949350505050565b60608247101561167b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161109f565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516116a49190611abd565b60006040518083038185875af1925050503d80600081146116e1576040519150601f19603f3d011682016040523d82523d6000602084013e6116e6565b606091505b50915091506116f787838387611702565b979650505050505050565b606083156117985782516000036117915773ffffffffffffffffffffffffffffffffffffffff85163b611791576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161109f565b50816115e1565b6115e183838151156117ad5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109f9190611ad9565b6000602082840312156117f357600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461181757600080fd5b9392505050565b60006020828403121561183057600080fd5b5035919050565b600080600080600060a0868803121561184f57600080fd5b8535945060208601359350604086013560ff8116811461186e57600080fd5b94979396509394606081013594506080013592915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001815b60018411156118f0578085048111156118d4576118d4611886565b60018416156118e257908102905b60019390931c9280026118b9565b935093915050565b600082611907575060016119d4565b81611914575060006119d4565b816001811461192a576002811461193457611950565b60019150506119d4565b60ff84111561194557611945611886565b50506001821b6119d4565b5060208310610133831016604e8410600b8410161715611973575081810a6119d4565b61199e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84846118b5565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156119d0576119d0611886565b0290505b92915050565b600061181783836118f8565b80820281158282048414176119d4576119d4611886565b808201808211156119d4576119d4611886565b818103818111156119d4576119d4611886565b600082611a59577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060208284031215611a7057600080fd5b5051919050565b600060208284031215611a8957600080fd5b8151801515811461181757600080fd5b60005b83811015611ab4578181015183820152602001611a9c565b50506000910152565b60008251611acf818460208701611a99565b9190910192915050565b6020815260008251806020840152611af8816040850160208701611a99565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220a9cb07cca0976d4e13969149354c6cde3ae0f8d7a617f3483dd351cd2379aed964736f6c634300081e0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000dae0fafd65385e7775cf75b1398735155ef6acd200000000000000000000000000000000000000000000000000000000685add14
-----Decoded View---------------
Arg [0] : _token (address): 0xDAe0faFD65385E7775Cf75b1398735155EF6aCD2
Arg [1] : _startTimestamp (uint256): 1750785300
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000dae0fafd65385e7775cf75b1398735155ef6acd2
Arg [1] : 00000000000000000000000000000000000000000000000000000000685add14
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value | 
|---|---|---|---|---|---|
| ETH | 100.00% | $0.000302 | 704,983,509.1898 | $213,151.76 | 
Loading...
Loading
Loading...
Loading
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.