Skip to content

polkadot-developers/polkadot-cookbook

Repository files navigation

Polkadot Polkadot
Dot CLI Dot CLI

Polkadot Cookbook

Practical, tested recipes for Polkadot SDK development

Browse RecipesContribute a RecipeDocumentation


License Polkadot Cookbook SDK CLI Rust


Recipes

The Polkadot Cookbook provides recipes across 5 pathways of Polkadot development:

Runtime Development (Polkadot SDK)

Build custom FRAME pallets and runtime logic with Rust.

Recipe Description Difficulty
Basic Pallet Create a custom FRAME pallet with storage and events Beginner

Smart Contracts (Solidity)

Deploy and interact with Solidity contracts using pallet-revive.

Recipe Description Difficulty
Simple Counter A simple counter smart contract using pallet-revive Beginner

Basic Interactions

Single-chain transaction submission and state queries with PAPI.

Recipe Description Difficulty
Coming soon Balance transfers, batch operations, proxy calls -

XCM (Cross-Chain Messaging)

Asset transfers and cross-chain communication with Chopsticks.

Recipe Description Difficulty
Teleport Assets Teleport assets between parachains using XCM v5 and PAPI Beginner

Testing Infrastructure

Zombienet and Chopsticks configurations for network testing.

Recipe Description Difficulty
Coming soon Parachain test network, fork testing setups -

Want to share your knowledge? See Contributing a Recipe


Quick Start

Run a Recipe

Each recipe is self-contained with working code and tests:

git clone https://github.com/polkadot-developers/polkadot-cookbook.git
cd polkadot-cookbook/recipes/basic-pallet

# Run tests
cargo test

# Build the pallet
cargo build --release

Contribute a Recipe

Install the CLI Tool

Download pre-built binary (Recommended):

# Linux (x86_64)
curl -L https://github.com/polkadot-developers/polkadot-cookbook/releases/latest/download/dot-linux-amd64.tar.gz | tar xz
sudo mv dot /usr/local/bin/

# macOS (Apple Silicon)
curl -L https://github.com/polkadot-developers/polkadot-cookbook/releases/latest/download/dot-macos-apple-silicon.tar.gz | tar xz
sudo mv dot /usr/local/bin/

Or build from source:

cargo build --release --bin dot
# Binary will be at ./target/release/dot

Use the CLI

# Setup and verify your environment
dot setup
dot doctor

# Create a new recipe (interactive mode)
dot recipe create

# Test your recipe
dot recipe test my-pallet

# Validate recipe structure
dot recipe validate my-pallet

# Run linting checks
dot recipe lint my-pallet

# List all recipes
dot recipe list

# Submit your recipe as a pull request
dot recipe submit my-pallet

The CLI supports five recipe pathways:

  • Runtime Development - Build custom FRAME pallets with Rust
  • Smart Contracts - Deploy Solidity contracts with pallet-revive
  • Basic Interactions - Single-chain transactions with PAPI (TypeScript)
  • XCM - Cross-chain messaging with Chopsticks (TypeScript)
  • Testing Infrastructure - Zombienet and Chopsticks configurations

Interactive CLI Features:

  • Title-first workflow (auto-generates slugs)
  • Difficulty levels (Beginner/Intermediate/Advanced)
  • Content types (Tutorial/Guide)
  • Automatic git branch creation
  • Automatic dependency installation

New: No proposal required! Submit recipes directly via PR using the dot recipe submit command.

See CONTRIBUTING.md for the complete guide.


Documentation

For Recipe Contributors

For Tool Users

  • CLI Tool - Command-line tool for creating recipes
  • SDK Library - Programmatic API for tool developers

For Maintainers


Contributing

We welcome all contributions:

  • Recipe - Share your Polkadot knowledge (most welcome!)
  • Bug Report - Help us improve
  • Feature - Suggest tooling improvements
  • Documentation - Make things clearer

See CONTRIBUTING.md to get started.


License

MIT OR Apache-2.0


About

Practical, tested recipes for Polkadot SDK development

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •