Skip to content

Conversation

@Farukest
Copy link
Contributor

Summary

Move note script logic from standalone files in note_scripts/ directory to miden::standards::notes namespace modules. This enables dynamic access to script roots via procref instead of hardcoding values.

For context see #2156 and #2188.

Changes:

  • Add new modules under standards/notes/: p2id, p2ide, swap, burn, mint
  • Each module contains a pub proc main with the script logic
  • Original note script files now serve as minimal wrappers calling exec.<note>::main

Benefits

  • Script roots accessible via procref.p2id::main (no more hardcoded constants)
  • Note script files reduced from ~100+ lines to 5 lines each
  • Opens possibility for future note constructors (separate PR)

Test plan

  • cargo build -p miden-standards passes
  • cargo test -p miden-standards passes (52 tests)
  • Note script integration tests pass (27 tests: p2id, p2ide, swap, mint, burn)

Closes #2243

Move note script logic from standalone files in `note_scripts/` directory
to `miden::standards::notes` namespace modules. This enables dynamic access
to script roots via `procref` instead of hardcoding values.

Changes:
- Add new modules under `standards/notes/`: p2id, p2ide, swap, burn, mint
- Each module contains a `pub proc main` with the script logic
- Original note script files now serve as minimal wrappers calling
  `exec.<note>::main`

Closes 0xMiden#2243
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.

Move standard note scripts into standard library

1 participant