Polygon.

Post

Share your knowledge.

Cattos.
Jan 17, 2025
Discussion

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
0
2
Share
Comments
.

Answers

2
KillaVibe.
Jan 17 2025, 19:47

If 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.

0
Comments
.
ITachi.
Jan 17 2025, 22:08

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.

0
Comments
.

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.

39Posts82Answers
We use cookies to ensure you get the best experience on our website.
More info