From 16b13ea8fc5e7f63ce08bc6baa2087cab9c8089f Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Tue, 3 Oct 2023 15:53:04 +0100 Subject: [PATCH] fix(common): workaround for zero base fee (#1689) --- .changeset/chilly-kangaroos-clap.md | 5 +++++ packages/common/src/chains/mudFoundry.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/chilly-kangaroos-clap.md diff --git a/.changeset/chilly-kangaroos-clap.md b/.changeset/chilly-kangaroos-clap.md new file mode 100644 index 0000000000..0d98706e68 --- /dev/null +++ b/.changeset/chilly-kangaroos-clap.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/common": patch +--- + +Adds viem workaround for zero base fee used by MUD's anvil config diff --git a/packages/common/src/chains/mudFoundry.ts b/packages/common/src/chains/mudFoundry.ts index 1754534d8d..29705d4684 100644 --- a/packages/common/src/chains/mudFoundry.ts +++ b/packages/common/src/chains/mudFoundry.ts @@ -4,6 +4,7 @@ import { MUDChain } from "./types"; export const mudFoundry = { ...foundry, fees: { - defaultPriorityFee: 0n, + // This is intentionally defined as a function as a workaround for https://github.com/wagmi-dev/viem/pull/1280 + defaultPriorityFee: () => 0n, }, } as const satisfies MUDChain;