surfpool

Simulates Solana mainnet locally with forking, cheatcodes, and Infrastructure as Code for program testing.

1|1|Updated May 21, 2026
One-click install
npx skills add https://github.com/naruto11eth/cryptoskills --skill surfpool-naruto11eth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: surfpool
Source: https://github.com/naruto11eth/cryptoskills/tree/main/skills/surfpool
Command: npx skills add https://github.com/naruto11eth/cryptoskills --skill surfpool-naruto11eth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @solana/web3.js, @solana/spl-token, and includes references (resource) and assets (resource) components.

What problem does it solve? Solana developers struggle with slow, heavyweight local validators that lack real mainnet state, forcing them to test against incomplete environments or risk deploying untested programs. Surfpool replaces solana-test-validator with a lightweight local network that forks mainnet accounts on demand. ## Core Features & Use Cases - Mainnet Forking: Clone accounts, programs, and token balances from mainnet just-in-time without downloading multi-terabyte snapshots. - Cheatcodes: Use special RPC methods like surfnet_setAccount, surfnet_timeTravel, and surfnet_profileTransaction to manipulate state, control time, and profile compute units during tests. - Infrastructure as Code: Define reproducible deployments with txtx DSL runbooks and Surfpool.toml configuration, plus a web dashboard (Surfpool Studio) for transaction inspection. - Use Case: A developer building a DeFi integration can start Surfpool, instantly access real Jupiter or Orca mainnet accounts, set token balances via cheatcodes, and run Anchor tests against realistic state. ## Quick Start Ask the agent to start a local Surfpool network and set up a test wallet funded with SOL and USDC using cheatcodes.

Frequently Asked Questions about surfpool

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test Solana programs against mainnet state locally?

Run surfpool start to launch a local Surfnet that lazily forks mainnet accounts on demand. Point your tests at http://127.0.0.1:8899 and any mainnet account your program touches is fetched automatically from the source RPC.

What is the difference between Surfpool and solana-test-validator?

Surfpool is a drop-in replacement for solana-test-validator that adds mainnet forking, cheatcodes for state manipulation, Infrastructure as Code runbooks, and a web dashboard. It boots instantly without large snapshots and auto-detects Anchor projects.

How do I set token balances in Solana tests without airdrops?

Use the surfnet_setTokenAccount cheatcode with the owner, mint, and desired amount to create or modify token accounts directly. This works for mainnet mints like USDC without needing faucets or actual token transfers.

Does Surfpool work with Anchor projects?

Yes, Surfpool auto-detects Anchor projects and deploys programs from target/deploy on startup. Configure AnchorProvider to use http://127.0.0.1:8899 and run anchor test with --skip-local-validator.

Why does Surfpool fail to start with port already in use?

Port 8899 is occupied by another validator or a previous Surfpool instance. Kill the process using the port with lsof -i :8899, or start Surfpool on a different port with surfpool start -p 9999.

Can Surfpool run in CI/CD pipelines?

Yes, run surfpool start --no-tui in CI environments like GitHub Actions, or use the official Docker image surfpool/surfpool. Fixtures can be exported via surfnet_exportSnapshot for reproducible test state.