From 392747b15405991d488a9b2d0c6ad1146cfe4497 Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Mon, 28 Oct 2024 11:43:20 +0530 Subject: [PATCH] Make chain ID, prefix and gas price configurable --- .../compose/docker-compose-laconic-shopify-faucet.yml | 2 ++ .../config/laconic-shopify-faucet/config-template.toml | 8 ++++---- .../config/laconic-shopify-faucet/start-faucet.sh | 3 +++ .../stacks/laconic-shopify-faucet/README.md | 6 ++++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/stack-orchestrator/compose/docker-compose-laconic-shopify-faucet.yml b/stack-orchestrator/compose/docker-compose-laconic-shopify-faucet.yml index 8aea38d..0efa442 100644 --- a/stack-orchestrator/compose/docker-compose-laconic-shopify-faucet.yml +++ b/stack-orchestrator/compose/docker-compose-laconic-shopify-faucet.yml @@ -8,6 +8,8 @@ services: CERC_LACONICD_RPC_ENDPOINT: ${CERC_LACONICD_RPC_ENDPOINT:-http://laconicd:26657} CERC_FAUCET_KEY: ${CERC_FAUCET_KEY} CERC_LACONICD_CHAIN_ID: ${CERC_LACONICD_CHAIN_ID:-laconic_9000-1} + CERC_LACONICD_PREFIX: ${CERC_LACONICD_PREFIX:-laconic} + CERC_LACONICD_GAS_PRICE: ${CERC_LACONICD_GAS_PRICE:-1} volumes: - faucet-data:/app/db - ../config/laconic-shopify-faucet/start-faucet.sh:/app/start-faucet.sh diff --git a/stack-orchestrator/config/laconic-shopify-faucet/config-template.toml b/stack-orchestrator/config/laconic-shopify-faucet/config-template.toml index 1a4e570..eca0fc0 100644 --- a/stack-orchestrator/config/laconic-shopify-faucet/config-template.toml +++ b/stack-orchestrator/config/laconic-shopify-faucet/config-template.toml @@ -1,10 +1,10 @@ [upstream] rpcEndpoint = "REPLACE_WITH_CERC_LACONICD_RPC_ENDPOINT" - chainId = "laconic_9000-1" - denom = "alnt" - prefix = "laconic" - gasPrice = "1" + chainId = "REPLACE_WITH_CERC_LACONICD_CHAIN_ID" + prefix = "REPLACE_WITH_CERC_LACONICD_PREFIX" + gasPrice = "REPLACE_WITH_CERC_LACONICD_GAS_PRICE" faucetKey = "REPLACE_WITH_CERC_FAUCET_KEY" + denom = "alnt" [server] port=3000 diff --git a/stack-orchestrator/config/laconic-shopify-faucet/start-faucet.sh b/stack-orchestrator/config/laconic-shopify-faucet/start-faucet.sh index cdf2d02..baea620 100755 --- a/stack-orchestrator/config/laconic-shopify-faucet/start-faucet.sh +++ b/stack-orchestrator/config/laconic-shopify-faucet/start-faucet.sh @@ -19,6 +19,9 @@ echo "Using laconicd RPC endpoint: $CERC_LACONICD_RPC_ENDPOINT" FAUCET_CONFIG=$(echo "$config_template" | \ sed -E "s|REPLACE_WITH_CERC_FAUCET_KEY|${CERC_FAUCET_KEY}|g; \ + s|REPLACE_WITH_CERC_LACONICD_CHAIN_ID|${CERC_LACONICD_CHAIN_ID}|g; \ + s|REPLACE_WITH_CERC_LACONICD_PREFIX|${CERC_LACONICD_PREFIX}|g; \ + s|REPLACE_WITH_CERC_LACONICD_GAS_PRICE|${CERC_LACONICD_GAS_PRICE}|g; \ s|REPLACE_WITH_CERC_LACONICD_RPC_ENDPOINT|${CERC_LACONICD_RPC_ENDPOINT}|g; ") echo "$FAUCET_CONFIG" > $target_config diff --git a/stack-orchestrator/stacks/laconic-shopify-faucet/README.md b/stack-orchestrator/stacks/laconic-shopify-faucet/README.md index 965dc07..8f875c7 100644 --- a/stack-orchestrator/stacks/laconic-shopify-faucet/README.md +++ b/stack-orchestrator/stacks/laconic-shopify-faucet/README.md @@ -62,6 +62,12 @@ Instructions for running the laconic faucet # laconicd chain id (default: laconic_9000-1) CERC_LACONICD_CHAIN_ID= + + # laconicd address prefix (default: laconic) + CERC_LACONICD_PREFIX= + + # laconicd gas price (default: 1) + CERC_LACONICD_GAS_PRICE= ``` ## Start the deployment