types

package
v1.66.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: BSD-3-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	//CoinsActionConfig  Config transfer or manager addrs
	CoinsActionConfig = 20

	//TyCoinsxManagerStatusLog config manager status log
	TyCoinsxManagerStatusLog = 601
)

Variables

View Source
var (
	TransferFlag_name = map[int32]string{
		0: "NONE",
		1: "ENABLE",
		2: "DISABLE",
	}
	TransferFlag_value = map[string]int32{
		"NONE":    0,
		"ENABLE":  1,
		"DISABLE": 2,
	}
)

Enum value maps for TransferFlag.

View Source
var (
	AccountOp_name = map[int32]string{
		0: "ADD",
		1: "DEL",
	}
	AccountOp_value = map[string]int32{
		"ADD": 0,
		"DEL": 1,
	}
)

Enum value maps for AccountOp.

View Source
var (
	ConfigType_name = map[int32]string{
		0: "INVALID",
		1: "TRANSFER",
		2: "ACCOUNTS",
	}
	ConfigType_value = map[string]int32{
		"INVALID":  0,
		"TRANSFER": 1,
		"ACCOUNTS": 2,
	}
)

Enum value maps for ConfigType.

View Source
var (
	CoinsxX = "coinsx"
	// ExecerCoins execer coins
	ExecerCoins = []byte(CoinsxX)
)
View Source
var File_coinsx_proto protoreflect.FileDescriptor

Functions

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor registers coins.

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork initials coins forks.

Types

type AccountOp

type AccountOp int32
const (
	AccountOp_ADD AccountOp = 0
	AccountOp_DEL AccountOp = 1
)

func (AccountOp) Descriptor

func (AccountOp) Descriptor() protoreflect.EnumDescriptor

func (AccountOp) Enum

func (x AccountOp) Enum() *AccountOp

func (AccountOp) EnumDescriptor deprecated

func (AccountOp) EnumDescriptor() ([]byte, []int)

Deprecated: Use AccountOp.Descriptor instead.

func (AccountOp) Number

func (x AccountOp) Number() protoreflect.EnumNumber

func (AccountOp) String

func (x AccountOp) String() string

func (AccountOp) Type

type CoinsConfig

type CoinsConfig struct {
	Ty ConfigType `protobuf:"varint,1,opt,name=ty,proto3,enum=types.ConfigType" json:"ty,omitempty"`
	// Types that are assignable to Value:
	//	*CoinsConfig_TransferFlag
	//	*CoinsConfig_ManagerAccounts
	Value isCoinsConfig_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

func (*CoinsConfig) Descriptor deprecated

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

Deprecated: Use CoinsConfig.ProtoReflect.Descriptor instead.

func (*CoinsConfig) GetManagerAccounts

func (x *CoinsConfig) GetManagerAccounts() *ManagerAccountsConfig

func (*CoinsConfig) GetTransferFlag

func (x *CoinsConfig) GetTransferFlag() *TransferFlagConfig

func (*CoinsConfig) GetTy

func (x *CoinsConfig) GetTy() ConfigType

func (*CoinsConfig) GetValue

func (m *CoinsConfig) GetValue() isCoinsConfig_Value

func (*CoinsConfig) ProtoMessage

func (*CoinsConfig) ProtoMessage()

func (*CoinsConfig) ProtoReflect

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

func (*CoinsConfig) Reset

func (x *CoinsConfig) Reset()

func (*CoinsConfig) String

func (x *CoinsConfig) String() string

type CoinsConfig_ManagerAccounts

type CoinsConfig_ManagerAccounts struct {
	ManagerAccounts *ManagerAccountsConfig `protobuf:"bytes,3,opt,name=managerAccounts,proto3,oneof"`
}

type CoinsConfig_TransferFlag

type CoinsConfig_TransferFlag struct {
	TransferFlag *TransferFlagConfig `protobuf:"bytes,2,opt,name=transferFlag,proto3,oneof"`
}

type CoinsxAction

type CoinsxAction struct {

	// Types that are assignable to Value:
	//	*CoinsxAction_Transfer
	//	*CoinsxAction_Withdraw
	//	*CoinsxAction_Genesis
	//	*CoinsxAction_TransferToExec
	//	*CoinsxAction_Config
	Value isCoinsxAction_Value `protobuf_oneof:"value"`
	Ty    int32                `protobuf:"varint,3,opt,name=ty,proto3" json:"ty,omitempty"`
	// contains filtered or unexported fields
}

message for execs.coinsx

func (*CoinsxAction) Descriptor deprecated

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

Deprecated: Use CoinsxAction.ProtoReflect.Descriptor instead.

func (*CoinsxAction) GetConfig

func (x *CoinsxAction) GetConfig() *CoinsConfig

func (*CoinsxAction) GetGenesis

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

func (*CoinsxAction) GetTransfer

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

func (*CoinsxAction) GetTransferToExec

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

func (*CoinsxAction) GetTy

func (x *CoinsxAction) GetTy() int32

func (*CoinsxAction) GetValue

func (m *CoinsxAction) GetValue() isCoinsxAction_Value

func (*CoinsxAction) GetWithdraw

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

func (*CoinsxAction) ProtoMessage

func (*CoinsxAction) ProtoMessage()

func (*CoinsxAction) ProtoReflect

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

func (*CoinsxAction) Reset

func (x *CoinsxAction) Reset()

func (*CoinsxAction) String

func (x *CoinsxAction) String() string

type CoinsxAction_Config

type CoinsxAction_Config struct {
	Config *CoinsConfig `protobuf:"bytes,6,opt,name=config,proto3,oneof"`
}

type CoinsxAction_Genesis

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

type CoinsxAction_Transfer

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

type CoinsxAction_TransferToExec

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

type CoinsxAction_Withdraw

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

type CoinsxType

type CoinsxType struct {
	types.ExecTypeBase
}

CoinsType defines exec type

func NewType

func NewType(cfg *types.Chain33Config) *CoinsxType

NewType new coinstype

func (*CoinsxType) DecodePayloadValue

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

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

func (*CoinsxType) GetAssets

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

GetAssets return asset list

func (*CoinsxType) GetLogMap

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

GetLogMap return log for map

func (*CoinsxType) GetName

func (c *CoinsxType) GetName() string

GetName return coins string

func (*CoinsxType) GetPayload

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

GetPayload return payload

func (*CoinsxType) GetTypeMap

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

GetTypeMap return actionname for map

func (*CoinsxType) RPC_Default_Process

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

RPC_Default_Process default process fo rpc

type ConfigType

type ConfigType int32
const (
	ConfigType_INVALID  ConfigType = 0
	ConfigType_TRANSFER ConfigType = 1
	ConfigType_ACCOUNTS ConfigType = 2
)

func (ConfigType) Descriptor

func (ConfigType) Descriptor() protoreflect.EnumDescriptor

func (ConfigType) Enum

func (x ConfigType) Enum() *ConfigType

func (ConfigType) EnumDescriptor deprecated

func (ConfigType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ConfigType.Descriptor instead.

func (ConfigType) Number

func (x ConfigType) Number() protoreflect.EnumNumber

func (ConfigType) String

func (x ConfigType) String() string

func (ConfigType) Type

type ManagerAccountsConfig

type ManagerAccountsConfig struct {
	Op       AccountOp `protobuf:"varint,1,opt,name=op,proto3,enum=types.AccountOp" json:"op,omitempty"`
	Accounts string    `protobuf:"bytes,2,opt,name=accounts,proto3" json:"accounts,omitempty"`
	// contains filtered or unexported fields
}

func (*ManagerAccountsConfig) Descriptor deprecated

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

Deprecated: Use ManagerAccountsConfig.ProtoReflect.Descriptor instead.

func (*ManagerAccountsConfig) GetAccounts

func (x *ManagerAccountsConfig) GetAccounts() string

func (*ManagerAccountsConfig) GetOp

func (x *ManagerAccountsConfig) GetOp() AccountOp

func (*ManagerAccountsConfig) ProtoMessage

func (*ManagerAccountsConfig) ProtoMessage()

func (*ManagerAccountsConfig) ProtoReflect

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

func (*ManagerAccountsConfig) Reset

func (x *ManagerAccountsConfig) Reset()

func (*ManagerAccountsConfig) String

func (x *ManagerAccountsConfig) String() string

type ManagerStatus

type ManagerStatus struct {
	TransferFlag    TransferFlag `protobuf:"varint,1,opt,name=transferFlag,proto3,enum=types.TransferFlag" json:"transferFlag,omitempty"`
	ManagerAccounts []string     `protobuf:"bytes,2,rep,name=managerAccounts,proto3" json:"managerAccounts,omitempty"`
	// contains filtered or unexported fields
}

func (*ManagerStatus) Descriptor deprecated

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

Deprecated: Use ManagerStatus.ProtoReflect.Descriptor instead.

func (*ManagerStatus) GetManagerAccounts

func (x *ManagerStatus) GetManagerAccounts() []string

func (*ManagerStatus) GetTransferFlag

func (x *ManagerStatus) GetTransferFlag() TransferFlag

func (*ManagerStatus) ProtoMessage

func (*ManagerStatus) ProtoMessage()

func (*ManagerStatus) ProtoReflect

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

func (*ManagerStatus) Reset

func (x *ManagerStatus) Reset()

func (*ManagerStatus) String

func (x *ManagerStatus) String() string

type ReceiptManagerStatus

type ReceiptManagerStatus struct {
	Prev *ManagerStatus `protobuf:"bytes,2,opt,name=prev,proto3" json:"prev,omitempty"`
	Curr *ManagerStatus `protobuf:"bytes,3,opt,name=curr,proto3" json:"curr,omitempty"`
	// contains filtered or unexported fields
}

func (*ReceiptManagerStatus) Descriptor deprecated

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

Deprecated: Use ReceiptManagerStatus.ProtoReflect.Descriptor instead.

func (*ReceiptManagerStatus) GetCurr

func (x *ReceiptManagerStatus) GetCurr() *ManagerStatus

func (*ReceiptManagerStatus) GetPrev

func (x *ReceiptManagerStatus) GetPrev() *ManagerStatus

func (*ReceiptManagerStatus) ProtoMessage

func (*ReceiptManagerStatus) ProtoMessage()

func (*ReceiptManagerStatus) ProtoReflect

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

func (*ReceiptManagerStatus) Reset

func (x *ReceiptManagerStatus) Reset()

func (*ReceiptManagerStatus) String

func (x *ReceiptManagerStatus) String() string

type TransferFlag

type TransferFlag int32

kvmvcc statedb not support 0 value

const (
	TransferFlag_NONE    TransferFlag = 0
	TransferFlag_ENABLE  TransferFlag = 1
	TransferFlag_DISABLE TransferFlag = 2
)

func (TransferFlag) Descriptor

func (TransferFlag) Enum

func (x TransferFlag) Enum() *TransferFlag

func (TransferFlag) EnumDescriptor deprecated

func (TransferFlag) EnumDescriptor() ([]byte, []int)

Deprecated: Use TransferFlag.Descriptor instead.

func (TransferFlag) Number

func (TransferFlag) String

func (x TransferFlag) String() string

func (TransferFlag) Type

type TransferFlagConfig

type TransferFlagConfig struct {
	Flag TransferFlag `protobuf:"varint,1,opt,name=flag,proto3,enum=types.TransferFlag" json:"flag,omitempty"`
	// contains filtered or unexported fields
}

func (*TransferFlagConfig) Descriptor deprecated

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

Deprecated: Use TransferFlagConfig.ProtoReflect.Descriptor instead.

func (*TransferFlagConfig) GetFlag

func (x *TransferFlagConfig) GetFlag() TransferFlag

func (*TransferFlagConfig) ProtoMessage

func (*TransferFlagConfig) ProtoMessage()

func (*TransferFlagConfig) ProtoReflect

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

func (*TransferFlagConfig) Reset

func (x *TransferFlagConfig) Reset()

func (*TransferFlagConfig) String

func (x *TransferFlagConfig) String() string

Jump to

Keyboard shortcuts

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