Skip to content

Commit

Permalink
update to ibc-proto 0.46, tendermint 0.37
Browse files Browse the repository at this point in the history
  • Loading branch information
dynst committed Jun 11, 2024
1 parent e9830b5 commit 3ad3c9a
Show file tree
Hide file tree
Showing 13 changed files with 372 additions and 288 deletions.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ members = [

exclude = [
"ci/no-std-check",
]
]

[workspace.dependencies]
ibc-proto = { version = "0.46.0", default-features = false }
8 changes: 4 additions & 4 deletions crates/ibc-types-core-channel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ibc-types-domain-type = { version = "0.13.0", path = "../ibc-types-domain-type",
ibc-types-identifier = { version = "0.13.0", path = "../ibc-types-identifier", default-features = false }
ibc-types-timestamp = { version = "0.13.0", path = "../ibc-types-timestamp", default-features = false }
# Proto definitions for all IBC-related interfaces, e.g., connections or channels.
ibc-proto = { version = "0.42.0", default-features = false }
ibc-proto = {workspace = true}
## for borsh encode or decode
borsh = {version = "0.10.0", default-features = false, optional = true }
bytes = { version = "1.2.1", default-features = false }
Expand All @@ -87,15 +87,15 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive"
anyhow = { version = "1", default-features = false }

[dependencies.tendermint]
version = "0.34.0"
version = "0.37.0"
default-features = false

[dependencies.tendermint-proto]
version = "0.34.0"
version = "0.37.0"
default-features = false

[dependencies.tendermint-testgen]
version = "0.34.0"
version = "0.37.0"
optional = true
default-features = false

Expand Down
74 changes: 37 additions & 37 deletions crates/ibc-types-core-channel/src/events/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@ impl TryFrom<Event> for OpenInit {
let mut version = None;

for attr in event.attributes {
match attr.key.as_ref() {
match attr.key_str().unwrap() {
"port_id" => {
port_id = Some(PortId(attr.value));
port_id = Some(PortId(attr.value_str().unwrap().to_owned()));
}
"channel_id" => {
channel_id = Some(ChannelId(attr.value));
channel_id = Some(ChannelId(attr.value_str().unwrap().to_owned()));
}
"counterparty_port_id" => {
counterparty_port_id = Some(PortId(attr.value));
counterparty_port_id = Some(PortId(attr.value_str().unwrap().to_owned()));
}
"connection_id" => {
connection_id = Some(ConnectionId(attr.value));
connection_id = Some(ConnectionId(attr.value_str().unwrap().to_owned()));
}
"version" => {
version = Some(Version(attr.value));
version = Some(Version(attr.value_str().unwrap().to_owned()));
}
unknown => return Err(Error::UnexpectedAttribute(unknown.to_owned())),
}
Expand Down Expand Up @@ -136,24 +136,24 @@ impl TryFrom<Event> for OpenTry {
let mut version = None;

for attr in event.attributes {
match attr.key.as_ref() {
match attr.key_str().unwrap() {
"port_id" => {
port_id = Some(PortId(attr.value));
port_id = Some(PortId(attr.value_str().unwrap().to_owned()));
}
"channel_id" => {
channel_id = Some(ChannelId(attr.value));
channel_id = Some(ChannelId(attr.value_str().unwrap().to_owned()));
}
"counterparty_port_id" => {
counterparty_port_id = Some(PortId(attr.value));
counterparty_port_id = Some(PortId(attr.value_str().unwrap().to_owned()));
}
"counterparty_channel_id" => {
counterparty_channel_id = Some(ChannelId(attr.value));
counterparty_channel_id = Some(ChannelId(attr.value_str().unwrap().to_owned()));
}
"connection_id" => {
connection_id = Some(ConnectionId(attr.value));
connection_id = Some(ConnectionId(attr.value_str().unwrap().to_owned()));
}
"version" => {
version = Some(Version(attr.value));
version = Some(Version(attr.value_str().unwrap().to_owned()));
}
unknown => return Err(Error::UnexpectedAttribute(unknown.to_owned())),
}
Expand Down Expand Up @@ -218,21 +218,21 @@ impl TryFrom<Event> for OpenAck {
let mut connection_id = None;

for attr in event.attributes {
match attr.key.as_ref() {
match attr.key_str().unwrap() {
"port_id" => {
port_id = Some(PortId(attr.value));
port_id = Some(PortId(attr.value_str().unwrap().to_owned()));
}
"channel_id" => {
channel_id = Some(ChannelId(attr.value));
channel_id = Some(ChannelId(attr.value_str().unwrap().to_owned()));
}
"counterparty_port_id" => {
counterparty_port_id = Some(PortId(attr.value));
counterparty_port_id = Some(PortId(attr.value_str().unwrap().to_owned()));
}
"counterparty_channel_id" => {
counterparty_channel_id = Some(ChannelId(attr.value));
counterparty_channel_id = Some(ChannelId(attr.value_str().unwrap().to_owned()));
}
"connection_id" => {
connection_id = Some(ConnectionId(attr.value));
connection_id = Some(ConnectionId(attr.value_str().unwrap().to_owned()));
}
unknown => return Err(Error::UnexpectedAttribute(unknown.to_owned())),
}
Expand Down Expand Up @@ -296,21 +296,21 @@ impl TryFrom<Event> for OpenConfirm {
let mut connection_id = None;

for attr in event.attributes {
match attr.key.as_ref() {
match attr.key_str().unwrap() {
"port_id" => {
port_id = Some(PortId(attr.value));
port_id = Some(PortId(attr.value_str().unwrap().to_owned()));
}
"channel_id" => {
channel_id = Some(ChannelId(attr.value));
channel_id = Some(ChannelId(attr.value_str().unwrap().to_owned()));
}
"counterparty_port_id" => {
counterparty_port_id = Some(PortId(attr.value));
counterparty_port_id = Some(PortId(attr.value_str().unwrap().to_owned()));
}
"counterparty_channel_id" => {
counterparty_channel_id = Some(ChannelId(attr.value));
counterparty_channel_id = Some(ChannelId(attr.value_str().unwrap().to_owned()));
}
"connection_id" => {
connection_id = Some(ConnectionId(attr.value));
connection_id = Some(ConnectionId(attr.value_str().unwrap().to_owned()));
}
unknown => return Err(Error::UnexpectedAttribute(unknown.to_owned())),
}
Expand Down Expand Up @@ -374,21 +374,21 @@ impl TryFrom<Event> for CloseInit {
let mut connection_id = None;

for attr in event.attributes {
match attr.key.as_ref() {
match attr.key_str().unwrap() {
"port_id" => {
port_id = Some(PortId(attr.value));
port_id = Some(PortId(attr.value_str().unwrap().to_owned()));
}
"channel_id" => {
channel_id = Some(ChannelId(attr.value));
channel_id = Some(ChannelId(attr.value_str().unwrap().to_owned()));
}
"counterparty_port_id" => {
counterparty_port_id = Some(PortId(attr.value));
counterparty_port_id = Some(PortId(attr.value_str().unwrap().to_owned()));
}
"counterparty_channel_id" => {
counterparty_channel_id = Some(ChannelId(attr.value));
counterparty_channel_id = Some(ChannelId(attr.value_str().unwrap().to_owned()));
}
"connection_id" => {
connection_id = Some(ConnectionId(attr.value));
connection_id = Some(ConnectionId(attr.value_str().unwrap().to_owned()));
}
unknown => return Err(Error::UnexpectedAttribute(unknown.to_owned())),
}
Expand Down Expand Up @@ -452,21 +452,21 @@ impl TryFrom<Event> for CloseConfirm {
let mut connection_id = None;

for attr in event.attributes {
match attr.key.as_ref() {
match attr.key_str().unwrap() {
"port_id" => {
port_id = Some(PortId(attr.value));
port_id = Some(PortId(attr.value_str().unwrap().to_owned()));
}
"channel_id" => {
channel_id = Some(ChannelId(attr.value));
channel_id = Some(ChannelId(attr.value_str().unwrap().to_owned()));
}
"counterparty_port_id" => {
counterparty_port_id = Some(PortId(attr.value));
counterparty_port_id = Some(PortId(attr.value_str().unwrap().to_owned()));
}
"counterparty_channel_id" => {
counterparty_channel_id = Some(ChannelId(attr.value));
counterparty_channel_id = Some(ChannelId(attr.value_str().unwrap().to_owned()));
}
"connection_id" => {
connection_id = Some(ConnectionId(attr.value));
connection_id = Some(ConnectionId(attr.value_str().unwrap().to_owned()));
}
unknown => return Err(Error::UnexpectedAttribute(unknown.to_owned())),
}
Expand Down
Loading

0 comments on commit 3ad3c9a

Please sign in to comment.