From 6403ed2eeffbc2f02b91246fec0b51fb6cd414a0 Mon Sep 17 00:00:00 2001 From: sam-goldman <106038229+sam-goldman@users.noreply.github.com> Date: Tue, 19 Jul 2022 14:48:40 -0700 Subject: [PATCH] feat(deploy): add hh deploy script for registry (#6) * feat: merged chugsplash manager into registry * fix(merge): allow multiple proposed bundles per project * feat(deploy): add hh deploy script for registry --- .changeset/clever-fishes-accept.md | 5 +++++ .../deploy/000-ChugSplashRegistry.ts | 22 +++++++++++++++++++ packages/contracts/hardhat.config.ts | 5 +++++ 3 files changed, 32 insertions(+) create mode 100644 .changeset/clever-fishes-accept.md create mode 100644 packages/contracts/deploy/000-ChugSplashRegistry.ts diff --git a/.changeset/clever-fishes-accept.md b/.changeset/clever-fishes-accept.md new file mode 100644 index 000000000..b75e267bd --- /dev/null +++ b/.changeset/clever-fishes-accept.md @@ -0,0 +1,5 @@ +--- +'@chugsplash/contracts': patch +--- + +Add hardhat-deploy script for ChugSplashRegistry diff --git a/packages/contracts/deploy/000-ChugSplashRegistry.ts b/packages/contracts/deploy/000-ChugSplashRegistry.ts new file mode 100644 index 000000000..6fbfef44a --- /dev/null +++ b/packages/contracts/deploy/000-ChugSplashRegistry.ts @@ -0,0 +1,22 @@ +/* Imports: External */ +import { DeployFunction } from 'hardhat-deploy/dist/types' + +const deployFn: DeployFunction = async (hre) => { + const { deployer } = await hre.getNamedAccounts() + + const { deploy } = await hre.deployments.deterministic('ChugSplashRegistry', { + salt: hre.ethers.utils.solidityKeccak256( + ['string'], + ['ChugSplashRegistry'] + ), + from: deployer, + args: [], + log: true, + }) + + await deploy() +} + +deployFn.tags = ['ChugSplashRegistry'] + +export default deployFn diff --git a/packages/contracts/hardhat.config.ts b/packages/contracts/hardhat.config.ts index 337960f0a..9147f7c2d 100644 --- a/packages/contracts/hardhat.config.ts +++ b/packages/contracts/hardhat.config.ts @@ -78,6 +78,11 @@ const config: HardhatUserConfig = { }, }, }, + namedAccounts: { + deployer: { + default: 0, + }, + }, } export default config