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

Update ibc-go protos to v8.1.0 #192

Merged
merged 3 commits into from
Feb 7, 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: 2 additions & 0 deletions .changelog/unreleased/features/192-bump-ibc-go-v8-1-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Bump ibc-go to v8.1.0 ([\#192](https://github.com/cosmos/ibc-proto-
rs/pull/192))
2 changes: 1 addition & 1 deletion src/IBC_GO_COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
57fcdb9a9a9db9b206f7df2f955866dc4e10fef4
7e01c9149149b9d4b1d871e58eb88a22f15bdb3c
7 changes: 0 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,6 @@ pub mod ibc {
include_proto!("ibc.lightclients.tendermint.v1.serde.rs");
}
}
pub mod wasm {
pub mod v1 {
include_proto!("ibc.lightclients.wasm.v1.rs");
#[cfg(feature = "serde")]
include_proto!("ibc.lightclients.wasm.v1.serde.rs");
}
}
}
pub mod mock {
include_proto!("ibc.mock.rs");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ pub struct MsgRegisterInterchainAccount {
pub connection_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub version: ::prost::alloc::string::String,
#[prost(
enumeration = "super::super::super::super::core::channel::v1::Order",
tag = "4"
)]
pub ordering: i32,
}
impl ::prost::Name for MsgRegisterInterchainAccount {
const NAME: &'static str = "MsgRegisterInterchainAccount";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ impl serde::Serialize for MsgRegisterInterchainAccount {
if true {
len += 1;
}
if true {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount", len)?;
if true {
struct_ser.serialize_field("owner", &self.owner)?;
Expand All @@ -25,6 +28,11 @@ impl serde::Serialize for MsgRegisterInterchainAccount {
if true {
struct_ser.serialize_field("version", &self.version)?;
}
if true {
let v = super::super::super::super::core::channel::v1::Order::try_from(self.ordering)
.map_err(|_| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", self.ordering)))?;
struct_ser.serialize_field("ordering", &v)?;
}
struct_ser.end()
}
}
Expand All @@ -39,13 +47,15 @@ impl<'de> serde::Deserialize<'de> for MsgRegisterInterchainAccount {
"connection_id",
"connectionId",
"version",
"ordering",
];

#[allow(clippy::enum_variant_names)]
enum GeneratedField {
Owner,
ConnectionId,
Version,
Ordering,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> core::result::Result<GeneratedField, D::Error>
Expand All @@ -70,6 +80,7 @@ impl<'de> serde::Deserialize<'de> for MsgRegisterInterchainAccount {
"owner" => Ok(GeneratedField::Owner),
"connectionId" | "connection_id" => Ok(GeneratedField::ConnectionId),
"version" => Ok(GeneratedField::Version),
"ordering" => Ok(GeneratedField::Ordering),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
Expand All @@ -92,6 +103,7 @@ impl<'de> serde::Deserialize<'de> for MsgRegisterInterchainAccount {
let mut owner__ = None;
let mut connection_id__ = None;
let mut version__ = None;
let mut ordering__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Owner => {
Expand All @@ -112,12 +124,19 @@ impl<'de> serde::Deserialize<'de> for MsgRegisterInterchainAccount {
}
version__ = Some(map_.next_value()?);
}
GeneratedField::Ordering => {
if ordering__.is_some() {
return Err(serde::de::Error::duplicate_field("ordering"));
}
ordering__ = Some(map_.next_value::<super::super::super::super::core::channel::v1::Order>()? as i32);
}
}
}
Ok(MsgRegisterInterchainAccount {
owner: owner__.unwrap_or_default(),
connection_id: connection_id__.unwrap_or_default(),
version: version__.unwrap_or_default(),
ordering: ordering__.unwrap_or_default(),
})
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/prost/ibc.applications.transfer.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,10 @@ pub struct Allocation {
/// allow list of receivers, an empty allow list permits any receiver address
#[prost(string, repeated, tag = "4")]
pub allow_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// allow list of packet data keys, an empty list prohibits all packet data keys;
/// a list only with "*" permits any packet data key
#[prost(string, repeated, tag = "5")]
pub allowed_packet_data: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for Allocation {
const NAME: &'static str = "Allocation";
Expand Down
18 changes: 18 additions & 0 deletions src/prost/ibc.applications.transfer.v1.serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ impl serde::Serialize for Allocation {
if true {
len += 1;
}
if true {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("ibc.applications.transfer.v1.Allocation", len)?;
if true {
struct_ser.serialize_field("sourcePort", &self.source_port)?;
Expand All @@ -31,6 +34,9 @@ impl serde::Serialize for Allocation {
if true {
struct_ser.serialize_field("allowList", &self.allow_list)?;
}
if true {
struct_ser.serialize_field("allowedPacketData", &self.allowed_packet_data)?;
}
struct_ser.end()
}
}
Expand All @@ -49,6 +55,8 @@ impl<'de> serde::Deserialize<'de> for Allocation {
"spendLimit",
"allow_list",
"allowList",
"allowed_packet_data",
"allowedPacketData",
];

#[allow(clippy::enum_variant_names)]
Expand All @@ -57,6 +65,7 @@ impl<'de> serde::Deserialize<'de> for Allocation {
SourceChannel,
SpendLimit,
AllowList,
AllowedPacketData,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> core::result::Result<GeneratedField, D::Error>
Expand All @@ -82,6 +91,7 @@ impl<'de> serde::Deserialize<'de> for Allocation {
"sourceChannel" | "source_channel" => Ok(GeneratedField::SourceChannel),
"spendLimit" | "spend_limit" => Ok(GeneratedField::SpendLimit),
"allowList" | "allow_list" => Ok(GeneratedField::AllowList),
"allowedPacketData" | "allowed_packet_data" => Ok(GeneratedField::AllowedPacketData),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
Expand All @@ -105,6 +115,7 @@ impl<'de> serde::Deserialize<'de> for Allocation {
let mut source_channel__ = None;
let mut spend_limit__ = None;
let mut allow_list__ = None;
let mut allowed_packet_data__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::SourcePort => {
Expand All @@ -131,13 +142,20 @@ impl<'de> serde::Deserialize<'de> for Allocation {
}
allow_list__ = Some(map_.next_value()?);
}
GeneratedField::AllowedPacketData => {
if allowed_packet_data__.is_some() {
return Err(serde::de::Error::duplicate_field("allowedPacketData"));
}
allowed_packet_data__ = Some(map_.next_value()?);
}
}
}
Ok(Allocation {
source_port: source_port__.unwrap_or_default(),
source_channel: source_channel__.unwrap_or_default(),
spend_limit: spend_limit__.unwrap_or_default(),
allow_list: allow_list__.unwrap_or_default(),
allowed_packet_data: allowed_packet_data__.unwrap_or_default(),
})
}
}
Expand Down
Loading
Loading