fix: enforce wasmbind uses msg server on tokenfactory set denom metadata path#329
Conversation
WalkthroughThis pull request refactors the Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
wasmbinding/tokenfactory/message_plugin.go (1)
66-66: Consider removing unusedb bankkeeper.Keeperparameter fromPerformCreateDenom.After this refactor, the
bparameter is no longer used insidePerformCreateDenomsincePerformSetMetadatano longer requires it. The parameter is passed in from callers (line 58, and in tests) but serves no purpose now.♻️ Proposed cleanup
-func PerformCreateDenom(f *tokenfactorykeeper.Keeper, b bankkeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, createDenom *tfbindingtypes.CreateDenom) ([]byte, error) { +func PerformCreateDenom(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, createDenom *tfbindingtypes.CreateDenom) ([]byte, error) {This would also require updating callers in
CreateDenom(line 58) and test files.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@wasmbinding/tokenfactory/message_plugin.go` at line 66, Remove the now-unused bankkeeper parameter from PerformCreateDenom: delete the `b bankkeeper.Keeper` parameter from the PerformCreateDenom signature and update all callers (notably the CreateDenom call site and any tests that pass a bankkeeper) to stop passing that argument; also update any related function declarations/imports to reflect the new signature (e.g., tests, helper calls) and run tests to ensure compilation after removing the unused parameter.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@wasmbinding/tokenfactory/message_plugin.go`:
- Line 66: Remove the now-unused bankkeeper parameter from PerformCreateDenom:
delete the `b bankkeeper.Keeper` parameter from the PerformCreateDenom signature
and update all callers (notably the CreateDenom call site and any tests that
pass a bankkeeper) to stop passing that argument; also update any related
function declarations/imports to reflect the new signature (e.g., tests, helper
calls) and run tests to ensure compilation after removing the unused parameter.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4bcabda2-cfdf-4c59-913f-71d82cdc49ea
📒 Files selected for processing (3)
CHANGELOG.mdwasmbinding/tokenfactory/message_plugin.gowasmbinding/tokenfactory/message_plugin_test.go
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Description
Enforce wasmbind uses msg server on tokenfactory set denom metadata path
Type of change
How Has This Been Tested?
Added regression test
PR Checklist:
Make sure each step was done:
make lint-fix