Files

33 lines
672 B
Bash
Raw Permalink Normal View History

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