Project Contracts
Introduction

Contract Workspaces

Stagenets provide a built-in system to manage and version your project's smart contracts. Each uniquely named contract in your project is given its own dedicated Contract Workspace. For example, a contract MyToken { ... } will get a MyToken Workspace.

Each Workspace acts as the central hub for its contract’s tools and analytics. Within it, you can:

  • View transaction activity involving the contract
  • Check its USD TVL and asset balances (ETH and ERC20)
  • Inspect the current values of its storage variables
  • Browse contract history through a GitHub-synced Version and Deployment Manager

Contract Workspaces are found in the Contracts section of the app, accessible via the sidebar.

Creating Workspaces

Setting up Contract Workspaces for your project’s smart contracts is a simple two-step process:

  1. Import them from GitHub automatically using the Stagenet's Contract CI/CD system
  2. Deploy them onto your Stagenet via your usual deployment scripts/commands

Follow the quickstart guide for your project's framework (Hardhat or Foundry) to set everything up:

Versions & Deployments

As stated, each Workspace corresponds to a uniquely named contract in your project. As you develop, you may push multiple versions of that contract (i.e. when you change its Solidity code), and you may deploy each version multiple times. The Stagenet handles this via contract Versions and Deployments.

A workspace unites all of a contract's Versions and Deployments in one place. At any moment, the Workspace displays information for a single Active Deployment. You can browse all a contract's Versions and Deployments, and choose which one is Active, in the Workspace’s History View.