Timeline for The data that anchor' account stored surprise me, for a non-PDA account, it store all history input data. Why?
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 16 at 2:27 | comment | added | breeze wang | yeah, I will create a new post on this question to get thing more clear. Thanks | |
Jan 15 at 9:08 | comment | added | Callum M |
You might want to ask another question, comments don't really work for Q+A! But if you have new_account2: Account<'info, NewAccount> that will be a NewAccount . If you have pub struct NewAccount2 { with the #[account] annotation somewhere, then you do new_account2: Account<'info, NewAccount2 then that'll show up as NewAccount2 . Remember you can only initialise to a public key once though (unless it's cleared + closed), so there's never overlap there.
|
|
Jan 15 at 3:14 | vote | accept | breeze wang | ||
Jan 15 at 3:08 | comment | added | breeze wang |
Suppose I add two more account: newAccount2 , newAccount3 , they all have same annotations and attribute, only name different. And initialize newAccount with pubkey1,pubkey2,pubkey3, initialize newAccount2 with pubkey2,pubkey3, pubkey4, initialize newAccount3 with pubkey3, pubkey4,pubkey5, then, I wonder how Anchor tell these apart when fetch out? Does anchor add a special field to account data, for example 'catalog_name' as field name, and store value newAccount1 or newAccount2 or newAccount3 in this special field?
|
|
Jan 15 at 2:50 | comment | added | breeze wang | Your explanation make sense. Thanks. | |
Jan 12 at 18:16 | history | answered | Callum M | CC BY-SA 4.0 |