-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add pause spells and rename to execute() to be more generic
- Loading branch information
Showing
5 changed files
with
58 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
pragma solidity ^0.8.13; | ||
|
||
import { ISparkLendFreezerMom } from "src/interfaces/ISparkLendFreezerMom.sol"; | ||
|
||
contract EmergencySpell_SparkLend_PauseAllAssets { | ||
|
||
address public immutable sparkLendFreezerMom; | ||
|
||
bool public executed; | ||
|
||
constructor(address sparklendFreezerMom_) { | ||
sparkLendFreezerMom = sparklendFreezerMom_; | ||
} | ||
|
||
function freeze() external { | ||
require(!executed, "PauseAllAssetsSpell/already-executed"); | ||
executed = true; | ||
ISparkLendFreezerMom(sparkLendFreezerMom).pauseAllMarkets(true); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
pragma solidity ^0.8.13; | ||
|
||
import { ISparkLendFreezerMom } from "src/interfaces/ISparkLendFreezerMom.sol"; | ||
|
||
contract EmergencySpell_SparkLend_PauseSingleAsset { | ||
|
||
address public immutable sparkLendFreezerMom; | ||
address public immutable reserve; | ||
|
||
bool public executed; | ||
|
||
constructor(address sparklendFreezerMom_, address reserve_) { | ||
sparkLendFreezerMom = sparklendFreezerMom_; | ||
reserve = reserve_; | ||
} | ||
|
||
function execute() external { | ||
require(!executed, "PauseSingleAssetSpell/already-executed"); | ||
executed = true; | ||
ISparkLendFreezerMom(sparkLendFreezerMom).pauseMarket(reserve, true); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters