{
  "schemaVersion": "1.0",
  "item": {
    "slug": "setup-local-testnet",
    "name": "Setup Local Anvil Testnet",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/wpank/setup-local-testnet",
    "canonicalUrl": "https://clawhub.ai/wpank/setup-local-testnet",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/setup-local-testnet",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=setup-local-testnet",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/setup-local-testnet"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/setup-local-testnet",
    "agentPageUrl": "https://openagent3.xyz/skills/setup-local-testnet/agent",
    "manifestUrl": "https://openagent3.xyz/skills/setup-local-testnet/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/setup-local-testnet/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Overview",
        "body": "Spins up a local Anvil testnet forking a live chain with all Uniswap contracts available, pre-funded test accounts, and real pool state. This is the foundation for all local testing -- every other testnet skill depends on it.\n\nWhy this is 10x better than doing it manually:\n\nOne command: Instead of writing 30+ lines of shell script to start Anvil, impersonate whales, fund accounts, and verify contracts, you say \"set up a local testnet\" and it's done.\nPre-funded accounts: Each test account gets 10,000 ETH plus 1M USDC, 1M USDT, 10K DAI, 100 WETH, and 10K UNI -- ready for any testing scenario.\nReal pool state: Fork mode gives you every Uniswap pool with real liquidity, real prices, and real tick state. No mocking required.\nContract discovery: Returns all relevant Uniswap contract addresses (V3Factory, NonfungiblePositionManager, UniversalRouter, Permit2, QuoterV2) so you can immediately interact with them.\nPort management: Automatically finds an available port, handles conflicts, and cleans up previous testnets.\nFollow-up integration: Output is designed to feed directly into create-test-pool and time-travel skills."
      },
      {
        "title": "When to Use",
        "body": "Activate when the user says anything like:\n\n\"Set up a local testnet\"\n\"Start a local Anvil fork\"\n\"I need a test environment for Uniswap\"\n\"Fork Ethereum locally\"\n\"Set up a dev environment\"\n\"I want to test without spending real gas\"\n\"Spin up Anvil with Uniswap\"\n\"Create a test environment for my agent\"\n\nDo NOT use when the user already has a testnet running and just wants to add pools (use create-test-pool) or advance time (use time-travel)."
      },
      {
        "title": "Parameters",
        "body": "ParameterRequiredDefaultHow to ExtractmodeNofork\"fork\" or \"mock\" -- fork is the default and recommendedforkFromNoethereum\"ethereum\", \"base\", \"arbitrum\", \"optimism\", \"polygon\"blockNumberNolatestSpecific block number if the user mentions oneseedLiquidityNotrueSet to false only if user says \"empty testnet\" or \"no tokens\"fundedAccountsNo3Number of accounts (1-5) if user specifiesportNoautoSpecific port if user mentions one"
      },
      {
        "title": "Step 1: Check Prerequisites",
        "body": "Before calling the MCP tool, verify the environment:\n\nAnvil availability: The tool will return a clear error if Anvil is not installed. If you see TESTNET_ANVIL_NOT_FOUND, tell the user:\nAnvil (Foundry) is required but not installed.\nInstall: curl -L https://foundry.paradigm.xyz | bash && foundryup\n\n\n\nNetwork access: Fork mode requires network access to the chain's RPC. If you see TESTNET_STARTUP_TIMEOUT, suggest checking network connectivity or trying a different chain."
      },
      {
        "title": "Step 2: Extract Parameters",
        "body": "Parse the user's request for any specific requirements:\n\nChain preference: \"fork Base\" → forkFrom: \"base\"\nBlock number: \"at block 19000000\" → blockNumber: 19000000\nAccount count: \"5 test accounts\" → fundedAccounts: 5\nNo funding: \"empty testnet\" → seedLiquidity: false\n\nIf the user doesn't specify, use all defaults (fork Ethereum, 3 funded accounts, seed liquidity)."
      },
      {
        "title": "Step 3: Call setup_local_testnet",
        "body": "Call mcp__uniswap__setup_local_testnet with the extracted parameters."
      },
      {
        "title": "Step 4: Present Results",
        "body": "Format the response as a rich summary:\n\nLocal Testnet Ready\n\n  RPC URL:    http://127.0.0.1:8545\n  Chain ID:   31337\n  Mode:       Fork of Ethereum at block 19,234,567\n\n  Funded Accounts:\n  ┌──────────────────────────────────────────────────────────────────────┐\n  │ #  Address                                    ETH       USDC        │\n  │ 1  0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 10,000    1,000,000  │\n  │ 2  0x70997970C51812dc3A010C7d01b50e0d17dc79C8 10,000    1,000,000  │\n  │ 3  0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC 10,000    1,000,000  │\n  └──────────────────────────────────────────────────────────────────────┘\n\n  Key Contracts:\n    V3Factory:                      0x1F98431c8aD98523631AE4a59f267346ea31F984\n    NonfungiblePositionManager:     0xC36442b4a4522E871399CD717aBDD847Ab11FE88\n    UniversalRouter:                0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD\n    Permit2:                        0x000000000022D473030F116dDEE9F6B43aC78BA3\n    QuoterV2:                       0x61fFE014bA17989E743c5F6cB21bF9697530B21e\n\n  Available Pools (from fork):\n    USDC/WETH 0.05% (V3)  — 0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640\n    USDC/WETH 0.30% (V3)  — 0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8\n    USDT/WETH 0.30% (V3)  — 0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36\n    WBTC/WETH 0.30% (V3)  — 0xCBCdF9626bC03E24f779434178A73a0B4bad62eD\n\n  Private Keys (for wallet config):\n    Account #1: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80\n    Account #2: 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d\n    Account #3: 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a"
      },
      {
        "title": "Step 5: Suggest Next Steps",
        "body": "Always end with actionable follow-ups:\n\nNext Steps:\n  - Create a custom pool: \"Create a WETH/DAI pool with thin liquidity\"\n  - Test time-dependent logic: \"Advance time by 7 days\"\n  - Test a swap: \"Get a quote for 1 WETH → USDC on the local testnet\"\n  - Fund more tokens: \"Fund account #1 with 10,000 WBTC\"\n  - Configure your MCP server: Set RPC_URL_1=http://127.0.0.1:8545 in .env"
      },
      {
        "title": "Important Notes",
        "body": "Anvil must be installed. This skill requires Foundry's Anvil. If not installed, provide the installation command.\nFork mode requires network access. The initial fork downloads state from the live chain's RPC. Subsequent operations are local.\nPort conflicts are handled automatically. If port 8545 is in use, the tool finds the next available port.\nPrevious testnets are cleaned up. Starting a new testnet kills any existing one.\nPrivate keys are Anvil defaults. These are well-known test keys -- never use them on mainnet.\nThe testnet persists until the MCP server process exits or a new testnet is started."
      },
      {
        "title": "Error Handling",
        "body": "ErrorUser-Facing MessageSuggested ActionTESTNET_ANVIL_NOT_FOUND\"Anvil (Foundry) is not installed.\"Install: curl -L https://foundry.paradigm.xyz | bash && foundryupTESTNET_STARTUP_TIMEOUT\"Anvil did not start within 30s. Fork RPC may be unreachable.\"Check network, try a different chain, or retryTESTNET_INVALID_FORK_CHAIN\"Chain X is not supported for forking.\"Use ethereum, base, arbitrum, optimism, or polygonTESTNET_MOCK_NOT_IMPLEMENTED\"Mock mode is not yet implemented.\"Use fork mode insteadTESTNET_SETUP_FAILED\"Failed to set up testnet: {reason}\"Check Anvil installation and network access"
      }
    ],
    "body": "Setup Local Testnet\nOverview\n\nSpins up a local Anvil testnet forking a live chain with all Uniswap contracts available, pre-funded test accounts, and real pool state. This is the foundation for all local testing -- every other testnet skill depends on it.\n\nWhy this is 10x better than doing it manually:\n\nOne command: Instead of writing 30+ lines of shell script to start Anvil, impersonate whales, fund accounts, and verify contracts, you say \"set up a local testnet\" and it's done.\nPre-funded accounts: Each test account gets 10,000 ETH plus 1M USDC, 1M USDT, 10K DAI, 100 WETH, and 10K UNI -- ready for any testing scenario.\nReal pool state: Fork mode gives you every Uniswap pool with real liquidity, real prices, and real tick state. No mocking required.\nContract discovery: Returns all relevant Uniswap contract addresses (V3Factory, NonfungiblePositionManager, UniversalRouter, Permit2, QuoterV2) so you can immediately interact with them.\nPort management: Automatically finds an available port, handles conflicts, and cleans up previous testnets.\nFollow-up integration: Output is designed to feed directly into create-test-pool and time-travel skills.\nWhen to Use\n\nActivate when the user says anything like:\n\n\"Set up a local testnet\"\n\"Start a local Anvil fork\"\n\"I need a test environment for Uniswap\"\n\"Fork Ethereum locally\"\n\"Set up a dev environment\"\n\"I want to test without spending real gas\"\n\"Spin up Anvil with Uniswap\"\n\"Create a test environment for my agent\"\n\nDo NOT use when the user already has a testnet running and just wants to add pools (use create-test-pool) or advance time (use time-travel).\n\nParameters\nParameter\tRequired\tDefault\tHow to Extract\nmode\tNo\tfork\t\"fork\" or \"mock\" -- fork is the default and recommended\nforkFrom\tNo\tethereum\t\"ethereum\", \"base\", \"arbitrum\", \"optimism\", \"polygon\"\nblockNumber\tNo\tlatest\tSpecific block number if the user mentions one\nseedLiquidity\tNo\ttrue\tSet to false only if user says \"empty testnet\" or \"no tokens\"\nfundedAccounts\tNo\t3\tNumber of accounts (1-5) if user specifies\nport\tNo\tauto\tSpecific port if user mentions one\nWorkflow\nStep 1: Check Prerequisites\n\nBefore calling the MCP tool, verify the environment:\n\nAnvil availability: The tool will return a clear error if Anvil is not installed. If you see TESTNET_ANVIL_NOT_FOUND, tell the user:\n\nAnvil (Foundry) is required but not installed.\nInstall: curl -L https://foundry.paradigm.xyz | bash && foundryup\n\n\nNetwork access: Fork mode requires network access to the chain's RPC. If you see TESTNET_STARTUP_TIMEOUT, suggest checking network connectivity or trying a different chain.\n\nStep 2: Extract Parameters\n\nParse the user's request for any specific requirements:\n\nChain preference: \"fork Base\" → forkFrom: \"base\"\nBlock number: \"at block 19000000\" → blockNumber: 19000000\nAccount count: \"5 test accounts\" → fundedAccounts: 5\nNo funding: \"empty testnet\" → seedLiquidity: false\n\nIf the user doesn't specify, use all defaults (fork Ethereum, 3 funded accounts, seed liquidity).\n\nStep 3: Call setup_local_testnet\n\nCall mcp__uniswap__setup_local_testnet with the extracted parameters.\n\nStep 4: Present Results\n\nFormat the response as a rich summary:\n\nLocal Testnet Ready\n\n  RPC URL:    http://127.0.0.1:8545\n  Chain ID:   31337\n  Mode:       Fork of Ethereum at block 19,234,567\n\n  Funded Accounts:\n  ┌──────────────────────────────────────────────────────────────────────┐\n  │ #  Address                                    ETH       USDC        │\n  │ 1  0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 10,000    1,000,000  │\n  │ 2  0x70997970C51812dc3A010C7d01b50e0d17dc79C8 10,000    1,000,000  │\n  │ 3  0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC 10,000    1,000,000  │\n  └──────────────────────────────────────────────────────────────────────┘\n\n  Key Contracts:\n    V3Factory:                      0x1F98431c8aD98523631AE4a59f267346ea31F984\n    NonfungiblePositionManager:     0xC36442b4a4522E871399CD717aBDD847Ab11FE88\n    UniversalRouter:                0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD\n    Permit2:                        0x000000000022D473030F116dDEE9F6B43aC78BA3\n    QuoterV2:                       0x61fFE014bA17989E743c5F6cB21bF9697530B21e\n\n  Available Pools (from fork):\n    USDC/WETH 0.05% (V3)  — 0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640\n    USDC/WETH 0.30% (V3)  — 0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8\n    USDT/WETH 0.30% (V3)  — 0x4e68Ccd3E89f51C3074ca5072bbAC773960dFa36\n    WBTC/WETH 0.30% (V3)  — 0xCBCdF9626bC03E24f779434178A73a0B4bad62eD\n\n  Private Keys (for wallet config):\n    Account #1: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80\n    Account #2: 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d\n    Account #3: 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a\n\nStep 5: Suggest Next Steps\n\nAlways end with actionable follow-ups:\n\n  Next Steps:\n  - Create a custom pool: \"Create a WETH/DAI pool with thin liquidity\"\n  - Test time-dependent logic: \"Advance time by 7 days\"\n  - Test a swap: \"Get a quote for 1 WETH → USDC on the local testnet\"\n  - Fund more tokens: \"Fund account #1 with 10,000 WBTC\"\n  - Configure your MCP server: Set RPC_URL_1=http://127.0.0.1:8545 in .env\n\nImportant Notes\nAnvil must be installed. This skill requires Foundry's Anvil. If not installed, provide the installation command.\nFork mode requires network access. The initial fork downloads state from the live chain's RPC. Subsequent operations are local.\nPort conflicts are handled automatically. If port 8545 is in use, the tool finds the next available port.\nPrevious testnets are cleaned up. Starting a new testnet kills any existing one.\nPrivate keys are Anvil defaults. These are well-known test keys -- never use them on mainnet.\nThe testnet persists until the MCP server process exits or a new testnet is started.\nError Handling\nError\tUser-Facing Message\tSuggested Action\nTESTNET_ANVIL_NOT_FOUND\t\"Anvil (Foundry) is not installed.\"\tInstall: curl -L https://foundry.paradigm.xyz | bash && foundryup\nTESTNET_STARTUP_TIMEOUT\t\"Anvil did not start within 30s. Fork RPC may be unreachable.\"\tCheck network, try a different chain, or retry\nTESTNET_INVALID_FORK_CHAIN\t\"Chain X is not supported for forking.\"\tUse ethereum, base, arbitrum, optimism, or polygon\nTESTNET_MOCK_NOT_IMPLEMENTED\t\"Mock mode is not yet implemented.\"\tUse fork mode instead\nTESTNET_SETUP_FAILED\t\"Failed to set up testnet: {reason}\"\tCheck Anvil installation and network access"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/wpank/setup-local-testnet",
    "publisherUrl": "https://clawhub.ai/wpank/setup-local-testnet",
    "owner": "wpank",
    "version": "0.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/setup-local-testnet",
    "downloadUrl": "https://openagent3.xyz/downloads/setup-local-testnet",
    "agentUrl": "https://openagent3.xyz/skills/setup-local-testnet/agent",
    "manifestUrl": "https://openagent3.xyz/skills/setup-local-testnet/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/setup-local-testnet/agent.md"
  }
}