I have been able to use other frameworks / libraries (e.g., web3.py and ethers.py) to monitor mempool events.
I see that anvil has one mention in the docs related to mempool monitoring (a switch for FIFO ordering of mempool events). I also see there is a reference to txpool_inspect
, but I'm assuming that's just related to a geth client and not something I can leverage in actual Solidity code of my script.
Because Foundry relies on Solidity for its scripting environment, I don't know how to make direct calls to a node so I can obtain mempool events.
Do I have to leverage Hardhat and JS inputs if I want to read from the mempool while running a Foundry Solidity script?