wighawag / hardhat-deploy

hardhat deployment plugin
MIT License
1.19k stars 292 forks source link

feature request: import external packages deployments into the setup #379

Open wei3erHase opened 1 year ago

wei3erHase commented 1 year ago

hre.companionNetworks[id].deployments is great to read the addresses of other chains to do a multi-chain setup. Similarly, when importing a hardhat package that includes the deployments/ directory, it'd be nice if Hardhat could read those deployments, and use as reference for abis and addresses, for example.

In this way, the developer saves the task of writing down long directory files, where the addresses of the protocol that is interacting with, on every chain that is interacting with. It would just import the latest deployments from the protocol's npm package, and know that hre.compaionPackages['weth','goerli'].deployments.execute('WETH9','deposit') should aim for the latest address on the requested chain.