package types

import (
"github.com/33cn/chain33/types"
)

// action for executor
${ACTIONIDTEXT}

${TYLOGACTIONTYPE}

var (
    logMap = ${LOGMAPTEXT}

    typeMap = ${TYPEMAPTEXT}
)

func init() {
    types.AllowUserExec = append(types.AllowUserExec, []byte(${EXECNAME}))
    types.RegistorExecutor(types.${EXECNAME}, NewType())
}

type ${TYPENAME} struct {
    types.ExecTypeBase
}

func NewType() *${TYPENAME} {
    c := &${TYPENAME}{}
    c.SetChild(c)
    return c
}

func (t *${TYPENAME}) GetPayload() types.Message {
    return &${ACTIONNAME}{}
}

func (t *${TYPENAME}) GetTypeMap() map[string]int32 {
    return typeMap
}

func (t *${TYPENAME}) GetLogMap() map[int64]*types.LogInfo {
    return logMap
}