Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion noir-projects/aztec-nr/aztec/src/context/avm_context.nr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use dep::protocol_types::{
address::{AztecAddress, EthAddress},
constants::{L1_TO_L2_MESSAGE_LENGTH, NESTED_CALL_L2_GAS_BUFFER}, header::Header
};
use dep::protocol_types::traits::Serialize;
use dep::protocol_types::traits::{Deserialize, Serialize, Empty};
use dep::protocol_types::abis::function_selector::FunctionSelector;
use dep::protocol_types::abis::public_circuit_public_inputs::PublicCircuitPublicInputs;
use crate::context::inputs::avm_context_inputs::AvmContextInputs;
Expand Down Expand Up @@ -191,6 +191,12 @@ impl ContextInterface for AvmContext {
}
}

impl Empty for AvmContext {
fn empty() -> Self {
AvmContext::new(AvmContextInputs::empty())
}
}

// Helper functions
fn gas_for_call(user_gas: GasOpts) -> [Field; 2] {
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
use dep::protocol_types::traits::Empty;

struct AvmContextInputs {
selector: Field,
args_hash: Field,
}

impl Empty for AvmContextInputs {
fn empty() -> Self {
AvmContextInputs {
selector: 0,
args_hash: 0,
}
}
}