pub fn execute_burn(deps: DepsMut, info: MessageInfo, amount: Uint128) -> StdResult<Response> {
    let config: Config = read_config(deps.storage)?;

    // Check only owner can call
    if config.owner != deps.api.addr_canonicalize(info.sender.as_str())? {
        return Err(StdError::generic_err("Unauthorized"));
    }

    // The spend limit is sanity-check, as this contract manages a large sum of GLOW supply
    if config.spend_limit < amount {
        return Err(StdError::generic_err("Cannot burn more than spend_limit"));
    }

    let glow_token = deps.api.addr_humanize(&config.glow_token)?.to_string();

    Ok(Response::new()
        .add_messages(vec![CosmosMsg::Wasm(WasmMsg::Execute {
            contract_addr: glow_token,
            funds: vec![],
            msg: to_binary(&Cw20ExecuteMsg::Burn { amount })?,
        })])
        .add_attributes(vec![("action", "burn"), ("amount", &amount.to_string())]))
}
/// Burn
/// Owner (governance contract) can execute a burn operation of `amount` of Glow tokens
Burn
Owner (governance contract) can execute a burn operation of `amount` of Glow tokens
Burn Owner ( governance contract ) can execute a burn operation of ` amount ` of Glow tokens
pub fn execute_burn(deps: DepsMut, info: MessageInfo, amount: Uint128) -> StdResult<Response> {
    let config: Config = read_config(deps.storage)?;
    // Check only owner can call
    if config.owner != deps.api.addr_canonicalize(info.sender.as_str())? {
        return Err(StdError::generic_err("Unauthorized"));
    }
    // The spend limit is sanity-check, as this contract manages a large sum of GLOW supply
    if config.spend_limit < amount {
        return Err(StdError::generic_err("Cannot burn more than spend_limit"));
    }
    let glow_token = deps.api.addr_humanize(&config.glow_token)?.to_string();
    Ok(Response::new()
        .add_messages(vec![CosmosMsg::Wasm(WasmMsg::Execute {
            contract_addr: glow_token,
            funds: vec![],
            msg: to_binary(&Cw20ExecuteMsg::Burn { amount })?,
        })])
        .add_attributes(vec![("action", "burn"), ("amount", &amount.to_string())]))
}
pub fn execute_burn ( deps : DepsMut , info : MessageInfo , amount : Uint128 ) -> StdResult < Response > { let config : Config = read_config ( deps . storage ) ? ; // Check only owner can call if config . owner != deps . api . addr_canonicalize ( info . sender . as_str ( ) ) ? { return Err ( StdError :: generic_err ( " " ) ) ; } // The spend limit is sanity-check, as this contract manages a large sum of GLOW supply if config . spend_limit < amount { return Err ( StdError :: generic_err ( " " ) ) ; } let glow_token = deps . api . addr_humanize ( & config . glow_token ) ? . to_string ( ) ; Ok ( Response :: new ( ) . add_messages ( vec ! [ CosmosMsg Wasm ( WasmMsg Execute { contract_addr glow_token funds vec [ ] msg to_binary ( Cw20ExecuteMsg Burn { amount } ) } ) ] ) . add_attributes ( vec ! [ ( " " " " ) ( " " amount to_string ( ) ) ] ) ) }
Burn
Owner (governance contract) can execute a burn operation of `amount` of Glow tokens
Burn Owner ( governance contract ) can execute a burn operation of ` amount ` of Glow tokens
deps
DepsMut
info
MessageInfo
amount
Uint128
deps
DepsMut
info
MessageInfo
amount
Uint128