1

I use following .net core library to send signed transaction https://github.com/bmresearch/Solnet

I send the encoded raw transaction from react app with web3.js, and accept the string on server side, then do this:

var rpcClient = ClientFactory.GetClient(_solanaConfiguration.RpcUrl);
        
        var tx = Encoders.Base58.DecodeData(encodedRawTransaction);

        var firstSig = rpcClient.SendTransaction(tx);

But I get following response:

{"jsonrpc":"2.0","error":{"code":-32002,"message":"Transaction simulation failed: Blockhash not found","data":{"accounts":null,"err":"BlockhashNotFound","logs":[],"unitsConsumed":0}},"id":0}

I tried with node, which works, so I am signing tx correctly.

1
  • Are you on the right network? I got this error a few times when I created the blockhash on devnet, but tried to send to mainnet.
    – Jonas H.
    Commented Oct 3, 2022 at 20:07

1 Answer 1

3

Found the way, just encode base64 on client side instead base58, and use var firstSig = rpcClient.SendTransaction(tx); and tx as string base64.

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.