Skip to content

Instantly share code, notes, and snippets.

@antonlukin
Created January 8, 2022 18:23
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 antonlukin/e71ddf000f26dc6658c740f674b05665 to your computer and use it in GitHub Desktop.
Save antonlukin/e71ddf000f26dc6658c740f674b05665 to your computer and use it in GitHub Desktop.
Ethereum and Polygon Gas Price
#!/bin/bash
#
# <xbar.title>Ethereum and Polygon Gas Price</xbar.title>
# <xbar.version>v1.0.0</xbar.version>
# <xbar.author>Anton Lukin</xbar.author>
# <xbar.author.github>antonlukin</xbar.author.github>
# <xbar.desc>Ethereum and Polygon GasPrice forecast system.</xbar.desc>
# <xbar.image>https://i.imgur.com/FwrSDYi.png</xbar.image>
#
# Ethereum and Polygon GasPrice forecast system
polygon=$(curl -s "https://xbar.gangws.com/polygon/")
ethereum=$(curl -s "https://xbar.gangws.com/mainnet/")
echo -n "Ethereum Gas "; echo $ethereum | grep -Eo 'SafeGasPrice":"[0-9.]+' | sed 's/SafeGasPrice":"//'
echo -n "Polygon Gas "; echo $polygon | grep -Eo 'SafeGasPrice":"[0-9.]+' | sed 's/SafeGasPrice":"//'
echo '---'
echo -n "Ethereum Rapid "; echo $ethereum | grep -Eo 'FastGasPrice":"[0-9.]+' | sed 's/FastGasPrice":"//'
echo -n "Ethereum Standart "; echo $ethereum | grep -Eo 'SafeGasPrice":"[0-9.]+' | sed 's/SafeGasPrice":"//'
echo -n "Ethereum Fast "; echo $ethereum | grep -Eo 'ProposeGasPrice":"[0-9.]+' | sed 's/ProposeGasPrice":"//'
echo '---'
echo -n "Polygon Rapid "; echo $polygon | grep -Eo 'FastGasPrice":"[0-9.]+' | sed 's/FastGasPrice":"//'
echo -n "Polygon Standart "; echo $polygon | grep -Eo 'SafeGasPrice":"[0-9.]+' | sed 's/SafeGasPrice":"//'
echo -n "Polygon Fast "; echo $polygon | grep -Eo 'ProposeGasPrice":"[0-9.]+' | sed 's/ProposeGasPrice":"//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment