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
becoming a sort of dev ux standard + saves on compute inside program instructions, which is something we could feasibly care about - rn a full renew takes up ~15k/20k compute units
main tasks here:
for all existing PDAs (besides token/mint accounts)
add a bump field in the state.rs
if the program initializes the PDA, make sure to initialize it with enough space to hold the bump
whenever that PDA is passed into an instruction and validated, use create_program_address and include the bump as a seed
change the current check_pda helper to maybe take in another with_bump: bool parameter and use create_program_address or find_program_address based on that
OR add a check_pda_with_bump function
note:
for Subscription metadata, please add the bump at the end of the struct because my initialize.js script deserializes some stuff with kinda hardcoded values so adding it at the beginning would break that, but at the end its all good.
also for subscription metadata, store the count seed
also:
if whoever's implementing this has the time, throw in changes to check_initialized_ata to 1) be renamed to check_ata_initialized and run check_ata within it so you don't have to run both
The text was updated successfully, but these errors were encountered:
becoming a sort of dev ux standard + saves on compute inside program instructions, which is something we could feasibly care about - rn a full renew takes up ~15k/20k compute units
main tasks here:
state.rs
create_program_address
and include the bump as a seedcheck_pda
helper to maybe take in anotherwith_bump: bool
parameter and usecreate_program_address
orfind_program_address
based on thatcheck_pda_with_bump
functionnote:
initialize.js
script deserializes some stuff with kinda hardcoded values so adding it at the beginning would break that, but at the end its all good.also:
check_initialized_ata
to 1) be renamed tocheck_ata_initialized
and runcheck_ata
within it so you don't have to run bothThe text was updated successfully, but these errors were encountered: