types

package
v0.0.0-...-3606b63 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2019 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CoinsActionTransfer defines const number
	CoinsActionTransfer = 1
	// CoinsActionGenesis  defines const coinsactiongenesis number
	CoinsActionGenesis = 2
	// CoinsActionWithdraw defines const number coinsactionwithdraw
	CoinsActionWithdraw = 3
	// CoinsActionTransferToExec defines const number coinsactiontransfertoExec
	CoinsActionTransferToExec = 10
)

Variables

View Source
var (
	// CoinsX defines a global string
	CoinsX = "coins"
	// ExecerCoins execer coins
	ExecerCoins = []byte(CoinsX)
)

Functions

This section is empty.

Types

type CoinsAction

type CoinsAction struct {
	// Types that are valid to be assigned to Value:
	//	*CoinsAction_Transfer
	//	*CoinsAction_Withdraw
	//	*CoinsAction_Genesis
	//	*CoinsAction_TransferToExec
	Value                isCoinsAction_Value `protobuf_oneof:"value"`
	Ty                   int32               `protobuf:"varint,3,opt,name=ty,proto3" json:"ty,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

message for execs.coins

func (*CoinsAction) Descriptor

func (*CoinsAction) Descriptor() ([]byte, []int)

func (*CoinsAction) GetGenesis

func (m *CoinsAction) GetGenesis() *types.AssetsGenesis

func (*CoinsAction) GetTransfer

func (m *CoinsAction) GetTransfer() *types.AssetsTransfer

func (*CoinsAction) GetTransferToExec

func (m *CoinsAction) GetTransferToExec() *types.AssetsTransferToExec

func (*CoinsAction) GetTy

func (m *CoinsAction) GetTy() int32

func (*CoinsAction) GetValue

func (m *CoinsAction) GetValue() isCoinsAction_Value

func (*CoinsAction) GetWithdraw

func (m *CoinsAction) GetWithdraw() *types.AssetsWithdraw

func (*CoinsAction) ProtoMessage

func (*CoinsAction) ProtoMessage()

func (*CoinsAction) Reset

func (m *CoinsAction) Reset()

func (*CoinsAction) String

func (m *CoinsAction) String() string

func (*CoinsAction) XXX_DiscardUnknown

func (m *CoinsAction) XXX_DiscardUnknown()

func (*CoinsAction) XXX_Marshal

func (m *CoinsAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CoinsAction) XXX_Merge

func (dst *CoinsAction) XXX_Merge(src proto.Message)

func (*CoinsAction) XXX_OneofFuncs

func (*CoinsAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*CoinsAction) XXX_Size

func (m *CoinsAction) XXX_Size() int

func (*CoinsAction) XXX_Unmarshal

func (m *CoinsAction) XXX_Unmarshal(b []byte) error

type CoinsAction_Genesis

type CoinsAction_Genesis struct {
	Genesis *types.AssetsGenesis `protobuf:"bytes,2,opt,name=genesis,proto3,oneof"`
}

type CoinsAction_Transfer

type CoinsAction_Transfer struct {
	Transfer *types.AssetsTransfer `protobuf:"bytes,1,opt,name=transfer,proto3,oneof"`
}

type CoinsAction_TransferToExec

type CoinsAction_TransferToExec struct {
	TransferToExec *types.AssetsTransferToExec `protobuf:"bytes,5,opt,name=transferToExec,proto3,oneof"`
}

type CoinsAction_Withdraw

type CoinsAction_Withdraw struct {
	Withdraw *types.AssetsWithdraw `protobuf:"bytes,4,opt,name=withdraw,proto3,oneof"`
}

type CoinsType

type CoinsType struct {
	types.ExecTypeBase
}

CoinsType defines exec type

func NewType

func NewType() *CoinsType

NewType new coinstype

func (*CoinsType) DecodePayloadValue

func (c *CoinsType) DecodePayloadValue(tx *types.Transaction) (string, reflect.Value, error)

DecodePayloadValue 为了性能考虑,coins 是最常用的合约,我们这里不用反射吗,做了特殊化的优化

func (*CoinsType) GetAssets

func (c *CoinsType) GetAssets(tx *types.Transaction) ([]*types.Asset, error)

GetAssets return asset list

func (*CoinsType) GetLogMap

func (c *CoinsType) GetLogMap() map[int64]*types.LogInfo

GetLogMap return log for map

func (*CoinsType) GetName

func (c *CoinsType) GetName() string

GetName return coins string

func (*CoinsType) GetPayload

func (c *CoinsType) GetPayload() types.Message

GetPayload return payload

func (*CoinsType) GetTypeMap

func (c *CoinsType) GetTypeMap() map[string]int32

GetTypeMap return actionname for map

func (*CoinsType) RPC_Default_Process

func (c *CoinsType) RPC_Default_Process(action string, msg interface{}) (*types.Transaction, error)

RPC_Default_Process default process fo rpc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL