0xAtum / template-foundry-project

Template with only Foundry Framework for solidity projects
MIT License
1 stars 1 forks source link

chore task: Use Broadcast's latest-run to save locally the contract addresses #17

Open 0xAtum opened 1 month ago

0xAtum commented 1 month ago

Right now, I'm using the deterministic's address, but sometimes, the deployment might revert causing the system to save a non-existent contract.

Now that I changed the system to read the blockchain's id; We can easily get the latest-run and use the successful deployed address to save into the project.

0xAtum commented 1 week ago

I still haven't got the time to look into this, but real-quick, if we read through latest-run, we won't have any identification of the deployed contract, unless we complicate ourselves even more.

So either, we skip the simulation --skip-simulation on deployment which I do not recommend or there is a way to see if it's a simulation deployment from forge.

I'll need to check the codebase.