func NewHandler(vk VoteKeeper) sdk.Handler {
	return func(ctx sdk.Context, msg sdk.Msg) sdk.Result {
		switch msg := msg.(type) {
		case types.StakeInMsg:
			return handleStakeInMsg(ctx, vk, msg)
		case types.StakeOutMsg:
			return handleStakeOutMsg(ctx, vk, msg)
		case types.ClaimInterestMsg:
			return handleClaimInterestMsg(ctx, vk, msg)
		case types.StakeInForMsg:
			return handleStakeInForMsg(ctx, vk, msg)
		default:
			errMsg := fmt.Sprintf("Unrecognized vote msg type: %v", reflect.TypeOf(msg).Name())
			return sdk.ErrUnknownRequest(errMsg).Result()
		}
	}
}
NewHandler - Handle all "vote" type messages.
package vote
import (
	"fmt"
	"reflect"
	linotypes "github.com/lino-network/lino/types"
	"github.com/lino-network/lino/x/vote/types"
	sdk "github.com/cosmos/cosmos-sdk/types"
)