Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 7394
0 votes
1 answer
69 views

why "Error: memory allocation failed, out of memory" error?

payer = admin, seeds=[ b"FeeData", name.as_bytes().as_ref()], bump, )] pub fee_account: Account<'info, FeeData>, #[account( seeds = [ b"admin_roles"], // ensure no … )] pub domain_account: Account<'info, DomainData>, #[account( seeds=[ b"FeeData", name.as_bytes().as_ref()], bump, )] pub fee_account: Account<'info, FeeData …
breeze wang's user avatar
1 vote
1 answer
534 views

what's the correct way to declare an account for program to receive and store SOL?

I mean I just want a standard account to store SOL, and there is likelihood thatanchor have provide this type of account handy to use that I just not found. … = 8)] pub sol_faucet: Account<'info, NewAccount>, #[account(mut)] pub signer: Signer<'info>, pub system_program: Program<'info, System>, } #[account] pub struct NewAccount { } …
breeze wang's user avatar
1 vote
2 answers
54 views

how can anchor program A read account data from anchor program B with #account macro way?

Let's say program_b (which I don't have code, just know it's address) has declare PDA account data struct: #[account] #[derive(InitSpace)] pub struct FeeData { pub fee: u64, } and I got this account … I know there is account discriminator and why this error raise. …
breeze wang's user avatar
1 vote
1 answer
22 views

run across an verify interesting account on browser, how to the holder spend it?

we can see that it is off curve account. … How can one create account like this? An account assigned to System Program but off curve. How can the guy own this account spend tokens under it? …
breeze wang's user avatar
2 votes
2 answers
173 views

How many PDA accounts can I create? Is it unlimited?

I am going to store huge number of record for my on-chain program. Each record's size is small (likely 100Bytes), but need to store many(maybe millions) records on-chain. From what I have known presen …
breeze wang's user avatar
0 votes
1 answer
51 views

Are Tx process parallel? How are the account data guaranteed not overrided each other by sim...

Does runtime sort all input account an add mutex-locker to those accounts that are mutable? …
breeze wang's user avatar
0 votes
1 answer
41 views

The data that anchor' account stored surprise me, for a non-PDA account, it store all histor...

I suppose that only latest data were stored and old ones be covered or overwrited.Because 'new_account' is just a normal account, not PDA account, and should not alloc new space when accept different ' …
breeze wang's user avatar
4 votes
1 answer
279 views

What is the data size of a wallet account?

Also, I saw this code somewhere: Account { lamports: 100, data: data.to_vec(), owner: spl_token::id(), executable: false, rent_epoch … : 0, }; Is the data size that use to compute rent just the size of above data field or the size of whole Account struct? …
breeze wang's user avatar
0 votes
1 answer
27 views

Why my Option account is required when invoke from js client?

#[account( mut, seeds = [b"vault".as_ref()], bump )] pub sol_vault: SystemAccount<'info>, //the PDA account use to store coin. … : Option<Account<'info, TokenAccount>>, #[account( mut, )] pub mapping_token_mint: Option<Account<'info, Mint>>, pub token_program: Program<'info, Token>, pub associated_token_program …
breeze wang's user avatar
2 votes
1 answer
43 views

how to get an token account's Mint address on chain?

In my anchor program, I declare a uncheck account that will check by code inside instruction function /// CHECK: do check inside function. … #[account(mut)] pub user_ata: UncheckedAccount<'info>, and inside the functuon, I don't know how to get the mint property of user_ata account msg!("check user-ata owner: {:?}, user: {:?} …
breeze wang's user avatar
0 votes
1 answer
86 views

why "Transaction references a signature that is unnecessary" warning, and value of 'isSigner...

#[derive(Accounts)] pub struct Increment<'info> { #[account(mut)] pub counter: Account<'info, Counter>, } #[account] #[derive(InitSpace)] pub struct Counter { count: u64, } And my client … to participate signing as to change its account data. …
breeze wang's user avatar