From d833faa9657f85fcc50a6d34ac9a51b7b4f0ce61 Mon Sep 17 00:00:00 2001 From: Sean Chen Date: Thu, 22 Aug 2024 11:34:25 -0500 Subject: [PATCH] Reflect `ibc-rs` PR 1318 changes (#191) * Update ibc and ibc-query dependencies to 0.54 * Update basecoin to reflect ibc-rs PR 1318 --- Cargo.lock | 108 +++++++++++++-------------- Cargo.toml | 8 +- basecoin/modules/src/ibc/transfer.rs | 14 ++-- 3 files changed, 65 insertions(+), 65 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index afd48ac1..5cbf3d72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1241,8 +1241,8 @@ dependencies = [ [[package]] name = "ibc" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "ibc-apps", "ibc-clients", @@ -1254,8 +1254,8 @@ dependencies = [ [[package]] name = "ibc-app-transfer" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "ibc-app-transfer-types", "ibc-core", @@ -1264,8 +1264,8 @@ dependencies = [ [[package]] name = "ibc-app-transfer-types" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "derive_more", "displaydoc", @@ -1278,16 +1278,16 @@ dependencies = [ [[package]] name = "ibc-apps" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "ibc-app-transfer", ] [[package]] name = "ibc-client-tendermint" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "derive_more", "ibc-client-tendermint-types", @@ -1303,8 +1303,8 @@ dependencies = [ [[package]] name = "ibc-client-tendermint-types" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "displaydoc", "ibc-core-client-types", @@ -1320,8 +1320,8 @@ dependencies = [ [[package]] name = "ibc-client-wasm-types" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "base64 0.22.1", "displaydoc", @@ -1334,8 +1334,8 @@ dependencies = [ [[package]] name = "ibc-clients" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "ibc-client-tendermint", "ibc-client-wasm-types", @@ -1343,8 +1343,8 @@ dependencies = [ [[package]] name = "ibc-core" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "ibc-core-channel", "ibc-core-client", @@ -1359,8 +1359,8 @@ dependencies = [ [[package]] name = "ibc-core-channel" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "ibc-core-channel-types", "ibc-core-client", @@ -1374,8 +1374,8 @@ dependencies = [ [[package]] name = "ibc-core-channel-types" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "derive_more", "displaydoc", @@ -1393,8 +1393,8 @@ dependencies = [ [[package]] name = "ibc-core-client" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "ibc-core-client-context", "ibc-core-client-types", @@ -1406,8 +1406,8 @@ dependencies = [ [[package]] name = "ibc-core-client-context" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "derive_more", "displaydoc", @@ -1422,8 +1422,8 @@ dependencies = [ [[package]] name = "ibc-core-client-types" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "derive_more", "displaydoc", @@ -1438,8 +1438,8 @@ dependencies = [ [[package]] name = "ibc-core-commitment-types" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "derive_more", "displaydoc", @@ -1453,8 +1453,8 @@ dependencies = [ [[package]] name = "ibc-core-connection" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "ibc-core-client", "ibc-core-connection-types", @@ -1465,8 +1465,8 @@ dependencies = [ [[package]] name = "ibc-core-connection-types" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "derive_more", "displaydoc", @@ -1482,8 +1482,8 @@ dependencies = [ [[package]] name = "ibc-core-handler" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "ibc-core-channel", "ibc-core-client", @@ -1497,8 +1497,8 @@ dependencies = [ [[package]] name = "ibc-core-handler-types" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "derive_more", "displaydoc", @@ -1517,8 +1517,8 @@ dependencies = [ [[package]] name = "ibc-core-host" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "derive_more", "displaydoc", @@ -1535,8 +1535,8 @@ dependencies = [ [[package]] name = "ibc-core-host-cosmos" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "derive_more", "displaydoc", @@ -1558,8 +1558,8 @@ dependencies = [ [[package]] name = "ibc-core-host-types" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "derive_more", "displaydoc", @@ -1569,8 +1569,8 @@ dependencies = [ [[package]] name = "ibc-core-router" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "derive_more", "displaydoc", @@ -1583,8 +1583,8 @@ dependencies = [ [[package]] name = "ibc-core-router-types" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "derive_more", "displaydoc", @@ -1598,8 +1598,8 @@ dependencies = [ [[package]] name = "ibc-derive" -version = "0.7.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.8.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "proc-macro2", "quote", @@ -1608,8 +1608,8 @@ dependencies = [ [[package]] name = "ibc-primitives" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "derive_more", "displaydoc", @@ -1640,8 +1640,8 @@ dependencies = [ [[package]] name = "ibc-query" -version = "0.53.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=6c7a65e#6c7a65e646f7bcae1d4ba6c9054059ca966bb979" +version = "0.54.0" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=a36348b#a36348b949194552f5a6e9d979f91129538e8023" dependencies = [ "displaydoc", "ibc", diff --git a/Cargo.toml b/Cargo.toml index 73cb95cf..b3f6e932 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,8 +30,8 @@ tracing = "0.1.40" tracing-subscriber = "0.3.18" # ibc dependencies -ibc = { version = "0.53.0", default-features = false, features = [ "serde" ] } -ibc-query = { version = "0.53.0", default-features = false } +ibc = { version = "0.54.0", default-features = false, features = [ "serde" ] } +ibc-query = { version = "0.54.0", default-features = false } ibc-proto = { version = "0.47.0", default-features = false } ics23 = { version = "0.12", default-features = false } @@ -45,8 +45,8 @@ tendermint-rpc = { version = "0.38", default-features = false } tower-abci = { version = "0.16" } [patch.crates-io] -ibc = { git = "https://github.com/cosmos/ibc-rs.git", rev = "6c7a65e" } -ibc-query = { git = "https://github.com/cosmos/ibc-rs.git", rev = "6c7a65e" } +ibc = { git = "https://github.com/cosmos/ibc-rs.git", rev = "a36348b" } +ibc-query = { git = "https://github.com/cosmos/ibc-rs.git", rev = "a36348b" } # for tendermint 0.38 tower-abci = { git = "https://github.com/informalsystems/tower-abci", rev = "0992541" } diff --git a/basecoin/modules/src/ibc/transfer.rs b/basecoin/modules/src/ibc/transfer.rs index 071852db..67344fc5 100644 --- a/basecoin/modules/src/ibc/transfer.rs +++ b/basecoin/modules/src/ibc/transfer.rs @@ -60,7 +60,7 @@ where ACCOUNT_PREFIX, &cosmos_adr028_escrow_address(port_id, channel_id), ) - .map_err(|_| TokenTransferError::ParseAccountFailure)?; + .map_err(|_| TokenTransferError::FailedToParseAccount)?; Ok(account_id) } @@ -379,12 +379,12 @@ where let from = from_account .to_string() .parse() - .map_err(|_| TokenTransferError::ParseAccountFailure)?; + .map_err(|_| TokenTransferError::FailedToParseAccount)?; let to = self .get_escrow_account(port_id, channel_id)? .to_string() .parse() - .map_err(|_| TokenTransferError::ParseAccountFailure)?; + .map_err(|_| TokenTransferError::FailedToParseAccount)?; let coins = vec![Coin { denom: Denom(coin.denom.to_string()), amount: coin.amount.into(), @@ -404,11 +404,11 @@ where .get_escrow_account(port_id, channel_id)? .to_string() .parse() - .map_err(|_| TokenTransferError::ParseAccountFailure)?; + .map_err(|_| TokenTransferError::FailedToParseAccount)?; let to = to_account .to_string() .parse() - .map_err(|_| TokenTransferError::ParseAccountFailure)?; + .map_err(|_| TokenTransferError::FailedToParseAccount)?; let coins = vec![Coin { denom: Denom(coin.denom.to_string()), amount: coin.amount.into(), @@ -425,7 +425,7 @@ where let account = account .to_string() .parse() - .map_err(|_| TokenTransferError::ParseAccountFailure)?; + .map_err(|_| TokenTransferError::FailedToParseAccount)?; let coins = vec![Coin { denom: Denom(amt.denom.to_string()), amount: amt.amount.into(), @@ -443,7 +443,7 @@ where let account = account .to_string() .parse() - .map_err(|_| TokenTransferError::ParseAccountFailure)?; + .map_err(|_| TokenTransferError::FailedToParseAccount)?; let coins = vec![Coin { denom: Denom(amt.denom.to_string()), amount: amt.amount.into(),