Skip to content

feat(standards): MintNote bon builder#13

Closed
VAIBHAVJINDAL3012 wants to merge 1 commit into
nextfrom
vaibhav/mint-note-builder
Closed

feat(standards): MintNote bon builder#13
VAIBHAVJINDAL3012 wants to merge 1 commit into
nextfrom
vaibhav/mint-note-builder

Conversation

@VAIBHAVJINDAL3012

@VAIBHAVJINDAL3012 VAIBHAVJINDAL3012 commented Jun 25, 2026

Copy link
Copy Markdown

Summary

Converts MintNote from a unit marker + MintNote::create factory into a struct built with a bon typestate builder (MintNote::builder()), mirroring the merged P2idNote builder. One of three per-note PRs splitting the standard-note builder work (Swap / Burn / Mint).

  • MintNote::builder() produces a MintNote that converts into a Note via Note::from (always public, no assets - the minted asset lives in storage).
  • The faucet-id / embedded-asset-faucet match check is preserved via NoteError::other.
  • Migrated the 6 faucet mint-note test sites.

Builder-only change; no MASM or on-chain behaviour changes.

Verification

  • cargo clippy -p miden-standards -p miden-testing --all-targets --all-features -- -D warnings - clean
  • New note::mint::tests::{builder_builds_public_mint_note, builder_rejects_mismatched_faucet} unit tests; the faucet mint suites pass and re-run in CI here.

Convert the `MintNote` marker type into a struct built via a `bon` typestate
builder (`MintNote::builder()`), mirroring `P2idNote`. A `MintNote` converts
into a `Note` via `Note::from` and keeps the faucet-id/asset-faucet match check
via `NoteError::other`. Migrate the faucet mint-note test sites.

Part of 0xMiden#2283.
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 194b11ae-891d-40c6-a4d0-c87fc90e66d3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch vaibhav/mint-note-builder

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.

faucet.id(),
faucet_owner_account_id,
mint_storage,
NoteAttachments::default(),

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default and not putting attachment are different ruight???

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