Skip to content

docs(minipay+fee-abstraction): add USDT 6-decimal warning and USDT celocli transfer example#2186

Open
samuelchimmy wants to merge 2 commits into
celo-org:mainfrom
samuelchimmy:samuelchimmy/usdt-decimal-note
Open

docs(minipay+fee-abstraction): add USDT 6-decimal warning and USDT celocli transfer example#2186
samuelchimmy wants to merge 2 commits into
celo-org:mainfrom
samuelchimmy:samuelchimmy/usdt-decimal-note

Conversation

@samuelchimmy
Copy link
Copy Markdown

What changed

build-on-celo/build-on-minipay/code-library.mdx

  • Added a <Warning> callout before the Request an ERC20 token transfer section explicitly stating that USDT and USDC use 6 decimals on Celo, not 18
  • Updated the inline address comment in requestTransfer to include the decimal count next to each token address (USDm: 18, USDC: 6, USDT: 6)
  • Corrected the parseUnits comment 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.mdx

  • The CLI section showed a USDC example only. Added an equivalent USDT celocli transfer:erc20 example using the correct USDT mainnet token address (0x48065fbbe25f71c9282ddf5e1cd6d6a887483d5e) and its fee adapter address (0x0e2a3e05bc9a16f5292a6170456a710cb89c6f72)
  • Clarified that --value for both USDC and USDT is in units of 10^6

Why

The requestTransfer snippet 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 pass 18 as tokenDecimals, 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 celocli example makes it consistent.

How to verify

  1. In code-library.mdx: search for requestTransfer — confirm the <Warning> block appears above the code fence and the inline comment now reads (6 decimals) next to USDT
  2. In using-fee-abstraction.mdx: search for 48065fbbe — confirm a complete celocli command appears using it as --erc20Address and 0e2a3e05 as --gasCurrency
  3. Token addresses can be verified at celoscan.io/address/0x48065fbbe25f71c9282ddf5e1cd6d6a887483d5e and celoscan.io/address/0x0e2a3e05bc9a16f5292a6170456a710cb89c6f72

@samuelchimmy samuelchimmy requested a review from a team as a code owner May 23, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant