Skip to content

Commit 35c5470

Browse files
authored
Merge pull request #1974 from CosmWasm/capability2.0
Add 2.0 capability
2 parents 4c673f4 + 8f99b9f commit 35c5470

File tree

16 files changed

+40
-178
lines changed

16 files changed

+40
-178
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,15 +356,15 @@ jobs:
356356
- run:
357357
name: Build library for native target (all features)
358358
working_directory: ~/project/packages/std
359-
command: cargo build --locked --features abort,iterator,staking,stargate,cosmwasm_1_4
359+
command: cargo build --locked --features abort,iterator,staking,stargate,cosmwasm_2_0
360360
- run:
361361
name: Build library for wasm target (all features)
362362
working_directory: ~/project/packages/std
363-
command: cargo wasm --locked --features abort,iterator,staking,stargate,cosmwasm_1_4
363+
command: cargo wasm --locked --features abort,iterator,staking,stargate,cosmwasm_2_0
364364
- run:
365365
name: Run unit tests (all features)
366366
working_directory: ~/project/packages/std
367-
command: cargo test --locked --features abort,iterator,staking,stargate,cosmwasm_1_4
367+
command: cargo test --locked --features abort,iterator,staking,stargate,cosmwasm_2_0
368368
- save_cache:
369369
paths:
370370
- /usr/local/cargo/registry
@@ -903,7 +903,7 @@ jobs:
903903
- run:
904904
name: Clippy linting on std (all feature flags)
905905
working_directory: ~/project/packages/std
906-
command: cargo clippy --all-targets --features abort,iterator,staking,stargate,cosmwasm_1_4 -- -D warnings
906+
command: cargo clippy --all-targets --features abort,iterator,staking,stargate,cosmwasm_2_0 -- -D warnings
907907
- run:
908908
name: Clippy linting on vm (no feature flags)
909909
working_directory: ~/project/packages/vm

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"abort",
44
"stargate",
55
"staking",
6-
"cosmwasm_1_4"
6+
"cosmwasm_2_0"
77
]
88
}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ and this project adheres to
1313
- cosmwasm-std: Add `Reply::gas_used`. ([#1954])
1414
- cosmwasm-std: Add `SubMsgResponse::msg_responses` and deprecate
1515
`SubMsgResponse::data`. ([#1903])
16+
- cosmwasm-std: Add `cosmwasm_2_0` feature to enable 2.0 specific functionality.
17+
([#1974])
1618

1719
[#1878]: https://github.com/CosmWasm/cosmwasm/pull/1878
1820
[#1903]: https://github.com/CosmWasm/cosmwasm/pull/1903
1921
[#1929]: https://github.com/CosmWasm/cosmwasm/pull/1929
2022
[#1954]: https://github.com/CosmWasm/cosmwasm/pull/1954
23+
[#1974]: https://github.com/CosmWasm/cosmwasm/pull/1974
2124

2225
### Changed
2326

MIGRATING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ major releases of `cosmwasm`. Note that you can also view the
3535
+cosmwasm-std = { version = "2.0.0", default-features = false, features = ["std", ...] }
3636
```
3737

38+
- If you want to use a feature that is only available on CosmWasm 2.0+ chains,
39+
use this feature:
40+
41+
```diff
42+
-cosmwasm-std = { version = "1.4.0", features = ["stargate"] }
43+
+cosmwasm-std = { version = "1.4.0", features = ["stargate", "cosmwasm_2_0"] }
44+
```
45+
46+
Please note that `cosmwasm_2_0` implies `cosmwasm_1_4`, `cosmwasm_1_3` and so
47+
on, so there is no need to set multiple.
48+
3849
- `ContractInfoResponse::new` now takes all fields of the response as
3950
parameters:
4051

contracts/ibc-reflect-send/schema/ibc-reflect-send.json

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -114,22 +114,6 @@
114114
}
115115
],
116116
"definitions": {
117-
"AnyMsg": {
118-
"description": "A message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)",
119-
"type": "object",
120-
"required": [
121-
"type_url",
122-
"value"
123-
],
124-
"properties": {
125-
"type_url": {
126-
"type": "string"
127-
},
128-
"value": {
129-
"$ref": "#/definitions/Binary"
130-
}
131-
}
132-
},
133117
"BankMsg": {
134118
"description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto",
135119
"oneOf": [
@@ -256,18 +240,6 @@
256240
},
257241
"additionalProperties": false
258242
},
259-
{
260-
"type": "object",
261-
"required": [
262-
"any"
263-
],
264-
"properties": {
265-
"any": {
266-
"$ref": "#/definitions/AnyMsg"
267-
}
268-
},
269-
"additionalProperties": false
270-
},
271243
{
272244
"type": "object",
273245
"required": [

contracts/ibc-reflect-send/schema/ibc/packet_msg.json

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,6 @@
5252
}
5353
],
5454
"definitions": {
55-
"AnyMsg": {
56-
"description": "A message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)",
57-
"type": "object",
58-
"required": [
59-
"type_url",
60-
"value"
61-
],
62-
"properties": {
63-
"type_url": {
64-
"type": "string"
65-
},
66-
"value": {
67-
"$ref": "#/definitions/Binary"
68-
}
69-
}
70-
},
7155
"BankMsg": {
7256
"description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto",
7357
"oneOf": [
@@ -194,18 +178,6 @@
194178
},
195179
"additionalProperties": false
196180
},
197-
{
198-
"type": "object",
199-
"required": [
200-
"any"
201-
],
202-
"properties": {
203-
"any": {
204-
"$ref": "#/definitions/AnyMsg"
205-
}
206-
},
207-
"additionalProperties": false
208-
},
209181
{
210182
"type": "object",
211183
"required": [

contracts/ibc-reflect-send/schema/raw/execute.json

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -103,22 +103,6 @@
103103
}
104104
],
105105
"definitions": {
106-
"AnyMsg": {
107-
"description": "A message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)",
108-
"type": "object",
109-
"required": [
110-
"type_url",
111-
"value"
112-
],
113-
"properties": {
114-
"type_url": {
115-
"type": "string"
116-
},
117-
"value": {
118-
"$ref": "#/definitions/Binary"
119-
}
120-
}
121-
},
122106
"BankMsg": {
123107
"description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto",
124108
"oneOf": [
@@ -245,18 +229,6 @@
245229
},
246230
"additionalProperties": false
247231
},
248-
{
249-
"type": "object",
250-
"required": [
251-
"any"
252-
],
253-
"properties": {
254-
"any": {
255-
"$ref": "#/definitions/AnyMsg"
256-
}
257-
},
258-
"additionalProperties": false
259-
},
260232
{
261233
"type": "object",
262234
"required": [

contracts/ibc-reflect/schema/ibc/packet_msg.json

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -112,22 +112,6 @@
112112
}
113113
],
114114
"definitions": {
115-
"AnyMsg": {
116-
"description": "A message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)",
117-
"type": "object",
118-
"required": [
119-
"type_url",
120-
"value"
121-
],
122-
"properties": {
123-
"type_url": {
124-
"type": "string"
125-
},
126-
"value": {
127-
"$ref": "#/definitions/Binary"
128-
}
129-
}
130-
},
131115
"BankMsg": {
132116
"description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto",
133117
"oneOf": [
@@ -230,18 +214,6 @@
230214
},
231215
"additionalProperties": false
232216
},
233-
{
234-
"type": "object",
235-
"required": [
236-
"any"
237-
],
238-
"properties": {
239-
"any": {
240-
"$ref": "#/definitions/AnyMsg"
241-
}
242-
},
243-
"additionalProperties": false
244-
},
245217
{
246218
"type": "object",
247219
"required": [

contracts/reflect/schema/raw/execute.json

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,6 @@
7373
}
7474
],
7575
"definitions": {
76-
"AnyMsg": {
77-
"description": "A message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)",
78-
"type": "object",
79-
"required": [
80-
"type_url",
81-
"value"
82-
],
83-
"properties": {
84-
"type_url": {
85-
"type": "string"
86-
},
87-
"value": {
88-
"$ref": "#/definitions/Binary"
89-
}
90-
}
91-
},
9276
"BankMsg": {
9377
"description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto",
9478
"oneOf": [
@@ -215,18 +199,6 @@
215199
},
216200
"additionalProperties": false
217201
},
218-
{
219-
"type": "object",
220-
"required": [
221-
"any"
222-
],
223-
"properties": {
224-
"any": {
225-
"$ref": "#/definitions/AnyMsg"
226-
}
227-
},
228-
"additionalProperties": false
229-
},
230202
{
231203
"type": "object",
232204
"required": [

contracts/reflect/schema/reflect.json

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,6 @@
8383
}
8484
],
8585
"definitions": {
86-
"AnyMsg": {
87-
"description": "A message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)",
88-
"type": "object",
89-
"required": [
90-
"type_url",
91-
"value"
92-
],
93-
"properties": {
94-
"type_url": {
95-
"type": "string"
96-
},
97-
"value": {
98-
"$ref": "#/definitions/Binary"
99-
}
100-
}
101-
},
10286
"BankMsg": {
10387
"description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto",
10488
"oneOf": [
@@ -225,18 +209,6 @@
225209
},
226210
"additionalProperties": false
227211
},
228-
{
229-
"type": "object",
230-
"required": [
231-
"any"
232-
],
233-
"properties": {
234-
"any": {
235-
"$ref": "#/definitions/AnyMsg"
236-
}
237-
},
238-
"additionalProperties": false
239-
},
240212
{
241213
"type": "object",
242214
"required": [

0 commit comments

Comments
 (0)