0

POA Sokol is a ethereum like testnet blockchain. I am using ether.js to make a contract call . The eth_estimateGas method in testnet gives this response but works in mainet:

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32016,
        "message": "The execution failed due to an exception."
    },
    "id": 42
}

I have asked question in POA forum regarding this issue: https://forum.poa.network/t/getting-error-the-execution-failed-due-to-an-exception-in-sokol-rpc-call-eth-estimategas/1747

For this i got response, The gas price is fixed to 1 Gwei. so i hard coded gasPrice:1 Gwei and gasLimit: 21,000 or 8000,000 but transaction always fails with these reasons:

{ Error: Transaction gas price is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce.
    at getResult (/home/ajit-soman/git/test-backend/node_modules/ethers/providers/json-rpc-provider.js:40:21)
    at exports.XMLHttpRequest.request.onreadystatechange (/home/ajit-soman/git/test-backend/node_modules/ethers/utils/web.js:111:30)
    at exports.XMLHttpRequest.dispatchEvent (/home/ajit-soman/git/test-backend/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
    at setState (/home/ajit-soman/git/test-backend/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
    at IncomingMessage.<anonymous> (/home/ajit-soman/git/test-backend/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
  code: -32010,
  data: undefined,
  url: 'https://sokol.poa.network',
  body: '{"method":"eth_sendRawTransaction","params":["0xf8891f843b9aca00837a120094a6dc5e5b21d32929b4545126ec95670032c0c17880a47b97008d000000000000000000000000000000000000000000000000016345785d8a000081bda0a11e20c0157f42d8182769ceb5caf804e34a7bcff095c58746356967ee653e34a013791ae11ef16993edfbc32cf585c0119f6c988c714f75f79d07f58f6eb5d3db"],"id":42,"jsonrpc":"2.0"}',
  responseText: '{"jsonrpc":"2.0","error":{"code":-32010,"message":"Transaction gas price is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce."},"id":42}\n',
  transaction: 
   { nonce: 31,
     gasPrice: BigNumber { _hex: '0x3b9aca00' },
     gasLimit: BigNumber { _hex: '0x7a1200' },
     to: '0xa6Dc5E5B21D32929b4545126ec95670032c0c178',
     value: BigNumber { _hex: '0x00' },
     data: '0x7b97008d000000000000000000000000000000000000000000000000016345785d8a0000',
     chainId: 77,
     v: 189,
     r: '0xa11e20c0157f42d8182769ceb5caf804e34a7bcff095c58746356967ee653e34',
     s: '0x13791ae11ef16993edfbc32cf585c0119f6c988c714f75f79d07f58f6eb5d3db',
     from: '0x29D02699195632360D743Eb568fa71B8c8f744dc',
     hash: '0xf65b934ca0655d1c4de607335bbf280828c2038fde0650c52c7d50e8f7dba39b' },
  transactionHash: '0xf65b934ca0655d1c4de607335bbf280828c2038fde0650c52c7d50e8f7dba39b' } 

If i increase the gas limit then i am getting this error:

Transaction cost exceeds current gas limit. Limit: 8000000, got: 9000000. Try decreasing supplied gas.

Need help. I am unable to figure out how to fix this issue and make a successful transaction calls.

  • This looks like your transaction is hanging in the TX pool. In this case you have to increase the gasPrice (not gasLimit) to rewrite it with the same nonce or you can increase the nonce, which would make a new transaction. However the new transaction will also hang in the queue as long as the tx with the smaller nonce is not processed. See ethereum.stackexchange.com/questions/31298/… – ivicaa Jan 12 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.