-
Notifications
You must be signed in to change notification settings - Fork 643
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
chore: use context.Context and appmodule.Environment in 08-wasm #7880
base: main
Are you sure you want to change the base?
Conversation
Quality Gate passed for 'ibc-go'Issues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This mostly looks good to me. Left a couple of comments and I also think we can safely change the sdk.Context uses in querier as well, as that is just a callback interface for wasmvm, so no wasmd usage there.
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
|
||
"github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" | ||
) | ||
|
||
// emitStoreWasmCodeEvent emits a store wasm code event | ||
func emitStoreWasmCodeEvent(ctx sdk.Context, checksum types.Checksum) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this, we have done another approach in transfer which I think is a little better: make the function a receiver function on the keeper and just pass in the context:
func (k Keeper) EmitTransferEvent(ctx context.Context
|
||
func moduleLogger(ctx sdk.Context) log.Logger { | ||
return ctx.Logger().With("module", "x/"+exported.ModuleName+"-"+types.ModuleName) | ||
func (k Keeper) Logger(_ context.Context) log.Logger { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the context still there due to some interface that needs to be satisifed?
Description
stacked PR of #7866
supercedes: #7836
Closes: #7712
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.