|
1 | 1 | use crate::test_stargate::test_contracts::{MsgCreateDenom, MsgCreateDenomResponse};
|
2 | 2 | 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, |
5 | 5 | };
|
6 |
| -use cw_multi_test::error::{bail, AnyResult}; |
| 6 | +use cw_multi_test::error::AnyResult; |
7 | 7 | use cw_multi_test::{
|
8 | 8 | no_init, AppBuilder, AppResponse, Contract, ContractWrapper, CosmosRouter, Executor, IntoAddr,
|
9 | 9 | Stargate,
|
10 | 10 | };
|
11 | 11 | use prost::Message;
|
12 | 12 | use serde::de::DeserializeOwned;
|
13 | 13 |
|
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 |
| - |
18 | 14 | struct StargateKeeper;
|
19 | 15 |
|
20 | 16 | 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 |
| - |
50 | 17 | fn execute_any<ExecC, QueryC>(
|
51 | 18 | &self,
|
52 | 19 | _api: &dyn Api,
|
@@ -76,17 +43,6 @@ impl Stargate for StargateKeeper {
|
76 | 43 | };
|
77 | 44 | Ok(sub_response.into())
|
78 | 45 | }
|
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 |
| - } |
90 | 46 | }
|
91 | 47 |
|
92 | 48 | fn the_contract() -> Box<dyn Contract<Empty>> {
|
|
0 commit comments