Skip to content

Commit

Permalink
fix(create-mud): run anvil in its own process (#2538)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored Apr 1, 2024
1 parent baf39ef commit 9e23976
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 23 deletions.
5 changes: 5 additions & 0 deletions .changeset/tender-jars-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-mud": patch
---

Templates now run anvil in its own process (via mprocs) for better visibility into anvil logs.
10 changes: 10 additions & 0 deletions examples/minimal/mprocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
procs:
client:
cwd: packages/client
shell: pnpm run dev
contracts:
cwd: packages/contracts
shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545
anvil:
cwd: packages/contracts
shell: anvil --base-fee 0
9 changes: 6 additions & 3 deletions examples/multiple-accounts/mprocs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
procs:
contracts:
cwd: packages/contracts
shell: pnpm run dev
client:
cwd: packages/client
shell: pnpm run dev
contracts:
cwd: packages/contracts
shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545
anvil:
cwd: packages/contracts
shell: anvil --base-fee 0
9 changes: 6 additions & 3 deletions templates/phaser/mprocs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
procs:
contracts:
cwd: packages/contracts
shell: pnpm run dev
client:
cwd: packages/client
shell: pnpm run dev
contracts:
cwd: packages/contracts
shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545
anvil:
cwd: packages/contracts
shell: anvil --base-fee 0
2 changes: 1 addition & 1 deletion templates/phaser/packages/contracts/worlds.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"31337": {
"address": "0x5FbDB2315678afecb367f032d93F642f64180aa3"
"address": "0x4f4ddafbc93cf8d11a253f21ddbcf836139efdec"
}
}
9 changes: 6 additions & 3 deletions templates/react-ecs/mprocs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
procs:
contracts:
cwd: packages/contracts
shell: pnpm run dev
client:
cwd: packages/client
shell: pnpm run dev
contracts:
cwd: packages/contracts
shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545
anvil:
cwd: packages/contracts
shell: anvil --base-fee 0
2 changes: 1 addition & 1 deletion templates/react-ecs/packages/contracts/worlds.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"31337": {
"address": "0x5FbDB2315678afecb367f032d93F642f64180aa3"
"address": "0x4f4ddafbc93cf8d11a253f21ddbcf836139efdec"
}
}
9 changes: 6 additions & 3 deletions templates/react/mprocs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
procs:
contracts:
cwd: packages/contracts
shell: pnpm run dev
client:
cwd: packages/client
shell: pnpm run dev
contracts:
cwd: packages/contracts
shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545
anvil:
cwd: packages/contracts
shell: anvil --base-fee 0
2 changes: 1 addition & 1 deletion templates/react/packages/contracts/worlds.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"31337": {
"address": "0x6e9474e9c83676b9a71133ff96db43e7aa0a4342"
"address": "0x4f4ddafbc93cf8d11a253f21ddbcf836139efdec"
}
}
9 changes: 6 additions & 3 deletions templates/threejs/mprocs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
procs:
contracts:
cwd: packages/contracts
shell: pnpm run dev
client:
cwd: packages/client
shell: pnpm run dev
contracts:
cwd: packages/contracts
shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545
anvil:
cwd: packages/contracts
shell: anvil --base-fee 0
2 changes: 1 addition & 1 deletion templates/threejs/packages/contracts/worlds.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"31337": {
"address": "0x5FbDB2315678afecb367f032d93F642f64180aa3"
"address": "0x4f4ddafbc93cf8d11a253f21ddbcf836139efdec"
}
}
9 changes: 6 additions & 3 deletions templates/vanilla/mprocs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
procs:
contracts:
cwd: packages/contracts
shell: pnpm run dev
client:
cwd: packages/client
shell: pnpm run dev
contracts:
cwd: packages/contracts
shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545
anvil:
cwd: packages/contracts
shell: anvil --base-fee 0
2 changes: 1 addition & 1 deletion templates/vanilla/packages/contracts/worlds.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"31337": {
"address": "0x5FbDB2315678afecb367f032d93F642f64180aa3"
"address": "0x4f4ddafbc93cf8d11a253f21ddbcf836139efdec"
}
}

0 comments on commit 9e23976

Please sign in to comment.