Skip to content

Error: This transaction is not signed #3353

Answered by jochem-brouwer
duync2006 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, this is because you are using:

const serializedTx = tx.serialize()

Which you then try to send:

    const pTx = await web3.eth.sendSignedTransaction(
      Buffer.from(serializedTx).toString("hex"),

If you change this:

const serializedTx = tx.serialize()

to this:

const serializedTx = signedTx.serialize()

It works :)

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by jochem-brouwer
Comment options

You must be logged in to vote
1 reply
@jochem-brouwer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #3352 on April 10, 2024 12:56.