diff --git a/packages/std/src/query/bank.rs b/packages/std/src/query/bank.rs index 4ae51883e..855ae592c 100644 --- a/packages/std/src/query/bank.rs +++ b/packages/std/src/query/bank.rs @@ -25,6 +25,7 @@ pub enum BankQuery { /// This calls into the native bank module for all denominations. /// Note that this may be much more expensive than Balance and should be avoided if possible. /// Return value is AllBalanceResponse. + #[deprecated] AllBalances { address: String }, /// This calls into the native bank module for querying metadata for a specific bank token. /// Return value is DenomMetadataResponse diff --git a/packages/std/src/query/ibc.rs b/packages/std/src/query/ibc.rs index b9792bb4d..95d8de358 100644 --- a/packages/std/src/query/ibc.rs +++ b/packages/std/src/query/ibc.rs @@ -19,6 +19,7 @@ pub enum IbcQuery { /// If `port_id` is omitted, this list all channels bound to the contract's port. /// /// Returns a `ListChannelsResponse`. + #[deprecated = "Returns a potentially unbound number of results. Research showed that no user needs this query."] ListChannels { port_id: Option }, /// Lists all information for a (portID, channelID) pair. /// If port_id is omitted, it will default to the contract's own channel. diff --git a/packages/std/src/testing/mock.rs b/packages/std/src/testing/mock.rs index f453203b5..33174e4b2 100644 --- a/packages/std/src/testing/mock.rs +++ b/packages/std/src/testing/mock.rs @@ -825,6 +825,7 @@ impl BankQuerier { }; to_json_binary(&bank_res).into() } + #[allow(deprecated)] BankQuery::AllBalances { address } => { // proper error on not found, serialize result on found let bank_res = AllBalanceResponse { @@ -936,6 +937,7 @@ impl IbcQuerier { let res = ChannelResponse { channel }; to_json_binary(&res).into() } + #[allow(deprecated)] IbcQuery::ListChannels { port_id } => { let channels = self .channels diff --git a/packages/std/src/traits.rs b/packages/std/src/traits.rs index 4ea7e8124..08c0592cd 100644 --- a/packages/std/src/traits.rs +++ b/packages/std/src/traits.rs @@ -420,7 +420,9 @@ impl<'a, C: CustomQuery> QuerierWrapper<'a, C> { Ok(res.amount) } + #[deprecated] pub fn query_all_balances(&self, address: impl Into) -> StdResult> { + #[allow(deprecated)] let request = BankQuery::AllBalances { address: address.into(), }