-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
49 lines (40 loc) · 1.4 KB
/
justfile
File metadata and controls
49 lines (40 loc) · 1.4 KB
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
# Support both docker and podman
docker := if `command -v podman >/dev/null 2>&1; echo $?` == "0" { "podman" } else { "docker" }
# Display available commands and their descriptions (default target)
default:
@just --list
# Install dependencies
install:
pnpm install
forge build
# Install amp
ampup:
curl --proto '=https' --tlsv1.2 -sSf https://ampup.sh/install | sh
# Start service dependencies
up *args:
@mkdir -p ./infra/postgres/data
@mkdir -p ./infra/amp/data
@mkdir -p ./infra/amp/datasets
{{docker}} compose up -d --wait {{args}}
just deploy
# Tail logs for service dependencies
logs *args:
{{docker}} compose logs -f --tail 100 {{args}}
# Stop service dependencies
stop *args:
{{docker}} compose stop {{args}}
# Stop all services and remove volumes
down:
{{docker}} compose down --volumes
@rm -rf ./infra/postgres/data
@rm -rf ./infra/amp/data
@rm -rf ./infra/amp/datasets
# Deploy the contract
[working-directory: "contracts"]
deploy:
forge script script/DeployCounter.s.sol --broadcast --rpc-url http://localhost:8545 --private-key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
# Deploy the dataset and watch for config changes
dev-amp:
ampctl manifest generate --network anvil --kind evm-rpc --out ./infra/amp/anvil.json
ampctl dataset register _/anvil -t 0.0.1 ./infra/amp/anvil.json
ampctl dataset deploy _/anvil@dev