diff --git a/nssa/core/src/program.rs b/nssa/core/src/program.rs index 82023f3..a96d3cf 100644 --- a/nssa/core/src/program.rs +++ b/nssa/core/src/program.rs @@ -12,11 +12,20 @@ pub struct ProgramInput { pub instruction: T, } +#[derive(Serialize, Deserialize, Clone)] +#[cfg_attr(any(feature = "host", test), derive(Debug, PartialEq, Eq))] +pub struct ChainedCall { + pub program_id: ProgramId, + pub instruction_data: InstructionData, + pub account_indices: Vec, +} + #[derive(Serialize, Deserialize, Clone)] #[cfg_attr(any(feature = "host", test), derive(Debug, PartialEq, Eq))] pub struct ProgramOutput { pub pre_states: Vec, pub post_states: Vec, + pub chained_call: Option } pub fn read_nssa_inputs() -> ProgramInput { @@ -33,6 +42,7 @@ pub fn write_nssa_outputs(pre_states: Vec, post_states: Vec let output = ProgramOutput { pre_states, post_states, + chained_call: None }; env::commit(&output); } diff --git a/nssa/program_methods/guest/src/bin/privacy_preserving_circuit.rs b/nssa/program_methods/guest/src/bin/privacy_preserving_circuit.rs index a1aa8c9..1baa5a0 100644 --- a/nssa/program_methods/guest/src/bin/privacy_preserving_circuit.rs +++ b/nssa/program_methods/guest/src/bin/privacy_preserving_circuit.rs @@ -27,6 +27,7 @@ fn main() { let ProgramOutput { pre_states, post_states, + chained_call: _, } = program_output; // Check that there are no repeated account ids