Skip to content
Merged
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
7 changes: 4 additions & 3 deletions docs/docs/developers/guides/js_apps/pay_fees.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,19 @@ To use sponsored FPCs in other environments, they will need to be deployed and f
Creating the SponsoredFPC is as simple as importing it and passing it the PXE:

```ts
import { SponsoredFeePaymentMethod } from "@aztec/aztec.js";
import { SponsoredFeePaymentMethod } from "@aztec/aztec.js/fee/testing";
```

```ts
const paymentMethod = await SponsoredFeePaymentMethod.new(pxe);
const paymentMethod = new SponsoredFeePaymentMethod(deployedSponsoredFPC);
```

Then a transaction can specify this as the `paymentMethod` in the fee object.
You can see an example of how to get a deployed instance of the sponsored FPC in the sandbox [here](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/yarn-project/aztec/src/sandbox/sponsored_fpc.ts#L15).
For example, a contract can be deployed with an fpc as follows:

```ts
const paymentMethod = await SponsoredFeePaymentMethod.new(pxe);
const paymentMethod = new SponsoredFeePaymentMethod(deployedSponsoredFPC);
myAccountManager.deploy({ fee: { paymentMethod } });
```

Expand Down