Skip to content

Commit

Permalink
Prost, cosmrs, cosmos-sdk-proto bump (#472)
Browse files Browse the repository at this point in the history
* prost bump

* add TODO's in toml

* add comment about comp test

* remove v50 patch

* fix doctests

* small todo update
  • Loading branch information
Buckram123 authored Aug 20, 2024
1 parent e3e531b commit 315c093
Show file tree
Hide file tree
Showing 12 changed files with 141 additions and 360 deletions.
22 changes: 14 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ members = [
"packages/cw-orch-core",
"packages/cw-orch-mock",
"packages/cw-orch-networks",
# TODO: clone-cw-multi-test depends on cw-orch, so needs to be bumped first
# "packages/clone-testing",
# TODO: release those after *-std reaches to prost 0.13
# "packages/cw-orch-osmosis-test-tube",
"packages/cw-orch-neutron-test-tube",
# "packages/cw-orch-neutron-test-tube",
"packages/cw-orch-traits",
"test_contracts/*",
"packages/macros/*",
"packages/interchain/*",
]
exclude = ["test_contracts/compatibility-test"]
exclude = [
"test_contracts/compatibility-test", # TODO: add new after cw-orch-core 2.0.0 as it's breaking, it shouldn't be compatible
"packages/interchain/proto", # TODO: Release cw-orch-proto after osmosis-std reaches prost 0.13
]
resolver = "2"

[workspace.package]
Expand All @@ -27,7 +32,7 @@ repository = "https://github.com/AbstractSDK/cw-orchestrator"
cw-utils = { version = "2.0.0" }
cosmwasm-std = { version = "2.1" }
cw-storage-plus = { version = "2.0.0" }
cosmos-sdk-proto = { version = "0.22.0", default-features = false } # https://github.com/cosmos/cosmos-rust/issues/497
cosmos-sdk-proto = { version = "0.24.0", default-features = false }

cw-multi-test = { package = "abstract-cw-multi-test", version = "2.0.2", features = [
"cosmwasm_1_2",
Expand Down Expand Up @@ -62,18 +67,19 @@ cw-orch-interchain-core = { path = "packages/interchain/interchain-core", versio
cw-orch-interchain-daemon = { path = "packages/interchain/interchain-daemon", version = "0.5.0" }
cw-orch-interchain-mock = { path = "packages/interchain/interchain-mock", version = "0.5.0" }
cw-orch-starship = { path = "packages/interchain/starship", version = "0.5.0" }
cw-orch-proto = { path = "packages/interchain/proto", version = "0.5.0" }
# cw-orch-proto = { path = "packages/interchain/proto", version = "0.5.0" } # prost, tonic, cosmrs bump locked by osmosis (we use it for tokenfactory)

#Clone Testing
# cw-orch-clone-testing = { version = "0.6.1", path = "packages/clone-testing" }

thiserror = { version = "1.0.63" }
sha2 = { version = "0.10.8" }
serde_json = "1.0.125"
tonic = { version = "0.11.0" }
prost-types = "0.12.3"
prost = "0.12.3" # prost, tonic, cosmrs bump locked by osmosis (we use it for tokenfactory
cosmrs = { version = "0.17.0" }
tonic = { version = "0.12.1" }
prost-types = "0.13.1"
prost = "0.13.1"
cosmrs = { version = "0.19.0" }
ibc-proto = { version = "0.47.0" }
# Test deps
speculoos = "0.11.0"

Expand Down
5 changes: 0 additions & 5 deletions cw-orch-daemon/src/cosmos_proto_patches/mod.rs

This file was deleted.

1 change: 0 additions & 1 deletion cw-orch-daemon/src/cosmos_proto_patches/v0_50/mod.rs

This file was deleted.

224 changes: 0 additions & 224 deletions cw-orch-daemon/src/cosmos_proto_patches/v0_50/tx.rs

This file was deleted.

1 change: 0 additions & 1 deletion cw-orch-daemon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub use cw_orch_networks::networks;
pub use network_config::read_network_config;
pub use senders::{query::QuerySender, tx::TxSender, CosmosOptions, Wallet};
pub use tx_builder::TxBuilder;
mod cosmos_proto_patches;

pub(crate) mod cosmos_modules {
pub use cosmrs::proto::{
Expand Down
4 changes: 2 additions & 2 deletions cw-orch-daemon/src/queriers/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,12 @@ impl Node {
retry_on_empty: bool,
retries: usize,
) -> Result<Vec<CosmTxResponse>, DaemonError> {
let mut client = crate::cosmos_proto_patches::v0_50::tx::service_client::ServiceClient::new(
let mut client = cosmrs::proto::cosmos::tx::v1beta1::service_client::ServiceClient::new(
self.channel.clone(),
);

#[allow(deprecated)]
let request = crate::cosmos_proto_patches::v0_50::tx::GetTxsEventRequest {
let request = cosmrs::proto::cosmos::tx::v1beta1::GetTxsEventRequest {
events: events.clone(),
pagination: None,
order_by: order_by.unwrap_or(OrderBy::Desc).into(),
Expand Down
8 changes: 4 additions & 4 deletions cw-orch-daemon/tests/authz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mod tests {
use cw_orch_traits::Stargate;
use prost::Message;
use prost::Name;
use prost_types::{Any, Timestamp};
use prost_types::Any;
pub const SECOND_MNEMONIC: &str ="salute trigger antenna west ignore own dance bounce battle soul girl scan test enroll luggage sorry distance traffic brand keen rich syrup wood repair";

#[test]
Expand Down Expand Up @@ -57,13 +57,13 @@ mod tests {
}
.encode_to_vec(),
};
let expiration = Timestamp {
let expiration = cosmrs::proto::Timestamp {
seconds: (current_timestamp.seconds() + 3600) as i64,
nanos: 0,
};
let grant = cosmrs::proto::cosmos::authz::v1beta1::Grant {
authorization: Some(authorization.clone()),
expiration: Some(expiration.clone()),
expiration: Some(expiration),
};

// We start by granting authz to an account
Expand All @@ -85,7 +85,7 @@ mod tests {
granter: sender.to_string(),
grantee: grantee.to_string(),
authorization: Some(authorization.clone()),
expiration: Some(expiration.clone()),
expiration: Some(expiration),
};

// Grants
Expand Down
2 changes: 2 additions & 0 deletions cw-orch-interchain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ log.workspace = true
speculoos.workspace = true
tokio = "1.39.2"
cosmos-sdk-proto = { workspace = true }
prost-types = { workspace = true }
ibc-proto = { workspace = true }
pretty_env_logger = "0.5.0"
17 changes: 8 additions & 9 deletions cw-orch-interchain/examples/timeout_packet.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
use cosmos_sdk_proto::{
ibc::{
applications::transfer::v1::{MsgTransfer, MsgTransferResponse},
core::client::v1::Height,
},
traits::{Message, Name},
Any,
};
use cosmos_sdk_proto::traits::{Message, Name};
use cw_orch::{environment::QueryHandler, prelude::*};
use cw_orch_interchain_core::InterchainEnv;
use cw_orch_interchain_daemon::ChannelCreator as _;
use cw_orch_starship::Starship;
use ibc_proto::ibc::{
applications::transfer::v1::{MsgTransfer, MsgTransferResponse},
core::client::v1::Height,
};
use ibc_relayer_types::core::ics24_host::identifier::PortId;
use prost_types::Any;
fn main() -> cw_orch::anyhow::Result<()> {
pretty_env_logger::init();

Expand Down Expand Up @@ -40,7 +38,7 @@ fn main() -> cw_orch::anyhow::Result<()> {
value: MsgTransfer {
source_port: channel.0.port.to_string(),
source_channel: channel.0.channel.unwrap().to_string(),
token: Some(cosmos_sdk_proto::cosmos::base::v1beta1::Coin {
token: Some(ibc_proto::cosmos::base::v1beta1::Coin {
amount: "100_000".to_string(),
denom: "ujuno".to_string(),
}),
Expand All @@ -51,6 +49,7 @@ fn main() -> cw_orch::anyhow::Result<()> {
revision_height: stargaze_height.height,
}),
timeout_timestamp: 0,
memo: String::new(),
}
.encode_to_vec(),
type_url: MsgTransfer::type_url(),
Expand Down
Loading

0 comments on commit 315c093

Please sign in to comment.