Skip to content

Commit 88762e8

Browse files
authored
Merge pull request #1933 from CosmWasm/1927-make-instantiate-optional
Make instantiate optional
2 parents cf25c49 + 374b2ea commit 88762e8

File tree

18 files changed

+2220
-42
lines changed

18 files changed

+2220
-42
lines changed

.circleci/config.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ workflows:
5757
- contract_burner
5858
- contract_crypto_verify
5959
- contract_cyberpunk
60+
- contract_empty
61+
# - contract_floaty # This contract needs nightly Rust to compile
6062
- contract_hackatom
6163
- contract_ibc_reflect
6264
- contract_ibc_reflect_send
63-
# - contract_floaty # This contract needs nightly Rust to compile
6465
- contract_queue
6566
- contract_reflect
6667
- contract_staking
@@ -754,6 +755,33 @@ jobs:
754755
- target/wasm32-unknown-unknown/release/deps
755756
key: cargocache-v2-contract_virus-rust:1.70.0-{{ checksum "Cargo.lock" }}
756757

758+
contract_empty:
759+
docker:
760+
- image: rust:1.70.0
761+
environment:
762+
RUST_BACKTRACE: 1
763+
working_directory: ~/cosmwasm/contracts/empty
764+
steps:
765+
- checkout:
766+
path: ~/cosmwasm
767+
- run:
768+
name: Version information
769+
command: rustc --version; cargo --version; rustup --version
770+
- restore_cache:
771+
keys:
772+
- cargocache-v2-contract_empty-rust:1.70.0-{{ checksum "Cargo.lock" }}
773+
- check_contract
774+
- save_cache:
775+
paths:
776+
- /usr/local/cargo/registry
777+
- target/debug/.fingerprint
778+
- target/debug/build
779+
- target/debug/deps
780+
- target/wasm32-unknown-unknown/release/.fingerprint
781+
- target/wasm32-unknown-unknown/release/build
782+
- target/wasm32-unknown-unknown/release/deps
783+
key: cargocache-v2-contract_empty-rust:1.70.0-{{ checksum "Cargo.lock" }}
784+
757785
fmt:
758786
docker:
759787
- image: rust:1.70.0

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ and this project adheres to
4646
`Addr` type for `ContractInfoResponse::{creator, admin}`. ([#1883])
4747
- cosmwasm-std: Change `DistributionQuerier::new` to take `IntoIterator` instead
4848
of `HashMap`. ([#1941])
49+
- cosmwasm-vm: Make `instantiate` entrypoint optional. ([#1933])
4950

5051
[#1874]: https://github.com/CosmWasm/cosmwasm/pull/1874
5152
[#1876]: https://github.com/CosmWasm/cosmwasm/pull/1876
@@ -54,6 +55,7 @@ and this project adheres to
5455
[#1884]: https://github.com/CosmWasm/cosmwasm/pull/1884
5556
[#1898]: https://github.com/CosmWasm/cosmwasm/pull/1898
5657
[#1902]: https://github.com/CosmWasm/cosmwasm/pull/1902
58+
[#1933]: https://github.com/CosmWasm/cosmwasm/pull/1933
5759
[#1939]: https://github.com/CosmWasm/cosmwasm/pull/1939
5860
[#1940]: https://github.com/CosmWasm/cosmwasm/pull/1940
5961
[#1941]: https://github.com/CosmWasm/cosmwasm/pull/1941

contracts/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Introducing the development contracts in the order they were created.
3838
that hackatom has.
3939
10. **virus** is a contract that reproduces itself and does nothing useful
4040
beyond that, showing how to use instantiate2 from a contract.
41+
11. **empty** is an empty contract that does nothing. It is used to test that we
42+
can store contracts with no entry points.
4143

4244
## Optimized builds
4345

@@ -99,6 +101,11 @@ docker run --rm -v "$(pwd)":/code \
99101
--mount type=volume,source="devcontract_cache_virus",target=/code/contracts/virus/target \
100102
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
101103
cosmwasm/rust-optimizer:0.12.13 ./contracts/virus
104+
105+
docker run --rm -v "$(pwd)":/code \
106+
--mount type=volume,source="devcontract_cache_empty",target=/code/contracts/empty/target \
107+
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
108+
cosmwasm/rust-optimizer:0.12.13 ./contracts/empty
102109
```
103110

104111
## Entry points

contracts/empty/.cargo/config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[alias]
2+
wasm = "build --release --lib --target wasm32-unknown-unknown"
3+
wasm-debug = "build --lib --target wasm32-unknown-unknown"
4+
unit-test = "test --lib"
5+
integration-test = "test --test integration"
6+
schema = "run --bin schema"

0 commit comments

Comments
 (0)