Replies: 1 comment
-
When you have this error, it is likely that there is some pending transaction stuck in the mempool with a higher gas price, which is not being mined for some reason (I have faced this problem, it's rare/hard to reproduce). To confirm if this is the cause, is it possible for you to try with a different signer address? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have a script attempting to call a Mint method on a contract on each new block event. If the mint is not enabled the gas estimate throws an error. The script then loops and tries to submit the same nonce transaction but with updated gas fee based on the new Base Fee. Once the Mint method is enabled the call then generates a REPLACEMENT_UNDERPRICED error. I would have expected the transaction to go through successfully as it is now a valid call using a valid nonce and a fee above Base Fee. I am working to adapt the strategy to trigger off of different events, but do you know why the REPLACEMENT_UNDERPRICED error may be triggering? My provider is Infura.
This is the error:
{ Error: replacement fee too low (error={"reason":"processing response error","code":"SERVER_ERROR","body":"{"jsonrpc":"2.0","id":382,"error":{"code":-32000,"message":"replacement transaction underpriced"}}","error":{"code":-32000},"requestBody":"{"method":"eth_sendRawTransaction","params":["x"],"id":382,"jsonrpc":"2.0"}","requestMethod":"POST","url":"https://mainnet.infura.io/v3/6ed5921ca82c43a9a8ec0638f814b5d6"}, method="sendTransaction", transaction="x", code=REPLACEMENT_UNDERPRICED, version=providers/5.4.5)
at Logger.makeError (/home/miner/flash/node_modules/@ethersproject/logger/lib/index.js:199:21)
at Logger.throwError (/home/miner/flash/node_modules/@ethersproject/logger/lib/index.js:208:20)
at checkError (/home/miner/flash/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:107:16)
at InfuraProvider. (/home/miner/flash/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:633:47)
at step (/home/miner/flash/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
at Object.throw (/home/miner/flash/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53)
at rejected (/home/miner/flash/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
reason: 'replacement fee too low',
code: 'REPLACEMENT_UNDERPRICED',
error:
{ Error: processing response error (body="{"jsonrpc":"2.0","id":382,"error":{"code":-32000,"message":"replacement transaction underpriced"}}", error={"code":-32000}, requestBody="{"method":"eth_sendRawTransaction","params":["x"],"id":382,"jsonrpc":"2.0"}", requestMethod="POST", url="https://mainnet.infura.io/v3/6ed5921ca82c43a9a8ec0638f814b5d6", code=SERVER_ERROR, version=web/5.4.0)
at Logger.makeError (/home/miner/flash/node_modules/@ethersproject/logger/lib/index.js:199:21)
at Logger.throwError (/home/miner/flash/node_modules/@ethersproject/logger/lib/index.js:208:20)
at /home/miner/flash/node_modules/@ethersproject/web/lib/index.js:266:32
at step (/home/miner/flash/node_modules/@ethersproject/web/lib/index.js:33:23)
at Object.next (/home/miner/flash/node_modules/@ethersproject/web/lib/index.js:14:53)
at fulfilled (/home/miner/flash/node_modules/@ethersproject/web/lib/index.js:5:58)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
reason: 'processing response error',
code: 'SERVER_ERROR',
body: '{"jsonrpc":"2.0","id":382,"error":{"code":-32000,"message":"replacement transaction underpriced"}}',
error: { Error: replacement transaction underpriced
at getResult (/home/miner/flash/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:132:21)
at processJsonFunc (/home/miner/flash/node_modules/@ethersproject/web/lib/index.js:309:22)
at /home/miner/flash/node_modules/@ethersproject/web/lib/index.js:241:46
at step (/home/miner/flash/node_modules/@ethersproject/web/lib/index.js:33:23)
at Object.next (/home/miner/flash/node_modules/@ethersproject/web/lib/index.js:14:53)
at fulfilled (/home/miner/flash/node_modules/@ethersproject/web/lib/index.js:5:58)
at
at process._tickCallback (internal/process/next_tick.js:188:7) code: -32000, data: undefined },
requestBody: '{"method":"eth_sendRawTransaction","params":["x"],"id":382,"jsonrpc":"2.0"}',
requestMethod: 'POST',
url: 'https://mainnet.infura.io/v3/xxx' },
method: 'sendTransaction',
transaction:
{ type: 2,
chainId: 1,
nonce: 11,
maxPriorityFeePerGas: BigNumber { _hex: '0x3b9aca00', _isBigNumber: true },
maxFeePerGas: BigNumber { _hex: '0x1e035da91e', _isBigNumber: true },
gasPrice: null,
gasLimit: BigNumber { _hex: '0x0b58fd', _isBigNumber: true },
to: '0x34b4Df75a17f8B3a6Eff6bBA477d39D701f5e92c',
value: BigNumber { _hex: '0x0853a0d2313c0064', _isBigNumber: true },
data: '0xa185ae950000000000000000000000000000000000000000000000000000000000000006',
accessList: [],
hash: 'x',
v: 0,
r: 'x',
s: 'x',
from: 'xxx',
confirmations: 0 },
transactionHash: 'x' }
Beta Was this translation helpful? Give feedback.
All reactions