diff --git a/src/circuit/gadget/orchard_action/merkle.rs b/src/circuit/gadget/orchard_action/merkle.rs index 3e141d5bb..4be60d49c 100644 --- a/src/circuit/gadget/orchard_action/merkle.rs +++ b/src/circuit/gadget/orchard_action/merkle.rs @@ -165,3 +165,37 @@ impl::extract(point) } } + +impl + UtilitiesInstructions for MerkleChip +{ + type Var = CellValue; +} + +impl + CondSwapInstructions for MerkleChip +{ + type Var = CellValue; + type Swap = Swap; + + #[allow(clippy::type_complexity)] + fn swap( + &self, + layouter: impl Layouter, + pair: ( + >::Var, + >::Var, + ), + swap: Self::Swap, + ) -> Result< + ( + >::Var, + >::Var, + ), + Error, + > { + let config = self.config().cond_swap_config.clone(); + let chip = CondSwapChip::::construct(config); + chip.swap(layouter, pair, swap) + } +}