Skip to main content

Questions tagged [program]

The tag has no usage guidance.

1 vote
1 answer
40 views

Why does CandyMachine use `cmp_pubkeys` function and not an `Eq` trait?

CandyMachine program has this function, which is used extensively in the program code: pub fn cmp_pubkeys(a: &Pubkey, b: &Pubkey) -> bool { sol_memcmp(a.as_ref(), b.as_ref(), ...
RowanStone's user avatar
1 vote
1 answer
215 views

How can I verify that a program has been called by another program

I have a program which should be allowed to be called by whitelisted programs only. Currently I solved the issue as such, but I wonder whether there are other more elegant solutions (maybe, by using ...
RowanStone's user avatar
1 vote
2 answers
276 views

Find msg.sender(payer of the tx) in a solana program

So i understand a msg.sender equivalent is the payer of the tx in solana , if so is there a way in vanilla solana or anchor to retrieve msg.sender i.e payer of the tx ? as i understand it if there are ...
Nabeel Naveed's user avatar
-1 votes
4 answers
116 views

Is there anything that prevents popular programs from being cloned hundreds of times by copycats?

There is a substantial precedent for various marketplaces getting trashed by copycats who reproduce original works hundreds of times in order to capture the lion share of the benefit by diluting out ...
OCDev's user avatar
  • 762
-1 votes
1 answer
52 views

What are ways to protect a novel program solution in order to protect the IP investment of development effort? [closed]

If a team of developers invest a lot of time to build a unique solution to solve a problem, what ways can investors in their efforts protect the effective IP of that work?
OCDev's user avatar
  • 762
0 votes
2 answers
91 views

Are all programs plainly visible within the blockchain? [closed]

Are all programs displayed in plain text? If so, is there a way to obfuscate them so that others are not able to see the contents of the program?
OCDev's user avatar
  • 762
1 vote
2 answers
128 views

Using Anchor, how to have PDA created without the PDA info being sent by the client?

Program: #[derive(Accounts)] pub struct Transact<'info> { #[account(init, payer=payer, space= 8 + 1 + 4, seeds=[b"transaction", payer.key.as_ref()], bump)] pub transaction: ...
DevelopingJoku's user avatar
-1 votes
1 answer
77 views

Is there a way to obfuscate programs so that other developers cannot reproduce my business without doing the hard work? [closed]

Are all programs plainly visible within the blockchain? Is there a way to prevent that when writing your program to protect the investment of development effort? If not, what would keep a popular ...
OCDev's user avatar
  • 762
1 vote
2 answers
154 views

How would one hash two different pubkeys inside an Anchor program?

I am trying to setup an account constraint as such: #[account( init, payer = creator, space = StateObj::space(), seeds = [ b"some-seed", user_partner0.key()....
TovarishFin's user avatar
7 votes
2 answers
222 views

how to transfer native SOL from program to user

I have SOL in my program account. Is it possible to transfer that native (NOT WSOL) SOL to user? If yes, How?
Gajesh Naik's user avatar
0 votes
1 answer
61 views

What is Owner Validation Program? [duplicate]

I was reading the source code of sollet.io. Whenever they are creating an ATA, they are also calling some instruction of the Owner Validation Program: https://github.com/project-serum/spl-token-wallet/...
itsfarseen's user avatar
2 votes
1 answer
253 views

Which program is this: 4MNPdKu9wFMvEeZBMt3Eipfs5ovVWTJb31pEXDJAAxX5?

I was trying to transfer a token from Wallet 1 -> Wallet 2 using sollet.io on testnet. It showed this error: failed to send transaction: Transaction simulation failed: Attempt to load a program ...
itsfarseen's user avatar
1 vote
3 answers
71 views

How to bulk update accounts?

Is there a way to update a field on all the accounts owned by a program at once? Say I have a bunch of PDAs Stake { amount: usize }. Is it possible to do amount = amount * 1.1 for multiple accounts in ...
itsfarseen's user avatar
11 votes
1 answer
338 views

Why is SOL refunded after a program deploy?

I've noticed that some of the SOL required to deploy a program is refunded after the deploy. What's going on to cause this? Is it that the program is uploaded to multiple accounts and then one of them ...
Callum M's user avatar
  • 3,190
8 votes
2 answers
749 views

How do I create an NFT using Anchor?

What is the simplest way to create an NFT using Anchor, without using the candy machine. The goal is to be able to mint a token and corresponding metadata. Ideally with a single instruction.
zfedoran's user avatar
  • 761

15 30 50 per page
1
6 7 8 9
10