Created
January 8, 2022 18:23
-
-
Save antonlukin/e71ddf000f26dc6658c740f674b05665 to your computer and use it in GitHub Desktop.
Ethereum and Polygon Gas Price
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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