Skip to main content
20 events
when toggle format what by license comment
Jul 25 at 7:21 answer added Russo timeline score: 0
Nov 8, 2022 at 23:41 vote accept Qhapaq Qowi
Nov 8, 2022 at 23:41 answer added Qhapaq Qowi timeline score: 0
Nov 1, 2022 at 22:28 comment added Qhapaq Qowi @steveluscher I'm thinking that my provider might be messed up here in my tests. In the past when I had success, I noticed that my provider wallet was on the filesystem, but I realize now that it's using my Phantom wallet. Could that play a role? I'm using const provider = anchor.AnchorProvider.env(); anchor.setProvider(provider); to get my provider, but it's still using my Phantom wallet in the test as opposed to the FS wallet (and what solana config get outputs).
Oct 27, 2022 at 18:28 comment added Qhapaq Qowi Thanks for the correction! Somewhere along the line (maybe making the switch from an rpc() call to a txn with an ixn?), the error changed to Account does not exist, which is consistent with the inspector. It looks like that account is the feePayer of the txn, which I have as instructorPubKey, which is derived from findProgramAddress(). So my assumption is still that my seeds are messed up somehow, but I don't understand how... Or maybe I'm completely wrong and it's something else haha. The inspector also says that my (phantom) wallet pubkey is invalid as a signer. Not sure why...
Oct 27, 2022 at 18:21 comment added Qhapaq Qowi Here is the output of the inspector
Oct 27, 2022 at 7:04 comment added steveluscher Oh! Try not to serialize the message, but rather the transaction into the transaction wire format. Instead of txn.serializeMessage().toString("base64") do txn.serialize({requireAllSignatures: false, verifySignatures: false}).toString("base64").
Oct 25, 2022 at 18:19 comment added Qhapaq Qowi Interesting! That's odd, I wonder what I'm messing up here... 1. Yes, I was unsure if you simply wanted to see the output of serialize or the code itself, so I included the output on the first line as a comment as well as what the code looks like below. Here's the gist. 2. It is a Next.js app, but what is failing are just the tests which are not associated with the frontend, so Next.js is not being used here. In my frontend code using Next.js, my config does not contain swcMinify.
Oct 24, 2022 at 22:45 comment added steveluscher Interesting. There is no version 71, so something is malformed in that transaction. 1. Can you paste the transaction into gist.github.com and share it here? Make sure it contains no sensitive information and that executing it on the network could not cause any damage. 2. Would this application happen to be a Next.js app, and do you have swcMinify turned on in your config?
Oct 23, 2022 at 1:26 comment added Qhapaq Qowi So I've created the txn, added the ixn, and then run used console.log(txn.serializeMessage().toString("base64")); as suggested in the inspector. After pasting the output, I get the following message in the inspector: Transaction message version 71 deserialization is not supported. I haven't found references to this message after looking it up and am unsure how to move forward. Do I actually need to send the transaction first, or is simply defining it, adding the ixn, and logging the output of serialize() enough?
Oct 21, 2022 at 23:28 comment added steveluscher What you want to do is to take the output of serialize and paste it into the inspector: explorer.solana.com/tx/inspector. Then, you can simulate the transaction, in-browser, to see what's going on.
Oct 20, 2022 at 21:47 comment added Qhapaq Qowi I'm an idiot... Thanks for pointing that out haha. I'm not quite familiar with debugging in this manner. I tried rewriting the rpc call as a transaction with an instruction like so: const latestBlockhash = await connection.getLatestBlockhash("finalized"); const txn = new anchor.web3.Transaction({ feePayer: provider.wallet.publicKey, ...latestBlockhash, }); // txn.add(ixn); txn.serialize({ requireAllSignatures: false, verifySignatures: false }); And logging the txn. I'm looking up (on devnet) the recent blockhash, but don't see any logs
Oct 20, 2022 at 20:37 comment added steveluscher Your error message is from the client, and the other reporter's error is from the transaction log. How about this; get the serialized transaction from Anchor by replacing rpc() with transaction().serialize({requireAllSignatures: false, verifySignatures: false}) and then paste that transaction into explorer.solana.com/tx/inspector. That will let you simulate the transaction and read the logs (use the right cluster!).
Oct 20, 2022 at 19:24 history edited Qhapaq Qowi CC BY-SA 4.0
add provider in code
Oct 20, 2022 at 19:23 comment added Qhapaq Qowi Thanks for taking a look, Steve! Could be; thanks for the link. But the error is a bit different, which led me to think otherwise. Instead of "signer privilege escalated," I'm getting "Error processing instruction 0." I'm still learning, so I assumed the errors weren't all that related. My fault for not posting its entirety; I just edited my original post to include this and changes to the code based on Ademola's suggestions.
Oct 20, 2022 at 19:04 history edited Qhapaq Qowi CC BY-SA 4.0
added suggested code changes; added more to error description
Oct 19, 2022 at 17:51 comment added steveluscher This looks very similar to solana.stackexchange.com/questions/1583/…
Oct 13, 2022 at 18:40 answer added Ademola timeline score: 1
S Oct 13, 2022 at 18:32 review First questions
Oct 27, 2022 at 18:40
S Oct 13, 2022 at 18:32 history asked Qhapaq Qowi CC BY-SA 4.0