Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions content/wallets/pages/transactions/sponsor-gas/solana/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ TRANSFER_0_LAMPORT_DATA=0x020000000000000000000000
<Step title="Prepare calls with sponsorship">

Attach `capabilities.paymasterService.policyId` to apply your Solana sponsorship
policy. Add `prefundRent: true` to opt in to CPI rent prefunding, and
`webhookData` to pass extra context to custom rules.
policy. Add `prefundRent: true` to opt in to [CPI rent prefunding](/docs/wallets/transactions/solana/sponsor-gas#cpi-rent-prefunding),
and `webhookData` to pass extra context to custom rules.

```bash twoslash
PREPARE_CALLS_RESPONSE=$(jq -n \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Use Solana sponsorship to cover transaction fees and rent for Solana calls submi

Top-level rent sponsorship applies automatically when a sponsored transaction includes top-level `SystemProgram.createAccount` or Associated Token Program `Create` / `CreateIdempotent` instructions. No extra request parameter is required for those top-level instructions.

For accounts created inside a cross-program invocation (CPI), opt in per request with `prefundRent: true`. This asks the service to simulate the transaction, estimate the CPI rent requirement, and prefund the user's wallet before the transaction is submitted.
For accounts created inside a cross-program invocation (CPI), opt in per request with `prefundRent: true`. This asks the service to simulate the transaction, estimate the CPI rent requirement, and prefund the user's wallet before the transaction is submitted. See [CPI rent prefunding](/docs/wallets/transactions/solana/sponsor-gas#cpi-rent-prefunding) for the full contract, requirements, and best practices.

<Markdown src="prefund-rent.mdx" />

Expand Down
Loading