Skip to content

Commit ac9a1e2

Browse files
authored
Merge pull request #851 from CosmWasm/reenable-field_reassign_with_default
Re-enable field_reassign_with_default
2 parents e02f03d + 3eb79ac commit ac9a1e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+483
-262
lines changed

Cargo.lock

+11-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MIGRATING.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ major releases of `cosmwasm`. Note that you can also view the
99
- The minimum Rust supported version for 0.14 is 1.50.0. Verify your Rust
1010
version is >= 1.50.0 with: `rustc --version`
1111

12-
- Update CosmWasm dependencies in Cargo.toml (skip the ones you don't use):
12+
- Update CosmWasm and schemars dependencies in Cargo.toml (skip the ones you
13+
don't use):
1314

1415
```
1516
[dependencies]
1617
cosmwasm-std = "0.14.0"
1718
cosmwasm-storage = "0.14.0"
19+
schemars = "0.8.1"
1820
# ...
1921
2022
[dev-dependencies]

contracts/burner/Cargo.lock

+11-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/burner/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"]
3232

3333
[dependencies]
3434
cosmwasm-std = { path = "../../packages/std", features = ["iterator"] }
35-
schemars = "0.7"
35+
schemars = "0.8.1"
3636
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3737

3838
[dev-dependencies]

contracts/burner/src/msg.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(clippy::field_reassign_with_default)] // see https://github.com/CosmWasm/cosmwasm/issues/685
2-
31
use schemars::JsonSchema;
42
use serde::{Deserialize, Serialize};
53

contracts/crypto-verify/Cargo.lock

+11-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/crypto-verify/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ cosmwasm-std = { path = "../../packages/std", features = ["iterator"] }
3636
cosmwasm-storage = { path = "../../packages/storage", features = ["iterator"] }
3737
hex = "0.4"
3838
rlp = "0.5"
39-
schemars = "0.7"
39+
schemars = "0.8.1"
4040
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
4141
sha2 = "0.9"
4242
sha3 = "0.9"

contracts/crypto-verify/schema/query_msg.json

+12-6
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
}
4444
}
4545
}
46-
}
46+
},
47+
"additionalProperties": false
4748
},
4849
{
4950
"description": "Ethereum text verification (compatible to the eth_sign RPC/web3 enpoint). This cannot be used to verify transaction.\n\nSee https://web3js.readthedocs.io/en/v1.2.0/web3-eth.html#sign",
@@ -78,7 +79,8 @@
7879
}
7980
}
8081
}
81-
}
82+
},
83+
"additionalProperties": false
8284
},
8385
{
8486
"type": "object",
@@ -145,7 +147,8 @@
145147
}
146148
}
147149
}
148-
}
150+
},
151+
"additionalProperties": false
149152
},
150153
{
151154
"description": "Tendermint format (ed25519 verification scheme).",
@@ -188,7 +191,8 @@
188191
}
189192
}
190193
}
191-
}
194+
},
195+
"additionalProperties": false
192196
},
193197
{
194198
"description": "Tendermint format (batch ed25519 verification scheme).",
@@ -228,7 +232,8 @@
228232
}
229233
}
230234
}
231-
}
235+
},
236+
"additionalProperties": false
232237
},
233238
{
234239
"description": "Returns a list of supported verification schemes. No pagination - this is a short list.",
@@ -240,7 +245,8 @@
240245
"list_verification_schemes": {
241246
"type": "object"
242247
}
243-
}
248+
},
249+
"additionalProperties": false
244250
}
245251
],
246252
"definitions": {

contracts/crypto-verify/src/msg.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(clippy::field_reassign_with_default)] // see https://github.com/CosmWasm/cosmwasm/issues/685
2-
31
use cosmwasm_std::{Binary, Deps, Uint128};
42
use schemars::JsonSchema;
53
use serde::{Deserialize, Serialize};

contracts/hackatom/Cargo.lock

+11-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/hackatom/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"]
3131

3232
[dependencies]
3333
cosmwasm-std = { path = "../../packages/std" }
34-
schemars = "0.7"
34+
schemars = "0.8.1"
3535
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3636
sha2 = "0.9.1"
3737
thiserror = "1.0"

contracts/hackatom/schema/execute_msg.json

+14-7
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"release": {
1313
"type": "object"
1414
}
15-
}
15+
},
16+
"additionalProperties": false
1617
},
1718
{
1819
"description": "Infinite loop to burn cpu cycles (only run when metering is enabled)",
@@ -24,7 +25,8 @@
2425
"cpu_loop": {
2526
"type": "object"
2627
}
27-
}
28+
},
29+
"additionalProperties": false
2830
},
2931
{
3032
"description": "Infinite loop making storage calls (to test when their limit hits)",
@@ -36,7 +38,8 @@
3638
"storage_loop": {
3739
"type": "object"
3840
}
39-
}
41+
},
42+
"additionalProperties": false
4043
},
4144
{
4245
"description": "Infinite loop reading and writing memory",
@@ -48,7 +51,8 @@
4851
"memory_loop": {
4952
"type": "object"
5053
}
51-
}
54+
},
55+
"additionalProperties": false
5256
},
5357
{
5458
"description": "Allocate large amounts of memory without consuming much gas",
@@ -70,7 +74,8 @@
7074
}
7175
}
7276
}
73-
}
77+
},
78+
"additionalProperties": false
7479
},
7580
{
7681
"description": "Trigger a panic to ensure framework handles gracefully",
@@ -82,7 +87,8 @@
8287
"panic": {
8388
"type": "object"
8489
}
85-
}
90+
},
91+
"additionalProperties": false
8692
},
8793
{
8894
"description": "Starting with CosmWasm 0.10, some API calls return user errors back to the contract. This triggers such user errors, ensuring the transaction does not fail in the backend.",
@@ -94,7 +100,8 @@
94100
"user_errors_in_api_calls": {
95101
"type": "object"
96102
}
97-
}
103+
},
104+
"additionalProperties": false
98105
}
99106
]
100107
}

contracts/hackatom/schema/query_msg.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"verifier": {
1313
"type": "object"
1414
}
15-
}
15+
},
16+
"additionalProperties": false
1617
},
1718
{
1819
"description": "This returns cosmwasm_std::AllBalanceResponse to demo use of the querier",
@@ -32,7 +33,8 @@
3233
}
3334
}
3435
}
35-
}
36+
},
37+
"additionalProperties": false
3638
},
3739
{
3840
"description": "Recurse will execute a query into itself up to depth-times and return Each step of the recursion may perform some extra work to test gas metering (`work` rounds of sha256 on contract). Now that we have Env, we can auto-calculate the address to recurse into",
@@ -60,7 +62,8 @@
6062
}
6163
}
6264
}
63-
}
65+
},
66+
"additionalProperties": false
6467
}
6568
],
6669
"definitions": {

contracts/hackatom/schema/sudo_msg.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
}
2828
}
2929
}
30-
}
30+
},
31+
"additionalProperties": false
3132
}
3233
],
3334
"definitions": {

contracts/hackatom/src/contract.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(clippy::field_reassign_with_default)] // see https://github.com/CosmWasm/cosmwasm/issues/685
2-
31
use schemars::JsonSchema;
42
use serde::{Deserialize, Serialize};
53
use sha2::{Digest, Sha256};

0 commit comments

Comments
 (0)