cook4
cook4.fun (beta)

Developers

Integrate cook4.fun in one fetch.

Every cook4.fun coin is a standard token live on Uniswap V4 from second zero. Read prices, route trades, index coins, or launch programmatically. Non-custodial โ€” signers always use their own wallet.

Machine-readable manifest

Chain, all contract addresses, and the full ABIs in one JSON, open CORS. Everything on this page, for your code.

GET /api/abi โ†—
shell
curl -s https://cook4.fun/api/abi | jq .contracts

Robinhood Chain ยท id 4663

Contracts

Create, buy, sell and read coins here.

Uniswap V4 PoolManager

The singleton every coin's pool lives in.

Guards pool creation only โ€” never runs on swaps.

Token implementation

Every coin is an EIP-1167 clone of this.

RPC
rpc.mainnet.chain.robinhood.com
Explorer
robinhoodchain.blockscout.com
Supply / coin
1,000,000,000

No wallet needed

Reading coins

getTokens(offset, limit) lists coins; getToken(address) returns one (name, symbol, socials, poolId, creator, โ€ฆ). getPrice and getMCAP are live from the pool.

typescript
import { createPublicClient, http } from "viem";

const client = createPublicClient({
  transport: http("https://rpc.mainnet.chain.robinhood.com"),
});

// price is ETH (wei) per whole token; mcap is fully-diluted, in ETH (wei)
const price = await client.readContract({
  address: "0xcdC8D6C3DdA334730262Fd7D7f0Ee5E86bA4Ff47",
  abi: launchpadAbi,          // from /api/abi
  functionName: "getPrice",
  args: [tokenAddress],
});

Slippage-protected

Trading

Buy sends ETH and returns tokens to the sender. Selling is two steps โ€” approve the launchpad (never anything else), then sell. Both take a slippage floor.

typescript
// Buy: send ETH, receive tokens. minOut is your slippage floor.
const hash = await wallet.writeContract({
  address: "0xcdC8D6C3DdA334730262Fd7D7f0Ee5E86bA4Ff47",
  abi: launchpadAbi,
  functionName: "buy",
  args: [tokenAddress, minOut],
  value: parseEther("0.05"),
});
typescript
// Sell is two steps: approve the LAUNCHPAD, then sell.
await wallet.writeContract({
  address: tokenAddress, abi: erc20Abi, functionName: "approve",
  args: ["0xcdC8D6C3DdA334730262Fd7D7f0Ee5E86bA4Ff47", amount],
});
await wallet.writeContract({
  address: "0xcdC8D6C3DdA334730262Fd7D7f0Ee5E86bA4Ff47", abi: launchpadAbi, functionName: "sell",
  args: [tokenAddress, amount, minEth],   // minEth = slippage floor
});

Optional

Launching a coin

createToken(name, symbol, description, image, twitter, telegram, website, distribute, firstBuy, metadataURI, salt, splits), payable with the 0.001 ETH fee (+ any first buy). The whole 1B supply is deployed as a single-sided Uniswap V4 position at launch.

salt is any bytes32 โ€” it fixes the coin's CREATE2 address, which you can grind for a c00c vanity suffix (the sender is mixed in, so nobody can front-run a ground one). splits optionally divides your creator fee among wallets. The exact derivation and field limits are in the agent guide.

Advanced

Trade directly on Uniswap V4

Prefer to route through Uniswap yourself? Every pool lives in the V4 singleton โ€” there is no per-pool address. Build the PoolKey and swap against the PoolManager. The hook only guards beforeInitialize, so it never interferes with swaps.

typescript
// Every coin trades in the V4 singleton. ETH is address(0), which
// sorts first, so ETH is always currency0 and the token currency1.
const poolKey = {
  currency0: "0x0000000000000000000000000000000000000000", // ETH
  currency1: tokenAddress,
  fee: 10000,          // 1%
  tickSpacing: 200,
  hooks: "0x4245822772d196A046Ac69Ed307551b3Bfb52000",
};
// getToken(token).poolId === keccak256(abi.encode(poolKey))
// The singleton emits Swap(bytes32 indexed id, ...) per trade.

Open source

Ready-made tooling

Building something on cook4.fun? Coins are permissionless and the interface is stable โ€” no keys, no allowlist, no approval needed.

How cook4.fun works โ†’