native

package
v0.0.0-...-ef73a9a Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: LGPL-3.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BYTE_FALSE = []byte{0}
	BYTE_TRUE  = []byte{1}
)
View Source
var (
	Contracts = make(map[common.Address]RegisterService)
)

Functions

This section is empty.

Types

type Handler

type Handler func(native *NativeService) ([]byte, error)

type NativeService

type NativeService struct {
	Store         store.LedgerStore
	CacheDB       *storage.CacheDB
	ServiceMap    map[string]Handler
	Notifications []*event.NotifyEventInfo
	InvokeParam   sstates.ContractInvokeParam
	Input         []byte
	Tx            *types.Transaction
	Height        uint32
	Time          uint32
	MinOngLimit   uint64
	BlockHash     common.Uint256
	ContextRef    context.ContextRef
	PreExec       bool
	CrossHashes   []common.Uint256
	Operator      bool
}

Native service struct Invoke a native smart contract, new a native service

func (*NativeService) Invoke

func (this *NativeService) Invoke() ([]byte, error)

func (*NativeService) NativeCall

func (this *NativeService) NativeCall(address common.Address, method string, args []byte) ([]byte, error)

func (*NativeService) PushCrossState

func (this *NativeService) PushCrossState(data []byte)

func (*NativeService) Register

func (this *NativeService) Register(methodName string, handler Handler)

type RegisterService

type RegisterService func(native *NativeService)

Directories

Path Synopsis
cross_chain
common
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
Governance contract: Users can apply for a candidate node to join consensus selection, deposit ONT to authorize for candidate nodes, quit selection and unAuthorize for candidate nodes through this contract.
Governance contract: Users can apply for a candidate node to join consensus selection, deposit ONT to authorize for candidate nodes, quit selection and unAuthorize for candidate nodes through this contract.
pdp
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.

Jump to

Keyboard shortcuts

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