{"file_path":"src/core/contracts/protocol/libraries/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.10;\n\nimport {InitializableUpgradeabilityProxy} from '../../../dependencies/openzeppelin/upgradeability/InitializableUpgradeabilityProxy.sol';\nimport {Proxy} from '../../../dependencies/openzeppelin/upgradeability/Proxy.sol';\nimport {BaseImmutableAdminUpgradeabilityProxy} from './BaseImmutableAdminUpgradeabilityProxy.sol';\n\n/**\n * @title InitializableAdminUpgradeabilityProxy\n * @author Aave\n * @dev Extends BaseAdminUpgradeabilityProxy with an initializer function\n */\ncontract InitializableImmutableAdminUpgradeabilityProxy is\n  BaseImmutableAdminUpgradeabilityProxy,\n  InitializableUpgradeabilityProxy\n{\n  /**\n   * @dev Constructor.\n   * @param admin The address of the admin\n   */\n  constructor(address admin) BaseImmutableAdminUpgradeabilityProxy(admin) {\n    // Intentionally left blank\n  }\n\n  /// @inheritdoc BaseImmutableAdminUpgradeabilityProxy\n  function _willFallback() internal override(BaseImmutableAdminUpgradeabilityProxy, Proxy) {\n    BaseImmutableAdminUpgradeabilityProxy._willFallback();\n  }\n}\n","deployed_bytecode":"0x60806040526004361061004a5760003560e01c80633659cfe6146100545780634f1ef286146100745780635c60da1b14610087578063d1f57894146100b8578063f851a440146100cb575b6100526100e0565b005b34801561006057600080fd5b5061005261006f36600461053e565b610108565b610052610082366004610560565b61014c565b34801561009357600080fd5b5061009c610202565b6040516001600160a01b03909116815260200160405180910390f35b6100526100c63660046105f9565b610253565b3480156100d757600080fd5b5061009c610341565b6100e8610398565b6101066101016000805160206107388339815191525490565b6103a0565b565b6001600160a01b037f000000000000000000000000e20fcbdbffc4dd138ce8b2e6fbb6cb49777ad64d16330361014457610141816103c4565b50565b6101416100e0565b6001600160a01b037f000000000000000000000000e20fcbdbffc4dd138ce8b2e6fbb6cb49777ad64d1633036101f557610185836103c4565b6000836001600160a01b031683836040516101a19291906106bb565b600060405180830381855af49150503d80600081146101dc576040519150601f19603f3d011682016040523d82523d6000602084013e6101e1565b606091505b50509050806101ef57600080fd5b50505050565b6101fd6100e0565b505050565b60006001600160a01b037f000000000000000000000000e20fcbdbffc4dd138ce8b2e6fbb6cb49777ad64d16330361024857506000805160206107388339815191525490565b6102506100e0565b90565b600061026b6000805160206107388339815191525490565b6001600160a01b03161461027e57600080fd5b6102a960017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6106cb565b600080516020610738833981519152146102c5576102c56106f2565b6102ce82610404565b80511561033d576000826001600160a01b0316826040516102ef9190610708565b600060405180830381855af49150503d806000811461032a576040519150601f19603f3d011682016040523d82523d6000602084013e61032f565b606091505b50509050806101fd57600080fd5b5050565b60006001600160a01b037f000000000000000000000000e20fcbdbffc4dd138ce8b2e6fbb6cb49777ad64d16330361024857507f000000000000000000000000e20fcbdbffc4dd138ce8b2e6fbb6cb49777ad64d90565b61010661048f565b3660008037600080366000845af43d6000803e8080156103bf573d6000f35b3d6000fd5b6103cd81610404565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b803b61047d5760405162461bcd60e51b815260206004820152603b60248201527f43616e6e6f742073657420612070726f787920696d706c656d656e746174696f60448201527f6e20746f2061206e6f6e2d636f6e74726163742061646472657373000000000060648201526084015b60405180910390fd5b60008051602061073883398151915255565b6001600160a01b037f000000000000000000000000e20fcbdbffc4dd138ce8b2e6fbb6cb49777ad64d1633036101065760405162461bcd60e51b815260206004820152603260248201527f43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e20667260448201527137b6903a343290383937bc3c9030b236b4b760711b6064820152608401610474565b80356001600160a01b038116811461053957600080fd5b919050565b60006020828403121561055057600080fd5b61055982610522565b9392505050565b60008060006040848603121561057557600080fd5b61057e84610522565b9250602084013567ffffffffffffffff8082111561059b57600080fd5b818601915086601f8301126105af57600080fd5b8135818111156105be57600080fd5b8760208285010111156105d057600080fd5b6020830194508093505050509250925092565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561060c57600080fd5b61061583610522565b9150602083013567ffffffffffffffff8082111561063257600080fd5b818501915085601f83011261064657600080fd5b813581811115610658576106586105e3565b604051601f8201601f19908116603f01168101908382118183101715610680576106806105e3565b8160405282815288602084870101111561069957600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b8183823760009101908152919050565b818103818111156106ec57634e487b7160e01b600052601160045260246000fd5b92915050565b634e487b7160e01b600052600160045260246000fd5b6000825160005b81811015610729576020818601810151858301520161070f565b50600092019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212200ad2c31210b842f644c09f44052a93c6a06b7aefe703572b950b86719360dbc064736f6c63430008130033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"paris","libraries":{"src/core/contracts/protocol/libraries/logic/BorrowLogic.sol:BorrowLogic":"0x93f15bc70e06a8a9769706d3e3407bb2679feb0a","src/core/contracts/protocol/libraries/logic/BridgeLogic.sol:BridgeLogic":"0x5cf0a52db44f7ccebdc506452144aab1b39b224c","src/core/contracts/protocol/libraries/logic/ConfiguratorLogic.sol:ConfiguratorLogic":"0xffe9e2a60b9f424604167b0d0dc7e6867a0beac9","src/core/contracts/protocol/libraries/logic/EModeLogic.sol:EModeLogic":"0x88bffee6046ed01ee3addf17295c48a669668763","src/core/contracts/protocol/libraries/logic/FlashLoanLogic.sol:FlashLoanLogic":"0xa70361e42c1c2404cf2b1f638c0d73d5d82184a5","src/core/contracts/protocol/libraries/logic/LiquidationLogic.sol:LiquidationLogic":"0xdcbe95c7dcfb2846742f953822806524cd2a3d91","src/core/contracts/protocol/libraries/logic/PoolLogic.sol:PoolLogic":"0xc38e7d1b9ae1b0b5e1d6169141f0da2d67ee8f1a","src/core/contracts/protocol/libraries/logic/SupplyLogic.sol:SupplyLogic":"0xe0aa976c54520c0dbae5b71c9ed43e0c84ce6c61"},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":200},"remappings":[":aave-address-book/=lib/aave-address-book/src/",":aave-collector-unification/=lib/aave-collector-unification/",":aave-helpers/=lib/aave-helpers/src/",":aave-v3-core/=src/core/",":aave-v3-periphery/=src/periphery/",":ds-test/=lib/forge-std/lib/ds-test/src/",":forge-std/=lib/forge-std/src/",":governance-crosschain-bridges/=lib/aave-helpers/lib/governance-crosschain-bridges/",":protocol-v2/=lib/aave-collector-unification/lib/protocol-v2/",":solidity-utils/=lib/solidity-utils/src/","lib/aave-address-book:@aave/core-v3/=lib/aave-address-book/lib/aave-v3-core/","lib/aave-address-book:@aave/periphery-v3/=lib/aave-address-book/lib/aave-v3-periphery/","lib/aave-collector-unification:@aave/core-v2/=lib/aave-collector-unification/lib/protocol-v2/"]},"optimization_runs":200,"sourcify_repo_url":"https://repo.sourcify.dev/contracts/full_match/8453/0xA238Dd80C259a72e81d7e4664a9801593F98d1c5/","decoded_constructor_args":[["0xe20fCBdBfFC4Dd138cE8b2E6FBb6CB49777ad64D",{"internalType":"address","name":"admin","type":"address"}]],"compiler_version":"0.8.19+commit.7dd6d404","is_verified_via_verifier_alliance":false,"verified_at":"2023-12-26T06:24:10.203885Z","implementations":[{"address_hash":"0xA4AbC5FcBA6D0d7E3D144d6dbF6cb6128599dFdB","name":"L2PoolInstance"}],"proxy_type":"eip1967","external_libraries":[{"name":"src/core/contracts/protocol/libraries/logic/BorrowLogic.sol:BorrowLogic","address_hash":"0x93f15Bc70e06a8a9769706d3E3407bB2679feb0a"},{"name":"src/core/contracts/protocol/libraries/logic/BridgeLogic.sol:BridgeLogic","address_hash":"0x5Cf0a52Db44F7cceBdc506452144AAb1b39B224C"},{"name":"src/core/contracts/protocol/libraries/logic/ConfiguratorLogic.sol:ConfiguratorLogic","address_hash":"0xFFe9e2A60B9f424604167B0D0Dc7E6867A0BEAc9"},{"name":"src/core/contracts/protocol/libraries/logic/EModeLogic.sol:EModeLogic","address_hash":"0x88BFFee6046Ed01Ee3ADDf17295c48a669668763"},{"name":"src/core/contracts/protocol/libraries/logic/FlashLoanLogic.sol:FlashLoanLogic","address_hash":"0xa70361E42C1c2404CF2b1F638c0d73d5d82184a5"},{"name":"src/core/contracts/protocol/libraries/logic/LiquidationLogic.sol:LiquidationLogic","address_hash":"0xDcBE95c7dcFB2846742F953822806524CD2A3D91"},{"name":"src/core/contracts/protocol/libraries/logic/PoolLogic.sol:PoolLogic","address_hash":"0xc38E7d1B9AE1b0B5e1D6169141f0DA2D67Ee8f1A"},{"name":"src/core/contracts/protocol/libraries/logic/SupplyLogic.sol:SupplyLogic","address_hash":"0xe0aa976c54520c0dBAe5b71C9ed43e0C84cE6c61"}],"creation_bytecode":"0x60a060405234801561001057600080fd5b5060405161083b38038061083b83398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b60805161078d6100ae60003960008181610112015281816101560152818161020e0152818161034d015281816103760152610499015261078d6000f3fe60806040526004361061004a5760003560e01c80633659cfe6146100545780634f1ef286146100745780635c60da1b14610087578063d1f57894146100b8578063f851a440146100cb575b6100526100e0565b005b34801561006057600080fd5b5061005261006f36600461053e565b610108565b610052610082366004610560565b61014c565b34801561009357600080fd5b5061009c610202565b6040516001600160a01b03909116815260200160405180910390f35b6100526100c63660046105f9565b610253565b3480156100d757600080fd5b5061009c610341565b6100e8610398565b6101066101016000805160206107388339815191525490565b6103a0565b565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361014457610141816103c4565b50565b6101416100e0565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633036101f557610185836103c4565b6000836001600160a01b031683836040516101a19291906106bb565b600060405180830381855af49150503d80600081146101dc576040519150601f19603f3d011682016040523d82523d6000602084013e6101e1565b606091505b50509050806101ef57600080fd5b50505050565b6101fd6100e0565b505050565b60006001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361024857506000805160206107388339815191525490565b6102506100e0565b90565b600061026b6000805160206107388339815191525490565b6001600160a01b03161461027e57600080fd5b6102a960017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6106cb565b600080516020610738833981519152146102c5576102c56106f2565b6102ce82610404565b80511561033d576000826001600160a01b0316826040516102ef9190610708565b600060405180830381855af49150503d806000811461032a576040519150601f19603f3d011682016040523d82523d6000602084013e61032f565b606091505b50509050806101fd57600080fd5b5050565b60006001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016330361024857507f000000000000000000000000000000000000000000000000000000000000000090565b61010661048f565b3660008037600080366000845af43d6000803e8080156103bf573d6000f35b3d6000fd5b6103cd81610404565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b803b61047d5760405162461bcd60e51b815260206004820152603b60248201527f43616e6e6f742073657420612070726f787920696d706c656d656e746174696f60448201527f6e20746f2061206e6f6e2d636f6e74726163742061646472657373000000000060648201526084015b60405180910390fd5b60008051602061073883398151915255565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633036101065760405162461bcd60e51b815260206004820152603260248201527f43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e20667260448201527137b6903a343290383937bc3c9030b236b4b760711b6064820152608401610474565b80356001600160a01b038116811461053957600080fd5b919050565b60006020828403121561055057600080fd5b61055982610522565b9392505050565b60008060006040848603121561057557600080fd5b61057e84610522565b9250602084013567ffffffffffffffff8082111561059b57600080fd5b818601915086601f8301126105af57600080fd5b8135818111156105be57600080fd5b8760208285010111156105d057600080fd5b6020830194508093505050509250925092565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561060c57600080fd5b61061583610522565b9150602083013567ffffffffffffffff8082111561063257600080fd5b818501915085601f83011261064657600080fd5b813581811115610658576106586105e3565b604051601f8201601f19908116603f01168101908382118183101715610680576106806105e3565b8160405282815288602084870101111561069957600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b8183823760009101908152919050565b818103818111156106ec57634e487b7160e01b600052601160045260246000fd5b92915050565b634e487b7160e01b600052600160045260246000fd5b6000825160005b81811015610729576020818601810151858301520161070f565b50600092019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212200ad2c31210b842f644c09f44052a93c6a06b7aefe703572b950b86719360dbc064736f6c63430008130033000000000000000000000000e20fcbdbffc4dd138ce8b2e6fbb6cb49777ad64d","name":"InitializableImmutableAdminUpgradeabilityProxy","is_blueprint":false,"license_type":"none","is_fully_verified":true,"is_verified_via_eth_bytecode_db":true,"language":"solidity","evm_version":"paris","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":true,"additional_sources":[{"file_path":"src/core/contracts/dependencies/openzeppelin/contracts/Address.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n  /**\n   * @dev Returns true if `account` is a contract.\n   *\n   * [IMPORTANT]\n   * ====\n   * It is unsafe to assume that an address for which this function returns\n   * false is an externally-owned account (EOA) and not a contract.\n   *\n   * Among others, `isContract` will return false for the following\n   * types of addresses:\n   *\n   *  - an externally-owned account\n   *  - a contract in construction\n   *  - an address where a contract will be created\n   *  - an address where a contract lived, but was destroyed\n   * ====\n   */\n  function isContract(address account) internal view returns (bool) {\n    // This method relies on extcodesize, which returns 0 for contracts in\n    // construction, since the code is only stored at the end of the\n    // constructor execution.\n\n    uint256 size;\n    assembly {\n      size := extcodesize(account)\n    }\n    return size > 0;\n  }\n\n  /**\n   * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n   * `recipient`, forwarding all available gas and reverting on errors.\n   *\n   * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n   * of certain opcodes, possibly making contracts go over the 2300 gas limit\n   * imposed by `transfer`, making them unable to receive funds via\n   * `transfer`. {sendValue} removes this limitation.\n   *\n   * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n   *\n   * IMPORTANT: because control is transferred to `recipient`, care must be\n   * taken to not create reentrancy vulnerabilities. Consider using\n   * {ReentrancyGuard} or the\n   * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n   */\n  function sendValue(address payable recipient, uint256 amount) internal {\n    require(address(this).balance >= amount, 'Address: insufficient balance');\n\n    (bool success, ) = recipient.call{value: amount}('');\n    require(success, 'Address: unable to send value, recipient may have reverted');\n  }\n\n  /**\n   * @dev Performs a Solidity function call using a low level `call`. A\n   * plain `call` is an unsafe replacement for a function call: use this\n   * function instead.\n   *\n   * If `target` reverts with a revert reason, it is bubbled up by this\n   * function (like regular Solidity function calls).\n   *\n   * Returns the raw returned data. To convert to the expected return value,\n   * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n   *\n   * Requirements:\n   *\n   * - `target` must be a contract.\n   * - calling `target` with `data` must not revert.\n   *\n   * _Available since v3.1._\n   */\n  function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n    return functionCall(target, data, 'Address: low-level call failed');\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n   * `errorMessage` as a fallback revert reason when `target` reverts.\n   *\n   * _Available since v3.1._\n   */\n  function functionCall(\n    address target,\n    bytes memory data,\n    string memory errorMessage\n  ) internal returns (bytes memory) {\n    return functionCallWithValue(target, data, 0, errorMessage);\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n   * but also transferring `value` wei to `target`.\n   *\n   * Requirements:\n   *\n   * - the calling contract must have an ETH balance of at least `value`.\n   * - the called Solidity function must be `payable`.\n   *\n   * _Available since v3.1._\n   */\n  function functionCallWithValue(\n    address target,\n    bytes memory data,\n    uint256 value\n  ) internal returns (bytes memory) {\n    return functionCallWithValue(target, data, value, 'Address: low-level call with value failed');\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n   * with `errorMessage` as a fallback revert reason when `target` reverts.\n   *\n   * _Available since v3.1._\n   */\n  function functionCallWithValue(\n    address target,\n    bytes memory data,\n    uint256 value,\n    string memory errorMessage\n  ) internal returns (bytes memory) {\n    require(address(this).balance >= value, 'Address: insufficient balance for call');\n    require(isContract(target), 'Address: call to non-contract');\n\n    (bool success, bytes memory returndata) = target.call{value: value}(data);\n    return verifyCallResult(success, returndata, errorMessage);\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n   * but performing a static call.\n   *\n   * _Available since v3.3._\n   */\n  function functionStaticCall(\n    address target,\n    bytes memory data\n  ) internal view returns (bytes memory) {\n    return functionStaticCall(target, data, 'Address: low-level static call failed');\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n   * but performing a static call.\n   *\n   * _Available since v3.3._\n   */\n  function functionStaticCall(\n    address target,\n    bytes memory data,\n    string memory errorMessage\n  ) internal view returns (bytes memory) {\n    require(isContract(target), 'Address: static call to non-contract');\n\n    (bool success, bytes memory returndata) = target.staticcall(data);\n    return verifyCallResult(success, returndata, errorMessage);\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n   * but performing a delegate call.\n   *\n   * _Available since v3.4._\n   */\n  function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n    return functionDelegateCall(target, data, 'Address: low-level delegate call failed');\n  }\n\n  /**\n   * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n   * but performing a delegate call.\n   *\n   * _Available since v3.4._\n   */\n  function functionDelegateCall(\n    address target,\n    bytes memory data,\n    string memory errorMessage\n  ) internal returns (bytes memory) {\n    require(isContract(target), 'Address: delegate call to non-contract');\n\n    (bool success, bytes memory returndata) = target.delegatecall(data);\n    return verifyCallResult(success, returndata, errorMessage);\n  }\n\n  /**\n   * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n   * revert reason using the provided one.\n   *\n   * _Available since v4.3._\n   */\n  function verifyCallResult(\n    bool success,\n    bytes memory returndata,\n    string memory errorMessage\n  ) internal pure returns (bytes memory) {\n    if (success) {\n      return returndata;\n    } else {\n      // Look for revert reason and bubble it up if present\n      if (returndata.length > 0) {\n        // The easiest way to bubble the revert reason is using memory via assembly\n\n        assembly {\n          let returndata_size := mload(returndata)\n          revert(add(32, returndata), returndata_size)\n        }\n      } else {\n        revert(errorMessage);\n      }\n    }\n  }\n}\n"},{"file_path":"src/core/contracts/dependencies/openzeppelin/upgradeability/BaseUpgradeabilityProxy.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.10;\n\nimport './Proxy.sol';\nimport '../contracts/Address.sol';\n\n/**\n * @title BaseUpgradeabilityProxy\n * @dev This contract implements a proxy that allows to change the\n * implementation address to which it will delegate.\n * Such a change is called an implementation upgrade.\n */\ncontract BaseUpgradeabilityProxy is Proxy {\n  /**\n   * @dev Emitted when the implementation is upgraded.\n   * @param implementation Address of the new implementation.\n   */\n  event Upgraded(address indexed implementation);\n\n  /**\n   * @dev Storage slot with the address of the current implementation.\n   * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n   * validated in the constructor.\n   */\n  bytes32 internal constant IMPLEMENTATION_SLOT =\n    0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n  /**\n   * @dev Returns the current implementation.\n   * @return impl Address of the current implementation\n   */\n  function _implementation() internal view override returns (address impl) {\n    bytes32 slot = IMPLEMENTATION_SLOT;\n    //solium-disable-next-line\n    assembly {\n      impl := sload(slot)\n    }\n  }\n\n  /**\n   * @dev Upgrades the proxy to a new implementation.\n   * @param newImplementation Address of the new implementation.\n   */\n  function _upgradeTo(address newImplementation) internal {\n    _setImplementation(newImplementation);\n    emit Upgraded(newImplementation);\n  }\n\n  /**\n   * @dev Sets the implementation address of the proxy.\n   * @param newImplementation Address of the new implementation.\n   */\n  function _setImplementation(address newImplementation) internal {\n    require(\n      Address.isContract(newImplementation),\n      'Cannot set a proxy implementation to a non-contract address'\n    );\n\n    bytes32 slot = IMPLEMENTATION_SLOT;\n\n    //solium-disable-next-line\n    assembly {\n      sstore(slot, newImplementation)\n    }\n  }\n}\n"},{"file_path":"src/core/contracts/dependencies/openzeppelin/upgradeability/InitializableUpgradeabilityProxy.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.10;\n\nimport './BaseUpgradeabilityProxy.sol';\n\n/**\n * @title InitializableUpgradeabilityProxy\n * @dev Extends BaseUpgradeabilityProxy with an initializer for initializing\n * implementation and init data.\n */\ncontract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy {\n  /**\n   * @dev Contract initializer.\n   * @param _logic Address of the initial implementation.\n   * @param _data Data to send as msg.data to the implementation to initialize the proxied contract.\n   * It should include the signature and the parameters of the function to be called, as described in\n   * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.\n   * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.\n   */\n  function initialize(address _logic, bytes memory _data) public payable {\n    require(_implementation() == address(0));\n    assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1));\n    _setImplementation(_logic);\n    if (_data.length > 0) {\n      (bool success, ) = _logic.delegatecall(_data);\n      require(success);\n    }\n  }\n}\n"},{"file_path":"src/core/contracts/dependencies/openzeppelin/upgradeability/Proxy.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.10;\n\n/**\n * @title Proxy\n * @dev Implements delegation of calls to other contracts, with proper\n * forwarding of return values and bubbling of failures.\n * It defines a fallback function that delegates all calls to the address\n * returned by the abstract _implementation() internal function.\n */\nabstract contract Proxy {\n  /**\n   * @dev Fallback function.\n   * Will run if no other function in the contract matches the call data.\n   * Implemented entirely in `_fallback`.\n   */\n  fallback() external payable {\n    _fallback();\n  }\n\n  /**\n   * @return The Address of the implementation.\n   */\n  function _implementation() internal view virtual returns (address);\n\n  /**\n   * @dev Delegates execution to an implementation contract.\n   * This is a low level function that doesn't return to its internal call site.\n   * It will return to the external caller whatever the implementation returns.\n   * @param implementation Address to delegate.\n   */\n  function _delegate(address implementation) internal {\n    //solium-disable-next-line\n    assembly {\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(), implementation, 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\n  /**\n   * @dev Function that is run as the first thing in the fallback function.\n   * Can be redefined in derived contracts to add functionality.\n   * Redefinitions must call super._willFallback().\n   */\n  function _willFallback() internal virtual {}\n\n  /**\n   * @dev fallback implementation.\n   * Extracted to enable manual triggering.\n   */\n  function _fallback() internal {\n    _willFallback();\n    _delegate(_implementation());\n  }\n}\n"},{"file_path":"src/core/contracts/protocol/libraries/aave-upgradeability/BaseImmutableAdminUpgradeabilityProxy.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.10;\n\nimport {BaseUpgradeabilityProxy} from '../../../dependencies/openzeppelin/upgradeability/BaseUpgradeabilityProxy.sol';\n\n/**\n * @title BaseImmutableAdminUpgradeabilityProxy\n * @author Aave, inspired by the OpenZeppelin upgradeability proxy pattern\n * @notice This contract combines an upgradeability proxy with an authorization\n * mechanism for administrative tasks.\n * @dev The admin role is stored in an immutable, which helps saving transactions costs\n * All external functions in this contract must be guarded by the\n * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity\n * feature proposal that would enable this to be done automatically.\n */\ncontract BaseImmutableAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {\n  address internal immutable _admin;\n\n  /**\n   * @dev Constructor.\n   * @param admin The address of the admin\n   */\n  constructor(address admin) {\n    _admin = admin;\n  }\n\n  modifier ifAdmin() {\n    if (msg.sender == _admin) {\n      _;\n    } else {\n      _fallback();\n    }\n  }\n\n  /**\n   * @notice Return the admin address\n   * @return The address of the proxy admin.\n   */\n  function admin() external ifAdmin returns (address) {\n    return _admin;\n  }\n\n  /**\n   * @notice Return the implementation address\n   * @return The address of the implementation.\n   */\n  function implementation() external ifAdmin returns (address) {\n    return _implementation();\n  }\n\n  /**\n   * @notice Upgrade the backing implementation of the proxy.\n   * @dev Only the admin can call this function.\n   * @param newImplementation The address of the new implementation.\n   */\n  function upgradeTo(address newImplementation) external ifAdmin {\n    _upgradeTo(newImplementation);\n  }\n\n  /**\n   * @notice Upgrade the backing implementation of the proxy and call a function\n   * on the new implementation.\n   * @dev This is useful to initialize the proxied contract.\n   * @param newImplementation The address of the new implementation.\n   * @param data Data to send as msg.data in the low level call.\n   * It should include the signature and the parameters of the function to be called, as described in\n   * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.\n   */\n  function upgradeToAndCall(\n    address newImplementation,\n    bytes calldata data\n  ) external payable ifAdmin {\n    _upgradeTo(newImplementation);\n    (bool success, ) = newImplementation.delegatecall(data);\n    require(success);\n  }\n\n  /**\n   * @notice Only fall back when the sender is not the admin.\n   */\n  function _willFallback() internal virtual override {\n    require(msg.sender != _admin, 'Cannot call fallback function from the proxy admin');\n    super._willFallback();\n  }\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_logic","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":false,"constructor_args":"000000000000000000000000e20fcbdbffc4dd138ce8b2e6fbb6cb49777ad64d"}