From 48a47f6b3a7ddb1161f72b858955269aa58b44d2 Mon Sep 17 00:00:00 2001 From: alchemy-bot <80712764+alchemy-bot@users.noreply.github.com> Date: Thu, 11 Jun 2026 11:43:13 +0000 Subject: [PATCH 1/2] [docs-agent] Fix broken Token gas payment modes anchor on Pay gas with any token The "How it works" section linked to #token-gas-payment-modes, but the content lived inside an block. Fern Accordion titles do not generate heading anchors, so the link did not resolve. Convert the Accordion into a ### Token gas payment modes heading so Fern auto-generates the matching #token-gas-payment-modes anchor. The content is now visible by default, matching the "section below for details" framing in the prose. Refs DOCS-115 Requested-by: @seansing --- .../pay-gas-with-any-token/index.mdx | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/content/wallets/pages/transactions/pay-gas-with-any-token/index.mdx b/content/wallets/pages/transactions/pay-gas-with-any-token/index.mdx index 7acf63a33..f01b298d4 100644 --- a/content/wallets/pages/transactions/pay-gas-with-any-token/index.mdx +++ b/content/wallets/pages/transactions/pay-gas-with-any-token/index.mdx @@ -50,37 +50,37 @@ Post-operation mode is recommended for most use cases. If the token approval is - - The configured mode determines when the user’s token payment occurs. +### Token gas payment modes - **\[Recommended] Post-Operation** +The configured mode determines when the user’s token payment occurs. - * No upfront allowance is required. - * If the paymaster does not already have a sufficient allowance, a token approval is injected into the same atomic calls batch as your operations. The paymaster contract pulls the token after execution. - * When an approval is injected into the batch, if any call reverts, the approval is also reverted. The paymaster cannot collect the token payment and you (the policy owner) pay the gas cost without receiving token compensation. - * If a sufficient allowance already exists (e.g., from threshold mode or a prior approval), no approval is injected and the paymaster can collect payment even if the batch reverts. +**\[Recommended] Post-Operation** - **Pre-Operation:** +* No upfront allowance is required. +* If the paymaster does not already have a sufficient allowance, a token approval is injected into the same atomic calls batch as your operations. The paymaster contract pulls the token after execution. +* When an approval is injected into the batch, if any call reverts, the approval is also reverted. The paymaster cannot collect the token payment and you (the policy owner) pay the gas cost without receiving token compensation. +* If a sufficient allowance already exists (e.g., from threshold mode or a prior approval), no approval is injected and the paymaster can collect payment even if the batch reverts. - * The paymaster contract must have an allowance prior to the operation. - * This can be done either through a prior call to `approve()` or by using an [ERC-7597 Permit](https://eips.ethereum.org/EIPS/eip-7597) signature. - * Because the token transfer occurs during validation (before execution), the paymaster collects payment regardless of whether the operation reverts. - * If the required allowance isn’t in place when the transaction is submitted, it will be rejected. +**Pre-Operation:** - **Choosing a mode:** +* The paymaster contract must have an allowance prior to the operation. +* This can be done either through a prior call to `approve()` or by using an [ERC-7597 Permit](https://eips.ethereum.org/EIPS/eip-7597) signature. +* Because the token transfer occurs during validation (before execution), the paymaster collects payment regardless of whether the operation reverts. +* If the required allowance isn’t in place when the transaction is submitted, it will be rejected. - Use **post-operation** mode when your operations are unlikely to revert. This mode: +**Choosing a mode:** - * Is the most gas efficient as it requires a single transfer. - * Works with all ERC-20 tokens. - * Requires a single signature from the user. +Use **post-operation** mode when your operations are unlikely to revert. This mode: - Use **pre-operation** mode when your operations may revert. Because the token transfer happens before execution, the paymaster is always compensated regardless of the execution outcome. This is the safer choice for: +* Is the most gas efficient as it requires a single transfer. +* Works with all ERC-20 tokens. +* Requires a single signature from the user. - * Swaps or other operations with dynamic outcomes - * Any operation where revert conditions are difficult to predict ahead of time - * High-value gas operations where uncompensated gas costs are unacceptable - +Use **pre-operation** mode when your operations may revert. Because the token transfer happens before execution, the paymaster is always compensated regardless of the execution outcome. This is the safer choice for: + +* Swaps or other operations with dynamic outcomes +* Any operation where revert conditions are difficult to predict ahead of time +* High-value gas operations where uncompensated gas costs are unacceptable From b95ac2879d368ff03916145360f37041720fef21 Mon Sep 17 00:00:00 2001 From: alchemy-bot <80712764+alchemy-bot@users.noreply.github.com> Date: Thu, 11 Jun 2026 17:19:00 +0000 Subject: [PATCH 2/2] [docs-agent] Move Token gas payment modes to top of Advanced section Per reviewer feedback (Jake Hobbs), reorder the Advanced section so the Token gas payment modes heading is the first item, instead of being wedged between Accordions. This keeps the conceptual mode explanation up-front while leaving the implementation-detail Accordions below. Refs DOCS-115 Requested-by: @seansing --- .../pay-gas-with-any-token/index.mdx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/content/wallets/pages/transactions/pay-gas-with-any-token/index.mdx b/content/wallets/pages/transactions/pay-gas-with-any-token/index.mdx index f01b298d4..dd7fc1f48 100644 --- a/content/wallets/pages/transactions/pay-gas-with-any-token/index.mdx +++ b/content/wallets/pages/transactions/pay-gas-with-any-token/index.mdx @@ -35,21 +35,6 @@ Post-operation mode is recommended for most use cases. If the token approval is ## Advanced - - Pay gas with any token also works with the prepare calls methods in the various frameworks. Usage of the capability will be the same as when using send calls. It is recommended to use prepare calls if you want to inspect the prepared call prior to prompting the user for signature. - - - - See the [`prepareCalls` SDK reference](/docs/wallets/reference/wallet-apis/functions/prepareCalls) for full parameter descriptions. - - - - See the [`wallet_prepareCalls` API - reference](/docs/wallets/api/smart-wallets/wallet-api-endpoints/wallet-prepare-calls) - - - - ### Token gas payment modes The configured mode determines when the user’s token payment occurs. @@ -82,6 +67,21 @@ Use **pre-operation** mode when your operations may revert. Because the token tr * Any operation where revert conditions are difficult to predict ahead of time * High-value gas operations where uncompensated gas costs are unacceptable + + Pay gas with any token also works with the prepare calls methods in the various frameworks. Usage of the capability will be the same as when using send calls. It is recommended to use prepare calls if you want to inspect the prepared call prior to prompting the user for signature. + + + + See the [`prepareCalls` SDK reference](/docs/wallets/reference/wallet-apis/functions/prepareCalls) for full parameter descriptions. + + + + See the [`wallet_prepareCalls` API + reference](/docs/wallets/api/smart-wallets/wallet-api-endpoints/wallet-prepare-calls) + + + +