Skip to content

Commit 6390958

Browse files
authored
Merge pull request #1523 from CosmWasm/Instantiate2
Add WasmMsg::Instantiate2
2 parents 1558877 + 36146e7 commit 6390958

File tree

17 files changed

+48
-20
lines changed

17 files changed

+48
-20
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,15 +358,15 @@ jobs:
358358
- run:
359359
name: Build library for native target (all features)
360360
working_directory: ~/project/packages/std
361-
command: cargo build --locked --features abort,iterator,staking,stargate,cosmwasm_1_1
361+
command: cargo build --locked --features abort,iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2
362362
- run:
363363
name: Build library for wasm target (all features)
364364
working_directory: ~/project/packages/std
365-
command: cargo wasm --locked --features abort,iterator,staking,stargate,cosmwasm_1_1
365+
command: cargo wasm --locked --features abort,iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2
366366
- run:
367367
name: Run unit tests (all features)
368368
working_directory: ~/project/packages/std
369-
command: cargo test --locked --features abort,iterator,staking,stargate,cosmwasm_1_1
369+
command: cargo test --locked --features abort,iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2
370370
- save_cache:
371371
paths:
372372
- /usr/local/cargo/registry
@@ -882,7 +882,7 @@ jobs:
882882
- run:
883883
name: Clippy linting on std (all feature flags)
884884
working_directory: ~/project/packages/std
885-
command: cargo clippy --all-targets --features abort,iterator,staking,stargate -- -D warnings
885+
command: cargo clippy --all-targets --features abort,iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2 -- -D warnings
886886
- run:
887887
name: Clippy linting on storage (no feature flags)
888888
working_directory: ~/project/packages/storage

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ and this project adheres to
1414
of CosmWasm earlier than 1.2.0 ([#1481]).
1515
- cosmwasm-std: Add `instantiate2_address` which allows calculating the
1616
predictable addresses for `MsgInstantiateContract2` ([#1437]).
17+
- cosmwasm-std: Add `WasmMsg::Instantiate2` (requires `cosmwasm_1_2`, see
18+
`GovMsg::VoteWeighted` above) to instantiate contracts at a predictable
19+
address ([#1436]).
1720
- cosmwasm-schema: In contracts, `cosmwasm schema` will now output a separate
1821
JSON Schema file for each entrypoint in the `raw` subdirectory ([#1478],
1922
[#1533]).
2023
- cosmwasm-std: Upgrade `serde-json-wasm` dependency to 0.5.0 which adds map
2124
support to `to_vec`/`to_binary` and friends.
2225
- cosmwasm-std: Implement `AsRef<[u8]>` for `Binary` and `HexBinary` ([#1550]).
2326

27+
[#1436]: https://github.com/CosmWasm/cosmwasm/issues/1436
2428
[#1437]: https://github.com/CosmWasm/cosmwasm/issues/1437
2529
[#1481]: https://github.com/CosmWasm/cosmwasm/pull/1481
2630
[#1478]: https://github.com/CosmWasm/cosmwasm/pull/1478

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@
690690
"additionalProperties": false
691691
},
692692
{
693-
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L47-L61). `sender` is automatically filled with the current contract's address.",
693+
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.",
694694
"type": "object",
695695
"required": [
696696
"instantiate"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@
628628
"additionalProperties": false
629629
},
630630
{
631-
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L47-L61). `sender` is automatically filled with the current contract's address.",
631+
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.",
632632
"type": "object",
633633
"required": [
634634
"instantiate"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@
679679
"additionalProperties": false
680680
},
681681
{
682-
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L47-L61). `sender` is automatically filled with the current contract's address.",
682+
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.",
683683
"type": "object",
684684
"required": [
685685
"instantiate"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@
679679
"additionalProperties": false
680680
},
681681
{
682-
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L47-L61). `sender` is automatically filled with the current contract's address.",
682+
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.",
683683
"type": "object",
684684
"required": [
685685
"instantiate"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@
679679
"additionalProperties": false
680680
},
681681
{
682-
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L47-L61). `sender` is automatically filled with the current contract's address.",
682+
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.",
683683
"type": "object",
684684
"required": [
685685
"instantiate"

contracts/ibc-reflect/schema/packet_msg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@
473473
"additionalProperties": false
474474
},
475475
{
476-
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L47-L61). `sender` is automatically filled with the current contract's address.",
476+
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.",
477477
"type": "object",
478478
"required": [
479479
"instantiate"

contracts/reflect/schema/raw/execute.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@
716716
"additionalProperties": false
717717
},
718718
{
719-
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L47-L61). `sender` is automatically filled with the current contract's address.",
719+
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.",
720720
"type": "object",
721721
"required": [
722722
"instantiate"

contracts/reflect/schema/raw/migrate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@
716716
"additionalProperties": false
717717
},
718718
{
719-
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.16.0-alpha1/x/wasm/internal/types/tx.proto#L47-L61). `sender` is automatically filled with the current contract's address.",
719+
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.",
720720
"type": "object",
721721
"required": [
722722
"instantiate"

0 commit comments

Comments
 (0)