-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Streamline ConsoleLogger
logic and state
#5411
Conversation
It was not type-checked previously and thus missed some renames and dependencies' updates.
…lass This makes it clearer what the exact logic is and if additional state is used, which will be helpful when porting this code to Rust as we don't want to rely on an external console.log decoding logic in JS.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Hey thanks for this PR @Xanewok ! I had a look, but I don't feel qualified to review it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes to consoleLogger.ts
look good to me.
I can't comment on anything else, as I'm not familiar enough with Hardhat's coding standard to validate it.
ConsoleLogger
logic and stateConsoleLogger
logic and state
Checking my understanding here. This PR has two parts:
If this is correct, then LGTM. |
That is correct:
|
Makes sense! Feel free to merge this if you want. |
Part of NomicFoundation/edr#246
The starting point for this PR was analyzing how we create the Provider and how different pieces interact with each other in JS and Rust<>JS in general around the stack traces logic and tests.
This removes some of the dead or redundant code and refreshes the console.log signature lookup table generation script. If we decide to move it to Rust, we won't have to call JS anymore and move buffers around just to decode and execute the console.log formatting logic.
After moving the auxiliary script to TS I re-ran it to verify that it outputs the same code (incl. the changes from this PR).