creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/periphery/wallet/wallet/proxy.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.21;\n\ninterface IFluidWalletFactory {\n    function walletImplementation() external returns(address);\n}\n\n/// @title      FluidWallet\n/// @notice     Proxy for Fluid wallet as deployed by the FluidWalletFactory.\n///             Basic Proxy with fallback to delegate and address for implementation contract at storage 0x0\n//\ncontract FluidWallet {\n    /// @notice Fluid Wallet Factory address.\n    IFluidWalletFactory public immutable FACTORY;\n\n    /// @notice Owner of the wallet.\n    address public owner;\n\n    function initialize(address owner_) public {\n        if (owner == address(0)) {\n            owner = owner_;\n        } else {\n            revert();\n        }\n    }\n\n    constructor (address factory_) {\n        FACTORY = IFluidWalletFactory(factory_);\n    }\n\n    receive() external payable {}\n\n    fallback() external payable {\n        address impl_ = FACTORY.walletImplementation();\n        assembly {\n            // @dev code below is taken from OpenZeppelin Proxy.sol _delegate function\n\n            // Copy msg.data. We take full control of memory in this inline assembly\n            // block because it will not return to Solidity code. We overwrite the\n            // Solidity scratch pad at memory position 0.\n            calldatacopy(0, 0, calldatasize())\n\n            // Call the implementation.\n            // out and outsize are 0 because we don't know the size yet.\n            let result := delegatecall(gas(), impl_, 0, calldatasize(), 0, 0)\n\n            // Copy the returned data.\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            // delegatecall returns 0 on error.\n            case 0 {\n                revert(0, returndatasize())\n            }\n            default {\n                return(0, returndatasize())\n            }\n        }\n    }\n}"
      }
    },
    "settings": {
      "remappings": [
        "forge-std/=lib/forge-std/src/",
        "erc4626-tests/=lib/erc4626-tests/",
        "solmate/=lib/solmate/",
        "openzeppelin-contracts/=lib/openzeppelin-contracts/src/",
        "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/src/",
        "@openzeppelin/=node_modules/@openzeppelin/",
        "ds-test/=lib/forge-std/lib/ds-test/src/",
        "eth-gas-reporter/=node_modules/eth-gas-reporter/",
        "hardhat-deploy/=node_modules/hardhat-deploy/",
        "hardhat/=node_modules/hardhat/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 10000000
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "ipfs",
        "appendCBOR": true
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "paris",
      "libraries": {}
    }
  }}