Chains
Base
import { base } from "viem/chains"→ PrivydefaultChainandsupportedChains.- OUSD is an ERC-20. Send
transfer(to, amount)encoded with viemerc20Abi,value: 0n, to the OUSD contract. - Cheapest EVM option. Enable Base in Privy → Gas Sponsorship and pass
{ sponsor: true }.
Ethereum
import { mainnet } from "viem/chains".- Same ERC-20 pattern as Base. Gas is expensive: sponsor it or show the estimated fee in USD before confirm.
- Public RPCs rate-limit. Keep an Alchemy/Infura URL in a server-only secret and proxy reads.
Solana
- OUSD mint:
ousd2mJsPEckLHcSCDxyKD7NDGARZcfLbDZkKiatYHB. - Fetch the mint account and use its
owneras the token program id (classic Token or Token-2022). - Transfer:
getAssociatedTokenAddressSync(mint, owner, false, programId)for both sides, prependcreateAssociatedTokenAccountIdempotentInstructionfor the recipient, thencreateTransferCheckedInstruction(src, mint, dst, owner, amount, decimals, [], programId). - The public RPC is rate-limited — use
SOLANA_RPC_URL(Helius/Alchemy) on the server.
Tempo
import { defineChain } from "viem";
export const tempo = defineChain({
id: 4217,
name: "Tempo",
nativeCurrency: { name: "USD", symbol: "USD", decimals: 6 },
rpcUrls: { default: { http: ["https://rpc.tempo.xyz"] } },
blockExplorers: { default: { name: "Tempo Explorer", url: "https://explore.tempo.xyz" } },
});
- Confirm the RPC URL at docs.tempo.xyz before shipping.
- Native value transfers revert. OUSD is TIP-20:
transfer(to, amount)on the OUSD address,value: 0n. - Explorer path is
/receipt/<hash>, not/tx/<hash>. - Pass the same
defineChainobject to PrivydefaultChainandsupportedChains— a stub breaks the wallet.