Gasless funding does not imply a fee-free deposit. The returned quote determines the deposit amount and deadline.
Prerequisites
- The returned
vaultAddress,amount, and quotedeadline - The source chain’s USDC contract and the user’s wallet
- Sufficient USDC for the quoted amount
- For the TypeScript example,
viemand a wallet client connected to Base
429 with backoff and honor Retry-After when present. The linked endpoint pages contain complete request, success, and error examples.
ERC-3009 transferWithAuthorization
SignTransferWithAuthorization with the returned address as to. Use a fresh random bytes32 nonce. Verify the token’s EIP-712 domain for the selected chain; a domain from another USDC deployment can produce an invalid signature.
This example is scoped to Base mainnet USDC. It reads the token’s name onchain and uses USDC’s domain version 2. Pass the actual create-response fields to the exported function. It signs and submits an authorization when called; use a wallet client for the user who is funding the deposit.
202 with a gasless job; retrying the same signed payload returns the existing job with 200. Save the job ID. See the ERC-3009 endpoint for validation errors and the response schema.
The comment about persistence marks an application responsibility: wire in durable storage before using this function in a production payment flow. If the HTTP result is uncertain, recover the saved payload and retry it rather than calling the signing function again.
EIP-2612 Permit
Use the EIP-2612 endpoint with a token deployment that supports the required permit flow.
Sign the token’s EIP-712
Permit type using its chain-specific domain. Submit { chainId, target: { depositAddress }, permit, signature }. Serialize value and nonce as decimal strings and deadline as a number, as required by the request schema.
A permit can be mined before the subsequent token movement completes. Inspect the job and transaction hashes before creating another permit after a failure.
Direct transfer
Send the quoted amount of source-chain USDC tovaultAddress using the token’s ERC-20 transfer function. The sender signs that transaction and pays gas. Estimate the transfer’s gas before submitting and check its receipt.
The service monitors the address and processes it when its USDC balance reaches the quote amount. A successful source transfer does not confirm the destination deposit.
Polling
Follow deposit and job tracking. Preserve the source chain, address, signed payload, job ID, and transaction hashes with the deposit record.- For validation errors, check the target binding, amount, token domain, signer, nonce, and deadlines.
- If a job is
failedorpartial, inspect its per-chain results before retrying. - If the deposit is
PUBLISHED, confirm the delivery intent or recipient’s Gateway balance before marking the payment complete.
