You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are looking into the issue with Superform team (their verifications are failing on our platform using foundry). They asked us to paste our findings here in case they are helpful:
We are getting compilation errors. Namely, the compiler is unable to find imports for DataTypes.sol and Error.sol. Looking at the compiler input, I can see that these are defined on path lib/superform-core/src/libraries/* .
Now, looking at DataTypes.sol import inside of the SuperVault.sol file it is being imported from path superform-core/src/types/DataTypes.sol. Given the remapping of superform-core/=lib/superform-core/, the path where the compiler expects the file is lib/superform-core/src/types/DataTypes.sol. And it cannot find it there, because it is on a similar (but not identical) path: lib/superform-core/src/libraries/DataTypes.sol
Hope some of this info helps.
Ok, I got confused with similar paths, and imagined an error where there is none. The error actually happens when attempting to import DataTypes.sol in the IBaseForm.sol file. The import path specified is absolute src/types/DataTypes.sol. As there are no remappings for this path in the compilation request, this cannot be resolved. This also happens when trying to import the DataTypes.sol in file IBaseRouter.sol as well as when trying to import Error.solin file DataLib.sol.
From our perspective, this should be fixed by either:
Adding relevant remappings
Using relative import paths in the solidity code
And I apologise for causing confusion with my initial message 🙏
@grandizzy I attempted to add a remapping "src/=lib/superform-core/src/", such that the absolute path is correctly picked up, and it doesn't seem to help
@grandizzy I attempted to add a remapping "src/=lib/superform-core/src/", such that the absolute path is correctly picked up, and it doesn't seem to help
I believe that didn't work as this is not the only time src appears in an import path. Remappings would have to be more complex than that. However, by changing the imports of DataTypes.sol and Error.sol to relative paths, I was able to get the contract to compile correctly. The paths I used are:
./Error.sol when importing in file lib/superform-core/src/libraries/DataLib.sol
-../types/DataTypes.sol when importing in files lib/superform-core/src/interfaces/IBaseForm.sol, lib/superform-core/src/interfaces/IBaseRouter.sol and lib/superform-core/src/interfaces/ISuperPositions.sol (although, I believe that last one is already a relative path in the original request)
So basically, this confirms that the problem is in the import paths, and there are no other hidden errors. My guess is that remappings can be made in such a way that this request compiles, buut I haven't worked them out exactly.
Ok, I got confused with similar paths, and imagined an error where there is none. The error actually happens when attempting to import
DataTypes.sol
in theIBaseForm.sol
file. The import path specified is absolutesrc/types/DataTypes.sol
. As there are no remappings for this path in the compilation request, this cannot be resolved. This also happens when trying to import theDataTypes.sol
in fileIBaseRouter.sol
as well as when trying to importError.sol
in file DataLib.sol.From our perspective, this should be fixed by either:
And I apologise for causing confusion with my initial message 🙏
Originally posted by @strahor-13 in #9483 (comment)
The text was updated successfully, but these errors were encountered: