I'm using an Alchemy rpc endpoint to facilitate all my MetaMask transactions. I sent a transaction a few hours ago and it's stuck in pending, and now every few seconds (or.. every time I open MetaMask browser extension?), I see this eth_sendRawTransaction request that fails on my Alchemy app dashboard and the explorer.

It looks like this:

failed eth_sendRawTransaction

In order for me to debug, I want to know more about what the request actually was -- so I want to find out what the request parameters were. However, the string is in hex(?) and I'm not sure how to translate it to something human-readable.


I like that there's a tool-tip that links to documentation that explains the -32000 status code error, and that "already known" means that

This generally means the transaction already posted and is on the node in a pending state. Sometimes this error occurs when transactions fail at first but are retried when the node already knows of them.

But I'd love to see the params here without having to look through a blockchain explorer or the Alchemy mempool.

How do I decode the hex string?

I've tried using web3.utils.hexToString (errors) and web3.utils.hexToAscii (decodes to gibberish).

const { createAlchemyWeb3 } = require("@alch/alchemy-web3");

// Using HTTPS
const web3 = createAlchemyWeb3("https://eth-mainnet.alchemyapi.io/demo");


this script returns:

øpÏ'UÂ˵é2ÝRÿÉÕïvÃ]!~¤ÆÀ {çÒj4t}TS£ÆmP?ûâK¸S¤Bä6" [>^sh~DàGÃ:¶k4HAJîp;b¹ó{&;D

What am I missing to decode the params?

1 Answer 1


If you have the ABI of the contract, then try with this online tool


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.