interchain-security icon indicating copy to clipboard operation
interchain-security copied to clipboard

fix: move message validation logic to msg_server.go

Open crStiv opened this issue 11 months ago • 0 comments

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 avatar Jan 11 '25 01:01 crStiv