@@ -49,9 +49,9 @@ class BinaryenEthereumInterface : public wasm::ShellExternalInterface, EthereumI
49
49
{ }
50
50
51
51
protected:
52
- wasm::Literal callImport (wasm::Import * import, wasm::LiteralList& arguments) override ;
52
+ wasm::Literal callImport (wasm::Function* import, wasm::LiteralList& arguments) override ;
53
53
#if HERA_DEBUGGING
54
- wasm::Literal callDebugImport (wasm::Import * import, wasm::LiteralList& arguments);
54
+ wasm::Literal callDebugImport (wasm::Function* import, wasm::LiteralList& arguments);
55
55
#endif
56
56
57
57
void importGlobals (map<wasm::Name, wasm::Literal>& globals, wasm::Module& wasm) override ;
@@ -73,7 +73,7 @@ class BinaryenEthereumInterface : public wasm::ShellExternalInterface, EthereumI
73
73
}
74
74
75
75
#if HERA_DEBUGGING
76
- wasm::Literal BinaryenEthereumInterface::callDebugImport (wasm::Import *import, wasm::LiteralList& arguments) {
76
+ wasm::Literal BinaryenEthereumInterface::callDebugImport (wasm::Function *import, wasm::LiteralList& arguments) {
77
77
heraAssert (import->module == wasm::Name (" debug" ), " Import namespace error." );
78
78
79
79
if (import->base == wasm::Name (" print32" )) {
@@ -134,7 +134,7 @@ class BinaryenEthereumInterface : public wasm::ShellExternalInterface, EthereumI
134
134
}
135
135
#endif
136
136
137
- wasm::Literal BinaryenEthereumInterface::callImport (wasm::Import * import, wasm::LiteralList& arguments) {
137
+ wasm::Literal BinaryenEthereumInterface::callImport (wasm::Function* import, wasm::LiteralList& arguments) {
138
138
#if HERA_DEBUGGING
139
139
if (import->module == wasm::Name (" debug" ))
140
140
// Reroute to debug namespace
@@ -622,7 +622,7 @@ void BinaryenEngine::verifyContract(wasm::Module & module)
622
622
{ wasm::Name (" selfDestruct" ), createFunctionType ({ wasm::Type::i32 }, wasm::Type::none) }
623
623
};
624
624
625
- for (auto const & import: module.imports ) {
625
+ for (auto const & import: module.functions ) {
626
626
ensureCondition (
627
627
import->module == wasm::Name (" ethereum" )
628
628
#if HERA_DEBUGGING
@@ -644,7 +644,7 @@ void BinaryenEngine::verifyContract(wasm::Module & module)
644
644
" Importing invalid EEI method."
645
645
);
646
646
647
- wasm::FunctionType* function_type = module.getFunctionTypeOrNull (import->functionType );
647
+ wasm::FunctionType* function_type = module.getFunctionTypeOrNull (import->type );
648
648
ensureCondition (
649
649
function_type,
650
650
ContractValidationFailure,
0 commit comments