Open holic opened 1 year ago
+1. I've observed several folks building full-stack apps using Foundry (usually in a monorepo), and the experience has some rough edges.
Without any additional tooling, the most common workflow seems to be:
forge script
command to deploy the contracts, e.g. forge script script/01_Deploy.s.sol:Deploy --rpc-url http://127.0.0.1:8545 --broadcast
forge script
command to add some test/seed dataHaven't given it much thought, but perhaps Foundry could support a forge dev
command which:
src/
, script/
, maybe test/
)This way, you can just save changes to Foundry project files and your downstream services should "just work".
One remaining question (important for Ponder, maybe less important for MUD) is some mechanism for the Anvil node to announce that a reload has occurred, so that downstream services know to invalidate any data that was previously fetched from this RPC URL.
See also @wagmi/cli which solves some related problems in this domain.
Chatted with @0xOlias about the need for a generic way to watch Solidity contracts and run some redeploy script/command.
Might be nice to separate our deploy pipeline into a more generic package that has hooks, and then build the MUD-specific stuff on top of it.