From bfaf589d8eb08faf52af1fb3b3c888f980a9a3ca 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) --- 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 9ce72d8448..01b764f14d 100644 --- a/x/wasm/keeper/query_plugins.go +++ b/x/wasm/keeper/query_plugins.go @@ -75,7 +75,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)