Skip to content

Commit 60de523

Browse files
committed
fix h2 problem with https
1 parent f3c7a9f commit 60de523

File tree

11 files changed

+209
-219
lines changed

11 files changed

+209
-219
lines changed

Cargo.lock

Lines changed: 178 additions & 189 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ version = "0.1.6"
1111
anyhow = "1.0.57"
1212
base64 = "0.13.0"
1313
cargo-generate = {version = "0.18.3", features = ["vendored-openssl"]}
14-
clap = {version = "4.2.7", features = ["derive","string"]}
14+
clap = {version = "4.2.7", features = ["derive", "string"]}
1515
config = {version = "0.13.1", features = ["preserve_order"]}
1616
console = "0.15.0"
17-
cosmos-sdk-proto = {version = "0.16", features = ["cosmwasm"]}
17+
cosmos-sdk-proto = {version = "0.19", features = ["cosmwasm"]}
1818
cosmrs = {version = "0.14.0", features = ["dev", "cosmwasm", "grpc"]}
1919
data_doc = {version = "0.1.0", path = "../data_doc"}
2020
data_doc_derive = {version = "0.1.0", path = "../data_doc_derive"}
@@ -34,6 +34,7 @@ tendermint-rpc = {version = "0.32.0", features = ["http-client"]}
3434
textwrap = "0.15.0"
3535
tokio = {version = "1.18.2", features = ["full"]}
3636
toml = "0.5.9"
37+
tonic = {version = "*", features = ["tls", "tls-roots"]}
3738

3839
[dev-dependencies]
3940
assert_fs = "1.0.7"

packages/cli/src/modules/wasm/ops/clear_admin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::support::ops_response::OpResponseDisplay;
66

77
use anyhow::Context as _;
88

9-
use cosmrs::proto::cosmwasm::wasm::v1::MsgClearAdmin;
9+
use cosmos_sdk_proto::cosmwasm::wasm::v1::MsgClearAdmin;
1010
use cosmrs::tx::MessageExt;
1111
use serde::Serialize;
1212

packages/cli/src/modules/wasm/ops/execute.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ use crate::{framework::Context, support::cosmos::Client};
1010
use anyhow::anyhow;
1111
use anyhow::Context as _;
1212
use anyhow::Result;
13+
use cosmos_sdk_proto::cosmwasm::wasm::v1::MsgExecuteContractResponse;
14+
use cosmos_sdk_proto::{traits::Message, Any};
1315
use cosmrs::cosmwasm::MsgExecuteContract;
1416
use cosmrs::crypto::secp256k1::SigningKey;
15-
use cosmrs::proto::cosmwasm::wasm::v1::MsgExecuteContractResponse;
16-
use cosmrs::proto::{traits::Message, Any};
1717
use cosmrs::tx::Msg;
1818
use cosmrs::AccountId;
1919
use serde::Serialize;

packages/cli/src/modules/wasm/ops/migrate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use crate::{framework::Context, support::cosmos::Client};
1010

1111
use anyhow::Context as _;
1212
use anyhow::Result;
13+
use cosmos_sdk_proto::cosmwasm::wasm::v1::MsgMigrateContract;
1314
use cosmrs::crypto::secp256k1::SigningKey;
14-
use cosmrs::proto::cosmwasm::wasm::v1::MsgMigrateContract;
1515
use cosmrs::tx::MessageExt;
1616
use serde::Serialize;
1717
use std::fs;

packages/cli/src/modules/wasm/ops/update_admin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::support::future::block;
44
use crate::support::gas::Gas;
55
use crate::support::ops_response::OpResponseDisplay;
66
use anyhow::Context as _;
7-
use cosmrs::proto::cosmwasm::wasm::v1::MsgUpdateAdmin;
7+
use cosmos_sdk_proto::cosmwasm::wasm::v1::MsgUpdateAdmin;
88
use serde::Serialize;
99

1010
use crate::support::state::State;

packages/cli/src/modules/wasm/proposal/ops/propose.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ use crate::support::state::State;
99
use crate::support::wasm::read_wasm;
1010
use crate::{framework::Context, modules::wasm::WasmConfig, support::cosmos::Client};
1111
use anyhow::{Context as _, Result};
12+
use cosmos_sdk_proto::cosmos::gov::v1beta1::MsgSubmitProposal;
13+
use cosmos_sdk_proto::cosmwasm::wasm::v1::StoreCodeProposal;
1214
use cosmrs::crypto::secp256k1::SigningKey;
13-
use cosmrs::proto::cosmos::gov::v1beta1::MsgSubmitProposal;
14-
use cosmrs::proto::cosmwasm::wasm::v1::StoreCodeProposal;
1515
use cosmrs::tx::MessageExt;
1616
use cosmrs::Any;
1717
use serde::Serialize;

packages/cli/src/modules/wasm/proposal/ops/query.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use crate::support::state::State;
33
use crate::vars_format;
44
use crate::{framework::Context, modules::wasm::WasmConfig, support::cosmos::Client};
55
use anyhow::{Context as _, Result};
6+
use cosmos_sdk_proto::cosmos::gov::v1beta1::{Proposal, ProposalStatus, TallyResult};
7+
use cosmos_sdk_proto::traits::Message;
68
use cosmrs::bip32::secp256k1::pkcs8::der::DateTime;
7-
use cosmrs::proto::cosmos::gov::v1beta1::{Proposal, ProposalStatus, TallyResult};
8-
use cosmrs::proto::traits::Message;
99
use serde::Serialize;
1010
use std::time::Duration;
1111
use std::vec;
@@ -37,7 +37,7 @@ pub fn query_proposal<'a, Ctx: Context<'a, WasmConfig>>(
3737
})?)
3838
.await?;
3939

40-
use cosmrs::proto::cosmwasm::wasm::v1::StoreCodeProposal;
40+
use cosmos_sdk_proto::cosmwasm::wasm::v1::StoreCodeProposal;
4141

4242
let Proposal {
4343
proposal_id,

packages/cli/src/modules/wasm/proposal/ops/vote.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ pub fn vote<'a, Ctx: Context<'a, WasmConfig>>(
4444
.with_context(|| format!("Unable to retrieve proposal_id for {contract_name}"))?;
4545

4646
let option = option.parse::<VoteOptionImpl>()?;
47-
let option = cosmrs::proto::cosmos::gov::v1beta1::VoteOption::from(option);
47+
let option = cosmos_sdk_proto::cosmos::gov::v1beta1::VoteOption::from(option);
4848

49-
let msg_vote = cosmrs::proto::cosmos::gov::v1beta1::MsgVote {
49+
let msg_vote = cosmos_sdk_proto::cosmos::gov::v1beta1::MsgVote {
5050
proposal_id,
5151
voter: client.signer_account_id().to_string(),
5252
option: option.into(),
@@ -72,15 +72,15 @@ pub fn vote<'a, Ctx: Context<'a, WasmConfig>>(
7272
})
7373
}
7474

75-
struct VoteOptionImpl(cosmrs::proto::cosmos::gov::v1beta1::VoteOption);
75+
struct VoteOptionImpl(cosmos_sdk_proto::cosmos::gov::v1beta1::VoteOption);
7676

77-
impl From<cosmrs::proto::cosmos::gov::v1beta1::VoteOption> for VoteOptionImpl {
78-
fn from(v: cosmrs::proto::cosmos::gov::v1beta1::VoteOption) -> Self {
77+
impl From<cosmos_sdk_proto::cosmos::gov::v1beta1::VoteOption> for VoteOptionImpl {
78+
fn from(v: cosmos_sdk_proto::cosmos::gov::v1beta1::VoteOption) -> Self {
7979
VoteOptionImpl(v)
8080
}
8181
}
8282

83-
impl From<VoteOptionImpl> for cosmrs::proto::cosmos::gov::v1beta1::VoteOption {
83+
impl From<VoteOptionImpl> for cosmos_sdk_proto::cosmos::gov::v1beta1::VoteOption {
8484
fn from(v: VoteOptionImpl) -> Self {
8585
let VoteOptionImpl(vo) = v;
8686
vo
@@ -91,7 +91,7 @@ impl FromStr for VoteOptionImpl {
9191
type Err = anyhow::Error;
9292

9393
fn from_str(s: &str) -> Result<Self, Self::Err> {
94-
use cosmrs::proto::cosmos::gov::v1beta1::VoteOption;
94+
use cosmos_sdk_proto::cosmos::gov::v1beta1::VoteOption;
9595

9696
match s {
9797
"yes" => Ok(VoteOption::Yes.into()),

packages/cli/src/support/coin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl From<Coins> for Vec<Coin> {
7575
}
7676
}
7777

78-
impl From<Coins> for Vec<cosmrs::proto::cosmos::base::v1beta1::Coin> {
78+
impl From<Coins> for Vec<cosmos_sdk_proto::cosmos::base::v1beta1::Coin> {
7979
fn from(coins: Coins) -> Self {
8080
let Coins(v) = coins;
8181
v.iter().map(|c| c.into()).collect()

packages/cli/src/support/cosmos.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use crate::framework::config::Network;
22
use anyhow::{anyhow, Ok};
33
use anyhow::{Context, Result};
4+
use cosmos_sdk_proto::cosmos::auth::v1beta1::BaseAccount;
5+
use cosmos_sdk_proto::cosmos::gov::v1beta1::Proposal;
46
use cosmrs::abci::GasInfo;
57
use cosmrs::crypto::secp256k1::SigningKey;
6-
use cosmrs::proto::cosmos::auth::v1beta1::BaseAccount;
7-
use cosmrs::proto::cosmos::gov::v1beta1::Proposal;
88

9-
use cosmrs::proto::traits::Message;
9+
use cosmos_sdk_proto::traits::Message;
1010
use cosmrs::tx::{self, SignDoc, SignerInfo};
1111
use cosmrs::{dev, AccountId, Coin};
1212
use cosmrs::{rpc, tx::Fee, Any};
@@ -62,7 +62,7 @@ impl Client {
6262
}
6363

6464
pub async fn account(&self, address: &str) -> Result<BaseAccount> {
65-
use cosmrs::proto::cosmos::auth::v1beta1::*;
65+
use cosmos_sdk_proto::cosmos::auth::v1beta1::*;
6666
let grpc_endpoint = self.network.grpc_endpoint();
6767

6868
let mut c = query_client::QueryClient::connect(self.network.grpc_endpoint().clone())
@@ -83,7 +83,7 @@ impl Client {
8383

8484
#[allow(deprecated)]
8585
pub async fn simulate(&self, tx_bytes: Vec<u8>) -> Result<GasInfo> {
86-
use cosmrs::proto::cosmos::tx::v1beta1::*;
86+
use cosmos_sdk_proto::cosmos::tx::v1beta1::*;
8787
let grpc_endpoint = self.network.grpc_endpoint();
8888

8989
let mut c = service_client::ServiceClient::connect(self.network.grpc_endpoint().clone())
@@ -104,7 +104,7 @@ impl Client {
104104
}
105105

106106
pub async fn query_smart(&self, address: String, query_data: Vec<u8>) -> Result<Vec<u8>> {
107-
use cosmrs::proto::cosmwasm::wasm::v1::*;
107+
use cosmos_sdk_proto::cosmwasm::wasm::v1::*;
108108
let grpc_endpoint = self.network.grpc_endpoint();
109109

110110
let mut c = query_client::QueryClient::connect(self.network.grpc_endpoint().clone())
@@ -124,7 +124,7 @@ impl Client {
124124
}
125125

126126
pub async fn proposal(&self, proposal_id: &u64) -> Result<Proposal> {
127-
use cosmrs::proto::cosmos::gov::v1beta1::*;
127+
use cosmos_sdk_proto::cosmos::gov::v1beta1::*;
128128
let grpc_endpoint = self.network.grpc_endpoint();
129129

130130
let mut c = query_client::QueryClient::connect(self.network.grpc_endpoint().clone())
@@ -145,8 +145,8 @@ impl Client {
145145
async fn gov_params(
146146
&self,
147147
params_type: &str,
148-
) -> Result<cosmrs::proto::cosmos::gov::v1beta1::QueryParamsResponse> {
149-
use cosmrs::proto::cosmos::gov::v1beta1::*;
148+
) -> Result<cosmos_sdk_proto::cosmos::gov::v1beta1::QueryParamsResponse> {
149+
use cosmos_sdk_proto::cosmos::gov::v1beta1::*;
150150
let grpc_endpoint = self.network.grpc_endpoint();
151151

152152
let mut c = query_client::QueryClient::connect(self.network.grpc_endpoint().clone())
@@ -164,7 +164,7 @@ impl Client {
164164
}
165165
pub async fn gov_params_deposit(
166166
&self,
167-
) -> Result<cosmrs::proto::cosmos::gov::v1beta1::DepositParams> {
167+
) -> Result<cosmos_sdk_proto::cosmos::gov::v1beta1::DepositParams> {
168168
self.gov_params("deposit")
169169
.await?
170170
.deposit_params

0 commit comments

Comments
 (0)