Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(wasm)!: fix type interface conversion #2192

Merged
merged 7 commits into from
Oct 14, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions x/nexus/keeper/wasmer_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}

func getCtx(querier wasmvm.Querier) sdk.Context {
return querier.(wasmkeeper.QueryHandler).Ctx
return querier.(*wasmkeeper.QueryHandler).Ctx

Check warning on line 25 in x/nexus/keeper/wasmer_engine.go

View check run for this annotation

Codecov / codecov/patch

x/nexus/keeper/wasmer_engine.go#L25

Added line #L25 was not covered by tests
milapsheth marked this conversation as resolved.
Show resolved Hide resolved
}

// Instantiate calls the inner engine and increments the transaction ID
Expand Down Expand Up @@ -73,7 +73,9 @@
gasLimit uint64,
deserCost wasmvmtypes.UFraction,
) (*wasmvmtypes.Response, uint64, error) {
defer w.msgIDGenerator.IncrID(getCtx(querier))
// wasmd passes a reference to the querier only for the Migrate method
// https://github.com/CosmWasm/wasmd/blob/21ec15a5c025bc0fa8c634691dc839ab77b9a7d2/x/wasm/keeper/keeper.go#L433
defer w.msgIDGenerator.IncrID(querier.(*wasmkeeper.QueryHandler).Ctx)

Check warning on line 78 in x/nexus/keeper/wasmer_engine.go

View check run for this annotation

Codecov / codecov/patch

x/nexus/keeper/wasmer_engine.go#L78

Added line #L78 was not covered by tests
milapsheth marked this conversation as resolved.
Show resolved Hide resolved

return w.WasmerEngine.Migrate(checksum, env, migrateMsg, store, goapi, querier, gasMeter, gasLimit, deserCost)
}
Expand Down
Loading