-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·65 lines (55 loc) · 1.88 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
create-canisters:
dfx canister create --all
deploy-provider:
dfx deploy ic_siwe_provider --argument "( \
record { \
domain = \"127.0.0.1\"; \
uri = \"http://127.0.0.1:5173\"; \
salt = \"somerandomsalt\"; \
chain_id = opt 1; \
scheme = opt \"http\"; \
statement = opt \"Login to gwent-on-chain\"; \
sign_in_expires_in = opt 300000000000; /* 5 minutes */ \
session_expires_in = opt 604800000000000; /* 1 week */ \
targets = opt vec { \
\"$$(dfx canister id ic_siwe_provider)\"; \
\"$$(dfx canister id backend)\"; \
}; \
} \
)"
deploy-backend:
dfx deploy backend --argument "(principal \"$$(dfx canister id ic_siwe_provider)\")"
deploy-frontend:
npm install
dfx deploy frontend
deploy-all: create-canisters deploy-provider deploy-backend deploy-frontend
deploy-all-ic:
dfx canister --network ic create --all
dfx deploy ic_siwe_provider --network ic --argument "( \
record { \
domain = \"ae5hp-hiaaa-aaaan-qmsbq-cai.icp0.io\"; \
uri = \"https://$$(dfx canister --network ic id frontend).icp0.io\"; \
salt = \"somerandomsalt\"; \
chain_id = opt 1; \
scheme = opt \"https\"; \
statement = opt \"Login to gwent-on-chain\"; \
sign_in_expires_in = opt 300000000000; /* 5 minutes */ \
session_expires_in = opt 604800000000000; /* 1 week */ \
targets = opt vec { \
\"$$(dfx canister --network ic id ic_siwe_provider)\"; \
\"$$(dfx canister --network ic id backend)\"; \
}; \
} \
)"
dfx deploy backend --network ic --argument "(principal \"$$(dfx canister --network ic id ic_siwe_provider)\")"
npm install
dfx deploy frontend --network ic
run-frontend:
npm install
npm run dev
clean:
rm -rf .azle
rm -rf .dfx
rm -rf dist
rm -rf node_modules
rm -f .env