@@ -49,9 +49,9 @@ class BinaryenEthereumInterface : public wasm::ShellExternalInterface, EthereumI
4949 { }
5050
5151protected:
52- wasm::Literal callImport (wasm::Import * import , wasm::LiteralList& arguments) override ;
52+ wasm::Literal callImport (wasm::Function* import , wasm::LiteralList& arguments) override ;
5353#if HERA_DEBUGGING
54- wasm::Literal callDebugImport (wasm::Import * import , wasm::LiteralList& arguments);
54+ wasm::Literal callDebugImport (wasm::Function* import , wasm::LiteralList& arguments);
5555#endif
5656
5757 void importGlobals (map<wasm::Name, wasm::Literal>& globals, wasm::Module& wasm) override ;
@@ -73,7 +73,7 @@ class BinaryenEthereumInterface : public wasm::ShellExternalInterface, EthereumI
7373 }
7474
7575#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) {
7777 heraAssert (import ->module == wasm::Name (" debug" ), " Import namespace error." );
7878
7979 if (import ->base == wasm::Name (" print32" )) {
@@ -134,7 +134,7 @@ class BinaryenEthereumInterface : public wasm::ShellExternalInterface, EthereumI
134134 }
135135#endif
136136
137- wasm::Literal BinaryenEthereumInterface::callImport (wasm::Import * import , wasm::LiteralList& arguments) {
137+ wasm::Literal BinaryenEthereumInterface::callImport (wasm::Function* import , wasm::LiteralList& arguments) {
138138#if HERA_DEBUGGING
139139 if (import ->module == wasm::Name (" debug" ))
140140 // Reroute to debug namespace
@@ -622,7 +622,7 @@ void BinaryenEngine::verifyContract(wasm::Module & module)
622622 { wasm::Name (" selfDestruct" ), createFunctionType ({ wasm::Type::i32 }, wasm::Type::none) }
623623 };
624624
625- for (auto const & import : module .imports ) {
625+ for (auto const & import : module .functions ) {
626626 ensureCondition (
627627 import ->module == wasm::Name (" ethereum" )
628628#if HERA_DEBUGGING
@@ -644,7 +644,7 @@ void BinaryenEngine::verifyContract(wasm::Module & module)
644644 " Importing invalid EEI method."
645645 );
646646
647- wasm::FunctionType* function_type = module .getFunctionTypeOrNull (import ->functionType );
647+ wasm::FunctionType* function_type = module .getFunctionTypeOrNull (import ->type );
648648 ensureCondition (
649649 function_type,
650650 ContractValidationFailure,
0 commit comments