-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcompose.l3.yml
More file actions
107 lines (98 loc) · 3.34 KB
/
Copy pathcompose.l3.yml
File metadata and controls
107 lines (98 loc) · 3.34 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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# L3 (Appchain) infrastructure
#
# Initializes the L3 chain config, starts Katana L3, and deploys appc_msg_sn.
#
# Prerequisites:
# - compose.l2.yml must be running (katana_l2 reachable on saya_net)
# - Contract artifacts must exist in ./contracts/messaging/
#
# Usage:
# docker compose -f compose.l3.yml up
x-katana-common: &katana-common
image: ghcr.io/dojoengine/katana:v1.7.0-snos.4
dns: 127.0.0.11
networks: [saya_net]
restart: "no"
volumes:
- shared:/shared
entrypoint: ["/bin/sh", "-c"]
x-sozo-common: &sozo-common
build:
context: docker
dockerfile: Dockerfile.sozo
args:
SOZO_VERSION: "1.8.6"
dns: 127.0.0.11
networks: [saya_net]
restart: "no"
volumes:
- ./contracts/messaging:/artifacts:ro
services:
katana_init:
<<: *katana-common
container_name: katana_init
command:
- |
until curl -sf http://katana_l2:5050 > /dev/null 2>&1; do
echo "Waiting for katana_l2..."; sleep 2
done
katana init \
--settlement-chain http://katana_l2:5050 \
--output-path /shared/katana_config \
--id ${L3_CHAIN_ID:-custom} \
--settlement-contract ${CORE_CONTRACT_ADDRESS:-0x5f8c60f1c40b63452d3b5cb39669d35b37ec57d0761ad12ecdadd00c3d90102} \
--settlement-contract-deployed-block ${CORE_CONTRACT_DEPLOYED_BLOCK:-1} \
--settlement-facts-registry ${FACT_REGISTRY_ADDRESS:-0x3eb0d510d1238120bf7f9d176faafe0c7066797a86be985855952f87769d3bd}
katana_l3:
<<: *katana-common
container_name: katana_l3
depends_on:
katana_init:
condition: service_completed_successfully
ports:
- "${L3_PORT:-5051}:5050"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:5050 || exit 1"]
interval: 2s
timeout: 5s
retries: 30
start_period: 5s
command:
- |
katana --chain /shared/katana_config --http.addr 0.0.0.0
appc_msg_sn_deploy:
<<: *sozo-common
container_name: appc_msg_sn_deploy
depends_on:
katana_l3:
condition: service_healthy
entrypoint: ["/bin/sh", "-c"]
command:
- |
sozo declare /artifacts/appc_msg_sn.contract_class.json \
--account-address ${APPC_ACCOUNT_ADDRESS:-0x1f401c745d3dba9b9da11921d1fb006c96f571e9039a0ece3f3b0dc14f04c3d} \
--private-key ${APPC_PRIVATE_KEY:-0x7230b49615d175307d580c33d6fda61fc7b9aec91df0f5c1a5ebe3b8cbfee02} \
--l1-data-gas 20000000000 \
--l1-gas 20000000000 \
--l1-gas-price 20000000000 \
--l2-gas-price 20000000000 \
--l1-data-gas-price 20000000000 \
--l2-gas 20000000000 \
--rpc-url http://katana_l3:5050
sleep 2
sozo deploy 0x03653979a4d0bcd57a755a32a182d0650d9cd45cd3ff3be28a20c972e1c9c29c \
--account-address ${APPC_ACCOUNT_ADDRESS:-0x1f401c745d3dba9b9da11921d1fb006c96f571e9039a0ece3f3b0dc14f04c3d} \
--private-key ${APPC_PRIVATE_KEY:-0x7230b49615d175307d580c33d6fda61fc7b9aec91df0f5c1a5ebe3b8cbfee02} \
--salt 0x1234 \
--l1-data-gas 20000000000 \
--l1-gas 20000000000 \
--l1-gas-price 20000000000 \
--l2-gas-price 20000000000 \
--l1-data-gas-price 20000000000 \
--l2-gas 20000000000 \
--rpc-url http://katana_l3:5050
networks:
saya_net:
name: saya_net
volumes:
shared: {}