From c07e5c1e41dde665647947c56281e1a40777d1ec Mon Sep 17 00:00:00 2001 From: Monil Patel Date: Tue, 4 Feb 2025 18:31:15 -0800 Subject: [PATCH] incorporate pending transactions into nonce check --- packages/plugin-0x/src/actions/swap.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/plugin-0x/src/actions/swap.ts b/packages/plugin-0x/src/actions/swap.ts index 379f380182e..266fb99ef6d 100644 --- a/packages/plugin-0x/src/actions/swap.ts +++ b/packages/plugin-0x/src/actions/swap.ts @@ -230,6 +230,7 @@ export const tokenSwap = async (runtime: IAgentRuntime, quantity: number, fromCu const nonce = await client.getTransactionCount({ address: (client.account as { address: `0x${string}` }).address, + blockTag: "pending" }); elizaLogger.info("nonce ", nonce) const txHash = await client.sendTransaction({