From 51c5225c83365be95777dae753d52f2540943884 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Mon, 25 Apr 2022 12:26:32 +0200 Subject: [PATCH] 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`. --- deploy/08_configure_keep_registry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/08_configure_keep_registry.ts b/deploy/08_configure_keep_registry.ts index 3f9ca045..c9a493ab 100644 --- a/deploy/08_configure_keep_registry.ts +++ b/deploy/08_configure_keep_registry.ts @@ -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 )