Skip to content

Fix README example: define missing chain and signer in paymaster section#418

Open
meelon-dev wants to merge 1 commit intoAbstract-Foundation:mainfrom
meelon-dev:meelon-dev-patch-1
Open

Fix README example: define missing chain and signer in paymaster section#418
meelon-dev wants to merge 1 commit intoAbstract-Foundation:mainfrom
meelon-dev:meelon-dev-patch-1

Conversation

@meelon-dev
Copy link
Copy Markdown

@meelon-dev meelon-dev commented Mar 23, 2026

This PR fixes the example in the "API Reference" section of the README file.

In the “Quick Start” section example, the signer and chain variables are imported and used, which provides a convenient user experience. The "API Reference" section uses different logic:

const abstractClient = await createAbstractClient({
   signer: /* your signer account */,
   chain: /* your chain configuration */,
// ...

Based on the example from “Quick Start,” I implemented the same logic in "API Reference":
Added imports:

  • abstractTestnet from viem/chains
  • Account from viem/accounts

Declared the necessary variables:

  • const chain = abstractTestnet
  • const signer: Account = { ... }

Updated the use of createAbstractClient to reference the defined variables.


PR-Codex overview

This PR updates the README.md file in the agw-client package to include specific configurations for the signer and chain when creating an abstractClient, enhancing clarity for users on how to set up their client.

Detailed summary

  • Added import for abstractTestnet from viem/chains.
  • Added import for Account from viem/accounts.
  • Defined a signer object with an address property.
  • Set the chain variable to abstractTestnet.
  • Updated the createAbstractClient call to use the defined signer and chain variables.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

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
@cursor
Copy link
Copy Markdown

cursor bot commented Mar 23, 2026

PR Summary

Low Risk
Documentation-only change that clarifies the createAbstractClient example; no runtime code paths are affected.

Overview
Updates the createAbstractClient example in packages/agw-client/README.md to be copy-pastable by adding missing viem imports and explicitly defining signer and chain (using abstractTestnet) before calling createAbstractClient.

Written by Cursor Bugbot for commit ab10b51. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 23, 2026

⚠️ No Changeset found

Latest commit: ab10b51

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant