-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Current Behavior
Currently the deployments folder in hardhat has been gitignored leading to all the data related to deployments being stored only on local computer.
The deployedContracts file in nextjs is being generated based on this deployments folder whenever a new deployment takes place.
Consider a scenario where you deployed the smart contract on polygon from your machine which updated the deployedContracts file with its address, abi etc. You committed and pushed all the changes to github. Now someone else working on the same project pulled the changes and deployed the contract on arbitrum, what happens is the deployedContracts file gets updated with the deployement data of only arbitrum and looses the data from polygon since the second person doesn't have the deployements folder containing data related to deployment on polygon chain on their computer.
Expected Behavior
The expected behavior would be when the second person deploys the contract on arbitrum the deployedContracts file should be updated by appending the data related to arbitrum deployment and not loosing any previously existing deployment data related to other chains
Anything else?
Removing the deployments folder in hardhat from gitignore solves this issue of inconsistency. I am not sure on why it was added but I am currently unable to see any reason for its existence if there is some please do enlighten me.