Skip to main content
The CLI allows you to deploy your contract to State Space Workbench from within your Hardhat or Foundry project.
Use the CLI if any of the following apply:
Using Foundry or Hardhat project
Using a deployment script
Multiple interoperating contracts
Large or complex codebases
Iterating and testing code changes

Install

Initialize project

Run the init command to initialize your project and create the state-space.toml configuration fiels.
It should look like this:
state-space.toml

Configure settings

Update the settings in state-space.toml with your project details. For information on additional options, see the settings guide.

Deploy &

Deploy your project to state space by running the push command:
Make sure your code successfully compiles before running the push command.
You will be provided a link to login using your State Space credentials. After you authenticate, the CLI will compile and deploy your code to State Space. Depending on the size of your codebase, they may take a few minutes. Login to State Space Workbench and open your project from the home page. Please contact us if you experience any issues.