Skip to content

Commit

Permalink
feat: add new lenses for encryted notes (#7238)
Browse files Browse the repository at this point in the history
A very quick fix to just give a bit more options to the length of notes
  • Loading branch information
sklppy88 committed Jun 28, 2024
1 parent 79e8588 commit c07cf2c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions noir-projects/aztec-nr/aztec/src/oracle/logs_traits.nr
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,30 @@ impl LensForEncryptedLog<6, 672> for [Field; 6] {
fn output_fields(self) -> [Field; 6] {[self[0]; 6]}
fn output_bytes(self) -> [u8; 672] {[self[0] as u8; 672]}
}
impl LensForEncryptedLog<7, 704> for [Field; 7] {
fn output_fields(self) -> [Field; 7] {[self[0]; 7]}
fn output_bytes(self) -> [u8; 704] {[self[0] as u8; 704]}
}
impl LensForEncryptedLog<8, 736> for [Field; 8] {
fn output_fields(self) -> [Field; 8] {[self[0]; 8]}
fn output_bytes(self) -> [u8; 736] {[self[0] as u8; 736]}
}
impl LensForEncryptedLog<9, 768> for [Field; 9] {
fn output_fields(self) -> [Field; 9] {[self[0]; 9]}
fn output_bytes(self) -> [u8; 768] {[self[0] as u8; 768]}
}
impl LensForEncryptedLog<10, 800> for [Field; 10] {
fn output_fields(self) -> [Field; 10] {[self[0]; 10]}
fn output_bytes(self) -> [u8; 800] {[self[0] as u8; 800]}
}
impl LensForEncryptedLog<11, 832> for [Field; 11] {
fn output_fields(self) -> [Field; 11] {[self[0]; 11]}
fn output_bytes(self) -> [u8; 832] {[self[0] as u8; 832]}
}
impl LensForEncryptedLog<12, 864> for [Field; 12] {
fn output_fields(self) -> [Field; 12] {[self[0]; 12]}
fn output_bytes(self) -> [u8; 864] {[self[0] as u8; 864]}
}

trait LensForEncryptedEvent<N, M> {
// N = event preimage input in bytes
Expand Down

0 comments on commit c07cf2c

Please sign in to comment.