In this repository, you will find the code related to the Chainlink - Calculate EIP-1559 Gas Fees presentation.
Feel free to fork and play with it, and if you find any error, or there's something you think it should be modified send us a push request!
If you're interested in learning more, or have feedback, suggestions, or questions, reach me out on Twitter!
A Gas price estimator based on the EIP-1559 or London Fork. It uses web sockets to retrieve latest estimated Gas prices based on historical 50th priority fees percentile, and current pending block Base fees.
Ream more about the EIP-1559 here.
-
Clone the repository
-
Grab your Infura Key:
-
Substitute your Infura Key in:
// app.js
const web3 = new Web3("CHANGE WITH YOUR WEBSOCKET URI");
- Install the dependencies with:
yarn install || npm install
- Run the app:
node app.js
Wait a couple of seconds and you should see the estimate appearing in your terminal:
Note: It might take up to a minute for the websocket to connect and start logging Gas prices. GIF is x10 speed.