Quotes and state
Read BondingCurve and LaunchLens; use the RPC proxy for eth_call.
Quotes and progress come from on-chain reads. Prefer the bonding curve and LaunchLens over trusting any off-chain price for settlement.
tsreadCurve.ts
import { parseAbi } from "viem";
const curveAbi = parseAbi([
"function getPrice() view returns (uint256)",
"function getReserves() view returns (uint256 reserveNative, uint256 reserveToken)",
"function bondingProgressBps() view returns (uint256)",
]);
const price = await publicClient.readContract({
address: curveAddress,
abi: curveAbi,
functionName: "getPrice",
});
const progressBps = await publicClient.readContract({
address: curveAddress,
abi: curveAbi,
functionName: "bondingProgressBps",
});LaunchLens (indexers)
tslaunchLens.ts
import { parseAbi } from "viem";
const lensAbi = parseAbi([
"function tokenCount() view returns (uint256)",
"function getLaunchRecord(address token) view returns ((address token, address curve, address creator, uint256 createdAt))",
]);
const record = await publicClient.readContract({
address: lensAddress,
abi: lensAbi,
functionName: "getLaunchRecord",
args: [tokenAddress],
});For charts and indexed trades, use GET /tokens/:address/chart and GET /tokens/:address/trades. Chart intervals: 1s, 1m, 5m, 15m, 1h, 4h, 1d (default 1m).
Read-only RPC proxy
bashrpc.sh
curl -sS -X POST "${API_URL}/rpc" \
-H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'Write methods (eth_sendTransaction, etc.) are rejected. Frontend mainnet reads often use VITE_API_URL/rpc.