Skip to content

Commit 1f28462

Browse files
authored
Feat: Add Obex SubProxy deployment script (#39)
* feat: add lsSKY -> Sky farm deployment script * refactor: add full init library for LSSKY -> SKY farm * test: add coverage for LsskySkyFarmingInit * refactor: generalize farm initialization library * refactor: rename parameters in TreasuryFundedFarmingInit test * feat: add regular farming init * refactor: improve testing for initializatino of farms * refactor: remove admin from parameters * chore: improve formatting * chore: simplify formatting and linting * chore: remove TODO * test: add integration tests for farms after initialization * chore: remove unused structs * fix: wrong chainlog key in deployment script * refactor: explicitly name and check for `DssVestTransferrable` * chore: clean up interfaces * feat: add Obex SubProxy deployment script * fix: typo in function name * refactor: add comments to FarmingInitParams fields * fix: make CI use a stable Foundry version * fix: add ETH_RPC_URL to CI env --------- Signed-off-by: amusingaxl <112016538+amusingaxl@users.noreply.github.com>
1 parent f7bcb52 commit 1f28462

3 files changed

Lines changed: 45 additions & 0 deletions

File tree

script/input/1/obex/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Script inputs for Mainnet for `obex`.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// SPDX-FileCopyrightText: © 2023 Dai Foundation <www.daifoundation.org>
2+
// SPDX-License-Identifier: AGPL-3.0-or-later
3+
//
4+
// This program is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU Affero General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// This program is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU Affero General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU Affero General Public License
15+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
pragma solidity ^0.8.16;
17+
18+
import {Script} from "forge-std/Script.sol";
19+
import {ScriptTools} from "dss-test/ScriptTools.sol";
20+
import {SubProxyDeploy, SubProxyDeployParams} from "../dependencies/SubProxyDeploy.sol";
21+
22+
contract ObexSubProxyDeployScript is Script {
23+
ChainlogLike internal constant chainlog = ChainlogLike(0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F);
24+
25+
string internal constant NAME = "obex/sub-proxy-deploy";
26+
27+
function run() external {
28+
address admin = chainlog.getAddress("MCD_PAUSE_PROXY");
29+
30+
vm.startBroadcast();
31+
32+
address subProxy = SubProxyDeploy.deploy(SubProxyDeployParams({deployer: msg.sender, owner: admin}));
33+
34+
vm.stopBroadcast();
35+
36+
ScriptTools.exportContract(NAME, "admin", admin);
37+
ScriptTools.exportContract(NAME, "subProxy", subProxy);
38+
}
39+
}
40+
41+
interface ChainlogLike {
42+
function getAddress(bytes32 _key) external view returns (address addr);
43+
}

script/output/1/obex/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Script outputs for Mainnet for `obex`.

0 commit comments

Comments
 (0)