Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Comprehensive Solana development skill covering @solana/kit v5, Anchor programs, LiteSVM testing, and security patterns.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/surfpool/cheatcodes.md
1---2title: Surfpool Cheatcodes3description: Full reference for all surfnet_* RPC methods to manipulate time, accounts, and programs in a local Surfpool network during testing.4---56# Surfpool Cheatcodes Reference78All `surfnet_*` JSON-RPC methods available on the surfnet RPC endpoint (default `http://127.0.0.1:8899`).910## Account Manipulation1112| Method | Description |13|---|---|14| `surfnet_setAccount` | Set or update an account's lamports, data, owner, and executable status directly without transactions. |15| `surfnet_setTokenAccount` | Set or update an SPL token account's balance, delegate, state, and close authority for any mint. |16| `surfnet_resetAccount` | Reset an account to its original state from the remote datasource. Optionally cascades to owned accounts. |17| `surfnet_streamAccount` | Register an account for live streaming — re-fetches from remote datasource on every access instead of caching. |18| `surfnet_getStreamedAccounts` | List all accounts currently registered for streaming. |1920## Program Management2122| Method | Description |23|---|---|24| `surfnet_cloneProgramAccount` | Clone a program and its program data account from one address to another. Useful for forking programs. |25| `surfnet_setProgramAuthority` | Change or remove the upgrade authority on a program's ProgramData account. |26| `surfnet_writeProgram` | Deploy program data in chunks at a byte offset, bypassing transaction size limits (up to 5MB RPC limit). |27| `surfnet_registerIdl` | Register an Anchor IDL for a program in memory, enabling parsed account data in responses. |28| `surfnet_getActiveIdl` | Retrieve the registered IDL for a program at a given slot. Returns null if none registered. |2930## Time Control3132| Method | Description |33|---|---|34| `surfnet_timeTravel` | Jump the network clock to a specific UNIX timestamp, slot, or epoch. Useful for testing time-dependent logic. |35| `surfnet_pauseClock` | Freeze slot advancement and block production. Network stays at current slot until resumed. |36| `surfnet_resumeClock` | Resume slot advancement and block production after a pause. |3738## Transaction Profiling3940| Method | Description |41|---|---|42| `surfnet_profileTransaction` | Dry-run a transaction and return CU estimates, logs, errors, and before/after account state snapshots. |43| `surfnet_getTransactionProfile` | Retrieve a stored transaction profile by signature or UUID. |44| `surfnet_getProfileResultsByTag` | Retrieve all profiling results grouped under a tag. Useful for benchmarking test suites. |4546## Network State4748| Method | Description |49|---|---|50| `surfnet_setSupply` | Override what `getSupply` returns — total, circulating, and non-circulating amounts. |51| `surfnet_resetNetwork` | Reset the entire network to its initial state. All accounts revert to their original remote state. |52| `surfnet_getLocalSignatures` | Get recent transaction signatures with logs and errors. Defaults to last 50. |53| `surfnet_getSurfnetInfo` | Get network info including runbook execution status and configuration. |54| `surfnet_exportSnapshot` | Export all account state as JSON. Reload with `surfpool start --snapshot ./export.json`. |5556## Scenarios5758| Method | Description |59|---|---|60| `surfnet_registerScenario` | Register a scenario with timed account overrides using templates (e.g. Pyth price feeds, Raydium pools). |6162---6364## Surfpool MCP Server6566For MCP server setup, available tools, resources, and agent workflows, see the [MCP Integration section in overview.md](overview.md#mcp-integration).67