context

package
v2.0.1-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: Apache-2.0 Imports: 2 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	ContractAddress common.Address
	Code            []byte
}

Context describe smart contract execute context struct

type ContextRef

type ContextRef interface {
	PushContext(context *Context)
	CurrentContext() *Context
	CallingContext() *Context
	EntryContext() *Context
	PopContext()
	CheckWitness(address common.Address) bool
	PushNotifications(notifications []*event.NotifyEventInfo)
	NewExecuteEngine(code []byte) (Engine, error)
	CheckUseGas(gas uint64) bool
	CheckExecStep() bool
}

ContextRef is a interface of smart context when need call a contract, push current context to smart contract contexts when execute smart contract finish, pop current context from smart contract contexts when need to check authorization, use CheckWitness when smart contract execute trigger event, use PushNotifications push it to smart contract notifications when need to invoke a smart contract, use AppCall to invoke it

type Engine

type Engine interface {
	Invoke() (interface{}, error)
}

Jump to

Keyboard shortcuts

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