Imported Contracts
Imported Contracts are the contract definitions your Stagenet uses to recognise and understand contracts deployed on it.
An import does not deploy a contract. It sends compiled contract information to contract.dev so your Stagenet can identify matching bytecode, decode interactions, inspect storage, and organise deployments into versions.
When you import contracts, contract.dev stores the compiled outputs for those contracts on your Stagenet.
These imported definitions are later used to recognise contracts that are deployed to the Stagenet.
How imports work
Importing contracts sends compiled contract information from a Hardhat or Foundry project to your Stagenet.
There are two ways to import contracts:
- CI/CD — connect a GitHub repository and let contract.dev compile and import contracts automatically.
- CLI — run a command from your local Hardhat or Foundry project to import compiled contracts directly.
Imported contracts appear on the Contracts page for your Stagenet.
What gets imported
Importing sends the following contract-related data from your Hardhat or Foundry project to your Stagenet.
| Data | Used for |
|---|---|
| Contract name | Showing human-readable contract names in the app. |
| ABI | Decoding function calls, events, and contract interactions. |
| Deployed bytecode | Matching deployed contracts to Imported Contracts. |
| Storage layout | Showing storage variables and enabling storage-based tracking. |
| Source code | Linking imported contracts back to their original Solidity source. |
| Build metadata | Understanding where the contract came from, such as the repository or source path. |
Versions and deployments
Imported Contracts are organised around how smart contracts are developed.
You usually edit a contract over time, creating updated contract versions. You may also deploy the same version multiple times to test different configurations or scenarios.
contract.dev models that into versions and deployments:
- A contract can have many versions, each with a distinct bytecode.
- A version can have many deployments, each at a separate address.
Imported Contract
└─ Version
└─ DeploymentEach part has a specific role:
| Object | Meaning |
|---|---|
| Imported Contract | The contract definition your Stagenet knows about, such as Vault. |
| Version | One compiled version of that contract, with its own ABI, bytecode, and storage layout. |
| Deployment | One deployed address on your Stagenet that matches a version. |
For example, if you import Vault and deploy the same bytecode twice, contract.dev stores one Imported Contract with one version and two deployments:
Vault
└─ v1
├─ 0xVaultA → Workspace
└─ 0xVaultB → WorkspaceEach deployment has its own Workspace as each address has its own state and activity.
If you later change Vault, import the new compiled output, and deploy again, contract.dev creates a new version:
Vault
├─ v1
│ ├─ 0xVaultA → Workspace
│ └─ 0xVaultB → Workspace
└─ v2
└─ 0xVaultC → Workspace