Skip to content

genesis: initial 108 atoms go to temple P2SH - #157

Merged
nghiacc merged 1 commit into
masterfrom
genesis-initial-mint-to-temple
Aug 4, 2026
Merged

genesis: initial 108 atoms go to temple P2SH#157
nghiacc merged 1 commit into
masterfrom
genesis-initial-mint-to-temple

Conversation

@nghiacc

@nghiacc nghiacc commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

At genesis, the initial fungible mint (108) is sent to the temple P2SH, not the genesis wallet.

Output Destination
Initial 108 atoms Temple P2SH (TEMPLE_ADDRESS)
Mint batons (28) Genesis wallet (unchanged — required for covenant handoff)

Why

Premine should not sit on GENESIS_SK. Temple is the treasury sink (same address remints already pay the 6-atom tax to).

Implementation

  • broadcastAlpGenesis / buildAlpGenesisAction: optional initialMintScript
  • create-wlotus-token.ts: passes Script.p2sh(temple.scriptHash)
  • Deployment JSON records initialMintAddress

Deploy note

Merge before the next create-dryrun-wlotus / prod genesis.

Summary by CodeRabbit

  • New Features
    • Initial token issuance is now directed to the temple address, while minting rights remain with the genesis wallet.
    • Deployment records now include the initial mint destination for improved visibility and tracking.

Batons still land on the genesis address so handoff to the PoW covenant works.
@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d17dc03a-14a3-49fa-974a-f4e5aeb28897

📥 Commits

Reviewing files that changed from the base of the PR and between 09e83fe and d2658c7.

📒 Files selected for processing (2)
  • scripts/create-wlotus-token.ts
  • src/genesis/broadcastGenesis.ts

📝 Walkthrough

Walkthrough

The genesis flow now separates the initial mint destination from mint batons. The WLotus token creation script sends the initial mint to the temple P2SH and records that destination in deployment metadata.

Changes

Genesis mint routing

Layer / File(s) Summary
Genesis destination selection
src/genesis/broadcastGenesis.ts
buildAlpGenesisAction accepts initialMintScript. The initial mint uses this script when provided. Mint batons continue to use batonScript.
Temple mint integration
scripts/create-wlotus-token.ts
The script constructs the temple P2SH, sends the initial mint to it, logs the destination, and records it in genesis configuration and deployment metadata.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant createWlotusToken
  participant buildAlpGenesisAction
  participant TempleP2SH
  participant GenesisWallet
  createWlotusToken->>buildAlpGenesisAction: provide templeP2SH as initialMintScript
  buildAlpGenesisAction->>TempleP2SH: direct initial mint
  buildAlpGenesisAction->>GenesisWallet: direct mint batons through batonScript
Loading

Possibly related PRs

Suggested reviewers: cursoragent

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: sending the initial 108 atoms to the temple P2SH.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch genesis-initial-mint-to-temple

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nghiacc
nghiacc merged commit 4cde36a into master Aug 4, 2026
1 check was pending
@nghiacc
nghiacc deleted the genesis-initial-mint-to-temple branch August 4, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant