From 8208e5fd976634bdfece24fba90b48d13e134c45 Mon Sep 17 00:00:00 2001 From: Bo QIU <35757521+boqiu@users.noreply.github.com> Date: Thu, 18 Apr 2024 18:52:18 +0800 Subject: [PATCH] Supports cross platform for local test script (#2) --- localtestnet.sh | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/localtestnet.sh b/localtestnet.sh index a9bcee9e..90985775 100755 --- a/localtestnet.sh +++ b/localtestnet.sh @@ -81,24 +81,27 @@ sed -in-place='' 's/stake/ukava/g' $DATA/config/genesis.json # Replace the default evm denom of aphoton with ukava sed -in-place='' 's/aphoton/akava/g' $DATA/config/genesis.json -jq '.consensus_params.block.max_gas = "25000000"' $DATA/config/genesis.json|sponge $DATA/config/genesis.json +GENESIS=$DATA/config/genesis.json +TMP_GENESIS=$DATA/config/tmp_genesis.json + +cat $GENESIS | jq '.consensus_params.block.max_gas = "25000000"' >$TMP_GENESIS && mv $TMP_GENESIS $GENESIS # Zero out the total supply so it gets recalculated during InitGenesis -jq '.app_state.bank.supply = []' $DATA/config/genesis.json|sponge $DATA/config/genesis.json +cat $GENESIS | jq '.app_state.bank.supply = []' >$TMP_GENESIS && mv $TMP_GENESIS $GENESIS # Disable fee market -jq '.app_state.feemarket.params.no_base_fee = true' $DATA/config/genesis.json|sponge $DATA/config/genesis.json +cat $GENESIS | jq '.app_state.feemarket.params.no_base_fee = true' >$TMP_GENESIS && mv $TMP_GENESIS $GENESIS # Disable london fork -jq '.app_state.evm.params.chain_config.london_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json -jq '.app_state.evm.params.chain_config.arrow_glacier_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json -jq '.app_state.evm.params.chain_config.gray_glacier_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json -jq '.app_state.evm.params.chain_config.merge_netsplit_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json -jq '.app_state.evm.params.chain_config.shanghai_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json -jq '.app_state.evm.params.chain_config.cancun_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json +cat $GENESIS | jq '.app_state.evm.params.chain_config.london_block = null' >$TMP_GENESIS && mv $TMP_GENESIS $GENESIS +cat $GENESIS | jq '.app_state.evm.params.chain_config.arrow_glacier_block = null' >$TMP_GENESIS && mv $TMP_GENESIS $GENESIS +cat $GENESIS | jq '.app_state.evm.params.chain_config.gray_glacier_block = null' >$TMP_GENESIS && mv $TMP_GENESIS $GENESIS +cat $GENESIS | jq '.app_state.evm.params.chain_config.merge_netsplit_block = null' >$TMP_GENESIS && mv $TMP_GENESIS $GENESIS +cat $GENESIS | jq '.app_state.evm.params.chain_config.shanghai_block = null' >$TMP_GENESIS && mv $TMP_GENESIS $GENESIS +cat $GENESIS | jq '.app_state.evm.params.chain_config.cancun_block = null' >$TMP_GENESIS && mv $TMP_GENESIS $GENESIS # Add earn vault -jq '.app_state.earn.params.allowed_vaults = [ +cat $GENESIS | jq '.app_state.earn.params.allowed_vaults = [ { denom: "usdx", strategies: ["STRATEGY_TYPE_HARD"], @@ -106,9 +109,9 @@ jq '.app_state.earn.params.allowed_vaults = [ { denom: "bkava", strategies: ["STRATEGY_TYPE_SAVINGS"], - }]' $DATA/config/genesis.json | sponge $DATA/config/genesis.json + }]' >$TMP_GENESIS && mv $TMP_GENESIS $GENESIS -jq '.app_state.savings.params.supported_denoms = ["bkava-kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0"]' $DATA/config/genesis.json | sponge $DATA/config/genesis.json +cat $GENESIS | jq '.app_state.savings.params.supported_denoms = ["bkava-kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0"]' >$TMP_GENESIS && mv $TMP_GENESIS $GENESIS $BINARY config broadcast-mode sync