Skip to content

Ergo Contracts & Patterns Library#

A centralized index of canonical ErgoScript contract patterns with upstream code, tests, off-chain notes, UI considerations, and MCP usage.

Why this exists#

Many contract ideas and implementations are scattered across forums, hackathon repos, and PRs. Builders need pattern-level entry points with code-first references and minimal glue to integrate.

How to use this library#

  • Pick a category, open a pattern page, review the assumptions and security notes, then follow links to upstream code/tests.
  • Off-chain and UI references will be collected progressively; contributions welcome.

Categories#

Status Matrix#

Pattern Category Upstream Status
Perpetual Token Tokens PR 1082 Done
Whitelist-only Token Tokens PR 1080 Done
Daily Withdrawal Limit Access Control PR 1083 Done
Stealth Address Privacy PR 1084 Done
Trustless Hashrate Oracle Oracles PR 1085 WIP
Bulletproof Range Proof Verification Proofs PR 1079 WIP
Schnorr Signature Verification Proofs (to be published) WIP
Insurance: Physical Gold Non-delivery Insurance (refs pending) WIP
Import Off-chain Bank (Amitabh) Interoperability (refs pending) Planned
Trustless Peg Interoperability (refs pending) Planned
Trustless Bitcoin Relay Interoperability (refs pending) Planned
Randomness from ErgoRaffle Randomness (refs pending) Planned

Contributor Guide#

  • How to add/edit patterns: contracts-contributing.md
  • Pattern template: pattern-template.md
  • Off-chain/UI reference collection: contracts-offchain-references.md
  • MCP usage examples: contracts-mcp-examples.md

Roadmap (docs sync)#

  • Create category pages with brief explanations and links to pattern pages.
  • Add minimal stubs for each pattern with upstream PR/commit links and placeholders for Off-chain, UI, MCP.
  • Backfill references from forum threads and ErgoHack write-ups.
  • Add cross-links from tutorials and language pages.
  • Add a monthly sync check to update statuses and links.

Call for contributors#

  • If you’ve implemented off-chain flows or UI for any pattern, please add links via PR.
  • If you have forum threads or research notes, link them in the References section of the relevant pattern page.
  • Labels to use in issues: contracts:pattern, contracts:offchain, contracts:UI, contracts:sync-upstream