{"file_path":"modules/withdrawal-manager-queue/modules/maple-proxy-factory/modules/proxy-factory/contracts/Proxy.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity ^0.8.7;\n\nimport { IDefaultImplementationBeacon } from \"./interfaces/IDefaultImplementationBeacon.sol\";\n\nimport { SlotManipulatable } from \"./SlotManipulatable.sol\";\n\n/// @title A completely transparent, and thus interface-less, proxy contract.\ncontract Proxy is SlotManipulatable {\n\n    /// @dev Storage slot with the address of the current factory. `keccak256('eip1967.proxy.factory') - 1`.\n    bytes32 private constant FACTORY_SLOT = bytes32(0x7a45a402e4cb6e08ebc196f20f66d5d30e67285a2a8aa80503fa409e727a4af1);\n\n    /// @dev Storage slot with the address of the current factory. `keccak256('eip1967.proxy.implementation') - 1`.\n    bytes32 private constant IMPLEMENTATION_SLOT = bytes32(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc);\n\n    /**\n     *  @dev   The constructor requires at least one of `factory_` or `implementation_`.\n     *         If an implementation is not provided, the factory is treated as an IDefaultImplementationBeacon\n     *         to fetch the default implementation.\n     *  @param factory_        The address of a proxy factory, if any.\n     *  @param implementation_ The address of the implementation contract being proxied, if any.\n     */\n    constructor(address factory_, address implementation_) {\n        _setSlotValue(FACTORY_SLOT, bytes32(uint256(uint160(factory_))));\n\n        // If the implementation is empty, fetch it from the factory, which can act as a beacon.\n        address implementation = implementation_ == address(0)\n            ? IDefaultImplementationBeacon(factory_).defaultImplementation()\n            : implementation_;\n\n        require(implementation != address(0));\n\n        _setSlotValue(IMPLEMENTATION_SLOT, bytes32(uint256(uint160(implementation))));\n    }\n\n    fallback() payable external virtual {\n        bytes32 implementation = _getSlotValue(IMPLEMENTATION_SLOT);\n\n        require(address(uint160(uint256(implementation))).code.length != uint256(0));\n\n        assembly {\n            calldatacopy(0, 0, calldatasize())\n\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            case 0 {\n                revert(0, returndatasize())\n            }\n            default {\n                return(0, returndatasize())\n            }\n        }\n    }\n\n}\n","deployed_bytecode":"0x60806040526000602d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b90506001600160a01b0381163b604257600080fd5b3660008037600080366000845af43d6000803e8080156060573d6000f35b3d6000fdfea2646970667358221220d8b2c4c50c9e018be3ec3bb0b37981645522746dddb652e55093d33ccf0bf87b64736f6c63430008070033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"london","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":200},"outputSelection":{"*":{"":["*"],"*":["*"]}},"remappings":["address-registry/=modules/address-registry/contracts/","contract-test-utils/=modules/erc20/modules/contract-test-utils/contracts/","ds-test/=modules/forge-std/lib/ds-test/src/","erc20-helper/=modules/erc20-helper/src/","erc20/=modules/erc20/","fixed-term-loan-manager/=modules/fixed-term-loan-manager/contracts/","fixed-term-loan/=modules/fixed-term-loan/contracts/","forge-std/=modules/forge-std/src/","globals/=modules/globals/contracts/","liquidations/=modules/liquidations/contracts/","maple-proxy-factory/=modules/open-term-loan/modules/maple-proxy-factory/","non-transparent-proxy/=modules/globals/modules/non-transparent-proxy/","ntp/=modules/pool-permission-manager/modules/ntp/","open-term-loan-manager/=modules/open-term-loan-manager/contracts/","open-term-loan/=modules/open-term-loan/contracts/","pool-permission-manager/=modules/pool-permission-manager/contracts/","pool/=modules/pool/contracts/","proxy-factory/=modules/open-term-loan/modules/maple-proxy-factory/modules/proxy-factory/","withdrawal-manager-cyclical/=modules/withdrawal-manager-cyclical/contracts/","withdrawal-manager-queue/=modules/withdrawal-manager-queue/contracts/"]},"optimization_runs":200,"sourcify_repo_url":null,"decoded_constructor_args":[["0xE463cD473EcC1d1A4ecF20b62624D84DD20a8339",{"internalType":"address","name":"factory_","type":"address"}],["0x0000000000000000000000000000000000000000",{"internalType":"address","name":"implementation_","type":"address"}]],"compiler_version":"v0.8.7+commit.e28d00a7","is_verified_via_verifier_alliance":false,"verified_at":"2026-05-26T21:54:50.499456Z","implementations":[{"address_hash":"0xfE02Be1aD28EdFd8e3dD6F29C402B244C2A258B8","name":"MaplePoolManager"}],"proxy_type":"eip1967","external_libraries":[],"creation_bytecode":"0x608060405234801561001057600080fd5b5060405161024538038061024583398101604081905261002f91610169565b6001600160a01b0382167f7a45a402e4cb6e08ebc196f20f66d5d30e67285a2a8aa80503fa409e727a4af15560006001600160a01b0382161561007257816100e3565b826001600160a01b031663b39c45936040518163ffffffff1660e01b815260040160206040518083038186803b1580156100ab57600080fd5b505afa1580156100bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e39190610147565b90506001600160a01b0381166100f857600080fd5b6001600160a01b03167f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc555061019c9050565b80516001600160a01b038116811461014257600080fd5b919050565b60006020828403121561015957600080fd5b6101628261012b565b9392505050565b6000806040838503121561017c57600080fd5b6101858361012b565b91506101936020840161012b565b90509250929050565b609b806101aa6000396000f3fe60806040526000602d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b90506001600160a01b0381163b604257600080fd5b3660008037600080366000845af43d6000803e8080156060573d6000f35b3d6000fdfea2646970667358221220d8b2c4c50c9e018be3ec3bb0b37981645522746dddb652e55093d33ccf0bf87b64736f6c63430008070033000000000000000000000000e463cd473ecc1d1a4ecf20b62624d84dd20a83390000000000000000000000000000000000000000000000000000000000000000","name":"Proxy","is_blueprint":false,"license_type":"none","is_fully_verified":false,"is_verified_via_eth_bytecode_db":true,"language":"solidity","evm_version":"london","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[{"file_path":"modules/withdrawal-manager-queue/modules/maple-proxy-factory/modules/proxy-factory/contracts/SlotManipulatable.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity ^0.8.7;\n\nabstract contract SlotManipulatable {\n\n    function _getReferenceTypeSlot(bytes32 slot_, bytes32 key_) internal pure returns (bytes32 value_) {\n        return keccak256(abi.encodePacked(key_, slot_));\n    }\n\n    function _getSlotValue(bytes32 slot_) internal view returns (bytes32 value_) {\n        assembly {\n            value_ := sload(slot_)\n        }\n    }\n\n    function _setSlotValue(bytes32 slot_, bytes32 value_) internal {\n        assembly {\n            sstore(slot_, value_)\n        }\n    }\n\n}\n"},{"file_path":"modules/withdrawal-manager-queue/modules/maple-proxy-factory/modules/proxy-factory/contracts/interfaces/IDefaultImplementationBeacon.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity ^0.8.7;\n\n/// @title An beacon that provides a default implementation for proxies, must implement IDefaultImplementationBeacon.\ninterface IDefaultImplementationBeacon {\n\n    /// @dev The address of an implementation for proxies.\n    function defaultImplementation() external view returns (address defaultImplementation_);\n\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[{"internalType":"address","name":"factory_","type":"address"},{"internalType":"address","name":"implementation_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"stateMutability":"payable","type":"fallback"}],"is_changed_bytecode":false,"is_partially_verified":true,"constructor_args":"000000000000000000000000e463cd473ecc1d1a4ecf20b62624d84dd20a83390000000000000000000000000000000000000000000000000000000000000000"}