From 1570e432a93860c62a3d38fe2cc64cc41c7d03ba Mon Sep 17 00:00:00 2001 From: lyh169 Date: Fri, 1 Sep 2023 14:57:43 +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 41c32c805..27e0adfff 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)