Skip to content

Commit

Permalink
test: add WasmGasLimitQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yang committed Nov 4, 2024
1 parent f5d37ac commit 667aec8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions x/evm/precompile/test/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
const (
WasmGasLimitInstantiate uint64 = 1_000_000
WasmGasLimitExecute uint64 = 10_000_000
WasmGasLimitQuery uint64 = 200_000
)

// SetupWasmContracts stores all Wasm bytecode and has the "deps.Sender"
Expand Down Expand Up @@ -186,7 +187,7 @@ func AssertWasmCounterState(
&precompile.PrecompileAddr_Wasm,
true,
input,
WasmGasLimitInstantiate,
WasmGasLimitQuery,
)
s.Require().NoError(err)
s.Require().NotEmpty(ethTxResp.Ret)
Expand All @@ -207,12 +208,11 @@ func AssertWasmCounterState(

s.T().Log("Response is a JSON-encoded struct from the Wasm contract")
var wasmMsg wasm.RawContractMessage
err = json.Unmarshal(queryResp, &wasmMsg)
s.NoError(err)
s.NoError(json.Unmarshal(queryResp, &wasmMsg))
s.NoError(wasmMsg.ValidateBasic())

var typedResp QueryMsgCountResp
err = json.Unmarshal(wasmMsg, &typedResp)
s.NoError(err)
s.NoError(json.Unmarshal(queryResp, &typedResp))

s.EqualValues(wantCount, typedResp.Count)
s.EqualValues(deps.Sender.NibiruAddr.String(), typedResp.Owner)
Expand Down

0 comments on commit 667aec8

Please sign in to comment.