creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "src/spells/EmergencySpell_SparkLend_PauseSingleAsset.sol": {
        "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity ^0.8.13;\n\nimport { IExecuteOnceSpell }    from \"src/interfaces/IExecuteOnceSpell.sol\";\nimport { ISparkLendFreezerMom } from \"src/interfaces/ISparkLendFreezerMom.sol\";\n\ncontract EmergencySpell_SparkLend_PauseSingleAsset is IExecuteOnceSpell {\n\n    address public immutable sparkLendFreezerMom;\n    address public immutable reserve;\n\n    bool public override executed;\n\n    constructor(address sparkLendFreezerMom_, address reserve_) {\n        sparkLendFreezerMom = sparkLendFreezerMom_;\n        reserve             = reserve_;\n    }\n\n    function execute() external override {\n        require(!executed, \"PauseSingleAssetSpell/already-executed\");\n        executed = true;\n        ISparkLendFreezerMom(sparkLendFreezerMom).pauseMarket(reserve, true);\n    }\n\n}\n"
      },
      "src/interfaces/IExecuteOnceSpell.sol": {
        "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.8.0;\n\ninterface IExecuteOnceSpell {\n\n    /**\n     *  @dev Returns true if the spell has been executed.\n     */\n    function executed() external view returns (bool);\n\n    /**\n     *  @dev Executes the spell. Can only be called once.\n     */\n    function execute() external;\n\n}\n"
      },
      "src/interfaces/ISparkLendFreezerMom.sol": {
        "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.8.0;\n\ninterface ISparkLendFreezerMom {\n\n    /**********************************************************************************************/\n    /*** Events                                                                                 ***/\n    /**********************************************************************************************/\n\n    /**\n     *  @dev   Event to log the freezing of a given market in SparkLend.\n     *  @dev   NOTE: This event will fire even if the market is already frozen.\n     *  @param reserve The address of the market reserve.\n     *  @param freeze  A boolean indicating whether the market is frozen or unfrozen.\n     */\n    event FreezeMarket(address indexed reserve, bool freeze);\n\n    /**\n     *  @dev   Event to log the pausing of a given market in SparkLend.\n     *  @dev   NOTE: This event will fire even if the market is already paused.\n     *  @param reserve The address of the market reserve.\n     *  @param pause   A boolean indicating whether the market is paused or unpaused.\n     */\n    event PauseMarket(address indexed reserve, bool pause);\n\n    /**\n     *  @dev   Event to log the setting of a new owner.\n     *  @param oldOwner The address of the previous owner.\n     *  @param newOwner The address of the new owner.\n     */\n    event SetOwner(address indexed oldOwner, address indexed newOwner);\n\n    /**\n     *  @dev   Event to log the setting of a new authority.\n     *  @param oldAuthority The address of the previous authority.\n     *  @param newAuthority The address of the new authority.\n     */\n    event SetAuthority(address indexed oldAuthority, address indexed newAuthority);\n\n    /**\n     *  @dev   Authorize a contract to trigger this mom.\n     *  @param usr The address to authorize.\n     */\n    event Rely(address indexed usr);\n\n    /**\n     *  @dev   Deauthorize a contract to trigger this mom.\n     *  @param usr The address to deauthorize.\n     */\n    event Deny(address indexed usr);\n\n    /**********************************************************************************************/\n    /*** Storage Variables                                                                      ***/\n    /**********************************************************************************************/\n\n    /**\n     *  @dev    Returns the address of the pool configurator.\n     *  @return The address of the pool configurator.\n     */\n    function poolConfigurator() external view returns (address);\n\n    /**\n     *  @dev    Returns the address of the pool.\n     *  @return The address of the pool.\n     */\n    function pool() external view returns (address);\n\n    /**\n     *  @dev    Returns the address of the authority.\n     *  @return The address of the authority.\n     */\n    function authority() external view returns (address);\n\n    /**\n     *  @dev    Returns the address of the owner.\n     *  @return The address of the owner.\n     */\n    function owner() external view returns (address);\n\n    /**\n     *  @dev    Returns if an address is authorized to trigger this mom (or not).\n     *  @return 1 if authorized, 0 if not.\n     */\n    function wards(address usr) external view returns (uint256);\n\n    /**********************************************************************************************/\n    /*** Owner Functions                                                                        ***/\n    /**********************************************************************************************/\n\n    /**\n     * @dev   Function to set a new authority, permissioned to owner.\n     * @param authority The address of the new authority.\n     */\n    function setAuthority(address authority) external;\n\n    /**\n     * @dev   Function to set a new owner, permissioned to owner.\n     * @param owner The address of the new owner.\n     */\n    function setOwner(address owner) external;\n\n    /**\n     *  @dev   Authorize a contract to trigger this mom.\n     *  @param usr The address to authorize.\n     */\n    function rely(address usr) external;\n\n    /**\n     *  @dev   Deauthorize a contract to trigger this mom.\n     *  @param usr The address to deauthorize.\n     */\n    function deny(address usr) external;\n\n    /**********************************************************************************************/\n    /*** Auth Functions                                                                         ***/\n    /**********************************************************************************************/\n\n    /**\n     *  @dev   Function to freeze a specified market. Permissioned using the isAuthorized function\n     *         which allows the owner, a ward, the freezer contract itself, or the `hat` in the\n     *         Chief to call the function. Note that the `authority` in this contract is assumed to\n     *         be the Chief in the MakerDAO protocol.\n     *  @param reserve The address of the market to freeze.\n     *  @param freeze  A boolean indicating whether to freeze or unfreeze the market.\n     */\n    function freezeMarket(address reserve, bool freeze) external;\n\n    /**\n     *  @dev   Function to freeze all markets. Permissioned using the isAuthorized function\n     *         which allows the owner, a ward, the freezer contract itself, or the `hat` in the\n     *         Chief to call the function. Note that the `authority` in this contract is assumed to\n     *         be the Chief in the MakerDAO protocol.\n     *  @param freeze A boolean indicating whether to freeze or unfreeze the market.\n     */\n    function freezeAllMarkets(bool freeze) external;\n\n    /**\n     *  @dev   Function to pause a specified market. Permissioned using the isAuthorized function\n     *         which allows the owner, a ward, the freezer contract itself, or the `hat` in the\n     *         Chief to call the function. Note that the `authority` in this contract is assumed to\n     *         be the Chief in the MakerDAO protocol.\n     *  @param reserve The address of the market to pause.\n     *  @param pause   A boolean indicating whether to pause or unpause the market.\n     */\n    function pauseMarket(address reserve, bool pause) external;\n\n    /**\n     *  @dev   Function to pause all markets. Permissioned using the isAuthorized function\n     *         which allows the owner, a ward, the freezer contract itself, or the `hat` in the\n     *         Chief to call the function. Note that the `authority` in this contract is assumed to\n     *         be the Chief in the MakerDAO protocol.\n     *  @param pause A boolean indicating whether to pause or unpause the market.\n     */\n    function pauseAllMarkets(bool pause) external;\n\n}\n"
      }
    },
    "settings": {
      "remappings": [
        "aave-v3-core/=lib/aave-v3-core/",
        "ds-test/=lib/forge-std/lib/ds-test/src/",
        "erc20-helpers/=lib/erc20-helpers/src/",
        "forge-std/=lib/forge-std/src/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "ipfs",
        "appendCBOR": true
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "paris",
      "viaIR": false,
      "libraries": {}
    }
  }}