wasi

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WazeroVM

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

WazeroVM 使用wazero实现的虚拟机

func NewWazeroVM

func NewWazeroVM(contractDir string) (*WazeroVM, error)

NewWazeroVM 创建一个新的wazero虚拟机实例

func (*WazeroVM) Close

func (vm *WazeroVM) Close() error

Close 关闭虚拟机

func (*WazeroVM) DeleteContract

func (vm *WazeroVM) DeleteContract(ctx types.BlockchainContext, contractAddr types.Address)

DeleteContract 删除WebAssembly合约

func (*WazeroVM) DeployContract

func (vm *WazeroVM) DeployContract(ctx types.BlockchainContext, wasmCode []byte, sender types.Address) (types.Address, error)

DeployContract 部署新的WebAssembly合约

func (*WazeroVM) DeployContractWithAddress

func (vm *WazeroVM) DeployContractWithAddress(ctx types.BlockchainContext, wasmCode []byte, sender types.Address, contractAddr types.Address) (types.Address, error)

DeployContractWithAddress 部署新的WebAssembly合约

func (*WazeroVM) ExecuteContract

func (vm *WazeroVM) ExecuteContract(ctx types.BlockchainContext, contractAddr types.Address, functionName string, params []byte) (interface{}, error)

ExecuteContract 执行已部署的合约函数

Jump to

Keyboard shortcuts

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