Quickstart
This quickstart walks you through integrating a Stagenet into your Hardhat or Foundry workflow. You'll link it to a GitHub repository and set up dedicated Contract Workspaces for each contract, where you can view activity, inspect state and balances, track and graph data, and organize versions and deployments.
Create a Stagenet
Start by creating a new project — each one comes with its own Stagenet. Do this by clicking the button below:
Create Project Here
Link Stagenet to Codebase
Next, add your Stagenet’s RPC URL to your Hardhat or Foundry project's configuration. Once added, you'll be able to use the framework's usual commands to run deployments, scripts, and transactions against your Stagenet.
To do this, get your Stagenet’s RPC URL from your project's dashboard. It will look something like:
https://rpc.contract.dev/abcefghij123456789...You can use it just like any other RPC endpoint — treat your Stagenet like a standard EVM chain.
Hardhat
Configure Hardhat to use your Stagenet by adding it as a network entry in your hardhat.config.js:
module.exports = {
networks: {
stagenet: {
url: "https://rpc.contract.dev/abc123...",
},
},
// other config ...
};Once added, you can run any Hardhat task against your Stagenet using the --network flag:
npx hardhat run scripts/deploy.js --network stagenetFoundry
To use Foundry with your Stagenet, add its URL as an environment variable:
export FOUNDRY_RPC_URL=https://rpc.contract.dev/abc123...Then run your usual commands:
forge script script/Deploy.s.sol --broadcastAlternatively, pass the URL directly as a flag to your commands:
forge script script/Deploy.s.sol --rpc-url https://rpc.contract.dev/abc123... --broadcastImport Contracts into Stagenet
After adding your RPC URL to your Hardhat or Foundry codebase, you’ll want to import your project's contracts onto your Stagenet. This will create a Contract Workspace for each of its contracts.
Do this by connecting a GitHub repository containing your Hardhat or Foundry project to your Stagenet. Go to the Contracts section of the app and click Connect Repository. Authorize GitHub access, choose your repository, wait for its contracts to compile, then click Add Repository — your contracts will be loaded into your Stagenet as Pending Contract Workspaces.
Activate Contract Workspaces
You have imported your contracts into your Stagenet, but you still need to actually deploy them. This will change their Contract Workspaces from Pending to Active and unlock all their tools and analytics.
Do this via your usual Hardhat/Foundry deploy script using the Stagenet's RPC URL:
# Hardhat
npx hardhat run scripts/deploy.ts --network stagenet
# Foundry
forge script script/Deploy.s.sol --rpc-url https://rpc.contract.dev/abc123... --broadcast`With their contracts deployed, your Contract Workspaces will now be Active.
Explore Contract Workspaces
To open a Contract Workspace, click the Workspace button in that contract’s row within the Active Workspaces table on the Contracts page. Inside, you’ll immediately see real-time contract activity, storage state, and USD TVL. Navigate to the Workspace’s Analytics view to track and graph any of its contract's data — state, token balances, and function return values.
Workspaces stay synced with your GitHub repository. Pushing new contracts creates new Workspaces for them, whilst pushing updates to existing contracts creates new Versions in their Workspace. You can browse all the Versions and Deployments of a contract in its Workspace’s Versions & Deployments view.