Skip to content

Commit

Permalink
penumbra: regenerate protos
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor committed Apr 14, 2024
1 parent f9e68ea commit 4d016ad
Show file tree
Hide file tree
Showing 4 changed files with 197 additions and 1 deletion.
30 changes: 30 additions & 0 deletions crates/proto/src/gen/penumbra.core.component.auction.v1alpha1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,36 @@ impl ::prost::Name for AuctionNft {
)
}
}
/// The configuration parameters for the auction component.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuctionParameters {}
impl ::prost::Name for AuctionParameters {
const NAME: &'static str = "AuctionParameters";
const PACKAGE: &'static str = "penumbra.core.component.auction.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.auction.v1alpha1.{}", Self::NAME
)
}
}
/// Genesis data for the auction component.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisContent {
/// The configuration parameters for the auction component at genesis.
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<AuctionParameters>,
}
impl ::prost::Name for GenesisContent {
const NAME: &'static str = "GenesisContent";
const PACKAGE: &'static str = "penumbra.core.component.auction.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
::prost::alloc::format!(
"penumbra.core.component.auction.v1alpha1.{}", Self::NAME
)
}
}
/// Generated client implementations.
#[cfg(feature = "rpc")]
pub mod query_service_client {
Expand Down
167 changes: 167 additions & 0 deletions crates/proto/src/gen/penumbra.core.component.auction.v1alpha1.serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,170 @@ impl<'de> serde::Deserialize<'de> for AuctionNft {
deserializer.deserialize_struct("penumbra.core.component.auction.v1alpha1.AuctionNft", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for AuctionParameters {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let len = 0;
let struct_ser = serializer.serialize_struct("penumbra.core.component.auction.v1alpha1.AuctionParameters", len)?;
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for AuctionParameters {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
];

#[allow(clippy::enum_variant_names)]
enum GeneratedField {
__SkipField__,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;

impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;

fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}

#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
Ok(GeneratedField::__SkipField__)
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = AuctionParameters;

fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct penumbra.core.component.auction.v1alpha1.AuctionParameters")
}

fn visit_map<V>(self, mut map_: V) -> std::result::Result<AuctionParameters, V::Error>
where
V: serde::de::MapAccess<'de>,
{
while map_.next_key::<GeneratedField>()?.is_some() {
let _ = map_.next_value::<serde::de::IgnoredAny>()?;
}
Ok(AuctionParameters {
})
}
}
deserializer.deserialize_struct("penumbra.core.component.auction.v1alpha1.AuctionParameters", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for GenesisContent {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let mut len = 0;
if self.params.is_some() {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("penumbra.core.component.auction.v1alpha1.GenesisContent", len)?;
if let Some(v) = self.params.as_ref() {
struct_ser.serialize_field("params", v)?;
}
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for GenesisContent {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
"params",
];

#[allow(clippy::enum_variant_names)]
enum GeneratedField {
Params,
__SkipField__,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;

impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;

fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}

#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
match value {
"params" => Ok(GeneratedField::Params),
_ => Ok(GeneratedField::__SkipField__),
}
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GenesisContent;

fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct penumbra.core.component.auction.v1alpha1.GenesisContent")
}

fn visit_map<V>(self, mut map_: V) -> std::result::Result<GenesisContent, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut params__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Params => {
if params__.is_some() {
return Err(serde::de::Error::duplicate_field("params"));
}
params__ = map_.next_value()?;
}
GeneratedField::__SkipField__ => {
let _ = map_.next_value::<serde::de::IgnoredAny>()?;
}
}
}
Ok(GenesisContent {
params: params__,
})
}
}
deserializer.deserialize_struct("penumbra.core.component.auction.v1alpha1.GenesisContent", FIELDS, GeneratedVisitor)
}
}
Binary file modified crates/proto/src/gen/proto_descriptor.bin.no_lfs
Binary file not shown.
1 change: 0 additions & 1 deletion deployments/scripts/check-wasm-compat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ packages=(
penumbra-asset
penumbra-community-pool
penumbra-compact-block
penumbra-auction
penumbra-dex
penumbra-distributions
penumbra-fee
Expand Down

0 comments on commit 4d016ad

Please sign in to comment.