From f3c1ace83388b933b32823ae1092505164dd058c Mon Sep 17 00:00:00 2001 From: amusingaxl <112016538+amusingaxl@users.noreply.github.com> Date: Sun, 24 Nov 2024 19:52:06 -0300 Subject: [PATCH] feat: add global spells deploy scripts --- script/MultiClipBreakerDeploy.s.sol | 38 +++++++++++++++++++++++++++++ script/MultiLineWipeDeploy.s.sol | 38 +++++++++++++++++++++++++++++ script/MultiOsmStopDeploy.s.sol | 38 +++++++++++++++++++++++++++++ script/SplitterStopDeploy.s.sol | 38 +++++++++++++++++++++++++++++ 4 files changed, 152 insertions(+) create mode 100644 script/MultiClipBreakerDeploy.s.sol create mode 100644 script/MultiLineWipeDeploy.s.sol create mode 100644 script/MultiOsmStopDeploy.s.sol create mode 100644 script/SplitterStopDeploy.s.sol diff --git a/script/MultiClipBreakerDeploy.s.sol b/script/MultiClipBreakerDeploy.s.sol new file mode 100644 index 0000000..010404a --- /dev/null +++ b/script/MultiClipBreakerDeploy.s.sol @@ -0,0 +1,38 @@ +// 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 {MCD, DssInstance} from "dss-test/MCD.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..5765bb1 --- /dev/null +++ b/script/MultiLineWipeDeploy.s.sol @@ -0,0 +1,38 @@ +// 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 {MCD, DssInstance} from "dss-test/MCD.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..e1e2012 --- /dev/null +++ b/script/MultiOsmStopDeploy.s.sol @@ -0,0 +1,38 @@ +// 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 {MCD, DssInstance} from "dss-test/MCD.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/SplitterStopDeploy.s.sol b/script/SplitterStopDeploy.s.sol new file mode 100644 index 0000000..94bf329 --- /dev/null +++ b/script/SplitterStopDeploy.s.sol @@ -0,0 +1,38 @@ +// 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 {MCD, DssInstance} from "dss-test/MCD.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(); + } +}