Skip to content

Commit

Permalink
fix(faucet): use MUD's sendTransaction for better nonce handling (#2080)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Ingersoll <kingersoll@gmail.com>
  • Loading branch information
R-Morpheus and holic authored Jan 2, 2024
1 parent eb384bb commit 9082c17
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tiny-lions-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/faucet": patch
---

Updated to use MUD's `sendTransaction`, which does a better of managing nonces for higher volumes of transactions.
1 change: 1 addition & 0 deletions packages/faucet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"dependencies": {
"@fastify/compress": "^6.5.0",
"@fastify/cors": "^8.3.0",
"@latticexyz/common": "workspace:*",
"@trpc/client": "10.34.0",
"@trpc/server": "10.34.0",
"debug": "^4.3.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/faucet/src/createAppRouter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z } from "zod";
import { initTRPC } from "@trpc/server";
import { Client, Hex, LocalAccount, formatEther, isHex } from "viem";
import { sendTransaction } from "viem/actions";
import { sendTransaction } from "@latticexyz/common";
import { debug } from "./debug";

export type AppContext = {
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9082c17

Please sign in to comment.