From f3b69e283ce6f54968ca96fecac9ecbeb706f9bc Mon Sep 17 00:00:00 2001 From: lyh169 Date: Tue, 29 Aug 2023 10:58:27 +0800 Subject: [PATCH] fix the query gas calculate --- 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 d909b2d1ac..891af844b3 100644 --- a/x/wasm/keeper/query_plugins.go +++ b/x/wasm/keeper/query_plugins.go @@ -70,7 +70,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)