Transaction could not be decoded

This is my first attempt to use this service.
I made a POST request to https://mainnet.infura.io/v3/xyz with:
{
“id”:0,
“jsonrpc”:“2.0”,
“method”:“eth_sendRawTransaction”,
“params”:[“0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675”],
“chainId”:“1”,
“value”:“some string…”
}
And I got the following response:
{
“jsonrpc”: “2.0”,
“id”: 0,
“error”: {
“code”: -32602,
“message”: “transaction could not be decoded: could not decode RLP components: insufficient remaining input for short list”
}
}

Any pointers on how to fix this error?

Hi @pigfox

At first glance it seems that the raw data is wrong, could you please share with me the way you’re building the raw Transaction? Thank you.

This payload was from the documentation.

I just copied and pasted it to see if it would work.

Hi @pigfox

In order to send a transaction over Infura you will need to sign the transaction locally using web3.eth.sendRawTransaction() .

You may find the following example useful → https://besu.hyperledger.org/en/1.2.0/Using-Pantheon/Transactions/scripts/create_value_raw_transaction.js

We will update our docs as well to look meaningful, because at this point we have bogus data in our documentation.

I am using Golang for this project so I have found some code that does that but it needs the previous transaction id/hash.
How can I find that?