You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an error ack I got error code 10, which is documented as
// ErrInvalidMsg error when we cannot process the error returned from the contractErrInvalidMsg=errorsmod.Register(DefaultCodespace, 10, "invalid CosmosMsg from the contract")
However, it seems like the error ErrInvalidMsg is used in places where no contract created CosmosMsg is in case, such as
func (msgMsgUpdateAdmin) ValidateBasic() error {
if_, err:=sdk.AccAddressFromBech32(msg.Sender); err!=nil {
returnerrorsmod.Wrap(err, "sender")
}
if_, err:=sdk.AccAddressFromBech32(msg.Contract); err!=nil {
returnerrorsmod.Wrap(err, "contract")
}
if_, err:=sdk.AccAddressFromBech32(msg.NewAdmin); err!=nil {
returnerrorsmod.Wrap(err, "new admin")
}
ifstrings.EqualFold(msg.Sender, msg.NewAdmin) {
returnerrorsmod.Wrap(ErrInvalidMsg, "new admin is the same as the old") // <---- should not be ErrInvalidMsg
}
returnnil
}
For other usages of ErrInvalidMsg it would also be good to double check if "invalid CosmosMsg from the contract" is the correct definition.
The text was updated successfully, but these errors were encountered:
In an error ack I got error code 10, which is documented as
However, it seems like the error
ErrInvalidMsg
is used in places where no contract created CosmosMsg is in case, such asFor other usages of ErrInvalidMsg it would also be good to double check if "invalid CosmosMsg from the contract" is the correct definition.
The text was updated successfully, but these errors were encountered: