truffle icon indicating copy to clipboard operation
truffle copied to clipboard

Deployment migration & `build` folder tracking

Open fermentfan opened this issue 2 years ago • 1 comments

I have a problem understanding the development lifecycle including network deployments with Truffle. We're currently looking at how to do this in general and have built a repository based on Truffle + Ganache including Typescript support. I like the migration feature especially because we're deploying a proxy contract and need to override the linked implementation contract in the proxy after deploying it. Now I was looking at how the whole migration flow works and it seems like Truffle reads out the contract JSON inside the build folder to get the address of the currently deployed migrations contract.

Reading multiple threads on the internet and looking at the data inside the JSON (absolute directory paths??) it looks like it's not intended to track this folder via GIT. But how does the migration stack then know about the currently deployed contracts?

edit: I found the following dependency that solves this issue by extracts the deployment state tracking to another file: https://medium.com/medxprotocol/continuous-deployment-with-truffle-c4dfd4fcfd96

fermentfan avatar Sep 06 '22 10:09 fermentfan

Hello, @DennisVonDerBey. Thank you for opening this. We want to also recommend checking out truffle networks https://trufflesuite.com/docs/truffle/reference/truffle-commands/#networks as an alternative to the methods mentioned in the article above.

As for the actual issue, we will discuss it with our team further for a way forward. stay tuned.

@gnidan what do you think?

lsqproduction avatar Sep 08 '22 17:09 lsqproduction