ethers.js
ethers.js copied to clipboard
Fix blockTag not being included on estimateGas calls
Currently, the blockTag option for estimateGas is in the documentation and part of the Ethereum RPC spec, but it doesn't currently work in ethers. The option is defined on the input type TransactionRequest, but it's silently ignored in the processing code.
This fixes (or adds) this feature to enable blockTags on estimateGas. It uses it in the same manner and functions that call and other commands do, so it accepts the usual options (like pending, latest, a specific block numbers, etc.).
I think this covers the relevant code sections from my searching, but let me know if there's other fixes needed.