Add a script to generate stage1 genesis file from given participants and allocations #14

Merged
nabarun merged 4 commits from pm-genesis-gen-using-json into main 2024-08-19 09:57:55 +00:00
Showing only changes of commit a1540bda67 - Show all commits

View File

@ -23,6 +23,13 @@ jq --argjson p "$participants" '.app_state.onboarding.participants = $p' "$stage
# Disable bank module transfers
# jq '.app_state["bank"]["params"]["default_send_enabled"]=false' "$stage1_genesis_file" > tmp.$$.json && mv tmp.$$.json "$stage1_genesis_file"
# Update staking module params
jq '.app_state["staking"]["params"]["max_validators"]=100' "$stage1_genesis_file" > tmp.$$.json && mv tmp.$$.json "$stage1_genesis_file"
# Update slashing module params
jq '.app_state["slashing"]["params"]["signed_blocks_window"]="2400"' "$stage1_genesis_file" > tmp.$$.json && mv tmp.$$.json "$stage1_genesis_file"
jq '.app_state["slashing"]["params"]["min_signed_per_window"]="0.5"' "$stage1_genesis_file" > tmp.$$.json && mv tmp.$$.json "$stage1_genesis_file"
# Read and assign allocations
jq -c '.[]' "$stage1_allocations_file" | while IFS= read -r line; do
cosmos_address=$(jq -r '.cosmos_address' <<< "$line")