Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
adjust generated shell spec with production config values
Browse files Browse the repository at this point in the history
  • Loading branch information
apopiak committed Oct 29, 2021
1 parent 54f59bc commit b933596
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/create_shell_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ $binary build-spec --chain shell > shell-spec-plain.json
# convert runtime to hex
cat $rt_path | od -A n -v -t x1 | tr -d ' \n' > shell-hex.txt

# replace the runtime in the spec with the given runtime
cat shell-spec-plain.json | jq --rawfile code shell-hex.txt '.genesis.runtime.system.code = ("0x" + $code)' > edited-shell-plain.json
# replace the runtime in the spec with the given runtime and set some values to production
cat shell-spec-plain.json | jq --rawfile code shell-hex.txt '.genesis.runtime.system.code = ("0x" + $code)' \
| jq '.name = "Shell"' \
| jq '.id = "shell"' \
| jq '.chainType = "Live"' \
| jq '.bootNodes = ["/ip4/34.65.213.18/tcp/30334/p2p/12D3KooWF63ZxKtZMYs5247WQA8fcTiGJb2osXykc31cmjwNLwem", "/ip4/34.65.104.62/tcp/30334/p2p/12D3KooWBJTqpLCKVBEbH4jvn7DvxDhSnmFFM7e8rohQqTGfmLSK", "/ip4/34.65.35.228/tcp/30334/p2p/12D3KooWF5jLarW11PF1yVncAKnk9rNGEa9WiZ7hMkEpT4HPpkLp", "/ip4/34.65.251.121/tcp/30334/p2p/12D3KooWDj3YNpKp2hW8g5zasxk54PtxHS1fN4AZUPu3hUwitPnh"]' \
| jq '.relay_chain = "polkadot"' \
> edited-shell-plain.json

# build a raw spec
$binary build-spec --chain edited-shell-plain.json --raw > shell-spec-raw.json
Expand Down

0 comments on commit b933596

Please sign in to comment.