From 60567bda330ffe384287608a831a79411889cdf6 Mon Sep 17 00:00:00 2001 From: lesterli Date: Thu, 14 Dec 2023 01:27:07 +0000 Subject: [PATCH] modify minimum-gas-prices for autodeployer --- Dockerfile | 2 +- scripts/init_and_start.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 85cf96a..8a1e451 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ FROM ubuntu:22.04 RUN apt-get update \ && apt-get upgrade -y \ - && apt-get install -y curl + && apt-get install -y curl jq WORKDIR /root diff --git a/scripts/init_and_start.sh b/scripts/init_and_start.sh index 1776a25..2dd9ae8 100755 --- a/scripts/init_and_start.sh +++ b/scripts/init_and_start.sh @@ -8,6 +8,7 @@ CHAINID=$3 PEERS=$4 GENESIS_FILE=$5 DATA_DIR=/data +IBC_DENOM=`jq '.app_state.crisis.constant_fee.denom' $GENESIS_FILE` if [ ! -f "$DATA_DIR/config/config.toml" ]; then # Initialize node's configuration files. @@ -16,6 +17,9 @@ if [ ! -f "$DATA_DIR/config/config.toml" ]; then # Modify the persistent_peers field of config.toml sed -i.bak "s/persistent_peers = \"\"/persistent_peers = \"${PEERS}\"/" $DATA_DIR/config/config.toml + # Modify the minimum-gas-price field of app.toml + sed -i.bak "s#minimum-gas-prices = \"0aotto\"#minimum-gas-prices = \"20000000000${IBC_TOKEN_DENOM}\"#" $DATA_DIR/config/app.toml + # Download genesis file curl -L -o $DATA_DIR/config/genesis.json $GENESIS_FILE