Module code

Module code 

Source
Expand description

Module for checked code.

Structs§

BinaryReaderError
A binary reader for WebAssembly modules.
Code
Contains original and instrumented binary code of a program.
CodeAndId
The newtype contains the Code instance and the corresponding id (hash).
CodeMetadata
Metadata for the code.
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).
InstrumentedCodeAndMetadata
The newtype contains the InstrumentedCode instance and the corresponding metadata.
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.
InstrumentationStatus
Status of the instrumentation.
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).