-
Notifications
You must be signed in to change notification settings - Fork 1
/
start-tiny-rococo-with-contracts.rb
executable file
·54 lines (40 loc) · 1.52 KB
/
start-tiny-rococo-with-contracts.rb
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
#!/usr/bin/ruby
require_relative "lib.rb"
RELAY_CHAINSPEC = "rococo-local"
PARACHAIN_CHAINSPEC = "contracts-rococo-local"
# Set to true to use the RPC relay node
# (requires a recent version of `polkadot-collator`)
USE_RELAY_RPC_NODE = false
common_extra_args = ["--rpc-cors=all"]
common_env = {
"RUST_LOG" => "runtime::contracts=debug,sc_cli=info,sc_rpc_server=info,warn"
}
prepare_workspace
relay_chain = create_chain( "relay", POLKADOT, RELAY_CHAINSPEC )
node = create_node( relay_chain, "relay_v001" )
node.is_validator = true
node.is_bootnode = true
node.extra_args = common_extra_args
node.env = common_env
node = create_node( relay_chain, "relay_v002" )
node.is_validator = true
node.extra_args = common_extra_args
node.env = common_env
relay_rpc_node = node
parachain = create_parachain( relay_chain, "para01", POLKADOT_COLLATOR, PARACHAIN_CHAINSPEC )
node = create_node( parachain, "para01_c001" )
node.is_bootnode = true
node.is_collator = true
node.extra_args = common_extra_args
node.env = common_env
node.relay_rpc_node = relay_rpc_node if USE_RELAY_RPC_NODE
node = create_node( parachain, "para01_n001" )
node.relay_rpc_node = relay_rpc_node if USE_RELAY_RPC_NODE
node.extra_args = common_extra_args
node.env = common_env
puts "URLs:"
puts " polkadot.js: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A#{node.ws_port}#/explorer"
puts " contracts-ui: https://contracts-ui.substrate.io/?rpc=ws%3A%2F%2F127.0.0.1%3A#{node.ws_port}"
start_network relay_chain
# Uncomment to start Grafana + Prometheus:
# start_monitoring