diff --git a/script/input/1/phase-1d/template-spk-deploy.json b/script/input/1/phase-1d/template-spk-deploy.json new file mode 100644 index 0000000..8b547da --- /dev/null +++ b/script/input/1/phase-1d/template-spk-deploy.json @@ -0,0 +1,3 @@ +{ + "admin": "address: the address of MCD_PAUSE_PROXY" +} diff --git a/script/input/8453/README.md b/script/input/8453/README.md new file mode 100644 index 0000000..417670b --- /dev/null +++ b/script/input/8453/README.md @@ -0,0 +1 @@ +Script inputs for Base. diff --git a/script/input/8453/phase-1d/template-spk-deploy.json b/script/input/8453/phase-1d/template-spk-deploy.json new file mode 100644 index 0000000..899fe63 --- /dev/null +++ b/script/input/8453/phase-1d/template-spk-deploy.json @@ -0,0 +1,3 @@ +{ + "admin": "address: the address of the Sky Governance Relay for the network" +} diff --git a/script/output/8453/phase-1d/README.md b/script/output/8453/phase-1d/README.md new file mode 100644 index 0000000..27f5b19 --- /dev/null +++ b/script/output/8453/phase-1d/README.md @@ -0,0 +1 @@ +Script outputs for Base for `phase-1d`. diff --git a/script/phase-1d/40-SpkDeploy.s.sol b/script/phase-1d/40-SpkDeploy.s.sol new file mode 100644 index 0000000..8e58dfb --- /dev/null +++ b/script/phase-1d/40-SpkDeploy.s.sol @@ -0,0 +1,49 @@ +// 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 {ScriptTools} from "dss-test/ScriptTools.sol"; +import {Reader} from "../helpers/Reader.sol"; +import {SDAODeploy, SDAODeployParams} from "../dependencies/SDAODeploy.sol"; + +contract Phase1d_SpkDeployScript is Script { + ChainlogLike internal constant chainlog = ChainlogLike(0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F); + string internal constant NAME = "phase-1d/spk-deploy"; + + function run() external { + Reader reader = new Reader(ScriptTools.loadConfig()); + + address admin = reader.envOrReadAddress("FOUNDRY_ADMIN", ".admin"); + + vm.startBroadcast(); + + address spk = SDAODeploy.deploy( + SDAODeployParams({deployer: msg.sender, owner: admin, name: "Spark", symbol: "SPK"}) + ); + + vm.stopBroadcast(); + + ScriptTools.exportContract(NAME, "admin", admin); + ScriptTools.exportContract(NAME, "spk", spk); + ScriptTools.exportValue(NAME, "name", "Spark"); + ScriptTools.exportValue(NAME, "symbol", "SPK"); + } +} + +interface ChainlogLike { + function getAddress(bytes32 _key) external view returns (address addr); +}