Developers Forum for XinFin XDC Network

Lokesh
Lokesh

Posted on

Possible solution for : JSON-RPC error -32603

I got this error with a "approve" function: allowance of the xrc20 standard.

I was making an approval tx, and immeidately was trying to fetch transaction receipt. It thrown out the JSON-RPC error with the error code of 32603.

Mostly this get resolved if you,
i) Try to increase the GAS or provide appropriate gasPrice
ii)Remove the function right after the approval process. In my case, I was trying to fetch transaction receipt.

await tokencontract.methods.approve(contractaddress, tokentosave)
.send({ from: accounts[0], gasLimit: 3000000 })
.on("transactionHash", async function (transactionHash) {
     console.log("xhhash", transactionHash);
     const [txhash, status] = await getTxnStatus(transactionHash); ---> removed this line and it worked
});  
Enter fullscreen mode Exit fullscreen mode

Discussion (0)