docs(minipay+fee-abstraction): add USDT 6-decimal warning and USDT celocli transfer example#2186
Closed
samuelchimmy wants to merge 3 commits into
Closed
docs(minipay+fee-abstraction): add USDT 6-decimal warning and USDT celocli transfer example#2186samuelchimmy wants to merge 3 commits into
samuelchimmy wants to merge 3 commits into
Conversation
GigaHierz
approved these changes
Jun 16, 2026
Contributor
|
Thanks for this fix, @samuelchimmy! Because our CI can't run on PRs from external forks, I've recreated your changes verbatim on an org-owned branch so they can be merged: #2196. Full credit to you in the new PR description. Closing this in favor of #2196. |
viral-sangani
pushed a commit
that referenced
this pull request
Jun 16, 2026
…locli transfer example (#2196) - code-library.mdx: add a Warning that USDT/USDC use 6 decimals (not 18), annotate each mainnet token address with its decimal count, and correct the parseUnits comment to cover USDT. - using-fee-abstraction.mdx: add a runnable USDT celocli transfer:erc20 example using the USDT token and adapter addresses, and clarify --value is in 10^6 units. Recreates external contribution #2186 on an org branch. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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