timewave-computer / covenants

Apache License 2.0
17 stars 4 forks source link

review `StdError` usage across v2 contracts #179

Open bekauz opened 7 months ago

bekauz commented 7 months ago

currently there are some cases in v2 contracts where we return StdError variants for no particular reason.

e.g. the following example could easily deserve its own enum variant of UnauthorizedDenomDistribution or something along those lines:

if explicit_denoms.contains(&denom) {
    return Err(NeutronError::Std(StdError::generic_err(
        "unauthorized denom distribution",
    )));
}