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: move message validation logic to msg_server.go #2473

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

crStiv
Copy link

@crStiv crStiv commented Jan 11, 2025

Description

This PR moves the message validation logic from ValidateBasic methods in msg.go to the corresponding message handlers in msg_server.go, as ValidateBasic is now deprecated in Cosmos SDK v47 and v50.

Changes

  • Moved validation logic from ValidateBasic methods to corresponding message handlers
  • Added helper validation functions:
    • validateDeprecatedChainId
    • validateProviderAddress
  • Updated validation for all message types:
    • MsgAssignConsumerKey
    • MsgChangeRewardDenoms
    • MsgSubmitConsumerMisbehaviour
    • MsgSubmitConsumerDoubleVoting
    • MsgOptIn
    • MsgOptOut
    • MsgSetConsumerCommissionRate
    • MsgCreateConsumer
    • MsgUpdateConsumer
    • MsgRemoveConsumer

Related Issues

Fixes #2149

@crStiv crStiv requested review from a team as code owners January 11, 2025 01:08
@github-actions github-actions bot added the C:x/provider Assigned automatically by the PR labeler label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/provider Assigned automatically by the PR labeler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move message validation logic to msg_server.go
1 participant