religion-counter/onlyone

issues with signing the transaction with private key

brad-za opened this issue · 3 comments

helloo, I hope you are all well. first thank you for the example, I am learning a ton from reading and adapting the code.

I cannot however get a basic buy to work.

Error: Private key must be 32 bytes in length. (tx type=0 hash=not available (unsigned) nonce=12 value=125141000000000 signed=false hf=istanbul gasPrice=5000000000)

I get the error above. Do you think this is an issue with my address and private key? I have copied the adress and private key from my bsc wallet, I even tried changing the private key to hex.

any help would be appreciated thanks (:

Here is a sample private key: 0x9f119f3cccbb541abce8f5f6e23ab1434ddc35ffc5933e8438153aa135d12090
Are you sure that your private key has the same length?

thanks for the reply, that didn't really work for me, when my pkey looked like that I got errors. I tried reexporting from bsc wallet and not altering the key this time and it worked although now I am debugging error, invalid sender.

  • [ ]

You can post the transaction and the code if you need help with the debugging.