Skip to content

Commit

Permalink
First deployment of the new contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
emmdim committed Nov 7, 2023
1 parent c4c2573 commit f40532f
Show file tree
Hide file tree
Showing 8 changed files with 1,392 additions and 24 deletions.
8 changes: 3 additions & 5 deletions packages/contracts/deploy/02_setup/12_publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
// Upload the metadata to IPFS
const releaseMetadataURI = `ipfs://${await uploadToIPFS(
JSON.stringify(METADATA.release),
false
)}`;
const buildMetadataURI = `ipfs://${await uploadToIPFS(
JSON.stringify(METADATA.build),
false
)}`;

console.log(`Uploaded release metadata: ${releaseMetadataURI}`);
Expand All @@ -46,7 +44,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const latestRelease = await pluginRepo.latestRelease();
if (VERSION.release > latestRelease + 1) {
throw Error(
`Publishing with release number ${VERSION.release} is not possible.
`Publishing with release number ${VERSION.release} is not possible.
The latest release is ${latestRelease} and the next release you can publish is release number ${
latestRelease + 1
}.`
Expand All @@ -57,13 +55,13 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const latestBuild = (await pluginRepo.buildCount(VERSION.release)).toNumber();
if (VERSION.build <= latestBuild) {
throw Error(
`Publishing with build number ${VERSION.build} is not possible.
`Publishing with build number ${VERSION.build} is not possible.
The latest build is ${latestBuild} and build ${VERSION.build} has been deployed already.`
);
}
if (VERSION.build > latestBuild + 1) {
throw Error(
`Publishing with build number ${VERSION.build} is not possible.
`Publishing with build number ${VERSION.build} is not possible.
The latest build is ${latestBuild} and the next release you can publish is release number ${
latestBuild + 1
}.`
Expand Down
Loading

0 comments on commit f40532f

Please sign in to comment.