Arc Foundry tools for replaying failed transactions, forking testnet state, and testing USDC interactions locally.
Arc Foundry extends standard Foundry with Arc-specific precompile logic.
Standard Foundry tools simulate a generic EVM and can’t reproduce Arc-specific
failures like blocklisted address reverts or native USDC transfer errors. The
Arc Foundry tool you use depends on your debugging scenario.
arc-cast run replays a transaction at the block it was included in, showing
the exact revert reason, call trace, and state changes. Unlike standard
cast run, it includes Arc’s precompile logic, so it can reproduce reverts from
blocklisted addresses, failed native USDC transfers, and other Arc-specific
conditions.
arc-cast run <TX_HASH> \ --rpc-url $ARC_TESTNET_RPC_URL
arc-anvil --fork-url starts a local node seeded with a snapshot of testnet
state. You can call contracts, send transactions, and impersonate accounts
without spending gas or waiting for block inclusion.
arc-anvil --fork-url $ARC_TESTNET_RPC_URL
Forking from https://rpc.testnet.arc.io (block 2041837)Listening on 127.0.0.1:8545
Once the fork is running, arc-forge test and arc-cast can target it. You can
also call contracts directly:
Fork a specific block to reproduce a historical issue: pass
--fork-block-number <BLOCK> to arc-anvil. The local node serves the chain
state exactly as it appeared at that block.
arc-forge test --fork-url runs your test suite against a live fork of Arc
testnet. A test that passes on standard anvil can still revert on Arc if your
contract treats msg.value and USDC.balanceOf as independent amounts. Both
views share one balance, but msg.value uses 18 decimals while USDC.balanceOf
uses 6 (see EVM differences for details).
Standard anvil doesn’t simulate this.
arc-forge test --fork-url $ARC_TESTNET_RPC_URL
Ran 2 tests for test/MyToken.t.sol:MyTokenTest[PASS] testNativeTransfer() (gas: 51203)[PASS] testUSDCBalance() (gas: 34821)Suite result: ok. 2 passed; 0 failed
If any test fails, check whether your contract assumes separate native and
ERC-20 balances. On Arc, msg.value and USDC.balanceOf reflect the same
underlying balance at different decimal precisions. Adjust your assertions to
account for the 18-to-6 decimal conversion.For more information about how Arc transactions behave differently from other
EVM blockchains, see EVM differences.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Arc Docs","description":"Documentation for Arc, Circle's purpose-built blockchain for stablecoin-native financial applications.","colors":{"primary":"#3E74BB","light":"#ACC6E9","dark":"#ACC6E9"},"logo":{"light":"https://mintcdn.com/arcio-docs/ZZqL_C61H0lLVlWZ/logo/ARC_Doc_FC.svg?fit=max\u0026auto=format\u0026n=ZZqL_C61H0lLVlWZ\u0026q=85\u0026s=6d67e0bee7674d1506373511501be1cd","dark":"https://mintcdn.com/arcio-docs/ZZqL_C61H0lLVlWZ/logo/ARC_Doc_WHT.svg?fit=max\u0026auto=format\u0026n=ZZqL_C61H0lLVlWZ\u0026q=85\u0026s=9dcbd3e55a573935fd32d7396c2396dd"},"favicon":"https://mintcdn.com/arcio-docs/ZZqL_C61H0lLVlWZ/favicon.ico?fit=max\u0026auto=format\u0026n=ZZqL_C61H0lLVlWZ\u0026q=85\u0026s=789e04a512ddc7c8a9d8a943e8d39c42","appearance":{"default":"dark"},"navbar":{"links":[{"href":"https://faucet.circle.com","label":"Faucet"},{"href":"https://explorer.arc.io","label":"Block explorer"}]},"footer":{"socials":{"x":"https://x.com/arc","discord":"https://discord.com/invite/buildonarc"},"links":[{"header":"Links","items":[{"label":"Network status","href":"https://status.arc.io"},{"label":"Blog","href":"https://arc.io/blog"},{"label":"Community","href":"https://arc.io/community"},{"label":"Arc homepage","href":"https://arc.io"}]},{"header":"Resources","items":[{"label":"Terms of service","href":"https://docs.arc.io/terms"},{"label":"Privacy policy","href":"https://www.circle.com/en/legal/privacy-policy"},{"label":"Cookie policy","href":"https://www.circle.com/en/legal/cookie-policy"},{"label":"llms.txt","href":"https://docs.arc.io/llms.txt"}]}]},"seo":{"metatags":{"og:image":"https://docs.arc.io/arc-docs.jpg","twitter:image":"https://docs.arc.io/arc-docs.jpg","canonical":"https://docs.arc.io"}},"fonts":{"heading":{"family":"Space Grotesk"},"body":{"family":"DM Sans"}},"banner":{"content":"Arc Mainnet is now live. Arc is EVM compatible with some unique differences—review [EVM differences](https://docs.arc.io/arc/references/evm-differences) before building.","type":"warning"},"contextual":{"options":["copy","chatgpt","claude","view"],"display":"header"},"markdown":{"instructions":["Before reading these docs, install the Circle Skill for Arc to get pre-loaded context: use-arc (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-arc/SKILL.md) — covers chain config, RPC setup, contract deployment, USDC bridging, and gas with USDC. In Claude Code: run /plugin marketplace add circlefin/skills then /plugin install circle-skills@circle. With Vercel Skills CLI: run npx skills add circlefin/skills.","USDC is the gas token. Arc uses USDC for gas fees, not ETH. Configure gas payment in USDC when submitting transactions.","Read EVM differences before writing Arc code. Arc targets the Osaka EVM baseline. Most contracts deploy unchanged, but several runtime behaviors diverge from Ethereum: USDC uses 18 decimals natively (not 6), the system emitter `0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE` logs all USDC Transfer events, the mempool enforces a 20 Gwei `maxFeePerGas` floor, blocklist reverts consume gas without a receipt, and `address(0)` sends revert rather than succeed. https://docs.arc.io/arc/references/evm-differences.md is the canonical reference for all Arc-specific runtime behaviors. Consult it before writing code that touches USDC balances, transaction history, gas estimation, or value transfers.","Sub-second finality. Transactions are final in under 1 second. No need to wait for multiple block confirmations.","Use App Kits for multichain payment and liquidity capabilities. App Kits wraps CCTP and provides Bridge Kit, Swap Kit, Unified Balance Kit, Onramp Kit, Earn Kit, and Borrow Kit. Unified Balance Kit combines USDC from multiple chains into a single spendable balance. Earn Kit integrates earn opportunities into your app. Borrow Kit lets users borrow USDC against cirBTC collateral on Arc.","Use Arc Foundry for contract development. Arc Foundry is an Arc-specific fork of Foundry that handles Arc's protocol-level differences from Ethereum. It provides arc-forge, arc-cast, and arc-anvil. Install it before deploying contracts: https://docs.arc.io/arc/tutorials/install-arc-foundry.md.","Arc is available on both Testnet and Mainnet. See https://docs.arc.io/arc/references/connect-to-arc.md for RPC endpoints and https://faucet.circle.com for testnet tokens.","Always check Contract Addresses: https://docs.arc.io/arc/references/contract-addresses.md","Building beyond Arc? Circle offers skills for the full platform: use-usdc (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-usdc/SKILL.md), use-circle-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-circle-wallets/SKILL.md), use-developer-controlled-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-developer-controlled-wallets/SKILL.md), use-user-controlled-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-user-controlled-wallets/SKILL.md), use-modular-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-modular-wallets/SKILL.md), use-gateway (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-gateway/SKILL.md), use-smart-contract-platform (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-smart-contract-platform/SKILL.md). Full Circle developer docs: https://developers.circle.com/llms.txt."]},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"arcio-docs","hasAudioNarration":false,"actualSubdomain":"arcio-docs","customDomains":["docs.arc.io"],"gitSource":{"type":"github","owner":"crcl-main","repo":"arc-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aecbdb93990c037f25ab435","collectionId":"acd8b90d-d700-40de-8724-6c55b5102112","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aecbdb93990c037f25ab435"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aee43da80381b6ec0c0c346","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"App Kits","count":70},{"language":"default","tag":"Build","count":32},{"language":"default","tag":"Integrate","count":30},{"language":"default","tag":"Arc Network","count":17},{"language":"default","tag":"Borrow","count":14},{"language":"default","tag":"Unified Balance","count":13},{"language":"default","tag":"Quickstarts","count":12},{"language":"default","tag":"Bridge","count":10},{"language":"default","tag":"Swap","count":10},{"language":"default","tag":"Network","count":9}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"/* vietnamese */\n@font-face {\n font-family: 'Space Grotesk';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/spacegrotesk/v22/V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj7aUXsrPMBTTA.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Space Grotesk';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/spacegrotesk/v22/V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj7aUXsqPMBTTA.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Space Grotesk';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/spacegrotesk/v22/V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj7aUXskPMA.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n#body-content,#body-content p,#body-content li,#body-content td,#body-content th,#content-container,#content-container p,#content-container li,#content-container td,#content-container th,#content-area,#content-area p,#content-area li{font-family:var(--font-body, \"DM Sans\", sans-serif)!important;font-weight:400!important;font-style:normal!important;font-size:1rem!important;line-height:1.5!important;letter-spacing:0!important;vertical-align:middle!important}.dark #body-content,.dark #body-content p,.dark #body-content li,.dark #body-content td,.dark #body-content th,.dark #content-container,.dark #content-container p,.dark #content-container li,.dark #content-container td,.dark #content-container th,.dark #content-area,.dark #content-area p,.dark #content-area li{color:#F5F5F8!important}.code-block pre,.code-block code,#body-content pre,#body-content code,#content-container pre,#content-container code,#content-area pre,#content-area code{font-family:ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace!important;font-size:revert!important;line-height:revert!important;font-weight:revert!important;font-style:revert!important;letter-spacing:normal!important;vertical-align:baseline!important}#body-content h1,#content-container h1,#content-area h1{font-family:\"Space Grotesk\", sans-serif!important;font-weight:500!important}#body-content h2,#body-content h3,#body-content h4,#body-content h5,#body-content h6,#content-container h2,#content-container h3,#content-container h4,#content-container h5,#content-container h6,#content-area h2,#content-area h3,#content-area h4,#content-area h5,#content-area h6{font-family:var(--font-heading, \"DM Sans\", sans-serif)!important;font-weight:500!important}.dark #body-content h1,.dark #body-content h2,.dark #body-content h3,.dark #body-content h4,.dark #body-content h5,.dark #body-content h6,.dark #content-container h1,.dark #content-container h2,.dark #content-container h3,.dark #content-container h4,.dark #content-container h5,.dark #content-container h6,.dark #content-area h1,.dark #content-area h2,.dark #content-area h3,.dark #content-area h4,.dark #content-area h5,.dark #content-area h6{color:#FFFFFF!important}html.dark,html.dark body,body.dark,[data-theme=\"dark\"],[data-theme=\"dark\"] body{background:linear-gradient(180deg, #0D1B2F 0%, #0D1B2F 60%, #19354D 100%)!important;background-attachment:fixed}.dark #sidebar,.dark .sidebar,html.dark #sidebar,html.dark .sidebar,[data-theme=\"dark\"] #sidebar,[data-theme=\"dark\"] .sidebar{background:transparent!important}#sidebar-content .sticky.top-0,.dark #sidebar-content .sticky.top-0,html.dark #sidebar-content .sticky.top-0,[data-theme=\"dark\"] #sidebar-content .sticky.top-0{background:transparent!important;background-image:none!important}.build_ai_app_container .banner_div{background:linear-gradient(\n 332.46deg,\n rgba(144, 158, 158, 0.5) -12.26%,\n rgba(224, 162, 92, 0.5) 3.61%,\n rgba(220, 162, 96, 0.5) 30.33%,\n rgba(177, 166, 139, 0.5) 49.27%,\n rgba(151, 159, 155, 0.5) 74.49%,\n rgba(133, 152, 158, 0.5) 96.19%\n )}.dark .build_ai_app_container .banner_div,.dark .usecase_card .image_div{background:#0D1B2F}.build_ai_app_container a,a.get_started_btn{border-bottom:none!important}#content-area a[href^=\"https://origin.arc.io\"]{border-bottom:none!important}.banner_card span{display:block;line-height:1.5}.usecase_card .image_div{background:linear-gradient(\n 304.23deg,\n rgba(144, 158, 158, 0.5) 0.23%,\n rgba(224, 162, 92, 0.5) 15.13%,\n rgba(177, 166, 139, 0.5) 39.96%,\n rgba(151, 159, 155, 0.5) 71.24%,\n rgba(133, 152, 158, 0.5) 102.03%\n )}.dark .card{background:#1F2F44!important;border-color:rgba(255, 255, 255, 0.1)!important}.dark .card:hover{border-color:#ACC6E9!important}.dark .card svg:not(#card-link-arrow-icon svg):not(.second_path),.dark .card svg path:not(#card-link-arrow-icon svg path):not(.second_path),.dark .card h2{color:#ACC6E9!important;fill:#ACC6E9!important;stroke:#ACC6E9!important}.dark #content-area [class*=\"mint-bg-white\"],.dark #content [class*=\"mint-bg-white\"]{background-color:#1F2F44!important}.dark #content-area [class*=\"mint-bg-white\"][class*=\"mint-border\"],.dark #content [class*=\"mint-bg-white\"][class*=\"mint-border\"]{border-color:rgba(255, 255, 255, 0.1)!important}.dark #content-area [class*=\"mint-bg-white\"]:hover,.dark #content [class*=\"mint-bg-white\"]:hover{border-color:#ACC6E9!important}.dark #content-area [class*=\"mint-bg-gray-50\"],.dark #content [class*=\"mint-bg-gray-50\"]{background-color:#1F2F44!important}.dark #content-area [class*=\"mint-bg-gray-50\"][class*=\"mint-border\"],.dark #content [class*=\"mint-bg-gray-50\"][class*=\"mint-border\"]{border-color:rgba(255, 255, 255, 0.1)!important}.dark #content-area [class*=\"mint-bg-gray-50\"]:hover,.dark #content [class*=\"mint-bg-gray-50\"]:hover{background-color:rgba(95, 191, 255, 0.1)!important;border-color:#ACC6E9!important}.dark #page-context-menu *,.dark div[data-radix-popper-content-wrapper] *,.dark .card,.dark .accordion,.dark .accordion-group,.dark .code-block>:nth-child(2),.dark .code-block>:nth-child(3),.dark div[role=\"tabpanel\"]:has(>div[data-component-part=\"code-block-root\"])>:first-child{background:#1F2F44!important}.dark .accordion>:first-child:hover,.dark .accordion>:first-child:focus-visible{background:rgba(95, 191, 255, 0.15)!important}.dark .accordion-group{border-color:rgba(255, 255, 255, 0.1)!important}.dark .accordion-group details{border-color:rgba(255, 255, 255, 0.1)!important}.dark #search-bar-entry,.dark #assistant-entry,.dark #chat-assistant-sheet,.dark #mobile-nav,.dark div:has(>div>#chat-assistant-textarea),.dark .nav-anchor>div:has(>svg){background:#0D1B2F!important}.dark div[id^=\"headlessui-dialog-panel\"],.dark div[id^=\"headlessui-dialog-panel\"]>*,.dark div[id^=\"headlessui-dialog-panel\"] [class*=\"bg-background\"]{background:#0D1B2F!important}.dark .chat-assistant-floating-input::before{background:transparent!important}::-webkit-scrollbar{display:none}html{scrollbar-width:none}.dark #navbar>* :not(#banner):not(.nav-tabs-item[data-active]>div):not(.nav-tabs-item:hover>div){background:transparent!important}:focus-visible{outline:2px solid #3E74BB!important;outline-offset:2px!important}.dark :focus-visible{outline:2px solid #ACC6E9!important;outline-offset:2px!important}html:not(.dark) #navigation-items a[class*=\"bg-primary\"]{color:#3669AE!important}#navigation-items a:not([class*=\"bg-primary\"]){color:#6b6580!important}.dark #navigation-items a:not([class*=\"bg-primary\"]){color:#C7C5D1!important}#navbar nav a,#navbar a.nav-tabs-item{color:#6b6580!important}.dark #navbar nav a,.dark #navbar a.nav-tabs-item{color:#C7C5D1!important}#search-bar-entry{color:#6b6580!important}.dark #search-bar-entry{color:#C7C5D1!important}#table-of-contents a{color:#6b6580!important}.dark #table-of-contents a{color:#C7C5D1!important}#content-area .mint-text-center>div[class*=\"mint-justify-center\"]{display:none!important}#content-area h1[class*=\"mint-text-\"]{font-size:3rem!important;line-height:3rem!important;font-weight:100!important}#content-area h2[class*=\"mint-text-\"]{font-size:1.5rem!important;line-height:1.75rem!important;font-weight:300!important}[data-testid^=\"mode-switch\"]{color:#4b5563!important}.dark [data-testid^=\"mode-switch\"]{color:#A7A3B5!important}.dark .callout[data-callout-type=\"note\"]{background:#1894E84D!important;border-color:#88B0E6!important}.dark .callout[data-callout-type=\"note\"]>div{color:#FFFFFF!important}.dark .callout[data-callout-type=\"note\"] svg{color:#88B0E6!important}.dark .callout[data-callout-type=\"tip\"],.dark .callout[data-callout-type=\"check\"]{background:#62E2A433!important;border-color:#8DD89F!important}.dark .callout[data-callout-type=\"tip\"] svg,.dark .callout[data-callout-type=\"check\"] svg{color:#8DD89F!important}.dark .callout[data-callout-type=\"warning\"]{background:#FED74D33!important;border-color:#FFE27C!important}.dark .callout[data-callout-type=\"warning\"] svg{color:#FFE27C!important}.dark .callout[data-callout-type=\"caution\"],.dark .callout[data-callout-type=\"danger\"]{background:#D42C3D4D!important;border-color:#E86D7A!important}.dark .callout[data-callout-type=\"caution\"] svg,.dark .callout[data-callout-type=\"danger\"] svg{color:#E86D7A!important}#footer a[class*=\"text-gray-950\"],#footer a[class*=\"text-white\"],#footer a[class*=\"text-gray-400\"],#footer a[class*=\"text-gray-500\"]{color:#6b6580!important}.dark #footer a[class*=\"text-gray-950\"],.dark #footer a[class*=\"text-white\"],.dark #footer a[class*=\"text-gray-400\"],.dark #footer a[class*=\"text-gray-500\"]{color:#C7C5D1!important}#footer svg[style*=\"mask-image\"],#footer svg.bg-gray-500,#footer svg.bg-gray-600{background-color:#6b6580!important}#footer a:hover svg[style*=\"mask-image\"],#footer a:hover svg.bg-gray-500,#footer a:hover svg.bg-gray-600{background-color:#4a4560!important}.dark #footer svg[style*=\"mask-image\"],.dark #footer svg.bg-gray-500,.dark #footer svg.bg-gray-600{background-color:#C7C5D1!important}.dark #footer a:hover svg[style*=\"mask-image\"],.dark #footer a:hover svg.bg-gray-500,.dark #footer a:hover svg.bg-gray-600{background-color:#e5e4ed!important}#footer>div>div:has(a[href*=\"mintlify\"]){display:none!important}.cw-card{background:#f5f7fa;border:1px solid rgba(0, 0, 0, 0.08)}.dark .cw-card{background:#1F2F44;border-color:rgba(255, 255, 255, 0.1)}.cw-btn-primary{background:#3E74BB;color:#ffffff;transition:background 0.15s ease}.cw-btn-primary:hover{background:#34649f}.dark .cw-btn-primary{color:#F5F5F8}.dark .cw-btn-primary:hover{background:#4a82cc}.cw-btn-primary:disabled{opacity:0.6;cursor:not-allowed}.cw-text-accent{color:#3E74BB}.dark .cw-text-accent{color:#ACC6E9}.cw-text-body{color:#1a1a2e}.dark .cw-text-body{color:#F5F5F8}.cw-text-subtle{color:#6b6580}.dark .cw-text-subtle{color:#C7C5D1}.cw-badge-connected{background:rgba(34, 197, 94, 0.1);color:#16a34a}.dark .cw-badge-connected{background:rgba(98, 226, 164, 0.2);color:#8DD89F}.cw-icon{color:#3E74BB}.dark .cw-icon{color:#ACC6E9}.cw-error{color:#dc2626}.dark .cw-error{color:#E86D7A}.cw-wallet-option{background:rgba(0, 0, 0, 0.03)}.cw-wallet-option:hover{background:rgba(0, 0, 0, 0.07)}.dark .cw-wallet-option{background:rgba(255, 255, 255, 0.05)}.dark .cw-wallet-option:hover{background:rgba(255, 255, 255, 0.1)}.cw-wallet-icon-fallback{background:rgba(62, 116, 187, 0.1)}.dark .cw-wallet-icon-fallback{background:rgba(172, 198, 233, 0.15)}#arc-faucet-modal{position:fixed;z-index:9999;opacity:0;transform:translateY(-8px);transition:opacity 180ms ease-in-out, transform 180ms ease-in-out;pointer-events:none}#arc-faucet-modal.arc-faucet-modal-visible{opacity:1;transform:translateY(0);pointer-events:auto}#arc-faucet-modal[hidden]{display:none!important}.arc-faucet-dialog{position:relative;width:100%;height:100%;background:#ffffff;border:1px solid rgba(13, 27, 47, 0.08);border-radius:12px;box-shadow:0 16px 40px rgba(8, 14, 26, 0.18),\n 0 4px 12px rgba(8, 14, 26, 0.10);overflow:hidden;outline:none;display:flex;flex-direction:column}.dark .arc-faucet-dialog,[data-theme=\"dark\"] .arc-faucet-dialog,html.dark .arc-faucet-dialog{background:#0d1b2f;border-color:rgba(255, 255, 255, 0.08);box-shadow:0 16px 40px rgba(0, 0, 0, 0.5),\n 0 4px 12px rgba(0, 0, 0, 0.3)}.arc-faucet-close{position:absolute;top:10px;right:10px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:0;border-radius:50%;background:rgba(13, 27, 47, 0.06);color:#0d1b2f;cursor:pointer;transition:background 120ms ease-in-out}.arc-faucet-close:hover{background:rgba(13, 27, 47, 0.12)}.dark .arc-faucet-close,[data-theme=\"dark\"] .arc-faucet-close,html.dark .arc-faucet-close{background:rgba(255, 255, 255, 0.08);color:#f5f5f8}.dark .arc-faucet-close:hover,[data-theme=\"dark\"] .arc-faucet-close:hover,html.dark .arc-faucet-close:hover{background:rgba(255, 255, 255, 0.16)}.arc-faucet-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:var(--font-body, \"DM Sans\", sans-serif);font-size:0.875rem;color:#6b6580}.dark .arc-faucet-loading,[data-theme=\"dark\"] .arc-faucet-loading,html.dark .arc-faucet-loading{color:#c7c5d1}.arc-faucet-iframe{flex:1 1 auto;width:100%;height:100%;border:0;background:transparent}.arc-faucet-picker{display:none;flex:1 1 auto;flex-direction:column;padding:14px;padding-top:44px;overflow:hidden}.arc-faucet-dialog[data-view=\"picker\"] .arc-faucet-iframe{display:none}.arc-faucet-dialog[data-view=\"picker\"] .arc-faucet-loading{display:none}.arc-faucet-dialog[data-view=\"picker\"] .arc-faucet-picker{display:flex}.arc-faucet-picker-header{display:flex;align-items:center;gap:10px;margin-bottom:12px}.arc-faucet-picker-back{background:transparent;border:0;padding:4px 8px;margin-left:-8px;font-size:0.875rem;color:#6b6580;cursor:pointer;border-radius:6px}.arc-faucet-picker-back:hover{background:rgba(13, 27, 47, 0.06)}.dark .arc-faucet-picker-back,[data-theme=\"dark\"] .arc-faucet-picker-back,html.dark .arc-faucet-picker-back{color:#c7c5d1}.dark .arc-faucet-picker-back:hover,[data-theme=\"dark\"] .arc-faucet-picker-back:hover,html.dark .arc-faucet-picker-back:hover{background:rgba(255, 255, 255, 0.08)}.arc-faucet-picker-title{font-family:var(--font-body, \"DM Sans\", sans-serif);font-size:0.9375rem;font-weight:600;color:#0d1b2f}.dark .arc-faucet-picker-title,[data-theme=\"dark\"] .arc-faucet-picker-title,html.dark .arc-faucet-picker-title{color:#f5f5f8}.arc-faucet-picker-list{display:flex;flex-direction:column;gap:4px;overflow-y:auto}.arc-faucet-picker-option{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:8px;background:transparent;border:0;cursor:pointer;text-align:left;font:inherit;color:#0d1b2f;transition:background 120ms ease-in-out}.arc-faucet-picker-option:hover,.arc-faucet-picker-option:focus-visible{background:rgba(13, 27, 47, 0.06)}.arc-faucet-picker-option:disabled{opacity:0.5;cursor:default}.arc-faucet-picker-option img{width:28px;height:28px;border-radius:6px}.dark .arc-faucet-picker-option,[data-theme=\"dark\"] .arc-faucet-picker-option,html.dark .arc-faucet-picker-option{color:#f5f5f8}.dark .arc-faucet-picker-option:hover,.dark .arc-faucet-picker-option:focus-visible,[data-theme=\"dark\"] .arc-faucet-picker-option:hover,[data-theme=\"dark\"] .arc-faucet-picker-option:focus-visible,html.dark .arc-faucet-picker-option:hover,html.dark .arc-faucet-picker-option:focus-visible{background:rgba(255, 255, 255, 0.08)}.arc-faucet-picker-error,.arc-faucet-picker-empty{font-family:var(--font-body, \"DM Sans\", sans-serif);font-size:0.8125rem;margin:8px 0 0}.arc-faucet-picker-error{color:#c5462d}.arc-faucet-picker-empty{color:#6b6580}.arc-faucet-picker-empty a{color:inherit;text-decoration:underline}.dark .arc-faucet-picker-error,[data-theme=\"dark\"] .arc-faucet-picker-error,html.dark .arc-faucet-picker-error{color:#ff8c70}.dark .arc-faucet-picker-empty,[data-theme=\"dark\"] .arc-faucet-picker-empty,html.dark .arc-faucet-picker-empty{color:#c7c5d1}@media (max-width: 520px){#arc-faucet-modal{top:auto!important;bottom:0;left:0;right:0!important;transform:translateY(100%)}#arc-faucet-modal.arc-faucet-modal-visible{transform:translateY(0)}.arc-faucet-dialog{border-radius:16px 16px 0 0;width:100%;height:min(85vh, 540px)}.arc-faucet-dialog::before{content:\"\";display:block;flex:0 0 auto;width:36px;height:4px;background:rgba(13, 27, 47, 0.18);border-radius:2px;margin:8px auto 4px}.dark .arc-faucet-dialog::before,[data-theme=\"dark\"] .arc-faucet-dialog::before,html.dark .arc-faucet-dialog::before{background:rgba(255, 255, 255, 0.24)}.arc-faucet-picker{padding-top:12px}}.cw-picker-row:hover,.cw-picker-row:focus-visible{background:rgba(13, 27, 47, 0.06)}.dark .cw-picker-row:hover,.dark .cw-picker-row:focus-visible{background:rgba(255, 255, 255, 0.08)}.node-fee-manager rect{fill:#e8f5e9!important;stroke:#2e7d32!important}.dark .node-fee-manager rect{fill:#032b06!important}.node-module-calls rect{fill:#f5f5f5!important;stroke:#999!important;stroke-dasharray:5 5!important}.dark .node-module-calls rect{fill:#4d4d4d!important}.node-submit rect{fill:#f5f5f5!important;stroke:#333!important}.dark .node-submit rect{fill:#4d4d4d!important}.node-finalized rect{fill:#e8f5e9!important;stroke:#2e7d32!important}.dark .node-finalized rect{fill:#032b06!important}html[data-current-path=\"/\"] .nav-tabs-item[data-active]>div{background:transparent!important}html[data-current-path=\"/\"] .nav-tabs-item[data-active]:hover>div{background:#e5e7eb!important}html.dark[data-current-path=\"/\"] .nav-tabs-item[data-active]:hover>div{background:#374151!important}html[data-current-path=\"/\"] #navbar a.nav-tabs-item[data-active]{text-shadow:none!important}#your-privacy-choices-button{position:relative;align-self:start;font-size:0.875rem!important;font-family:inherit}#your-privacy-choices-button::after{content:url(\"https://6778953.fs1.hubspotusercontent-na1.net/hubfs/6778953/legal/opt-out-30x14.svg\");right:-34px;position:absolute}"}],"page":{"pagePath":"arc/tutorials/troubleshoot-with-arc-foundry","slug":"/arc/tutorials/troubleshoot-with-arc-foundry","pageMetadata":{"title":"Troubleshoot with Arc Foundry","sidebarTitle":"Troubleshoot with Arc Foundry","description":"Arc Foundry tools for replaying failed transactions, forking testnet state, and testing USDC interactions locally.","href":"/arc/tutorials/troubleshoot-with-arc-foundry"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Arc Foundry tools for replaying failed transactions, forking testnet state, and testing USDC interactions locally.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Arc Foundry extends standard Foundry with Arc-specific precompile logic.\nStandard Foundry tools simulate a generic EVM and can’t reproduce Arc-specific\nfailures like blocklisted address reverts or native USDC transfer errors. The\nArc Foundry tool you use depends on your debugging scenario.`}),`\n`,_jsx(Heading,{level:`2`,id:`replay-failed-transactions`,children:`Replay failed transactions`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`arc-cast run`}),` replays a transaction at the block it was included in, showing\nthe exact revert reason, call trace, and state changes. Unlike standard\n`,_jsx(_components.code,{children:`cast run`}),`, it includes Arc’s precompile logic, so it can reproduce reverts from\nblocklisted addresses, failed native USDC transfers, and other Arc-specific\nconditions.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`arc-cast`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`TX_HAS`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`H`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --rpc-url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $ARC_TESTNET_RPC_URL`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Traces:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` [34521] YourContract::yourFunction()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ├─ [1200] \u003cArc precompile>::transfer(0xBlocklistedAddr, 1000000000000)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ └─ ← [Revert] \"Blocklisted address\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` └─ ← [Revert]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`fork-testnet-state`,children:`Fork testnet state`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`arc-anvil --fork-url`}),` starts a local node seeded with a snapshot of testnet\nstate. You can call contracts, send transactions, and impersonate accounts\nwithout spending gas or waiting for block inclusion.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`arc-anvil`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --fork-url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $ARC_TESTNET_RPC_URL`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Forking from https://rpc.testnet.arc.io (block 2041837)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Listening on 127.0.0.1:8545`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Once the fork is running, `,_jsx(_components.code,{children:`arc-forge test`}),` and `,_jsx(_components.code,{children:`arc-cast`}),` can target it. You can\nalso call contracts directly:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`arc-cast`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` call`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`YOUR_CONTRACT_ADDRES`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`S`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"myFunction()(uint256)\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --rpc-url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` http://127.0.0.1:8545`})]}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Fork a specific block to reproduce a historical issue: pass\n`,_jsx(_components.code,{children:`--fork-block-number \u003cBLOCK>`}),` to `,_jsx(_components.code,{children:`arc-anvil`}),`. The local node serves the chain\nstate exactly as it appeared at that block.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`test-usdc-interactions`,children:`Test USDC interactions`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`arc-forge test --fork-url`}),` runs your test suite against a live fork of Arc\ntestnet. A test that passes on standard `,_jsx(_components.code,{children:`anvil`}),` can still revert on Arc if your\ncontract treats `,_jsx(_components.code,{children:`msg.value`}),` and `,_jsx(_components.code,{children:`USDC.balanceOf`}),` as independent amounts. Both\nviews share one balance, but `,_jsx(_components.code,{children:`msg.value`}),` uses 18 decimals while `,_jsx(_components.code,{children:`USDC.balanceOf`}),`\nuses 6 (see `,_jsx(_components.a,{href:`/arc/references/evm-differences`,children:`EVM differences`}),` for details).\nStandard `,_jsx(_components.code,{children:`anvil`}),` doesn’t simulate this.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`arc-forge`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` test`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --fork-url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $ARC_TESTNET_RPC_URL`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Ran 2 tests for test/MyToken.t.sol:MyTokenTest`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`[PASS] testNativeTransfer() (gas: 51203)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`[PASS] testUSDCBalance() (gas: 34821)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Suite result: ok. 2 passed; 0 failed`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`If any test fails, check whether your contract assumes separate native and\nERC-20 balances. On Arc, `,_jsx(_components.code,{children:`msg.value`}),` and `,_jsx(_components.code,{children:`USDC.balanceOf`}),` reflect the same\nunderlying balance at different decimal precisions. Adjust your assertions to\naccount for the 18-to-6 decimal conversion.`]}),`\n`,_jsxs(_components.p,{children:[`For more information about how Arc transactions behave differently from other\nEVM blockchains, see `,_jsx(_components.a,{href:`/arc/references/evm-differences`,children:`EVM differences`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Troubleshoot with Arc Foundry","sidebarTitle":"Troubleshoot with Arc Foundry","description":"Arc Foundry tools for replaying failed transactions, forking testnet state, and testing USDC interactions locally.","href":"/arc/tutorials/troubleshoot-with-arc-foundry"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Replay failed transactions","slug":"replay-failed-transactions","depth":2,"children":[]},{"title":"Fork testnet state","slug":"fork-testnet-state","depth":2,"children":[]},{"title":"Test USDC interactions","slug":"test-usdc-interactions","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/arcio-docs/8f78290d7c60f1f5/disclaimer-injector.js","/_mintlify/custom/arcio-docs/6ce1304cc70cc9ee/faucet-modal-injector.js","/_mintlify/custom/arcio-docs/f10ce4190f460fce/wallet-bus.js","/_mintlify/custom/arcio-docs/c8e2350d52e1c966/gtm.js"],"subdomain":"arcio-docs","siteName":"Arc Docs","title":"Troubleshoot with Arc Foundry - Arc Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-22T23:19:34.928Z","originalFileLocation":"arc/tutorials/troubleshoot-with-arc-foundry.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Arc Foundry tools for replaying failed transactions, forking testnet state, and testing USDC interactions locally.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Arc Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Troubleshoot with Arc Foundry - Arc Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Arc Foundry tools for replaying failed transactions, forking testnet state, and testing USDC interactions locally.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Arc Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.arc.io/arc/tutorials/troubleshoot-with-arc-foundry\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.arc.io/arc-docs.jpg\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Troubleshoot with Arc Foundry - Arc Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Arc Foundry tools for replaying failed transactions, forking testnet state, and testing USDC interactions locally.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.arc.io/arc-docs.jpg\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/arcio-docs/ugo0LlJBZEAW3ukk/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Arc Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3E74BB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.arc.io/arc/tutorials/troubleshoot-with-arc-foundry\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/arc/tutorials/troubleshoot-with-arc-foundry.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.arc.io/#organization\",\"name\":\"Arc Docs\",\"url\":\"https://docs.arc.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/arcio-docs/ZZqL_C61H0lLVlWZ/logo/ARC_Doc_FC.svg?fit=max\u0026auto=format\u0026n=ZZqL_C61H0lLVlWZ\u0026q=85\u0026s=6d67e0bee7674d1506373511501be1cd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.arc.io#website\",\"name\":\"Arc Docs\",\"url\":\"https://docs.arc.io\",\"publisher\":{\"@id\":\"https://docs.arc.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.arc.io/arc/tutorials/troubleshoot-with-arc-foundry#webpage\",\"url\":\"https://docs.arc.io/arc/tutorials/troubleshoot-with-arc-foundry\",\"name\":\"Troubleshoot with Arc Foundry\",\"description\":\"Arc Foundry tools for replaying failed transactions, forking testnet state, and testing USDC interactions locally.\",\"dateModified\":\"2026-09-22T23:19:34.928Z\",\"isPartOf\":{\"@id\":\"https://docs.arc.io#website\"}},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.arc.io/arc/tutorials/troubleshoot-with-arc-foundry#article\",\"headline\":\"Troubleshoot with Arc Foundry\",\"name\":\"Troubleshoot with Arc Foundry\",\"description\":\"Arc Foundry tools for replaying failed transactions, forking testnet state, and testing USDC interactions locally.\",\"url\":\"https://docs.arc.io/arc/tutorials/troubleshoot-with-arc-foundry\",\"mainEntityOfPage\":{\"@id\":\"https://docs.arc.io/arc/tutorials/troubleshoot-with-arc-foundry#webpage\"},\"image\":\"https://docs.arc.io/arc-docs.jpg\",\"dateModified\":\"2026-09-22T23:19:34.928Z\",\"publisher\":{\"@id\":\"https://docs.arc.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.arc.io#website\"}}]}\u003c/script>","siteName":"Arc Docs","nav":{"global":null,"tabs":[{"tab":"Arc Network","pages":[{"title":"Arc Network","href":"/arc-chain"}]},{"tab":"Integrate","pages":[{"title":"Integrate","href":"/integrate"}]},{"tab":"Build","pages":[{"title":"Build on Arc","sidebarTitle":"Overview","href":"/build"},{"title":"Connect to Arc","href":"/arc/references/connect-to-arc"},{"title":"How-to: Install Arc Foundry","sidebarTitle":"Install Arc Foundry","href":"/arc/tutorials/install-arc-foundry"},{"title":"Deploy on Arc","sidebarTitle":"Deploy on Arc","description":"Deploy and interact with a Solidity smart contract on Arc Testnet using Arc Foundry.","href":"/build/deploy-on-arc"},{"title":"Troubleshoot with Arc Foundry","sidebarTitle":"Troubleshoot with Arc Foundry","href":"/arc/tutorials/troubleshoot-with-arc-foundry"},{"title":"EVM differences","sidebarTitle":"EVM differences","description":"Arc's protocol-level differences from Ethereum: USDC as native gas, value transfer rules, SELFDESTRUCT semantics, EIP-7708 Transfer events, the fee market, and opcode behavior.","href":"/build/evm-differences"},{"title":"Sample apps","href":"/arc/references/sample-applications"},{"group":"Build with AI","icon":"microchip","pages":[{"group":"Arc Studio","pages":[{"title":"Arc Studio","sidebarTitle":"Overview","href":"/ai/arc-studio"},{"title":"How-to: Install the Arc Studio CLI","sidebarTitle":"Install the CLI","href":"/ai/arc-studio-cli-install"},{"title":"Arc Studio CLI reference","sidebarTitle":"CLI reference","href":"/ai/arc-studio-cli"},{"title":"Troubleshoot Arc Studio","sidebarTitle":"Troubleshoot Arc Studio","href":"/ai/arc-studio-troubleshooting"}]},{"title":"AI skills for building on Arc","sidebarTitle":"Skills","href":"/ai/skills"},{"title":"Arc MCP server","sidebarTitle":"MCP server","href":"/ai/mcp"}]},{"group":"Quickstarts","icon":"gauge-max","pages":[{"title":"Deploy contracts","href":"/arc/tutorials/deploy-contracts"},{"title":"Interact with contracts","href":"/arc/tutorials/interact-with-contracts"},{"title":"Monitor contract events","href":"/arc/tutorials/monitor-contract-events"},{"title":"Port a contract to Arc","sidebarTitle":"Port a contract","href":"/arc/tutorials/porting-contracts-to-arc"},{"title":"Send USDC with a transaction memo","href":"/arc/tutorials/send-usdc-with-transaction-memo"},{"title":"Send batch USDC transfers","href":"/arc/tutorials/batch-usdc-transfers"},{"title":"Register your first AI agent","href":"/arc/tutorials/register-your-first-ai-agent"},{"title":"Create your first ERC-8183 job","href":"/arc/tutorials/create-your-first-erc-8183-job"}]},{"group":"Use cases","icon":"user-astronaut","pages":[{"title":"P2P Payments","sidebarTitle":"Payments","href":"/build/payments"},{"title":"eCommerce Checkout","sidebarTitle":"eCommerce checkout","href":"/build/ecommerce"},{"title":"Stablecoin FX","sidebarTitle":"Stablecoin FX","href":"/build/stablecoin-fx"},{"title":"Agentic Economy","sidebarTitle":"Agentic economy","href":"/build/agentic-economy"},{"title":"Prediction markets","sidebarTitle":"Prediction markets","href":"/build/prediction-markets"},{"title":"Borrow and lend","sidebarTitle":"Borrow and lend","href":"/build/borrow-and-lend"}]},{"group":"Tools","icon":"toolbox","pages":[{"title":"Account abstraction","href":"/arc/tools/account-abstraction"},{"title":"Compliance","href":"/arc/tools/compliance-vendors"},{"title":"Data indexers","href":"/arc/tools/data-indexers"},{"title":"Node providers","href":"/arc/tools/node-providers"},{"title":"Oracles","href":"/arc/tools/oracles"}]}]},{"tab":"App Kits","pages":[{"title":"App Kits","href":"/app-kit"}]}]},"basePath":"","title":"Troubleshoot with Arc Foundry - Arc Docs","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["10e4515597"],"chunks":["BannerMarkdown-BcDCEkh6.js","dist-CwjSCXIK.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-eKJ4rcii.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}