-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solidity stack traces aren't displayed in v3 #5980
Comments
I synced with @fvictorio to gather more information and provide a more precise overview of the problem. Here are the additional details: The issue is that when an error is thrown in Hardhat V3, the stack trace does not provide detailed information about where the error occurred, either in the TypeScript code or the Solidity code. It's important to note that the Solidity stack trace is not yet supported by EDR. However, as a workaround during the investigation, a fake stack trace can be created. Code snippets to repro the error: Smart contract code for both Hardhat v2 and Hardhat v3
JS code for Hardhat v2 - this will work as expected, showing the error stack trace for both Solidity and JS.
TS code for Hardhat v3 - this is where the error occurs: the stack trace for both Solidity and JS is not shown.
Screenshot of the Hardhat v2 stack trace - all info are shown: Screenshot of the Hardhat v3 stack trace - info are not shown: The investigation into why this is happening should begin with this V2 code to understand how the logic works. |
Solidity stack traces aren’t displaying, because the native node.js support for source maps doesn’t work like the one we used in Hardhat 2.
Our next steps are to explore the API and perhaps do the formatting ourselves, copying what the
source-map-support
used to do. We want to leverage node's native, but that means changing our output format.The text was updated successfully, but these errors were encountered: