[examples/lang/erc20] Normalize build.sh file remove debug attribute from release builds

parent 7d135a6e
......@@ -25,5 +25,5 @@ test-env = [
[profile.release]
panic = "abort"
lto = true
debug = true
# debug = true
opt-level = "z"
......@@ -6,12 +6,14 @@
# under target/release/wasm32-unknown-unknown/ in the cwd.
PROJNAME=erc20
#cargo clean
#rm Cargo.lock
cargo clean
rm Cargo.lock
CARGO_INCREMENTAL=0 cargo +nightly build --release --target=wasm32-unknown-unknown --verbose
wasm2wat -o target/$PROJNAME.wat target/wasm32-unknown-unknown/release/$PROJNAME.wasm
cat target/$PROJNAME.wat | sed "s/(import \"env\" \"memory\" (memory (;0;) 2))/(import \"env\" \"memory\" (memory (;0;) 2 16))/" > target/$PROJNAME-fixed.wat
# wat2wasm -o target/$PROJNAME.wasm target/$PROJNAME-fixed.wat
# wasm-opt -Oz target/$PROJNAME.wasm -o target/$PROJNAME-opt.wasm
wat2wasm -o target/$PROJNAME.wasm target/$PROJNAME-fixed.wat
wasm-opt -Oz target/$PROJNAME.wasm -o target/$PROJNAME-opt.wasm
#wasm-build target enyzme --target-runtime=substrate --final=adder --save-raw=./target/enzyme-deployed.wasm --target wasm32-unknown-unknown
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment