native

package module
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 41 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitInstance added in v3.0.1

func InitInstance(chainId string,
	gasConfig *gasutils.GasConfig,
	log protocol.Logger,
	msgBus msgbus.MessageBus,
	store protocol.BlockchainStore)

InitInstance get singleton RuntimeInstance

func IsNative

func IsNative(contractName string, txType commonPb.TxType) bool

IsNative is a native contract @param contractName @param txType @return bool

func IsNativeContract

func IsNativeContract(contractName string) bool

IsNativeContract return is native contract name

func IsNativeTxType

func IsNativeTxType(txType commonPb.TxType) bool

IsNativeTxType return is native contract supported transaction type TODO: Devin: Remove it

Types

type RuntimeInstance

type RuntimeInstance struct {
	// contains filtered or unexported fields
}

RuntimeInstance native contract runtime instance

func GetRuntimeInstance

func GetRuntimeInstance(chainId string) *RuntimeInstance

GetRuntimeInstance get singleton RuntimeInstance

func (*RuntimeInstance) Invoke

func (r *RuntimeInstance) Invoke(contract *commonPb.Contract, methodName string, _ []byte, parameters map[string][]byte,
	txContext protocol.TxSimContext) *commonPb.ContractResult

Invoke verify and run Contract method

func (*RuntimeInstance) OnMessage added in v3.0.1

func (r *RuntimeInstance) OnMessage(msg *msgbus.Message)

OnMessage receive msg bus message

func (*RuntimeInstance) OnQuit added in v3.0.1

func (r *RuntimeInstance) OnQuit()

OnQuit quit process

Directories

Path Synopsis
Package ethereum 以太坊交易适配的处理 一个以太坊交易按行为可以分成4种操作: 1.普通的ETH转账,Amount>0, InputData可能有备注信息 2.安装合约,To地址是0,而且InputData是合约ByteCode 3.合约调用,To地址是合约地址,而且InputData里面有FuncHash+Args 4.存证,Amount=0,InputData是存证的数据内容 另外,需要一个独立的mint方法能够被调用,
Package ethereum 以太坊交易适配的处理 一个以太坊交易按行为可以分成4种操作: 1.普通的ETH转账,Amount>0, InputData可能有备注信息 2.安装合约,To地址是0,而且InputData是合约ByteCode 3.合约调用,To地址是合约地址,而且InputData里面有FuncHash+Args 4.存证,Amount=0,InputData是存证的数据内容 另外,需要一个独立的mint方法能够被调用,
Package testcontract 这是一个用于性能测试或者对比用的系统合约,主要提供了P、G、D、N几个方法 当然这个合约也可以用于无逻辑的简单存证
Package testcontract 这是一个用于性能测试或者对比用的系统合约,主要提供了P、G、D、N几个方法 当然这个合约也可以用于无逻辑的简单存证
v210
v220
certmgr
* Copyright (C) BABEC.
* Copyright (C) BABEC.
v230

Jump to

Keyboard shortcuts

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