Skip to content

Commit

Permalink
test(avm): Add a TS prover test suite for each avm context function (…
Browse files Browse the repository at this point in the history
…#6957)
  • Loading branch information
jeanmon authored and AztecBot committed Jun 7, 2024
1 parent 7fe0733 commit b3f0ad3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions aztec/src/context/public_context.nr
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ impl PublicContext {
* @param event_selector The event selector for the log.
* @param message The message to emit in the log.
*/
pub fn emit_unencrypted_log_with_selector<T,N>(
pub fn emit_unencrypted_log_with_selector<T, N>(
&mut self,
event_selector: Field,
log: T
) where T: Serialize<N> {
emit_unencrypted_log(event_selector, Serialize::serialize(log).as_slice());
}
// For compatibility with the selector-less API. We'll probably rename the above one.
pub fn emit_unencrypted_log<T,N>(&mut self, log: T) where T: Serialize<N> {
pub fn emit_unencrypted_log<T, N>(&mut self, log: T) where T: Serialize<N> {
self.emit_unencrypted_log_with_selector(/*event_selector=*/ 5, log);
}
pub fn note_hash_exists(self, note_hash: Field, leaf_index: Field) -> bool {
Expand Down Expand Up @@ -169,6 +169,12 @@ impl PublicContext {
fn get_args_hash(self) -> Field {
self.inputs.args_hash
}
fn l2_gas_left(self) -> Field {
l2_gas_left()
}
fn da_gas_left(self) -> Field {
da_gas_left()
}
}

// Helper functions
Expand Down Expand Up @@ -368,4 +374,4 @@ impl<N> FunctionReturns<N> {
pub fn deserialize_into<T>(self) -> T where T: Deserialize<N> {
Deserialize::deserialize(self.raw())
}
}
}

0 comments on commit b3f0ad3

Please sign in to comment.