Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cosmos-sdk-go: bump to v0.47.10 (fixups) #486

Merged
merged 1 commit into from
Aug 14, 2024
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
2 changes: 1 addition & 1 deletion cosmos-sdk-go
Submodule cosmos-sdk-go updated 3684 files
2 changes: 2 additions & 0 deletions cosmos-sdk-proto/src/prost/cosmos-sdk/amino.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// @generated
// @@protoc_insertion_point(module)
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// @generated
/// Module is the config object for the runtime module.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Module {
/// app_name is the name of the app.
#[prost(string, tag = "1")]
pub app_name: ::prost::alloc::string::String,
/// begin_blockers specifies the module names of begin blockers
/// to call in the order in which they should be called. If this is left empty
/// no begin blocker will be registered.
#[prost(string, repeated, tag = "2")]
pub begin_blockers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// end_blockers specifies the module names of the end blockers
/// to call in the order in which they should be called. If this is left empty
/// no end blocker will be registered.
#[prost(string, repeated, tag = "3")]
pub end_blockers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// init_genesis specifies the module names of init genesis functions
/// to call in the order in which they should be called. If this is left empty
/// no init genesis function will be registered.
#[prost(string, repeated, tag = "4")]
pub init_genesis: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// export_genesis specifies the order in which to export module genesis data.
/// If this is left empty, the init_genesis order will be used for export genesis
/// if it is specified.
#[prost(string, repeated, tag = "5")]
pub export_genesis: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// override_store_keys is an optional list of overrides for the module store keys
/// to be used in keeper construction.
#[prost(message, repeated, tag = "6")]
pub override_store_keys: ::prost::alloc::vec::Vec<StoreKeyConfig>,
}
/// StoreKeyConfig may be supplied to override the default module store key, which
/// is the module name.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StoreKeyConfig {
/// name of the module to override the store key of
#[prost(string, tag = "1")]
pub module_name: ::prost::alloc::string::String,
/// the kv store key to use instead of the module name.
#[prost(string, tag = "2")]
pub kv_store_key: ::prost::alloc::string::String,
}
include!("cosmos.app.runtime.v1alpha1.serde.rs");
// @@protoc_insertion_point(module)
Original file line number Diff line number Diff line change
@@ -0,0 +1,312 @@
// @generated
#[cfg(feature = "serde")]
impl serde::Serialize for Module {
#[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.app_name.is_empty() {
len += 1;
}
if !self.begin_blockers.is_empty() {
len += 1;
}
if !self.end_blockers.is_empty() {
len += 1;
}
if !self.init_genesis.is_empty() {
len += 1;
}
if !self.export_genesis.is_empty() {
len += 1;
}
if !self.override_store_keys.is_empty() {
len += 1;
}
let mut struct_ser =
serializer.serialize_struct("cosmos.app.runtime.v1alpha1.Module", len)?;
if !self.app_name.is_empty() {
struct_ser.serialize_field("appName", &self.app_name)?;
}
if !self.begin_blockers.is_empty() {
struct_ser.serialize_field("beginBlockers", &self.begin_blockers)?;
}
if !self.end_blockers.is_empty() {
struct_ser.serialize_field("endBlockers", &self.end_blockers)?;
}
if !self.init_genesis.is_empty() {
struct_ser.serialize_field("initGenesis", &self.init_genesis)?;
}
if !self.export_genesis.is_empty() {
struct_ser.serialize_field("exportGenesis", &self.export_genesis)?;
}
if !self.override_store_keys.is_empty() {
struct_ser.serialize_field("overrideStoreKeys", &self.override_store_keys)?;
}
struct_ser.end()
}
}
#[cfg(feature = "serde")]
impl<'de> serde::Deserialize<'de> for Module {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
"app_name",
"appName",
"begin_blockers",
"beginBlockers",
"end_blockers",
"endBlockers",
"init_genesis",
"initGenesis",
"export_genesis",
"exportGenesis",
"override_store_keys",
"overrideStoreKeys",
];

#[allow(clippy::enum_variant_names)]
enum GeneratedField {
AppName,
BeginBlockers,
EndBlockers,
InitGenesis,
ExportGenesis,
OverrideStoreKeys,
}
#[cfg(feature = "serde")]
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 {
"appName" | "app_name" => Ok(GeneratedField::AppName),
"beginBlockers" | "begin_blockers" => Ok(GeneratedField::BeginBlockers),
"endBlockers" | "end_blockers" => Ok(GeneratedField::EndBlockers),
"initGenesis" | "init_genesis" => Ok(GeneratedField::InitGenesis),
"exportGenesis" | "export_genesis" => Ok(GeneratedField::ExportGenesis),
"overrideStoreKeys" | "override_store_keys" => {
Ok(GeneratedField::OverrideStoreKeys)
}
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = Module;

fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct cosmos.app.runtime.v1alpha1.Module")
}

fn visit_map<V>(self, mut map_: V) -> std::result::Result<Module, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut app_name__ = None;
let mut begin_blockers__ = None;
let mut end_blockers__ = None;
let mut init_genesis__ = None;
let mut export_genesis__ = None;
let mut override_store_keys__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::AppName => {
if app_name__.is_some() {
return Err(serde::de::Error::duplicate_field("appName"));
}
app_name__ = Some(map_.next_value()?);
}
GeneratedField::BeginBlockers => {
if begin_blockers__.is_some() {
return Err(serde::de::Error::duplicate_field("beginBlockers"));
}
begin_blockers__ = Some(map_.next_value()?);
}
GeneratedField::EndBlockers => {
if end_blockers__.is_some() {
return Err(serde::de::Error::duplicate_field("endBlockers"));
}
end_blockers__ = Some(map_.next_value()?);
}
GeneratedField::InitGenesis => {
if init_genesis__.is_some() {
return Err(serde::de::Error::duplicate_field("initGenesis"));
}
init_genesis__ = Some(map_.next_value()?);
}
GeneratedField::ExportGenesis => {
if export_genesis__.is_some() {
return Err(serde::de::Error::duplicate_field("exportGenesis"));
}
export_genesis__ = Some(map_.next_value()?);
}
GeneratedField::OverrideStoreKeys => {
if override_store_keys__.is_some() {
return Err(serde::de::Error::duplicate_field("overrideStoreKeys"));
}
override_store_keys__ = Some(map_.next_value()?);
}
}
}
Ok(Module {
app_name: app_name__.unwrap_or_default(),
begin_blockers: begin_blockers__.unwrap_or_default(),
end_blockers: end_blockers__.unwrap_or_default(),
init_genesis: init_genesis__.unwrap_or_default(),
export_genesis: export_genesis__.unwrap_or_default(),
override_store_keys: override_store_keys__.unwrap_or_default(),
})
}
}
deserializer.deserialize_struct(
"cosmos.app.runtime.v1alpha1.Module",
FIELDS,
GeneratedVisitor,
)
}
}
#[cfg(feature = "serde")]
impl serde::Serialize for StoreKeyConfig {
#[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.module_name.is_empty() {
len += 1;
}
if !self.kv_store_key.is_empty() {
len += 1;
}
let mut struct_ser =
serializer.serialize_struct("cosmos.app.runtime.v1alpha1.StoreKeyConfig", len)?;
if !self.module_name.is_empty() {
struct_ser.serialize_field("moduleName", &self.module_name)?;
}
if !self.kv_store_key.is_empty() {
struct_ser.serialize_field("kvStoreKey", &self.kv_store_key)?;
}
struct_ser.end()
}
}
#[cfg(feature = "serde")]
impl<'de> serde::Deserialize<'de> for StoreKeyConfig {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &["module_name", "moduleName", "kv_store_key", "kvStoreKey"];

#[allow(clippy::enum_variant_names)]
enum GeneratedField {
ModuleName,
KvStoreKey,
}
#[cfg(feature = "serde")]
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 {
"moduleName" | "module_name" => Ok(GeneratedField::ModuleName),
"kvStoreKey" | "kv_store_key" => Ok(GeneratedField::KvStoreKey),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = StoreKeyConfig;

fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct cosmos.app.runtime.v1alpha1.StoreKeyConfig")
}

fn visit_map<V>(self, mut map_: V) -> std::result::Result<StoreKeyConfig, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut module_name__ = None;
let mut kv_store_key__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::ModuleName => {
if module_name__.is_some() {
return Err(serde::de::Error::duplicate_field("moduleName"));
}
module_name__ = Some(map_.next_value()?);
}
GeneratedField::KvStoreKey => {
if kv_store_key__.is_some() {
return Err(serde::de::Error::duplicate_field("kvStoreKey"));
}
kv_store_key__ = Some(map_.next_value()?);
}
}
}
Ok(StoreKeyConfig {
module_name: module_name__.unwrap_or_default(),
kv_store_key: kv_store_key__.unwrap_or_default(),
})
}
}
deserializer.deserialize_struct(
"cosmos.app.runtime.v1alpha1.StoreKeyConfig",
FIELDS,
GeneratedVisitor,
)
}
}
Loading
Loading