Skip to main content
10 events
when toggle format what by license comment
Jul 7 at 13:06 comment added GoT Thank you Ahri, I opened a new question: solana.stackexchange.com/questions/15248/…
Jul 7 at 10:23 vote accept GoT
Jul 6 at 23:07 comment added McBain Then I suggest you accept the answer on this one & open another question asking how to dynamically allocate more PDAs while referencing this question and I'm sure you'll get some concrete code examples
Jul 6 at 16:31 comment added GoT I'm interested in it. I want to create something secure, but it's hard to find real examples (more than just the simple way to do it, with web3.js usage, etc). I'm a little bit stupid, I properly understand and learn by looking at other's code real use cases -_-'
Jul 5 at 8:41 comment added McBain All the code for this would go beyond the scope of these comments, but if this is interesting to you feel free accept this one & open another question asking around this specifically.
Jul 5 at 8:41 comment added McBain You could also just create one account and have a check in your instruction that checks if that account is full when you try to insert one more UserData. If it is, it throws an error and tells the client to create (using a different instruction for example) a new PDA and use that instead.
Jul 5 at 7:08 comment added GoT So, If I understand correctly I have to pre-create all accounts needed, and pass them to the method I want to call each time it's needed, or is there a way to: - initialize the default account - create an account if some_seed is bigger than X automatically - retrieve these accounts on demand
Jul 4 at 21:33 comment added McBain You can't make accounts larger than 10MB (solana.stackexchange.com/questions/4017/…). If you have more data than that to store, I suggest spreading it across multiple PDAs. A common way to do this is to have a counter in your seeds, e.g. [<some_seed>, 0] for the first account up until 10 MB, then the next PDA with [<some_seed>, 1], [<some_seed>, 2] etc.
Jul 4 at 19:52 comment added GoT Thank you for your answer but what about accounts with more than 10mb of data?
Jul 4 at 9:59 history answered McBain CC BY-SA 4.0