Skip to content

Commit 7c48725

Browse files
authored
fix: build and release metadata mixups (#507)
* fix: build and release metadata where swapped * fix: publish an empty JSON object to silence the EmptyReleaseMetadata error * docs: improve checklists
1 parent e90ea8f commit 7c48725

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

DEPLOYMENT_CHECKLIST.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ This checklist is seen as a guide to deploy the stack to a new chain.
2727
- [ ] 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`
2828
- [ ] Set the multisig members of the managing DAO as a comma (`,`) separated list to `MANAGINGDAO_MULTISIG_APPROVERS` in `.env`
2929
- [ ] Set the amount of minimum approvals the managing DAO needs to `MANAGINGDAO_MULTISIG_MINAPPROVALS` in `.env`
30+
- [ ] If new plugin builds are released
31+
- [ ] Double-check that the build- and release-metadata is published correctly by the deploy script and contracts
3032

3133
## Deployment
3234

UPDATE_CHECKLIST.md

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

2929
## Update

packages/contracts/deploy/helpers.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ export async function createVersion(
255255
const tx = await pluginRepo.createVersion(
256256
releaseNumber,
257257
pluginSetupContract,
258-
releaseMetadata,
259-
buildMetadata
258+
buildMetadata,
259+
releaseMetadata
260260
);
261261

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

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

324-
const emptyMetadata = ethers.utils.hexlify(ethers.utils.toUtf8Bytes(''));
324+
const emptyJsonObject = ethers.utils.hexlify(
325+
ethers.utils.toUtf8Bytes('{}')
326+
);
325327

326328
for (let i = 1; i < latestBuildNumber; i++) {
327329
await createVersion(
328330
hre.aragonPluginRepos[pluginRepoName],
329331
placeholderSetup,
330332
releaseNumber,
331-
emptyMetadata,
333+
emptyJsonObject,
332334
ethers.utils.hexlify(
333335
ethers.utils.toUtf8Bytes(`ipfs://${hre.placeholderBuildCIDPath}`)
334336
)

0 commit comments

Comments
 (0)