Skip to content

Commit 0bbb324

Browse files
committed
Remove schemars dependency from cosmwasm-vm
1 parent df00fb7 commit 0bbb324

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ and this project adheres to
3636
2.2.0 already. ([#2262])
3737
- cosmwasm-std: Remove previously deprecated `from_slice`, `from_binary`,
3838
`to_vec` and `to_binary`. ([#2156])
39+
- cosmwasm-vm: The testing functions `cosmwasm_vm::testing::*` do not require
40+
the contract's message types to implement `schemars::JsonSchema` anymore. This
41+
makes the use of `schemars` optional for contracts. ([#2201])
3942

4043
## Fixed
4144

@@ -45,6 +48,7 @@ and this project adheres to
4548

4649
[#2155]: https://github.com/CosmWasm/cosmwasm/issues/2155
4750
[#2156]: https://github.com/CosmWasm/cosmwasm/issues/2156
51+
[#2201]: https://github.com/CosmWasm/cosmwasm/issues/2201
4852
[#2262]: https://github.com/CosmWasm/cosmwasm/issues/2262
4953
[#2268]: https://github.com/CosmWasm/cosmwasm/issues/2268
5054
[#2269]: https://github.com/CosmWasm/cosmwasm/issues/2269

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/std/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ pub use cosmwasm_core::{BLS12_381_G1_GENERATOR, BLS12_381_G2_GENERATOR};
205205
/// ```
206206
///
207207
/// where `InstantiateMsg`, `ExecuteMsg`, and `QueryMsg` are contract defined
208-
/// types that implement `DeserializeOwned + JsonSchema`.
208+
/// types that implement `DeserializeOwned`.
209209
///
210210
/// ## Set the version of the state of your contract
211211
///

packages/vm/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ derive_more = { version = "=1.0.0-beta.6", default-features = false, features =
5353
] }
5454
hex = "0.4"
5555
rand_core = { version = "0.6", features = ["getrandom"] }
56-
schemars = { workspace = true }
5756
serde = { workspace = true }
5857
serde_json = "1.0.40"
5958
sha2 = "0.10.3"

packages/vm/src/testing/calls.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! This file has some helpers for integration tests.
22
//! They should be imported via full path to ensure there is no confusion
33
//! use cosmwasm_vm::testing::X
4-
use schemars::JsonSchema;
54
use serde::{de::DeserializeOwned, Serialize};
65

76
use cosmwasm_std::{
@@ -40,7 +39,7 @@ where
4039
A: BackendApi + 'static,
4140
S: Storage + 'static,
4241
Q: Querier + 'static,
43-
M: Serialize + JsonSchema,
42+
M: Serialize,
4443
U: DeserializeOwned + CustomMsg,
4544
{
4645
let serialized_msg = to_vec(&msg).expect("Testing error: Could not serialize request message");
@@ -60,7 +59,7 @@ where
6059
A: BackendApi + 'static,
6160
S: Storage + 'static,
6261
Q: Querier + 'static,
63-
M: Serialize + JsonSchema,
62+
M: Serialize,
6463
U: DeserializeOwned + CustomMsg,
6564
{
6665
let serialized_msg = to_vec(&msg).expect("Testing error: Could not serialize request message");
@@ -79,7 +78,7 @@ where
7978
A: BackendApi + 'static,
8079
S: Storage + 'static,
8180
Q: Querier + 'static,
82-
M: Serialize + JsonSchema,
81+
M: Serialize,
8382
U: DeserializeOwned + CustomMsg,
8483
{
8584
let serialized_msg = to_vec(&msg).expect("Testing error: Could not serialize request message");
@@ -99,7 +98,7 @@ where
9998
A: BackendApi + 'static,
10099
S: Storage + 'static,
101100
Q: Querier + 'static,
102-
M: Serialize + JsonSchema,
101+
M: Serialize,
103102
U: DeserializeOwned + CustomMsg,
104103
{
105104
let serialized_msg = to_vec(&msg).expect("Testing error: Could not serialize request message");
@@ -118,7 +117,7 @@ where
118117
A: BackendApi + 'static,
119118
S: Storage + 'static,
120119
Q: Querier + 'static,
121-
M: Serialize + JsonSchema,
120+
M: Serialize,
122121
U: DeserializeOwned + CustomMsg,
123122
{
124123
let serialized_msg = to_vec(&msg).expect("Testing error: Could not serialize request message");
@@ -154,7 +153,7 @@ where
154153
A: BackendApi + 'static,
155154
S: Storage + 'static,
156155
Q: Querier + 'static,
157-
M: Serialize + JsonSchema,
156+
M: Serialize,
158157
{
159158
let serialized_msg = to_vec(&msg).expect("Testing error: Could not serialize request message");
160159
call_query(instance, &env, &serialized_msg).expect("VM error")

0 commit comments

Comments
 (0)