docs(minipay+fee-abstraction): add USDT 6-decimal warning and USDT celocli transfer example#2186
Open
samuelchimmy wants to merge 2 commits into
Open
docs(minipay+fee-abstraction): add USDT 6-decimal warning and USDT celocli transfer example#2186samuelchimmy wants to merge 2 commits into
samuelchimmy wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
build-on-celo/build-on-minipay/code-library.mdx<Warning>callout before theRequest an ERC20 token transfersection explicitly stating that USDT and USDC use 6 decimals on Celo, not 18requestTransferto include the decimal count next to each token address (USDm: 18, USDC: 6, USDT: 6)parseUnitscomment from"USDm (18), USDC (6)"— which omitted USDT entirely — to"USDm uses 18 decimals; USDC and USDT use 6 decimals"build-on-celo/fee-abstraction/using-fee-abstraction.mdxcelocli transfer:erc20example using the correct USDT mainnet token address (0x48065fbbe25f71c9282ddf5e1cd6d6a887483d5e) and its fee adapter address (0x0e2a3e05bc9a16f5292a6170456a710cb89c6f72)--valuefor both USDC and USDT is in units of10^6Why
The
requestTransfersnippet listed USDT in the address comment but gave no decimal count for it, while explicitly noting USDC (6). A developer building a USDT transfer and following this example without noticing the omission would likely pass18astokenDecimals, sending 1,000,000,000,000× the intended amount. The<Warning>and inline comment make the 6-decimal requirement impossible to miss.The fee-abstraction CLI section documented USDC usage but left USDT as table-only — no runnable example. The USDT adapter address is already in the table above; adding the
celocliexample makes it consistent.How to verify
code-library.mdx: search forrequestTransfer— confirm the<Warning>block appears above the code fence and the inline comment now reads(6 decimals)next to USDTusing-fee-abstraction.mdx: search for48065fbbe— confirm a completeceloclicommand appears using it as--erc20Addressand0e2a3e05as--gasCurrency