Skip to content

Commit

Permalink
fixup! feat: save wallet mnemonics (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
auricom committed Oct 31, 2024
1 parent 281b5cb commit a803553
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ jobs:
echo "Actual: $(cat /tmp/${{ matrix.app.name }}/build/*)"
exit 1
fi
echo "app_status >> $GITHUB_ENV
echo ""app_status" >> $GITHUB_ENV
- name: Download Digests
if: ${{ matrix.app.publish_artifacts }}
Expand Down Expand Up @@ -396,7 +396,7 @@ jobs:
docker buildx imagetools create \
--tag ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ matrix.app.name }}:${{ matrix.app.container_tag_name }} \
$(printf 'ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ matrix.app.name }}@sha256:%s ' *)
echo "app_status >> $GITHUB_ENV
echo "app_status" >> $GITHUB_ENV
- name: Inspect image
if: ${{ matrix.app.publish_artifacts }}
Expand Down
16 changes: 8 additions & 8 deletions apps/ignite-example/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ if [[ ! -f "${HOME}/config/config.toml" ]]; then
/app/node config set client chain-id "${COSMOS_CHAIN_ID}" --home "${HOME}"
/app/node config set client keyring-backend test --home "${HOME}"
sed -i 's/minimum-gas-prices = ""/minimum-gas-prices = "0.002token1"/' "${HOME}/config/app.toml"
/app/node config set app api.enable true
/app/node config set app api.enable true --home "${HOME}"

# Add keys
for user in validator faucet alice bob; do
"${COSMOS_NODE_CMD}" keys add "${user}"
"${COSMOS_NODE_CMD}" keys add "${user}" --home "${HOME}"
done

# Save mnemonics for specific users
for user in validator faucet; do
"${COSMOS_NODE_CMD}" keys mnemonic "${user}" >"${HOME}/${user}_mnemonic.txt"
"${COSMOS_NODE_CMD}" keys mnemonic "${user}" --home "${HOME}">"${HOME}/${user}_mnemonic.txt"
done

# Initialize node
"${COSMOS_NODE_CMD}" init "${COSMOS_MONIKER}" --chain-id "${COSMOS_CHAIN_ID}"
"${COSMOS_NODE_CMD}" init "${COSMOS_MONIKER}" --chain-id "${COSMOS_CHAIN_ID}" --home "${HOME}"

# Set governance and inflation parameters
jq '.app_state.gov.params.voting_period = "600s" |
Expand All @@ -39,12 +39,12 @@ if [[ ! -f "${HOME}/config/config.toml" ]]; then

# Add genesis accounts
for account in validator faucet alice bob; do
"${COSMOS_NODE_CMD}" genesis add-genesis-account "${account}" 5000000000stake --keyring-backend test
"${COSMOS_NODE_CMD}" genesis add-genesis-account "${account}" 5000000000stake --keyring-backend test --home "${HOME}"
done
"${COSMOS_NODE_CMD}" genesis gentx validator 1000000stake --chain-id "${COSMOS_CHAIN_ID}"
"${COSMOS_NODE_CMD}" genesis collect-gentxs
"${COSMOS_NODE_CMD}" genesis gentx validator 1000000stake --chain-id "${COSMOS_CHAIN_ID}" --home "${HOME}"
"${COSMOS_NODE_CMD}" genesis collect-gentxs --home "${HOME}"
fi

exec \
"${COSMOS_NODE_CMD}" start \
"${COSMOS_NODE_CMD}" start --home "${HOME}" \
"$@"

0 comments on commit a803553

Please sign in to comment.