Skip to main content

New answers tagged

0 votes
Accepted

Transaction failed to sanitize accounts offsets correctly

The program_id was not correct!
xyzkal's user avatar
  • 21
0 votes

"anchor build" wont generate my "../target/types/program_name" file

I figured out the issue to this problem. I had to restart my WSL server in VS Code. Then I ran anchor test --skip-local-validator and it worked! The IDL file was generated accordingly. However, my ../...
TheLazySol's user avatar
0 votes

How can I programmatically swap with the Jupiter API?

First thing that needs to be done is fetching a quote. This can be done via the /v6/quote endpoint. Here we'll take an "inputMint" as a string for the token we want to swap from and use ...
Joey Meere's user avatar
0 votes

"anchor build" wont generate my "../target/types/program_name" file

Probably the VS Code TS server acting up. Try restarting it. ctrl + shift + p then type restart Typescript server` Hack, rrunning anchor test should build and deploy the program and run the tests
Jimii's user avatar
  • 2,234
0 votes

"anchor build" wont generate my "../target/types/program_name" file

it("Fund PDA with SOL", async () => { const transferInstruction = SystemProgram.transfer({ fromPubkey: wallet.publicKey, toPubkey: PDA, lamports: transferAmount, }); const transaction = ...
AbdulKarim's user avatar
0 votes

Set Mint Authority as PDA

Here is an example of an Anchor program instruction that creates a token2022 mint account with the metadata extension enable. You can use it as a starting point and update it to use a PDA as the mint ...
john's user avatar
  • 7,345
3 votes
Accepted

Fetching authorization rules PDA for a pNFT

You can access the authentication rules for a given pNFT by inspecting the token's metadata account. This can be done with umi, and mpl-token-metadata. Fetching the PDA and it's data will look ...
Joey Meere's user avatar
0 votes
Accepted

Error: failed to get recent blockhash: TypeError: fetch failed when running anchor test

You have probably gotten your IP blacklisted. Give it a few days / switch to a new provider. When I faced this error, I switched my provider/connection string to Helius, since program deployments ...
Jimii's user avatar
  • 2,234
1 vote

Fresh development environment fails to install required packages (NextJS/Typescript Env)

It looks like you might be missing some dependencies. According to https://github.com/anza-xyz/wallet-adapter/blob/master/APP.md#quick-setup-using-react-ui, you should run: yarn add \ @solana/...
Jon C's user avatar
  • 14.4k

Top 50 recent answers are included