Skip to content

Commit e30356c

Browse files
committed
build: remove optimizer build
1 parent 7a99591 commit e30356c

File tree

6 files changed

+35
-7
lines changed

6 files changed

+35
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ tarpaulin-report.*
2626

2727
packages/*/schema
2828
contracts/*/schema
29+
schema

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.sh

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
#! /bin/bash
22

3-
docker run --rm -v "$(pwd)":/code \
4-
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \
5-
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
6-
cosmwasm/optimizer:0.15.0
3+
set -e
4+
5+
BLACKLIST=""
6+
7+
rm -Rf artifacts
8+
mkdir artifacts
9+
cargo build --release --target wasm32-unknown-unknown
10+
11+
mv target/wasm32-unknown-unknown/release/*.wasm artifacts/
12+
rm -Rf target
13+
for i in $BLACKLIST; do
14+
rm -f artifacts/$i.wasm
15+
done
16+
17+
cd artifacts
18+
mkdir -p opt
19+
for i in *.wasm; do
20+
wasm-opt -Os --strip-debug $i -o opt/$i
21+
done

contracts/cw20-taxed/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ description = "Basic implementation of a CosmWasm-20 compliant token with blackl
77
license = "Apache-2.0"
88
repository = "https://fragwuerdig/cw20-taxed"
99

10+
[[bin]]
11+
name = "schema"
12+
path = "src/bin/schema.rs"
13+
required-features = ["schema-gen"]
14+
1015
[lib]
1116
crate-type = ["cdylib", "rlib"]
1217

1318
[features]
1419
backtraces = ["cosmwasm-std/backtraces"]
1520
# use library feature to disable all instantiate/execute/query exports
1621
library = []
22+
schema-gen = []
1723

1824
[dependencies]
1925
cosmwasm-schema = { version = "1.1.0" }

contracts/cw20-taxed/src/bin/schema.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use cosmwasm_schema::write_api;
22

3-
use cw20_base::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};
3+
use cw20_taxed::msg::{Cw20TaxedExecuteMsg as ExecuteMsg, InstantiateMsg, QueryMsg};
44

55
fn main() {
66
write_api! {

schema.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#! /bin/bash
2+
3+
set -e
4+
5+
cargo run --bin schema --features schema-gen
6+

0 commit comments

Comments
 (0)