-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (47 loc) · 1.36 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
PHONY: under-setup--asdf under-setup--katana setup-unix contract-full contract-artifacts declare-contract deploy-contract get-contract-class run-network
# config-account: \
# starkli account fetch \
# $ACCOUNT \
# --rpc $NETWORK_RPC_URL \
# --output ~/.starkli-wallets/devnet/deployer/account.json
SHELL=/bin/bash
setup-unix:
make under-setup--asdf && \
make under-setup--katana
under-setup--asdf:
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0 && \
echo '. "$HOME/.asdf/asdf.sh" >> .bashrc && \
source .bashrc && \
asdf plugin add scarb && \
asdf install scarb 2.6.3 && \
asdf global scarb 2.6.3 &&
under-setup--katana:
asdf plugin add dojo https://github.com/dojoengine/asdf-dojo && \
asdf install dojo 0.7.2 && \
asdf global dojo 0.7.2
contract-full:
make contract-artifacts && \
make declare-contract &&\
make get-class &&\
make deploy
contract-artifacts:
cd contracts/told_ya && \
scarb build && \
cd -
declare-contract:
starkli declare \
--account katana \
--rpc=$NETWORK_RPC_URL \
--compiler-version=2.6.2 \
target/dev/told_ya_ToldYa.contract_class.json
deploy-contract:
make get-class &&\
starkli deploy \
--account katana \
--rpc $NETWORK_RPC_URL
$CONTRACT_HASH_CLASS
get-contract-class:
CONTRACT_HASH_CLASS=$(starkli class-hash \
contracts/told_ya/target/dev/told_ya_ToldYa.contract_class.json)
run-network: \
katana