func NewMsgIssue(auth types.AccAddress, creator, symbol types.Name, amount types.Coin) MsgIssueCoin {
	return MsgIssueCoin{
		*msg.MustNewKuMsg(
			RouterKeyName,
			msg.WithAuth(auth),
			msg.WithData(Cdc(), &MsgIssueCoinData{
				Creator: creator,
				Symbol:  symbol,
				Amount:  amount,
			}),
		),
	}
}
NewMsgIssue new issue msg
package types
import (
	"github.com/KuChainNetwork/kuchain/chain/msg"
	"github.com/KuChainNetwork/kuchain/chain/types"
	sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
const RouterKey = ModuleName
var (
	RouterKeyName                    = types.MustName(RouterKey)
	_, _, _, _, _    types.KuMsgData = (*MsgCreateCoinData)(nil), (*MsgIssueCoinData)(nil), (*MsgBurnCoinData)(nil), (*MsgLockCoinData)(nil), (*MsgUnlockCoinData)(nil)
	_, _, _, _, _, _ types.Msg       = (*MsgTransfer)(nil), (*MsgCreateCoin)(nil), (*MsgIssueCoin)(nil), (*MsgBurnCoin)(nil), (*MsgLockCoin)(nil), (*MsgUnlockCoin)(nil)
)
type (
	KuMsg = types.KuMsg
)
type MsgTransfer struct {
	types.KuMsg
}
func NewMsgTransfer(auth types.AccAddress, from types.AccountID, to types.AccountID, amount Coins) MsgTransfer {
	return MsgTransfer{
		*msg.MustNewKuMsg(
			RouterKeyName,
			msg.WithAuth(auth),
			msg.WithTransfer(from, to, amount),
		),
	}
}
func (msg MsgTransfer) ValidateBasic() error {
	if err := msg.KuMsg.ValidateTransfer(); err != nil {
		return err
	}
	return nil
}
type MsgCreateCoin struct {
	types.KuMsg
}
type MsgCreateCoinData struct {
	Symbol        Name   `json:"symbol" yaml:"symbol"`                              
	Creator       Name   `json:"creator" yaml:"creator"`                            
	MaxSupply     Coin   `json:"max_supply" yaml:"max_supply"`                      
	CanIssue      bool   `json:"can_issue,omitempty" yaml:"can_issue"`              
	CanLock       bool   `json:"can_lock,omitempty" yaml:"can_lock"`                
	CanBurn       bool   `json:"can_burn,omitempty" yaml:"can_burn"`                
	IssueToHeight int64  `json:"issue_to_height,omitempty" yaml:"issue_to_height"`  
	InitSupply    Coin   `json:"init_supply" yaml:"init_supply"`                    
	Desc          []byte `json:"desc" yaml:"desc"`                                  
}
func (MsgCreateCoinData) Type() types.Name { return types.MustName("create@asset") }
func (msg MsgCreateCoinData) Sender() AccountID {
	return NewAccountIDFromName(msg.Creator)
}
func NewMsgCreate(auth types.AccAddress, creator types.Name, symbol types.Name, maxSupply types.Coin, canIssue, canLock, canBurn bool, issue2Height int64, initSupply types.Coin, desc []byte) MsgCreateCoin {
	return MsgCreateCoin{
		*msg.MustNewKuMsg(
			RouterKeyName,
			msg.WithAuth(auth),
			msg.WithData(Cdc(), &MsgCreateCoinData{
				Creator:       creator,
				Symbol:        symbol,
				MaxSupply:     maxSupply,
				CanIssue:      canIssue,
				CanLock:       canLock,
				CanBurn:       canBurn,
				IssueToHeight: issue2Height,
				InitSupply:    initSupply,
				Desc:          desc,
			}),
		),
	}
}
func (msg MsgCreateCoin) GetData() (MsgCreateCoinData, error) {
	res := MsgCreateCoinData{}
	if err := msg.UnmarshalData(Cdc(), &res); err != nil {
		return MsgCreateCoinData{}, sdkerrors.Wrapf(types.ErrKuMsgDataUnmarshal, "%s", err.Error())
	}
	return res, nil
}
func (msg MsgCreateCoin) ValidateBasic() error {
	if err := msg.KuMsg.ValidateTransfer(); err != nil {
		return err
	}
	data, err := msg.GetData()
	if err != nil {
		return err
	}
	if data.Creator.Empty() || data.Symbol.Empty() {
		return types.ErrNameNilString
	}
	if len(data.Desc) > CoinDescriptionLen {
		return ErrAssetDescriptorTooLarge
	}
	denom := types.CoinDenom(data.Creator, data.Symbol)
	if err := types.ValidateDenom(denom); err != nil {
		return err
	}
	if denom != data.MaxSupply.Denom || denom != data.InitSupply.Denom {
		return ErrAssetSymbolError
	}
	if data.MaxSupply.IsZero() {
		return ErrAssetIssueMaxSupplyShouldNoZero
	}
	if err := CheckCoinStatOpts(
		0,  
		data.CanIssue, data.CanLock,
		data.IssueToHeight,
		data.InitSupply, data.MaxSupply); err != nil {
		return err
	}
	return nil
}
type MsgIssueCoin struct {
	types.KuMsg
}
type MsgIssueCoinData struct {
	Symbol  Name `json:"symbol" yaml:"symbol"`    
	Creator Name `json:"creator" yaml:"creator"`  
	Amount  Coin `json:"amount" yaml:"amount"`    
}
func (MsgIssueCoinData) Type() types.Name { return types.MustName("issue") }
func (msg MsgIssueCoinData) Sender() AccountID {
	return NewAccountIDFromName(msg.Creator)
}