Deploying Intelligent Contracts
Deploying an Intelligent Contract creates a consensus transaction. On a Consensus v0.6 deployment, that transaction needs a fee distribution and enough protocol-fee value, just like a write. Choose the network deliberately, estimate from a measured fee profile, then wait for finalization and verify the execution result before using the contract address.
Quick Start
Get started quickly with these essential deployment options:
Deployment Approaches
GenLayer offers two primary deployment methods:
CLI Direct Deployment
The CLI is the shortest path for a single contract. Select and inspect the network first:
genlayer network set studio-dev
genlayer network info
genlayer deploy --contract contracts/my_contract.py --args "Hello World" 42The v0.6-compatible CLI resolves the deploy entry in fee-profile.json, estimates it against current network prices, and submits the required fee fields. Use the matching release candidate when targeting Studio-dev.
Learn more about CLI Deployment →
Deploy Scripts
Use ordered scripts for multi-contract deployments and follow-up configuration. The complete guide includes a copyable helper that converts profile quantities into a live estimate:
const estimate = await quoteProfile(client, feeProfile.deploy);
const txId = await client.deployContract({
code,
args: [],
fees: {
distribution: estimate.distribution,
feeValue: estimate.feeValue,
},
});Learn more about Deploy Scripts →
Networks Overview
Deploy to different networks based on your development stage:
| Network | Purpose | When to Use |
|---|---|---|
| Localnet | Local development | Fast, resettable testing and fee profiling |
| Studionet | Stable hosted Studio | Collaboration and stable hosted examples |
| Studio-dev | v0.123 / v0.6 preview | Release-candidate compatibility testing |
| Bradbury | Persistent public testnet | Production-like application validation |
Explore Network Configuration →
Development Workflow
Follow this recommended progression:
- Develop and measure locally on
localnet. - Commit the generated fee profile and test its low, standard, and high policies.
- Test the release candidate on
studio-devwith matching SDK and CLI RCs. - Use Studionet or Bradbury when you need the corresponding stable hosted environment.
studio-next.genlayer.com, if enabled, is a browser alias for the preview. SDKs, CLI profiles, and wallets should keep using the canonical Studio-dev RPC and chain ID rather than treating it as a separate network.
What's Next?
After deploying your contracts:
- Verify the deployment outcome: finalization does not by itself mean successful execution.
- Record the transaction ID and address: resume tracking the same transaction after interruption; do not blindly redeploy.
- Exercise writes with the same fee profile: use Writing to Intelligent Contracts.
- Integrate the frontend: use Transaction Kit or the low-level SDK.
- Diagnose fee failures: see Fee Outcomes and Debugging.
Ready to start deploying? Choose your preferred method and dive into the detailed guides!