1

I have a test file for testing an upgradable smart contract on zkSync by looking at the docs here. I'm getting a typescript error on this line

await hre.zkUpgrades.deployProxy(deployer.zkWallet, contract, [42]).then((r) => r.deployed()); 

error

Property 'zkUpgrades' does not exist on type 'HardhatRuntimeEnvironment'.ts(2339)

The code runs fine but how do I get rid of the typescript complaint.

1 Answer 1

1

The issue was with the hardhat.config.ts file. The HardhatUserConfig was imported before the upgradable plugin, but it should be imported after the plugin is imported.

Before

. . import { HardhatUserConfig } from "hardhat/types"; . import "@matterlabs/hardhat-zksync-upgradable"; . . . 

After

. . import "@matterlabs/hardhat-zksync-upgradable"; . import { HardhatUserConfig } from "hardhat/types"; . . . 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.