Skip to content

[refactor] keeper constants #check-lint-warning

akrokr requested to merge akh/keeper_consts into develop

Adds constants to the keeper. This allows code that has the keeper (but not the mgr) to access constants. The impetus is for ante handlers, which only have the keeper.

It exposes GetConstants() for direct access. And GetConfigInt64(ctx, key) which deprecates and performs the same logic as fetchConfigInt64(ctx, mgr, key). Current use-cases (non-archived) are switched over and the helpers function can be removed at hard-fork.

It also adds one more use-case example: keeper.OrderBooksEnabled(ctx) a simple feature switch function so call-sites don't need to use mimir and consts directly.

NOTE: added the lint bypass as this touches versioned code but does not change functionality.

Edited by akrokr

Merge request reports