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: check every module's Msg #271

Merged
merged 5 commits into from
Jun 5, 2023
Merged

fix: check every module's Msg #271

merged 5 commits into from
Jun 5, 2023

Conversation

jingjunLi
Copy link
Contributor

@jingjunLi jingjunLi commented Jun 1, 2023

Description

check every module‘s Msg implementation:

  • Whether msg is added to the RegisterInterfaces method
  • RegisterCodec is obsolete and has not been processed yet
  • Check that all msgs implement the interface of sdk.Msg

Rationale

they were used by GreenfieldScan.

Example

NA

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@jingjunLi jingjunLi changed the title Fix missed msg fix: check every module's Msg Jun 1, 2023
@jingjunLi jingjunLi requested review from fynnss and yutianwu June 1, 2023 07:35
@jingjunLi jingjunLi added the r4r label Jun 1, 2023
@@ -14,6 +14,7 @@ func RegisterCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgEditStorageProvider{}, "sp/EditStorageProvider", nil)
cdc.RegisterConcrete(&MsgUpdateSpStoragePrice{}, "sp/UpdateSpStoragePrice", nil)
cdc.RegisterConcrete(&DepositAuthorization{}, "sp/DepositAuthorization", nil)
cdc.RegisterConcrete(&MsgUpdateParams{}, "sp/MsgUpdateParams", nil)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is only this one with the Msg prefix? And isn't Amino already deprecated?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just remove this func func RegisterCodec(cdc *codec.LegacyAmino) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a mistake. I add it when tested, it will be deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

func RegisterCodec(cdc *codec.LegacyAmino) can not remove, it was used in
(AppModuleBasic) RegisterLegacyAminoCodec, which is used by greendfield-cosmos-sdk.

@fynnss fynnss merged commit a589afb into develop Jun 5, 2023
5 checks passed
@unclezoro unclezoro deleted the fix-missed-msg branch August 16, 2023 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants