Summary
When a server's 402 challenge includes feePayer: true in methodDetails, tempo request sends feeToken: 0x0000000000000000000000000000000000000000 in the eth_estimateGas RPC call. Tempo's node rejects this with TIP20 token error: InvalidToken(InvalidToken), preventing the channel open transaction from being built.
Reproduction
# Server issues challenge with feePayer: true
# (mpp.lasso.sh is a live MPP gateway)
tempo request -vvv -X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
https://mpp.lasso.sh/fastest/ethereum
In the trace output, the eth_estimateGas call shows:
{
"feeToken": "0x0000000000000000000000000000000000000000",
...
}
Tempo responds: {"error":{"code":-32603,"message":"TIP20 token error: InvalidToken(InvalidToken)"}}
Expected Behavior
The CLI should use the payment currency address (available in the challenge's request.currency field) as the feeToken for gas estimation, even when feePayer: true. The mppx TypeScript SDK does this correctly — it passes feeToken: currency to prepareTransactionRequest alongside feePayer: true.
The sender doesn't sign over feeToken when sponsored (per spec), but gas estimation still needs a valid token to compute costs.
Context
tempo version: 1.4.3 (commit a35c7d1)
- Network: Tempo mainnet (chain ID 4217)
- USDC address:
0x20C000000000000000000000b9537d11c60E8b50
- When
feePayer: false, the CLI correctly uses the USDC address for gas estimation and everything works
Workaround
Setting feePayer: false in the server challenge causes the CLI to use the correct feeToken for estimation. The client pays gas directly instead of the server sponsoring it.
Summary
When a server's 402 challenge includes
feePayer: trueinmethodDetails,tempo requestsendsfeeToken: 0x0000000000000000000000000000000000000000in theeth_estimateGasRPC call. Tempo's node rejects this withTIP20 token error: InvalidToken(InvalidToken), preventing the channel open transaction from being built.Reproduction
In the trace output, the
eth_estimateGascall shows:{ "feeToken": "0x0000000000000000000000000000000000000000", ... }Tempo responds:
{"error":{"code":-32603,"message":"TIP20 token error: InvalidToken(InvalidToken)"}}Expected Behavior
The CLI should use the payment currency address (available in the challenge's
request.currencyfield) as thefeeTokenfor gas estimation, even whenfeePayer: true. The mppx TypeScript SDK does this correctly — it passesfeeToken: currencytoprepareTransactionRequestalongsidefeePayer: true.The sender doesn't sign over
feeTokenwhen sponsored (per spec), but gas estimation still needs a valid token to compute costs.Context
tempoversion: 1.4.3 (commit a35c7d1)0x20C000000000000000000000b9537d11c60E8b50feePayer: false, the CLI correctly uses the USDC address for gas estimation and everything worksWorkaround
Setting
feePayer: falsein the server challenge causes the CLI to use the correct feeToken for estimation. The client pays gas directly instead of the server sponsoring it.