interchain-security
interchain-security copied to clipboard
fix: move message validation logic to msg_server.go
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