ETH Price: $1,933.34 (-4.03%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0xe8615624ec629538438f82d9bc62330c246bf825f7f3f281abef49b368479477 Invest(pending)2026-02-19 4:14:238 days ago1771474463IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH(Pending)(Pending)
Update Merkle Ro...245486992026-02-27 13:55:2310 hrs ago1772200523IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000006620.2205823
Update Merkle Ro...245435672026-02-26 20:45:2328 hrs ago1772138723IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000002030.06762048
Update Merkle Ro...245415762026-02-26 14:05:2334 hrs ago1772114723IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000007610.25327898
Update Merkle Ro...245411032026-02-26 12:30:2336 hrs ago1772109023IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.00000260.08676913
Update Merkle Ro...245409532026-02-26 12:00:2336 hrs ago1772107223IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000002140.07146736
Update Merkle Ro...245377152026-02-26 1:10:2347 hrs ago1772068223IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000002410.08028892
Update Merkle Ro...245374922026-02-26 0:25:352 days ago1772065535IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.00001050.34947662
Update Merkle Ro...245373692026-02-26 0:00:472 days ago1772064047IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000002630.08765979
Update Merkle Ro...245256242026-02-24 8:40:233 days ago1771922423IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000002250.07517737
Update Merkle Ro...245229312026-02-23 23:40:234 days ago1771890023IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000001570.05244193
Update Merkle Ro...245205922026-02-23 15:50:234 days ago1771861823IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000004480.14936146
Update Merkle Ro...245202972026-02-23 14:51:114 days ago1771858271IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000003570.11911007
Update Merkle Ro...245201992026-02-23 14:30:474 days ago1771857047IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000004210.14033212
Update Merkle Ro...245193752026-02-23 11:45:234 days ago1771847123IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000001850.06186821
Update Merkle Ro...245188012026-02-23 9:50:234 days ago1771840223IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.00000350.11663604
Invest245187122026-02-23 9:32:114 days ago1771839131IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000060610.11889694
Invest245186892026-02-23 9:27:354 days ago1771838855IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000061040.12040061
Invest245184682026-02-23 8:43:234 days ago1771836203IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.001041632.04470223
Invest245182272026-02-23 7:54:474 days ago1771833287IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000026990.05298996
Invest245182082026-02-23 7:50:594 days ago1771833059IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000027540.05452617
Invest245180402026-02-23 7:17:234 days ago1771831043IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000027620.05500035
Invest245170182026-02-23 3:52:594 days ago1771818779IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.001022972.0366784
Invest245165232026-02-23 2:13:234 days ago1771812803IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000087830.16925757
Update Merkle Ro...245163872026-02-23 1:46:114 days ago1771811171IN
Impossible Finance: Flying Tulip Public Deposit
0 ETH0.000005810.19339415
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PutManagerInvestProxy

Compiler Version
v0.8.30+commit.73712a01

Optimization Enabled:
Yes with 999999 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.30;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ReentrancyGuardTransient} from "@openzeppelin/contracts/utils/ReentrancyGuardTransient.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

interface IPutManager {
    function invest(
        address token,
        uint256 amount,
        address recipient,
        uint256 proofAmount,
        bytes32[] calldata proofWL
    )
        external
        returns (uint256 id);
}

/**
 * @notice A whitelisted proxy payer for PutManager.invest that enforces a separate (per-user) ACL.
 * @dev Design notes:
 * - Users approve this contract to pull collateral.
 * - This contract transfers collateral into itself and then calls PutManager.invest as msg.sender (payer).
 * - PutManager mints the pFT to `recipient`.
 * - To avoid PutManager ftACL tracking cap usage against this proxy (shared across all users),
 *   whitelist this proxy with a leaf `(proxy, address(0), 0)` and keep `putManagerProofAmount = 0`.
 *   The PutManager proof for this proxy (`proofWL`) is stored on-chain in this contract.
 */
contract PutManagerInvestProxy is Ownable, ReentrancyGuardTransient {
    using SafeERC20 for IERC20;

    IPutManager public immutable putManager;

    // ---- User ACL (Merkle) ----
    bytes32 public merkleRoot;
    mapping(address account => mapping(address token => uint256 invested)) public amountInvested;

    // ---- PutManager ACL proof (Merkle) ----
    // Used when calling PutManager.invest as this proxy (payer = this contract).
    // Recommendation: whitelist this proxy with a leaf (proxy, address(0), 0) and use `putManagerProofAmount = 0`
    // to avoid PutManager ftACL cap accounting aggregating all users into this proxy address.
    uint256 public putManagerProofAmount;
    bytes32[] internal _putManagerProofWL;

    // ---- Caller ACL (on-chain allowlist) ----
    mapping(address caller => bool allowed) public allowedCallers;

    event MerkleRootUpdated(bytes32 indexed newRoot);
    event PutManagerProofUpdated(uint256 proofAmount, bytes32[] proofWL);
    event AllowedCallerUpdated(address indexed caller, bool allowed);
    event ProxiedInvest(
        address indexed payer,
        address indexed recipient,
        address indexed token,
        uint256 amount,
        uint256 id
    );
    event TokenSwept(address indexed token, address indexed to, uint256 amount);

    error ftInvestProxyZeroAddress();
    error ftInvestProxyZeroRoot();
    error ftInvestProxyNotAllowedCaller();
    error ftInvestProxyNotWhitelisted();
    error ftInvestProxyCapReached();
    error ftInvestProxyInvalidAmount();
    error ftInvestProxyZeroRecipient();
    error ftInvestProxyNothingToSweep();

    modifier onlyAllowedCaller() {
        if (msg.sender != owner() && !allowedCallers[msg.sender]) {
            revert ftInvestProxyNotAllowedCaller();
        }
        _;
    }

    constructor(address _putManager, bytes32 root) Ownable(msg.sender) {
        if (_putManager == address(0)) revert ftInvestProxyZeroAddress();
        if (root == bytes32(0)) revert ftInvestProxyZeroRoot();
        putManager = IPutManager(_putManager);
        merkleRoot = root;
        emit MerkleRootUpdated(root);
    }

    function updateMerkleRoot(bytes32 newRoot) external onlyOwner {
        if (newRoot == bytes32(0)) revert ftInvestProxyZeroRoot();
        merkleRoot = newRoot;
        emit MerkleRootUpdated(newRoot);
    }

    function setPutManagerProof(
        uint256 newProofAmount,
        bytes32[] calldata newProofWL
    )
        external
        onlyOwner
    {
        putManagerProofAmount = newProofAmount;
        _putManagerProofWL = newProofWL;
        emit PutManagerProofUpdated(newProofAmount, newProofWL);
    }

    function setAllowedCaller(address caller, bool allowed) external onlyOwner {
        if (caller == address(0)) revert ftInvestProxyZeroAddress();
        allowedCallers[caller] = allowed;
        emit AllowedCallerUpdated(caller, allowed);
    }

    /**
     * @dev Verify if an address is whitelisted using merkle proof.
     * Tries all possible combinations of parameters:
     * - asset can be: actual asset or address(0)
     * - amount can be: actual amount or 0
     */
    function isWhitelisted(
        address who,
        address asset,
        uint256 amount,
        bytes32[] calldata proof
    )
        public
        view
        returns (bool)
    {
        bytes32 leaf;

        // 1. Exact match: specific asset, and amount
        leaf = keccak256(bytes.concat(keccak256(abi.encode(who, asset, amount))));
        if (MerkleProof.verify(proof, merkleRoot, leaf)) {
            return true;
        }

        // 2. Specific asset, any amount
        leaf = keccak256(bytes.concat(keccak256(abi.encode(who, asset, uint256(0)))));
        if (MerkleProof.verify(proof, merkleRoot, leaf)) {
            return true;
        }

        // 3. Any asset & amount
        leaf = keccak256(bytes.concat(keccak256(abi.encode(who, address(0), uint256(0)))));
        if (MerkleProof.verify(proof, merkleRoot, leaf)) {
            return true;
        }
        return false;
    }

    /**
     * @notice Public invest: payer is msg.sender, recipient can be any address.
     * @param token Collateral token.
     * @param amount Collateral amount.
     * @param recipient pFT recipient in PutManager.
     * @param proofAmount User ACL cap (0 = unlimited).
     * @param proofWL User ACL merkle proof.
     */
    function invest(
        address token,
        uint256 amount,
        address recipient,
        uint256 proofAmount,
        bytes32[] calldata proofWL
    )
        external
        nonReentrant
        returns (uint256 id)
    {
        id = _invest(msg.sender, token, amount, recipient, proofAmount, proofWL);
        emit ProxiedInvest(msg.sender, recipient, token, amount, id);
    }

    /**
     * @notice Permissioned invest on behalf of `from`, minting the pFT back to `from`.
     * @dev Caller must be owner or explicitly allowlisted via `setAllowedCaller`.
     *      This path intentionally does not require a user merkle proof.
     */
    function investFor(
        address from,
        address token,
        uint256 amount
    )
        external
        nonReentrant
        onlyAllowedCaller
        returns (uint256 id)
    {
        id = _investWithoutUserACL(from, token, amount, from);
        emit ProxiedInvest(from, from, token, amount, id);
    }

    /**
     * @notice Permissioned self-invest (payer and recipient are msg.sender).
     * @dev Caller must be owner or explicitly allowlisted via `setAllowedCaller`.
     *      This path intentionally does not require a user merkle proof.
     */
    function investFor(
        address token,
        uint256 amount,
        address recipient
    )
        external
        nonReentrant
        onlyAllowedCaller
        returns (uint256 id)
    {
        id = _investWithoutUserACL(msg.sender, token, amount, recipient);
        emit ProxiedInvest(msg.sender, recipient, token, amount, id);
    }

    function _invest(
        address payer,
        address token,
        uint256 amount,
        address recipient,
        uint256 proofAmount,
        bytes32[] calldata proofWL
    )
        internal
        returns (uint256 id)
    {
        if (recipient == address(0)) revert ftInvestProxyZeroRecipient();
        if (amount == 0) revert ftInvestProxyInvalidAmount();
        if (!isWhitelisted(payer, token, proofAmount, proofWL)) {
            revert ftInvestProxyNotWhitelisted();
        }

        if (proofAmount != 0) {
            uint256 newInvestedAmount = amountInvested[payer][token] + amount;
            if (newInvestedAmount > proofAmount) revert ftInvestProxyCapReached();
            amountInvested[payer][token] = newInvestedAmount;
        }

        IERC20(token).safeTransferFrom(payer, address(this), amount);
        IERC20(token).forceApprove(address(putManager), amount);

        // Call PutManager as the whitelisted payer (this proxy).
        id = putManager.invest(token, amount, recipient, putManagerProofAmount, _putManagerProofWL);
    }

    function _investWithoutUserACL(
        address payer,
        address token,
        uint256 amount,
        address recipient
    )
        internal
        returns (uint256 id)
    {
        if (recipient == address(0)) revert ftInvestProxyZeroRecipient();
        if (amount == 0) revert ftInvestProxyInvalidAmount();

        IERC20(token).safeTransferFrom(payer, address(this), amount);
        IERC20(token).forceApprove(address(putManager), amount);

        // Call PutManager as the whitelisted payer (this proxy).
        id = putManager.invest(token, amount, recipient, putManagerProofAmount, _putManagerProofWL);
    }

    function getPutManagerProofWL() external view returns (bytes32[] memory) {
        return _putManagerProofWL;
    }

    function sweepERC20(
        address token,
        address to
    )
        external
        nonReentrant
        onlyOwner
        returns (uint256 amount)
    {
        if (token == address(0) || to == address(0)) revert ftInvestProxyZeroAddress();
        amount = IERC20(token).balanceOf(address(this));
        if (amount == 0) revert ftInvestProxyNothingToSweep();

        // Safety: revoke any PutManager allowance before transferring away funds.
        IERC20(token).forceApprove(address(putManager), 0);
        IERC20(token).safeTransfer(to, amount);
        emit TokenSwept(token, to, 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.3.0) (utils/ReentrancyGuardTransient.sol)

pragma solidity ^0.8.24;

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

/**
 * @dev Variant of {ReentrancyGuard} that uses transient storage.
 *
 * NOTE: This variant only works on networks where EIP-1153 is available.
 *
 * _Available since v5.1._
 *
 * @custom:stateless
 */
abstract contract ReentrancyGuardTransient {
    using TransientSlot for *;

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant REENTRANCY_GUARD_STORAGE =
        0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;

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

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

    /**
     * @dev A `view` only version of {nonReentrant}. Use to block view functions
     * from being called, preventing reading from inconsistent contract state.
     *
     * CAUTION: This is a "view" modifier and does not change the reentrancy
     * status. Use it only on view functions. For payable or non-payable functions,
     * use the standard {nonReentrant} modifier instead.
     */
    modifier nonReentrantView() {
        _nonReentrantBeforeView();
        _;
    }

    function _nonReentrantBeforeView() private view {
        if (_reentrancyGuardEntered()) {
            revert ReentrancyGuardReentrantCall();
        }
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, REENTRANCY_GUARD_STORAGE.asBoolean().tload() will be false
        _nonReentrantBeforeView();

        // Any calls to nonReentrant after this point will fail
        _reentrancyGuardStorageSlot().asBoolean().tstore(true);
    }

    function _nonReentrantAfter() private {
        _reentrancyGuardStorageSlot().asBoolean().tstore(false);
    }

    /**
     * @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 _reentrancyGuardStorageSlot().asBoolean().tload();
    }

    function _reentrancyGuardStorageSlot() internal pure virtual returns (bytes32) {
        return REENTRANCY_GUARD_STORAGE;
    }
}

// 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.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 {
        if (!_safeTransfer(token, to, value, true)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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 {
        if (!_safeTransferFrom(token, from, to, value, true)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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 _safeTransfer(token, to, value, false);
    }

    /**
     * @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 _safeTransferFrom(token, from, to, value, false);
    }

    /**
     * @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 {
        if (!_safeApprove(token, spender, value, false)) {
            if (!_safeApprove(token, spender, 0, true)) revert SafeERC20FailedOperation(address(token));
            if (!_safeApprove(token, spender, value, true)) revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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 `token.transfer(to, value)` call, 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 to The recipient of the tokens
     * @param value The amount of token to transfer
     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.
     */
    function _safeTransfer(IERC20 token, address to, uint256 value, bool bubble) private returns (bool success) {
        bytes4 selector = IERC20.transfer.selector;

        assembly ("memory-safe") {
            let fmp := mload(0x40)
            mstore(0x00, selector)
            mstore(0x04, and(to, shr(96, not(0))))
            mstore(0x24, value)
            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)
            // if call success and return is true, all is good.
            // otherwise (not success or return is not true), we need to perform further checks
            if iszero(and(success, eq(mload(0x00), 1))) {
                // if the call was a failure and bubble is enabled, bubble the error
                if and(iszero(success), bubble) {
                    returndatacopy(fmp, 0x00, returndatasize())
                    revert(fmp, returndatasize())
                }
                // if the return value is not true, then the call is only successful if:
                // - the token address has code
                // - the returndata is empty
                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))
            }
            mstore(0x40, fmp)
        }
    }

    /**
     * @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, 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 from The sender of the tokens
     * @param to The recipient of the tokens
     * @param value The amount of token to transfer
     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.
     */
    function _safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value,
        bool bubble
    ) private returns (bool success) {
        bytes4 selector = IERC20.transferFrom.selector;

        assembly ("memory-safe") {
            let fmp := mload(0x40)
            mstore(0x00, selector)
            mstore(0x04, and(from, shr(96, not(0))))
            mstore(0x24, and(to, shr(96, not(0))))
            mstore(0x44, value)
            success := call(gas(), token, 0, 0x00, 0x64, 0x00, 0x20)
            // if call success and return is true, all is good.
            // otherwise (not success or return is not true), we need to perform further checks
            if iszero(and(success, eq(mload(0x00), 1))) {
                // if the call was a failure and bubble is enabled, bubble the error
                if and(iszero(success), bubble) {
                    returndatacopy(fmp, 0x00, returndatasize())
                    revert(fmp, returndatasize())
                }
                // if the return value is not true, then the call is only successful if:
                // - the token address has code
                // - the returndata is empty
                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))
            }
            mstore(0x40, fmp)
            mstore(0x60, 0)
        }
    }

    /**
     * @dev Imitates a Solidity `token.approve(spender, value)` call, 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 spender The spender of the tokens
     * @param value The amount of token to transfer
     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.
     */
    function _safeApprove(IERC20 token, address spender, uint256 value, bool bubble) private returns (bool success) {
        bytes4 selector = IERC20.approve.selector;

        assembly ("memory-safe") {
            let fmp := mload(0x40)
            mstore(0x00, selector)
            mstore(0x04, and(spender, shr(96, not(0))))
            mstore(0x24, value)
            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)
            // if call success and return is true, all is good.
            // otherwise (not success or return is not true), we need to perform further checks
            if iszero(and(success, eq(mload(0x00), 1))) {
                // if the call was a failure and bubble is enabled, bubble the error
                if and(iszero(success), bubble) {
                    returndatacopy(fmp, 0x00, returndatasize())
                    revert(fmp, returndatasize())
                }
                // if the return value is not true, then the call is only successful if:
                // - the token address has code
                // - the returndata is empty
                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))
            }
            mstore(0x40, fmp)
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/MerkleProof.sol)
// This file was procedurally generated from scripts/generate/templates/MerkleProof.js.

pragma solidity ^0.8.20;

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

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the Merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates Merkle trees that are safe
 * against this attack out of the box.
 *
 * IMPORTANT: Consider memory side-effects when using custom hashing functions
 * that access memory in an unsafe way.
 *
 * NOTE: This library supports proof verification for merkle trees built using
 * custom _commutative_ hashing functions (i.e. `H(a, b) == H(b, a)`). Proving
 * leaf inclusion in trees built using non-commutative hashing functions requires
 * additional logic that is not supported by this library.
 */
library MerkleProof {
    /**
     *@dev The multiproof provided is not valid.
     */
    error MerkleProofInvalidMultiproof();

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     *
     * This version handles proofs in memory with the default hashing function.
     */
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leaves & pre-images are assumed to be sorted.
     *
     * This version handles proofs in memory with the default hashing function.
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = Hashes.commutativeKeccak256(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     *
     * This version handles proofs in memory with a custom hashing function.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bool) {
        return processProof(proof, leaf, hasher) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leaves & pre-images are assumed to be sorted.
     *
     * This version handles proofs in memory with a custom hashing function.
     */
    function processProof(
        bytes32[] memory proof,
        bytes32 leaf,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = hasher(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     *
     * This version handles proofs in calldata with the default hashing function.
     */
    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leaves & pre-images are assumed to be sorted.
     *
     * This version handles proofs in calldata with the default hashing function.
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = Hashes.commutativeKeccak256(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     *
     * This version handles proofs in calldata with a custom hashing function.
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bool) {
        return processProofCalldata(proof, leaf, hasher) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leaves & pre-images are assumed to be sorted.
     *
     * This version handles proofs in calldata with a custom hashing function.
     */
    function processProofCalldata(
        bytes32[] calldata proof,
        bytes32 leaf,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = hasher(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * This version handles multiproofs in memory with the default hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
     * The `leaves` must be validated independently. See {processMultiProof}.
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * This version handles multiproofs in memory with the default hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
     * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
     * validating the leaves elsewhere.
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofFlagsLen = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proof.length != proofFlagsLen + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](proofFlagsLen);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < proofFlagsLen; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = Hashes.commutativeKeccak256(a, b);
        }

        if (proofFlagsLen > 0) {
            if (proofPos != proof.length) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[proofFlagsLen - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * This version handles multiproofs in memory with a custom hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
     * The `leaves` must be validated independently. See {processMultiProof}.
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bool) {
        return processMultiProof(proof, proofFlags, leaves, hasher) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * This version handles multiproofs in memory with a custom hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
     * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
     * validating the leaves elsewhere.
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofFlagsLen = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proof.length != proofFlagsLen + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](proofFlagsLen);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < proofFlagsLen; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = hasher(a, b);
        }

        if (proofFlagsLen > 0) {
            if (proofPos != proof.length) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[proofFlagsLen - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * This version handles multiproofs in calldata with the default hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
     * The `leaves` must be validated independently. See {processMultiProofCalldata}.
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * This version handles multiproofs in calldata with the default hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
     * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
     * validating the leaves elsewhere.
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofFlagsLen = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proof.length != proofFlagsLen + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](proofFlagsLen);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < proofFlagsLen; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = Hashes.commutativeKeccak256(a, b);
        }

        if (proofFlagsLen > 0) {
            if (proofPos != proof.length) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[proofFlagsLen - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * This version handles multiproofs in calldata with a custom hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`.
     * The `leaves` must be validated independently. See {processMultiProofCalldata}.
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves, hasher) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * This version handles multiproofs in calldata with a custom hashing function.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op,
     * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not
     * validating the leaves elsewhere.
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves,
        function(bytes32, bytes32) view returns (bytes32) hasher
    ) internal view returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofFlagsLen = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proof.length != proofFlagsLen + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](proofFlagsLen);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < proofFlagsLen; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = hasher(a, b);
        }

        if (proofFlagsLen > 0) {
            if (proofPos != proof.length) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[proofFlagsLen - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }
}

// 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.3.0) (utils/TransientSlot.sol)
// This file was procedurally generated from scripts/generate/templates/TransientSlot.js.

pragma solidity ^0.8.24;

/**
 * @dev Library for reading and writing value-types to specific transient storage slots.
 *
 * Transient slots are often used to store temporary values that are removed after the current transaction.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 *  * Example reading and writing values using transient storage:
 * ```solidity
 * contract Lock {
 *     using TransientSlot for *;
 *
 *     // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
 *     bytes32 internal constant _LOCK_SLOT = 0xf4678858b2b588224636b8522b729e7722d32fc491da849ed75b3fdf3c84f542;
 *
 *     modifier locked() {
 *         require(!_LOCK_SLOT.asBoolean().tload());
 *
 *         _LOCK_SLOT.asBoolean().tstore(true);
 *         _;
 *         _LOCK_SLOT.asBoolean().tstore(false);
 *     }
 * }
 * ```
 *
 * TIP: Consider using this library along with {SlotDerivation}.
 */
library TransientSlot {
    /**
     * @dev UDVT that represents a slot holding an address.
     */
    type AddressSlot is bytes32;

    /**
     * @dev Cast an arbitrary slot to a AddressSlot.
     */
    function asAddress(bytes32 slot) internal pure returns (AddressSlot) {
        return AddressSlot.wrap(slot);
    }

    /**
     * @dev UDVT that represents a slot holding a bool.
     */
    type BooleanSlot is bytes32;

    /**
     * @dev Cast an arbitrary slot to a BooleanSlot.
     */
    function asBoolean(bytes32 slot) internal pure returns (BooleanSlot) {
        return BooleanSlot.wrap(slot);
    }

    /**
     * @dev UDVT that represents a slot holding a bytes32.
     */
    type Bytes32Slot is bytes32;

    /**
     * @dev Cast an arbitrary slot to a Bytes32Slot.
     */
    function asBytes32(bytes32 slot) internal pure returns (Bytes32Slot) {
        return Bytes32Slot.wrap(slot);
    }

    /**
     * @dev UDVT that represents a slot holding a uint256.
     */
    type Uint256Slot is bytes32;

    /**
     * @dev Cast an arbitrary slot to a Uint256Slot.
     */
    function asUint256(bytes32 slot) internal pure returns (Uint256Slot) {
        return Uint256Slot.wrap(slot);
    }

    /**
     * @dev UDVT that represents a slot holding a int256.
     */
    type Int256Slot is bytes32;

    /**
     * @dev Cast an arbitrary slot to a Int256Slot.
     */
    function asInt256(bytes32 slot) internal pure returns (Int256Slot) {
        return Int256Slot.wrap(slot);
    }

    /**
     * @dev Load the value held at location `slot` in transient storage.
     */
    function tload(AddressSlot slot) internal view returns (address value) {
        assembly ("memory-safe") {
            value := tload(slot)
        }
    }

    /**
     * @dev Store `value` at location `slot` in transient storage.
     */
    function tstore(AddressSlot slot, address value) internal {
        assembly ("memory-safe") {
            tstore(slot, value)
        }
    }

    /**
     * @dev Load the value held at location `slot` in transient storage.
     */
    function tload(BooleanSlot slot) internal view returns (bool value) {
        assembly ("memory-safe") {
            value := tload(slot)
        }
    }

    /**
     * @dev Store `value` at location `slot` in transient storage.
     */
    function tstore(BooleanSlot slot, bool value) internal {
        assembly ("memory-safe") {
            tstore(slot, value)
        }
    }

    /**
     * @dev Load the value held at location `slot` in transient storage.
     */
    function tload(Bytes32Slot slot) internal view returns (bytes32 value) {
        assembly ("memory-safe") {
            value := tload(slot)
        }
    }

    /**
     * @dev Store `value` at location `slot` in transient storage.
     */
    function tstore(Bytes32Slot slot, bytes32 value) internal {
        assembly ("memory-safe") {
            tstore(slot, value)
        }
    }

    /**
     * @dev Load the value held at location `slot` in transient storage.
     */
    function tload(Uint256Slot slot) internal view returns (uint256 value) {
        assembly ("memory-safe") {
            value := tload(slot)
        }
    }

    /**
     * @dev Store `value` at location `slot` in transient storage.
     */
    function tstore(Uint256Slot slot, uint256 value) internal {
        assembly ("memory-safe") {
            tstore(slot, value)
        }
    }

    /**
     * @dev Load the value held at location `slot` in transient storage.
     */
    function tload(Int256Slot slot) internal view returns (int256 value) {
        assembly ("memory-safe") {
            value := tload(slot)
        }
    }

    /**
     * @dev Store `value` at location `slot` in transient storage.
     */
    function tstore(Int256Slot slot, int256 value) internal {
        assembly ("memory-safe") {
            tstore(slot, value)
        }
    }
}

// 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.3.0) (utils/cryptography/Hashes.sol)

pragma solidity ^0.8.20;

/**
 * @dev Library of standard hash functions.
 *
 * _Available since v5.1._
 */
library Hashes {
    /**
     * @dev Commutative Keccak256 hash of a sorted pair of bytes32. Frequently used when working with merkle proofs.
     *
     * NOTE: Equivalent to the `standardNodeHash` in our https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
     */
    function commutativeKeccak256(bytes32 a, bytes32 b) internal pure returns (bytes32) {
        return a < b ? efficientKeccak256(a, b) : efficientKeccak256(b, a);
    }

    /**
     * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
     */
    function efficientKeccak256(bytes32 a, bytes32 b) internal pure returns (bytes32 value) {
        assembly ("memory-safe") {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 11 of 13 : 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 12 of 13 : 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.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": [
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "murky/=lib/murky/src/",
    "ds-test/=lib/murky/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none",
    "appendCBOR": false
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": true
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_putManager","type":"address"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"ftInvestProxyCapReached","type":"error"},{"inputs":[],"name":"ftInvestProxyInvalidAmount","type":"error"},{"inputs":[],"name":"ftInvestProxyNotAllowedCaller","type":"error"},{"inputs":[],"name":"ftInvestProxyNotWhitelisted","type":"error"},{"inputs":[],"name":"ftInvestProxyNothingToSweep","type":"error"},{"inputs":[],"name":"ftInvestProxyZeroAddress","type":"error"},{"inputs":[],"name":"ftInvestProxyZeroRecipient","type":"error"},{"inputs":[],"name":"ftInvestProxyZeroRoot","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"bool","name":"allowed","type":"bool"}],"name":"AllowedCallerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"MerkleRootUpdated","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":"payer","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ProxiedInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proofAmount","type":"uint256"},{"indexed":false,"internalType":"bytes32[]","name":"proofWL","type":"bytes32[]"}],"name":"PutManagerProofUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenSwept","type":"event"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"allowedCallers","outputs":[{"internalType":"bool","name":"allowed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"amountInvested","outputs":[{"internalType":"uint256","name":"invested","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPutManagerProofWL","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"proofAmount","type":"uint256"},{"internalType":"bytes32[]","name":"proofWL","type":"bytes32[]"}],"name":"invest","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"investFor","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"investFor","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"putManager","outputs":[{"internalType":"contract IPutManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"putManagerProofAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"bool","name":"allowed","type":"bool"}],"name":"setAllowedCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newProofAmount","type":"uint256"},{"internalType":"bytes32[]","name":"newProofWL","type":"bytes32[]"}],"name":"setPutManagerProof","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"sweepERC20","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"updateMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a03461013657601f611a5138819003918201601f19168301916001600160401b0383118484101761013a5780849260409485528339810103126101365780516001600160a01b038116919082900361013657602001513315610123575f8054336001600160a01b0319821681178355604051949290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3801561011457811561010557608052806001557f90004c04698bc3322499a575ed3752dd4abf33e0a7294c06a787a0fe01bea9415f80a2611902908161014f823960805181818161036501528181610da501528181610ff201526116220152f35b638a87471760e01b5f5260045ffd5b6303ff5e5b60e41b5f5260045ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f3560e01c806322cff155146110e35780632eb4a7ab146110a85780634783f0ef146110165780634f5e808514610fa8578063582515c714610ccf5780636e1aa66214610c94578063715018a614610bfa5780637b33415414610b92578063866797be14610a855780638da5cb5b14610a35578063916518b7146109b8578063b5228cc9146107e9578063b685e3c8146106b5578063d8b0e716146105bf578063de83db801461027d578063e988778b146101c45763f2fde38b146100d4575f80fd5b346101c05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05773ffffffffffffffffffffffffffffffffffffffff61012061116f565b6101286113cf565b1680156101945773ffffffffffffffffffffffffffffffffffffffff5f54827fffffffffffffffffffffffff00000000000000000000000000000000000000008216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b7f1e4fbdf7000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b5f80fd5b346101c0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576040518060206004549283815201809260045f5260205f20905f5b81811061026757505050818161022592500382611209565b604051918291602083019060208452518091526040830191905f5b81811061024e575050500390f35b8251845285945060209384019390920191600101610240565b825484526020909301926001928301920161020d565b346101c05760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576102b461116f565b6024356102bf6111b5565b60643560843567ffffffffffffffff81116101c0576102e29036906004016111d8565b91906102ec61141b565b73ffffffffffffffffffffffffffffffffffffffff841692831561059757851561056f5761031c918388336112bb565b156105475780610481575b50602073ffffffffffffffffffffffffffffffffffffffff85169261034e85303387611877565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001661039086828761148f565b855f600354986103cf6040519a8b96879586947fde83db800000000000000000000000000000000000000000000000000000000086526004860161154c565b03925af1928315610476575f93610441575b6020945060405190815283858201527f5a95a7527209e42b5ceb90b2d150399084b22a579ee02a698f1b73f455f37d0c60403392a45f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d604051908152f35b92506020843d60201161046e575b8161045c60209383611209565b810103126101c05760209351926103e1565b3d915061044f565b6040513d5f823e3d90fd5b335f52600260205260405f2073ffffffffffffffffffffffffffffffffffffffff86165f5260205260405f20549084820180921161051a5781116104f257335f52600260205260405f2073ffffffffffffffffffffffffffffffffffffffff86165f5260205260405f205584610327565b7f86976d09000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fb36dc95c000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fb9a36b04000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f03d49e09000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101c05760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576105f661116f565b602435908115158092036101c05773ffffffffffffffffffffffffffffffffffffffff906106226113cf565b1690811561068d5760207fd6fc3082ae3a144ca59421d96180398241c1dd021d45d5a24fb5bf96c9f8212f91835f526005825260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8316179055604051908152a2005b7f3ff5e5b0000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101c05760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576106ec61116f565b6106f4611192565b9060443561070061141b565b73ffffffffffffffffffffffffffffffffffffffff5f5416331415806107d2575b6107aa5773ffffffffffffffffffffffffffffffffffffffff837f5a95a7527209e42b5ceb90b2d150399084b22a579ee02a698f1b73f455f37d0c60408361076d878760209a826115bb565b9616938493825196875287898801521694a45f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d604051908152f35b7f2d1cae5a000000000000000000000000000000000000000000000000000000005f5260045ffd5b50335f52600560205260ff60405f20541615610721565b346101c05760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05760043560243567ffffffffffffffff81116101c05761083b9036906004016111d8565b91906108456113cf565b8160035567ffffffffffffffff831161098b5768010000000000000000831161098b576004548360045580841061092d575b508060045f525f5b8481106108f9575050604051918252604060208301528260408301527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116101c057816060917f952aaa8f52077e13ec9613e046cb89756241fa64f3593b8b127c4b4f96922be99460051b8091848401378101030190a1005b60019060208335930192817f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01550161087f565b7f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01837f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b015b8181106109805750610877565b5f8155600101610973565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b346101c05760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576109ef61116f565b6109f7611192565b906064359067ffffffffffffffff82116101c057602092610a1f610a2b9336906004016111d8565b929091604435916112bb565b6040519015158152f35b346101c0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b346101c05760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057610abc61116f565b60243590610ac86111b5565b610ad061141b565b73ffffffffffffffffffffffffffffffffffffffff5f541633141580610b7b575b6107aa578273ffffffffffffffffffffffffffffffffffffffff80610b1a8460209787336115bb565b946040519384528587850152169216907f5a95a7527209e42b5ceb90b2d150399084b22a579ee02a698f1b73f455f37d0c60403392a45f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d604051908152f35b50335f52600560205260ff60405f20541615610af1565b346101c05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05773ffffffffffffffffffffffffffffffffffffffff610bde61116f565b165f526005602052602060ff60405f2054166040519015158152f35b346101c0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057610c306113cf565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101c0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576020600354604051908152f35b346101c05760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057610d0661116f565b73ffffffffffffffffffffffffffffffffffffffff610d23611192565b91610d2c61141b565b610d346113cf565b169081158015610f8a575b61068d57604051907f70a08231000000000000000000000000000000000000000000000000000000008252306004830152602082602481865afa918215610476575f92610f56575b508115610f2e5773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016610dd05f828661171c565b15610edd575b5073ffffffffffffffffffffffffffffffffffffffff604051917fa9059cbb000000000000000000000000000000000000000000000000000000005f521690816004528260245260205f60448180885af160015f5114811615610ebe575b8160405215610e9257927f115d7b5114b5954762cc233b141a7c777a8f79d93f50af7216d645c87fb4883e60208585829752a35f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d604051908152f35b837f5274afe7000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b6001811516610ed457843b15153d151616610e34565b503d5f823e3d90fd5b610ee78185611790565b15610e92575f610ef79185611815565b15610f025783610dd6565b827f5274afe7000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7facf9116c000000000000000000000000000000000000000000000000000000005f5260045ffd5b9091506020813d602011610f82575b81610f7260209383611209565b810103126101c057519083610d87565b3d9150610f65565b5073ffffffffffffffffffffffffffffffffffffffff811615610d3f565b346101c0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101c05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576004356110506113cf565b801561108057806001557f90004c04698bc3322499a575ed3752dd4abf33e0a7294c06a787a0fe01bea9415f80a2005b7f8a874717000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101c0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576020600154604051908152f35b346101c05760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05761111a61116f565b73ffffffffffffffffffffffffffffffffffffffff611137611192565b91165f52600260205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b6004359073ffffffffffffffffffffffffffffffffffffffff821682036101c057565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036101c057565b6044359073ffffffffffffffffffffffffffffffffffffffff821682036101c057565b9181601f840112156101c05782359167ffffffffffffffff83116101c0576020808501948460051b0101116101c057565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761098b57604052565b9060405191602083015260208252611263604083611209565b565b9291909267ffffffffffffffff841161098b578360051b90602060405161128e82850182611209565b80968152019181019283116101c057905b8282106112ab57505050565b813581526020918201910161129f565b6113099094939460405173ffffffffffffffffffffffffffffffffffffffff80602083019316948584521694856040830152606082015260608152611301608082611209565b51902061124a565b6020815191012091611329600154938461132436888a611265565b6116cb565b6113c55761135961136c91604051602081019185835260408201525f606082015260608152611301608082611209565b6020815191012083611324368789611265565b6113bc576113af936113a061132492604051602081019182525f60408201525f606082015260608152611301608082611209565b60208151910120933691611265565b6113b7575f90565b600190565b50505050600190565b5050505050600190565b73ffffffffffffffffffffffffffffffffffffffff5f541633036113ef57565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005c6114675760017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b919061149c82828561171c565b156114a657505050565b6114b08184611790565b1561150a57906114c09183611815565b156114c85750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b73ffffffffffffffffffffffffffffffffffffffff837f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b9260a0949273ffffffffffffffffffffffffffffffffffffffff80931685526020850152166040830152606082015281608082015201602060045491828152019060045f5260205f20905f5b8181106115a55750505090565b8254845260209093019260019283019201611598565b92909273ffffffffffffffffffffffffffffffffffffffff82161561059757821561056f578261160760209473ffffffffffffffffffffffffffffffffffffffff871693309085611877565b6116498173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016809461148f565b5f60035495611687604051978896879586947fde83db800000000000000000000000000000000000000000000000000000000086526004860161154c565b03925af1908115610476575f9161169c575090565b90506020813d6020116116c3575b816116b760209383611209565b810103126101c0575190565b3d91506116aa565b929091905f915b84518310156117145760208360051b86010151908181105f14611703575f52602052600160405f205b9201916116d2565b905f52602052600160405f206116fb565b915092501490565b929173ffffffffffffffffffffffffffffffffffffffff604051927f095ea7b3000000000000000000000000000000000000000000000000000000005f521660045260245260205f60448180875af19260015f511484161561177f575b50604052565b3d15903b151516909216915f611779565b919073ffffffffffffffffffffffffffffffffffffffff604051917f095ea7b3000000000000000000000000000000000000000000000000000000005f52166004525f60245260205f60448180875af19260015f51148416156117f35750604052565b6001849294151661180c573b15153d151616915f611779565b833d5f823e3d90fd5b929173ffffffffffffffffffffffffffffffffffffffff604051927f095ea7b3000000000000000000000000000000000000000000000000000000005f521660045260245260205f60448180875af19260015f51148416156117f35750604052565b92909173ffffffffffffffffffffffffffffffffffffffff9081604051947f23b872dd000000000000000000000000000000000000000000000000000000005f52166004521660245260445260205f60648180865af19060015f51148216156118ea575b6040525f606052156114c85750565b906001811516610ed457823b15153d151616906118db56000000000000000000000000ba49d0ac42f4fba4e24a8677a22218a4df75ebaa0000000000000000000000000000000000000000000000000000000000000001

Deployed Bytecode

0x60806040526004361015610011575f80fd5b5f3560e01c806322cff155146110e35780632eb4a7ab146110a85780634783f0ef146110165780634f5e808514610fa8578063582515c714610ccf5780636e1aa66214610c94578063715018a614610bfa5780637b33415414610b92578063866797be14610a855780638da5cb5b14610a35578063916518b7146109b8578063b5228cc9146107e9578063b685e3c8146106b5578063d8b0e716146105bf578063de83db801461027d578063e988778b146101c45763f2fde38b146100d4575f80fd5b346101c05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05773ffffffffffffffffffffffffffffffffffffffff61012061116f565b6101286113cf565b1680156101945773ffffffffffffffffffffffffffffffffffffffff5f54827fffffffffffffffffffffffff00000000000000000000000000000000000000008216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b7f1e4fbdf7000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b5f80fd5b346101c0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576040518060206004549283815201809260045f5260205f20905f5b81811061026757505050818161022592500382611209565b604051918291602083019060208452518091526040830191905f5b81811061024e575050500390f35b8251845285945060209384019390920191600101610240565b825484526020909301926001928301920161020d565b346101c05760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576102b461116f565b6024356102bf6111b5565b60643560843567ffffffffffffffff81116101c0576102e29036906004016111d8565b91906102ec61141b565b73ffffffffffffffffffffffffffffffffffffffff841692831561059757851561056f5761031c918388336112bb565b156105475780610481575b50602073ffffffffffffffffffffffffffffffffffffffff85169261034e85303387611877565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ba49d0ac42f4fba4e24a8677a22218a4df75ebaa1661039086828761148f565b855f600354986103cf6040519a8b96879586947fde83db800000000000000000000000000000000000000000000000000000000086526004860161154c565b03925af1928315610476575f93610441575b6020945060405190815283858201527f5a95a7527209e42b5ceb90b2d150399084b22a579ee02a698f1b73f455f37d0c60403392a45f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d604051908152f35b92506020843d60201161046e575b8161045c60209383611209565b810103126101c05760209351926103e1565b3d915061044f565b6040513d5f823e3d90fd5b335f52600260205260405f2073ffffffffffffffffffffffffffffffffffffffff86165f5260205260405f20549084820180921161051a5781116104f257335f52600260205260405f2073ffffffffffffffffffffffffffffffffffffffff86165f5260205260405f205584610327565b7f86976d09000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fb36dc95c000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fb9a36b04000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f03d49e09000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101c05760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576105f661116f565b602435908115158092036101c05773ffffffffffffffffffffffffffffffffffffffff906106226113cf565b1690811561068d5760207fd6fc3082ae3a144ca59421d96180398241c1dd021d45d5a24fb5bf96c9f8212f91835f526005825260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8316179055604051908152a2005b7f3ff5e5b0000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101c05760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576106ec61116f565b6106f4611192565b9060443561070061141b565b73ffffffffffffffffffffffffffffffffffffffff5f5416331415806107d2575b6107aa5773ffffffffffffffffffffffffffffffffffffffff837f5a95a7527209e42b5ceb90b2d150399084b22a579ee02a698f1b73f455f37d0c60408361076d878760209a826115bb565b9616938493825196875287898801521694a45f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d604051908152f35b7f2d1cae5a000000000000000000000000000000000000000000000000000000005f5260045ffd5b50335f52600560205260ff60405f20541615610721565b346101c05760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05760043560243567ffffffffffffffff81116101c05761083b9036906004016111d8565b91906108456113cf565b8160035567ffffffffffffffff831161098b5768010000000000000000831161098b576004548360045580841061092d575b508060045f525f5b8481106108f9575050604051918252604060208301528260408301527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116101c057816060917f952aaa8f52077e13ec9613e046cb89756241fa64f3593b8b127c4b4f96922be99460051b8091848401378101030190a1005b60019060208335930192817f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01550161087f565b7f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01837f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b015b8181106109805750610877565b5f8155600101610973565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b346101c05760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576109ef61116f565b6109f7611192565b906064359067ffffffffffffffff82116101c057602092610a1f610a2b9336906004016111d8565b929091604435916112bb565b6040519015158152f35b346101c0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b346101c05760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057610abc61116f565b60243590610ac86111b5565b610ad061141b565b73ffffffffffffffffffffffffffffffffffffffff5f541633141580610b7b575b6107aa578273ffffffffffffffffffffffffffffffffffffffff80610b1a8460209787336115bb565b946040519384528587850152169216907f5a95a7527209e42b5ceb90b2d150399084b22a579ee02a698f1b73f455f37d0c60403392a45f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d604051908152f35b50335f52600560205260ff60405f20541615610af1565b346101c05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05773ffffffffffffffffffffffffffffffffffffffff610bde61116f565b165f526005602052602060ff60405f2054166040519015158152f35b346101c0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057610c306113cf565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101c0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576020600354604051908152f35b346101c05760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057610d0661116f565b73ffffffffffffffffffffffffffffffffffffffff610d23611192565b91610d2c61141b565b610d346113cf565b169081158015610f8a575b61068d57604051907f70a08231000000000000000000000000000000000000000000000000000000008252306004830152602082602481865afa918215610476575f92610f56575b508115610f2e5773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ba49d0ac42f4fba4e24a8677a22218a4df75ebaa16610dd05f828661171c565b15610edd575b5073ffffffffffffffffffffffffffffffffffffffff604051917fa9059cbb000000000000000000000000000000000000000000000000000000005f521690816004528260245260205f60448180885af160015f5114811615610ebe575b8160405215610e9257927f115d7b5114b5954762cc233b141a7c777a8f79d93f50af7216d645c87fb4883e60208585829752a35f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d604051908152f35b837f5274afe7000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b6001811516610ed457843b15153d151616610e34565b503d5f823e3d90fd5b610ee78185611790565b15610e92575f610ef79185611815565b15610f025783610dd6565b827f5274afe7000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7facf9116c000000000000000000000000000000000000000000000000000000005f5260045ffd5b9091506020813d602011610f82575b81610f7260209383611209565b810103126101c057519083610d87565b3d9150610f65565b5073ffffffffffffffffffffffffffffffffffffffff811615610d3f565b346101c0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c057602060405173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ba49d0ac42f4fba4e24a8677a22218a4df75ebaa168152f35b346101c05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576004356110506113cf565b801561108057806001557f90004c04698bc3322499a575ed3752dd4abf33e0a7294c06a787a0fe01bea9415f80a2005b7f8a874717000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101c0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c0576020600154604051908152f35b346101c05760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c05761111a61116f565b73ffffffffffffffffffffffffffffffffffffffff611137611192565b91165f52600260205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b6004359073ffffffffffffffffffffffffffffffffffffffff821682036101c057565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036101c057565b6044359073ffffffffffffffffffffffffffffffffffffffff821682036101c057565b9181601f840112156101c05782359167ffffffffffffffff83116101c0576020808501948460051b0101116101c057565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761098b57604052565b9060405191602083015260208252611263604083611209565b565b9291909267ffffffffffffffff841161098b578360051b90602060405161128e82850182611209565b80968152019181019283116101c057905b8282106112ab57505050565b813581526020918201910161129f565b6113099094939460405173ffffffffffffffffffffffffffffffffffffffff80602083019316948584521694856040830152606082015260608152611301608082611209565b51902061124a565b6020815191012091611329600154938461132436888a611265565b6116cb565b6113c55761135961136c91604051602081019185835260408201525f606082015260608152611301608082611209565b6020815191012083611324368789611265565b6113bc576113af936113a061132492604051602081019182525f60408201525f606082015260608152611301608082611209565b60208151910120933691611265565b6113b7575f90565b600190565b50505050600190565b5050505050600190565b73ffffffffffffffffffffffffffffffffffffffff5f541633036113ef57565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005c6114675760017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b919061149c82828561171c565b156114a657505050565b6114b08184611790565b1561150a57906114c09183611815565b156114c85750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b73ffffffffffffffffffffffffffffffffffffffff837f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b9260a0949273ffffffffffffffffffffffffffffffffffffffff80931685526020850152166040830152606082015281608082015201602060045491828152019060045f5260205f20905f5b8181106115a55750505090565b8254845260209093019260019283019201611598565b92909273ffffffffffffffffffffffffffffffffffffffff82161561059757821561056f578261160760209473ffffffffffffffffffffffffffffffffffffffff871693309085611877565b6116498173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ba49d0ac42f4fba4e24a8677a22218a4df75ebaa16809461148f565b5f60035495611687604051978896879586947fde83db800000000000000000000000000000000000000000000000000000000086526004860161154c565b03925af1908115610476575f9161169c575090565b90506020813d6020116116c3575b816116b760209383611209565b810103126101c0575190565b3d91506116aa565b929091905f915b84518310156117145760208360051b86010151908181105f14611703575f52602052600160405f205b9201916116d2565b905f52602052600160405f206116fb565b915092501490565b929173ffffffffffffffffffffffffffffffffffffffff604051927f095ea7b3000000000000000000000000000000000000000000000000000000005f521660045260245260205f60448180875af19260015f511484161561177f575b50604052565b3d15903b151516909216915f611779565b919073ffffffffffffffffffffffffffffffffffffffff604051917f095ea7b3000000000000000000000000000000000000000000000000000000005f52166004525f60245260205f60448180875af19260015f51148416156117f35750604052565b6001849294151661180c573b15153d151616915f611779565b833d5f823e3d90fd5b929173ffffffffffffffffffffffffffffffffffffffff604051927f095ea7b3000000000000000000000000000000000000000000000000000000005f521660045260245260205f60448180875af19260015f51148416156117f35750604052565b92909173ffffffffffffffffffffffffffffffffffffffff9081604051947f23b872dd000000000000000000000000000000000000000000000000000000005f52166004521660245260445260205f60648180865af19060015f51148216156118ea575b6040525f606052156114c85750565b906001811516610ed457823b15153d151616906118db56

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

000000000000000000000000ba49d0ac42f4fba4e24a8677a22218a4df75ebaa0000000000000000000000000000000000000000000000000000000000000001

-----Decoded View---------------
Arg [0] : _putManager (address): 0xbA49d0AC42f4fBA4e24A8677a22218a4dF75ebaA
Arg [1] : root (bytes32): 0x0000000000000000000000000000000000000000000000000000000000000001

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000ba49d0ac42f4fba4e24a8677a22218a4df75ebaa
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000001


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

OVERVIEW

Flying Tulip Public Deposit contract by Impossible

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.