diff --git a/src/client/transactions/asm/transaction_scripts/auth_send_asset.masm b/src/client/transactions/asm/transaction_scripts/auth_send_asset.masm index 540c95e5f..d12c5dde0 100644 --- a/src/client/transactions/asm/transaction_scripts/auth_send_asset.masm +++ b/src/client/transactions/asm/transaction_scripts/auth_send_asset.masm @@ -4,6 +4,7 @@ use.miden::contracts::wallets::basic->wallet begin push.{recipient} push.{note_type} + push.{aux} push.{tag} push.{asset} call.wallet::send_asset diff --git a/src/client/transactions/asm/transaction_scripts/distribute_fungible_asset.masm b/src/client/transactions/asm/transaction_scripts/distribute_fungible_asset.masm index d26a77558..d3d9aca80 100644 --- a/src/client/transactions/asm/transaction_scripts/distribute_fungible_asset.masm +++ b/src/client/transactions/asm/transaction_scripts/distribute_fungible_asset.masm @@ -4,6 +4,7 @@ use.miden::contracts::auth::basic->auth_tx begin push.{recipient} push.{note_type} + push.{aux} push.{tag} push.{amount} call.faucet::distribute diff --git a/src/client/transactions/mod.rs b/src/client/transactions/mod.rs index 7d5eb8ea6..9a2a1f0c2 100644 --- a/src/client/transactions/mod.rs +++ b/src/client/transactions/mod.rs @@ -11,7 +11,7 @@ use miden_objects::{ ExecutedTransaction, InputNote, InputNotes, OutputNote, OutputNotes, ProvenTransaction, TransactionArgs, TransactionId, TransactionScript, }, - Digest, Felt, Word, + Digest, Felt, FieldElement, Word, }; use miden_tx::{auth::TransactionAuthenticator, ProvingOptions, ScriptTarget, TransactionProver}; #[cfg(not(feature = "wasm"))] @@ -364,7 +364,7 @@ impl Client payment_data.target_account_id(), vec![payment_data.asset()], note_type, - Default::default(), + Felt::ZERO, recall_height, &mut random_coin, )? @@ -374,7 +374,7 @@ impl Client payment_data.target_account_id(), vec![payment_data.asset()], note_type, - Default::default(), + Felt::ZERO, &mut random_coin, )? }; @@ -393,6 +393,7 @@ impl Client &transaction_request::AUTH_SEND_ASSET_SCRIPT .replace("{recipient}", &recipient) .replace("{note_type}", &Felt::new(note_type as u64).to_string()) + .replace("{aux}", &created_note.metadata().aux().to_string()) .replace("{tag}", &Felt::new(note_tag.into()).to_string()) .replace("{asset}", &prepare_word(&payment_data.asset().into()).to_string()), ) @@ -426,7 +427,7 @@ impl Client swap_data.offered_asset(), swap_data.requested_asset(), note_type, - Default::default(), + Felt::ZERO, &mut random_coin, )?; @@ -444,6 +445,7 @@ impl Client &transaction_request::AUTH_SEND_ASSET_SCRIPT .replace("{recipient}", &recipient) .replace("{note_type}", &Felt::new(note_type as u64).to_string()) + .replace("{aux}", &created_note.metadata().aux().to_string()) .replace("{tag}", &Felt::new(note_tag.into()).to_string()) .replace("{asset}", &prepare_word(&swap_data.offered_asset().into()).to_string()), ) @@ -475,7 +477,7 @@ impl Client target_account_id, vec![asset.into()], note_type, - Default::default(), + Felt::ZERO, &mut random_coin, )?; @@ -493,6 +495,7 @@ impl Client &transaction_request::DISTRIBUTE_FUNGIBLE_ASSET_SCRIPT .replace("{recipient}", &recipient) .replace("{note_type}", &Felt::new(note_type as u64).to_string()) + .replace("{aux}", &created_note.metadata().aux().to_string()) .replace("{tag}", &Felt::new(note_tag.into()).to_string()) .replace("{amount}", &Felt::new(asset.amount()).to_string()), ) diff --git a/src/client/transactions/transaction_request.rs b/src/client/transactions/transaction_request.rs index f6577f92a..96ae1b7d3 100644 --- a/src/client/transactions/transaction_request.rs +++ b/src/client/transactions/transaction_request.rs @@ -244,6 +244,7 @@ mod tests { assets::FungibleAsset, crypto::rand::RpoRandomCoin, notes::NoteType, + Felt, FieldElement, }; use crate::client::transactions::transaction_request::known_script_roots::{P2ID, P2IDR, SWAP}; @@ -263,6 +264,7 @@ mod tests { account_id, vec![FungibleAsset::new(faucet_id, 100u64).unwrap().into()], NoteType::OffChain, + Felt::ZERO, &mut rng, ) .unwrap(); @@ -271,6 +273,7 @@ mod tests { account_id, vec![FungibleAsset::new(faucet_id, 100u64).unwrap().into()], NoteType::OffChain, + Felt::ZERO, 10, &mut rng, ) @@ -280,6 +283,7 @@ mod tests { FungibleAsset::new(faucet_id, 100u64).unwrap().into(), FungibleAsset::new(faucet_id, 100u64).unwrap().into(), NoteType::OffChain, + Felt::ZERO, &mut rng, ) .unwrap();