Skip to content

Commit

Permalink
refactor(Contracts): extract chainID check to isHardHatNode function
Browse files Browse the repository at this point in the history
  • Loading branch information
maurelian committed Nov 9, 2021
1 parent f7fa5a9 commit c55c4cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-buttons-think.md
@@ -0,0 +1,5 @@
---
'@eth-optimism/contracts': patch
---

Run etherscan verification after each contract is deployed.
2 changes: 1 addition & 1 deletion packages/contracts/deploy/011-set-addresses.ts
Expand Up @@ -76,7 +76,7 @@ const deployFn: DeployFunction = async (hre) => {

// Check if if we're on the hardhat chain ID. This will only happen in CI. If this is the case, we
// can skip directly to transferring ownership over to the ChugSplashDictator contract.
if (isHardhatNode(hre)) {
if (await isHardhatNode(hre)) {
const owner = await hre.ethers.getSigner(currentOwner)
await Lib_AddressManager.connect(owner).transferOwnership(
AddressDictator.address
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/deploy/016-fund-accounts.ts
Expand Up @@ -15,7 +15,7 @@ import {
// details of how to make that work cleanly. This is fine in the meantime.
const deployFn: DeployFunction = async (hre) => {
// Only execute this step if we're on the hardhat chain ID.
if (isHardhatNode(hre)) {
if (await isHardhatNode(hre)) {
const L1StandardBridge = await getContractFromArtifact(
hre,
'Proxy__OVM_L1StandardBridge',
Expand Down

0 comments on commit c55c4cb

Please sign in to comment.