From d715002b5874f5b48bbf56b700fef75f199d8ca2 Mon Sep 17 00:00:00 2001 From: Adam Boudj Date: Thu, 7 Dec 2023 17:21:09 +0400 Subject: [PATCH 1/2] Update paymastermethods.md --- docs/Paymaster/paymastermethods.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/Paymaster/paymastermethods.md b/docs/Paymaster/paymastermethods.md index fd2e3d2d..52f348f3 100644 --- a/docs/Paymaster/paymastermethods.md +++ b/docs/Paymaster/paymastermethods.md @@ -113,6 +113,14 @@ const feeQuotesResponse = await biconomyPaymaster.getPaymasterFeeQuotesOrData(us - In token list we can specify a list of addresses for the choices in tokens we want to have our users pay in - We can also decide to choose a preferred token for the response to include +:::warning + +**_Important:_** When using **Token Paymaster** with ERC20 tokens like USDC, always ensure to calculate the **feeQuote** correctly. This is crucial to avoid transaction reverts due to insufficient token balance after execution. The `feeQuote` should account for both the transaction cost and any other **token** movements within the same operation. + +_Example:_ If a user is transacting with **USDC**, and the feeQuote is **2 USDC**, the DApp must ensure that the user's balance post-callData execution is sufficient to cover this fee. Incorrect fee calculations can lead to transaction failures and a degraded user experience. + +::: + Here is the typing for the full data object you can pass here: ```ts From a337e83ef36a8e1da0f99c85ccc782651d0fc7f9 Mon Sep 17 00:00:00 2001 From: Adam Boudj Date: Thu, 7 Dec 2023 17:28:20 +0400 Subject: [PATCH 2/2] Update paymastermethods.md --- docs/Paymaster/paymastermethods.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Paymaster/paymastermethods.md b/docs/Paymaster/paymastermethods.md index 52f348f3..f4eb1f26 100644 --- a/docs/Paymaster/paymastermethods.md +++ b/docs/Paymaster/paymastermethods.md @@ -115,7 +115,7 @@ const feeQuotesResponse = await biconomyPaymaster.getPaymasterFeeQuotesOrData(us :::warning -**_Important:_** When using **Token Paymaster** with ERC20 tokens like USDC, always ensure to calculate the **feeQuote** correctly. This is crucial to avoid transaction reverts due to insufficient token balance after execution. The `feeQuote` should account for both the transaction cost and any other **token** movements within the same operation. +**_Important:_** When using **Token Paymaster** with ERC20 tokens, always ensure to calculate the **feeQuote** correctly. This is crucial to avoid transaction reverts due to insufficient token balance after execution. The `feeQuote` should consider both the transaction cost and any other **token** movements within the same operation. _Example:_ If a user is transacting with **USDC**, and the feeQuote is **2 USDC**, the DApp must ensure that the user's balance post-callData execution is sufficient to cover this fee. Incorrect fee calculations can lead to transaction failures and a degraded user experience.