From 390fda719e359003881afd0a5dd8142de7b90ed4 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 24 Aug 2023 11:13:08 +0200 Subject: [PATCH] Fix gas calculation (#1567) (#1570) (cherry picked from commit bfaf589d8eb08faf52af1fb3b3c888f980a9a3ca) Co-authored-by: Christoph Otter --- x/wasm/keeper/query_plugins.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/wasm/keeper/query_plugins.go b/x/wasm/keeper/query_plugins.go index 6f7df819c2..4cd8f90bcb 100644 --- a/x/wasm/keeper/query_plugins.go +++ b/x/wasm/keeper/query_plugins.go @@ -72,7 +72,7 @@ func (q QueryHandler) Query(request wasmvmtypes.QueryRequest, gasLimit uint64) ( } func (q QueryHandler) GasConsumed() uint64 { - return q.Ctx.GasMeter().GasConsumed() + return q.gasRegister.ToWasmVMGas(q.Ctx.GasMeter().GasConsumed()) } type CustomQuerier func(ctx sdk.Context, request json.RawMessage) ([]byte, error)