-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate-claims.sh
executable file
·63 lines (51 loc) · 3.05 KB
/
generate-claims.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
#!/usr/bin/env bash
set -e -o pipefail
if [[ "$USE_NIX" == "true" ]]; then
POETRY_RUN=
else
POETRY_RUN="poetry -C kmxwasm run --"
poetry -C kmxwasm install
make build-kasmer
fi
# Adder
sc-meta all build --path deps/mx-sdk-rs/contracts/examples/adder --wasm-symbols --no-wasm-opt
sc-meta all build --path tests/contracts/foundrylike --wasm-symbols --no-wasm-opt
$POETRY_RUN kasmer -C tests/contracts/foundrylike build 2>&1 | tee kasmer.log
wasm2wat deps/mx-sdk-rs/contracts/examples/adder/output/adder.wasm \
-o tests/contracts/foundrylike/generated_claims/w-adder.wat
wasm2wat tests/contracts/foundrylike/output/foundrylike.wasm \
-o tests/contracts/foundrylike/generated_claims/w-foundrylike.wat
# Coindrip
for f in $(find deps/coindrip-protocol-sc/ -name 'Cargo.toml')
do
cat $f | sed 's/0.39.2/0.50.3/' | sed 's/0.47.4/0.50.3/' > tmp.rs
mv tmp.rs $f
done
sc-meta all build --path deps/coindrip-protocol-sc --wasm-symbols --no-wasm-opt
sc-meta all build --path tests/contracts/test_coindrip --wasm-symbols --no-wasm-opt
$POETRY_RUN kasmer -C tests/contracts/test_coindrip build 2>&1 | tee kasmer.log
wasm2wat deps/coindrip-protocol-sc/output/coindrip.wasm -o tests/contracts/test_coindrip/generated_claims/w-coindrip.wat
wasm2wat tests/contracts/test_coindrip/output/test_coindrip.wasm \
-o tests/contracts/test_coindrip/generated_claims/w-test_coindrip.wat
# Crowdfunding
sc-meta all build --path deps/mx-sdk-rs/contracts/examples/crowdfunding-esdt --wasm-symbols --no-wasm-opt
sc-meta all build --path tests/contracts/test_crowdfunding-esdt --wasm-symbols --no-wasm-opt
$POETRY_RUN kasmer -C tests/contracts/test_crowdfunding-esdt build 2>&1 | tee kasmer.log
wasm2wat deps/mx-sdk-rs/contracts/examples/crowdfunding-esdt/output/crowdfunding-esdt.wasm \
-o tests/contracts/test_crowdfunding-esdt/generated_claims/w-crowdfunding-esdt.wat
wasm2wat tests/contracts/test_crowdfunding-esdt/output/test_crowdfunding-esdt.wasm \
-o tests/contracts/test_crowdfunding-esdt/generated_claims/w-test_crowdfunding-esdt.wat
# Pair
sc-meta all build --path deps/mx-exchange-sc/dex/pair --wasm-symbols --no-wasm-opt
sc-meta all build --path tests/contracts/test_pair --wasm-symbols --no-wasm-opt
$POETRY_RUN kasmer -C tests/contracts/test_pair build 2>&1 | tee kasmer.log
wasm2wat deps/mx-exchange-sc/dex/pair/output/pair.wasm -o tests/contracts/test_pair/generated_claims/w-pair.wat
wasm2wat tests/contracts/test_pair/output/test_pair.wasm -o tests/contracts/test_pair/generated_claims/w-test_pair.wat
# Multisig
sc-meta all build --path deps/mx-sdk-rs/contracts/examples/multisig --wasm-symbols --no-wasm-opt
sc-meta all build --path tests/contracts/test_multisig --wasm-symbols --no-wasm-opt
$POETRY_RUN kasmer -C tests/contracts/test_multisig build 2>&1 | tee kasmer.log
wasm2wat deps/mx-sdk-rs/contracts/examples/multisig/output/multisig.wasm \
-o tests/contracts/test_multisig/generated_claims/w-multisig.wat
wasm2wat tests/contracts/test_multisig/output/test_multisig.wasm \
-o tests/contracts/test_multisig/generated_claims/w-test_multisig.wat