transfer, so the user pays the USDSC amount plus whatever gas costs.
Inside the Startale App that gas is sponsored and the user pays only the USDSC. In a standalone application, gas is covered by your paymaster or by the user. See Who pays for gas.
The
useWriteContract example below issues eth_sendTransaction, which cannot carry a custom paymaster. A standalone application that sponsors gas must charge through batched calls instead, even for a single transfer. Inside a Mini App either path is sponsored.Contract addresses
USDSC follows the standard ERC-20 interface. Read decimals at runtime, do not hardcode them.
Send a USDSC payment
The
parseUnits(amount, 6) call assumes USDSC uses 6 decimals. Read the actual value at runtime with decimals() if you support multiple stablecoins or want to be defensive against contract upgrades.Approve and spend in one click
Usewallet_sendCalls (EIP-5792) when your flow needs an approve followed by a contract call. The user signs once and both calls land atomically.
Pay in ETH
For native ETH payments, useuseSendTransaction: