parachain

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigName = "engine.yaml"
)
View Source
const (
	ParaChainKernelContract = "$parachain"
)

Variables

View Source
var (
	// ErrCreateBlockChain is returned when create block chain error
	ErrCreateBlockChain = errors.New("create blockChain error")
	ErrGroupNotFound    = errors.New("group not found")
	ErrUnAuthorized     = errors.New("unAuthorized")
	ErrChainNotFound    = errors.New("chain not found")
	ErrCtxEmpty         = errors.New("chain context is not found")
	ErrBcNameEmpty      = errors.New("block chain name is empty")
	ErrBcDataEmpty      = errors.New("first block data is empty")
	ErrAdminEmpty       = errors.New("no administrator")
)

Functions

func NewParaChainContract

func NewParaChainContract(bcName string, minNewChainAmount int64, chainCtx *common.ChainCtx) *paraChainContract

Types

type Group

type Group struct {
	GroupID    string   `json:"name,omitempty"`
	Admin      []string `json:"admin,omitempty"`
	Identities []string `json:"identities,omitempty"`
}

////////// Group ///////////

type Manager

type Manager struct {
	Ctx *ParaChainCtx
}

Manager

func NewParaChainManager

func NewParaChainManager(ctx *ParaChainCtx) (*Manager, error)

NewParaChainManager create instance of ParaChain

type ParaChainConfig

type ParaChainConfig struct {
	MinNewChainAmount string
}

type ParaChainCtx

type ParaChainCtx struct {
	// 基础上下文
	xcontext.BaseCtx
	BcName   string
	Contract contract.Manager
	ChainCtx *common.ChainCtx
}

func NewParaChainCtx

func NewParaChainCtx(bcName string, cctx *common.ChainCtx) (*ParaChainCtx, error)

Jump to

Keyboard shortcuts

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