Skip to content

Commit

Permalink
fix: fix changes coming from OSx repo
Browse files Browse the repository at this point in the history
  • Loading branch information
banasa44 committed May 14, 2024
1 parent c6ea082 commit d612ed0
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ You can find all of the addresses of `PluginRepoFactory` contracts by network [h

To create more versions of your plugin in the future, you'll call on the [`createVersion` function](https://github.com/aragon/osx/blob/develop/packages/contracts/src/framework/plugin/repo/PluginRepo.sol#L128) from the `PluginRepo` instance of your plugin. When you publish your plugin, you'll be able to find the address of your plugin's `PluginRepo` instance within the transaction data.

### 3. Publishing subsequent builds

When publishing subsequent builds, you want to use the `createVersion` function in the `PluginRepo` contract ([check out the function's source code here](https://github.com/aragon/osx/blob/develop/packages/contracts/src/framework/plugin/repo/PluginRepo.sol#L132)).

To deploy your plugin, follow the steps in the [`osx-plugin-template-hardhat` README.md](https://github.com/aragon/osx-plugin-template-hardhat/blob/main/README.md#deployment).
28 changes: 28 additions & 0 deletions docs/osx/03-reference-guide/framework/plugin/repo/IPluginRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,32 @@ function createVersion(uint8 _release, address _pluginSetupAddress, bytes _build
| `_buildMetadata` | `bytes` | The build metadata URI. |
| `_releaseMetadata` | `bytes` | The release metadata URI. |

### event VersionCreated

Emitted if the same plugin setup exists in previous releases.

```solidity
event VersionCreated(uint8 release, uint16 build, address pluginSetup, bytes buildMetadata)
```

| Input | Type | Description |
| :-------------- | --------- | ----------------------------------------- |
| `release` | `uint8` | The release number. |
| `build` | `uint16` | The build number. |
| `pluginSetup` | `address` | The address of the plugin setup contract. |
| `buildMetadata` | `bytes` | The build metadata URI. |

### event ReleaseMetadataUpdated

Emitted when a release's metadata was updated.

```solidity
event ReleaseMetadataUpdated(uint8 release, bytes releaseMetadata)
```

| Input | Type | Description |
| :---------------- | ------- | ------------------------- |
| `release` | `uint8` | The release number. |
| `releaseMetadata` | `bytes` | The release metadata URI. |

<!--CONTRACT_END-->
43 changes: 15 additions & 28 deletions docs/osx/03-reference-guide/framework/plugin/repo/PluginRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,34 +144,6 @@ Thrown if release does not exist.
error ReleaseDoesNotExist()
```

### event VersionCreated

Thrown if the same plugin setup exists in previous releases.

```solidity
event VersionCreated(uint8 release, uint16 build, address pluginSetup, bytes buildMetadata)
```

| Input | Type | Description |
| :-------------- | --------- | ----------------------------------------- |
| `release` | `uint8` | The release number. |
| `build` | `uint16` | The build number. |
| `pluginSetup` | `address` | The address of the plugin setup contract. |
| `buildMetadata` | `bytes` | The build metadata URI. |

### event ReleaseMetadataUpdated

Thrown when a release's metadata was updated.

```solidity
event ReleaseMetadataUpdated(uint8 release, bytes releaseMetadata)
```

| Input | Type | Description |
| :---------------- | ------- | ------------------------- |
| `release` | `uint8` | The release number. |
| `releaseMetadata` | `bytes` | The release metadata URI. |

### public function constructor

```solidity
Expand All @@ -193,6 +165,21 @@ function initialize(address initialOwner) external

_This method is required to support [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)._

### external function initializeFrom

Initializes the pluginRepo after an upgrade from a previous protocol version.

```solidity
function initializeFrom(uint8[3] _previousProtocolVersion, bytes _initData) external
```

| Input | Type | Description |
| :------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `_previousProtocolVersion` | `uint8[3]` | The semantic protocol version number of the previous DAO implementation contract this upgrade is transitioning from. |
| `_initData` | `bytes` | The initialization data to be passed to via `upgradeToAndCall` (see [ERC-1967](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Upgrade)). |

_This function is a placeholder until we require reinitialization._

### external function createVersion

Creates a new plugin version as the latest build for an existing release number or the first build for a new release number for the provided `PluginSetup` contract address and metadata.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ You can find all of the addresses of `PluginRepoFactory` contracts by network [h

To create more versions of your plugin in the future, you'll call on the [`createVersion` function](https://github.com/aragon/osx/blob/develop/packages/contracts/src/framework/plugin/repo/PluginRepo.sol#L128) from the `PluginRepo` instance of your plugin. When you publish your plugin, you'll be able to find the address of your plugin's `PluginRepo` instance within the transaction data.

### 3. Publishing subsequent builds

When publishing subsequent builds, you want to use the `createVersion` function in the `PluginRepo` contract ([check out the function's source code here](https://github.com/aragon/osx/blob/develop/packages/contracts/src/framework/plugin/repo/PluginRepo.sol#L132)).

To deploy your plugin, follow the steps in the [`osx-plugin-template-hardhat` README.md](https://github.com/aragon/osx-plugin-template-hardhat/blob/main/README.md#deployment).

0 comments on commit d612ed0

Please sign in to comment.