Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Xanewok
Copy link
Contributor

@Xanewok Xanewok commented Jun 19, 2024

  • Because this PR includes a bug fix, relevant tests have been included.
  • Because this PR includes a new feature, the change was previously discussed on an Issue or with someone from the team.
  • I didn't do anything of this.

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).

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.
@Xanewok Xanewok requested a review from fvictorio June 19, 2024 11:14
Copy link

vercel bot commented Jun 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2024 11:14am

Copy link

changeset-bot bot commented Jun 19, 2024

⚠️ No Changeset found

Latest commit: cfd0884

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Xanewok Xanewok added the no changeset needed This PR doesn't require a changeset label Jun 19, 2024
@Xanewok Xanewok requested a review from a team June 24, 2024 07:57
@agostbiro
Copy link
Contributor

Hey thanks for this PR @Xanewok ! I had a look, but I don't feel qualified to review it.

Copy link
Contributor

@Wodann Wodann left a 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.

@Xanewok Xanewok requested a review from kanej June 25, 2024 10:14
@kanej kanej removed their assignment Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changeset needed This PR doesn't require a changeset status:triaging
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

None yet

4 participants