wasmbin

package
v0.21.4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WasmBzMap = map[WasmKey]string{
	WasmKeyPerpBinding: "bindings_perp.wasm",
	WasmKeyShifter:     "shifter.wasm",
	WasmKeyController:  "controller.wasm",
}

WasmBzMap is a map from WasmKey to the filename for its wasm bytecode.

Functions

func GetPackageDir

func GetPackageDir(t *testing.T) string

Types

type WasmKey

type WasmKey int

WasmKey is an enum type for the available module binding contracts.

const (
	WasmKeyPerpBinding WasmKey = iota
	WasmKeyShifter
	WasmKeyController
)

func (WasmKey) ToByteCode

func (wasmKey WasmKey) ToByteCode(pathToWasmbin string) (wasmBytecode []byte, err error)

Returns the Wasm bytecode corresponding to the WasmKey. This can be stored directly with the WasmKeeper.

func (WasmKey) ToPath

func (wasmKey WasmKey) ToPath(pathToWasmbin string) string

Returns a relative file path to compile Wasm bytecode. Wasm bytecode refers to compiled WebAssembly binary format that can be executed on the Wasm VM.

Jump to

Keyboard shortcuts

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