pub enum CodeError {
Show 17 variants
ImportSectionNotFound,
MemoryEntryNotFound,
ExportSectionNotFound,
RequiredExportFnNotFound,
NonGearExportFnFound,
Validation,
Decode,
GasInjection,
StackLimitInjection,
Encode,
StartSectionExists,
InvalidStaticPageCount,
StackEndInitialization,
DataSegmentInitialization,
StackEndOverlaps,
IncorrectGlobalIndex,
MutGlobalExport,
}
Expand description
Instrumentation error.
Variants§
ImportSectionNotFound
The provided code doesn’t contain required import section.
MemoryEntryNotFound
The provided code doesn’t contain memory entry section.
ExportSectionNotFound
The provided code doesn’t contain export section.
RequiredExportFnNotFound
The provided code doesn’t contain the required init
or handle
export function.
NonGearExportFnFound
The provided code contains unnecessary function exports.
Validation
Validation by wasmparser failed.
Decode
Error occurred during decoding original program code.
GasInjection
Error occurred during injecting gas metering instructions.
This might be due to program contained unsupported/non-deterministic instructions (floats, memory grow, etc.).
StackLimitInjection
Error occurred during stack height instrumentation.
Encode
Error occurred during encoding instrumented program.
StartSectionExists
We restrict start sections in smart contracts.
InvalidStaticPageCount
The provided code has invalid count of static pages.
StackEndInitialization
Unsupported initialization of gear stack end global variable.
DataSegmentInitialization
Unsupported initialization of data segment.
StackEndOverlaps
Pointer to the stack end overlaps data segment.
IncorrectGlobalIndex
Incorrect global export index. Can occur when export refers to not existing global index.
MutGlobalExport
Gear protocol restriction for now.