Skip to content
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: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cw20 = { package = "abstract-cw20", version = "1.2.2" }
cw20-base = { package = "abstract-cw20-base", version = "1.2.2" }

# Test Tube env deps
osmosis-test-tube = { version = "21.0.0" }
osmosis-test-tube = { version = "22.1.0" }

anyhow = "1.0"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
Expand Down
20 changes: 11 additions & 9 deletions cw-orch-daemon/src/queriers/staking.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::fmt::Display;

use crate::{cosmos_modules, error::DaemonError, Daemon};
use cosmrs::proto::cosmos::base::query::v1beta1::PageRequest;
use cw_orch_core::environment::{Querier, QuerierGetter};
Expand Down Expand Up @@ -292,14 +294,14 @@ pub enum StakingBondStatus {
Bonded = 3,
}

impl ToString for StakingBondStatus {
/// Convert to string
fn to_string(&self) -> String {
match self {
StakingBondStatus::Unspecified => "BOND_STATUS_UNSPECIFIED".to_string(),
StakingBondStatus::Unbonded => "BOND_STATUS_UNBONDED".to_string(),
StakingBondStatus::Unbonding => "BOND_STATUS_UNBONDING".to_string(),
StakingBondStatus::Bonded => "BOND_STATUS_BONDED".to_string(),
}
impl Display for StakingBondStatus {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let str = match self {
StakingBondStatus::Unspecified => "BOND_STATUS_UNSPECIFIED",
StakingBondStatus::Unbonded => "BOND_STATUS_UNBONDED",
StakingBondStatus::Unbonding => "BOND_STATUS_UNBONDING",
StakingBondStatus::Bonded => "BOND_STATUS_BONDED",
};
write!(f, "{}", str)
}
}
2 changes: 0 additions & 2 deletions cw-orch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ daemon = [
eth = ["daemon", "cw-orch-core/eth", "cw-orch-daemon?/eth"]
osmosis-test-tube = [
"dep:osmosis-test-tube",
"dep:osmosis-std",
"dep:prost",
"dep:prost-types",
"dep:cosmrs",
Expand Down Expand Up @@ -91,7 +90,6 @@ tonic = { workspace = true, optional = true, features = ["tls", "tls-roots"] }

# Test Tube env deps
osmosis-test-tube = { workspace = true, optional = true }
osmosis-std = { version = "=0.21.0", optional = true }
prost-types = { workspace = true, optional = true }
prost = { workspace = true, optional = true }

Expand Down
2 changes: 1 addition & 1 deletion cw-orch/examples/complex_osmosis_test_tube.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use counter_contract::{

use cw_orch::prelude::*;
use cw_orch_traits::Stargate;
use osmosis_std::types::{
use osmosis_test_tube::osmosis_std::types::{
cosmos::base::v1beta1::Coin,
osmosis::tokenfactory::v1beta1::{
MsgCreateDenom, MsgCreateDenomResponse, MsgMint, MsgMintResponse,
Expand Down
2 changes: 1 addition & 1 deletion cw-orch/examples/complex_testnet_daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use counter_contract::{
};
use cw_orch::prelude::*;
use cw_orch_traits::Stargate;
use osmosis_std::types::{
use osmosis_test_tube::osmosis_std::types::{
cosmos::base::v1beta1::Coin,
osmosis::tokenfactory::v1beta1::{
MsgCreateDenom, MsgCreateDenomResponse, MsgMint, MsgMintResponse,
Expand Down
6 changes: 4 additions & 2 deletions cw-orch/src/osmosis_test_tube/queriers/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ use cw_orch_core::{
},
CwEnvError,
};
use osmosis_std::try_proto_to_cosmwasm_coins;
use osmosis_std::types::cosmos::bank::v1beta1::{QuerySupplyOfRequest, QuerySupplyOfResponse};
use osmosis_test_tube::osmosis_std::try_proto_to_cosmwasm_coins;
use osmosis_test_tube::osmosis_std::types::cosmos::bank::v1beta1::{
QuerySupplyOfRequest, QuerySupplyOfResponse,
};
use osmosis_test_tube::{Bank, Module, OsmosisTestApp, Runner};

use crate::osmosis_test_tube::{map_err, OsmosisTestTube};
Expand Down
2 changes: 1 addition & 1 deletion cw-orch/src/osmosis_test_tube/queriers/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use cw_orch_core::{
use osmosis_test_tube::{OsmosisTestApp, Runner};

use crate::osmosis_test_tube::{map_err, OsmosisTestTube};
use osmosis_std::types::cosmwasm::wasm::v1::{
use osmosis_test_tube::osmosis_std::types::cosmwasm::wasm::v1::{
QueryCodeRequest, QueryCodeResponse, QueryContractInfoRequest, QueryContractInfoResponse,
QueryRawContractStateRequest, QueryRawContractStateResponse, QuerySmartContractStateRequest,
QuerySmartContractStateResponse,
Expand Down
12 changes: 7 additions & 5 deletions packages/cw-orch-networks/src/chain_info.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::fmt::Display;

use serde::{Deserialize, Serialize};

use ibc_chain_registry::chain::{Apis, ChainData as RegistryChainInfo, FeeToken, FeeTokens, Grpc};
Expand Down Expand Up @@ -107,14 +109,14 @@ impl ChainKind {
}
}

impl ToString for ChainKind {
fn to_string(&self) -> String {
match *self {
impl Display for ChainKind {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let str = match *self {
ChainKind::Local => "local",
ChainKind::Testnet => "testnet",
ChainKind::Mainnet => "mainnet",
}
.into()
};
write!(f, "{}", str)
}
}

Expand Down