ETH Price: $2,826.12 (-0.43%)

Contract

0x601Ac734d342C975353956a7bA9D8ac489e7F579

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ParkingLot

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.24;

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

contract ParkingLot is Ownable {
    using SafeERC20 for IERC20;

    struct UserInfo {
        uint256 balance;
        uint256 timestamp;
    }

    address private _rescuer;
    mapping(address => UserInfo) private userInfo_;

    // Token being handled
    IERC20 public token;

    // Event for deposits
    event Deposited(address indexed user, uint256 amount);

    // Event for withdrawals
    event Withdrawn(address indexed user, uint256 amount);

    // Event for rescuing funds
    event Rescued(address indexed user, uint256 amount);

    constructor(address token_, address owner_, address rescuer_) Ownable(owner_) {
        if (token_ == address(0)) {
            revert Errors.InvalidToken();
        }
        if (rescuer_ == address(0)) {
            revert Errors.InvalidRescuer();
        }
        _rescuer = rescuer_;
        token = IERC20(token_);
    }
    // Deposit tokens to the contract

    function deposit(address beneficiary_, uint256 amount_) external onlyOwner {
        if (amount_ == 0) {
            revert Errors.InvalidAmount();
        }
        if (beneficiary_ == address(0) || beneficiary_ == address(this)) {
            revert Errors.InvalidBeneficiary();
        }

        UserInfo storage userInfo = userInfo_[beneficiary_];
        uint256 beforeBalance = token.balanceOf(address(this));
        userInfo.timestamp = block.timestamp;

        token.safeTransferFrom(msg.sender, address(this), amount_);
        uint256 afterBalance = token.balanceOf(address(this));
        userInfo.balance += afterBalance - beforeBalance;

        emit Deposited(beneficiary_, amount_);
    }

    // Withdraw tokens from the contract
    function withdraw(address recipient_) external {
        if (recipient_ == address(0) || recipient_ == address(this)) {
            revert Errors.InvalidRecipient();
        }
        uint256 amount = userInfo_[msg.sender].balance;
        userInfo_[msg.sender].balance = 0;
        token.safeTransfer(msg.sender, amount);
        emit Withdrawn(msg.sender, amount);
    }

    // Check user balance
    function balanceOf(address user) external view returns (uint256) {
        return userInfo_[user].balance;
    }

    // Check user timestamp
    function timestampOf(address user) external view returns (uint256) {
        return userInfo_[user].timestamp;
    }

    //function to rescue funds if 1 year has passed
    function rescueFunds(address user) external {
        if (msg.sender != _rescuer) {
            revert Errors.InvalidRescuer();
        }
        if (block.timestamp < 365 days + userInfo_[user].timestamp) revert Errors.NotPassedYear();
        uint256 amount = userInfo_[user].balance;
        userInfo_[user].balance = 0;
        token.safeTransfer(_rescuer, amount);
        emit Rescued(user, amount);
    }
}

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC4626.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in
 * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].
 */
interface IERC4626 is IERC20, IERC20Metadata {
    event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);

    event Withdraw(
        address indexed sender,
        address indexed receiver,
        address indexed owner,
        uint256 assets,
        uint256 shares
    );

    /**
     * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
     *
     * - MUST be an ERC-20 token contract.
     * - MUST NOT revert.
     */
    function asset() external view returns (address assetTokenAddress);

    /**
     * @dev Returns the total amount of the underlying asset that is “managed” by Vault.
     *
     * - SHOULD include any compounding that occurs from yield.
     * - MUST be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT revert.
     */
    function totalAssets() external view returns (uint256 totalManagedAssets);

    /**
     * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
     * scenario where all the conditions are met.
     *
     * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT show any variations depending on the caller.
     * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
     * - MUST NOT revert.
     *
     * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
     * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
     * from.
     */
    function convertToShares(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
     * scenario where all the conditions are met.
     *
     * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT show any variations depending on the caller.
     * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
     * - MUST NOT revert.
     *
     * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
     * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
     * from.
     */
    function convertToAssets(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
     * through a deposit call.
     *
     * - MUST return a limited value if receiver is subject to some deposit limit.
     * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
     * - MUST NOT revert.
     */
    function maxDeposit(address receiver) external view returns (uint256 maxAssets);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
     * current on-chain conditions.
     *
     * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
     *   call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
     *   in the same transaction.
     * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
     *   deposit would be accepted, regardless if the user has enough tokens approved, etc.
     * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by depositing.
     */
    function previewDeposit(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.
     *
     * - MUST emit the Deposit event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   deposit execution, and are accounted for during deposit.
     * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
     *   approving enough underlying tokens to the Vault contract, etc).
     *
     * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
     */
    function deposit(uint256 assets, address receiver) external returns (uint256 shares);

    /**
     * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
     * - MUST return a limited value if receiver is subject to some mint limit.
     * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
     * - MUST NOT revert.
     */
    function maxMint(address receiver) external view returns (uint256 maxShares);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
     * current on-chain conditions.
     *
     * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
     *   in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
     *   same transaction.
     * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
     *   would be accepted, regardless if the user has enough tokens approved, etc.
     * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by minting.
     */
    function previewMint(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.
     *
     * - MUST emit the Deposit event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
     *   execution, and are accounted for during mint.
     * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
     *   approving enough underlying tokens to the Vault contract, etc).
     *
     * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
     */
    function mint(uint256 shares, address receiver) external returns (uint256 assets);

    /**
     * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
     * Vault, through a withdraw call.
     *
     * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
     * - MUST NOT revert.
     */
    function maxWithdraw(address owner) external view returns (uint256 maxAssets);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
     * given current on-chain conditions.
     *
     * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
     *   call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
     *   called
     *   in the same transaction.
     * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
     *   the withdrawal would be accepted, regardless if the user has enough shares, etc.
     * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by depositing.
     */
    function previewWithdraw(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.
     *
     * - MUST emit the Withdraw event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   withdraw execution, and are accounted for during withdraw.
     * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
     *   not having enough shares, etc).
     *
     * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
     * Those methods should be performed separately.
     */
    function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);

    /**
     * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
     * through a redeem call.
     *
     * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
     * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
     * - MUST NOT revert.
     */
    function maxRedeem(address owner) external view returns (uint256 maxShares);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,
     * given current on-chain conditions.
     *
     * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
     *   in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
     *   same transaction.
     * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
     *   redemption would be accepted, regardless if the user has enough shares, etc.
     * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by redeeming.
     */
    function previewRedeem(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.
     *
     * - MUST emit the Withdraw event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   redeem execution, and are accounted for during redeem.
     * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
     *   not having enough shares, etc).
     *
     * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
     * Those methods should be performed separately.
     */
    function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
}

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

// 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 10 of 10 : Errors.sol
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.0;

import {IERC4626} from "@openzeppelin/contracts/interfaces/IERC4626.sol";

/// @title Errors Interface
/// @notice Defines custom errors for the smart contract operations.
interface Errors {
    /// @notice Error for invalid asset address.
    error InvalidAssetAddress();

    /// @notice Error for mismatch between vault's asset and expected asset.
    error VaultAssetMismatch();

    /// @notice Error for invalid vault fees configuration.
    error InvalidVaultFees();

    /// @notice Error for invalid fee recipient address.
    error InvalidFeeRecipient();

    /// @notice Error for invalid parking lot address.
    error InvalidParkingLot();

    /// @notice Error for operations involving a zero amount.
    error ZeroAmount();

    /// @notice Error for operations involving a zero amount.
    error InvalidAmount();

    /// @notice Error for invalid recipient address.
    error InvalidRecipient();

    /// @notice Error for exceeding maximum allowed value or count.
    error MaxError();

    /// @notice Error for exceeding substraction.
    error InvalidSubstraction();

    error WithdrawalsPaused();

    /// @notice Error for insufficient funds in a strategy.
    /// @param strategy The strategy contract with insufficient funds.
    /// @param amount The amount attempted to be withdrawn.
    /// @param available The available amount in the strategy.
    error InsufficientFunds(IERC4626 strategy, uint256 amount, uint256 available);

    error QueueNotSet();

    error InsufficientQueueRequest(uint256 assets, uint256 minRequest);

    error InsufficientVaultFunds(address vault, uint256 amount, uint256 available);
    /// @notice Error for total allotment exceeding allowed maximum.
    error AllotmentTotalTooHigh();

    /// @notice Error for expired permit deadline.
    /// @param deadline The deadline timestamp that has been exceeded.
    error PermitDeadlineExpired(uint256 deadline);

    /// @notice Error for invalid signer address.
    /// @param signer The address of the invalid signer.
    error InvalidSigner(address signer);

    /// @notice Error for vault being in an idle state when an active state is required.
    error VaultIsIdle();

    /// @notice Error for invalid implementation identifier.
    /// @param id The bytes32 identifier of the implementation.
    error InvalidImplementation(bytes32 id);

    /// @notice Error for failed initialization of a vault deployment.
    error VaultDeployInitFailed();

    /// @notice Error for an implementation identifier that already exists.
    /// @param id The bytes32 identifier of the existing implementation.
    error ImplementationAlreadyExists(bytes32 id);

    /// @notice Error for a non-existent implementation identifier.
    /// @param id The bytes32 identifier of the non-existent implementation.
    error ImplementationDoesNotExist(bytes32 id);

    /// @notice Error for attempting to add a vault that already exists.
    error VaultAlreadyExists();

    error VaultZeroAddress();

    error VaultDoesNotExist(address vault);

    error TotalVaultsAllowedExceeded(uint256 total);

    error VaultByTokenLimitExceeded(address token, uint256 total);

    error InvalidWithdrawlQueue();

    error InvalidBeneficiary();

    error InvalidDepositLimit();

    error UnfinalizedWithdrawl(address queue);

    error NotImplemented();

    error InvalidToken();

    error InvalidRescuer();

    error ERC20ApproveFail();

    error NotPassedYear();

    error AdditionFail();

    error RemoveFail();

    error InvalidRewardTokenAddress();

    error RewardTokenAlreadyApproved();

    error RewardTokenNotApproved();

    error AccumulatedFeeAccountedMustBeZero();

    error MultipleProtectStrat();

    error StrategyHasLockedAssets(address strategy);

    error InvalidIndex(uint256 index);

    error InvalidLength(uint256 argLength, uint256 expectedLength);
    // TokenRegistry errors /////////////////////////////////////////////////

    /// @notice Error for a token already being registered.
    /// @param tokenAddress The address of the token.
    error TokenAlreadyRegistered(address tokenAddress);

    /// @notice Error for a token not being registered.
    /// @param tokenAddress The address of the token.
    error TokenNotRegistered(address tokenAddress);

    /// @notice Error for a token not being a reward token.
    /// @param tokenAddress The address of the token.
    error NotValidRewardToken(address tokenAddress);

    /// @notice Treasury on the TokenRegistry is already set.
    error TreasuryAlreadySet(address attacker);

    /// @notice Unregistered tokens cannot be rewards.
    /// @param tokenAddress The address of the token.
    error UnregisteredTokensCannotBeRewards(address tokenAddress);

    /// @notice Error for a the treasury to be set to the zero address on constructor.
    error InvalidTreasuryAddress();

    // Swapper errors //////////////////////////////////////////////////////

    /// @notice The amount of a reward token is not available for withdrawal.
    /// @param token The address of the reward token.
    /// @param amount The amount required.
    error NotAvailableForWithdrawal(address token, uint256 amount);

    /// @notice The treasury change request cooldown has not elapsed.
    /// @param sender The address of the sender.
    error TreasuryChangeRequestCooldownNotElapsed(address sender);

    // RewardManager errors /////////////////////////////////////////////////

    /// @notice The base reward rate must be less than 100%.
    error SwapperBaseRewardrate();

    /// @notice The maximum progression factor must be less than 100%.
    error SwapperMaxProgressionFactor();

    /// @notice The bonus reward rate for the user must be less than 100%.
    error SwapperBonusRewardrateUser();

    /// @notice The bonus reward rate for the ctToken must be less than 100%.
    error SwapperBonusRewardrateCtToken();

    /// @notice The bonus reward rate for the swap token must be less than 100%.
    error SwapperBonusRewardrateSwapToken();

    /// @notice Invalid Address
    error InvalidUserAddress();

    //Oracle plug
    /// @notice Invalid Token Registry Address
    error InvalidTokenRegistry();

    //Claim Router errors //////////////////////////////////////////////////

    error InvalidVaultRegistry();

    error BlueprintUnauthorizedAccount(address account);

    error InvalidDefaultAdminAddress();

    error NoProtectionStrategiesFound();

    error OnlyVault(address caller);

    //Protect strategy errors ///////////////////////////////////////////////

    error ProtectUnauthorizedAccount(address account);

    error ClaimRouterUnauthorizedAccount(address account);

    error InvalidClaimRouterAddress();

    //MultiSigStrategy
    error MultiSigUnauthorizedAccount(address account);

    /// @notice Thrown when attempting to initialize with zero address for multi-sig
    error InvalidMultiSigAddress();

    /// @notice Thrown when attempting to withdraw when withdraw is disabled
    error WithdrawDisabled();

    /// @notice Thrown when attempting to withdraw more than the available balance
    error InsufficientUnderlyingBalance();
}

Settings
{
  "evmVersion": "cancun",
  "libraries": {},
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "ipfs",
    "useLiteralContent": false
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "remappings": [
    "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/",
    "@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/",
    "@blueprint-finance/=node_modules/@blueprint-finance/",
    "@blueprint-finance/token-distribution-contracts/=node_modules/@blueprint-finance/token-distribution-contracts/",
    "local/src/=src/",
    "@morpho-org/=node_modules/@morpho-org/",
    "@uniswap/=node_modules/@uniswap/",
    "@layerzerolabs/lz-evm-oapp-v2/contracts/=node_modules/@layerzerolabs/lz-evm-oapp-v2/contracts/",
    "@layerzerolabs/lz-evm-messagelib-v2/=node_modules/@layerzerolabs/lz-evm-messagelib-v2/",
    "@layerzerolabs/lz-evm-protocol-v2/=node_modules/@layerzerolabs/lz-evm-protocol-v2/",
    "@layerzerolabs/oapp-evm/contracts/=node_modules/@layerzerolabs/oapp-evm/contracts/",
    "solidity-bytes-utils/=node_modules/solidity-bytes-utils/",
    "base64-sol/=node_modules/base64-sol/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "earn-v1-vault-manager-v1/=node_modules/earn-v1-vault-manager-v1/",
    "@blueprint-finance/multi-asset-vault/=node_modules/@blueprint-finance/multi-asset-vault/",
    "@blueprint-finance/concrete-earn-beacon/=node_modules/@blueprint-finance/concrete-earn-beacon/",
    "beacon-vaults-0.0.2/=node_modules/beacon-vaults-0.0.2/",
    "beacon-vaults-0.0.3/=node_modules/beacon-vaults-0.0.3/",
    "earn-v1-release-0-3-1/=node_modules/earn-v1-release-0-3-1/",
    "earn-v1-release-0-3-12/=node_modules/earn-v1-release-0-3-12/",
    "earn-v1-release-0-4-1/=node_modules/earn-v1-release-0-4-1/",
    "earn-v1-release-0-5-1/=node_modules/earn-v1-release-0-5-1/",
    "@gnosis.pm/safe-contracts/=node_modules/@gnosis.pm/safe-contracts/",
    "eth-gas-reporter/=node_modules/eth-gas-reporter/",
    "forge-std/=lib/forge-std/src/",
    "hardhat/=node_modules/hardhat/",
    "./=remappings.txt/"
  ],
  "viaIR": false
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"rescuer_","type":"address"}],"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":"InvalidBeneficiary","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidRescuer","type":"error"},{"inputs":[],"name":"InvalidToken","type":"error"},{"inputs":[],"name":"NotPassedYear","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposited","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":"Rescued","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","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":"rescueFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"timestampOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient_","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561000f575f80fd5b50604051610ab6380380610ab683398101604081905261002e91610154565b816001600160a01b03811661005c57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b610065816100ea565b506001600160a01b03831661008d5760405163c1ab6dc160e01b815260040160405180910390fd5b6001600160a01b0381166100b45760405163ad3ff4af60e01b815260040160405180910390fd5b600180546001600160a01b039283166001600160a01b031991821617909155600380549490921693169290921790915550610194565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b038116811461014f575f80fd5b919050565b5f805f60608486031215610166575f80fd5b61016f84610139565b925061017d60208501610139565b915061018b60408501610139565b90509250925092565b610915806101a15f395ff3fe608060405234801561000f575f80fd5b5060043610610090575f3560e01c80638da5cb5b116100635780638da5cb5b146100ff578063e53b201714610123578063ef117eac14610136578063f2fde38b14610161578063fc0c546a14610174575f80fd5b806347e7ef241461009457806351cff8d9146100a957806370a08231146100bc578063715018a6146100f7575b5f80fd5b6100a76100a2366004610802565b610187565b005b6100a76100b736600461082a565b61035a565b6100e46100ca36600461082a565b6001600160a01b03165f9081526002602052604090205490565b6040519081526020015b60405180910390f35b6100a76103fc565b5f546001600160a01b03165b6040516001600160a01b0390911681526020016100ee565b6100a761013136600461082a565b61040f565b6100e461014436600461082a565b6001600160a01b03165f9081526002602052604090206001015490565b6100a761016f36600461082a565b6104f0565b60035461010b906001600160a01b031681565b61018f610532565b805f036101af5760405163162908e360e11b815260040160405180910390fd5b6001600160a01b03821615806101cd57506001600160a01b03821630145b156101eb57604051631559b7d760e21b815260040160405180910390fd5b6001600160a01b038281165f9081526002602052604080822060035491516370a0823160e01b8152306004820152909391909116906370a0823190602401602060405180830381865afa158015610244573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102689190610843565b426001840155600354909150610289906001600160a01b031633308661055e565b6003546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa1580156102cf573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102f39190610843565b90506102ff828261086e565b835f015f8282546103109190610881565b90915550506040518481526001600160a01b038616907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c49060200160405180910390a25050505050565b6001600160a01b038116158061037857506001600160a01b03811630145b1561039657604051634e46966960e11b815260040160405180910390fd5b335f818152600260205260408120805491905560035490916103c2916001600160a01b031690836105cb565b60405181815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a25050565b610404610532565b61040d5f610601565b565b6001546001600160a01b0316331461043a5760405163ad3ff4af60e01b815260040160405180910390fd5b6001600160a01b0381165f90815260026020526040902060010154610463906301e13380610881565b421015610482576040516233522d60e31b815260040160405180910390fd5b6001600160a01b038082165f908152600260205260408120805491905560015460035491926104b59281169116836105cb565b816001600160a01b03167f8aec0ce3dadffacf4b7a963e0fed1ff2e6151b4c95d4a65acafa9d1299630402826040516103f091815260200190565b6104f8610532565b6001600160a01b03811661052657604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61052f81610601565b50565b5f546001600160a01b0316331461040d5760405163118cdaa760e01b815233600482015260240161051d565b6040516001600160a01b0384811660248301528381166044830152606482018390526105c59186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610650565b50505050565b6040516001600160a01b038381166024830152604482018390526105fc91859182169063a9059cbb90606401610593565b505050565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f6106646001600160a01b038416836106b1565b905080515f141580156106885750808060200190518101906106869190610894565b155b156105fc57604051635274afe760e01b81526001600160a01b038416600482015260240161051d565b60606106be83835f6106c7565b90505b92915050565b6060814710156106ec5760405163cd78605960e01b815230600482015260240161051d565b5f80856001600160a01b0316848660405161070791906108b3565b5f6040518083038185875af1925050503d805f8114610741576040519150601f19603f3d011682016040523d82523d5f602084013e610746565b606091505b5091509150610756868383610762565b925050505b9392505050565b60608261077757610772826107be565b61075b565b815115801561078e57506001600160a01b0384163b155b156107b757604051639996b31560e01b81526001600160a01b038516600482015260240161051d565b508061075b565b8051156107ce5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b03811681146107fd575f80fd5b919050565b5f8060408385031215610813575f80fd5b61081c836107e7565b946020939093013593505050565b5f6020828403121561083a575f80fd5b6106be826107e7565b5f60208284031215610853575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156106c1576106c161085a565b808201808211156106c1576106c161085a565b5f602082840312156108a4575f80fd5b8151801515811461075b575f80fd5b5f82515f5b818110156108d257602081860181015185830152016108b8565b505f92019182525091905056fea2646970667358221220839b4ee531c890f7de52da648328148ee912f73c0bab13d5357af63e2b080c5564736f6c6343000818003300000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a000000000000000000000000ca2470f04945dad24989ec6ef2c41ee808e51039000000000000000000000000800123cac8afd425270d4ce52f6d404e476dce6e

Deployed Bytecode

0x608060405234801561000f575f80fd5b5060043610610090575f3560e01c80638da5cb5b116100635780638da5cb5b146100ff578063e53b201714610123578063ef117eac14610136578063f2fde38b14610161578063fc0c546a14610174575f80fd5b806347e7ef241461009457806351cff8d9146100a957806370a08231146100bc578063715018a6146100f7575b5f80fd5b6100a76100a2366004610802565b610187565b005b6100a76100b736600461082a565b61035a565b6100e46100ca36600461082a565b6001600160a01b03165f9081526002602052604090205490565b6040519081526020015b60405180910390f35b6100a76103fc565b5f546001600160a01b03165b6040516001600160a01b0390911681526020016100ee565b6100a761013136600461082a565b61040f565b6100e461014436600461082a565b6001600160a01b03165f9081526002602052604090206001015490565b6100a761016f36600461082a565b6104f0565b60035461010b906001600160a01b031681565b61018f610532565b805f036101af5760405163162908e360e11b815260040160405180910390fd5b6001600160a01b03821615806101cd57506001600160a01b03821630145b156101eb57604051631559b7d760e21b815260040160405180910390fd5b6001600160a01b038281165f9081526002602052604080822060035491516370a0823160e01b8152306004820152909391909116906370a0823190602401602060405180830381865afa158015610244573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102689190610843565b426001840155600354909150610289906001600160a01b031633308661055e565b6003546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa1580156102cf573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102f39190610843565b90506102ff828261086e565b835f015f8282546103109190610881565b90915550506040518481526001600160a01b038616907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c49060200160405180910390a25050505050565b6001600160a01b038116158061037857506001600160a01b03811630145b1561039657604051634e46966960e11b815260040160405180910390fd5b335f818152600260205260408120805491905560035490916103c2916001600160a01b031690836105cb565b60405181815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a25050565b610404610532565b61040d5f610601565b565b6001546001600160a01b0316331461043a5760405163ad3ff4af60e01b815260040160405180910390fd5b6001600160a01b0381165f90815260026020526040902060010154610463906301e13380610881565b421015610482576040516233522d60e31b815260040160405180910390fd5b6001600160a01b038082165f908152600260205260408120805491905560015460035491926104b59281169116836105cb565b816001600160a01b03167f8aec0ce3dadffacf4b7a963e0fed1ff2e6151b4c95d4a65acafa9d1299630402826040516103f091815260200190565b6104f8610532565b6001600160a01b03811661052657604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61052f81610601565b50565b5f546001600160a01b0316331461040d5760405163118cdaa760e01b815233600482015260240161051d565b6040516001600160a01b0384811660248301528381166044830152606482018390526105c59186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610650565b50505050565b6040516001600160a01b038381166024830152604482018390526105fc91859182169063a9059cbb90606401610593565b505050565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f6106646001600160a01b038416836106b1565b905080515f141580156106885750808060200190518101906106869190610894565b155b156105fc57604051635274afe760e01b81526001600160a01b038416600482015260240161051d565b60606106be83835f6106c7565b90505b92915050565b6060814710156106ec5760405163cd78605960e01b815230600482015260240161051d565b5f80856001600160a01b0316848660405161070791906108b3565b5f6040518083038185875af1925050503d805f8114610741576040519150601f19603f3d011682016040523d82523d5f602084013e610746565b606091505b5091509150610756868383610762565b925050505b9392505050565b60608261077757610772826107be565b61075b565b815115801561078e57506001600160a01b0384163b155b156107b757604051639996b31560e01b81526001600160a01b038516600482015260240161051d565b508061075b565b8051156107ce5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b03811681146107fd575f80fd5b919050565b5f8060408385031215610813575f80fd5b61081c836107e7565b946020939093013593505050565b5f6020828403121561083a575f80fd5b6106be826107e7565b5f60208284031215610853575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156106c1576106c161085a565b808201808211156106c1576106c161085a565b5f602082840312156108a4575f80fd5b8151801515811461075b575f80fd5b5f82515f5b818110156108d257602081860181015185830152016108b8565b505f92019182525091905056fea2646970667358221220839b4ee531c890f7de52da648328148ee912f73c0bab13d5357af63e2b080c5564736f6c63430008180033

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

00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a000000000000000000000000ca2470f04945dad24989ec6ef2c41ee808e51039000000000000000000000000800123cac8afd425270d4ce52f6d404e476dce6e

-----Decoded View---------------
Arg [0] : token_ (address): 0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a
Arg [1] : owner_ (address): 0xCA2470F04945dAd24989Ec6eF2c41Ee808e51039
Arg [2] : rescuer_ (address): 0x800123cAC8AFd425270d4CE52F6d404E476DcE6e

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a
Arg [1] : 000000000000000000000000ca2470f04945dad24989ec6ef2c41ee808e51039
Arg [2] : 000000000000000000000000800123cac8afd425270d4ce52f6d404e476dce6e


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

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.