Skip to content

Commit

Permalink
Merge pull request #1 from 0xartem/develop
Browse files Browse the repository at this point in the history
Update hyperboard deployment script
  • Loading branch information
Abhimanyu121 authored Oct 16, 2023
2 parents 433233d + 8670086 commit b79636b
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions contracts/tasks/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,24 @@ task("deploy-trader", "Deploy HypercertTrader and verify")
});

task("deploy-hyperboard", "Deploy Hyperboard and verify")
.addParam("hypercerts", "Hypercerts smart contract address")
.addParam("name", "Hyperboards NFT name", "Hyperboard")
.addParam("symbol", "Hyperboards NFT symbol", "HBRD")
.addParam("subgraph", "Subgraph endpoint")
.addParam("baseUri", "Base NFT metadata URI")
.addOptionalParam("output", "write the details of the deployment to this file if this is set")
.setAction(async ({ output }, { ethers, upgrades }) => {
const Hyperboard = await ethers.getContractFactory("Hyperboard");
const hyperboard = await upgrades.deployProxy(Hyperboard, {
kind: "uups",
unsafeAllow: ["constructor"],
});
.setAction(async ({ hypercerts, name, symbol, subgraph, baseUri, output }, { ethers, upgrades }) => {
const version = "1";
const hyperboard = await ethers.deployContract("Hyperboard", [
hypercerts,
name,
symbol,
subgraph,
baseUri,
version,
]);
const contract = await hyperboard.deployed();
console.log(`hyperboard is deployed to proxy address: ${hyperboard.address}`);
console.log(`hyperboard is deployed to address: ${hyperboard.address}`);

// If the `deploymentFile` option is set then write the deployed address to
// a json object on disk. This is intended to be deliberate with how we
Expand All @@ -126,6 +135,7 @@ task("deploy-hyperboard", "Deploy Hyperboard and verify")
}
await hre.run("verify:verify", {
address: hyperboard.address,
constructorArguments: [hypercerts, name, symbol, subgraph, baseUri, version],
});
} catch ({ message }) {
if ((message as string).includes("Reason: Already Verified")) {
Expand Down

0 comments on commit b79636b

Please sign in to comment.