contractmgr

package
v2.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContractName comment at next version
	ContractName = syscontract.SystemContract_CONTRACT_MANAGE.String()
	// TRUE comment at next version
	TRUE = []byte("true")
	// FALSE comment at next version
	FALSE = []byte("false")
)

Functions

This section is empty.

Types

type ContractManager

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

ContractManager comment at next version

func NewContractManager

func NewContractManager(log protocol.Logger) *ContractManager

NewContractManager comment at next version @param log @return *ContractManager

func (*ContractManager) GetMethod

func (c *ContractManager) GetMethod(methodName string) common.ContractFunc

GetMethod comment at next version

type ContractManagerRuntime

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

ContractManagerRuntime comment at next version

func (*ContractManagerRuntime) FreezeContract

func (r *ContractManagerRuntime) FreezeContract(context protocol.TxSimContext, name string) (
	*commonPb.Contract, error)

FreezeContract comment at next version

func (*ContractManagerRuntime) GetAllContracts

func (r *ContractManagerRuntime) GetAllContracts(context protocol.TxSimContext) ([]*commonPb.Contract, error)

GetAllContracts 查询所有合约的详细信息

func (*ContractManagerRuntime) GetContractByteCode

func (r *ContractManagerRuntime) GetContractByteCode(context protocol.TxSimContext, name string) ([]byte, error)

GetContractByteCode comment at next version

func (*ContractManagerRuntime) GetContractInfo

func (r *ContractManagerRuntime) GetContractInfo(context protocol.TxSimContext, name string) (*commonPb.Contract,
	error)

GetContractInfo 根据合约名字查询合约的详细信息

func (*ContractManagerRuntime) InitNewNativeContract

func (r *ContractManagerRuntime) InitNewNativeContract(txSimContext protocol.TxSimContext, _ map[string][]byte) (
	[]byte, error)

InitNewNativeContract comment at next version

func (*ContractManagerRuntime) InstallContract

func (r *ContractManagerRuntime) InstallContract(context protocol.TxSimContext, name, version string, byteCode []byte,
	runTime commonPb.RuntimeType, initParameters map[string][]byte) (*commonPb.Contract, uint64, error)

InstallContract 安装新合约

func (*ContractManagerRuntime) RevokeContract

func (r *ContractManagerRuntime) RevokeContract(context protocol.TxSimContext, name string) (
	*commonPb.Contract, error)

RevokeContract comment at next version

func (*ContractManagerRuntime) UnfreezeContract

func (r *ContractManagerRuntime) UnfreezeContract(context protocol.TxSimContext, name string) (
	*commonPb.Contract, error)

UnfreezeContract comment at next version

func (*ContractManagerRuntime) UpgradeContract

func (r *ContractManagerRuntime) UpgradeContract(context protocol.TxSimContext, name, version string, byteCode []byte,
	runTime commonPb.RuntimeType, upgradeParameters map[string][]byte) (*commonPb.Contract, uint64, error)

UpgradeContract 升级现有合约

Jump to

Keyboard shortcuts

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