control

package
v0.0.0-...-8dfe50c Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ControllerMaps = make(ControllerMapsType, 0)

Functions

func Execute

func Execute(fun string, stub shim.ChaincodeStubInterface, args []string) peer.Response

func Init

func Init()

Types

type CTKChainCode

type CTKChainCode struct {
	// contains filtered or unexported fields
}

func (*CTKChainCode) AccountInfo

func (t *CTKChainCode) AccountInfo(stub shim.ChaincodeStubInterface, args []string) peer.Response

* * Account Info *

func (*CTKChainCode) AppendSuper

func (t *CTKChainCode) AppendSuper(stub shim.ChaincodeStubInterface, args []string) peer.Response

append ctk to become super node

func (*CTKChainCode) BindPool

func (t *CTKChainCode) BindPool(stub shim.ChaincodeStubInterface, args []string) peer.Response

* * Mining Bind Pool *

func (*CTKChainCode) BlockAward

func (t *CTKChainCode) BlockAward(stub shim.ChaincodeStubInterface, args []string) peer.Response

* * BlockAward *

func (*CTKChainCode) Exchange

func (t *CTKChainCode) Exchange(stub shim.ChaincodeStubInterface, args []string) peer.Response

* * Mining Exchange *

func (*CTKChainCode) FormatNumber

func (self *CTKChainCode) FormatNumber(number decimal.Decimal, precision int64) string

func (*CTKChainCode) GetCurrentDateString

func (self *CTKChainCode) GetCurrentDateString() string

func (*CTKChainCode) GetNeedFreezeCTK

func (self *CTKChainCode) GetNeedFreezeCTK(stub shim.ChaincodeStubInterface, tokenConfig *module.TokenConfig, role int) int

func (*CTKChainCode) GetNormalNodeAccounts

func (self *CTKChainCode) GetNormalNodeAccounts(stub shim.ChaincodeStubInterface) module.NodeAccounts

func (*CTKChainCode) GetPoolNodeAccounts

func (self *CTKChainCode) GetPoolNodeAccounts(stub shim.ChaincodeStubInterface) module.NodeAccounts

func (*CTKChainCode) GetSuperNodeAccounts

func (self *CTKChainCode) GetSuperNodeAccounts(stub shim.ChaincodeStubInterface) module.NodeAccounts

func (*CTKChainCode) GetTokenAccountInfo

func (self *CTKChainCode) GetTokenAccountInfo(stub shim.ChaincodeStubInterface, token, address string) *module.Account

func (*CTKChainCode) GetTokenAccountKey

func (self *CTKChainCode) GetTokenAccountKey(token, address string) string

func (*CTKChainCode) GetTokenInfo

func (self *CTKChainCode) GetTokenInfo(stub shim.ChaincodeStubInterface, token string) *module.TokenConfig

func (*CTKChainCode) Init

func (*CTKChainCode) InitGenesis

func (token *CTKChainCode) InitGenesis()

func (*CTKChainCode) Invoke

func (*CTKChainCode) MiningRatio

func (t *CTKChainCode) MiningRatio(stub shim.ChaincodeStubInterface, args []string) peer.Response

func (*CTKChainCode) PoolList

func (t *CTKChainCode) PoolList(stub shim.ChaincodeStubInterface, args []string) peer.Response

* * Pool accounts *

func (*CTKChainCode) Publish

func (self *CTKChainCode) Publish(stub shim.ChaincodeStubInterface, args []string) peer.Response

func (*CTKChainCode) QuitSuper

func (t *CTKChainCode) QuitSuper(stub shim.ChaincodeStubInterface, args []string) peer.Response

quit super node

func (*CTKChainCode) Register

func (t *CTKChainCode) Register(stub shim.ChaincodeStubInterface, args []string) peer.Response

* * Register Account *

func (*CTKChainCode) RegisterNodeAccounts

func (self *CTKChainCode) RegisterNodeAccounts(stub shim.ChaincodeStubInterface, role int, data []byte)

func (*CTKChainCode) Transactions

func (t *CTKChainCode) Transactions(stub shim.ChaincodeStubInterface, args []string) peer.Response

* * Account Txs *

func (*CTKChainCode) Transfer

func (self *CTKChainCode) Transfer(stub shim.ChaincodeStubInterface, args []string) peer.Response

func (*CTKChainCode) TryGetDecimal

func (self *CTKChainCode) TryGetDecimal(number string) decimal.Decimal

func (*CTKChainCode) UpdateToken

func (self *CTKChainCode) UpdateToken(stub shim.ChaincodeStubInterface, args []string) peer.Response

func (*CTKChainCode) Vote

* * Vote Super account *

func (*CTKChainCode) VoteList

func (t *CTKChainCode) VoteList(stub shim.ChaincodeStubInterface, args []string) peer.Response

* * Vote Super account list *

func (*CTKChainCode) VoteSuperNodes

func (t *CTKChainCode) VoteSuperNodes(stub shim.ChaincodeStubInterface, args []string) peer.Response

* * Vote Super 17 account *

func (*CTKChainCode) Withdraw

func (t *CTKChainCode) Withdraw(stub shim.ChaincodeStubInterface, args []string) peer.Response

* * Mining Withdraw *

type ControllerMapsType

type ControllerMapsType map[string]reflect.Value

define controller maps

type PublishParams

type PublishParams struct {
	Token module.TokenConfig `json:"token"`
	Sign  string             `json:"sign"`
}

Jump to

Keyboard shortcuts

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