Skip to content

feat(rust-client, cli): ensure non-fungible assets are fully supported - #2688

Merged
ricomateo merged 24 commits into
nextfrom
ricomateo-nfa-readiness
Oct 16, 2026
Merged

ricomateo merged 24 commits into
nextfrom
ricomateo-nfa-readiness

Conversation

@ricomateo

@ricomateo ricomateo commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Introduces the following changes:

  • Adds TransactionRequestBuilder helpers to build requests that mint and burn NFAs (build_mint_non_fungible_asset and build_burn_non_fungible_asset).
  • Changes how the NFAs are displayed in the CLI commands so that they include their faucet and asset ID, and they are separate from fungible tokens.
  • Adds tests for the NFA minting and burning operations.
  • Re-exports BurnNote from miden_client::note. The NFA faucet types and factories are available under miden_client::account::standards::faucets.

Closes #2673

@ricomateo
ricomateo force-pushed the ricomateo-nfa-readiness branch from 106d3ef to 1549c8e Compare October 8, 2026 18:04
@ricomateo ricomateo linked an issue Oct 9, 2026 that may be closed by this pull request
Comment on lines +169 to +183
let consumption_status = match consumption_checker
.can_consume(
account_id,
block_ref,
InputNote::unauthenticated(note.clone()),
account_tx_args.clone(),
)
.await?;
.await
{
Ok(status) => status,
// If the note consumption tx fails with prologue error, treat the note as not
// consumable
Err(NoteCheckerError::PrologueExecution(_)) => continue,
Err(err) => return Err(err.into()),
};

@ricomateo ricomateo Oct 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This change was required to fix the note screener bug discussed offline (without this, the mint_and_burn_non_fungible_transaction test fails when screening the burn transaction output notes, failing CI run here).

This probably isn't the right solution for this bug. Perhaps we can undo this fix and remove the failing test for now, create an issue to track the bug, and fix it once we come up with a proper solution.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should track this with an issue / TODO doc comment.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yes, let's open an issue for this. For now, I think it's fine to skip notes that error on the prologue. Ideally what we do for checking notes is actually checking against the new state of the account, not the original one. I think this would both be more correct and also would avoid the error.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Created an issue to track this #2699

@ricomateo ricomateo changed the title feat(client): NFA readiness feat(rust-client, cli): support NFA lifecycle Oct 9, 2026
@ricomateo ricomateo changed the title feat(rust-client, cli): support NFA lifecycle feat(rust-client, cli): ensure NFAs are fully supported Oct 9, 2026
@ricomateo
ricomateo marked this pull request as ready for review October 9, 2026 21:40
@ricomateo ricomateo changed the title feat(rust-client, cli): ensure NFAs are fully supported feat(rust-client, cli): ensure non-fungible assets are fully supported Oct 9, 2026
@juan518munoz
juan518munoz self-requested a review October 13, 2026 12:47

@juan518munoz juan518munoz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Comment on lines +169 to +183
let consumption_status = match consumption_checker
.can_consume(
account_id,
block_ref,
InputNote::unauthenticated(note.clone()),
account_tx_args.clone(),
)
.await?;
.await
{
Ok(status) => status,
// If the note consumption tx fails with prologue error, treat the note as not
// consumable
Err(NoteCheckerError::PrologueExecution(_)) => continue,
Err(err) => return Err(err.into()),
};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should track this with an issue / TODO doc comment.

@igamigo igamigo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Left a few minor comments but overall LGTM!

Comment on lines +444 to +445
/// Consumes the builder and returns a [`TransactionRequest`] for a transaction to mint a
/// non-fungible asset. This request must be executed against a non-fungible faucet account.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: non-fungible faucet account is fine here, but maybe we could link the actual account components that this transaction relies on.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done here db7cffe

Comment thread bin/miden-cli/src/utils.rs Outdated
Comment on lines +446 to +448
NonFungible {
/// The faucet prefix.
faucet: String,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think as of recently we moved away from prefix being the identifier of the faucets (after having removed AccountType::Faucet), so we should be able to rename this from faucet to faucet_id and use that nomenclature instead of "prefix". Could you check that this is consistent in the rest of the CLI's codebase?

Comment thread bin/miden-cli/src/utils.rs Outdated
},
NonFungible {
/// The faucet prefix.
faucet: String,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Additionally (maybe alternatively), I think we could also show the address and/or the symbol slot information here (miden::standards::faucets::non_fungible::symbol). But this is based on the account actually being a standard faucet which may not always be the case

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed FormatedAsset::NonFungible to include the address and symbol, along with a new method client to fetch the non-fungible faucet symbol here b1f88fe

@igamigo igamigo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! If we resolve conflicts I think we can merge this

@ricomateo
ricomateo merged commit af559d2 into next Oct 16, 2026
24 checks passed
@ricomateo
ricomateo deleted the ricomateo-nfa-readiness branch October 16, 2026 20:51
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.

Review client NFA readiness

3 participants