Skip to content

Commit

Permalink
Merge pull request #93 from threshold-network/fix-keep-registry-resol…
Browse files Browse the repository at this point in the history
…ve-2

Use deployer as a fallback to call approveOperatorContract

For ropsten we expect that approveOperatorContract will be called by the
account that is defined as keepRegistryKeeper in the hardhat config,
but for hardhat local network and for usage in external project it's
just fine to assume the deployer will be used as a fallback, so the
external project doesn't have to define keepRegistryKeeper.

This is a continuation of #92
  • Loading branch information
michalinacienciala authored Apr 25, 2022
2 parents 9176943 + 61e043f commit 9f41818
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deploy/08_configure_keep_registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { DeployFunction } from "hardhat-deploy/types"

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { getNamedAccounts, deployments } = hre
const { keepRegistryKeeper } = await getNamedAccounts()
const { keepRegistryKeeper, deployer } = await getNamedAccounts()
const { execute, log } = deployments

const TokenStaking = await deployments.get("TokenStaking")

await execute(
"KeepRegistry",
{ from: keepRegistryKeeper },
{ from: keepRegistryKeeper || deployer },
"approveOperatorContract",
TokenStaking.address
)
Expand Down

0 comments on commit 9f41818

Please sign in to comment.