From 875ad3e6ebdbcd1dff8115060afaeab9b22bc621 Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Thu, 24 Aug 2023 10:55:56 +0200 Subject: [PATCH] Fix gas calculation (#1567) (cherry picked from commit bfaf589d8eb08faf52af1fb3b3c888f980a9a3ca) --- 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 6f7df819c..4cd8f90bc 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)