types

package
v0.0.0-...-3c905e5 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: BSD-3-Clause Imports: 6 Imported by: 11

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
)
View Source
const (
	//ForkFriendExecerKey ...
	ForkFriendExecerKey = "ForkFriendExecer"
)

Variables

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

Functions

func InitExecutor

func InitExecutor(cfg *types.ChainConfig)

InitExecutor registers coins.

func InitFork

func InitFork(cfg *types.ChainConfig)

InitFork initials coins forks.

Types

type CoinsAction

type CoinsAction struct {

	// Types that are assignable 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"`
	// contains filtered or unexported fields
}

message for execs.coins

func (*CoinsAction) Descriptor deprecated

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

Deprecated: Use CoinsAction.ProtoReflect.Descriptor instead.

func (*CoinsAction) GetGenesis

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

func (*CoinsAction) GetTransfer

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

func (*CoinsAction) GetTransferToExec

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

func (*CoinsAction) GetTy

func (x *CoinsAction) GetTy() int32

func (*CoinsAction) GetValue

func (m *CoinsAction) GetValue() isCoinsAction_Value

func (*CoinsAction) GetWithdraw

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

func (*CoinsAction) ProtoMessage

func (*CoinsAction) ProtoMessage()

func (*CoinsAction) ProtoReflect

func (x *CoinsAction) ProtoReflect() protoreflect.Message

func (*CoinsAction) Reset

func (x *CoinsAction) Reset()

func (*CoinsAction) String

func (x *CoinsAction) String() string

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(cfg *types.ChainConfig) *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