#include <wasm_sysio_validation.hpp>
Definition at line 42 of file wasm_sysio_validation.hpp.
◆ validate()
void sysio::chain::wasm_validations::ensure_apply_exported_visitor::validate |
( |
const IR::Module & | m | ) |
|
|
static |
Definition at line 76 of file wasm_sysio_validation.cpp.
76 {
77 bool found_it = false;
78
79 for(
const Export& exprt : m.
exports) {
80 if(exprt.kind != ObjectKind::function)
81 continue;
82 if(exprt.name != "apply")
83 continue;
85 found_it = true;
86 break;
87 }
88 }
89
90 if(!found_it)
91 FC_THROW_EXCEPTION(wasm_execution_error,
"Smart contract's apply function not exported; non-existent; or wrong type");
92}
#define FC_THROW_EXCEPTION(EXCEPTION, FORMAT,...)
static IR_API const FunctionType * get(ResultType ret, const std::initializer_list< ValueType > ¶meters)
IndexSpace< FunctionDef, IndexedFunctionType > functions
std::vector< const FunctionType * > types
std::vector< Export > exports
The documentation for this struct was generated from the following files: