Deploy a contract

Description

Deploy a Clarity smart contract to the Stacks blockchain using Stacks.js

Use Cases

  • Deploying new smart contracts to mainnet or testnet

  • Automating contract deployments in CI/CD pipelines

  • Programmatic contract deployment for dApp initialization

  • Deploying contract upgrades or new versions

Key Concepts

  • Contract name - Unique identifier for your contract (letters, numbers, hyphens)

  • Code body - The Clarity contract code as a string

  • Sender key - Private key of the account deploying the contract

  • Network - Target network (mainnet, testnet, or devnet)

Was this helpful?