You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
task: fix the fee abstraction examples (adapter vs token address, decimals, imports) #2362
Follow-up from #2257, which added a troubleshooting section to the fee abstraction guide but left the existing examples as they were.
What needs to be done?
Three problems in build-on-celo/fee-abstraction/using-fee-abstraction.mdx, found while checking the page against the fee currency list and the JSON-RPC behaviour on Celo mainnet. AGENTS.md section 5 says every example that stays must run.
CLI USDC example uses the adapter as the token. The first celocli transfer:erc20 block passes --erc20Address 0x2F25deB3848C207fc8E0c34035B3Ba7fC157602B. That address is the USDC adapter; the USDC token is 0xcebA9300f2b948710d2653dD7B07f33A8B32118C (see Fee currency contracts). The text under the block says transfers use the token address. The USD₮ example below it is correct (token in --erc20Address, adapter in --gasCurrency).
viem step 3 mixes decimals and has missing imports.parseEther("1") - transactionFee treats USDC as 18 decimals, but USDC has 6; the snippet uses encodeFunctionData, parseEther and formatEther without importing them; step 1 calls hexToBigInt on the result of estimateGas, which viem already returns as a bigint.
Addresses are not labelled. Every address in the examples should carry the network name and, for tokens, the decimals (AGENTS.md section 5), for example // Celo mainnet (42220), USDC adapter.
Definition of done
The CLI USDC example uses the token address for --erc20Address and the adapter for --gasCurrency, and the command is run once with its output noted in the PR
The viem examples are self-contained (imports shown), use the token's decimals, and are run against Celo Sepolia with the command and output noted in the PR
Every address in both examples is labelled with network and decimals
Open: the two definition-of-done boxes that need a funded key. The CLI transfer has not been run and the step 3 script has not sent a transaction on Celo Sepolia. Leaving this open until someone with a funded key runs both and notes the output.
Activity
GigaHierz commentedon Oct 15, 2026
Status against the three items:
hexToBigIntcall: fixed in docs(fee-abstraction): make the viem examples run and use USDC's decimals #2384.Open: the two definition-of-done boxes that need a funded key. The CLI transfer has not been run and the step 3 script has not sent a transaction on Celo Sepolia. Leaving this open until someone with a funded key runs both and notes the output.