From 0ce4fedf5240ae489d7e40135a42a06cc4bc9e4b Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Wed, 10 Apr 2024 11:21:34 -0500 Subject: [PATCH 1/9] feat(template/*): change `anvil` to create a block every two seconds - Better simulate the production environment - The indexer works better with this --- templates/phaser/mprocs.yaml | 2 +- templates/react-ecs/mprocs.yaml | 3 ++- templates/react/mprocs.yaml | 3 ++- templates/threejs/mprocs.yaml | 3 ++- templates/vanilla/mprocs.yaml | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/templates/phaser/mprocs.yaml b/templates/phaser/mprocs.yaml index f01b91a0a9..17df3bb9ab 100644 --- a/templates/phaser/mprocs.yaml +++ b/templates/phaser/mprocs.yaml @@ -7,4 +7,4 @@ procs: shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545 anvil: cwd: packages/contracts - shell: anvil --base-fee 0 + shell: anvil --base-fee 0 -b 2 diff --git a/templates/react-ecs/mprocs.yaml b/templates/react-ecs/mprocs.yaml index f01b91a0a9..2845542902 100644 --- a/templates/react-ecs/mprocs.yaml +++ b/templates/react-ecs/mprocs.yaml @@ -7,4 +7,5 @@ procs: shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545 anvil: cwd: packages/contracts - shell: anvil --base-fee 0 + shell: anvil --base-fee 0 -b 2 + diff --git a/templates/react/mprocs.yaml b/templates/react/mprocs.yaml index f01b91a0a9..2845542902 100644 --- a/templates/react/mprocs.yaml +++ b/templates/react/mprocs.yaml @@ -7,4 +7,5 @@ procs: shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545 anvil: cwd: packages/contracts - shell: anvil --base-fee 0 + shell: anvil --base-fee 0 -b 2 + diff --git a/templates/threejs/mprocs.yaml b/templates/threejs/mprocs.yaml index f01b91a0a9..2845542902 100644 --- a/templates/threejs/mprocs.yaml +++ b/templates/threejs/mprocs.yaml @@ -7,4 +7,5 @@ procs: shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545 anvil: cwd: packages/contracts - shell: anvil --base-fee 0 + shell: anvil --base-fee 0 -b 2 + diff --git a/templates/vanilla/mprocs.yaml b/templates/vanilla/mprocs.yaml index f01b91a0a9..2845542902 100644 --- a/templates/vanilla/mprocs.yaml +++ b/templates/vanilla/mprocs.yaml @@ -7,4 +7,5 @@ procs: shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545 anvil: cwd: packages/contracts - shell: anvil --base-fee 0 + shell: anvil --base-fee 0 -b 2 + From 94823d6e56052a14c4002680165f348a34d9762b Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Thu, 11 Apr 2024 09:53:04 +0300 Subject: [PATCH 2/9] Update templates/phaser/mprocs.yaml Co-authored-by: Kevin Ingersoll --- templates/phaser/mprocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/phaser/mprocs.yaml b/templates/phaser/mprocs.yaml index 17df3bb9ab..3f9ca198e3 100644 --- a/templates/phaser/mprocs.yaml +++ b/templates/phaser/mprocs.yaml @@ -7,4 +7,4 @@ procs: shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545 anvil: cwd: packages/contracts - shell: anvil --base-fee 0 -b 2 + shell: anvil --base-fee 0 --block-time 2 From 05c1ba6b38e5d3fbb3f7f2c4344e10d44c3343a1 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Thu, 11 Apr 2024 18:58:07 +0300 Subject: [PATCH 3/9] Fix all `mprocs.yaml` files --- examples/minimal/mprocs.yaml | 2 +- examples/multiple-accounts/mprocs.yaml | 2 +- templates/react-ecs/mprocs.yaml | 3 ++- templates/react/mprocs.yaml | 2 +- templates/threejs/mprocs.yaml | 2 +- templates/vanilla/mprocs.yaml | 3 ++- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/minimal/mprocs.yaml b/examples/minimal/mprocs.yaml index f01b91a0a9..3f9ca198e3 100644 --- a/examples/minimal/mprocs.yaml +++ b/examples/minimal/mprocs.yaml @@ -7,4 +7,4 @@ procs: shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545 anvil: cwd: packages/contracts - shell: anvil --base-fee 0 + shell: anvil --base-fee 0 --block-time 2 diff --git a/examples/multiple-accounts/mprocs.yaml b/examples/multiple-accounts/mprocs.yaml index f01b91a0a9..3f9ca198e3 100644 --- a/examples/multiple-accounts/mprocs.yaml +++ b/examples/multiple-accounts/mprocs.yaml @@ -7,4 +7,4 @@ procs: shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545 anvil: cwd: packages/contracts - shell: anvil --base-fee 0 + shell: anvil --base-fee 0 --block-time 2 diff --git a/templates/react-ecs/mprocs.yaml b/templates/react-ecs/mprocs.yaml index 2845542902..b07e47d6ef 100644 --- a/templates/react-ecs/mprocs.yaml +++ b/templates/react-ecs/mprocs.yaml @@ -7,5 +7,6 @@ procs: shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545 anvil: cwd: packages/contracts - shell: anvil --base-fee 0 -b 2 + shell: anvil --base-fee 0 --block-time 2 + diff --git a/templates/react/mprocs.yaml b/templates/react/mprocs.yaml index 2845542902..7568328560 100644 --- a/templates/react/mprocs.yaml +++ b/templates/react/mprocs.yaml @@ -7,5 +7,5 @@ procs: shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545 anvil: cwd: packages/contracts - shell: anvil --base-fee 0 -b 2 + shell: anvil --base-fee 0 --block-time 2 diff --git a/templates/threejs/mprocs.yaml b/templates/threejs/mprocs.yaml index 2845542902..7568328560 100644 --- a/templates/threejs/mprocs.yaml +++ b/templates/threejs/mprocs.yaml @@ -7,5 +7,5 @@ procs: shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545 anvil: cwd: packages/contracts - shell: anvil --base-fee 0 -b 2 + shell: anvil --base-fee 0 --block-time 2 diff --git a/templates/vanilla/mprocs.yaml b/templates/vanilla/mprocs.yaml index 2845542902..b07e47d6ef 100644 --- a/templates/vanilla/mprocs.yaml +++ b/templates/vanilla/mprocs.yaml @@ -7,5 +7,6 @@ procs: shell: pnpm mud dev-contracts --rpc http://127.0.0.1:8545 anvil: cwd: packages/contracts - shell: anvil --base-fee 0 -b 2 + shell: anvil --base-fee 0 --block-time 2 + From dd69e6e096fd273f49cd3ace9c33f7dc4ce898a4 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Thu, 11 Apr 2024 19:01:26 +0300 Subject: [PATCH 4/9] Update mprocs.yaml --- templates/react-ecs/mprocs.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/react-ecs/mprocs.yaml b/templates/react-ecs/mprocs.yaml index b07e47d6ef..3f9ca198e3 100644 --- a/templates/react-ecs/mprocs.yaml +++ b/templates/react-ecs/mprocs.yaml @@ -8,5 +8,3 @@ procs: anvil: cwd: packages/contracts shell: anvil --base-fee 0 --block-time 2 - - From f0ab1a3c03c94485a3221409bcf5f173fcf89725 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Thu, 11 Apr 2024 19:04:22 +0300 Subject: [PATCH 5/9] Update mprocs.yaml --- templates/react/mprocs.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/react/mprocs.yaml b/templates/react/mprocs.yaml index 7568328560..3f9ca198e3 100644 --- a/templates/react/mprocs.yaml +++ b/templates/react/mprocs.yaml @@ -8,4 +8,3 @@ procs: anvil: cwd: packages/contracts shell: anvil --base-fee 0 --block-time 2 - From 989838d24240d42162885f1a3dcd4d5da1f2f996 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Thu, 11 Apr 2024 19:04:50 +0300 Subject: [PATCH 6/9] Update mprocs.yaml --- templates/threejs/mprocs.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/threejs/mprocs.yaml b/templates/threejs/mprocs.yaml index 7568328560..3f9ca198e3 100644 --- a/templates/threejs/mprocs.yaml +++ b/templates/threejs/mprocs.yaml @@ -8,4 +8,3 @@ procs: anvil: cwd: packages/contracts shell: anvil --base-fee 0 --block-time 2 - From 770a9c4f71b4f48b327bdf2e555f1207316b2c72 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Thu, 11 Apr 2024 19:05:25 +0300 Subject: [PATCH 7/9] Update mprocs.yaml --- templates/vanilla/mprocs.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/vanilla/mprocs.yaml b/templates/vanilla/mprocs.yaml index b07e47d6ef..3f9ca198e3 100644 --- a/templates/vanilla/mprocs.yaml +++ b/templates/vanilla/mprocs.yaml @@ -8,5 +8,3 @@ procs: anvil: cwd: packages/contracts shell: anvil --base-fee 0 --block-time 2 - - From 28dda58a5dae5ac04a9bd8ca11bf44d360414fa6 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Thu, 11 Apr 2024 19:22:38 +0300 Subject: [PATCH 8/9] changeset --- .changeset/polite-dots-tell.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/polite-dots-tell.md diff --git a/.changeset/polite-dots-tell.md b/.changeset/polite-dots-tell.md new file mode 100644 index 0000000000..0945b36cb1 --- /dev/null +++ b/.changeset/polite-dots-tell.md @@ -0,0 +1,5 @@ +--- +"create-mud": patch +--- + +feat(create-mud): change `anvil` to create a block every two seconds From 77919bfd4f6b8d1ee523ad4c72a700c92170c6be Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Thu, 11 Apr 2024 23:31:52 -0700 Subject: [PATCH 9/9] Update .changeset/polite-dots-tell.md --- .changeset/polite-dots-tell.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/polite-dots-tell.md b/.changeset/polite-dots-tell.md index 0945b36cb1..7c9c21a5a4 100644 --- a/.changeset/polite-dots-tell.md +++ b/.changeset/polite-dots-tell.md @@ -2,4 +2,4 @@ "create-mud": patch --- -feat(create-mud): change `anvil` to create a block every two seconds +Updated `anvil` args with two second block time to better reflect L2s