forked from Dev-AdeTutu/Stellar-Solar-Grid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (17 loc) · 781 Bytes
/
Copy pathMakefile
File metadata and controls
25 lines (17 loc) · 781 Bytes
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
.PHONY: build test deploy invoke-register invoke-allowlist logs clean
NETWORK ?= testnet
WASM := contracts/target/wasm32-unknown-unknown/release/solar_grid.wasm
build:
cd contracts && cargo build --target wasm32-unknown-unknown --release
test:
cd contracts && cargo test
deploy: build
stellar contract deploy --wasm $(WASM) --source $(ADMIN_SECRET_KEY) --network $(NETWORK)
invoke-register:
stellar contract invoke --id $(CONTRACT_ID) --source $(ADMIN_SECRET_KEY) --network $(NETWORK) -- register_meter --meter_id $(METER_ID) --owner $(OWNER)
invoke-allowlist:
stellar contract invoke --id $(CONTRACT_ID) --source $(ADMIN_SECRET_KEY) --network $(NETWORK) -- allowlist_add --owner $(OWNER)
logs:
docker compose logs -f backend
clean:
cd contracts && cargo clean