wighawag / hardhat-deploy

hardhat deployment plugin
MIT License
1.2k stars 296 forks source link

--fork-deployments removed without proper documentation #155

Closed heri16 closed 3 years ago

heri16 commented 3 years ago

What is the replacement for:

npx hardhat node --hostname 0.0.0.0 --fork-deployments mumbai --as-network localhost --watch"

I don't quite understand this commit. to get it working again:

https://github.com/wighawag/hardhat-deploy/commit/8f1fbab9a39f2bcc8c64dc3943137c46f81743bc

heri16 commented 3 years ago

@wighawag Any help?

heri16 commented 3 years ago

There is also a change in behaviour.

Previously when npx hardhat node with config:

const config: HardhatUserConfig = {
  hardhat: {
      tags: ['test', 'local'],
      chainId: 80001,
      forking: {
        url: `https://speedy-nodes-nyc.moralis.io/${SPEEDY_NODES_API_KEY}/polygon/mumbai/archive`,
        blockNumber: 16260000, // See: https://mumbai.polygonscan.com/block/16260000
      },
    },
    localhost: {
      tags: ['local'],
    },
};

hre.network.tags.local will be set in deploy scripts.

The new behaviour is that it will not be set.

wighawag commented 3 years ago

Hi @heri16 thanks for the report, the reason for the change was that it was hard to maintain the previous mechanism and that modifying the network name raised potential issue with other plugins. The proper solution should be handled in hardhat in my opinion, see https://github.com/nomiclabs/hardhat/issues/1164

Re tags, I ll see what I can do, maybe I need to reinstantiate the equivalent of the previous cmd options

wighawag commented 3 years ago

Closing this and I created a new issue for the tags issue here : https://github.com/wighawag/hardhat-deploy/issues/202