Get transaction pending status of bsc chain using hardhat

Job ID: 35059433

Budget: $30 – $250 USD

Hi developers.
I want to get pending tx status in forked chain.
Lets say i see a tx that sells 1 ETH for 1000$(this is not mined yet. Its pending) and i want to send a tx to buy some ETH with the same gas price. Being the same gas price it will be validated after. But in the meantime someone else can see this tx and send a buy order before me so my tx will fail. I want to be able to check this before so I don't send the tx if its going to fail.
I'm listening to bsc websocket and when i receive a tx that interest me i will send a tx and i need to know if that tx will fail or not
For that I need to fork the mainet at last block with all pending txes, send my tx on forked chain, mine the block in the fork chain and see if my tx is working or not.
To verify you have read carefully this requirement, start your bid letters with "I am familiar with Hardhat and web3.js".
Thank you.
Related categories: Blockchain Ethereum Smart Contracts Web3.js