Pushing Contracts
Pushing contracts is how your Stagenet learns about your smart contracts.
A push does not deploy anything. It uploads your project’s compiled contract information — name, ABI, bytecode, storage layout, and source — so the Stagenet can recognise matching deployments, decode their transactions and storage, and create a dashboard for each one.
How to push
From your Hardhat or Foundry project:
# Compile first
forge build # Foundry
npx hardhat compile # Hardhat
# Then push
contract.dev push-contractsDetected Foundry project
2 contracts pushed:
- Token
- VaultRe-run after contract changes — unchanged contracts are no-ops, changed contracts get a new version. See the push-contracts reference for path overrides and edge cases.
What gets pushed
| Data | Used for |
|---|---|
| Contract name | Human-readable names instead of raw addresses |
| ABI | Decoding function calls, events, and the interact panel |
| Deployed bytecode | Matching deployments to pushed contracts |
| Storage layout | Decoding storage variables |
| Source code | Linking back to the original Solidity |
Versions and deployments
You edit contracts over time and may deploy the same code more than once. contract.dev models this directly:
- A contract can have many versions, each with distinct bytecode.
- A version can have many deployments, each at its own address.
- Each deployment gets its own dashboard.
Vault
├─ v1
│ ├─ 0xVaultA → dashboard
│ └─ 0xVaultB → dashboard
└─ v2
└─ 0xVaultC → dashboardA whitespace- or comment-only change compiles to identical bytecode and creates no new version. A logic change creates a new version on the next push.