forked from radixdlt/radixdlt-scrypto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate-assets.sh
executable file
·70 lines (60 loc) · 1.92 KB
/
update-assets.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
set -x
set -e
# We use a globally loaded scrypto CLI so that this script works even if the code doesn't compile at present
# It's also a little faster. If you wish to use the local version instead, swap out the below line.
# scrypto="cargo run --manifest-path $PWD/simulator/Cargo.toml --bin scrypto $@ --"
scrypto="scrypto"
cd "$(dirname "$0")/assets/blueprints"
echo "Building faucet..."
(cd faucet; $scrypto build)
npx [email protected] \
-Os -g \
--strip-debug --strip-dwarf --strip-producers \
-o ../faucet.wasm \
./target/wasm32-unknown-unknown/release/faucet.wasm
cp \
./target/wasm32-unknown-unknown/release/faucet.schema \
../faucet.schema
echo "Building radiswap..."
(cd radiswap; $scrypto build)
npx [email protected] \
-Os -g \
--strip-debug --strip-dwarf --strip-producers \
-o ../radiswap.wasm \
./target/wasm32-unknown-unknown/release/radiswap.wasm
cp \
./target/wasm32-unknown-unknown/release/radiswap.schema \
../radiswap.schema
echo "Building flash_loan..."
(cd flash_loan; $scrypto build)
npx [email protected] \
-Os -g \
--strip-debug --strip-dwarf --strip-producers \
-o ../flash_loan.wasm \
./target/wasm32-unknown-unknown/release/flash_loan.wasm
cp \
./target/wasm32-unknown-unknown/release/flash_loan.schema \
../flash_loan.schema
echo "Building genesis_helper..."
(cd genesis_helper; $scrypto build)
npx [email protected] \
-Os -g \
--strip-debug --strip-dwarf --strip-producers \
-o ../genesis_helper.wasm \
./target/wasm32-unknown-unknown/release/genesis_helper.wasm
cp \
./target/wasm32-unknown-unknown/release/genesis_helper.schema \
../genesis_helper.schema
echo "Done!"
echo "Building metadata..."
(cd metadata; $scrypto build)
npx [email protected] \
-Os -g \
--strip-debug --strip-dwarf --strip-producers \
-o ../metadata.wasm \
./target/wasm32-unknown-unknown/release/metadata.wasm
cp \
./target/wasm32-unknown-unknown/release/metadata.schema \
../metadata.schema
echo "Done!"