forked from kkrt-labs/kakarot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
91 lines (67 loc) · 3.31 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
.PHONY: build test coverage
cairo_files = $(shell find . -type f -name "*.cairo")
build: check
$(MAKE) clean
poetry run starknet-compile ./src/kakarot/kakarot.cairo --output build/kakarot.json --cairo_path ./src --abi build/kakarot_abi.json
poetry run starknet-compile ./src/kakarot/registry/blockhash/blockhash_registry.cairo --output build/blockhash_registry.json --cairo_path ./src --abi build/blockhash_registry_abi.json
poetry run starknet-compile ./src/kakarot/accounts/contract/contract_account.cairo --output build/contract_account.json --cairo_path ./src --abi build/contract_account_abi.json
poetry run starknet-compile ./src/kakarot/accounts/eoa/externally_owned_account.cairo --account_contract --output build/externally_owned_account.json --cairo_path ./src --abi build/externally_owned_account_abi.json
poetry run starknet-compile ./src/kakarot/accounts/proxy/proxy.cairo --output build/proxy_account.json --cairo_path ./src --abi build/proxy_account_abi.json
build-mac: check
$(MAKE) clean
starknet-compile ./src/kakarot/kakarot.cairo --output build/kakarot.json --cairo_path ./src --abi build/kakarot_abi.json
starknet-compile ./src/kakarot/registry/blockhash/blockhash_registry.cairo --output build/blockhash_registry.json --cairo_path ./src --abi build/blockhash_registry_abi.json
starknet-compile ./src/kakarot/accounts/contract/contract_account.cairo --output build/contract_account.json --cairo_path ./src --abi build/contract_account_abi.json
starknet-compile ./src/kakarot/accounts/eoa/externally_owned_account.cairo --account_contract --output build/externally_owned_account.json --cairo_path ./src --abi build/externally_owned_account_abi.json
starknet-compile ./src/kakarot/accounts/proxy/proxy.cairo --output build/proxy_account.json --cairo_path ./src --abi build/proxy_account_abi.json
build-devnet:
docker build . --tag sayajin-labs/kakarot -f ./docker/devnet/Dockerfile
check:
poetry lock --check
setup:
poetry install
test: build-sol
poetry run pytest tests --log-cli-level=INFO -n logical
test-no-log: build-sol
poetry run pytest tests -n logical
test-integration: build-sol
poetry run pytest tests/integration --log-cli-level=INFO -n logical
test-unit: build-sol
poetry run pytest tests/unit --log-cli-level=INFO
run-test-log: build-sol
poetry run pytest -k $(test) --log-cli-level=INFO -vvv
run-test: build-sol
poetry run pytest -k $(test)
run-test-mark-log: build-sol
poetry run pytest -m $(mark) --log-cli-level=INFO -vvv
run-test-mark: build-sol
poetry run pytest -m $(mark)
deploy: build
poetry run python ./scripts/deploy_kakarot.py
format:
poetry run cairo-format -i ${cairo_files}
poetry run black tests/.
poetry run isort tests/.
poetry run autoflake . -r
format-check:
poetry run cairo-format -c ${cairo_files}
poetry run black tests/. --check
poetry run isort tests/. --check
poetry run autoflake . -r -cd
clean:
rm -rf build
mkdir build
lint:
amarna ./src/kakarot -o lint.sarif -rules unused-imports,dead-store,unknown-decorator,unused-arguments
format-mac:
cairo-format src/**/*.cairo -i
black tests/.
isort tests/.
check-resources:
poetry run python scripts/check_resources.py
get-blockhashes:
poetry run python scripts/get_latest_blockhashes.py
build-sol:
forge build --names --force
run:
poetry run starknet-devnet --lite-mode --seed 0 --dump-on exit --dump-path devnet.pkl