fn execute_remove_redeems(
    deps: DepsMut,
    _env: Env,
    info: MessageInfo,
    codes: Vec<String>,
) -> Result<Response, ContractError> {
    let config = TOKEN_INFO.load(deps.storage)?;
    if config.mint.is_none() || config.mint.as_ref().unwrap().minter != info.sender {
        return Err(Cw20ContractError::Unauthorized {}.into());
    }

    for code in codes {
        REEDEMS.remove(deps.storage, &code);
    }

    Ok(Response::new().add_attribute("action", "remove_redeems"))
}
/// Removes info about redeems from contract, can be performed by minter only
Removes info about redeems from contract, can be performed by minter only
Removes info about redeems from contract can be performed by minter only
fn execute_remove_redeems(
    deps: DepsMut,
    _env: Env,
    info: MessageInfo,
    codes: Vec<String>,
) -> Result<Response, ContractError> {
    let config = TOKEN_INFO.load(deps.storage)?;
    if config.mint.is_none() || config.mint.as_ref().unwrap().minter != info.sender {
        return Err(Cw20ContractError::Unauthorized {}.into());
    }
    for code in codes {
        REEDEMS.remove(deps.storage, &code);
    }
    Ok(Response::new().add_attribute("action", "remove_redeems"))
}
fn execute_remove_redeems ( deps : DepsMut , _env : Env , info : MessageInfo , codes : Vec < String > , ) -> Result < Response , ContractError > { let config = TOKEN_INFO . load ( deps . storage ) ? ; if config . mint . is_none ( ) || config . mint . as_ref ( ) . unwrap ( ) . minter != info . sender { return Err ( Cw20ContractError :: Unauthorized { } . into ( ) ) ; } for code in codes { REEDEMS . remove ( deps . storage , & code ) ; } Ok ( Response :: new ( ) . add_attribute ( " " , " " ) ) }
Removes info about redeems from contract, can be performed by minter only
Removes info about redeems from contract can be performed by minter only
deps
DepsMut
_env
Env
info
MessageInfo
codes
Vec<String>
deps
DepsMut
_env
Env
info
MessageInfo
codes
Vec<String>