From 1e6d56dc1c353796c92c2a77a50e3febda25773c Mon Sep 17 00:00:00 2001 From: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com> Date: Wed, 20 Dec 2023 10:17:08 +0100 Subject: [PATCH] fix: metadata mixup fix for `develop` (#512) * fix(subgraph): update to @graphprotocol/graph-cli@0.52.0 (#453) * fix: missing virtual keyword (#452) * fix: added missing virtual keywords. * fix: correct misspelled filename * docs: improved NatSpec * chore: bump package versions * Update packages/contracts/CHANGELOG.md Co-authored-by: Mathias Scherer --------- Co-authored-by: Mathias Scherer * Deploy contracts and subgraph to sepolia (#475) * feat: deploy v1.3.0-rc0 to sepolia * feat: bump subgraph version to v1.3.0-rc0 feat: deploy sepolia subgraph * fix(OS-638): fixes typo in implementation * chore: fix formatting in helpers script * fix: ipfs returned an empty string (#485) (#495) * chore: deploy 1.3.0-rc0 to arbitrum and arbitrumGoerli (#496) * chore: prepared arbitrum deployment * chore: deployed v1.3.0 to arbitrumGoerli * docs: improved checklist * chore: deployed v1.3.0 to arbitrum * chore: deployed v1.3.0-rc0.4 npm packages * chore: added manifests for arbitrum and arbitrumGoerli * docs: improved deployment checklist * docs: improved deployment checklist * docs: fix typo Co-authored-by: Mathias Scherer --------- Co-authored-by: Mathias Scherer * fix: build and release metadata where swapped * fix: publish an empty JSON object to silence the EmptyReleaseMetadata error * docs: improve checklists --------- Co-authored-by: Mathias Scherer --- DEPLOYMENT_CHECKLIST.md | 2 ++ UPDATE_CHECKLIST.md | 2 +- packages/contracts/deploy/helpers.ts | 10 ++++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/DEPLOYMENT_CHECKLIST.md b/DEPLOYMENT_CHECKLIST.md index df34fde98..def26e8fb 100644 --- a/DEPLOYMENT_CHECKLIST.md +++ b/DEPLOYMENT_CHECKLIST.md @@ -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 diff --git a/UPDATE_CHECKLIST.md b/UPDATE_CHECKLIST.md index 2b3c976f6..58af79d40 100644 --- a/UPDATE_CHECKLIST.md +++ b/UPDATE_CHECKLIST.md @@ -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 diff --git a/packages/contracts/deploy/helpers.ts b/packages/contracts/deploy/helpers.ts index 1a810986e..aef58b969 100644 --- a/packages/contracts/deploy/helpers.ts +++ b/packages/contracts/deploy/helpers.ts @@ -254,8 +254,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}`); @@ -320,14 +320,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}`) )