@@ -31,7 +31,9 @@ pub contract Token {
3131 };
3232
3333 use dep::uint_note::uint_note:: {PartialUintNote , UintNote };
34- use aztec::protocol_types:: {address::AztecAddress , traits::ToField };
34+ use aztec::protocol_types:: {
35+ abis::side_effect::OrderedValue , address::AztecAddress , traits::ToField ,
36+ };
3537
3638 // docs:start:import_authwit
3739 use aztec::authwit::auth::compute_authwit_nullifier ;
@@ -235,7 +237,26 @@ pub contract Token {
235237 amount : u128 ,
236238 authwit_nonce : Field ,
237239 ) {
240+ // TODO(DUPLICATE_NULLIFIER_ISSUE): Nuke this log once the issue is resolved.
241+ aztec::oracle::debug_log:: debug_log_format (
242+ "transfer_to_public: from {0}, to {1}, amount {2}" ,
243+ [from .to_field (), to .to_field (), amount .to_field ()],
244+ );
245+ aztec::oracle::debug_log:: debug_log_format (
246+ "nullifiers in context before emission transfer_to_public: {}" ,
247+ context .nullifiers .storage ().map (|n | n .value ()),
248+ );
249+ // NUKE_END
250+
238251 storage .balances .at (from ).sub (from , amount ).emit (encode_and_encrypt_note (&mut context , from ));
252+
253+ // TODO(DUPLICATE_NULLIFIER_ISSUE): Nuke this log once the issue is resolved.
254+ aztec::oracle::debug_log:: debug_log_format (
255+ "nullifiers in context after emission transfer_to_public: {}" ,
256+ context .nullifiers .storage ().map (|n | n .value ()),
257+ );
258+ // NUKE_END
259+
239260 Token ::at (context .this_address ())._increase_public_balance (to , amount ).enqueue (&mut context );
240261 }
241262 // docs:end:transfer_to_public
@@ -423,7 +444,27 @@ pub contract Token {
423444 /// returned partial note.
424445 #[private]
425446 fn prepare_private_balance_increase (to : AztecAddress ) -> PartialUintNote {
426- _prepare_private_balance_increase (to , &mut context , storage )
447+ // TODO(DUPLICATE_NULLIFIER_ISSUE): Nuke this log once the issue is resolved.
448+ aztec::oracle::debug_log:: debug_log_format (
449+ "prepare_private_balance_increase, to: {0}" ,
450+ [to .to_field ()],
451+ );
452+ aztec::oracle::debug_log:: debug_log_format (
453+ "nullifiers in context before emission prepare_private_balance_increase: {}" ,
454+ context .nullifiers .storage ().map (|n | n .value ()),
455+ );
456+ // NUKE_END
457+
458+ let partial_note = _prepare_private_balance_increase (to , &mut context , storage );
459+
460+ // TODO(DUPLICATE_NULLIFIER_ISSUE): Nuke this log once the issue is resolved.
461+ aztec::oracle::debug_log:: debug_log_format (
462+ "nullifiers in context after emission transfer_to_public: {}" ,
463+ context .nullifiers .storage ().map (|n | n .value ()),
464+ );
465+ // NUKE_END
466+
467+ partial_note
427468 }
428469 // docs:end:prepare_private_balance_increase
429470
0 commit comments