Skip to content

Commit e86d906

Browse files
committed
Add virus contract
1 parent d980067 commit e86d906

File tree

14 files changed

+2225
-0
lines changed

14 files changed

+2225
-0
lines changed

contracts/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Introducing the development contracts in the order they were created.
3636
9. **cyberpunk** is an attempt to cleanup hackatom and make writing runtime
3737
tests (cosmwasm-vm/wamsmvm) easier by avoid the need for the escrow setup
3838
that hackatom has.
39+
10. **virus** is a contract that reproduces itself and does nothing useful
40+
beyond that, showing how to use instantiate2 from a contract.
3941

4042
## Optimized builds
4143

@@ -92,6 +94,11 @@ docker run --rm -v "$(pwd)":/code \
9294
--mount type=volume,source="devcontract_cache_staking",target=/code/contracts/staking/target \
9395
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
9496
cosmwasm/rust-optimizer:0.12.9 ./contracts/staking
97+
98+
docker run --rm -v "$(pwd)":/code \
99+
--mount type=volume,source="devcontract_cache_virus",target=/code/contracts/virus/target \
100+
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
101+
cosmwasm/rust-optimizer:0.12.9 ./contracts/virus
95102
```
96103

97104
## Entry points
@@ -107,3 +114,4 @@ points in order to demonstrate and test the flexibility we have.
107114
| queue | yes | yes |
108115
| reflect | yes | no |
109116
| staking | yes | no |
117+
| virus | no | no |

contracts/virus/.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)