Skip to content

Commit 27f8ca0

Browse files
committed
Removed unneeded code from test.
1 parent 5fa1e21 commit 27f8ca0

File tree

1 file changed

+3
-47
lines changed

1 file changed

+3
-47
lines changed

tests/test_stargate/test_custom_stargate.rs

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,19 @@
11
use crate::test_stargate::test_contracts::{MsgCreateDenom, MsgCreateDenomResponse};
22
use cosmwasm_std::{
3-
from_json, Addr, AnyMsg, Api, Binary, BlockInfo, CustomMsg, CustomQuery, Empty, GrpcQuery,
4-
MsgResponse, Querier, Storage, SubMsgResponse,
3+
from_json, Addr, AnyMsg, Api, Binary, BlockInfo, CustomMsg, CustomQuery, Empty, MsgResponse,
4+
Storage, SubMsgResponse,
55
};
6-
use cw_multi_test::error::{bail, AnyResult};
6+
use cw_multi_test::error::AnyResult;
77
use cw_multi_test::{
88
no_init, AppBuilder, AppResponse, Contract, ContractWrapper, CosmosRouter, Executor, IntoAddr,
99
Stargate,
1010
};
1111
use prost::Message;
1212
use serde::de::DeserializeOwned;
1313

14-
const MSG_STARGATE_EXECUTE: &str = "stargate execute called";
15-
const MSG_STARGATE_QUERY: &str = "stargate query called";
16-
const MSG_GRPC_QUERY: &str = "grpc query called";
17-
1814
struct StargateKeeper;
1915

2016
impl Stargate for StargateKeeper {
21-
fn execute_stargate<ExecC, QueryC>(
22-
&self,
23-
_api: &dyn Api,
24-
_storage: &mut dyn Storage,
25-
_router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
26-
_block: &BlockInfo,
27-
_sender: Addr,
28-
_type_url: String,
29-
_value: Binary,
30-
) -> AnyResult<AppResponse>
31-
where
32-
ExecC: CustomMsg + DeserializeOwned + 'static,
33-
QueryC: CustomQuery + DeserializeOwned + 'static,
34-
{
35-
bail!(MSG_STARGATE_EXECUTE)
36-
}
37-
38-
fn query_stargate(
39-
&self,
40-
_api: &dyn Api,
41-
_storage: &dyn Storage,
42-
_querier: &dyn Querier,
43-
_block: &BlockInfo,
44-
_path: String,
45-
_data: Binary,
46-
) -> AnyResult<Binary> {
47-
bail!(MSG_STARGATE_QUERY)
48-
}
49-
5017
fn execute_any<ExecC, QueryC>(
5118
&self,
5219
_api: &dyn Api,
@@ -76,17 +43,6 @@ impl Stargate for StargateKeeper {
7643
};
7744
Ok(sub_response.into())
7845
}
79-
80-
fn query_grpc(
81-
&self,
82-
_api: &dyn Api,
83-
_storage: &dyn Storage,
84-
_querier: &dyn Querier,
85-
_block: &BlockInfo,
86-
_request: GrpcQuery,
87-
) -> AnyResult<Binary> {
88-
bail!(MSG_GRPC_QUERY)
89-
}
9046
}
9147

9248
fn the_contract() -> Box<dyn Contract<Empty>> {

0 commit comments

Comments
 (0)