| Crates.io | ironclad-cli |
| lib.rs | ironclad-cli |
| version | 0.1.1 |
| created_at | 2025-12-28 17:30:07.818353+00 |
| updated_at | 2025-12-28 17:51:46.155664+00 |
| description | Ironclad - DPL smart contract development framework for dchat |
| homepage | https://dchat.network |
| repository | https://github.com/dchat/dchat |
| max_upload_size | |
| id | 2009170 |
| size | 182,435 |
Ironclad is the Anchor-like development framework for dchat smart contracts.
Ironclad provides a complete toolkit for building, testing, and deploying DPL (dchat Program Language) smart contracts:
cd crates/ironclad-cli
cargo install --path .
Or run directly from the workspace:
cargo build -p ironclad-cli
# Then use: target/debug/ironclad
# Create from template
ironclad init my-program --template counter
cd my-program
Available templates:
counter - Simple state counterescrow - Multi-party escrowtoken - Fungible token implementationcustom - Empty template# Development build
ironclad build
# Release build with verification
ironclad build --release --verify
ironclad test
# With verbose output
ironclad test --verbose
ironclad verify
# With expected schema hash
ironclad verify --expected-hash <hash>
# Deploy to devnet
ironclad deploy --network devnet
# Deploy to mainnet with custom keypair
ironclad deploy --network mainnet --keypair ~/.dchat/my-keypair.json
# Extract IDL from WASM
ironclad idl extract
# Show IDL hash
ironclad idl hash idl/my-program.json
# Validate IDL
ironclad idl validate idl/my-program.json
# Generate TypeScript client (future)
ironclad idl generate idl/my-program.json --language typescript
# Show local project info
ironclad info
# Query deployed program
ironclad info --program <program-id> --network mainnet
# Show current config
ironclad config show
# Set configuration value
ironclad config set project.name my-program
ironclad config set build.generate_idl true
# Get configuration value
ironclad config get project.version
# Remove build artifacts
ironclad clean
my-program/
โโโ Cargo.toml
โโโ Ironclad.toml # Project configuration
โโโ build.rs # DPL build script
โโโ src/
โ โโโ lib.rs # Program code
โโโ tests/
โ โโโ integration.rs
โโโ idl/ # Generated IDL files
โ โโโ my-program.json
โโโ target/
โโโ wasm32-wasip1/
โโโ release/
โโโ my_program.wasm
[project]
name = "my-program"
version = "0.1.0"
program_id = "DcHaT..." # Set after first deployment
description = "My awesome smart contract"
authors = ["Your Name"]
[build]
target = "wasm32-wasip1"
generate_idl = true
verify_schema = false
[networks.localnet]
url = "http://localhost:8545"
ws_url = "ws://localhost:8546"
keypair = "~/.dchat/keypair.json"
confirm = true
[networks.devnet]
url = "https://devnet.dchat.network"
ws_url = "wss://devnet.dchat.network/ws"
confirm = true
[networks.mainnet]
url = "https://mainnet.dchat.network"
ws_url = "wss://mainnet.dchat.network/ws"
confirm = true
[test]
timeout = 300
parallel = true
[idl]
output_dir = "idl"
generate_ts = false
ts_output_dir = "ts-client"
The ironclad CLI works with the existing DPL examples in this repository:
# Navigate to an example
cd examples/contracts/dpl-escrow-ironclad
# Build
ironclad build --release
# Test
ironclad test
# Verify
ironclad verify
# Show info
ironclad info
Note: The dpl-escrow-ironclad example is already set up as a proper Ironclad project with Ironclad.toml.
| Command | Description | Example |
|---|---|---|
ironclad init <name> |
Initialize new project | ironclad init my-token --template token |
ironclad build |
Build smart contract | ironclad build --release --verify |
ironclad test |
Run tests | ironclad test --verbose |
ironclad verify |
Verify manifest | ironclad verify --expected-hash <hash> |
ironclad idl extract |
Extract IDL from WASM | ironclad idl extract --output idl/program.json |
ironclad idl hash |
Show IDL hash | ironclad idl hash idl/program.json |
ironclad deploy |
Deploy program | ironclad deploy --network devnet |
ironclad upgrade |
Upgrade program | ironclad upgrade --program-id <id> --network mainnet |
ironclad info |
Show program info | ironclad info --program <id> --network mainnet |
ironclad config show |
Show configuration | ironclad config show |
ironclad clean |
Clean build artifacts | ironclad clean |
ironclad init my-programsrc/lib.rsironclad buildironclad testironclad verifyironclad deploy --network devnetironclad upgrade --program-id <id>| Feature | Anchor | Ironclad |
|---|---|---|
| Language | Rust | Rust |
| Target | BPF/eBPF | WASM |
| Init | anchor init |
ironclad init |
| Build | anchor build |
ironclad build |
| Test | anchor test |
ironclad test |
| Deploy | anchor deploy |
ironclad deploy |
| IDL | Automatic | Automatic |
| Verification | anchor verify |
ironclad verify |
Run ironclad config init in your project root, or run ironclad init to create a new project.
Run ironclad build --release before deploying or verifying.
Ensure you're using the DPL SDK with proper build.rs configuration. See existing examples for reference.
See examples/contracts/dpl-escrow-ironclad/ for a complete working example.
Ironclad is part of the dchat project. Contributions are welcome!
MIT OR Apache-2.0
Built with โค๏ธ for the dchat ecosystem