From ab10b51fde22ebc95d0142a44fc6e6932fa9de82 Mon Sep 17 00:00:00 2001 From: meelon-dev <0xmeel0n@gmail.com> Date: Mon, 23 Mar 2026 10:18:23 +0100 Subject: [PATCH] Fix README example: define missing chain and signer in paymaster section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR fixes a broken example in the “Sponsored Transactions via Paymasters” section of the README. Problem The example was using chain (and implicitly signer) without defining them, which made the snippet fail when copied as-is. Changes Added missing imports: abstractTestnet from viem/chains Account from viem/accounts Declared required variables: const chain = abstractTestnet const signer: Account = { ... } Updated createAbstractClient usage to reference the defined variables Result The example is now: Consistent with the Quick Start section Self-contained and clearer to understand Less error-prone when copied by users --- packages/agw-client/README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/agw-client/README.md b/packages/agw-client/README.md index 39f682c..8302b7f 100644 --- a/packages/agw-client/README.md +++ b/packages/agw-client/README.md @@ -60,11 +60,20 @@ Asynchronously creates an `AbstractClient` instance, extending the standard `Cli ```tsx import { createAbstractClient } from '@abstract-foundation/agw-client'; +import { abstractTestnet } from 'viem/chains'; +import { Account } from 'viem/accounts'; + +const signer: Account = { + address: '0xYourSignerAddress', + // ...other account properties +}; + +const chain = abstractTestnet; (async () => { const abstractClient = await createAbstractClient({ - signer: /* your signer account */, - chain: /* your chain configuration */, + signer, + chain, }); // Use abstractClient to interact with the blockchain