context

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: LGPL-3.0 Imports: 3 Imported by: 22

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, txtype types.TransactionType) (Engine, error)
	CheckUseGas(gas uint64) bool
	CheckExecStep() bool
	GetCallerAddress() []common.Address
	SetInternalErr()
	IsInternalErr() bool
	PutCrossStateHashes(hashes []common.Uint256)
}

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