Estimate Transaction Gas with Ethers.js and EIP-1559

Rob
CoinsBench
Published in
4 min readJan 2, 2023

--

👉 Demo code — https://github.com/neznein9/gas-estimation

EIP-1559 has arrived, starting with Ethereum’s London Fork, and continuing out to Layer 2s and other EVM compatible blockchains in the last year. These new transactions set the price of gas differently than we’ve done it in the past, and we need to update our code in order to make sure our users, oracles, and other web3 integrations can (over)pay for priority when necessary.

--

--

Leader of software engineers. Crypto enthusiast. Amateur bicycler.