A command-line toolkit for the Portaldot blockchain. Its hero feature, FailLens, turns cryptic transaction failures into clear, human-readable diagnoses — with fixes.
A starter kit helps you write Portaldot code; pdk is what saves you when it breaks.
Portaldot is brand-new and Rust-first; in Season 1 you run it from a local node. When a transaction fails, the node hands back a raw, unexplained error code. No hint of what went wrong, no hint of how to fix it.
# a failed transaction on Portaldot, unfiltered ExtrinsicFailed: DispatchError { Module: { index: 6, error: 2 } } # ...now what?
FailLens reads the failed transaction's ExtrinsicFailed event, decodes the error against the chain's own metadata, and pairs it with a curated knowledge base of fixes.

Start a local Portaldot node and verify it with a real on-chain transaction.
Show the pre-funded dev accounts and their POT balances — the one-command answer to "how do I get POT?".
FailLens — decode any failed transaction into a plain-language diagnosis and fix. Add --watch for live, --json for CI.
Look up what any Portaldot error means and how to fix it — a queryable reference, no transaction needed.
Check the node version, runtime, and ink! / contracts-API compatibility.
Preview a transfer's POT fee and feasibility — without sending it.
Fund accounts from YAML fixtures so you start from realistic state.
Browse the runtime's pallets, calls, and errors — straight from metadata.
Send POT from a dev account — a real on-chain transfer.
Read any value from the chain's storage, straight from the terminal.
Stream every chain event live — a general monitoring view.
Generate or inspect a keypair — no separate tool needed.
Requires Python 3.11+. pdk runs natively on Linux, macOS and Windows — only the node binary is Linux/macOS (on Windows, run the node in WSL and connect pdk from PowerShell).
$ pip install portaldot-pdk # one command, from PyPI $ pdk up # start a local node $ pdk debug --demo # submit a failure, then decode it $ pdk doctor # inspect the node $ pdk debug 0x… --json --exit-code # gate CI on the result
A failed extrinsic emits a System.ExtrinsicFailed event carrying a DispatchError. FailLens resolves that error against the chain's own metadata — no hard-coded tables — so it adapts to any Portaldot runtime version. Every error in the knowledge base is verified against the live runtime.
On PyPI today. Next: a typed TypeScript SDK (to unlock ink! contract deploy), editor extensions, and deeper CI integrations — all under one CLI.