Support debug_traceTransaction


I have this code:

const provider = new ethers.providers.JsonRpcProvider(moralisBscSpeedyNodeUrl);
const trace = await provider.send("debug_traceTransaction", txHash);

And this gives me this error:

Error: processing response error (body="{\"jsonrpc\":\"2.0\",\"id\":42,\"error\":{\"code\":-32601,\"message\":\"the method debug_traceTransaction does not exist/is not available\"}}\n", error={"code":-32601}, requestBody="{\"method\":\"debug_traceTransaction\",\"params\":[\"0x5a5a01a053998f352cb7fe8d2b7ed4ea1a4fce7f7c831677d0f0ca3d8b0d55ef\"],\"id\":42,\"jsonrpc\":\"2.0\"}", requestMethod="POST", url="", code=SERVER_ERROR, version=web/5.3.0)

It seems Moralis doesn’t support debug_traceTransaction. Do you plan to support it?

Thank you for making Moralis!

1 Like

Hey @lcswillems

I’m not ready for answering your question now:

Do you plan to support it?

Why do you try debug_traceTransaction? If you want get status of the transaction you can use:

const transactionReceipte = await provider.getTransactionReceipt(transactionHash);

The status of a transaction is 1 is successful or 0 if it was reverted.

I don’t want to get the status of the transaction, I want to debug it! I.e. to know why the transaction failed on the mainnet.

Hello! Any update on this?
It would be very useful enable the debug module.

Hi @TokenDev

That method is not supported. It’s a very unstable method which causes a lot of bugs.