Deploying Intelligent Contracts
This comprehensive guide covers everything you need to know about deploying your Intelligent Contracts on GenLayer. From local development to testnet deployment, learn how to use different methods and networks effectively.
Quick Start
Get started quickly with these essential deployment options:
Deployment Approaches
GenLayer offers two primary deployment methods:
CLI Direct Deployment
Perfect for quick deployments and simple contracts. Deploy with a single command:
genlayer deploy --contract contracts/my_contract.py --args "Hello World" 42
Learn more about CLI Deployment →
Deploy Scripts
Ideal for complex workflows, multi-contract deployments, and testnet environments:
export default async function main(client: GenLayerClient<any>) {
// Deploy and configure multiple contracts
const mainContract = await deployContract(client, "contracts/main.py", []);
const helperContract = await deployContract(client, "contracts/helper.py", [mainContract]);
await configureContracts(client, mainContract, helperContract);
}
Learn more about Deploy Scripts →
Networks Overview
Deploy to different networks based on your development stage:
Network | Purpose | When to Use |
---|---|---|
Localnet | Local development | Development, debugging, initial testing |
Studionet | Hosted development | Team collaboration, quick prototyping |
TestnetAsimov | Pre-production testing | Final validation (requires faucet tokens) |
Explore Network Configuration →
Development Workflow
Follow this recommended progression:
- Develop locally on
localnet
with full control - Test collaboratively on
studionet
with your team - Validate thoroughly on
testnetAsimov
in a production-like environment
Start with CLI deployment for simple contracts, then graduate to deploy scripts as your projects become more complex.
What's Next?
After deploying your contracts:
- Test Contract Functions: Use
genlayer call
andgenlayer write
to interact with deployed contracts - Monitor Transactions: Check transaction receipts with
genlayer receipt <txId>
- Build Frontend: Integrate with your deployed contracts using GenLayerJS (opens in a new tab)
- Debug Issues: Use the Debugging Guide if you encounter problems
Ready to start deploying? Choose your preferred method and dive into the detailed guides!