Inspiration

  • Everyday shoppers want to make climate-positive choices without wallet setups, crypto jargon, or store integration changes.
  • We wanted a “one click, verifiable receipt” that proves an offset happened on-chain and is easy to share.
  • We leaned on Polkadot/Substrate primitives (remarks, sr25519 signing) but kept everything demoable offline.

What it does

  • Detects an “order” (mocked) and estimates CO₂e with a lightweight heuristic.
  • On click, submits an on-chain action (Substrate remark on a local dev chain) and produces a receipt URI (ipfs://<cid>) for the offset.
  • Renders a receipt card with badge image, attributes, and links; serves metadata locally at /metadata/<cid>.

How we built it

  • Frontend: React + Vite + React Query for state, multi-step flow, receipt viewer that fetches metadata by CID.
  • Backend: FastAPI for estimation, runner orchestration, SQLite logging, metadata generation, static badge serving.
  • Runner: Rust + subxt; mock by default; live mode signs and submits a remark to a local Substrate dev node (substrate-contracts-node).
  • Assets: badge PNGs hashed; metadata stored locally and exposed via /metadata/<cid>; badges served at /static.

Challenges we ran into

  • Bitgreen retire API details were unavailable; we pivoted to a local Substrate stand-in for deterministic demos.
  • Balancing realism (on-chain hash, metadata) with zero external dependencies for judges.

Accomplishments that we're proud of

  • End-to-end flow: estimate → signed chain call → receipt with metadata and badge, demoable fully offline.
  • Clean, fast UI with mock/live toggles and local CID-based receipts.
  • Self-contained demo environment: bundled Substrate node plus scripts and docs for judges to run without cost.

What we learned

  • Subxt ergonomics for quick Substrate interactions, and how to fall back gracefully when upstream endpoints are uncertain.
  • The importance of packaging: local binaries, clear runbooks, and mock modes make demos resilient.
  • UX matters: surfacing hashes, receipts, and badges clearly builds trust even in a constrained demo.

What's next for Green Receipts

  • Swap the remark for a real “retire” pallet call (Bitgreen or a custom pallet) once available.
  • Pin metadata to public IPFS and/or mint a true NFT (Substrate or EVM) for wallet/explorer visibility.
  • Browser extension packaging for real checkout page detection and a 1-click offset CTA.
  • Refine the estimator with better models or external APIs when available; keep a fast heuristic fallback.

Built With

Share this project:

Updates