func (c *CoinsType) GetAssets(tx *types.Transaction) ([]*types.Asset, error) {
	assets, err := c.ExecTypeBase.GetAssets(tx)
	if err != nil || len(assets) == 0 {
		return nil, err
	}
	types := c.GetConfig()
	assets[0].Symbol = types.GetCoinSymbol()
	if assets[0].Symbol == "bty" {
		assets[0].Symbol = "BTY"
	}
	return assets, nil
}
GetAssets return asset list
package types
import (
	"reflect"
	"github.com/33cn/chain33/types"
)
const (
	CoinsActionTransfer = 1
	CoinsActionGenesis = 2
	CoinsActionWithdraw = 3
	CoinsActionTransferToExec = 10
)
var (
	CoinsX = "coins"
	ExecerCoins = []byte(CoinsX)
	actionName  = map[string]int32{
		"Transfer":       CoinsActionTransfer,
		"TransferToExec": CoinsActionTransferToExec,
		"Withdraw":       CoinsActionWithdraw,
		"Genesis":        CoinsActionGenesis,
	}
	logmap = make(map[int64]*types.LogInfo)
)
func init() {
	types.AllowUserExec = append(types.AllowUserExec, ExecerCoins)
	types.RegFork(CoinsX, InitFork)
	types.RegExec(CoinsX, InitExecutor)
}
func InitFork(cfg *types.Chain33Config) {
	cfg.RegisterDappFork(CoinsX, "Enable", 0)
}
func InitExecutor(cfg *types.Chain33Config) {
	types.RegistorExecutor(CoinsX, NewType(cfg))
}
type CoinsType struct {
	types.ExecTypeBase
}
func NewType(cfg *types.Chain33Config) *CoinsType {
	c := &CoinsType{}
	c.SetChild(c)
	c.SetConfig(cfg)
	return c
}
func (c *CoinsType) GetPayload() types.Message {
	return &CoinsAction{}
}
func (c *CoinsType) GetName() string {
	return CoinsX
}
func (c *CoinsType) GetLogMap() map[int64]*types.LogInfo {
	return logmap
}
func (c *CoinsType) GetTypeMap() map[string]int32 {
	return actionName
}
func (c *CoinsType) DecodePayloadValue(tx *types.Transaction) (string, reflect.Value, error) {
	name, value, err := c.decodePayloadValue(tx)
	return name, value, err
}
func (c *CoinsType) decodePayloadValue(tx *types.Transaction) (string, reflect.Value, error) {
	var action CoinsAction
	if tx.GetPayload() == nil {
		return "", reflect.ValueOf(nil), types.ErrActionNotSupport
	}
	err := types.Decode(tx.Payload, &action)
	if err != nil {
		return "", reflect.ValueOf(nil), err
	}
	var name string
	var value types.Message
	switch action.Ty {
	case CoinsActionTransfer:
		name = "Transfer"
		value = action.GetTransfer()
	case CoinsActionTransferToExec:
		name = "TransferToExec"
		value = action.GetTransferToExec()
	case CoinsActionWithdraw:
		name = "Withdraw"
		value = action.GetWithdraw()
	case CoinsActionGenesis:
		name = "Genesis"
		value = action.GetGenesis()
	}
	if value == nil {
		return "", reflect.ValueOf(nil), types.ErrActionNotSupport
	}
	return name, reflect.ValueOf(value), nil
}
func (c *CoinsType) RPC_Default_Process(action string, msg interface{}) (*types.Transaction, error) {
	var create *types.CreateTx
	if _, ok := msg.(*types.CreateTx); !ok {
		return nil, types.ErrInvalidParam
	}
	create = msg.(*types.CreateTx)
	if create.IsToken {
		return nil, types.ErrNotSupport
	}
	tx, err := c.AssertCreate(create)
	if err != nil {
		return nil, err
	}
	types := c.GetConfig()
	if !types.IsPara() {
		tx.To = create.To
	}
	return tx, err
}