forked from multiversx/mx-chain-vm-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
114 lines (94 loc) · 4.32 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
.PHONY: test test-short build arwen arwendebug clean
ARWEN_VERSION := $(shell git describe --tags --long --dirty --always)
clean:
go clean -cache -testcache
build:
go build ./...
arwen:
go build -ldflags="-X main.appVersion=$(ARWEN_VERSION)" -o ./cmd/arwen/arwen ./cmd/arwen
cp ./cmd/arwen/arwen ./ipc/tests
cp ./cmd/arwen/arwen ${ARWEN_PATH}
arwendebug:
ifndef ARWENDEBUG_PATH
$(error ARWENDEBUG_PATH is undefined)
endif
go build -o ./cmd/arwendebug/arwendebug ./cmd/arwendebug
cp ./cmd/arwendebug/arwendebug ${ARWENDEBUG_PATH}
test: clean arwen
go test -count=1 ./...
test-short: arwen
go test -short -count=1 ./...
build-test-contracts:
erdpy contract build ./test/contracts/erc20
erdpy contract build ./test/contracts/counter
erdpy contract build ./test/contracts/init-correct
erdpy contract build ./test/contracts/init-simple
erdpy contract build ./test/contracts/init-wrong
erdpy contract build ./test/contracts/misc
erdpy contract build ./test/contracts/signatures
erdpy contract build ./test/contracts/elrondei
erdpy contract build ./test/contracts/breakpoint
erdpy contract build --no-optimization ./test/contracts/num-with-fp
erdpy contract build ./test/contracts/exec-same-ctx-simple-parent
erdpy contract build ./test/contracts/exec-same-ctx-simple-child
erdpy contract build ./test/contracts/exec-same-ctx-child
erdpy contract build ./test/contracts/exec-same-ctx-parent
erdpy contract build ./test/contracts/exec-dest-ctx-parent
erdpy contract build ./test/contracts/exec-dest-ctx-child
erdpy contract build ./test/contracts/exec-same-ctx-recursive
erdpy contract build ./test/contracts/exec-same-ctx-recursive-parent
erdpy contract build ./test/contracts/exec-same-ctx-recursive-child
erdpy contract build ./test/contracts/exec-dest-ctx-recursive
erdpy contract build ./test/contracts/exec-dest-ctx-recursive-parent
erdpy contract build ./test/contracts/exec-dest-ctx-recursive-child
erdpy contract build ./test/contracts/async-call-parent
erdpy contract build ./test/contracts/async-call-child
erdpy contract build ./test/contracts/exec-same-ctx-builtin
erdpy contract build ./test/contracts/deployer
erdpy contract build ./test/contracts/exchange
erdpy contract build ./test/contracts/promises
erdpy contract build ./test/contracts/promises-train
erdpy contract build ./test/contracts/promises-tracking
erdpy contract build ./test/contracts/timelocks
erdpy contract build ./test/contracts/async-call-builtin
build-delegation:
ifndef SANDBOX
$(error SANDBOX variable is undefined)
endif
rm -rf ${SANDBOX}/sc-delegation-rs
git clone --depth=1 --branch=master https://github.com/ElrondNetwork/sc-delegation-rs.git ${SANDBOX}/sc-delegation-rs
rm -rf ${SANDBOX}/sc-delegation-rs/.git
erdpy contract build ${SANDBOX}/sc-delegation-rs
erdpy contract test --directory="tests" ${SANDBOX}/sc-delegation-rs
cp ${SANDBOX}/sc-delegation-rs/output/delegation.wasm ./test/delegation/delegation.wasm
build-dns:
ifndef SANDBOX
$(error SANDBOX variable is undefined)
endif
rm -rf ${SANDBOX}/sc-dns-rs
git clone --depth=1 --branch=master https://github.com/ElrondNetwork/sc-dns-rs.git ${SANDBOX}/sc-dns-rs
rm -rf ${SANDBOX}/sc-dns-rs/.git
erdpy contract build ${SANDBOX}/sc-dns-rs
erdpy contract test --directory="tests" ${SANDBOX}/sc-dns-rs
cp ${SANDBOX}/sc-dns-rs/output/dns.wasm ./test/dns/dns.wasm
build-sc-examples:
ifndef SANDBOX
$(error SANDBOX variable is undefined)
endif
rm -rf ${SANDBOX}/sc-examples
erdpy contract new --template=erc20-c --directory ${SANDBOX}/sc-examples erc20-c
erdpy contract build ${SANDBOX}/sc-examples/erc20-c
cp ${SANDBOX}/sc-examples/erc20-c/output/wrc20_arwen.wasm ./test/erc20/contracts/erc20-c.wasm
build-sc-examples-rs:
ifndef SANDBOX
$(error SANDBOX variable is undefined)
endif
rm -rf ${SANDBOX}/sc-examples-rs
erdpy contract new --template=simple-coin --directory ${SANDBOX}/sc-examples-rs simple-coin
erdpy contract new --template=adder --directory ${SANDBOX}/sc-examples-rs adder
erdpy contract build ${SANDBOX}/sc-examples-rs/adder
erdpy contract build ${SANDBOX}/sc-examples-rs/simple-coin
erdpy contract test ${SANDBOX}/sc-examples-rs/adder
erdpy contract test ${SANDBOX}/sc-examples-rs/simple-coin
cp ${SANDBOX}/sc-examples-rs/adder/output/adder.wasm ./test/adder/adder.wasm
cp ${SANDBOX}/sc-examples-rs/simple-coin/output/simple-coin.wasm ./test/erc20/contracts/simple-coin.wasm