polywrapvm

package
v0.0.0-...-a351142 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgsInstantiate

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

type CosmosPlugin

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

func NewCosmosPlugin

func NewCosmosPlugin() *CosmosPlugin

func (*CosmosPlugin) DbGet

func (cp *CosmosPlugin) DbGet(args DbGetArgType) []byte

func (*CosmosPlugin) DbHas

func (cp *CosmosPlugin) DbHas(args DbGetArgType) bool

func (*CosmosPlugin) DbRemove

func (cp *CosmosPlugin) DbRemove(args DbGetArgType) bool

func (*CosmosPlugin) DbSet

func (cp *CosmosPlugin) DbSet(args DbSetArgType) bool

func (*CosmosPlugin) EncodeArgs

func (cp *CosmosPlugin) EncodeArgs(method string, args []byte) (any, error)

func (*CosmosPlugin) SetStore

func (cp *CosmosPlugin) SetStore(store wasmvm.KVStore)

type DbGetArgType

type DbGetArgType struct {
	Key []byte
}

type DbSetArgType

type DbSetArgType struct {
	Key   []byte
	Value []byte
}

type ExecResult

type ExecResult struct {
	Result string
}

type InitResult

type InitResult struct {
	Result string
}

type VM

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

func NewVM

func NewVM(dataDir string) (*VM, error)

func (*VM) AnalyzeCode

func (vm *VM) AnalyzeCode(_ wasmvm.Checksum) (*types.AnalysisReport, error)

func (*VM) Create

func (vm *VM) Create(code wasmvm.WasmCode) (wasmvm.Checksum, error)

func (*VM) Execute

func (vm *VM) Execute(checksum wasmvm.Checksum, env types.Env, info types.MessageInfo, executeMsg []byte, method string, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost types.UFraction) (*types.Response, uint64, error)

func (*VM) GetCode

func (vm *VM) GetCode(checksum wasmvm.Checksum) (wasmvm.WasmCode, error)

func (*VM) Init

func (vm *VM) Init(checksum wasmvm.Checksum, env types.Env, info types.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost types.UFraction) (*types.Response, uint64, error)

Jump to

Keyboard shortcuts

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