Replies: 1 comment 5 replies
-
You have to increase your gas price enoguh. This section in the docs should help:
|
Beta Was this translation helpful? Give feedback.
-
You have to increase your gas price enoguh. This section in the docs should help:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I've been working on creating a retry function for buying/selling a token. The buy function can error out on the transaction wait function and never encounters any problems other than issues with gas/slippage which is fine.
Selling seems to encounter a problem though, I'm using a swapExactTokensForTokens function from the Pancakeswap router but each time the sell is called I seem to encounter this error - Error: replacement fee too low, ...., code=REPLACEMENT_UNDERPRICED.
I can see in the docs this can be due to attempting to replace a previous transaction and increasing the gas should work? Though I'm unsure why it would be classified as this since it's called again and the nonce seems different on each attempt?
This is the code for my retry function:
Deadline is set to 2 minutes per transaction, gas varies but recently is remaining around 60 gas fee/2000000 gas limit if this helps.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions