surfpool

Simulates Solana mainnet locally with forking, cheatcodes, and Infrastructure as Code deployments.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Solana developers struggle with slow, heavyweight local testing: solana-test-validator requires large snapshots, cannot access real mainnet state, and lacks tools for manipulating time, balances, and account data during tests. Surfpool provides a drop-in replacement that forks mainnet state on demand and exposes cheatcodes for full state control. ## Core Features & Use Cases - Mainnet Forking: Clone accounts, programs, and token balances from mainnet just-in-time using a copy-on-read strategy, with pre-cloning configured in Surfpool.toml. - Cheatcodes: Use RPC methods like surfnet_setAccount, surfnet_setTokenAccount, surfnet_timeTravel, and surfnet_profileTransaction to manipulate state, control the clock, and profile compute units. - Infrastructure as Code: Define reproducible deployments with txtx DSL runbooks, plus Surfpool Studio at http://127.0.0.1:18488 for transaction inspection and a universal faucet. - Use Case: While testing an Anchor program that swaps on a mainnet DEX, start Surfpool, set token balances with cheatcodes, advance slots to simulate time passing, and profile the transaction's compute usage before deploying. ## 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 lazy-loads mainnet accounts on demand. Point your client to http://127.0.0.1:8899 and pre-clone frequently used accounts in Surfpool.toml to avoid fetch delays.

How to set token balances for Solana testing without a faucet?

Use the surfnet_setTokenAccount cheatcode with the owner, mint, and desired amount to create or modify token balances directly. For SOL, use surfnet_setAccount with a lamports value instead of requesting airdrops.

Does Surfpool work with Anchor projects?

Yes, Surfpool auto-detects Anchor projects and deploys programs from target/deploy on startup. Configure your tests to use AnchorProvider.local with http://127.0.0.1:8899 as the RPC endpoint.

Surfpool vs solana-test-validator for local development?

Surfpool is a drop-in replacement that adds mainnet forking, cheatcodes for state and time manipulation, and a web dashboard. solana-test-validator starts from genesis only and lacks these state manipulation RPC methods.

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

Another process such as solana-test-validator or a previous Surfpool instance is bound to port 8899. Kill the process with lsof -i :8899 or start Surfpool on a different port using surfpool start -p 9999.

How do I simulate time passing in Solana tests?

Call surfnet_timeTravel with a target slot, epoch, or timestamp, or use surfnet_advanceClock to move forward by a number of slots. You can also pause and resume block production with surfnet_pauseClock and surfnet_resumeClock.