Welcome to the introduction tutorial on how to use State Space. This tutorial is based on the OpenZeppelin ERC20 implementation and the Pausable feature. Read the test objective below, and follow the steps to understand how State Space works.Objective: Determine who should be able to mint() tokens after the contract has been paused.
1
Open the ERC20 playground
Login or create your account hereFrom the “Home” menu, open the pre-loaded ERC20 Workbench project.
You will see a folder tree containing the ERC20 project and a canvas with a pre-designed transaction sequence.Expand the folder tree to view all the externally visable functions as components. These components can be dragged onto the canvas to create multi-contract test scenarios and transaction sequences (e.g. end-to-end flows, integration tests, etc).There are four types of components:Blue = CALL - function call
Purple = VIEW - view function
Green = CREATE - constructor
Gray = DEPLOY - a deployment script
Since the objective is to determine whether any EOA can mint tokens after the contract has been paused, we created a sequence of transactions that calls first deploys the contract, and then calls pause() and mint() in succession:Deployment → constructor(...) → pause(...) → mint(...)It should look like this:
Pause-->Mint Transaction Sequence
You can use your existing deployment scripts (if you have one in Foundry or Hardhat) to create custom deployment nodes for deeper testing.
State Space supports the use of both symbolic and concrete input values, or any combination thereof for both transaction values and function parameters.For values set to symbolic, State Space will automatically search for and generate structured dynamic inputs that will satisfy the conditions of the entire transaction sequence.What if we’re not sure what parameters to set? Rather than manually figuring out all combinations to test, we can use symbolic values to explore all possible inputs for any field.Let’s assume that Alice is the contract deployer and Bob is the initialOwner. In our test setup, we configure the following:
Set the transaction From field for the constructor() function call to Alice.
Set the initialOwner parameter in the constructor() to Bob.
Leave the transaction From field for pause() set to symbolic to consider all EOAs preconfigured in the deployment (Alice and Bob).
So far, it should look like this:
Configure deployment and mint() parameters
Since part of our objective is to determine whether any externally owned account (EOA) can successfully mint tokens, we take a symbolic approach for the mint() transaction:
We leave the transaction From field for mint() set to symbolic. Symbolic means it represents all possible EOAs (limited to the accounts configured in the deployment) rather than being fixed to a specific account (a concrete input). This allows State Space to autonomously discover which accounts can trigger unique execution paths.
We also leave the function parameters of mint() symbolic (to and amount), allowing State Space to explore all possible input values to determine which concrete inputs and conditions (if any) would result in a successful mint operation after pause has been called.
It should look like this:
Final Parameter Configuration
This hybrid symbolic/concrete input parameterization ensures that we can still maximize coverage while minimizing state space explosion.Alternatively, you could set everything to symbolic too, and you’ll get a wider state space to explore and analyze. It will just take more compute time, and include scenarios that may not be as meaningful in answering the test objective.Now, it’s time to explore the state space.
3
Explore the state space
Select the icon to start exploring and generating the execution state space.State Space will autonomously explore code paths, automatically taking into consideration all multi-contract interactions for your test scenario. For each unique code path it discovers, it will generate the verified concrete input conditions that trigger their execution.Because State Space models the full EVM semantics, the symbolic execution can reason about every operation with bit level precision, uncover obscure edge cases manual testing misses, and maximize coverage and path exploration.
Resulting execution paths, input conditions, and coverage.
Discovered execution paths, input conditions, and resulting contract state, will appear dynamically during execution. Once completed, detailed coverage metrics will be displayed for each run.The results should display 14 test cases (execution paths) and 46% health coverage.Run times can vary depending on the number of sequences, transaction depth, the amount of symbolic parameters, compute, and more. Complex codebases will require increased allocation of compute resources. If you’re curious about what performance to expect, reach out to us and we’ll help you estimate it.Feel free to experiement with different sequences to analyze different behaviors.
4
Analyze and validate behavior
As you review the results, you’ll notice that every execution path results in a revert, with no successful mint() transaction occurring.We determine that we could not find any path or combination of inputs that will successfully lead to a mint transaction, and provide the test cases for each executed path.This outcome matches our expectations because after invoking the pause() function, the _paused contract value should be set to true preventing any minting operation from successfully completing.Let’s confirm that the _paused state value was indeed updated, and visually validate all other states and state changes are correct.Select and open the test case (execution path) with the following input conditions:
Alice deploys the contract and Bob is set as the initialOwner
Bob calls the pause() function
Transaction reverts with an EnforcedPause error after Bob attempts to mint 1 token to Alice.
Once you have opened test case, click through the constructor() —> pause() —> mint() transactions. You can examine the storage layout, values, changes, account balances, and emitted events that occurred throughout the execution of the transaction sequence.Locate the _paused storage value, and validate it was correctly set to true after the pause() transaction and that it remained unchanged after the mint() transaction (which reverted). Source code is also highlighted for lines and branch coverage:
Mark the state value as valid by clicking the shield icon. You can click through the shield icon to mark it as invalid or back to unreviewed as well.
Green shield: Valid state
Red shield: Invalid state
Grey shield: Not reviewed
You can also view your validation history under the History tab.If you added any other team members to your project, their reviews will be visable to everyone in your team. If one team member flags a state as invalid, it will appear as invalid (red) to all other collaborators. This is especially useful when working with auditors or extended teams to make code and security reviews easier.
5
Exporting to Hardhat or Foundry
From the same view, select your test framework (Hardhat or Foundry) to copy or download the complete test case.You can also include emitted events in the test case by selecting the “Export Test” button in the top left of the screen.The test case represents the exact behavior of code, including both expected and unexpected behavior.
6
Optional: remove the pause function
Return to the canvas, and delete the pause function from the transaction sequence, and reconnect the mint(..) function to the constructor().Run the analysis again.
Mint
You’ll see the mint(..) transaction completing successfully.Select a path where a successful mint operation occurs, and analyze the contract state and changes.Find the _totalSupply state value, and evaluate its behavior. Has _totalSupply increased as expected by the amount? Have the balances correctly updated as well? Toggle through the transactions to become familiar with the process.
Contract state analysis
If you would like a tutorial on any specific topic, of have suggestions on improving existing tutorials, please contact us! We’d love to hear from you.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"State Space","description":"Test Generation powered by Symbolic Execution for EVM Smart Contracts.","colors":{"primary":"#0D9373","light":"#07C983","dark":"#0D9373"},"logo":{"light":"https://mintlify.s3.us-west-1.amazonaws.com/statespace/images/LogoLightMode.svg","dark":"https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/LogoDarkMode.svg?fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=3ac4cd5897f508af8dac6d66c91fac87"},"favicon":"/favicon.svg","appearance":{"default":"dark","strict":false},"background":{"decoration":"grid"},"navbar":{"links":[{"label":"Contact Us","href":"mailto:contact@state.space"}],"primary":{"type":"button","label":"Login to Workbench","href":"https://state.space/start"}},"footer":{"socials":{"x":"https://x.com/state_space_sys","github":"https://github.com/state-space","linkedin":"https://www.linkedin.com/company/state-space"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"statespace","hasAudioNarration":false,"actualSubdomain":"statespace","customDomains":["docs.state.space"],"gitSource":{"type":"github","owner":"state-space","repo":"docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21a76732881c474e3234cb","collectionId":"6d452d02-3288-4f11-8197-fa09acf9e441","schemaVersion":"v2"},"entitlements":{},"buildId":"6ae925624d41ff9f0fd8a63f:success","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"Documentation","count":11},{"language":"default","tag":"State Space CLI","count":4},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Changelog","count":2},{"language":"default","tag":"Overview","count":2},{"language":"default","tag":"Tutorials","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"vite-origin","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":[],"page":{"pagePath":"docs/tutorials/erc20-pause-mint","slug":"/docs/tutorials/erc20-pause-mint","pageMetadata":{"title":"ERC20: Validate the Pausable Feature","sidebarTitle":"ERC20: Pause-->Mint","icon":"circle-pause","description":"Sandbox tutorial","href":"/docs/tutorials/erc20-pause-mint"},"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: \"Sandbox tutorial\"\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`,br:`br`,code:`code`,em:`em`,hr:`hr`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Frame,Heading,Icon,OptimizedImage,Step,Steps,Tip}=_components;if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Icon)_missingMdxReference(`Icon`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`get-started`,children:`Get Started`}),`\n`,_jsxs(_components.p,{children:[`Welcome to the introduction tutorial on how to use State Space. This tutorial is based on the OpenZeppelin ERC20 implementation and the `,_jsx(_components.a,{href:`https://docs.openzeppelin.com/contracts/2.x/api/lifecycle`,children:`Pausable`}),` feature. Read the test objective below, and follow the steps to understand how State Space works.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Objective:`}),` Determine who should be able to `,_jsx(_components.code,{children:`mint()`}),` tokens after the contract has been paused.`]}),`\n`,_jsxs(Steps,{titleSize:`h2`,children:[_jsxs(Step,{title:`Open the ERC20 playground`,id:`open-the-erc20-playground`,children:[_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://state.space/login`,children:`Login`}),` or create your account `,_jsx(_components.a,{href:`https://state.space/sign-up`,children:`here`})]}),_jsxs(_components.p,{children:[`From the “Home” menu, `,_jsx(_components.a,{href:`https://state.space/me`,children:`open`}),` the pre-loaded ERC20 Workbench project.`]}),_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/NavToERC20.png?fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=74668129c70c51f525a16b868bf2fb7e`,\"data-og-width\":`1466`,width:`1466`,\"data-og-height\":`804`,height:`804`,\"data-path\":`media/images/NavToERC20.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/NavToERC20.png?w=280\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=f8ad68c2058fe86a50e9e2889869b400 280w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/NavToERC20.png?w=560\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=8553d4dc32aaa35455a619346364a2b9 560w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/NavToERC20.png?w=840\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=7be17472642dc099f0276e513f29be17 840w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/NavToERC20.png?w=1100\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=0b0c4cbd4fe210df02cb32cfc41d0351 1100w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/NavToERC20.png?w=1650\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=66ae420dd5b80e935d242bfad18e6a3d 1650w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/NavToERC20.png?w=2500\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=20b97d797ed2c257c8626594b6494eb3 2500w`})}),_jsx(_components.p,{children:`You will see a folder tree containing the ERC20 project and a canvas with a pre-designed transaction sequence.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Expand`}),` the folder tree to view all the externally visable functions as components. These components can be dragged onto the canvas to create multi-contract test scenarios and transaction sequences (e.g. end-to-end flows, integration tests, etc).`]}),_jsx(_components.p,{children:`There are four types of components:`}),_jsxs(_components.p,{children:[`Blue = `,_jsx(_components.code,{children:`CALL`}),` - function call`,_jsx(_components.br,{}),`\n`,`Purple = `,_jsx(_components.code,{children:`VIEW`}),` - view function`,_jsx(_components.br,{}),`\n`,`Green = `,_jsx(_components.code,{children:`CREATE`}),` - constructor`,_jsx(_components.br,{}),`\n`,`Gray = `,_jsx(_components.code,{children:`DEPLOY`}),` - a deployment script`]}),_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/WorkbenchFolderTree.png?fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=2175ffa3b4e30806432d400d0258a380`,\"data-og-width\":`1007`,width:`1007`,\"data-og-height\":`994`,height:`994`,\"data-path\":`media/images/WorkbenchFolderTree.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/WorkbenchFolderTree.png?w=280\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=ad619f2c575fac46e13a27aa3e1ea64c 280w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/WorkbenchFolderTree.png?w=560\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=4dd6de455e83c0b846a1cc4ab02e2c1e 560w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/WorkbenchFolderTree.png?w=840\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=434b8eef8236b6e8a69d996e2f0253d6 840w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/WorkbenchFolderTree.png?w=1100\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=a81f01dfe9193ff25f7f82147455dd92 1100w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/WorkbenchFolderTree.png?w=1650\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=0518cb0a5b725e64f997758fef23091f 1650w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/WorkbenchFolderTree.png?w=2500\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=64cc60310cecc8210b71a9e851f39592 2500w`})}),_jsx(_components.hr,{})]}),_jsxs(Step,{title:`Design a test scenario`,id:`design-a-test-scenario`,children:[_jsx(Heading,{level:`3`,id:`the-transaction-sequence`,children:`The transaction sequence`}),_jsxs(_components.p,{children:[`Since the objective is to determine whether any EOA can mint tokens `,_jsx(_components.em,{children:`after`}),` the contract has been paused, we created a sequence of transactions that calls first deploys the contract, and then calls `,_jsx(_components.code,{children:`pause()`}),` and `,_jsx(_components.code,{children:`mint()`}),` in succession:`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Deployment`}),` → `,_jsx(_components.code,{children:`constructor(...)`}),` → `,_jsx(_components.code,{children:`pause(...)`}),` → `,_jsx(_components.code,{children:`mint(...)`})]}),_jsx(_components.p,{children:`It should look like this:`}),_jsx(Frame,{caption:`Pause-->Mint Transaction Sequence`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/PauseMintDefault.png?fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=ab2653fc5a8d58042eb31cdd63748790`,\"data-og-width\":`2968`,width:`2968`,\"data-og-height\":`890`,height:`890`,\"data-path\":`media/images/PauseMintDefault.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/PauseMintDefault.png?w=280\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=d71b7ba3210c890d097031779aaca9f7 280w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/PauseMintDefault.png?w=560\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=128a1be82374453aa5b090c3db4947ab 560w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/PauseMintDefault.png?w=840\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=503e951ef0413f979b134b551ea1fc28 840w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/PauseMintDefault.png?w=1100\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=c5d1d83d830252f87043848c3f7bf990 1100w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/PauseMintDefault.png?w=1650\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=1ad4ec7dc652fa082bbd1d76600a02d7 1650w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/PauseMintDefault.png?w=2500\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=6e87484df290f8269aac7bbd0802225b 2500w`})}),_jsx(Tip,{children:`You can use your existing deployment scripts (if you have one in Foundry or Hardhat) to create custom deployment nodes for deeper testing.`}),_jsx(Heading,{level:`3`,id:`configure-symbolic-input-parameters`,children:`Configure symbolic input parameters`}),_jsx(_components.p,{children:`State Space supports the use of both symbolic and concrete input values, or any combination thereof for both transaction values and function parameters.`}),_jsxs(_components.p,{children:[`For values set to symbolic, State Space will automatically search for and generate `,_jsx(_components.a,{href:`/docs/overview/concepts#structured-dynamic-inputs`,children:`structured dynamic inputs`}),` that will satisfy the conditions of the entire transaction sequence.`]}),_jsx(_components.p,{children:`What if we’re not sure what parameters to set? Rather than manually figuring out all combinations to test, we can use symbolic values to explore all possible inputs for any field.`}),_jsxs(_components.p,{children:[`Let’s assume that Alice is the contract deployer and `,_jsx(_components.code,{children:`Bob`}),` is the `,_jsx(_components.code,{children:`initialOwner`}),`. In our test setup, we configure the following:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Set the transaction `,_jsx(_components.code,{children:`From`}),` field for the `,_jsx(_components.code,{children:`constructor()`}),` function call to `,_jsx(_components.code,{children:`Alice`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Set the `,_jsx(_components.code,{children:`initialOwner`}),` parameter in the `,_jsx(_components.code,{children:`constructor()`}),` to `,_jsx(_components.code,{children:`Bob`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Leave the transaction `,_jsx(_components.code,{children:`From`}),` field for `,_jsx(_components.code,{children:`pause()`}),` set to symbolic to consider all EOAs preconfigured in the deployment (`,_jsx(_components.code,{children:`Alice`}),` and `,_jsx(_components.code,{children:`Bob`}),`).`]}),`\n`]}),_jsx(_components.p,{children:`So far, it should look like this:`}),_jsx(Frame,{caption:`Configure deployment and mint() parameters`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/ConfigureParams1.png?fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=e6d6a391579b932a70c49661ee9ab355`,\"data-og-width\":`2504`,width:`2504`,\"data-og-height\":`660`,height:`660`,\"data-path\":`media/images/ConfigureParams1.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/ConfigureParams1.png?w=280\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=61a9a9c47d82a514d57b5da0e681d2e2 280w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/ConfigureParams1.png?w=560\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=eb8569ef6edcd642dad636d8b2ed89b6 560w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/ConfigureParams1.png?w=840\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=6b662354634a5e754d7dfa70cd569246 840w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/ConfigureParams1.png?w=1100\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=5717304bda7807a516047cf90377e41f 1100w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/ConfigureParams1.png?w=1650\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=2e3f8bd85606356a7e37e2032870b555 1650w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/ConfigureParams1.png?w=2500\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=c6eedf91ec28bcfe3d81a36ece42d76d 2500w`})}),_jsxs(_components.p,{children:[`Since part of our objective is to determine whether any externally owned account (EOA) can successfully mint tokens, we take a symbolic approach for the `,_jsx(_components.code,{children:`mint()`}),` transaction:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`We leave the transaction `,_jsx(_components.code,{children:`From`}),` field for `,_jsx(_components.code,{children:`mint()`}),` set to symbolic. Symbolic means it represents all possible EOAs (limited to the accounts configured in the deployment) rather than being fixed to a specific account (a concrete input). This allows State Space to autonomously discover which accounts can trigger unique execution paths.`]}),`\n`,_jsxs(_components.li,{children:[`We also leave the function parameters of `,_jsx(_components.code,{children:`mint()`}),` symbolic (`,_jsx(_components.code,{children:`to`}),` and `,_jsx(_components.code,{children:`amount`}),`), allowing State Space to explore all possible input values to determine which concrete inputs and conditions (if any) would result in a successful mint operation after `,_jsx(_components.code,{children:`pause`}),` has been called.`]}),`\n`]}),_jsx(_components.p,{children:`It should look like this:`}),_jsx(Frame,{caption:`Final Parameter Configuration`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/ConfigParamsFull.png?fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=9a4be6a497de1756ce7a08528acf0a9f`,\"data-og-width\":`2504`,width:`2504`,\"data-og-height\":`660`,height:`660`,\"data-path\":`media/images/ConfigParamsFull.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/ConfigParamsFull.png?w=280\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=340473b12326281f4adc924bc42fe410 280w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/ConfigParamsFull.png?w=560\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=cdbc875a05065401694e6908bc479e7a 560w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/ConfigParamsFull.png?w=840\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=4eb687374987cbf1b70d7bb042203733 840w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/ConfigParamsFull.png?w=1100\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=c93d261a06430248063fb9b214fe8c47 1100w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/ConfigParamsFull.png?w=1650\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=19b8d6d5df07b971ca219d9df9506ec5 1650w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/ConfigParamsFull.png?w=2500\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=efd9a961d2f862fc6238153b951ba4aa 2500w`})}),_jsx(_components.p,{children:`This hybrid symbolic/concrete input parameterization ensures that we can still maximize coverage while minimizing state space explosion.`}),_jsx(_components.p,{children:`Alternatively, you could set everything to symbolic too, and you’ll get a wider state space to explore and analyze. It will just take more compute time, and include scenarios that may not be as meaningful in answering the test objective.`}),_jsx(_components.p,{children:`Now, it’s time to explore the state space.`}),_jsx(_components.hr,{})]}),_jsxs(Step,{title:`Explore the state space`,id:`explore-the-state-space`,children:[_jsxs(_components.p,{children:[`Select the `,_jsx(Icon,{icon:`play`,iconType:`solid`}),` icon to start exploring and generating the execution state space.`]}),_jsx(_components.p,{children:`State Space will autonomously explore code paths, automatically taking into consideration all multi-contract interactions for your test scenario. For each unique code path it discovers, it will generate the verified concrete input conditions that trigger their execution.`}),_jsxs(_components.p,{children:[`Because State Space models the `,_jsx(_components.em,{children:`full EVM semantics`}),`, the symbolic execution can reason about every operation with bit level precision, uncover obscure edge cases manual testing misses, and maximize coverage and path exploration.`]}),_jsx(Frame,{caption:`Resulting execution paths, input conditions, and coverage.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/RunComplete.png?fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=4e8fb87ae08196f4df0d22d475a9de66`,\"data-og-width\":`3818`,width:`3818`,\"data-og-height\":`2092`,height:`2092`,\"data-path\":`media/images/RunComplete.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/RunComplete.png?w=280\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=0431147c90e503d24e68f00b5d18e3a1 280w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/RunComplete.png?w=560\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=0d6309cc39895e22f8379dbf38cf78e9 560w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/RunComplete.png?w=840\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=1b2b20260b326bdb5603a81e0cab7578 840w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/RunComplete.png?w=1100\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=9ee60968deeae8c26a34d7e3e36bee2c 1100w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/RunComplete.png?w=1650\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=e08a3d27f599900405e9ba9197080b8b 1650w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/RunComplete.png?w=2500\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=9b2ed30838f0125b6582e2c33fb33eda 2500w`})}),_jsx(_components.p,{children:`Discovered execution paths, input conditions, and resulting contract state, will appear dynamically during execution. Once completed, detailed coverage metrics will be displayed for each run.`}),_jsx(_components.p,{children:`The results should display 14 test cases (execution paths) and 46% health coverage.`}),_jsxs(_components.p,{children:[`Run times can vary depending on the number of sequences, transaction depth, the amount of symbolic parameters, compute, and more. Complex codebases will require increased allocation of compute resources. If you’re curious about what performance to expect, `,_jsx(_components.a,{href:`mail:contact@state.space`,children:`reach out to us`}),` and we’ll help you estimate it.`]}),_jsx(_components.p,{children:`Feel free to experiement with different sequences to analyze different behaviors.`}),_jsx(_components.hr,{})]}),_jsxs(Step,{title:`Analyze and validate behavior`,id:`analyze-and-validate-behavior`,children:[_jsxs(_components.p,{children:[`As you review the results, you’ll notice that every execution path results in a revert, with no successful `,_jsx(_components.code,{children:`mint()`}),` transaction occurring.`]}),_jsx(_components.p,{children:`We determine that we could not find any path or combination of inputs that will successfully lead to a mint transaction, and provide the test cases for each executed path.`}),_jsxs(_components.p,{children:[`This outcome matches our expectations because after invoking the `,_jsx(_components.code,{children:`pause()`}),` function, the `,_jsx(_components.code,{children:`_paused`}),` contract value should be set to `,_jsx(_components.code,{children:`true`}),` preventing any minting operation from successfully completing.`]}),_jsxs(_components.p,{children:[`Let’s confirm that the `,_jsx(_components.code,{children:`_paused`}),` state value was indeed updated, and visually validate all other states and state changes are correct.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Select`}),` and `,_jsx(_components.strong,{children:`open`}),` the test case (execution path) with the following input conditions:`]}),_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/pausemintresult.png?fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=7d024ed73b6491bab6c3c8e69be4301b`,\"data-og-width\":`1037`,width:`1037`,\"data-og-height\":`154`,height:`154`,\"data-path\":`media/images/pausemintresult.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/pausemintresult.png?w=280\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=98cd3b15732586433a22946bc2c3c595 280w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/pausemintresult.png?w=560\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=b57ff41a79f36e292d304aa60f801458 560w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/pausemintresult.png?w=840\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=45af67f286e9f858ff5aecd4f216669e 840w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/pausemintresult.png?w=1100\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=52e04dd7a97b90cc16ebca4074600bb8 1100w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/pausemintresult.png?w=1650\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=255337fc5f815661d1e058b0ea1a1dd6 1650w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/pausemintresult.png?w=2500\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=dc860443c8e8eb94f377fd8e7c6eab66 2500w`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Alice`}),` deploys the contract and `,_jsx(_components.code,{children:`Bob`}),` is set as the `,_jsx(_components.code,{children:`initialOwner`})]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Bob`}),` calls the `,_jsx(_components.code,{children:`pause()`}),` function`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Transaction reverts with an `,_jsx(_components.code,{children:`EnforcedPause`}),` error after `,_jsx(_components.code,{children:`Bob`}),` attempts to mint `,_jsx(_components.code,{children:`1`}),` token to `,_jsx(_components.code,{children:`Alice`}),`.`]}),`\n`]}),`\n`]}),_jsxs(_components.p,{children:[`Once you have opened test case, click through the `,_jsx(_components.code,{children:`constructor()`}),` —> `,_jsx(_components.code,{children:`pause()`}),` —> `,_jsx(_components.code,{children:`mint()`}),` transactions. You can examine the storage layout, values, changes, account balances, and emitted events that occurred throughout the execution of the transaction sequence.`]}),_jsxs(_components.p,{children:[`Locate the `,_jsx(_components.code,{children:`_paused`}),` storage value, and validate it was correctly set to `,_jsx(_components.code,{children:`true`}),` after the `,_jsx(_components.code,{children:`pause()`}),` transaction and that it remained unchanged after the `,_jsx(_components.code,{children:`mint()`}),` transaction (which reverted). Source code is also highlighted for lines and branch coverage:`]}),_jsx(Frame,{children:_jsx(`video`,{autoPlay:true,controls:true,loop:true,src:`https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/video/Validatepaused.mp4?fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=b3ffeb7c1bca2dca53c41c9931358d72`,\"data-path\":`media/video/Validatepaused.mp4`,playsInline:`true`,muted:`true`})}),_jsx(_components.p,{children:`Mark the state value as valid by clicking the shield icon. You can click through the shield icon to mark it as invalid or back to unreviewed as well.`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Green shield: Valid state`}),`\n`,_jsx(_components.li,{children:`Red shield: Invalid state`}),`\n`,_jsx(_components.li,{children:`Grey shield: Not reviewed`}),`\n`]}),_jsxs(_components.p,{children:[`You can also view your validation history under the `,_jsx(_components.code,{children:`History`}),` tab.`]}),_jsx(_components.p,{children:`If you added any other team members to your project, their reviews will be visable to everyone in your team. If one team member flags a state as invalid, it will appear as invalid (red) to all other collaborators. This is especially useful when working with auditors or extended teams to make code and security reviews easier.`}),_jsx(_components.hr,{})]}),_jsxs(Step,{title:`Exporting to Hardhat or Foundry`,id:`exporting-to-hardhat-or-foundry`,children:[_jsx(Frame,{title:`Export test case to Foundry or Hardhat`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/TestCaseExportPause.png?fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=fd7ff278de9b280630f3f410d4d39b17`,alt:`export`,\"data-og-width\":`3817`,width:`3817`,\"data-og-height\":`2093`,height:`2093`,\"data-path\":`media/images/TestCaseExportPause.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/TestCaseExportPause.png?w=280\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=905b5c7ab60ef10744a60352eb368593 280w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/TestCaseExportPause.png?w=560\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=1f6184b03cc47bf5fd23aadbe747f3be 560w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/TestCaseExportPause.png?w=840\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=25854388c694a2d6963c82a45855cd31 840w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/TestCaseExportPause.png?w=1100\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=5992a1b7b7942e021282ad3ac23bc4cb 1100w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/TestCaseExportPause.png?w=1650\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=cec6a2d1417d7fdd3c18616ee981fea3 1650w, https://mintcdn.com/statespace/1PV0vXIcGni_BZ3w/media/images/TestCaseExportPause.png?w=2500\u0026fit=max\u0026auto=format\u0026n=1PV0vXIcGni_BZ3w\u0026q=85\u0026s=728366e110cfc1b4ae1df585746a04d1 2500w`})}),_jsx(_components.p,{children:`From the same view, select your test framework (Hardhat or Foundry) to copy or download the complete test case.`}),_jsx(_components.p,{children:`You can also include emitted events in the test case by selecting the “Export Test” button in the top left of the screen.`}),_jsx(_components.p,{children:`The test case represents the exact behavior of code, including both expected and unexpected behavior.`})]}),_jsxs(Step,{title:_jsxs(_Fragment,{children:[`Optional: remove the `,_jsx(_components.code,{children:`pause`}),` function`]}),id:`optional%3A-remove-the-pause-function`,children:[_jsxs(_components.p,{children:[`Return to the canvas, and delete the `,_jsx(_components.code,{children:`pause`}),` function from the transaction sequence, and reconnect the `,_jsx(_components.code,{children:`mint(..)`}),` function to the `,_jsx(_components.code,{children:`constructor()`}),`.`]}),_jsxs(_components.p,{children:[`Run `,_jsx(Icon,{icon:`play`,iconType:`solid`}),` the analysis again.`]}),_jsx(Frame,{caption:`Mint`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/mint.png?fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=7c6613f0f9e111b654186fa0ea7409a3`,\"data-og-width\":`2844`,width:`2844`,\"data-og-height\":`980`,height:`980`,\"data-path\":`media/images/mint.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/mint.png?w=280\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=2fa1558406aff6736d55d96d2d8e668b 280w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/mint.png?w=560\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=cd301039c3bf1c54486632146fd2b9a3 560w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/mint.png?w=840\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=cdc13cc26400d22703445ae068499205 840w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/mint.png?w=1100\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=c8219973b22b53c2b6e506276ccc0cbe 1100w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/mint.png?w=1650\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=3944ad835ec91dfcfa798683ebbfacb3 1650w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/mint.png?w=2500\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=503e078be184693f43297f7870c574ab 2500w`})}),_jsxs(_components.p,{children:[`You’ll see the `,_jsx(_components.code,{children:`mint(..)`}),` transaction completing successfully.`]}),_jsxs(_components.p,{children:[`Select a path where a successful `,_jsx(_components.code,{children:`mint`}),` operation occurs, and analyze the contract state and changes.`]}),_jsxs(_components.p,{children:[`Find the `,_jsx(_components.code,{children:`_totalSupply`}),` state value, and evaluate its behavior. Has `,_jsx(_components.code,{children:`_totalSupply`}),` increased as expected by the `,_jsx(_components.code,{children:`amount`}),`? Have the balances correctly updated as well? Toggle through the transactions to become familiar with the process.`]}),_jsx(Frame,{caption:`Contract state analysis`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/mint-state.png?fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=54275db82ea735520a688be902debe64`,\"data-og-width\":`3464`,width:`3464`,\"data-og-height\":`2098`,height:`2098`,\"data-path\":`media/images/mint-state.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/mint-state.png?w=280\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=daf185d0c4f676f2ed69478475058b8c 280w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/mint-state.png?w=560\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=d99b884dd6b77ef1efbbb30d1c2c13bb 560w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/mint-state.png?w=840\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=28bfd95652645e44c947004d23833f70 840w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/mint-state.png?w=1100\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=fc525e8295001e7be626c87980780c60 1100w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/mint-state.png?w=1650\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=3dd4d48eed411a33c2377d9dc08026e9 1650w, https://mintcdn.com/statespace/rNXPzvVNWkIZ4wei/media/images/mint-state.png?w=2500\u0026fit=max\u0026auto=format\u0026n=rNXPzvVNWkIZ4wei\u0026q=85\u0026s=2007d8fa5f62e7b002a3353a0e16e6a7 2500w`})})]})]}),`\n`,_jsxs(_components.p,{children:[`If you would like a tutorial on any specific topic, of have suggestions on improving existing tutorials, please `,_jsx(_components.a,{href:`mail:contact@state.space`,children:`contact us`}),`! We’d love to hear from you.`]})]})}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":"ERC20: Validate the Pausable Feature","sidebarTitle":"ERC20: Pause-->Mint","icon":"circle-pause","description":"Sandbox tutorial","href":"/docs/tutorials/erc20-pause-mint"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Get Started","slug":"get-started","depth":2,"children":[]},{"title":"Open the ERC20 playground","slug":"open-the-erc20-playground","depth":2,"children":[]},{"title":"Design a test scenario","slug":"design-a-test-scenario","depth":2,"children":[{"title":"The transaction sequence","slug":"the-transaction-sequence","depth":3,"children":[]},{"title":"Configure symbolic input parameters","slug":"configure-symbolic-input-parameters","depth":3,"children":[]}]},{"title":"Explore the state space","slug":"explore-the-state-space","depth":2,"children":[]},{"title":"Analyze and validate behavior","slug":"analyze-and-validate-behavior","depth":2,"children":[]},{"title":"Exporting to Hardhat or Foundry","slug":"exporting-to-hardhat-or-foundry","depth":2,"children":[]},{"title":"Optional: remove the pause function","slug":"optional%3A-remove-the-pause-function","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"statespace","siteName":"State Space","title":"ERC20: Validate the Pausable Feature - State Space","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T06:47:15.091Z","originalFileLocation":"docs/tutorials/erc20-pause-mint.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=\"Sandbox tutorial\">\u003cmeta data-mint-head name=\"application-name\" content=\"State Space\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/statespace/25idwkV6kfb3zWSf/_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/statespace/25idwkV6kfb3zWSf/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/statespace/25idwkV6kfb3zWSf/_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/statespace/25idwkV6kfb3zWSf/_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/statespace/25idwkV6kfb3zWSf/_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/statespace/25idwkV6kfb3zWSf/_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/statespace/25idwkV6kfb3zWSf/_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/statespace/25idwkV6kfb3zWSf/_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/statespace/25idwkV6kfb3zWSf/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"ERC20: Validate the Pausable Feature - State Space\">\u003cmeta data-mint-head property=\"og:description\" content=\"Sandbox tutorial\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"State Space\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.state.space/docs/tutorials/erc20-pause-mint\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://statespace.mintlify.site/_mintlify/api/og/v2?division=Tutorials\u0026amp;title=ERC20%3A+Validate+the+Pausable+Feature\u0026amp;description=Sandbox+tutorial\u0026amp;theme=c66090b754eafb6a0a71498b\u0026amp;signature=e660fcf015a2b5c59e46ca9e799e2079cfd993af438d736e7493164c66cf9fce\">\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=\"ERC20: Validate the Pausable Feature - State Space\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Sandbox tutorial\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://statespace.mintlify.site/_mintlify/api/og/v2?division=Tutorials\u0026amp;title=ERC20%3A+Validate+the+Pausable+Feature\u0026amp;description=Sandbox+tutorial\u0026amp;theme=c66090b754eafb6a0a71498b\u0026amp;signature=e660fcf015a2b5c59e46ca9e799e2079cfd993af438d736e7493164c66cf9fce\">\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/statespace/25idwkV6kfb3zWSf/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"State Space\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D9373\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.state.space/docs/tutorials/erc20-pause-mint\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/tutorials/erc20-pause-mint.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.state.space/#organization\",\"name\":\"State Space\",\"url\":\"https://docs.state.space\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintlify.s3.us-west-1.amazonaws.com/statespace/images/LogoLightMode.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.state.space#website\",\"name\":\"State Space\",\"url\":\"https://docs.state.space\",\"publisher\":{\"@id\":\"https://docs.state.space/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.state.space/docs/tutorials/erc20-pause-mint#webpage\",\"url\":\"https://docs.state.space/docs/tutorials/erc20-pause-mint\",\"name\":\"ERC20: Validate the Pausable Feature\",\"description\":\"Sandbox tutorial\",\"dateModified\":\"2026-01-07T06:47:15.091Z\",\"isPartOf\":{\"@id\":\"https://docs.state.space#website\"},\"breadcrumb\":{\"@id\":\"https://docs.state.space/docs/tutorials/erc20-pause-mint#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.state.space/docs/tutorials/erc20-pause-mint#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"State Space\",\"item\":\"https://docs.state.space\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ERC20: Validate the Pausable Feature\",\"item\":\"https://docs.state.space/docs/tutorials/erc20-pause-mint\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.state.space/docs/tutorials/erc20-pause-mint#article\",\"headline\":\"ERC20: Validate the Pausable Feature\",\"name\":\"ERC20: Validate the Pausable Feature\",\"description\":\"Sandbox tutorial\",\"url\":\"https://docs.state.space/docs/tutorials/erc20-pause-mint\",\"mainEntityOfPage\":{\"@id\":\"https://docs.state.space/docs/tutorials/erc20-pause-mint#webpage\"},\"dateModified\":\"2026-01-07T06:47:15.091Z\",\"publisher\":{\"@id\":\"https://docs.state.space/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.state.space#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"State Space\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"State Space","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Overview","pages":[{"title":"Introduction","sidebarTitle":"Introduction","icon":"house","href":"/docs/overview/intro"},{"title":"Platform Features","sidebarTitle":"Features","icon":"layer-group","href":"/docs/overview/features"}]},{"group":"Getting Started","pages":[{"title":"Quickstart","sidebarTitle":"Quickstart","icon":"rocket","href":"/docs/overview/quickstart"},{"title":"Concepts","sidebarTitle":"Concepts","icon":"book-open","href":"/docs/overview/concepts"},{"title":"How it works","sidebarTitle":"How it works","icon":"gears","description":null,"href":"/docs/overview/howitworks"}]},{"group":"Tutorials","pages":[{"title":"ERC20: Validate the Pausable Feature","sidebarTitle":"ERC20: Pause-->Mint","icon":"circle-pause","href":"/docs/tutorials/erc20-pause-mint"},{"title":"ERC20: End-to-End Testing of transferFrom","sidebarTitle":"ERC20: End-to-End Testing of transferFrom","icon":"arrow-right-arrow-left","description":"Tutorial on end-to-end testing of transferFrom user flow","href":"/docs/tutorials/erc20-transferfrom"}]},{"group":"State Space CLI","pages":[{"title":"State Space CLI","sidebarTitle":"CLI Quickstart","icon":"rocket","href":"/docs/cli/quickstart"},{"title":"CLI Reference","sidebarTitle":"Usage","icon":"code","href":"/docs/cli/reference"},{"title":"Configuration Properties","sidebarTitle":"Settings","icon":"gear","href":"/docs/cli/settings"},{"title":"Hardhat Plugin","sidebarTitle":"Hardhat Plugin","icon":"helmet-safety","href":"/docs/cli/hardhatplugin"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/docs/changelog/updates"}]}]},"basePath":"","title":"ERC20: Validate the Pausable Feature - State Space","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":["07c022d89b","a74be98ba7","a9bb46feb3"],"chunks":["Frame-CK6QbnxT.js","DynamicMarkdown-BKiHAm_d.js","zoom-image-lightbox-CLQdF-Ar.js","lightbox-handle-r17bVUz3.js","Markdown-CpxgzsKA.js","clsx-C5EfhVm0.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CJ9Oly2E.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Mk6P3qvh.js"]}