Skip to content

Commit

Permalink
docs: add example showing how to sponsor gas on aa chains
Browse files Browse the repository at this point in the history
  • Loading branch information
moldy530 committed Sep 6, 2024
1 parent c814690 commit 687c254
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions site/pages/third-party/chains.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
zora,
alchemyFeeEstimator,
type ClientWithAlchemyMethods,
alchemyGasManagerMiddleware,
} from "@account-kit/infra";
import { split, LocalAccountSigner, createBundlerClient } from "@aa-sdk/core";
import { http, custom } from "viem";
Expand Down Expand Up @@ -53,6 +54,8 @@ const smartAccountClient = createLightAccountClient({
chain: zora,
feeEstimator: alchemyFeeEstimator(alchemyBundlerClient),
signer: LocalAccountSigner.generatePrivateKeySigner(),
// if you want to sponsor gas add this
...alchemyGasManagerMiddleware("YOUR_POLICY_ID"),
});
```

Expand Down

0 comments on commit 687c254

Please sign in to comment.