diff --git a/docs/docs/misc/migration_notes.md b/docs/docs/misc/migration_notes.md index 6009c4d2809..4c1d9253bb7 100644 --- a/docs/docs/misc/migration_notes.md +++ b/docs/docs/misc/migration_notes.md @@ -394,22 +394,8 @@ impl CardNote { } } -impl Serialize for CardNote { - fn serialize(self) -> [Field; CARD_NOTE_LEN] { - [self.owner.to_field()] - } -} - -impl Deserialize for CardNote { - fn deserialize(serialized_note: [Field; CARD_NOTE_LEN]) -> Self { - CardNote { - owner: AztecAddress::from_field(serialized_note[2]), - } - } -} - impl NoteInterface for CardNote { - fn compute_note_hash(self) -> Field { + fn compute_note_content_hash(self) -> Field { pedersen_hash([ self.owner.to_field(), ],0) @@ -443,6 +429,17 @@ impl NoteInterface for CardNote { note.header } + fn serialize_content(self) -> [Field; CARD_NOTE_LEN]{ + [self.owner.to_field()] + } + + fn deserialize_content(serialized_note: [Field; CARD_NOTE_LEN]) -> Self { + AddressNote { + owner: AztecAddress::from_field(serialized_note[0]), + header: NoteHeader::empty(), + } + } + // Broadcasts the note as an encrypted log on L1. fn broadcast(self, context: &mut PrivateContext, slot: Field) { let encryption_pub_key = get_public_key(self.owner);