Skip to content

Commit

Permalink
Cleaning the unused json files
Browse files Browse the repository at this point in the history
  • Loading branch information
brickpop committed Jun 3, 2024
1 parent d061382 commit 369eb18
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 199 deletions.
37 changes: 0 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -632,35 +632,6 @@ function encodeUninstallationParams(
) public pure returns (bytes memory)
```

The JSON encoded ABI definition can also be found at the corresponding `src/<folder>/<name>-build-metadata.json` file:

```json
{
// ...
"pluginSetup": {
"prepareInstallation": {
// ...
"inputs": [
{
"name": "firstBlockContentUri",
"type": "string",
"internalType": "string",
"description": "The inital contents of the first block item."
},
{
"internalType": "address",
"name": "predecessorAddress",
"type": "address"
},
{
"internalType": "address",
"name": "pluginUpgrader",
"type": "address"
}
]
},
```

The same also applies to `prepareUpdate` (if present) and to `prepareUninstallation`.

### Available setup contracts
Expand Down Expand Up @@ -701,14 +672,6 @@ In the example, the code is making use of the existing JS client for [Aragon's T
- The deployments made will populate data to the `packages/contracts/plugin-repo-info.json` and `packages/contracts/plugin-repo-info-dev.json`.
- You need to copy `.env.template` into `.env` and provide your Infura API key

### Plugin metadata

Plugins need some basic metadata in order for JS clients to be able to handle installations and updates. Beyond a simple title and description, every contract's build metadata contains the ABI of the parameters that need to be encoded in order to prepare the plugin installation.

Every plugin has an `initialize()` methos, which acts as the constructor for UUPS upgradeable contracts. This method will be passed its DAO's address, as well as a `bytes memory data` parameter, with all the settings encoded.

The format of these settings is defined in the `packages/contracts/src/*-build.metadata.json` file. See the `pluginSetup` > `prepareInstallation` section.

## DO's and DONT's

- Never grant `ROOT_PERMISSION` unless you are just trying things out
Expand Down
23 changes: 0 additions & 23 deletions packages/contracts/plugin-setup-params.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
import governanceBuildMetadata from './src/governance/governance-build-metadata.json';
import governanceReleaseMetadata from './src/governance/governance-release-metadata.json';
import personalSpaceAdminBuildMetadata from './src/personal/personal-space-admin-build-metadata.json';
import personalSpaceAdminReleaseMetadata from './src/personal/personal-space-admin-release-metadata.json';
import spaceBuildMetadata from './src/space/space-build-metadata.json';
import spaceReleaseMetadata from './src/space/space-release-metadata.json';

export const SpacePluginSetupParams: PluginSetupParams = {
PLUGIN_REPO_ENS_NAME: 'geo-browser-space',
PLUGIN_CONTRACT_NAME: 'SpacePlugin',
Expand All @@ -13,10 +6,6 @@ export const SpacePluginSetupParams: PluginSetupParams = {
release: 1, // Increment this number ONLY if breaking/incompatible changes were made. Updates between releases are NOT possible.
build: 1, // Increment this number if non-breaking/compatible changes were made. Updates to newer builds are possible.
},
METADATA: {
build: spaceBuildMetadata,
release: spaceReleaseMetadata,
},
};

export const PersonalSpaceAdminPluginSetupParams: PluginSetupParams = {
Expand All @@ -27,10 +16,6 @@ export const PersonalSpaceAdminPluginSetupParams: PluginSetupParams = {
release: 1, // Increment this number ONLY if breaking/incompatible changes were made. Updates between releases are NOT possible.
build: 1, // Increment this number if non-breaking/compatible changes were made. Updates to newer builds are possible.
},
METADATA: {
build: personalSpaceAdminBuildMetadata,
release: personalSpaceAdminReleaseMetadata,
},
};

export const GovernancePluginsSetupParams: PluginSetupParams = {
Expand All @@ -41,10 +26,6 @@ export const GovernancePluginsSetupParams: PluginSetupParams = {
release: 1, // Increment this number ONLY if breaking/incompatible changes were made. Updates between releases are NOT possible.
build: 1, // Increment this number if non-breaking/compatible changes were made. Updates to newer builds are possible.
},
METADATA: {
build: governanceBuildMetadata,
release: governanceReleaseMetadata,
},
};

// Types
Expand All @@ -57,8 +38,4 @@ export type PluginSetupParams = {
release: number;
build: number;
};
METADATA: {
build: {[k: string]: any};
release: {[k: string]: any};
};
};
64 changes: 0 additions & 64 deletions packages/contracts/src/governance/governance-build-metadata.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

38 changes: 0 additions & 38 deletions packages/contracts/src/space/space-build-metadata.json

This file was deleted.

5 changes: 0 additions & 5 deletions packages/contracts/src/space/space-release-metadata.json

This file was deleted.

0 comments on commit 369eb18

Please sign in to comment.