diff --git a/.gitignore b/.gitignore index 85198aa..abb5ea7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,10 +2,13 @@ cache/ out/ -# Ignores development broadcast logs -!/broadcast -/broadcast/*/31337/ -/broadcast/**/dry-run/ +# Ignores broadcast logs +broadcast/ + +# Ignores script config +script/input/**/*.json +!script/input/**/template-*.json +script/output/**/*.json # Docs docs/ diff --git a/README.md b/README.md index 4efb86f..996d686 100644 --- a/README.md +++ b/README.md @@ -36,18 +36,120 @@ bespoke spell in record time. ## Deployments -TBD. +### Standalone Spells + + + +#### `MultiClipBreakerSpell` + +``` +0x828824dBC62Fba126C76E0Abe79AE28E5393C2cb +``` + +#### `MultiLineWipeSpell` + +``` +0x4B5f856B59448304585C2AA009802A16946DDb0f +``` + +#### `MultiOsmStopSpell` + +``` +0x3021dEdB0bC677F43A23Fcd1dE91A07e5195BaE8 +``` + +### On-chain Emergency Spell Factories + +| Name | Address | +| -------------------------- | -------------------------------------------- | +| `SingleClipBreakerFactory` | `0xd7321d0919573a33f9147fd2579a48f60237564a` | +| `SingleDdmDisableFactory` | `0x8BA0f6C4009Ea915706e1bCfB1d879E34587dC69` | +| `SingleLineWipeFactory` | `0xA649730fA92695096b7C49DBae682995F8906684` | +| `SingleOsmStopFactory` | `0x83211c74131bA2B3de7538f588f1c2f309e81eF0` | + +#### `SingleClipBreakerSpell` + +| Ilk | Address | +| ----------- | -------------------------------------------- | +| `ETH-A` | `0xa1122011E26d160b263295476e294A17560213D1` | +| `ETH-B` | `0x1efe035022c63ACB53f3662bcb18683F522d2811` | +| `ETH-C` | `0xDef93051a647C5c3C5ce0B32C32B4394b4a55a85` | +| `LSE-MKR-A` | `0x9CF8Bd21814B57b9Ca5B368efb00A551682b7823` | +| `WBTC-A` | `0x43Aa7ED6BA07274104f5Ea0e08E6C236B02Bc636` | +| `WBTC-B` | `0x0ffE29C34da1C4760a1409DE19045a5ca41a7912` | +| `WBTC-C` | `0x9d5F59D4a599888E77899Afa8cc4bEd2334557d3` | +| `WSTETH-A` | `0x4e95dBC199c52F3Fb6Cfff1514099fF6A3942E56` | +| `WSTETH-B` | `0x052eDfA59F7eA13f27B0E886a0f89e88BA7b7Ea3` | + +#### `SingleDdmDisableSpell` + +| Ilk | Address | +| --------------------------- | -------------------------------------------- | +| `DIRECT-SPARK-DAI` | `0xf10d37FC47e966508A62d4874dC69c7Ed62fd11B` | +| `DIRECT-SPARK-MORPHO-DAI` | `0xD6513162b30D0BEC7e9E81c4F2Ce2C07d7D2a372` | +| `DIRECT-SPK-AAVE-LIDO-USDS` | `0x36cbC441C671f75BB5aE1150b12106D1D921d53c` | + +#### `SingleLineWipeSpell` + +| Ilk | Address | +| ------------------- | -------------------------------------------- | +| `ALLOCATOR-SPARK-A` | `0xFaF2Cd3a76EBEFB257BE0ea7dF5D222acDDA6734` | +| `ETH-A` | `0x46BAeb8fb770f9bcfb5cF9A696F80fcEe6D0dcfE` | +| `ETH-B` | `0x9E8516f7Ba14429917343c7Bc4c9d7378d298DDF` | +| `ETH-C` | `0x0b6D27cf223D6e9ED2e55D5ADcF1909bbcEcFA32` | +| `LSE-MKR-A` | `0xeeb0D6bdBa6b74E1813C8e8AAD3c927e5d86F87D` | +| `RWA001-A` | `0xE4bcBe6a8A4564c9C7ECED4F5a827cc106352602` | +| `RWA002-A` | `0x944F013edF4886bD0871391EFFc98911B8F0821f` | +| `RWA009-A` | `0x46cbB3f96cC07205Dc8EE495615f144E288c8815` | +| `RWA012-A` | `0xd9314ff8f9DCB2e7C1434155800B54d02Ae7f6f5` | +| `RWA013-A` | `0x4ed518908dF1BD4b1C8a48602e4FADf2Fd248D9f` | +| `RWA015-A` | `0x9A0A0700253cBb7372E3A6659fb8Be11866F32FA` | +| `WBTC-A` | `0xd960050a502A27bBF33228E033782CB35B72e74D` | +| `WBTC-B` | `0x47f20D5e95D8477a9dF2D483414Bce28b87B10Eb` | +| `WBTC-C` | `0x1BC7cA708d882a82bdB1ade4838BeDB90144127c` | +| `WSTETH-A` | `0x6A7710534E840a64ba709775ab9F23a6894bECa4` | +| `WSTETH-B` | `0x79D7e31520FCD7bB5bf25fa13b2028cB5a32699D` | + + + +#### `SingleOsmStopSpell` + +| Ilk | Address | +| ----------- | -------------------------------------------- | +| `ETH-A` | `0x3a03F35ba1F5e015a288feD50cEB5342d4989E85` | +| `ETH-B` | `0xb5f5F6CdCddD391402a2E71c2380d2f64372c49B` | +| `ETH-C` | `0x690a6a9236E80Bd331e635Ad696be45C89a418ec` | +| `LSE-MKR-A` | `0x9a4039d5abeDa765A3B295c51Db511861428109a` | +| `WBTC-A` | `0xa1295912d6b535e30Df9aE4077256d0A989F4863` | +| `WBTC-B` | `0x3eC627D7A4F5b88cD13E67d55885B0Bf09B4a3b0` | +| `WBTC-C` | `0x3d045508697681F021980B41759CDB8aB5C5AFb8` | +| `WSTETH-A` | `0xC8F4544334B9ACBcd6DDE5c2283d53b48ad762BC` | +| `WSTETH-B` | `0xD1ce9F89c7f1e6Ec698bc840676efbFfC1373daa` | ## Implemented Actions -| Description | Single ilk | Multi ilk | -| :---------- | :--------: | :-------: | +| Description | Single ilk | Multi ilk | +| :----------------- | :----------------: | :----------------: | | Wipe `line` | :white_check_mark: | :white_check_mark: | | Set `Clip` breaker | :white_check_mark: | :white_check_mark: | -| Disable `DDM` | :white_check_mark: | :x: | +| Disable `DDM` | :white_check_mark: | :x: | | Stop `OSM` | :white_check_mark: | :white_check_mark: | -| Halt `PSM` | :white_check_mark: | :x: | -| Stop `Splitter` | :x: | :white_check_mark: | +| Halt `PSM` | :white_check_mark: | :x: | +| Stop `Splitter` | :x: | :white_check_mark: | ### Wipe `line` @@ -135,6 +237,7 @@ set to `true` when the spell is cast. This ensures a spell cannot be cast twice. An emergency spell is not meant to be cast, but it can be scheduled multiple times. So instead of having `done` as a storage variable, it becomes a getter function that will return: + - `false`: if the emergency spell can be scheduled in the current state, given it is lifted to the hat. - `true`: if the desired effects of the spell can be verified or if there is anything that would prevent the spell from being scheduled (i.e.: bad system config) diff --git a/lib/dss-test b/lib/dss-test index 6d4029d..dd3ff09 160000 --- a/lib/dss-test +++ b/lib/dss-test @@ -1 +1 @@ -Subproject commit 6d4029dc373d4e2af2404016e0a834e53d976264 +Subproject commit dd3ff0970cded87ebd875120220225e72cd8c75a diff --git a/script/MultiClipBreakerDeploy.s.sol b/script/MultiClipBreakerDeploy.s.sol new file mode 100644 index 0000000..0c5711e --- /dev/null +++ b/script/MultiClipBreakerDeploy.s.sol @@ -0,0 +1,37 @@ +// SPDX-FileCopyrightText: © 2023 Dai Foundation +// SPDX-License-Identifier: AGPL-3.0-or-later +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +pragma solidity ^0.8.16; + +import {Script} from "forge-std/Script.sol"; +import {stdJson} from "forge-std/StdJson.sol"; +import {ScriptTools} from "dss-test/ScriptTools.sol"; +import {MultiClipBreakerSpell} from "src/clip-breaker/MultiClipBreakerSpell.sol"; + +contract MultiClipBreakerDeployScript is Script { + using stdJson for string; + using ScriptTools for string; + + string constant NAME = "multi-clip-breaker-deploy"; + + function run() external { + vm.startBroadcast(); + + address spell = address(new MultiClipBreakerSpell()); + ScriptTools.exportContract(NAME, "spell", spell); + + vm.stopBroadcast(); + } +} diff --git a/script/MultiLineWipeDeploy.s.sol b/script/MultiLineWipeDeploy.s.sol new file mode 100644 index 0000000..ea0edbb --- /dev/null +++ b/script/MultiLineWipeDeploy.s.sol @@ -0,0 +1,37 @@ +// SPDX-FileCopyrightText: © 2023 Dai Foundation +// SPDX-License-Identifier: AGPL-3.0-or-later +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +pragma solidity ^0.8.16; + +import {Script} from "forge-std/Script.sol"; +import {stdJson} from "forge-std/StdJson.sol"; +import {ScriptTools} from "dss-test/ScriptTools.sol"; +import {MultiLineWipeSpell} from "src/line-wipe/MultiLineWipeSpell.sol"; + +contract MultiLineWipeDeployScript is Script { + using stdJson for string; + using ScriptTools for string; + + string constant NAME = "multi-line-wipe-deploy"; + + function run() external { + vm.startBroadcast(); + + address spell = address(new MultiLineWipeSpell()); + ScriptTools.exportContract(NAME, "spell", spell); + + vm.stopBroadcast(); + } +} diff --git a/script/MultiOsmStopDeploy.s.sol b/script/MultiOsmStopDeploy.s.sol new file mode 100644 index 0000000..10a9874 --- /dev/null +++ b/script/MultiOsmStopDeploy.s.sol @@ -0,0 +1,37 @@ +// SPDX-FileCopyrightText: © 2023 Dai Foundation +// SPDX-License-Identifier: AGPL-3.0-or-later +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +pragma solidity ^0.8.16; + +import {Script} from "forge-std/Script.sol"; +import {stdJson} from "forge-std/StdJson.sol"; +import {ScriptTools} from "dss-test/ScriptTools.sol"; +import {MultiOsmStopSpell} from "src/osm-stop/MultiOsmStopSpell.sol"; + +contract MultiOsmStopDeployScript is Script { + using stdJson for string; + using ScriptTools for string; + + string constant NAME = "multi-osm-stop-deploy"; + + function run() external { + vm.startBroadcast(); + + address spell = address(new MultiOsmStopSpell()); + ScriptTools.exportContract(NAME, "spell", spell); + + vm.stopBroadcast(); + } +} diff --git a/script/SingleClipBreakerDeploy.s.sol b/script/SingleClipBreakerDeploy.s.sol new file mode 100644 index 0000000..f23d362 --- /dev/null +++ b/script/SingleClipBreakerDeploy.s.sol @@ -0,0 +1,48 @@ +// SPDX-FileCopyrightText: © 2023 Dai Foundation +// SPDX-License-Identifier: AGPL-3.0-or-later +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +pragma solidity ^0.8.16; + +import {Script} from "forge-std/Script.sol"; +import {stdJson} from "forge-std/StdJson.sol"; +import {ScriptTools} from "dss-test/ScriptTools.sol"; +import {SingleClipBreakerFactory} from "src/clip-breaker/SingleClipBreakerSpell.sol"; + +contract SingleClipBreakerDeployScript is Script { + using stdJson for string; + using ScriptTools for string; + + string constant NAME = "single-clip-breaker-deploy"; + string config; + + SingleClipBreakerFactory fab; + string[] ilkStrs; + + function run() external { + config = ScriptTools.loadConfig(); + + fab = SingleClipBreakerFactory(config.readAddress(".factory", "FOUNDRY_FACTORY")); + ilkStrs = config.readStringArray(".ilks", "FOUNDRY_ILKS"); + + vm.startBroadcast(); + + for (uint256 i = 0; i < ilkStrs.length; i++) { + bytes32 ilk = ilkStrs[i].stringToBytes32(); + address spell = fab.deploy(ilk); + ScriptTools.exportContract(NAME, ilkStrs[i], spell); + } + vm.stopBroadcast(); + } +} diff --git a/script/SingleDdmDisableDeploy.s.sol b/script/SingleDdmDisableDeploy.s.sol new file mode 100644 index 0000000..b3eb081 --- /dev/null +++ b/script/SingleDdmDisableDeploy.s.sol @@ -0,0 +1,48 @@ +// SPDX-FileCopyrightText: © 2023 Dai Foundation +// SPDX-License-Identifier: AGPL-3.0-or-later +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +pragma solidity ^0.8.16; + +import {Script} from "forge-std/Script.sol"; +import {stdJson} from "forge-std/StdJson.sol"; +import {ScriptTools} from "dss-test/ScriptTools.sol"; +import {SingleDdmDisableFactory} from "src/ddm-disable/SingleDdmDisableSpell.sol"; + +contract SingleDdmDisableDeployScript is Script { + using stdJson for string; + using ScriptTools for string; + + string constant NAME = "single-ddm-disable-deploy"; + string config; + + SingleDdmDisableFactory fab; + string[] ilkStrs; + + function run() external { + config = ScriptTools.loadConfig(); + + fab = SingleDdmDisableFactory(config.readAddress(".factory", "FOUNDRY_FACTORY")); + ilkStrs = config.readStringArray(".ilks", "FOUNDRY_ILKS"); + + vm.startBroadcast(); + + for (uint256 i = 0; i < ilkStrs.length; i++) { + bytes32 ilk = ilkStrs[i].stringToBytes32(); + address spell = fab.deploy(ilk); + ScriptTools.exportContract(NAME, ilkStrs[i], spell); + } + vm.stopBroadcast(); + } +} diff --git a/script/SingleLineWipeDeploy.s.sol b/script/SingleLineWipeDeploy.s.sol new file mode 100644 index 0000000..56ca80d --- /dev/null +++ b/script/SingleLineWipeDeploy.s.sol @@ -0,0 +1,48 @@ +// SPDX-FileCopyrightText: © 2023 Dai Foundation +// SPDX-License-Identifier: AGPL-3.0-or-later +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +pragma solidity ^0.8.16; + +import {Script} from "forge-std/Script.sol"; +import {stdJson} from "forge-std/StdJson.sol"; +import {ScriptTools} from "dss-test/ScriptTools.sol"; +import {SingleLineWipeFactory} from "src/line-wipe/SingleLineWipeSpell.sol"; + +contract SingleLineWipeDeployScript is Script { + using stdJson for string; + using ScriptTools for string; + + string constant NAME = "single-line-wipe-deploy"; + string config; + + SingleLineWipeFactory fab; + string[] ilkStrs; + + function run() external { + config = ScriptTools.loadConfig(); + + fab = SingleLineWipeFactory(config.readAddress(".factory", "FOUNDRY_FACTORY")); + ilkStrs = config.readStringArray(".ilks", "FOUNDRY_ILKS"); + + vm.startBroadcast(); + + for (uint256 i = 0; i < ilkStrs.length; i++) { + bytes32 ilk = ilkStrs[i].stringToBytes32(); + address spell = fab.deploy(ilk); + ScriptTools.exportContract(NAME, ilkStrs[i], spell); + } + vm.stopBroadcast(); + } +} diff --git a/script/SingleLitePsmHaltDeploy.s.sol b/script/SingleLitePsmHaltDeploy.s.sol new file mode 100644 index 0000000..6953d82 --- /dev/null +++ b/script/SingleLitePsmHaltDeploy.s.sol @@ -0,0 +1,71 @@ +// SPDX-FileCopyrightText: © 2023 Dai Foundation +// SPDX-License-Identifier: AGPL-3.0-or-later +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +pragma solidity ^0.8.16; + +import {Script} from "forge-std/Script.sol"; +import {stdJson} from "forge-std/StdJson.sol"; +import {ScriptTools} from "dss-test/ScriptTools.sol"; +import {SingleLitePsmHaltFactory, Flow} from "src/lite-psm-halt/SingleLitePsmHaltSpell.sol"; + +interface LitePsmLike { + function ilk() external view returns (bytes32); +} + +contract SingleLitePsmHaltDeployScript is Script { + using stdJson for string; + using ScriptTools for string; + + string constant NAME = "single-lite-psm-halt-deploy"; + string config; + + SingleLitePsmHaltFactory fab; + address[] litePsms; + + function run() external { + config = ScriptTools.loadConfig(); + + fab = SingleLitePsmHaltFactory(config.readAddress(".factory", "FOUNDRY_FACTORY")); + litePsms = config.readAddressArray(".litePsms", "FOUNDRY_LITE_PSMS"); + + vm.startBroadcast(); + + for (uint256 i = 0; i < litePsms.length; i++) { + address litePsm = litePsms[i]; + string memory ilkStr = _bytes32ToString(LitePsmLike(litePsm).ilk()); + ScriptTools.exportContract(NAME, string.concat(ilkStr, "_SELL"), fab.deploy(litePsm, Flow.SELL)); + ScriptTools.exportContract(NAME, string.concat(ilkStr, "_BUY"), fab.deploy(litePsm, Flow.BUY)); + ScriptTools.exportContract(NAME, string.concat(ilkStr, "_BOTH"), fab.deploy(litePsm, Flow.BOTH)); + } + vm.stopBroadcast(); + } + + /// @notice Converts a bytes32 value into a string. + function _bytes32ToString(bytes32 src) internal pure returns (string memory res) { + uint256 len = 0; + while (src[len] != 0 && len < 32) { + len++; + } + assembly { + res := mload(0x40) + // new "memory end" including padding (the string isn't larger than 32 bytes) + mstore(0x40, add(res, 0x40)) + // store len in memory + mstore(res, len) + // write actual data + mstore(add(res, 0x20), src) + } + } +} diff --git a/script/SingleOsmStopDeploy.s.sol b/script/SingleOsmStopDeploy.s.sol new file mode 100644 index 0000000..ef87020 --- /dev/null +++ b/script/SingleOsmStopDeploy.s.sol @@ -0,0 +1,48 @@ +// SPDX-FileCopyrightText: © 2023 Dai Foundation +// SPDX-License-Identifier: AGPL-3.0-or-later +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +pragma solidity ^0.8.16; + +import {Script} from "forge-std/Script.sol"; +import {stdJson} from "forge-std/StdJson.sol"; +import {ScriptTools} from "dss-test/ScriptTools.sol"; +import {SingleOsmStopFactory} from "src/osm-stop/SingleOsmStopSpell.sol"; + +contract SingleOsmStopDeployScript is Script { + using stdJson for string; + using ScriptTools for string; + + string constant NAME = "single-osm-stop-deploy"; + string config; + + SingleOsmStopFactory fab; + string[] ilkStrs; + + function run() external { + config = ScriptTools.loadConfig(); + + fab = SingleOsmStopFactory(config.readAddress(".factory", "FOUNDRY_FACTORY")); + ilkStrs = config.readStringArray(".ilks", "FOUNDRY_ILKS"); + + vm.startBroadcast(); + + for (uint256 i = 0; i < ilkStrs.length; i++) { + bytes32 ilk = ilkStrs[i].stringToBytes32(); + address spell = fab.deploy(ilk); + ScriptTools.exportContract(NAME, ilkStrs[i], spell); + } + vm.stopBroadcast(); + } +} diff --git a/script/SplitterStopDeploy.s.sol b/script/SplitterStopDeploy.s.sol new file mode 100644 index 0000000..d89d0eb --- /dev/null +++ b/script/SplitterStopDeploy.s.sol @@ -0,0 +1,37 @@ +// SPDX-FileCopyrightText: © 2023 Dai Foundation +// SPDX-License-Identifier: AGPL-3.0-or-later +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +pragma solidity ^0.8.16; + +import {Script} from "forge-std/Script.sol"; +import {stdJson} from "forge-std/StdJson.sol"; +import {ScriptTools} from "dss-test/ScriptTools.sol"; +import {SplitterStopSpell} from "src/splitter-stop/SplitterStopSpell.sol"; + +contract SplitterStopDeployScript is Script { + using stdJson for string; + using ScriptTools for string; + + string constant NAME = "splitter-stop-deploy"; + + function run() external { + vm.startBroadcast(); + + address spell = address(new SplitterStopSpell()); + ScriptTools.exportContract(NAME, "spell", spell); + + vm.stopBroadcast(); + } +} diff --git a/script/input/1/README.md b/script/input/1/README.md new file mode 100644 index 0000000..2581fba --- /dev/null +++ b/script/input/1/README.md @@ -0,0 +1 @@ +Script inputs for Mainnet. diff --git a/script/input/1/template-ddm-disable-deploy.json b/script/input/1/template-ddm-disable-deploy.json new file mode 100644 index 0000000..366d017 --- /dev/null +++ b/script/input/1/template-ddm-disable-deploy.json @@ -0,0 +1,4 @@ +{ + "factory": "address: the address of the on-chain spell factory", + "ilks": ["ILK-A", "ILK-B"] +} diff --git a/script/input/1/template-single-clip-breaker-deploy.json b/script/input/1/template-single-clip-breaker-deploy.json new file mode 100644 index 0000000..366d017 --- /dev/null +++ b/script/input/1/template-single-clip-breaker-deploy.json @@ -0,0 +1,4 @@ +{ + "factory": "address: the address of the on-chain spell factory", + "ilks": ["ILK-A", "ILK-B"] +} diff --git a/script/input/1/template-single-line-wipe-deploy.json b/script/input/1/template-single-line-wipe-deploy.json new file mode 100644 index 0000000..366d017 --- /dev/null +++ b/script/input/1/template-single-line-wipe-deploy.json @@ -0,0 +1,4 @@ +{ + "factory": "address: the address of the on-chain spell factory", + "ilks": ["ILK-A", "ILK-B"] +} diff --git a/script/input/1/template-single-lite-psm-halt-deploy.json b/script/input/1/template-single-lite-psm-halt-deploy.json new file mode 100644 index 0000000..7a5d109 --- /dev/null +++ b/script/input/1/template-single-lite-psm-halt-deploy.json @@ -0,0 +1,4 @@ +{ + "factory": "address: the address of the on-chain spell factory", + "litePsms": ["address: litePsm address"] +} diff --git a/script/input/1/template-single-osm-stop-deploy.json b/script/input/1/template-single-osm-stop-deploy.json new file mode 100644 index 0000000..366d017 --- /dev/null +++ b/script/input/1/template-single-osm-stop-deploy.json @@ -0,0 +1,4 @@ +{ + "factory": "address: the address of the on-chain spell factory", + "ilks": ["ILK-A", "ILK-B"] +} diff --git a/script/output/1/README.md b/script/output/1/README.md new file mode 100644 index 0000000..8aee2ce --- /dev/null +++ b/script/output/1/README.md @@ -0,0 +1 @@ +Script outputs for Mainnet. diff --git a/src/lite-psm-halt/SingleLitePsmHaltSpell.sol b/src/lite-psm-halt/SingleLitePsmHaltSpell.sol index 405494d..5622db9 100644 --- a/src/lite-psm-halt/SingleLitePsmHaltSpell.sol +++ b/src/lite-psm-halt/SingleLitePsmHaltSpell.sol @@ -107,7 +107,7 @@ contract SingleLitePsmHaltSpell is DssEmergencySpell { } } -contract SingleLitePsmHaltSpellFactory { +contract SingleLitePsmHaltFactory { event Deploy(address psm, Flow indexed flow, address spell); function deploy(address psm, Flow flow) external returns (address spell) { diff --git a/src/lite-psm-halt/SingleLitePsmHaltSpell.t.integration.sol b/src/lite-psm-halt/SingleLitePsmHaltSpell.t.integration.sol index 47371d0..0316bbc 100644 --- a/src/lite-psm-halt/SingleLitePsmHaltSpell.t.integration.sol +++ b/src/lite-psm-halt/SingleLitePsmHaltSpell.t.integration.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.16; import {stdStorage, StdStorage} from "forge-std/Test.sol"; import {DssTest, DssInstance, MCD, GodMode} from "dss-test/DssTest.sol"; import {DssEmergencySpellLike} from "../DssEmergencySpell.sol"; -import {SingleLitePsmHaltSpellFactory, Flow} from "./SingleLitePsmHaltSpell.sol"; +import {SingleLitePsmHaltFactory, Flow} from "./SingleLitePsmHaltSpell.sol"; interface LitePsmLike { function deny(address) external; @@ -33,7 +33,7 @@ contract SingleLitePsmHaltSpellTest is DssTest { address chief; address litePsmMom; LitePsmLike psm; - SingleLitePsmHaltSpellFactory factory; + SingleLitePsmHaltFactory factory; function setUp() public { vm.createSelectFork("mainnet"); @@ -43,7 +43,7 @@ contract SingleLitePsmHaltSpellTest is DssTest { chief = dss.chainlog.getAddress("MCD_ADM"); litePsmMom = dss.chainlog.getAddress("LITE_PSM_MOM"); psm = LitePsmLike(dss.chainlog.getAddress("MCD_LITE_PSM_USDC_A")); - factory = new SingleLitePsmHaltSpellFactory(); + factory = new SingleLitePsmHaltFactory(); } function testPsmHaltOnScheduleBuy() public {