Skip to content

Instantly share code, notes, and snippets.

@tgrecojs
Last active March 18, 2024 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tgrecojs/866d2c68538ca4bf32e2c5eac70ec457 to your computer and use it in GitHub Desktop.
Save tgrecojs/866d2c68538ca4bf32e2c5eac70ec457 to your computer and use it in GitHub Desktop.
provider-services CLI helpers

Scripts

This gist contains shell files intended to make the setup process a seamless one.

To make use of these scripts, you will need to have bash installed, as well as jq, and curl.

Note: Mac OS users have bash installed on their machines by default.

Using the shell scripts

In order to make use of these files, you must inform your computer's shell of their existence. This is done by referencing them within one of your computer's "profile" files (.bash_profile, .zprofile,.zshrc, .bashrc).

#!/bin/bash
echo "AKASH_KEY_NAME set to: $AKASH_KEY_NAME"
echo "AKASH_NET set to: $AKASH_NET"
echo "AKASH_VERSION set to: $AKASH_VERSION"
echo "AKASH_KEYRING_BACKEND set to: $AKASH_KEYRING_BACKEND"
echo "AKASH_NODE set to: $AKASH_NODE"
echo "AKASH_CHAIN_ID set to: $AKASH_CHAIN_ID"
echo "AKASH_GAS set to: $AKASH_GAS"
echo "AKASH_GAS_PRICES set to: $AKASH_GAS_PRICES"
echo "AKASH_SIGN_MODE set to: $AKASH_SIGN_MODE"
echo "AKASH_GAS_ADJUSTMENT set to: $AKASH_GAS_ADJUSTMENT"
#!/bin/bash
# Check if $AKASH_KEY_NAME is not set or is empty
if [ -z "${AKASH_KEY_NAME}" ]; then
echo "AKASH_KEY_NAME is not set or is empty. Please set a value for AKASH_KEY_NAME."
exit 1
fi
# Check if additional argument is provided
if [ $# -eq 1 ]; then
AKASH_KEY_NAME=$1
fi
export AKASH_KEY_NAME="$AKASH_KEY_NAME"
export AKASH_KERYING_BACKEND=os
export AKASH_NET="https://raw.githubusercontent.com/akash-network/net/main/mainnet"
export AKASH_VERSION="$(curl -s https://api.github.com/repos/akash-network/provider/releases/latest | jq -r '.tag_name')"
export AKASH_CHAIN_ID="$(curl -s "$AKASH_NET/chain-id.txt")"
export AKASH_NODE="$(curl -s "$AKASH_NET/rpc-nodes.txt" | shuf -n 1)"
export AKASH_GAS=auto
export AKASH_GAS_ADJUSTMENT=1.25
export AKASH_GAS_PRICES=0.025uakt
export AKASH_SIGN_MODE=amino-json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment