You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be nice to have this before launch/video demo
Basic outline
two accounts - 1 holding a long ass list, 1 holding count
data is just straight bytes denoting parameters (32 for payee key, 8 for amount, 8 for duration = 48 bytes total per entry)
start with just one account (max size = 10MB = 10,000,000B = ~200,000 48B entries), can upgrade later if needed
all the function does is
validates the pda
takes current list, withdraws rent from account to signer, allocates new account with space for a new entry (payer is signer), appends new entry to list and populates new account data
PDA seed schemes:
let registry_seeds = &[
b"subscription_registry",
&count.to_le_bytes(),
];
let counter_seeds = &[
b"registry_counter",
];
Question
Should subscriptions just be automatically be added to registry upon the first creation of one? (default: no)
would mean that literally every subscription is on the registry but also could clog registry with dummy/test subscriptions that don't actually need to be stored
also ig if products wanted to limit renewals to their own cranks opting out of the registry is helpful ig... but if ppl paying then the info is out there...
Checking
Check if the subscription is actually initialized when they go to add it by taking in the count as an input
This way someone cannot just bullshit a list
To Do
Constant time lookup (prevent duplicating a subscription using hash map)
Also possible solution to previous question, could allow user the option to add a subscription to registry with an input bool
The text was updated successfully, but these errors were encountered:
Would be nice to have this before launch/video demo
Basic outline
PDA seed schemes:
Question
Checking
To Do
The text was updated successfully, but these errors were encountered: