Skip to content

Commit

Permalink
fix: build and release metadata mixups (#507)
Browse files Browse the repository at this point in the history
* fix: build and release metadata where swapped

* fix: publish an empty JSON object to silence the EmptyReleaseMetadata error

* docs: improve checklists
  • Loading branch information
heueristik authored Dec 13, 2023
1 parent e90ea8f commit 7c48725
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions DEPLOYMENT_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ This checklist is seen as a guide to deploy the stack to a new chain.
- [ ] Set the subdomain to be used of the managing DAO to `MANAGINGDAO_SUBDOMAIN` in `.env`. If you want to use `management.dao.eth` put only `management`
- [ ] Set the multisig members of the managing DAO as a comma (`,`) separated list to `MANAGINGDAO_MULTISIG_APPROVERS` in `.env`
- [ ] Set the amount of minimum approvals the managing DAO needs to `MANAGINGDAO_MULTISIG_MINAPPROVALS` in `.env`
- [ ] If new plugin builds are released
- [ ] Double-check that the build- and release-metadata is published correctly by the deploy script and contracts

## Deployment

Expand Down
2 changes: 1 addition & 1 deletion UPDATE_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This checklist is seen as a guide to update the existing deployment.
- [ ] Copy the managing DAO multisig env variables from `packages/contracts/.env-example` into `packages/contracts/.env`
- [ ] Follow the version specific tasks in the section `Version tasks`
- [ ] If new plugin builds are released
- [ ] Double-check that the build-metadata was updated correctly for the UI to work correctly
- [ ] Double-check that the build- and release-metadata is published and updated correctly by the deploy script and contracts
- [ ] If the plugin is used by the managing DAO and the new build includes security relevant changes it must be applied immediately

## Update
Expand Down
10 changes: 6 additions & 4 deletions packages/contracts/deploy/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ export async function createVersion(
const tx = await pluginRepo.createVersion(
releaseNumber,
pluginSetupContract,
releaseMetadata,
buildMetadata
buildMetadata,
releaseMetadata
);

console.log(`Creating build for release ${releaseNumber} with tx ${tx.hash}`);
Expand Down Expand Up @@ -321,14 +321,16 @@ export async function populatePluginRepo(

const placeholderSetup = await getContractAddress('PlaceholderSetup', hre);

const emptyMetadata = ethers.utils.hexlify(ethers.utils.toUtf8Bytes(''));
const emptyJsonObject = ethers.utils.hexlify(
ethers.utils.toUtf8Bytes('{}')
);

for (let i = 1; i < latestBuildNumber; i++) {
await createVersion(
hre.aragonPluginRepos[pluginRepoName],
placeholderSetup,
releaseNumber,
emptyMetadata,
emptyJsonObject,
ethers.utils.hexlify(
ethers.utils.toUtf8Bytes(`ipfs://${hre.placeholderBuildCIDPath}`)
)
Expand Down

0 comments on commit 7c48725

Please sign in to comment.