Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: add SPK token deployment scripts #31

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions script/input/1/phase-1d/template-spk-deploy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"admin": "address: the address of MCD_PAUSE_PROXY"
}
1 change: 1 addition & 0 deletions script/input/8453/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Script inputs for Base.
3 changes: 3 additions & 0 deletions script/input/8453/phase-1d/template-spk-deploy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"admin": "address: the address of the Sky Governance Relay for the network"
}
1 change: 1 addition & 0 deletions script/output/8453/phase-1d/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Script outputs for Base for `phase-1d`.
49 changes: 49 additions & 0 deletions script/phase-1d/40-SpkDeploy.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// SPDX-FileCopyrightText: © 2023 Dai Foundation <www.daifoundation.org>
// 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 <https://www.gnu.org/licenses/>.
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);
}
Loading