native

package
v0.0.0-...-6425a1c Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: LGPL-3.0 Imports: 8 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

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 {
	CloneCache    *storage.CloneCache
	ServiceMap    map[string]Handler
	Notifications []*event.NotifyEventInfo
	Code          []byte
	Input         []byte
	Tx            *types.Transaction
	Height        uint32
	Time          uint32
	ContextRef    context.ContextRef
}

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

func (*NativeService) Invoke

func (this *NativeService) Invoke() (interface{}, error)

func (*NativeService) NativeCall

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

func (*NativeService) Register

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

type RegisterService

type RegisterService func(native *NativeService)

Directories

Path Synopsis
* Copyright (C) 2018 The ZeepinChain Authors * This file is part of The ZeepinChain library.
* Copyright (C) 2018 The ZeepinChain Authors * This file is part of The ZeepinChain library.
* Copyright (C) 2018 The ZeepinChain Authors * This file is part of The ZeepinChain library.
* Copyright (C) 2018 The ZeepinChain Authors * This file is part of The ZeepinChain library.
Governance contract: Users can apply for a candidate node to join consensus selection, deposit ZPT to vote for candidate nodes, quit selection and unVote for candidate nodes through this contract.
Governance contract: Users can apply for a candidate node to join consensus selection, deposit ZPT to vote for candidate nodes, quit selection and unVote for candidate nodes through this contract.
* Copyright (C) 2018 The ZeepinChain Authors * This file is part of The ZeepinChain library.
* Copyright (C) 2018 The ZeepinChain Authors * This file is part of The ZeepinChain library.

Jump to

Keyboard shortcuts

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