diff --git a/x/common/keeper/keeper.go b/x/common/keeper/keeper.go index e1a070ee6..895abc2e2 100644 --- a/x/common/keeper/keeper.go +++ b/x/common/keeper/keeper.go @@ -95,9 +95,9 @@ func (k Keeper) SinglePlayer(ctx sdk.Context, contractAddress string, ResolveSin logger := k.Logger(ctx) err := k.SudoContractCall(ctx, contractAddress, ResolveSinglePlayer) if err != nil { - logger.Error(fmt.Sprintf("Game %s contract call error for single player", gameName)) + logger.Error(fmt.Sprintf("Game %s contract call error for single-player", gameName)) } else { - logger.Info(fmt.Sprintf("Game %s contract call for single player success", gameName)) + logger.Info(fmt.Sprintf("Game %s contract call for single-player success", gameName)) } } @@ -105,15 +105,15 @@ func (k Keeper) MultiPlayer(ctx sdk.Context, contractAddress string, SetupMultiP logger := k.Logger(ctx) err := k.SudoContractCall(ctx, contractAddress, SetupMultiPlayer) if err != nil { - logger.Error(fmt.Sprintf("Game %s contract call error for setup multi player", gameName)) + logger.Error(fmt.Sprintf("Game %s contract call error for setup multi-player", gameName)) } else { - logger.Info(fmt.Sprintf("Game %s contract call for setup multi player success", gameName)) + logger.Info(fmt.Sprintf("Game %s contract call for setup multi-player success", gameName)) } err = k.SudoContractCall(ctx, contractAddress, ResolveMultiPlayer) if err != nil { - logger.Error(fmt.Sprintf("Game %s contract call error for resolve multi player", gameName)) + logger.Error(fmt.Sprintf("Game %s contract call error for resolve multi-player", gameName)) } else { - logger.Info(fmt.Sprintf("Game %s contract call for single resolve multi success", gameName)) + logger.Info(fmt.Sprintf("Game %s contract call for resolve multi-player success", gameName)) } } diff --git a/x/common/types/message_register_contract.go b/x/common/types/message_register_contract.go index 5ed1983a7..1910ccdb8 100644 --- a/x/common/types/message_register_contract.go +++ b/x/common/types/message_register_contract.go @@ -20,6 +20,7 @@ func NewMsgRegisterContract( SecurityAddress: securityAddress, GameName: gameName, ContractAddress: contractAddress, + GameType: gameType, } } @@ -56,7 +57,7 @@ func (msg *MsgRegisterContract) ValidateBasic() error { } gameType := []uint64{1, 2, 3} if !slices.Contains(gameType, msg.GameType) { - return sdkerrors.Wrap(sdkerrors.ErrInvalidType, "invalid game type (%s)") + return sdkerrors.Wrap(sdkerrors.ErrInvalidType, "invalid game type, should be 1,2 or 3") } return nil