Skip to content

Commit c3093a4

Browse files
authored
Merge pull request #85 from aragon/f/lighter-plugin-setup
Lighter plugin setup
2 parents 5cae4f4 + 4f164ea commit c3093a4

File tree

10 files changed

+18
-10
lines changed

10 files changed

+18
-10
lines changed

npm-artifacts/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
44
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6+
## v1.1.7
7+
8+
- Lighter plugin setup, same logic
9+
610
## v1.1.6
711

812
- Adding Katana

npm-artifacts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@aragon/staged-proposal-processor-plugin-artifacts",
33
"author": "Aragon X",
4-
"version": "1.1.6",
4+
"version": "1.1.7",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/aragon/staged-proposal-processor-plugin",

script/Base.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {console} from "forge-std/console.sol";
66

77
import {Constants} from "./utils/Constants.sol";
88
import {PluginSettings} from "../src/utils/PluginSettings.sol";
9+
import {StagedProposalProcessor as SPP} from "../src/StagedProposalProcessor.sol";
910
import {StagedProposalProcessorSetup as SPPSetup} from "../src/StagedProposalProcessorSetup.sol";
1011
import {StagedProposalProcessorSetup as SPPSetupZkSync} from "../src/StagedProposalProcessorSetupZkSync.sol";
1112

@@ -84,9 +85,9 @@ contract BaseScript is Script, Constants {
8485
function _createAndCheckNewVersion() internal returns (SPPSetup _sppSetup) {
8586
bytes32 networkHash = keccak256(abi.encodePacked(network));
8687
if(networkHash == keccak256(abi.encodePacked("zksyncSepolia")) || networkHash == keccak256(abi.encodePacked("zksyncMainnet"))) {
87-
_sppSetup = SPPSetup(address(new SPPSetupZkSync()));
88+
_sppSetup = SPPSetup(address(new SPPSetupZkSync(new SPP())));
8889
} else {
89-
_sppSetup = new SPPSetup();
90+
_sppSetup = new SPPSetup(new SPP());
9091
}
9192

9293
// Check release number

script/NewVersion.s.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pragma solidity ^0.8.18;
33

44
import {BaseScript} from "./Base.sol";
55
import {PluginSettings} from "../src/utils/PluginSettings.sol";
6+
import {StagedProposalProcessor as SPP} from "../src/StagedProposalProcessor.sol";
67
import {StagedProposalProcessorSetup as SPPSetup} from "../src/StagedProposalProcessorSetup.sol";
78

89
import {PluginRepo} from "@aragon/osx/framework/plugin/repo/PluginRepo.sol";
@@ -37,7 +38,7 @@ contract NewVersion is BaseScript {
3738
// if deployer has permission create new version
3839
_createAndCheckNewVersion();
3940
} else {
40-
sppSetup = new SPPSetup();
41+
sppSetup = new SPPSetup(new SPP());
4142
string memory json = _serializeToJson(_buildProposalData(address(sppSetup)));
4243

4344
// Write the serialized JSON data to a file

src/StagedProposalProcessorSetup.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ contract StagedProposalProcessorSetup is PluginUpgradeableSetup {
3333
/// @notice Constructs the `PluginUpgradeableSetup` by storing the `SPP` implementation address.
3434
/// @dev The implementation address is used to deploy UUPS proxies referencing it and
3535
/// to verify the plugin on the respective block explorers.
36-
constructor() PluginUpgradeableSetup(address(new SPP())) {
36+
constructor(SPP _spp) PluginUpgradeableSetup(address(_spp)) {
3737
CONDITION_IMPLEMENTATION = address(
3838
new SPPRuleCondition(address(0), new RuledCondition.Rule[](0))
3939
);

src/StagedProposalProcessorSetupZkSync.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ contract StagedProposalProcessorSetup is PluginUpgradeableSetup {
3333
/// @notice Constructs the `PluginUpgradeableSetup` by storing the `SPP` implementation address.
3434
/// @dev The implementation address is used to deploy UUPS proxies referencing it and
3535
/// to verify the plugin on the respective block explorers.
36-
constructor() PluginUpgradeableSetup(address(new SPP())) {
36+
constructor(SPP _spp) PluginUpgradeableSetup(address(_spp)) {
3737
CONDITION_IMPLEMENTATION = address(
3838
new SPPRuleCondition(address(0), new RuledCondition.Rule[](0))
3939
);

test/fork/ForkBaseTest.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ contract ForkBaseTest is Assertions, Constants, Events, Fuzzers, ScriptConstants
7777
trustedForwarder = new TrustedForwarder();
7878

7979
// publish new spp version
80-
sppSetup = new SPPSetup();
80+
sppSetup = new SPPSetup(new SPP());
8181
// Check release number
8282
uint256 latestRelease = sppRepo.latestRelease();
8383

test/unit/stagedProposalProcessorSetup/concrete/prepareInstallation/prepareInstallation.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ contract PrepareInstallation_SPPSetup_UnitTest is BaseTest {
2222
super.setUp();
2323

2424
// deploy SPPSetup contract.
25-
sppSetup = new SPPSetup();
25+
sppSetup = new SPPSetup(new SPP());
2626
}
2727

2828
modifier whenPreparingInstallation() {

test/unit/stagedProposalProcessorSetup/concrete/prepareUninstallation/prepareUninstallation.t.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
pragma solidity ^0.8.18;
33

44
import {BaseTest} from "../../../../BaseTest.t.sol";
5+
import {StagedProposalProcessor as SPP} from "../../../../../src/StagedProposalProcessor.sol";
56
import {
67
StagedProposalProcessorSetup as SPPSetup
78
} from "../../../../../src/StagedProposalProcessorSetup.sol";
@@ -16,7 +17,7 @@ contract PrepareUninstallation_SPPSetup_UnitTest is BaseTest {
1617
super.setUp();
1718

1819
// deploy SPPSetup contract.
19-
sppSetup = new SPPSetup();
20+
sppSetup = new SPPSetup(new SPP());
2021
}
2122

2223
function test_WhenPreparingUninstallation() external {

test/unit/stagedProposalProcessorSetup/concrete/prepareUpdate/prepareUpdate.t.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
pragma solidity ^0.8.18;
33

44
import {BaseTest} from "../../../../BaseTest.t.sol";
5+
import {StagedProposalProcessor as SPP} from "../../../../../src/StagedProposalProcessor.sol";
56
import {
67
StagedProposalProcessorSetup as SPPSetup
78
} from "../../../../../src/StagedProposalProcessorSetup.sol";
@@ -18,7 +19,7 @@ contract PrepareUpdate_SPPSetup_UnitTest is BaseTest {
1819
super.setUp();
1920

2021
// deploy SPPSetup contract.
21-
sppSetup = new SPPSetup();
22+
sppSetup = new SPPSetup(new SPP());
2223
}
2324

2425
function test_RevertWhen_PreparingUpdate() external {

0 commit comments

Comments
 (0)