0xMiden / 0xMiden/protocol

Simplify output note creation flow for smart contracts

Abierto
#2,466 0 comentarios 2 reacciones 0 asignados Ver en GitHub
standards
Lenguaje dominante
Rust
Estrellas
132
Forks
167
Merge medio
1 d 23 h
PR fusionados (30 d)
110

Descripción

The current flow for creating output notes from smart contracts at the TX kernel level is quite involved. You need to manually compute the recipient, construct metadata, create the note, and add assets in separate steps. This complexity propagates up to the Rust compiler level, where creating a simple P2ID output note requires a significant amount of boilerplate (see [example from miden-bank](https://github.com/Keinberger/miden-bank/blob/ce2c9684f0a95f86a5042293a63e145c3144c9f9/contracts/bank-account/src/lib.rs#L220)).

It would be worth exploring ways to simplify this flow at the TX kernel level, not just for standard note types but for output note creation in general. As discussed with @PhilippGackstatter, the `miden_protocol` level should remain flexible and unopinionated, so higher-level abstractions could live in `miden-standards` or above. Potentially this could also be simplified at the compiler level.

This is low priority and can be addressed post-mainnet.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.