Skip to main content
This guide walks you through setting up your development environment for Sigil smart contract development.

Full Development Environment

If you’re setting up a full Kontor development environment (including running the indexer and tests), see the Kontor README which covers:
  • Installing all build dependencies (Bitcoin, ZMQ, etc.)
  • Compiling Bitcoin Core for local testing
  • Running the full test suite
  • Docker deployment

Contract Development Only

To develop and test Sigil contracts without running a local indexer:

Install Dependencies

MacOS:
Ubuntu:

Set Up Rust

  1. Install Rust from rust-lang.org/tools/install
  2. Add the WebAssembly target:
  3. Install additional tools:

Working with Example Contracts

The example contracts in the Kontor repository require the Kontor indexer core libraries. The examples live in the same repository as the core libraries, so the paths work out of the box:
If you copy an example into your own workspace, update the workspace dependencies in your root Cargo.toml:
Alternatively, create your own contract workspace from scratch following the Hello World example, which shows the complete setup.

Next Steps

After completing Hello World, explore more examples:
  • Token - Learn about storage, maps, and state management
  • Shared Account - See cross-contract calls in action
  • AMM - Build a full automated market maker with complex logic
  • Pool - Understand liquidity pool patterns
For deeper understanding, see the Reference documentation.