Skip to content

Commit

Permalink
Merge pull request #71 from CosmWasm/update-contracts-readme
Browse files Browse the repository at this point in the history
Update contracts README (workspace-optimizer)
  • Loading branch information
ethanfrey authored Aug 30, 2020
2 parents 8c89402 + ebb440b commit 84d9ba6
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
7 changes: 4 additions & 3 deletions contracts/cw1-subkeys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,13 @@ sha256sum cw1_subkeys.wasm
```

Or for a production-ready (compressed) build, run the following from the
repository root (not currently working with this monorepo...)
repository root:

```
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="cosmwasm_plus_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.9.0 ./contracts/cw1-subkeys
mv contract.wasm cw1_subkeys.wasm
cosmwasm/workspace-optimizer:0.10.2
```

The optimized contracts are generated in the `artifacts/` directory.
7 changes: 4 additions & 3 deletions contracts/cw1-whitelist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ sha256sum cw1_whitelist.wasm
```

Or for a production-ready (compressed) build, run the following from the
repository root (not currently working with this monorepo...)
repository root:

```
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="cosmwasm_plus_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.9.0 ./contracts/cw1-base
mv contract.wasm cw1_whitelist.wasm
cosmwasm/workspace-optimizer:0.10.2
```

The optimized contracts are generated in the `artifacts/` directory.
7 changes: 4 additions & 3 deletions contracts/cw20-atomic-swap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ sha256sum cw20_atomic_swap.wasm
```

Or for a production-ready (compressed) build, run the following from the
repository root (not currently working with this monorepo...)
repository root:

```
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="cosmwasm_plus_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.9.0 ./contracts/cw20-atomic-swap
mv contract.wasm cw20_atomic_swap.wasm
cosmwasm/workspace-optimizer:0.10.2
```

The optimized contracts are generated in the `artifacts/` directory.
7 changes: 4 additions & 3 deletions contracts/cw20-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@ sha256sum cw20_base.wasm
```

Or for a production-ready (compressed) build, run the following from the
repository root (not currently working with this monorepo...)
repository root:

```
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="cosmwasm_plus_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.9.0 ./contracts/cw20-base
mv contract.wasm cw20_base.wasm
cosmwasm/workspace-optimizer:0.10.2
```

The optimized contracts are generated in the `artifacts/` directory.

## Importing this contract

You can also import much of the logic of this contract to build another
Expand Down
7 changes: 4 additions & 3 deletions contracts/cw20-escrow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ sha256sum cw20_escrow.wasm
```

Or for a production-ready (compressed) build, run the following from the
repository root (not currently working with this monorepo...)
repository root:

```
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="cosmwasm_plus_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.9.0 ./contracts/cw20-escrow
mv contract.wasm cw20_escrow.wasm
cosmwasm/workspace-optimizer:0.10.2
```

The optimized contracts are generated in the `artifacts/` directory.

0 comments on commit 84d9ba6

Please sign in to comment.