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.
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 thedeployments/
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.