pub fn find_refdb_pda(refdb_name: &str) -> (Pubkey, u8) {
    if refdb::REFDB_ONCHAIN_INIT {
        Pubkey::find_program_address(&[refdb_name.as_bytes()], &main_router::id())
    } else {
        (
            Pubkey::create_with_seed(&main_router_admin::id(), refdb_name, &main_router::id())
                .unwrap(),
            0,
        )
    }
}
/// Derives the RefDB storage address and the bump seed for the given string
Derives the RefDB storage address and the bump seed for the given string
Derives the RefDB storage address and the bump seed for the given string
pub fn find_refdb_pda(refdb_name: &str) -> (Pubkey, u8) {
    if refdb::REFDB_ONCHAIN_INIT {
        Pubkey::find_program_address(&[refdb_name.as_bytes()], &main_router::id())
    } else {
        (
            Pubkey::create_with_seed(&main_router_admin::id(), refdb_name, &main_router::id())
                .unwrap(),
            0,
        )
    }
}
pub fn find_refdb_pda ( refdb_name : & str ) -> ( Pubkey , u8 ) { if refdb :: REFDB_ONCHAIN_INIT { Pubkey :: find_program_address ( & [ refdb_name . as_bytes ( ) ] , & main_router :: id ( ) ) } else { ( Pubkey :: create_with_seed ( & main_router_admin :: id ( ) , refdb_name , & main_router :: id ( ) ) . unwrap ( ) , 0 , ) } }
Derives the RefDB storage address and the bump seed for the given string
Derives the RefDB storage address and the bump seed for the given string
refdb_name
&str
refdb_name
&str