-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert: removal of placeholder setup
- Loading branch information
1 parent
158201f
commit 6b1fac9
Showing
5 changed files
with
54 additions
and
16 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/contracts/deploy/new/30_plugins/00_plugin-setups/40_placeholder_setup.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
packages/contracts/src/framework/plugin/repo/placeholder/PlaceholderSetup.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
pragma solidity ^0.8.8; | ||
|
||
import {PermissionLib} from "@aragon/osx-commons-contracts/src/permission/PermissionLib.sol"; | ||
import {IPluginSetup} from "@aragon/osx-commons-contracts/src/plugin/setup/IPluginSetup.sol"; | ||
import {PluginSetup} from "@aragon/osx-commons-contracts/src/plugin/setup/PluginSetup.sol"; | ||
|
||
/// @title PlaceholderSetup | ||
/// @author Aragon Association - 2023 | ||
/// @notice A placeholder setup contract for outdated plugin builds. When moving plugin repos to new chains or layers, where only the latest release and build should be available, this placeholder can be used to populate previous builds. | ||
/// @custom:security-contact [email protected] | ||
contract PlaceholderSetup is PluginSetup { | ||
/// @notice Thrown if the dummy is used. | ||
error PlaceholderSetupCannotBeUsed(); | ||
|
||
/// @inheritdoc IPluginSetup | ||
function prepareInstallation( | ||
address /*_dao*/, | ||
bytes calldata /*_data*/ | ||
) external pure returns (address /*plugin*/, PreparedSetupData memory /*preparedSetupData*/) { | ||
revert PlaceholderSetupCannotBeUsed(); | ||
} | ||
|
||
/// @inheritdoc IPluginSetup | ||
function prepareUninstallation( | ||
address /*_dao*/, | ||
SetupPayload calldata /*_payload*/ | ||
) external pure returns (PermissionLib.MultiTargetPermission[] memory /*permissions*/) { | ||
revert PlaceholderSetupCannotBeUsed(); | ||
} | ||
|
||
/// @inheritdoc IPluginSetup | ||
function implementation() external pure returns (address) { | ||
return address(0); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/contracts/src/framework/plugin/repo/placeholder/placeholder-build-metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"ui": "", | ||
"change": "", | ||
"pluginSetup": { | ||
"prepareInstallation": "", | ||
"prepareUpdate": "", | ||
"prepareUninstallation": "" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters