Files
sonr/scripts/update-genesis.sh
T
Prad NukalaandGitHub ebfa2b062a Feat/add networks (#1303)
* No commit suggestions generated

* No commit suggestions generated

* No commit suggestions generated
2025-10-12 11:23:20 -04:00

33 lines
672 B
Bash
Executable File

#!/bin/bash
# scripts/update-genesis.sh - Update genesis.json with Sonr-specific parameters
set -euo pipefail
# Source helper libraries
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${SCRIPT_DIR}/lib/env.sh"
source "${SCRIPT_DIR}/lib/genesis.sh"
# Initialize environment
init_env
# Ensure chain directory exists
ensure_chain_dir
log_info "Updating genesis.json file with Sonr parameters"
# Update genesis parameters using helper functions
update_genesis_params
# Add constitution if available
add_constitution
# Validate genesis file
validate_genesis
# Show node ID
$CHAIN_BIN tendermint show-node-id
log_success "Genesis update completed"