Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

- Removed redundant note storage item count from advice map ([#2376](https://github.com/0xMiden/miden-base/pull/2376)).
- [BREAKING] Prefixed transaction kernel events with `miden::protocol` ([#2364](https://github.com/0xMiden/miden-base/pull/2364)).
- [BREAKING] Simplified `NoteMetadata::new()` constructor to not require tag parameter; tag defaults to zero and can be set via `with_tag()` builder method ([#2384](https://github.com/0xMiden/miden-base/pull/2384)).
- [BREAKING] Renamed `WellKnownComponent` to `StandardAccountComponent`, `WellKnownNote` to `StandardNote`, and `WellKnownNoteAttachment` to `StandardNoteAttachment` ([#2332](https://github.com/0xMiden/miden-base/pull/2332)).
- Skip requests to the `DataStore` for asset vault witnesses which are already in transaction inputs ([#2298](https://github.com/0xMiden/miden-base/pull/2298)).
- [BREAKING] Refactored `TransactionAuthenticator::get_public_key()` method to return `Arc<PublicKey> `instead of `&PublicKey` ([#2304](https://github.com/0xMiden/miden-base/pull/2304)).
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-agglayer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,8 @@ pub fn create_claim_note<R: FeltRng>(params: ClaimNoteParams<'_, R>) -> Result<N
.map_err(|e| NoteError::other(e.to_string()))?
.into();
// Use a default sender since we don't have sender anymore - create from destination address
let metadata = NoteMetadata::new(params.claim_note_creator_account_id, note_type, tag)
let metadata = NoteMetadata::new(params.claim_note_creator_account_id, note_type)
.with_tag(tag)
.with_attachment(attachment);
let assets = NoteAssets::new(vec![])?;
let recipient = NoteRecipient::new(serial_num, claim_script, inputs);
Expand Down
2 changes: 1 addition & 1 deletion crates/miden-protocol/src/note/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ mod tests {
let recipient = NoteRecipient::new(serial_num, script, note_storage);

let asset = Asset::Fungible(FungibleAsset::new(faucet, 100).unwrap());
let metadata = NoteMetadata::new(faucet, NoteType::Public, NoteTag::from(123));
let metadata = NoteMetadata::new(faucet, NoteType::Public).with_tag(NoteTag::from(123));

Note::new(NoteAssets::new(vec![asset]).unwrap(), metadata, recipient)
}
Expand Down
31 changes: 25 additions & 6 deletions crates/miden-protocol/src/note/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,14 @@ impl NoteMetadata {
// --------------------------------------------------------------------------------------------

/// Returns a new [`NoteMetadata`] instantiated with the specified parameters.
pub fn new(sender: AccountId, note_type: NoteType, tag: NoteTag) -> Self {
///
/// The tag defaults to [`NoteTag::default()`]. Use [`NoteMetadata::with_tag`] to set a
/// specific tag if needed.
pub fn new(sender: AccountId, note_type: NoteType) -> Self {
Self {
sender,
note_type,
tag,
tag: NoteTag::default(),
attachment: NoteAttachment::default(),
}
}
Expand Down Expand Up @@ -153,12 +156,27 @@ impl NoteMetadata {
// MUTATORS
// --------------------------------------------------------------------------------------------

/// Overwrites the note's attachment with the provided one.
/// Mutates the note's tag by setting it to the provided value.
pub fn set_tag(&mut self, tag: NoteTag) {
self.tag = tag;
}

/// Returns a new [`NoteMetadata`] with the tag set to the provided value.
///
/// This is a builder method that consumes self and returns a new instance for method chaining.
pub fn with_tag(mut self, tag: NoteTag) -> Self {
self.tag = tag;
self
}
Comment on lines +167 to +170
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I would have maybe changed the parameter type to something like Into<NoteTag>. This way, we'd be able to call this method with anything that can be trivially converted into a NoteTag (would make testing code a bit easier).


/// Mutates the note's attachment by setting it to the provided value.
pub fn set_attachment(&mut self, attachment: NoteAttachment) {
self.attachment = attachment;
}

/// Overwrites the note's attachment with the provided one.
/// Returns a new [`NoteMetadata`] with the attachment set to the provided value.
///
/// This is a builder method that consumes self and returns a new instance for method chaining.
pub fn with_attachment(mut self, attachment: NoteAttachment) -> Self {
self.attachment = attachment;
self
Expand All @@ -184,7 +202,7 @@ impl Deserializable for NoteMetadata {
let tag = NoteTag::read_from(source)?;
let attachment = NoteAttachment::read_from(source)?;

Ok(NoteMetadata::new(sender, note_type, tag).with_attachment(attachment))
Ok(NoteMetadata::new(sender, note_type).with_tag(tag).with_attachment(attachment))
}
}

Expand Down Expand Up @@ -351,7 +369,8 @@ mod tests {
let sender = AccountId::try_from(ACCOUNT_ID_MAX_ONES).unwrap();
let note_type = NoteType::Public;
let tag = NoteTag::new(u32::MAX);
let metadata = NoteMetadata::new(sender, note_type, tag).with_attachment(attachment);
let metadata =
NoteMetadata::new(sender, note_type).with_tag(tag).with_attachment(attachment);

// Serialization Roundtrip
let deserialized = NoteMetadata::read_from_bytes(&metadata.to_bytes())?;
Expand Down
7 changes: 2 additions & 5 deletions crates/miden-protocol/src/testing/note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ impl Note {
let note_script = NoteScript::mock();
let assets =
NoteAssets::new(vec![FungibleAsset::mock(200)]).expect("note assets should be valid");
let metadata = NoteMetadata::new(
sender_id,
NoteType::Private,
NoteTag::with_account_target(sender_id),
);
let metadata = NoteMetadata::new(sender_id, NoteType::Private)
.with_tag(NoteTag::with_account_target(sender_id));
let inputs = NoteStorage::new(Vec::new()).unwrap();
let recipient = NoteRecipient::new(serial_num, note_script, inputs);

Expand Down
8 changes: 4 additions & 4 deletions crates/miden-standards/src/account/interface/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ fn test_basic_wallet_custom_notes() {
let sender_account_id = ACCOUNT_ID_REGULAR_PUBLIC_ACCOUNT_IMMUTABLE_CODE_2.try_into().unwrap();
let serial_num = RpoRandomCoin::new(Word::from([1, 2, 3, 4u32])).draw_word();
let tag = NoteTag::with_account_target(wallet_account.id());
let metadata = NoteMetadata::new(sender_account_id, NoteType::Public, tag);
let metadata = NoteMetadata::new(sender_account_id, NoteType::Public).with_tag(tag);
let vault = NoteAssets::new(vec![FungibleAsset::mock(100)]).unwrap();

let compatible_source_code = "
Expand Down Expand Up @@ -336,7 +336,7 @@ fn test_basic_fungible_faucet_custom_notes() {
let sender_account_id = ACCOUNT_ID_REGULAR_PUBLIC_ACCOUNT_IMMUTABLE_CODE_2.try_into().unwrap();
let serial_num = RpoRandomCoin::new(Word::from([1, 2, 3, 4u32])).draw_word();
let tag = NoteTag::with_account_target(faucet_account.id());
let metadata = NoteMetadata::new(sender_account_id, NoteType::Public, tag);
let metadata = NoteMetadata::new(sender_account_id, NoteType::Public).with_tag(tag);
let vault = NoteAssets::new(vec![FungibleAsset::mock(100)]).unwrap();

let compatible_source_code = "
Expand Down Expand Up @@ -439,7 +439,7 @@ fn test_custom_account_custom_notes() {

let serial_num = RpoRandomCoin::new(Word::from([1, 2, 3, 4u32])).draw_word();
let tag = NoteTag::with_account_target(target_account.id());
let metadata = NoteMetadata::new(sender_account.id(), NoteType::Public, tag);
let metadata = NoteMetadata::new(sender_account.id(), NoteType::Public).with_tag(tag);
let vault = NoteAssets::new(vec![FungibleAsset::mock(100)]).unwrap();

let compatible_source_code = "
Expand Down Expand Up @@ -543,7 +543,7 @@ fn test_custom_account_multiple_components_custom_notes() {

let serial_num = RpoRandomCoin::new(Word::from([1, 2, 3, 4u32])).draw_word();
let tag = NoteTag::with_account_target(target_account.id());
let metadata = NoteMetadata::new(sender_account.id(), NoteType::Public, tag);
let metadata = NoteMetadata::new(sender_account.id(), NoteType::Public).with_tag(tag);
let vault = NoteAssets::new(vec![FungibleAsset::mock(100)]).unwrap();

let compatible_source_code = "
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-standards/src/note/burn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ impl BurnNote {
let inputs = NoteStorage::new(vec![])?;
let tag = NoteTag::with_account_target(faucet_id);

let metadata = NoteMetadata::new(sender, note_type, tag).with_attachment(attachment);
let metadata =
NoteMetadata::new(sender, note_type).with_tag(tag).with_attachment(attachment);
let assets = NoteAssets::new(vec![fungible_asset])?; // BURN notes contain the asset to burn
let recipient = NoteRecipient::new(serial_num, note_script, inputs);

Expand Down
3 changes: 2 additions & 1 deletion crates/miden-standards/src/note/mint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ impl MintNote {

let tag = NoteTag::with_account_target(faucet_id);

let metadata = NoteMetadata::new(sender, note_type, tag).with_attachment(attachment);
let metadata =
NoteMetadata::new(sender, note_type).with_tag(tag).with_attachment(attachment);
let assets = NoteAssets::new(vec![])?; // MINT notes have no assets
let recipient = NoteRecipient::new(serial_num, note_script, storage);

Expand Down
3 changes: 2 additions & 1 deletion crates/miden-standards/src/note/p2id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ impl P2idNote {

let tag = NoteTag::with_account_target(target);

let metadata = NoteMetadata::new(sender, note_type, tag).with_attachment(attachment);
let metadata =
NoteMetadata::new(sender, note_type).with_tag(tag).with_attachment(attachment);
let vault = NoteAssets::new(assets)?;

Ok(Note::new(vault, metadata, recipient))
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-standards/src/note/p2ide.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ impl P2ideNote {
let recipient = Self::build_recipient(target, reclaim_height, timelock_height, serial_num)?;
let tag = NoteTag::with_account_target(target);

let metadata = NoteMetadata::new(sender, note_type, tag).with_attachment(attachment);
let metadata =
NoteMetadata::new(sender, note_type).with_tag(tag).with_attachment(attachment);
let vault = NoteAssets::new(assets)?;

Ok(Note::new(vault, metadata, recipient))
Expand Down
5 changes: 3 additions & 2 deletions crates/miden-standards/src/note/swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ impl SwapNote {
let serial_num = rng.draw_word();

// build the outgoing note
let metadata =
NoteMetadata::new(sender, swap_note_type, tag).with_attachment(swap_note_attachment);
let metadata = NoteMetadata::new(sender, swap_note_type)
.with_tag(tag)
.with_attachment(swap_note_attachment);
let assets = NoteAssets::new(vec![offered_asset])?;
let recipient = NoteRecipient::new(serial_num, note_script, inputs);
let note = Note::new(assets, metadata, recipient);
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-standards/src/testing/note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ impl NoteBuilder {
.compile_note_script(virtual_source_file)
.expect("note script should compile");
let vault = NoteAssets::new(self.assets)?;
let metadata = NoteMetadata::new(self.sender, self.note_type, self.tag)
let metadata = NoteMetadata::new(self.sender, self.note_type)
.with_tag(self.tag)
.with_attachment(self.attachment);
let storage = NoteStorage::new(self.storage)?;
let recipient = NoteRecipient::new(self.serial_num, note_script, storage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ fn create_p2ide_note_with_storage(
);

let tag = NoteTag::with_account_target(sender);
let metadata = NoteMetadata::new(sender, NoteType::Public, tag);
let metadata = NoteMetadata::new(sender, NoteType::Public).with_tag(tag);

Note::new(NoteAssets::default(), metadata, recipient)
}
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ async fn test_active_note_get_exactly_8_inputs() -> anyhow::Result<()> {
// prepare note data
let serial_num = RpoRandomCoin::new(Word::from([4u32; 4])).draw_word();
let tag = NoteTag::with_account_target(target_id);
let metadata = NoteMetadata::new(sender_id, NoteType::Public, tag);
let metadata = NoteMetadata::new(sender_id, NoteType::Public).with_tag(tag);
let vault = NoteAssets::new(vec![]).context("failed to create input note assets")?;
let note_script = CodeBuilder::default()
.compile_note_script("begin nop end")
Expand Down
9 changes: 5 additions & 4 deletions crates/miden-testing/src/kernel_tests/tx/test_note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,10 @@ async fn test_build_metadata_header() -> anyhow::Result<()> {
let receiver = AccountId::try_from(ACCOUNT_ID_REGULAR_PRIVATE_ACCOUNT_UPDATABLE_CODE)
.map_err(|e| anyhow::anyhow!("Failed to convert account ID: {}", e))?;

let test_metadata1 =
NoteMetadata::new(sender, NoteType::Private, NoteTag::with_account_target(receiver));
let test_metadata2 = NoteMetadata::new(sender, NoteType::Public, NoteTag::new(u32::MAX));
let test_metadata1 = NoteMetadata::new(sender, NoteType::Private)
.with_tag(NoteTag::with_account_target(receiver));
let test_metadata2 =
NoteMetadata::new(sender, NoteType::Public).with_tag(NoteTag::new(u32::MAX));

for (iteration, test_metadata) in [test_metadata1, test_metadata2].into_iter().enumerate() {
let code = format!(
Expand Down Expand Up @@ -516,7 +517,7 @@ async fn test_public_key_as_note_input() -> anyhow::Result<()> {

let serial_num = RpoRandomCoin::new(Word::from([1, 2, 3, 4u32])).draw_word();
let tag = NoteTag::with_account_target(target_account.id());
let metadata = NoteMetadata::new(sender_account.id(), NoteType::Public, tag);
let metadata = NoteMetadata::new(sender_account.id(), NoteType::Public).with_tag(tag);
let vault = NoteAssets::new(vec![])?;
let note_script = CodeBuilder::default().compile_note_script("begin nop end")?;
let recipient =
Expand Down
12 changes: 6 additions & 6 deletions crates/miden-testing/src/kernel_tests/tx/test_output_note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async fn test_create_note() -> anyhow::Result<()> {
"recipient must be stored at the correct memory location",
);

let metadata = NoteMetadata::new(account_id, NoteType::Public, tag);
let metadata = NoteMetadata::new(account_id, NoteType::Public).with_tag(tag);
let expected_metadata_header = metadata.to_header_word();
let expected_note_attachment = metadata.to_attachment_word();

Expand Down Expand Up @@ -250,8 +250,8 @@ async fn test_get_output_notes_commitment() -> anyhow::Result<()> {
let output_serial_no_1 = Word::from([8u32; 4]);
let output_tag_1 = NoteTag::with_account_target(network_account);
let assets = NoteAssets::new(vec![input_asset_1])?;
let metadata =
NoteMetadata::new(tx_context.tx_inputs().account().id(), NoteType::Public, output_tag_1);
let metadata = NoteMetadata::new(tx_context.tx_inputs().account().id(), NoteType::Public)
.with_tag(output_tag_1);
let inputs = NoteStorage::new(vec![])?;
let recipient = NoteRecipient::new(output_serial_no_1, input_note_1.script().clone(), inputs);
let output_note_1 = Note::new(assets, metadata, recipient);
Expand All @@ -264,9 +264,9 @@ async fn test_get_output_notes_commitment() -> anyhow::Result<()> {
NoteAttachmentScheme::new(5),
[42, 43, 44, 45, 46u32].map(Felt::from).to_vec(),
)?;
let metadata =
NoteMetadata::new(tx_context.tx_inputs().account().id(), NoteType::Public, output_tag_2)
.with_attachment(attachment);
let metadata = NoteMetadata::new(tx_context.tx_inputs().account().id(), NoteType::Public)
.with_tag(output_tag_2)
.with_attachment(attachment);
let inputs = NoteStorage::new(vec![])?;
let recipient = NoteRecipient::new(output_serial_no_2, input_note_2.script().clone(), inputs);
let output_note_2 = Note::new(assets, metadata, recipient);
Expand Down
10 changes: 6 additions & 4 deletions crates/miden-testing/src/kernel_tests/tx/test_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,9 @@ async fn executed_transaction_output_notes() -> anyhow::Result<()> {
let serial_num_2 = Word::from([1, 2, 3, 4u32]);
let note_script_2 = CodeBuilder::default().compile_note_script(DEFAULT_NOTE_CODE)?;
let inputs_2 = NoteStorage::new(vec![ONE])?;
let metadata_2 =
NoteMetadata::new(account_id, note_type2, tag2).with_attachment(attachment2.clone());
let metadata_2 = NoteMetadata::new(account_id, note_type2)
.with_tag(tag2)
.with_attachment(attachment2.clone());
let vault_2 = NoteAssets::new(vec![removed_asset_3, removed_asset_4])?;
let recipient_2 = NoteRecipient::new(serial_num_2, note_script_2, inputs_2);
let expected_output_note_2 = Note::new(vault_2, metadata_2, recipient_2);
Expand All @@ -233,8 +234,9 @@ async fn executed_transaction_output_notes() -> anyhow::Result<()> {
let serial_num_3 = Word::from([Felt::new(5), Felt::new(6), Felt::new(7), Felt::new(8)]);
let note_script_3 = CodeBuilder::default().compile_note_script(DEFAULT_NOTE_CODE)?;
let inputs_3 = NoteStorage::new(vec![ONE, Felt::new(2)])?;
let metadata_3 =
NoteMetadata::new(account_id, note_type3, tag3).with_attachment(attachment3.clone());
let metadata_3 = NoteMetadata::new(account_id, note_type3)
.with_tag(tag3)
.with_attachment(attachment3.clone());
let vault_3 = NoteAssets::new(vec![])?;
let recipient_3 = NoteRecipient::new(serial_num_3, note_script_3, inputs_3);
let expected_output_note_3 = Note::new(vault_3, metadata_3, recipient_3);
Expand Down
6 changes: 3 additions & 3 deletions crates/miden-testing/src/standards/network_account_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ async fn network_account_target_get_id() -> anyhow::Result<()> {
let exec_hint = NoteExecutionHint::Always;

let attachment = NoteAttachment::from(NetworkAccountTarget::new(target_id, exec_hint)?);
let metadata =
NoteMetadata::new(target_id, NoteType::Public, NoteTag::with_account_target(target_id))
.with_attachment(attachment.clone());
let metadata = NoteMetadata::new(target_id, NoteType::Public)
.with_tag(NoteTag::with_account_target(target_id))
.with_attachment(attachment.clone());
let metadata_header = metadata.to_header_word();

let source = format!(
Expand Down
2 changes: 1 addition & 1 deletion crates/miden-testing/tests/agglayer/bridge_in.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ async fn test_bridge_in_claim_to_p2id() -> anyhow::Result<()> {
let output_note_tag = NoteTag::with_account_target(user_account.id());
let expected_p2id_note = Note::new(
NoteAssets::new(vec![mint_asset])?,
NoteMetadata::new(agglayer_faucet.id(), NoteType::Public, output_note_tag),
NoteMetadata::new(agglayer_faucet.id(), NoteType::Public).with_tag(output_note_tag),
p2id_recipient,
);

Expand Down
4 changes: 2 additions & 2 deletions crates/miden-testing/tests/agglayer/bridge_out.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async fn test_bridge_out_consumes_b2agg_note() -> anyhow::Result<()> {
let inputs = NoteStorage::new(input_felts.clone())?;

// Create the B2AGG note with assets from the faucet
let b2agg_note_metadata = NoteMetadata::new(faucet.id(), note_type, tag);
let b2agg_note_metadata = NoteMetadata::new(faucet.id(), note_type).with_tag(tag);
let b2agg_note_assets = NoteAssets::new(vec![bridge_asset])?;
let serial_num = Word::from([1, 2, 3, 4u32]);
let b2agg_note_script = NoteScript::new(b2agg_script);
Expand Down Expand Up @@ -248,7 +248,7 @@ async fn test_b2agg_note_reclaim_scenario() -> anyhow::Result<()> {

// Create the B2AGG note with the USER ACCOUNT as the sender
// This is the key difference - the note sender will be the same as the consuming account
let b2agg_note_metadata = NoteMetadata::new(user_account.id(), note_type, tag);
let b2agg_note_metadata = NoteMetadata::new(user_account.id(), note_type).with_tag(tag);
let b2agg_note_assets = NoteAssets::new(vec![bridge_asset])?;
let serial_num = Word::from([1, 2, 3, 4u32]);
let b2agg_note_script = NoteScript::new(b2agg_script);
Expand Down
2 changes: 1 addition & 1 deletion crates/miden-testing/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub fn get_note_with_fungible_asset_and_script(
let sender_id = AccountId::try_from(ACCOUNT_ID_SENDER).unwrap();

let vault = NoteAssets::new(vec![fungible_asset.into()]).unwrap();
let metadata = NoteMetadata::new(sender_id, NoteType::Public, 1.into());
let metadata = NoteMetadata::new(sender_id, NoteType::Public).with_tag(1.into());
let inputs = NoteStorage::new(vec![]).unwrap();
let recipient = NoteRecipient::new(serial_num, note_script, inputs);

Expand Down
4 changes: 2 additions & 2 deletions crates/miden-testing/tests/scripts/faucet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub fn verify_minted_output_note(
assert_eq!(output_note.id(), id);
assert_eq!(
output_note.metadata(),
&NoteMetadata::new(faucet.id(), params.note_type, params.tag)
&NoteMetadata::new(faucet.id(), params.note_type).with_tag(params.tag)
);

Ok(())
Expand Down Expand Up @@ -377,7 +377,7 @@ async fn test_public_note_creation_with_script_from_datastore() -> anyhow::Resul
let output_script_root = note_recipient.script().root();

let asset = FungibleAsset::new(faucet.id(), amount.into())?;
let metadata = NoteMetadata::new(faucet.id(), note_type, tag);
let metadata = NoteMetadata::new(faucet.id(), note_type).with_tag(tag);
let expected_note = Note::new(NoteAssets::new(vec![asset.into()])?, metadata, note_recipient);

let trigger_note_script_code = format!(
Expand Down
Loading