pub fn withdraw_unbonded_bluna(
    deps: DepsMut,
    env: Env,
    triggered_by_addr: String,
) -> UnbondHandlerResult {
    let state = STATE.load(deps.storage)?;
    let triggered_by = deps.api.addr_validate(&triggered_by_addr)?;
    let bluna_hub_address =
        query_contract_from_mem(deps.as_ref(), &state.memory_contract, ANCHOR_BLUNA_HUB_ID)?;

    // create the message for withdrawing unbonded bluna from anchor
    let withdraw_unbonded_msg = anchor_withdraw_unbonded_msg(bluna_hub_address)?;

    // Callback for after withdrawing the unbonded bluna
    let after_withdraw_msg = CallbackMsg::AfterWithdraw {
        triggered_by_addr: triggered_by.to_string(),
    }
    .to_cosmos_msg(&env.contract.address)?;

    Ok(Response::new()
        .add_attributes(vec![("action", "withdraw_unbonded_bluna")])
        .add_messages(vec![withdraw_unbonded_msg, after_withdraw_msg]))
}
/// Withdraws the unbonded bluna from Anchor
Withdraws the unbonded bluna from Anchor
Withdraws the unbonded bluna from Anchor
pub fn withdraw_unbonded_bluna(
    deps: DepsMut,
    env: Env,
    triggered_by_addr: String,
) -> UnbondHandlerResult {
    let state = STATE.load(deps.storage)?;
    let triggered_by = deps.api.addr_validate(&triggered_by_addr)?;
    let bluna_hub_address =
        query_contract_from_mem(deps.as_ref(), &state.memory_contract, ANCHOR_BLUNA_HUB_ID)?;
    // create the message for withdrawing unbonded bluna from anchor
    let withdraw_unbonded_msg = anchor_withdraw_unbonded_msg(bluna_hub_address)?;
    // Callback for after withdrawing the unbonded bluna
    let after_withdraw_msg = CallbackMsg::AfterWithdraw {
        triggered_by_addr: triggered_by.to_string(),
    }
    .to_cosmos_msg(&env.contract.address)?;
    Ok(Response::new()
        .add_attributes(vec![("action", "withdraw_unbonded_bluna")])
        .add_messages(vec![withdraw_unbonded_msg, after_withdraw_msg]))
}
pub fn withdraw_unbonded_bluna ( deps : DepsMut , env : Env , triggered_by_addr : String , ) -> UnbondHandlerResult { let state = STATE . load ( deps . storage ) ? ; let triggered_by = deps . api . addr_validate ( & triggered_by_addr ) ? ; let bluna_hub_address = query_contract_from_mem ( deps . as_ref ( ) , & state . memory_contract , ANCHOR_BLUNA_HUB_ID ) ? ; // create the message for withdrawing unbonded bluna from anchor let withdraw_unbonded_msg = anchor_withdraw_unbonded_msg ( bluna_hub_address ) ? ; // Callback for after withdrawing the unbonded bluna let after_withdraw_msg = CallbackMsg :: AfterWithdraw { triggered_by_addr : triggered_by . to_string ( ) , } . to_cosmos_msg ( & env . contract . address ) ? ; Ok ( Response :: new ( ) . add_attributes ( vec ! [ ( " " " " ) ] ) . add_messages ( vec ! [ withdraw_unbonded_msg after_withdraw_msg ] ) ) }
Withdraws the unbonded bluna from Anchor
Withdraws the unbonded bluna from Anchor
deps
DepsMut
env
Env
triggered_by_addr
String
deps
DepsMut
env
Env
triggered_by_addr
String