Skip to main content

New answers tagged

2 votes

Observing a contract's behavior and withdrawing tokens from it

There's a few steps you'll need to take: Check if it's open-source. You may need to do some searching on their website, docs, and github for this. If it is, then your life has just got a whole lot ...
Joey Meere's user avatar
  • 1,294
0 votes

Getting dapp could be malicious warning during phantom wallet transaction

I don't have friends that are "known and established" in the Solana developer community. I asked how else I could verify that I wasn't malicious and got ghosted. Not sure what other options ...
Joe nick's user avatar
0 votes

TokenAccountNotFoundError when sending SPL tokens in React

I use createAssociatedTokenAccountIdempotent for instead and it works createAssociatedTokenAccountIdempotent(provider.connection, payer.payer, mint, payer.publicKey, {}, TOKEN_2022_PROGRAM_ID);
yuan wang's user avatar
2 votes

({"err":{"InstructionError":[2,"PrivilegeEscalation"]}})

Try this in withdraw_tokens function:- let bump = &[ctx.bumps.pda_signer]; let binding = ctx.accounts.mint.key(); let signer_seeds = &[&[b"sale", binding.as_ref(), ...
Aditya's user avatar
  • 157
0 votes

Getting dapp could be malicious warning during phantom wallet transaction

We have developed a Web3 project that currently supports user logins via several wallets, including the Phantom Wallet. However, we have encountered an issue where users attempting to log into our ...
Trevor's user avatar
  • 1
1 vote

SNS - Retrieve all Domains+Subdomains of an User

This is correct in all cases -- domains also have the owner written after 32 bytes. Here's the only data used for SNS accounts: https://github.com/solana-labs/solana-program-library/blob/...
Jon C's user avatar
  • 15.3k
0 votes

Getting dapp could be malicious warning during phantom wallet transaction

Email blowfish to unflag your site [email protected] Use signAndSendTransaction Method https://docs.phantom.app/solana/sending-a-transaction
Jimii's user avatar
  • 3,120
3 votes
Accepted

Transfer specific token to and from a known account

This looks okay, What I would add is checking whether the holding account to_ata is initialized, If it's not you could use anchor associated_token constraints #[derive(Accounts)] pub struct ...
Jimii's user avatar
  • 3,120
1 vote

how to decode data instructions with javascript

more easier solution to import the borsh decode from [email protected] (guess has similar solution for other anchor version) import { BorshInstructionCoder } from "@coral-xyz/anchor"; let coder = ...
Wei Tang's user avatar

Top 50 recent answers are included