ETH Price: $4,516.25 (+1.49%)

Contract

0x02568F589DB9028eb042B3E5a5BBE98709724a2f

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

N/A
Transaction Hash
Method
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
130441572025-10-06 21:42:482 days ago1759786968  Contract Creation0 ETH

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VaultDepositooor

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 10000 runs

Other Settings:
cancun EvmVersion, None license
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;

import { IERC20Metadata as IERC20 } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import { VaultDepositManager } from "@fun-contracts/Utils/VaultDepositManager.sol";
import { Replacer } from "@fun-contracts/Utils/Replacer.sol";

/**
 * @title VaultDepositooor
 * @author dextracker
 * @notice A wrapper contract that enables users to deposit their entire token balance into registered vaults
 *         using dynamically constructed calldata with runtime amount injection.
 *         Supports both ERC20 tokens and native ETH deposits.
 *
 * @dev INTENDED USAGE WITH RELAY:
 *      This contract is designed to work with Relay's transferAndMulticall function. The typical flow is:
 *
 *      1. User calls Relay.transferAndMulticall(tokens, amounts, calls, refundTo, nftRecipient)
 *      2. Relay transfers tokens from user to itself using transferFrom
 *      3. Relay executes the Call3Value[] array, which includes a call to this contract's deposit() function
 *      4. This contract deposits tokens into the registered vault on behalf of the user
 *
 */
contract VaultDepositooor is VaultDepositManager, ReentrancyGuard {
    using SafeERC20 for IERC20;
    using Replacer for bytes;

    uint256 constant EIGHTEEN = 18;
    // ============ Constants ============

    /// @notice Special placeholder value used in calldata that gets replaced with the actual deposit amount at runtime
    /// @dev This specific value (ending in 0xdeadbeef) is unlikely to appear naturally in valid calldata,
    ///      reducing the risk of accidental replacement. Only the first occurrence is replaced.
    ///      Value: 115792089237316195423570985008687907853269984665640564039457584007913129639663
    uint256 public constant AMOUNT_PLACEHOLDER = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffdeadbeef;
    bytes32 public constant AMOUNT_PLACEHOLDER_BYTES32 = bytes32(AMOUNT_PLACEHOLDER);

    /// @notice Address used to represent native ETH (follows common convention)
    /// @dev When token parameter equals this address, the contract handles native ETH instead of ERC20
    address public constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    // ============ Constructor ============

    /// @notice Initializes the contract and optionally transfers ownership
    /// @dev Pass address(0) to keep deployer as owner (for testing/direct multisig deployment)
    ///      Pass Safe multisig address for production deployment (ownership transferred atomically)
    /// @param initialOwner Address to transfer ownership to, or address(0) to keep deployer as owner
    constructor(address initialOwner) VaultDepositManager(initialOwner) { }

    /// @notice Allow contract to receive native ETH
    /// @dev Required to accept ETH sent via Call3Value when deposit() is payable
    receive() external payable { }

    // ============ Core Deposit Function ============

    /**
     * @notice Deposit the caller's entire token balance (or contract's ETH balance) into a registered vault
     * @dev This is the core function designed to be called from Relay's transferAndMulticall.
     *
     *      FLOW FOR ERC20:
     *      1. Validates vault is registered
     *      2. Checks caller's token balance
     *      3. Validates balance meets minAmountOut (slippage protection)
     *      4. Transfers tokens from caller to this contract
     *      5. Approves vault to spend tokens
     *      6. Optionally converts amount to 18 decimals (based on vault config)
     *      7. Replaces AMOUNT_PLACEHOLDER in callData with actual amount
     *      8. Calls vault with modified calldata
     *      9. Emits Deposit event with results
     *
     *      FLOW FOR NATIVE ETH (token == NATIVE_TOKEN):
     *      1. Validates vault is registered
     *      2. Checks contract's ETH balance (includes ETH sent via Call3Value.value before this call)
     *      3. Validates balance > 0 and meets minAmountOut (slippage protection)
     *      4. No conversion needed (ETH is always 18 decimals)
     *      5. Replaces AMOUNT_PLACEHOLDER in callData with balance
     *      6. Calls vault with modified calldata, forwarding balance as msg.value
     *      7. Emits Deposit event with results
     *
     * @param token The token to deposit - either ERC20 address or NATIVE_TOKEN (0xEeee...EEeE) for ETH
     * @param vault The registered vault contract to deposit into
     * @param callData The vault function calldata containing AMOUNT_PLACEHOLDER at the amount parameter position
     * @param minAmountOut Minimum token/ETH balance required for deposit (slippage/frontrunning protection)
     *                     If balance < minAmountOut, transaction reverts
     *
     * @return returnData The raw bytes returned from the vault's deposit function call
     */
    function deposit(
        address token,
        address vault,
        bytes calldata callData,
        uint256 minAmountOut
    )
        external
        nonReentrant
        returns (bytes memory returnData)
    {
        // Load vault configuration from storage (single SLOAD for 1 byte)
        uint8 config = vaultConfigs[vault];
        if (config & FLAG_IS_REGISTERED == 0) revert VaultNotRegisteredForDeposit();

        bool isNative = token == NATIVE_TOKEN;
        uint256 balance;
        uint256 amountForCalldata;

        if (isNative) {
            // Check vault supports native ETH
            if (config & FLAG_ALLOWS_NATIVE == 0) revert VaultDoesNotSupportNative();

            // For native ETH, check this contract's ETH balance
            // Relay sends ETH before this call
            balance = address(this).balance;
            if (balance == 0) revert NoETHInContract();

            // Slippage protection for native ETH
            if (balance < minAmountOut) revert InsufficientETHAmount();

            // Native ETH is always 18 decimals, no conversion needed
            amountForCalldata = balance;
        } else {
            // For ERC20 tokens
            // Get caller's current balance - this is the amount we'll deposit
            balance = IERC20(token).balanceOf(msg.sender);

            // Slippage protection: Ensure user has at least the minimum expected amount
            if (balance < minAmountOut) revert InsufficientTokenAmount();

            // Pull tokens from caller to this contract
            // Requires prior approval from msg.sender
            IERC20(token).safeTransferFrom(msg.sender, address(this), balance);

            // Approve vault to spend the tokens we just received
            IERC20(token).safeIncreaseAllowance(vault, balance);

            // Prepare the amount for calldata injection
            // If vault requires 18 decimals, scale up the amount accordingly
            amountForCalldata = balance;
            if (config & FLAG_CONVERT_TO_18_DECIMALS != 0) {
                uint8 decimals = IERC20(token).decimals();
                if (decimals < EIGHTEEN) {
                    // Example: USDC (6 decimals) 1,000,000 becomes 1,000,000,000,000,000,000 (18 decimals)
                    amountForCalldata = balance * 10 ** (EIGHTEEN - decimals);
                }
                // If decimals >= 18, no conversion needed (keeps native decimals)
            }
        }

        // Replace AMOUNT_PLACEHOLDER in calldata with the actual/scaled amount
        bytes memory modifiedCallData = callData.replace(AMOUNT_PLACEHOLDER_BYTES32, amountForCalldata);

        // Execute the vault deposit call with modified calldata
        // For native ETH, forward the balance as msg.value
        (bool success, bytes memory data) =
            isNative ? vault.call{ value: balance }(modifiedCallData) : vault.call(modifiedCallData);
        if (!success) revert DepositFailed(data);

        // Emit event with the actual deposited amount (in native token decimals)
        emit FunMediatedDeposit(vault, token, balance, data);

        return data;
    }

}

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

pragma solidity >=0.6.2;

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

/**
 * @dev Interface for the optional metadata functions from the ERC-20 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.3.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

    /**
     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(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.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    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.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    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.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

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

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

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

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

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            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 silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

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

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

    uint256 private _status;

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

    constructor() {
        _status = NOT_ENTERED;
    }

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

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

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

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

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

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { VaultWrapperErrors } from "@fun-contracts/Utils/VaultWrapperErrors.sol";
import { VaultWrapperEvents } from "@fun-contracts/Utils/VaultWrapperEvents.sol";

/**
 * @title VaultDepositManager
 * @notice Admin functions for managing vault registrations
 * @dev Inherited by VaultDepositWrapper to separate admin logic from core deposit functionality
 *      All storage and constants must be defined here or in parent contracts for inheritance
 */
abstract contract VaultDepositManager is Ownable, VaultWrapperErrors, VaultWrapperEvents {

    // ============ Storage Layout ============
    // Must be defined in inheritance order to match VaultDepositWrapper

    /// @notice Bit flags for vault configuration
    /// @dev Ultra-compact storage: 3 bits packed into uint8 (1 byte per vault)
    uint8 constant FLAG_IS_REGISTERED = 1 << 0;          // bit 0: 0x01
    uint8 constant FLAG_CONVERT_TO_18_DECIMALS = 1 << 1; // bit 1: 0x02
    uint8 constant FLAG_ALLOWS_NATIVE = 1 << 2;          // bit 2: 0x04

    /// @notice Mapping from vault address to its configuration flags
    /// @dev Each vault uses only 1 byte of storage
    ///
    ///      Bit layout (uint8):
    ///      - bit 0 (0x01): isRegistered
    ///      - bit 1 (0x02): convertTo18Decimals
    ///      - bit 2 (0x04): allowsNative
    ///      - bits 3-7: unused (reserved for future flags)
    ///
    ///      Gas savings vs struct with string:
    ///      - registerVault(): ~67,000 gas saved (3+ SSTORE → 1 SSTORE)
    ///      - deposit(): ~4,200 gas saved (multiple SLOAD → 1 SLOAD + bit ops)
    mapping(address => uint8) public vaultConfigs;

    // ============ Constructor ============

    /// @notice Initialize and optionally transfer ownership
    /// @param initialOwner If non-zero, ownership is transferred to this address after initialization
    ///        If zero address, deployer remains owner
    constructor(address initialOwner) Ownable(msg.sender) {
        if (initialOwner != address(0)) {
            _transferOwnership(initialOwner);
        }
    }

    // ============ Admin Functions ============

    /**
     * @notice Register a vault to enable deposits through this contract
     * @dev Only callable by owner (Safe multisig). Once registered, users can deposit into this vault via deposit().
     *      The vault cannot be re-registered without first removing it.
     *
     *      Gas optimization: methodSignature is only emitted in event (not stored) for off-chain reference.
     *      Storage uses 1 byte per vault (3 boolean flags packed into uint8).
     *
     * @param vault The address of the vault contract to register
     * @param vaultABI The deposit method signature (e.g., "deposit(uint256,address)")
     *        Emitted in VaultRegistered event for off-chain reference only
     * @param convertTo18Decimals Whether to scale token amounts to 18 decimals before injecting into calldata
     *        - true: Amount is multiplied by 10^(18-tokenDecimals) before replacement (for USDC: 6 decimals → 18)
     *        - false: Amount is used as-is in token's native decimals
     * @param allowsNative Whether this vault accepts native ETH deposits
     *        - true: Vault can receive ETH via NATIVE_TOKEN parameter
     *        - false: Vault only accepts ERC20 tokens
     */
    function registerVault(address vault, string memory vaultABI, bool convertTo18Decimals, bool allowsNative) external onlyOwner {
        if (vault == address(0)) revert InvalidVault();
        if (bytes(vaultABI).length == 0) revert EmptyMethodSignature();
        if (vaultConfigs[vault] & FLAG_IS_REGISTERED != 0) revert VaultAlreadyRegistered();

        // Pack flags into single uint8
        uint8 flags = FLAG_IS_REGISTERED;
        if (convertTo18Decimals) flags |= FLAG_CONVERT_TO_18_DECIMALS;
        if (allowsNative) flags |= FLAG_ALLOWS_NATIVE;

        vaultConfigs[vault] = flags;

        emit VaultRegistered(vault, vaultABI, convertTo18Decimals);
    }

    /**
     * @notice Remove a vault from the registry, preventing future deposits
     * @dev Only callable by owner (Safe multisig). This does not affect any existing deposits in the vault,
     *      it only prevents new deposits through this contract.
     *
     * @param vault The address of the vault to remove from the registry
     */
    function removeVault(address vault) external onlyOwner {
        if (vaultConfigs[vault] & FLAG_IS_REGISTERED == 0) revert VaultNotRegistered();

        delete vaultConfigs[vault];

        emit VaultRemoved(vault);
    }

    // ============ View Helpers ============

    /// @notice Check if a vault is registered
    function isVaultRegistered(address vault) external view returns (bool) {
        return vaultConfigs[vault] & FLAG_IS_REGISTERED != 0;
    }

    /// @notice Check if a vault requires 18-decimal conversion
    function vaultRequires18Decimals(address vault) external view returns (bool) {
        return vaultConfigs[vault] & FLAG_CONVERT_TO_18_DECIMALS != 0;
    }

    /// @notice Check if a vault allows native ETH
    function vaultAllowsNative(address vault) external view returns (bool) {
        return vaultConfigs[vault] & FLAG_ALLOWS_NATIVE != 0;
    }
}

File 6 of 15 : Replacer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;

import { VaultWrapperErrors } from "@fun-contracts/Utils/VaultWrapperErrors.sol";

/**
 * @title Replacer
 * @notice Library for replacing placeholder values in calldata
 * @dev Gas-optimized calldata manipulation using assembly
 */
library Replacer {
    uint256 constant THIRTY_TWO = 32;

    /**
     * @notice Replace the first occurrence of a placeholder with the actual amount
     * @dev This function performs a search through calldata looking for the placeholder value.
     *
     *      Gas Optimization & Safety:
     *      - Skips the first 4 bytes (function selector) to prevent accidental selector replacement
     *      - Iterates in 32-byte chunks (not byte-by-byte) since calldata is padded to 32-byte words
     *      - Only replaces the FIRST occurrence; additional placeholders are ignored
     *
     *      Example of why we skip the selector:
     *      If selector is 0xAAAAAAFF and placeholder starts with 0xFF, we could accidentally
     *      replace part of the selector, corrupting the function call.
     *
     *      Gas Cost: Formula: ~4,700 + (placeholder_position × 250) gas O(params) complexity
     *
     * @param callData The original calldata containing the placeholder
     * @param placeholder The placeholder value to search for (as bytes32)
     * @param amount The actual amount to inject (may be scaled to 18 decimals by caller)
     *
     * @return result The modified calldata with placeholder replaced by amount
     */
    function replace(
        bytes calldata callData,
        bytes32 placeholder,
        uint256 amount
    ) internal pure returns (bytes memory result) {
        result = bytes(callData);
        bytes32 amountBytes = bytes32(amount);

        // Ensure callData is long enough: 4 bytes selector + at least 32 bytes for one parameter
        if (result.length < 36) {
            revert VaultWrapperErrors.InvalidCalldata("Call data is too short to include selector and at least one parameter");
        }

        // Search for placeholder starting after the 4-byte function selector
        // Iterate in 32-byte chunks since calldata parameters are padded to full words
        // Start at byte 4 (after selector), increment by 32 bytes each iteration
        for (uint256 i = 4; i <= result.length - THIRTY_TWO; i += THIRTY_TWO) {
            bytes32 chunk;
            assembly {
                // Load 32 bytes at position (i + 32)
                // The +32 accounts for the length prefix in memory layout
                chunk := mload(add(result, add(i, THIRTY_TWO)))
            }

            if (chunk == placeholder) {
                assembly {
                    // Replace the placeholder with the actual amount
                    mstore(add(result, add(i, THIRTY_TWO)), amountBytes)
                }
                break; // Only replace first occurrence
            }
        }

        return result;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)

pragma solidity >=0.4.16;

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

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

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

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

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

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

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

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

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

pragma solidity >=0.6.2;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 15 : VaultWrapperErrors.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;

/**
 * @title VaultWrapperErrors
 * @notice Custom errors for VaultDepositWrapper contract
 * @dev Centralized error definitions for gas-efficient reverts
 */
interface VaultWrapperErrors {
    /// @notice Thrown when calldata is too short to contain a valid placeholder
    /// @dev Calldata must be at least 36 bytes (4-byte selector + 32-byte parameter)
    error InvalidCalldata(string reason);

    /// @notice Thrown when trying to register the zero address as a vault
    error InvalidVault();

    /// @notice Thrown when vault ABI/method signature is empty
    error EmptyMethodSignature();

    /// @notice Thrown when trying to register a vault that is already registered
    error VaultAlreadyRegistered();

    /// @notice Thrown when trying to remove a vault that is not registered
    error VaultNotRegistered();

    /// @notice Thrown when deposit is called for an unregistered vault
    error VaultNotRegisteredForDeposit();

    /// @notice Thrown when no ETH is present in contract for native token deposit
    error NoETHInContract();

    /// @notice Thrown when ETH balance is below minimum amount out (slippage protection)
    error InsufficientETHAmount();

    /// @notice Thrown when token balance is below minimum amount out (slippage protection)
    error InsufficientTokenAmount();

    /// @notice Thrown when the vault deposit call fails
    error DepositFailed(bytes returnData);

    /// @notice Thrown when attempting native ETH deposit to a vault that doesn't support it
    error VaultDoesNotSupportNative();
}

File 11 of 15 : VaultWrapperEvents.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;

/**
 * @title VaultWrapperEvents
 * @notice Events emitted by VaultDepositWrapper contract
 * @dev Centralized event definitions for tracking contract state changes
 */
interface VaultWrapperEvents {
    /// @notice Emitted when a new vault is registered by the owner
    /// @param vault The address of the registered vault contract
    /// @param methodSignature The deposit method signature for this vault (documentation only, not used for replacement)
    /// @param convertTo18Decimals Whether amounts should be converted to 18 decimals for this vault (used in deposit logic)
    event VaultRegistered(address indexed vault, string methodSignature, bool convertTo18Decimals);

    /// @notice Emitted when a vault is removed from the registry by the owner
    /// @param vault The address of the vault that was removed
    event VaultRemoved(address indexed vault);

    /// @notice Emitted when this contract successfully deposits tokens into a vault
    /// @param vault The vault contract that received the deposit
    /// @param token The ERC20 token that was deposited
    /// @param amount The actual amount of tokens deposited (in token's native decimals)
    /// @param returnData The raw return data from the vault's deposit function call
    event FunMediatedDeposit(
        address indexed vault, address indexed token, uint256 amount, bytes returnData
    );
}

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

pragma solidity >=0.4.16;

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

File 13 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)

pragma solidity >=0.4.16;

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

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

pragma solidity ^0.8.20;

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)

pragma solidity >=0.4.16;

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

Settings
{
  "remappings": [
    "@CREATE3/=src/CREATE3/",
    "@forge-std/=dependencies/forge-std-1.11.0/src/",
    "@fun-contracts/=src/",
    "@fun-test-contracts/=test/",
    "@openzeppelin/contracts/=dependencies/@openzeppelin-contracts-5.4.0/",
    "@solmate/=dependencies/solmate-89365b880c4f3c786bdd453d4b8e8fe410344a69/src/",
    "CREATE3-1.0.0/=dependencies/CREATE3-1.0.0/",
    "forge-std/=dependencies/forge-std-1.11.0/src/",
    "@openzeppelin-contracts-5.4.0/=dependencies/@openzeppelin-contracts-5.4.0/",
    "forge-std-1.11.0/=dependencies/forge-std-1.11.0/src/",
    "solmate-89365b880c4f3c786bdd453d4b8e8fe410344a69/=dependencies/solmate-89365b880c4f3c786bdd453d4b8e8fe410344a69/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": true,
  "debug": {
    "revertStrings": "debug"
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes","name":"returnData","type":"bytes"}],"name":"DepositFailed","type":"error"},{"inputs":[],"name":"EmptyMethodSignature","type":"error"},{"inputs":[],"name":"InsufficientETHAmount","type":"error"},{"inputs":[],"name":"InsufficientTokenAmount","type":"error"},{"inputs":[{"internalType":"string","name":"reason","type":"string"}],"name":"InvalidCalldata","type":"error"},{"inputs":[],"name":"InvalidVault","type":"error"},{"inputs":[],"name":"NoETHInContract","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"VaultAlreadyRegistered","type":"error"},{"inputs":[],"name":"VaultDoesNotSupportNative","type":"error"},{"inputs":[],"name":"VaultNotRegistered","type":"error"},{"inputs":[],"name":"VaultNotRegisteredForDeposit","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"returnData","type":"bytes"}],"name":"FunMediatedDeposit","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":"vault","type":"address"},{"indexed":false,"internalType":"string","name":"methodSignature","type":"string"},{"indexed":false,"internalType":"bool","name":"convertTo18Decimals","type":"bool"}],"name":"VaultRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"}],"name":"VaultRemoved","type":"event"},{"inputs":[],"name":"AMOUNT_PLACEHOLDER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"AMOUNT_PLACEHOLDER_BYTES32","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NATIVE_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"vault","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"bytes","name":"returnData","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"isVaultRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"string","name":"vaultABI","type":"string"},{"internalType":"bool","name":"convertTo18Decimals","type":"bool"},{"internalType":"bool","name":"allowsNative","type":"bool"}],"name":"registerVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"removeVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"vaultAllowsNative","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vaultConfigs","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"vaultRequires18Decimals","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080806040523461010957604051601f61189f38819003918201601f19168301916001600160401b038311848410176100f5578084926020946040528339810103126100a557516001600160a01b0381168082036100a157331561008e5761006633610156565b61007f575b6001600255604051611702908161019d8239f35b61008890610156565b8061006b565b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b60405162461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a207475706c65206461746120746f6f2073686f6044820152611c9d60f21b6064820152608490fd5b634e487b7160e01b5f52604160045260245ffd5b62461bcd60e51b815260206004820152602260248201527f45746865722073656e7420746f206e6f6e2d70617961626c652066756e63746960448201526137b760f11b6064820152608490fd5b5f80546001600160a01b039283166001600160a01b03198216811783559216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a356fe60806040526004361015610015575b36610c7a57005b5f3560e01c8063105a88e3146100e057806331f7d964146100db5780633a90846e146100d65780633d18b2af146100d1578063476b6acf146100cc5780634bfc5014146100c7578063715018a6146100c25780637f4c4847146100a95780638da5cb5b146100bd578063cd867985146100b8578063ceb68c23146100b3578063f2fde38b146100ae5763fd7070460361000e575b610892565b610bac565b610ae0565b610955565b6108cc565b610816565b6107cc565b610782565b61073a565b610546565b61030f565b6102bb565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45746865722073656e7420746f206e6f6e2d70617961626c652066756e63746960448201527f6f6e0000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f414249206465636f64696e673a207475706c65206461746120746f6f2073686f60448201527f72740000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f414249206465636f64696e673a20696e76616c6964207475706c65206f66667360448201527f65740000000000000000000000000000000000000000000000000000000000006064820152fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361029457565b5f80fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361029457565b3461030a5760206003193601126103055773ffffffffffffffffffffffffffffffffffffffff6102e9610271565b165f5260016020526020600160405f2054161515604051908152f35b610169565b6100e5565b3461030a575f60031936011261030557602060405173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8152f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f414249206465636f64696e673a20696e76616c69642063616c6c64617461206160448201527f72726179206f66667365740000000000000000000000000000000000000000006064820152fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761042f57604052565b6103c1565b67ffffffffffffffff811161042f57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b92919261047a82610434565b9161048860405193846103ee565b8294818452818301116104a4578281602093845f960137010152565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f414249206465636f64696e673a20696e76616c6964206279746520617272617960448201527f206c656e677468000000000000000000000000000000000000000000000000006064820152fd5b60443590811515820361029457565b60643590811515820361029457565b3461030a5760806003193601126103055761055f610271565b60243567ffffffffffffffff811161073557366023820112156107305761059090369060248160040135910161046e565b610598610528565b6105a0610537565b916105a9611283565b73ffffffffffffffffffffffffffffffffffffffff8416938415610708578151156106e05760016106026105fb8373ffffffffffffffffffffffffffffffffffffffff165f52600160205260405f2090565b5460ff1690565b166106b85782610690917f55e854e53b29a09bfbe28c9e867d99a35dbcc693f17da80c10b4e4607d747a3a956001926106af575b6106a4575b6106639073ffffffffffffffffffffffffffffffffffffffff165f52600160205260405f2090565b9060ff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b61069f60405192839283610cfe565b0390a2005b60049091179061063b565b60039250610636565b7f49d8266e000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fd92efa40000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fd03a6320000000000000000000000000000000000000000000000000000000005f5260045ffd5b61033d565b6101ed565b3461030a5760206003193601126103055773ffffffffffffffffffffffffffffffffffffffff610768610271565b165f526001602052602060ff60405f205416604051908152f35b3461030a5760206003193601126103055773ffffffffffffffffffffffffffffffffffffffff6107b0610271565b165f5260016020526020600260405f2054161515604051908152f35b3461030a5760206003193601126103055773ffffffffffffffffffffffffffffffffffffffff6107fa610271565b165f5260016020526020600460405f2054161515604051908152f35b3461030a575f6003193601126103055761082e611283565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461030a575f6003193601126103055760206040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffdeadbeef8152f35b3461030a575f60031936011261030557602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b9060206109529281815201906108fe565b90565b3461030a5760806003193601126103055761096e610271565b610976610298565b60443567ffffffffffffffff8111610735573660238201121561073057806004013567ffffffffffffffff8111610a5c5736602482840101116109d8576109d4936109c8936024606435940191610d1e565b60405191829182610941565b0390f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f414249206465636f64696e673a20696e76616c69642063616c6c64617461206160448201527f72726179207374726964650000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f414249206465636f64696e673a20696e76616c69642063616c6c64617461206160448201527f72726179206c656e6774680000000000000000000000000000000000000000006064820152fd5b3461030a5760206003193601126103055773ffffffffffffffffffffffffffffffffffffffff610b0e610271565b610b16611283565b16805f526001602052600160405f20541615610b8457805f52600160205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557fe71f3a50e5ad81964f352c411f1d45e35438ecd1acecef59ac81d9fbbf6cbc0a5f80a2005b7feeb4f612000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461030a5760206003193601126103055773ffffffffffffffffffffffffffffffffffffffff610bda610271565b610be2611283565b168015610c4e5773ffffffffffffffffffffffffffffffffffffffff5f54827fffffffffffffffffffffffff00000000000000000000000000000000000000008216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b7f1e4fbdf7000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f556e6b6e6f776e207369676e617475726520616e64206e6f2066616c6c62616360448201527f6b20646566696e656400000000000000000000000000000000000000000000006064820152fd5b90610d166020919493946040845260408401906108fe565b931515910152565b9290939160028054146110d05760028055610d5a6105fb8673ffffffffffffffffffffffffffffffffffffffff165f52600160205260405f2090565b9360018516156110a85773ffffffffffffffffffffffffffffffffffffffff169373eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8514908115610f015760041615610ed95747938415610eb1578410610e8957610dbe5f9392849386916113ff565b908214610e705760208151910184875af192610dd861123d565b935b15610e385773ffffffffffffffffffffffffffffffffffffffff7f76511bb8950b82fe2ee5f747e5a7929769055ce5ade161da73b869147b1f5e3f91610e288660405193849316958361126c565b0390a390610e366001600255565b565b6040517ff8e68f2300000000000000000000000000000000000000000000000000000000815280610e6c8660048301610941565b0390fd5b60208151910182875af192610e8361123d565b93610dda565b7f7671265e000000000000000000000000000000000000000000000000000000005f5260045ffd5b7facbbf5de000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f7ca28857000000000000000000000000000000000000000000000000000000005f5260045ffd5b91859391933b1561104c576040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526020816024818a5afa908115611047575f91611079575b508095811061105157610f648130338a6112cf565b610f6f818989611349565b6002819416610f89575b505f9391928493610dbe926113ff565b939192863b1561104c57604051937f313ce5670000000000000000000000000000000000000000000000000000000085526020856004818b5afa928315611047575f9660ff610dbe9589988991611018575b501660128110610ff3575b5050925092945092610f79565b61101092945061100561100a916111dc565b61121c565b9061122a565b915f80610fe6565b61103a915060203d602011611040575b61103281836103ee565b810190611196565b5f610fdb565b503d611028565b61118b565b6110f8565b7f2ec48042000000000000000000000000000000000000000000000000000000005f5260045ffd5b61109b915060203d6020116110a1575b61109381836103ee565b81019061117c565b5f610f4f565b503d611089565b7f077b4faf000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f54617267657420636f6e747261637420646f6573206e6f7420636f6e7461696e60448201527f20636f64650000000000000000000000000000000000000000000000000000006064820152fd5b90816020910312610305575190565b6040513d5f823e3d90fd5b90816020910312610305575160ff811681036102945790565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60120390601282116111ea57565b6111af565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082019182116111ea57565b604d81116111ea57600a0a90565b818102929181159184041417156111ea57565b3d15611267573d9061124e82610434565b9161125c60405193846103ee565b82523d5f602084013e565b606090565b6040906109529392815281602082015201906108fe565b73ffffffffffffffffffffffffffffffffffffffff5f541633036112a357565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b90919273ffffffffffffffffffffffffffffffffffffffff610e369481604051957f23b872dd0000000000000000000000000000000000000000000000000000000060208801521660248601521660448401526064830152606482526113366084836103ee565b611520565b90602082018092116111ea57565b919073ffffffffffffffffffffffffffffffffffffffff831691823b1561104c576020604493604051948580927fdd62ed3e00000000000000000000000000000000000000000000000000000000825230600483015273ffffffffffffffffffffffffffffffffffffffff871660248301525afa928315611047575f936113de575b5082018092116111ea57610e36926115a7565b6113f891935060203d6020116110a15761109381836103ee565b915f6113cb565b61140a91369161046e565b602481511061147657906004915b61142281516111ef565b831161147057602083820101927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffdeadbeef84511461146a576114639192935061133b565b9190611418565b50915290565b91505090565b60a46040517f5a90d3fc00000000000000000000000000000000000000000000000000000000815260206004820152604560248201527f43616c6c206461746120697320746f6f2073686f727420746f20696e636c756460448201527f652073656c6563746f7220616e64206174206c65617374206f6e65207061726160648201527f6d657465720000000000000000000000000000000000000000000000000000006084820152fd5b905f602091828151910182855af11561118b575f513d61159e575073ffffffffffffffffffffffffffffffffffffffff81163b155b61155c5750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b60011415611555565b91909160205f60405193828501907f095ea7b300000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff871660248701526044860152604485526116086064866103ee565b84519082855af15f51903d81611693575b501590505b61162757505050565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9390931660248401525f6044808501919091528352610e36926113369061168d6064826103ee565b82611520565b151590506116c0575061161e73ffffffffffffffffffffffffffffffffffffffff82163b15155b5f611619565b600161161e91146116ba56fea26469706673582212208132733c0f6dd32400fc11eba6ba9e07795a68455862a2c5d2c287d088f1064b64736f6c634300081b00330000000000000000000000007779ffb11d50fceae8e533b611b5cb5a1c1db3d4

Deployed Bytecode

0x60806040526004361015610015575b36610c7a57005b5f3560e01c8063105a88e3146100e057806331f7d964146100db5780633a90846e146100d65780633d18b2af146100d1578063476b6acf146100cc5780634bfc5014146100c7578063715018a6146100c25780637f4c4847146100a95780638da5cb5b146100bd578063cd867985146100b8578063ceb68c23146100b3578063f2fde38b146100ae5763fd7070460361000e575b610892565b610bac565b610ae0565b610955565b6108cc565b610816565b6107cc565b610782565b61073a565b610546565b61030f565b6102bb565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45746865722073656e7420746f206e6f6e2d70617961626c652066756e63746960448201527f6f6e0000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f414249206465636f64696e673a207475706c65206461746120746f6f2073686f60448201527f72740000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f414249206465636f64696e673a20696e76616c6964207475706c65206f66667360448201527f65740000000000000000000000000000000000000000000000000000000000006064820152fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361029457565b5f80fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361029457565b3461030a5760206003193601126103055773ffffffffffffffffffffffffffffffffffffffff6102e9610271565b165f5260016020526020600160405f2054161515604051908152f35b610169565b6100e5565b3461030a575f60031936011261030557602060405173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8152f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f414249206465636f64696e673a20696e76616c69642063616c6c64617461206160448201527f72726179206f66667365740000000000000000000000000000000000000000006064820152fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761042f57604052565b6103c1565b67ffffffffffffffff811161042f57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b92919261047a82610434565b9161048860405193846103ee565b8294818452818301116104a4578281602093845f960137010152565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f414249206465636f64696e673a20696e76616c6964206279746520617272617960448201527f206c656e677468000000000000000000000000000000000000000000000000006064820152fd5b60443590811515820361029457565b60643590811515820361029457565b3461030a5760806003193601126103055761055f610271565b60243567ffffffffffffffff811161073557366023820112156107305761059090369060248160040135910161046e565b610598610528565b6105a0610537565b916105a9611283565b73ffffffffffffffffffffffffffffffffffffffff8416938415610708578151156106e05760016106026105fb8373ffffffffffffffffffffffffffffffffffffffff165f52600160205260405f2090565b5460ff1690565b166106b85782610690917f55e854e53b29a09bfbe28c9e867d99a35dbcc693f17da80c10b4e4607d747a3a956001926106af575b6106a4575b6106639073ffffffffffffffffffffffffffffffffffffffff165f52600160205260405f2090565b9060ff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b61069f60405192839283610cfe565b0390a2005b60049091179061063b565b60039250610636565b7f49d8266e000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fd92efa40000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fd03a6320000000000000000000000000000000000000000000000000000000005f5260045ffd5b61033d565b6101ed565b3461030a5760206003193601126103055773ffffffffffffffffffffffffffffffffffffffff610768610271565b165f526001602052602060ff60405f205416604051908152f35b3461030a5760206003193601126103055773ffffffffffffffffffffffffffffffffffffffff6107b0610271565b165f5260016020526020600260405f2054161515604051908152f35b3461030a5760206003193601126103055773ffffffffffffffffffffffffffffffffffffffff6107fa610271565b165f5260016020526020600460405f2054161515604051908152f35b3461030a575f6003193601126103055761082e611283565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461030a575f6003193601126103055760206040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffdeadbeef8152f35b3461030a575f60031936011261030557602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b9060206109529281815201906108fe565b90565b3461030a5760806003193601126103055761096e610271565b610976610298565b60443567ffffffffffffffff8111610735573660238201121561073057806004013567ffffffffffffffff8111610a5c5736602482840101116109d8576109d4936109c8936024606435940191610d1e565b60405191829182610941565b0390f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f414249206465636f64696e673a20696e76616c69642063616c6c64617461206160448201527f72726179207374726964650000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f414249206465636f64696e673a20696e76616c69642063616c6c64617461206160448201527f72726179206c656e6774680000000000000000000000000000000000000000006064820152fd5b3461030a5760206003193601126103055773ffffffffffffffffffffffffffffffffffffffff610b0e610271565b610b16611283565b16805f526001602052600160405f20541615610b8457805f52600160205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557fe71f3a50e5ad81964f352c411f1d45e35438ecd1acecef59ac81d9fbbf6cbc0a5f80a2005b7feeb4f612000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461030a5760206003193601126103055773ffffffffffffffffffffffffffffffffffffffff610bda610271565b610be2611283565b168015610c4e5773ffffffffffffffffffffffffffffffffffffffff5f54827fffffffffffffffffffffffff00000000000000000000000000000000000000008216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b7f1e4fbdf7000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f556e6b6e6f776e207369676e617475726520616e64206e6f2066616c6c62616360448201527f6b20646566696e656400000000000000000000000000000000000000000000006064820152fd5b90610d166020919493946040845260408401906108fe565b931515910152565b9290939160028054146110d05760028055610d5a6105fb8673ffffffffffffffffffffffffffffffffffffffff165f52600160205260405f2090565b9360018516156110a85773ffffffffffffffffffffffffffffffffffffffff169373eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8514908115610f015760041615610ed95747938415610eb1578410610e8957610dbe5f9392849386916113ff565b908214610e705760208151910184875af192610dd861123d565b935b15610e385773ffffffffffffffffffffffffffffffffffffffff7f76511bb8950b82fe2ee5f747e5a7929769055ce5ade161da73b869147b1f5e3f91610e288660405193849316958361126c565b0390a390610e366001600255565b565b6040517ff8e68f2300000000000000000000000000000000000000000000000000000000815280610e6c8660048301610941565b0390fd5b60208151910182875af192610e8361123d565b93610dda565b7f7671265e000000000000000000000000000000000000000000000000000000005f5260045ffd5b7facbbf5de000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f7ca28857000000000000000000000000000000000000000000000000000000005f5260045ffd5b91859391933b1561104c576040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526020816024818a5afa908115611047575f91611079575b508095811061105157610f648130338a6112cf565b610f6f818989611349565b6002819416610f89575b505f9391928493610dbe926113ff565b939192863b1561104c57604051937f313ce5670000000000000000000000000000000000000000000000000000000085526020856004818b5afa928315611047575f9660ff610dbe9589988991611018575b501660128110610ff3575b5050925092945092610f79565b61101092945061100561100a916111dc565b61121c565b9061122a565b915f80610fe6565b61103a915060203d602011611040575b61103281836103ee565b810190611196565b5f610fdb565b503d611028565b61118b565b6110f8565b7f2ec48042000000000000000000000000000000000000000000000000000000005f5260045ffd5b61109b915060203d6020116110a1575b61109381836103ee565b81019061117c565b5f610f4f565b503d611089565b7f077b4faf000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f54617267657420636f6e747261637420646f6573206e6f7420636f6e7461696e60448201527f20636f64650000000000000000000000000000000000000000000000000000006064820152fd5b90816020910312610305575190565b6040513d5f823e3d90fd5b90816020910312610305575160ff811681036102945790565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60120390601282116111ea57565b6111af565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082019182116111ea57565b604d81116111ea57600a0a90565b818102929181159184041417156111ea57565b3d15611267573d9061124e82610434565b9161125c60405193846103ee565b82523d5f602084013e565b606090565b6040906109529392815281602082015201906108fe565b73ffffffffffffffffffffffffffffffffffffffff5f541633036112a357565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b90919273ffffffffffffffffffffffffffffffffffffffff610e369481604051957f23b872dd0000000000000000000000000000000000000000000000000000000060208801521660248601521660448401526064830152606482526113366084836103ee565b611520565b90602082018092116111ea57565b919073ffffffffffffffffffffffffffffffffffffffff831691823b1561104c576020604493604051948580927fdd62ed3e00000000000000000000000000000000000000000000000000000000825230600483015273ffffffffffffffffffffffffffffffffffffffff871660248301525afa928315611047575f936113de575b5082018092116111ea57610e36926115a7565b6113f891935060203d6020116110a15761109381836103ee565b915f6113cb565b61140a91369161046e565b602481511061147657906004915b61142281516111ef565b831161147057602083820101927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffdeadbeef84511461146a576114639192935061133b565b9190611418565b50915290565b91505090565b60a46040517f5a90d3fc00000000000000000000000000000000000000000000000000000000815260206004820152604560248201527f43616c6c206461746120697320746f6f2073686f727420746f20696e636c756460448201527f652073656c6563746f7220616e64206174206c65617374206f6e65207061726160648201527f6d657465720000000000000000000000000000000000000000000000000000006084820152fd5b905f602091828151910182855af11561118b575f513d61159e575073ffffffffffffffffffffffffffffffffffffffff81163b155b61155c5750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b60011415611555565b91909160205f60405193828501907f095ea7b300000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff871660248701526044860152604485526116086064866103ee565b84519082855af15f51903d81611693575b501590505b61162757505050565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9390931660248401525f6044808501919091528352610e36926113369061168d6064826103ee565b82611520565b151590506116c0575061161e73ffffffffffffffffffffffffffffffffffffffff82163b15155b5f611619565b600161161e91146116ba56fea26469706673582212208132733c0f6dd32400fc11eba6ba9e07795a68455862a2c5d2c287d088f1064b64736f6c634300081b0033

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

0000000000000000000000007779ffb11d50fceae8e533b611b5cb5a1c1db3d4

-----Decoded View---------------
Arg [0] : initialOwner (address): 0x7779FFB11d50fcEae8E533b611b5CB5A1C1db3d4

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000007779ffb11d50fceae8e533b611b5cb5a1c1db3d4


Deployed Bytecode Sourcemap

1316:6893:14:-:0;;;;;;;;;-1:-1:-1;1316:6893:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;;;;;-1:-1:-1;;1316:6893:14;;;;;;;;:::i;:::-;;-1:-1:-1;1316:6893:14;4889:12:11;1316:6893:14;;;4889:12:11;1316:6893:14;-1:-1:-1;1316:6893:14;;4889:40:11;:45;;1316:6893:14;;;;;;;;:::i;:::-;;:::i;:::-;;;;;-1:-1:-1;;1316:6893:14;;;;;;;;2382:42;1316:6893;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;:::i;:::-;;;;;;;;;;;;;:::o;:::-;;;;;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;-1:-1:-1;1316:6893:14;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::o;:::-;;;;;-1:-1:-1;;1316:6893:14;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::i;:::-;;;:::i;:::-;1500:62:0;;;:::i;:::-;1316:6893:14;;;3598:19:11;;;3594:46;;1316:6893:14;;3654:27:11;3650:62;;3726:12;:19;;;1316:6893:14;;;;3726:12:11;1316:6893:14;;;;;;;3726:19:11;1316:6893:14;;;;;3726:19:11;:40;3722:82;;3855:32;4024:27;3855:32;4067:53;3855:32;3726:12;3897:61;;;1316:6893:14;3968:45:11;;1316:6893:14;4024:19:11;;1316:6893:14;;;;3726:12:11;1316:6893:14;;;;;;;4024:19:11;1110:6;1316:6893:14;;1110:6:11;;;;;;;;4024:27;4067:53;1316:6893:14;;4067:53:11;;;;;:::i;:::-;;;;1316:6893:14;3968:45:11;1316:6893:14;3986:27:11;;;;3968:45;;3897:61;3922:36;;-1:-1:-1;3897:61:11;;3722:82;3780:24;-1:-1:-1;3780:24:11;1316:6893:14;-1:-1:-1;3780:24:11;3650:62;3690:22;-1:-1:-1;3690:22:11;1316:6893:14;-1:-1:-1;3690:22:11;3594:46;3626:14;-1:-1:-1;3626:14:11;1316:6893:14;-1:-1:-1;3626:14:11;1316:6893:14;;:::i;:::-;;:::i;:::-;;;;;-1:-1:-1;;1316:6893:14;;;;;;;;:::i;:::-;;-1:-1:-1;1316:6893:14;1716:45:11;1316:6893:14;;;;;-1:-1:-1;1316:6893:14;;;;;;;;;;;;;;-1:-1:-1;;1316:6893:14;;;;;;;;:::i;:::-;;-1:-1:-1;1316:6893:14;5105:12:11;1316:6893:14;;;1047:6:11;1316:6893:14;-1:-1:-1;1316:6893:14;;5105:49:11;:54;;1316:6893:14;;;;;;;;;;;-1:-1:-1;;1316:6893:14;;;;;;;;:::i;:::-;;-1:-1:-1;1316:6893:14;5311:12:11;1316:6893:14;;;;;-1:-1:-1;1316:6893:14;;5311:40:11;:45;;1316:6893:14;;;;;;;;;;;-1:-1:-1;;1316:6893:14;;;;;1500:62:0;;:::i;:::-;1316:6893:14;;;;;;;;;;3052:40:0;;;;1316:6893:14;;;;;;-1:-1:-1;;1316:6893:14;;;;;;;;1999:66;1316:6893;;;;;;;;-1:-1:-1;;1316:6893:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1316:6893:14;;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;;-1:-1:-1;;1316:6893:14;;;;;;;:::i;:::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5248:23;;1316:6893;;;;;5248:23;;:::i;:::-;1316:6893;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1316:6893:14;;;;;;;;:::i;:::-;1500:62:0;;:::i;:::-;1316:6893:14;;-1:-1:-1;1316:6893:14;4548:12:11;1316:6893:14;;4548:12:11;1316:6893:14;-1:-1:-1;1316:6893:14;;4548:40:11;:45;4544:78;;1316:6893:14;-1:-1:-1;1316:6893:14;4548:12:11;1316:6893:14;;;-1:-1:-1;1316:6893:14;;;;;;;4675:19:11;-1:-1:-1;4675:19:11;;1316:6893:14;4544:78:11;4602:20;-1:-1:-1;4602:20:11;1316:6893:14;-1:-1:-1;4602:20:11;1316:6893:14;;;;;-1:-1:-1;;1316:6893:14;;;;;;;;:::i;:::-;1500:62:0;;:::i;:::-;1316:6893:14;2627:22:0;;2623:91;;1316:6893:14;-1:-1:-1;1316:6893:14;;;;;;-1:-1:-1;1316:6893:14;;3052:40:0;-1:-1:-1;3052:40:0;;1316:6893:14;2623:91:0;2672:31;-1:-1:-1;2672:31:0;-1:-1:-1;1316:6893:14;;;-1:-1:-1;2672:31:0;1316:6893:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;1110:6:11;;;;;;;;;;;;;;;;:::i;:::-;1316:6893:14;;;1110:6:11;;1316:6893:14;1110:6:11:o;2466:103:8:-;;;;;2702:7;1316:6893:14;;2702:18:8;2698:86;;2702:7;1899:1;;5377:19:14;;;1316:6893;;;;3726:12:11;1316:6893:14;;;;;;;5377:19;5410:27;5377:12;5410:27;;:32;5406:75;;1316:6893;;;2382:42;5508:21;;;5600:1925;;;;1110:6:11;5679:27:14;:32;5675:72;;5885:21;5924:12;;;5920:42;;6031:22;;6027:58;;7647:63;-1:-1:-1;6170:27:14;;;;;5600:1925;7647:63;:::i;:::-;7894:88;;;;;7905:46;;;;;;;;;;;;:::i;:::-;7894:88;;7996:8;7992:40;;1316:6893;8130:47;1316:6893;8130:47;1316:6893;;;;;;;8130:47;;;:::i;:::-;;;;2531:1:8;;1857;3068:21;1899:1;2888:208;2531:1;2466:103::o;7992:40:14:-;1316:6893;;8013:19;;;1316:6893;8013:19;1316:6893;8013:19;;;;:::i;:::-;;;;7894:88;7954:28;;;;;;;;;;;;:::i;:::-;7894:88;;;6027:58;6062:23;-1:-1:-1;6062:23:14;1110:6:11;-1:-1:-1;6062:23:14;5920:42;5945:17;-1:-1:-1;5945:17:14;1110:6:11;-1:-1:-1;5945:17:14;5675:72;5720:27;-1:-1:-1;5720:27:14;1110:6:11;-1:-1:-1;5720:27:14;5600:1925;6349:35;;;;;;;;;1316:6893;;;6349:35;;6373:10;6349:35;;;1316:6893;6349:35;1316:6893;;;6349:35;;;;;;;;-1:-1:-1;6349:35:14;;;5600:1925;6339:45;;6492:22;;;6488:60;;6732:7;6725:4;;6373:10;6732:7;;:::i;:::-;6864;;;;;:::i;:::-;2702::8;7022:27:14;7067:36;;7063:452;;5600:1925;;-1:-1:-1;5600:1925:14;;;;;7647:63;5600:1925;7647:63;:::i;7063:452::-;7145:24;;;;;;;;1316:6893;;7145:24;1316:6893;7145:24;;6349:35;7145:24;6349:35;7145:24;;;;;;;;;-1:-1:-1;7145:24:14;1316:6893;7647:63;7145:24;;;;;;;7063:452;1316:6893;;1479:2;7191:19;;7187:231;;7063:452;;;;;;;;;;;7187:231;7362:37;7379:19;;;;7372:27;7379:19;;:::i;:::-;7372:27;:::i;:::-;7362:37;;:::i;:::-;7187:231;;;;;7145:24;;;;6349:35;7145:24;6349:35;7145:24;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;;:::i;:::-;;:::i;6488:60::-;6523:25;-1:-1:-1;6523:25:14;6349:35;-1:-1:-1;6523:25:14;6349:35;;;;;;;;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;5406:75;5451:30;-1:-1:-1;5451:30:14;;-1:-1:-1;5451:30:14;2698:86:8;2743:30;-1:-1:-1;2743:30:8;;-1:-1:-1;2743:30:8;1316:6893:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1479:2::-;;;;;;;;;;;;;;;;;;;:::o;:::-;;:::i;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;:::i;:::-;1316:6893;;;;;;;:::i;:::-;1479:2;;;-1:-1:-1;1479:2:14;;;;:::o;:::-;1316:6893;1479:2;:::o;:::-;;;;;;1316:6893;;1479:2;;;;;;;;:::i;1796:162:0:-;1316:6893:14;1710:6:0;1316:6893:14;;735:10:7;1855:23:0;1851:101;;1796:162::o;1851:101::-;1901:40;1710:6;1901:40;735:10:7;1901:40:0;1316:6893:14;;1710:6:0;1901:40;1618:188:6;;;;1316:6893:14;1745:53:6;1618:188;1316:6893:14;;;1745:53:6;1316:6893:14;1745:53:6;;;;1316:6893:14;1745:53:6;;;1316:6893:14;;;;;;;;;;;1745:53:6;;;;;;:::i;:::-;;:::i;1316:6893:14:-;;344:2:10;1316:6893:14;;;;;;;:::o;3146:225:6:-;;;1316:6893:14;;;3265:39:6;;;;;;1316:6893:14;3265:39:6;1316:6893:14;;;3265:39:6;;;;1316:6893:14;3265:39:6;;3289:4;3265:39;;;1316:6893:14;;;;;;;;3265:39:6;;;;;;;-1:-1:-1;3265:39:6;;;3146:225;3343:20;1316:6893:14;;;;;;;3343:20:6;;;:::i;3265:39::-;;;;;1316:6893:14;3265:39:6;1316:6893:14;3265:39:6;;;;;;;:::i;:::-;;;;;1539:1431:10;1316:6893:14;1539:1431:10;1316:6893:14;;;:::i;:::-;1902:2:10;1316:6893:14;;1886:18:10;1882:163;;2308:13;2320:1;2303:637;2356:15;2328:26;1316:6893:14;;2328:26:10;:::i;:::-;2323:31;;;;344:2;2414:217;;;;;1999:66:14;2414:217:10;;2649:20;2645:285;;2356:15;;;;;;:::i;:::-;2308:13;;;;2645:285;2689:171;;;1539:1431;:::o;2323:31::-;;;;1539:1431;:::o;1882:163::-;1927:107;1316:6893:14;;1927:107:10;;;1316:6893:14;1927:107:10;;;1316:6893:14;;1902:2:10;1316:6893:14;;;;;;;;;;;;;;;;;;1927:107:10;8370:720:6;;-1:-1:-1;8507:421:6;8370:720;8507:421;;;;;;;;;;;;-1:-1:-1;8507:421:6;;8942:15;;1316:6893:14;;;;8960:26:6;:31;8942:68;8938:146;;8370:720;:::o;8938:146::-;1316:6893:14;9033:40:6;;-1:-1:-1;9033:40:6;1316:6893:14;9033:40:6;1316:6893:14;;-1:-1:-1;9033:40:6;8942:68;9009:1;8994:16;;8942:68;;5084:380;;;;5199:47;-1:-1:-1;1316:6893:14;;5199:47:6;;;;;1316:6893:14;5199:47:6;;1316:6893:14;;;5199:47:6;;;1316:6893:14;;;;;;5199:47:6;;;;;;:::i;:::-;9770:199;;;;;;;-1:-1:-1;9770:199:6;;;;9985:80;;5084:380;-1:-1:-1;5261:45:6;;-1:-1:-1;5261:45:6;5257:201;;5084:380;;;:::o;5257:201::-;1316:6893:14;;;5199:47:6;5349:43;;;1316:6893:14;;;;;5199:47:6;5349:43;;1316:6893:14;-1:-1:-1;1316:6893:14;;;;;;;;5349:43:6;;5434:12;;5349:43;;;1316:6893:14;;5349:43:6;:::i;:::-;;;:::i;9985:80::-;9997:15;;;-1:-1:-1;9997:15:6;;1316:6893:14;5261:45:6;1316:6893:14;;;10015:26:6;:30;;9997:67;9985:80;;;9997:67;10063:1;5261:45;10048:16;;9997:67;

Swarm Source

ipfs://8132733c0f6dd32400fc11eba6ba9e07795a68455862a2c5d2c287d088f1064b

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
0x02568F589DB9028eb042B3E5a5BBE98709724a2f
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.