forked from blend-capital/blend-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (47 loc) · 2.67 KB
/
Makefile
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
default: build
test: build
cargo test --all --tests
build:
cargo build -p blend-contract-sdk
cargo rustc --manifest-path=emitter/Cargo.toml --crate-type=cdylib --target=wasm32-unknown-unknown --release
cargo rustc --manifest-path=pool-factory/Cargo.toml --crate-type=cdylib --target=wasm32-unknown-unknown --release
cargo rustc --manifest-path=backstop/Cargo.toml --crate-type=cdylib --target=wasm32-unknown-unknown --release
cargo rustc --manifest-path=pool/Cargo.toml --crate-type=cdylib --target=wasm32-unknown-unknown --release
mkdir -p target/wasm32-unknown-unknown/optimized
soroban contract optimize \
--wasm target/wasm32-unknown-unknown/release/emitter.wasm \
--wasm-out target/wasm32-unknown-unknown/optimized/emitter.wasm
soroban contract optimize \
--wasm target/wasm32-unknown-unknown/release/pool_factory.wasm \
--wasm-out target/wasm32-unknown-unknown/optimized/pool_factory.wasm
soroban contract optimize \
--wasm target/wasm32-unknown-unknown/release/backstop.wasm \
--wasm-out target/wasm32-unknown-unknown/optimized/backstop.wasm
soroban contract optimize \
--wasm target/wasm32-unknown-unknown/release/pool.wasm \
--wasm-out target/wasm32-unknown-unknown/optimized/pool.wasm
cd target/wasm32-unknown-unknown/optimized/ && \
for i in *.wasm ; do \
ls -l "$$i"; \
done
fmt:
cargo fmt --all
clean:
cargo clean
generate-js:
soroban contract bindings typescript --overwrite \
--contract-id CBWH54OKUK6U2J2A4J2REJEYB625NEFCHISWXLOPR2D2D6FTN63TJTWN \
--wasm ./target/wasm32-unknown-unknown/optimized/backstop.wasm --output-dir ./js/js-backstop/ \
--rpc-url http://localhost:8000 --network-passphrase "Standalone Network ; February 2017" --network Standalone
soroban contract bindings typescript --overwrite \
--contract-id CBWH54OKUK6U2J2A4J2REJEYB625NEFCHISWXLOPR2D2D6FTN63TJTWN \
--wasm ./target/wasm32-unknown-unknown/optimized/emitter.wasm --output-dir ./js/js-emitter/ \
--rpc-url http://localhost:8000 --network-passphrase "Standalone Network ; February 2017" --network Standalone
soroban contract bindings typescript --overwrite \
--contract-id CBWH54OKUK6U2J2A4J2REJEYB625NEFCHISWXLOPR2D2D6FTN63TJTWN \
--wasm ./target/wasm32-unknown-unknown/optimized/pool_factory.wasm --output-dir ./js/js-pool-factory/ \
--rpc-url http://localhost:8000 --network-passphrase "Standalone Network ; February 2017" --network Standalone
soroban contract bindings typescript --overwrite \
--contract-id CBWH54OKUK6U2J2A4J2REJEYB625NEFCHISWXLOPR2D2D6FTN63TJTWN \
--wasm ./target/wasm32-unknown-unknown/optimized/pool.wasm --output-dir ./js/js-pool/ \
--rpc-url http://localhost:8000 --network-passphrase "Standalone Network ; February 2017" --network Standalone