Post
Share your knowledge.
How to resolve Ethereum transaction stuck in pending?
I'm working on deploying a smart contract and one of my transactions got stuck in 'pending'. I tried setting the gas price at 100 gwei and a gas limit of 4 million in my Java code. I also tried estimating the gas price dynamically. However, it’s still pending. I'm not sure if I can set the gas limit dynamically. Anyone has ideas or suggestions to solve this issue?
- Smart Contract
Answers
2If a transaction remains in 'pending', it could indicate that the nodes are not accepting your gas offer. Ensure that your gas price aligns with the current network demands; sometimes it might be necessary to increase it.
The issue might be related to how the gas is estimated. It's essential to ensure that the gas price and limit are set appropriately for each transaction. One suggestion is to use the function eth.estimateGas
provided by the library, which helps in offering a more accurate estimation.
Do you know the answer?
Please log in and share it.
Polygon is a decentralised Ethereum scaling platform that enables developers to build scalable user-friendly dApps with low transaction fees without ever sacrificing on security.
- ITachi24How to Add Polygon Amoy Testnet on MetaMask: A Guide11
- Recovering USDT Sent to Smart Contract on Polygon12
- Sending USDCoins from Ethereum Wallet to PayPal with Moonpay14
- Gojo30Resolving Unconfirmed Transactions on Polygon Network13
- Displaying Transactions for Contracts B, C, and D in Contract A17