On this pageNavigation ▾

Introduction to Caatinga

Caatinga is a deployment orchestrator and versioned artifact manager for Stellar Soroban smart contracts.

It bridges the gap between Rust smart contract development, automated multi-contract deployment, and frontend integration.

Why Caatinga?

Developing smart contracts on Stellar Soroban involves multiple steps:

  1. Compiling Rust crates into optimized .wasm bytecode binaries.
  2. Managing network configurations and secret keys or identity aliases.
  3. Deploying contracts to Stellar networks (Local Sandbox, Testnet, Mainnet).
  4. Extracting deployed Contract IDs and recording WASM hashes.
  5. Generating type-safe TypeScript bindings for web applications.
  6. Invoking and testing contract functions on-chain.

Without an orchestrator, developers often write custom scripts or manually copy contract IDs into .env files. Caatinga automates this entire pipeline into a single declarative workflow:

  1. Initialize Project

    Run npx ctg init my-dapp to scaffold a project with caatinga.config.ts.

  2. Build Contracts

    Compile Rust contracts using npx ctg build.

  3. Deploy & Graph Resolution

    Deploy contracts in topological dependency order using npx ctg deploy.

  4. Generate Bindings

    Instantly produce TypeScript client bindings via npx ctg generate.

  5. Invoke & Read

    Interact with your contract state using ctg invoke and ctg read.

Core Mental Model

Caatinga operates on two source of truth files in your workspace:

  • caatinga.config.ts: Declarative configuration defining contracts, dependencies, network endpoints, and post-deploy hooks.
  • caatinga.artifacts.json: Deterministic record storing contract IDs, WASM hashes, deployment timestamps, network states, and upgrade history.

Never edit caatinga.artifacts.json manually. Caatinga updates this file atomically during builds and deployments.

Next up: Check the Requirements or follow the Installation guide.