Skip to content

Commit

Permalink
fix: optimize stellar script
Browse files Browse the repository at this point in the history
  • Loading branch information
Itshyphen committed Sep 17, 2024
1 parent fe5b806 commit c49ce32
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions scripts/optimize-stellar.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
build_directory="target/wasm32-unknown-unknown/release"
artifacts_directory="artifacts/stellar"

mkdir -p "$artifacts_directory"

cd contracts/soroban
cargo clean
cargo build --target wasm32-unknown-unknown --release

for WASM in $build_directory/*.wasm; do
NAME=$(basename "$WASM" .wasm)${SUFFIX}.wasm
echo "Optimizing $NAME ... $WASM"
stellar contract optimize --wasm "$WASM"
done

cd -
for WASM in contracts/soroban/$build_directory/*.optimized.wasm; do
NAME=$(basename "$WASM" .wasm)${SUFFIX}.wasm

mv "$WASM" "$artifacts_directory/$NAME"
done



0 comments on commit c49ce32

Please sign in to comment.