Intelligent Contracts
Deploying

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" 42

The 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:

NetworkPurposeWhen to Use
LocalnetLocal developmentFast, resettable testing and fee profiling
StudionetStable hosted StudioCollaboration and stable hosted examples
Studio-devv0.123 / v0.6 previewRelease-candidate compatibility testing
BradburyPersistent public testnetProduction-like application validation

Explore Network Configuration →

Development Workflow

Follow this recommended progression:

  1. Develop and measure locally on localnet.
  2. Commit the generated fee profile and test its low, standard, and high policies.
  3. Test the release candidate on studio-dev with matching SDK and CLI RCs.
  4. 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:

  1. Verify the deployment outcome: finalization does not by itself mean successful execution.
  2. Record the transaction ID and address: resume tracking the same transaction after interruption; do not blindly redeploy.
  3. Exercise writes with the same fee profile: use Writing to Intelligent Contracts.
  4. Integrate the frontend: use Transaction Kit or the low-level SDK.
  5. Diagnose fee failures: see Fee Outcomes and Debugging.

Ready to start deploying? Choose your preferred method and dive into the detailed guides!