diff --git a/barretenberg/cpp/src/barretenberg/dsl/acir_format/serde/acir.hpp b/barretenberg/cpp/src/barretenberg/dsl/acir_format/serde/acir.hpp index 6867fefbcae8..6bcb1addc286 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_format/serde/acir.hpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_format/serde/acir.hpp @@ -712,43 +712,9 @@ struct BrilligOutputs { static BrilligOutputs bincodeDeserialize(std::vector); }; -struct ForeignCallParam { - - struct Single { - Circuit::Value value; - - friend bool operator==(const Single&, const Single&); - std::vector bincodeSerialize() const; - static Single bincodeDeserialize(std::vector); - }; - - struct Array { - std::vector value; - - friend bool operator==(const Array&, const Array&); - std::vector bincodeSerialize() const; - static Array bincodeDeserialize(std::vector); - }; - - std::variant value; - - friend bool operator==(const ForeignCallParam&, const ForeignCallParam&); - std::vector bincodeSerialize() const; - static ForeignCallParam bincodeDeserialize(std::vector); -}; - -struct ForeignCallResult { - std::vector values; - - friend bool operator==(const ForeignCallResult&, const ForeignCallResult&); - std::vector bincodeSerialize() const; - static ForeignCallResult bincodeDeserialize(std::vector); -}; - struct Brillig { std::vector inputs; std::vector outputs; - std::vector foreign_call_results; std::vector bytecode; std::optional predicate; @@ -924,6 +890,39 @@ struct Circuit { static Circuit bincodeDeserialize(std::vector); }; +struct ForeignCallParam { + + struct Single { + Circuit::Value value; + + friend bool operator==(const Single&, const Single&); + std::vector bincodeSerialize() const; + static Single bincodeDeserialize(std::vector); + }; + + struct Array { + std::vector value; + + friend bool operator==(const Array&, const Array&); + std::vector bincodeSerialize() const; + static Array bincodeDeserialize(std::vector); + }; + + std::variant value; + + friend bool operator==(const ForeignCallParam&, const ForeignCallParam&); + std::vector bincodeSerialize() const; + static ForeignCallParam bincodeDeserialize(std::vector); +}; + +struct ForeignCallResult { + std::vector values; + + friend bool operator==(const ForeignCallResult&, const ForeignCallResult&); + std::vector bincodeSerialize() const; + static ForeignCallResult bincodeDeserialize(std::vector); +}; + } // end of namespace Circuit namespace Circuit { @@ -3253,9 +3252,6 @@ inline bool operator==(const Brillig& lhs, const Brillig& rhs) if (!(lhs.outputs == rhs.outputs)) { return false; } - if (!(lhs.foreign_call_results == rhs.foreign_call_results)) { - return false; - } if (!(lhs.bytecode == rhs.bytecode)) { return false; } @@ -3291,7 +3287,6 @@ void serde::Serializable::serialize(const Circuit::Brillig& ob serializer.increase_container_depth(); serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.outputs, serializer); - serde::Serializable::serialize(obj.foreign_call_results, serializer); serde::Serializable::serialize(obj.bytecode, serializer); serde::Serializable::serialize(obj.predicate, serializer); serializer.decrease_container_depth(); @@ -3305,7 +3300,6 @@ Circuit::Brillig serde::Deserializable::deserialize(Deserializ Circuit::Brillig obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); - obj.foreign_call_results = serde::Deserializable::deserialize(deserializer); obj.bytecode = serde::Deserializable::deserialize(deserializer); obj.predicate = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); @@ -6115,4 +6109,4 @@ Circuit::Witness serde::Deserializable::deserialize(Deserializ obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; -} \ No newline at end of file +}