Deploy a project

Learn how to deploy contracts in the Hiro Platform.

Prerequisites

  • Follow the create project guide to create or import a project.
  • Follow the build contract guide to create or customize your smart contracts.
  • Make sure you have installed and connected a Stacks wallet to deploy your contracts.

Use the deploy button

Once your smart contracts are ready, you can deploy them to a Stacks network, including devnet, testnet or mainnet, using the "Deploy" button on the Hiro Platform.

Note: in general, we recommend deploying contracts via deployment plans. This guide walks through deploying contracts on a one-off basis, which should be handled with caution.

The following are the steps to deploy your contracts using the deploy button.

  1. On the projects page, select the project you want to deploy.

  2. In the list of the contracts displayed for the project, select the contract you want to deploy.

  3. Use the "Deploy" button available on the right side of the contract.

  4. Choose the network you want to deploy to. Note: for devnet, reference this guide. The steps below are specific to testnet and mainnet. deploy to environments

  5. Once you choose testnet or mainnet, a pop-up window will open and prompt you to connect your wallet and confirm the deployment.

    wallet

  6. While the deployment is in progress, you will see the contract status as "In mempool" under the environment field for the contract.

  7. Once the deployment is confirmed, that status will update to "Deployed" under the chosen environment.

    Mainnet deployment

Monitor your contract in the Stacks Explorer

At any time, you can monitor your contract in the Stacks Explorer.

  1. You can use the Pop-out button "View in Explorer" beside the deployment status to monitor your contract in the Explorer. Exporer view
  2. This button will open the Explorer to a page showing the contract you just deployed. From this page, you can see relevant information about your contract and the contract details. Explorer

If you find issues with your deployment process, you can refer to the FAQ section or file an issue here.