Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions packages/agw-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { createAbstractClient } from '@abstract-foundation/agw-client'

```tsx
import { createAbstractClient } from '@abstract-foundation/agw-client';
import { ChainEIP712, http } from 'viem';
import { http } from 'viem';
import { Account } from 'viem/accounts';
import { abstractTestnet } from 'viem/chains';

Expand Down Expand Up @@ -100,8 +100,9 @@ import { createAbstractClient } from '@abstract-foundation/agw-client';

```tsx
import { createAbstractClient } from '@abstract-foundation/agw-client';
import { ChainEIP712, http } from 'viem';
import { http } from 'viem';
import { Account } from 'viem/accounts';
import { getGeneralPaymasterInput } from 'viem/zksync';

(async () => {
// Create a signer account and chain configuration
Expand All @@ -123,7 +124,7 @@ import { Account } from 'viem/accounts';
to: '0xRecipientAddress',
value: 1000000000000000000n, // 1 ETH in wei
paymaster: '0xPaymasterAddress',
paymasterInput: '0x',
paymasterInput: getGeneralPaymasterInput({ innerInput: '0x' }),
});

console.log('Sponsored Transaction Hash:', txHash);
Expand All @@ -136,7 +137,7 @@ import { Account } from 'viem/accounts';

### Explanation of Paymaster Usage:

- **Paymaster**: The `paymaster` object is specified in the `sendTransaction` method, allowing the Paymaster contract to cover the gas fees for the transaction.
- **Paymaster**: The `paymaster` and `paymasterInput` fields are specified in the `sendTransaction` parameters, allowing the Paymaster contract to cover the gas fees for the transaction.
- **Sponsored Transaction**: The transaction fee is covered by the Paymaster, so the user’s balance is unaffected by gas costs.

## Documentation
Expand Down
Loading