Documentation
¶
Index ¶
- type WazeroVM
- func (vm *WazeroVM) Close() error
- func (vm *WazeroVM) DeleteContract(ctx types.BlockchainContext, contractAddr types.Address)
- func (vm *WazeroVM) DeployContract(ctx types.BlockchainContext, wasmCode []byte, sender types.Address) (types.Address, error)
- func (vm *WazeroVM) DeployContractWithAddress(ctx types.BlockchainContext, wasmCode []byte, sender types.Address, ...) (types.Address, error)
- func (vm *WazeroVM) ExecuteContract(ctx types.BlockchainContext, contractAddr types.Address, functionName string, ...) (interface{}, error)
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 ¶
NewWazeroVM 创建一个新的wazero虚拟机实例
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 执行已部署的合约函数
Click to show internal directories.
Click to hide internal directories.