forked from 0xPolygon/kurtosis-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
blockscout.star
33 lines (29 loc) · 1018 Bytes
/
blockscout.star
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
blockscout_package = import_module(
"github.com/xavier-romero/kurtosis-blockscout/main.star"
)
def run(plan, args):
rpc_url = None
ws_url = None
for service in plan.get_services():
if service.name == "zkevm-node-rpc" + args["deployment_suffix"]:
rpc_url = "http://{}:{}".format(
service.ip_address, service.ports["http-rpc"].number
)
ws_url = "ws://{}:{}".format(
service.ip_address, service.ports["ws-rpc"].number
)
break
if not (rpc_url and ws_url):
fail("Could not find the zkevm-node-rpc service")
# Start blockscout.
blockscout_package.run(
plan,
args={
"blockscout_public_port": args["blockscout_public_port"],
"rpc_url": rpc_url,
"trace_url": rpc_url,
"ws_url": ws_url,
"chain_id": str(args["zkevm_rollup_chain_id"]),
"deployment_suffix": args["deployment_suffix"],
},
)