Skip to content

feat: Bounty Payout Ledger — raw sqlite3, flat file (resubmit #1492) - #1494

Merged
Scottcjn merged 1 commit into
Scottcjn:mainfrom
LaphoqueRC:feat/payout-ledger-sqlite3-3d75ea
Mar 19, 2026
Merged

Scottcjn merged 1 commit into
Scottcjn:mainfrom
LaphoqueRC:feat/payout-ledger-sqlite3-3d75ea

Conversation

@LaphoqueRC

Copy link
Copy Markdown
Contributor

Bounty Payout Ledger — raw sqlite3, flat file

Resolves Scottcjn/rustchain-bounties#104

What changed from #1492:

  • Rewrote from scratch using raw sqlite3 (no flask_sqlalchemy)
  • Single flat file payout_ledger.py in root (no app/models/ directory)
  • Matches existing patterns from node/rustchain_v2_integrated_v2.2.1_rip200.py
  • Uses sqlite3.connect(DB_PATH) context manager pattern
  • Inline HTML template via render_template_string
  • SPDX-License-Identifier: MIT header

How it works:

  • init_payout_ledger_tables() — creates table with CREATE TABLE IF NOT EXISTS
  • register_ledger_routes(app) — call from your Flask app to add /ledger routes
  • Statuses: queued → pending → confirmed | voided
  • REST API: GET/POST /api/ledger, PATCH /api/ledger/:id/status, GET /api/ledger/summary
  • Web UI: GET /ledger — dark-themed dashboard with filters

Files:

  • payout_ledger.py (1 new file, 0 modifications to existing code)

Payout Wallets

  • ETH: 0x010A63e7Ee6E4925d2a71Bc93EA5374c9678869b
  • Base: 0x010A63e7Ee6E4925d2a71Bc93EA5374c9678869b
  • SOL: HZV6YPdTeJPjPujWjzsFLLKja91K2Ze78XeY8MeFhfK8

@github-actions

Copy link
Copy Markdown
Contributor

Welcome to RustChain! Thanks for your first pull request.

Before we review, please make sure:

  • Your PR has a BCOS-L1 or BCOS-L2 label
  • New code files include an SPDX license header
  • You've tested your changes against the live node

Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150)

A maintainer will review your PR soon. Thanks for contributing!

@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) size/L PR: 201-500 lines labels Mar 19, 2026
@Scottcjn
Scottcjn merged commit d055aa4 into Scottcjn:main Mar 19, 2026
6 checks passed
@LaphoqueRC

Copy link
Copy Markdown
Contributor Author

Thanks for merging! My payout address for the bounty:

RTC2fe3c33c77666ff76a1cd0999fd4466ee81250ff

Let me know if you need anything else.

createkr pushed a commit to createkr/Rustchain that referenced this pull request Mar 22, 2026
…qlite3-3d75ea

@LaphoqueRC — Raw sqlite3 payout ledger. You listened about SQLAlchemy. 10 RTC.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) size/L PR: 201-500 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[LEDGER] Bounty Payout Ledger — Queued / Pending / Confirmed

2 participants