Module code

Source
Expand description

Module for checked code.

Structs§

BinaryReaderError
A binary reader for WebAssembly modules.
Code
Contains instrumented binary code of a program and initial memory size from memory import.
CodeAndId
The newtype contains the Code instance and the corresponding id (hash).
InstantiatedSectionSizes
Instantiated section sizes for charging during module instantiation. By “instantiated sections sizes” we mean the size of the section representation in the executor during module instantiation.
InstrumentedCode
The newtype contains the instrumented code and the corresponding id (hash).
InstrumentedCodeAndId
The newtype contains the instrumented code and the corresponding id (hash).
TryNewCodeConfig
Configuration for Code::try_new_mock_. By default all checks enabled.

Enums§

CodeError
Describes why the code is not valid Gear program.
DataSectionError
Data section error in WASM module.
ExportError
Export error in WASM module.
ImportError
Import error in WASM module.
InstrumentationError
WASM module instrumentation error.
MemoryError
Memory error in WASM module.
ModuleError
SectionError
Section error in WASM module.
SectionName
Section name in WASM module.
StackEndError
Stack end error in WASM module.

Constants§

ALLOWED_EXPORTS
Name of exports allowed on chain.
MAX_WASM_PAGES_AMOUNT
Defines maximal permitted count of memory pages.
REQUIRED_EXPORTS
Name of exports required on chain (only 1 of these is required).