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

Implement SolidityCallSite.toString() #6088

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Conversation

antico5
Copy link
Contributor

@antico5 antico5 commented Dec 27, 2024

Solidity stack traces should be stringified properly now.

Extracted the logic from source-map-support package.

Closes #6067

@antico5 antico5 requested a review from schaable December 27, 2024 14:12
Copy link

changeset-bot bot commented Dec 27, 2024

⚠️ No Changeset found

Latest commit: 1a666ab

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

Copy link

vercel bot commented Dec 27, 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 Dec 27, 2024 2:12pm

Copy link
Member

@schaable schaable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just left one question.

const functionName = this.getFunctionName();
let addSuffix = true;
const isConstructor = this.isConstructor();
const isMethodCall = !(this.isToplevel() || isConstructor);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked the definition of isToplevel(), and it always seems to return false. Am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these CallSite interface functions are returning fixed values, but probably that's temporary. Since I'm not really sure, I didn't exclude the logic from the toString() function, in case in the future those functions may be of use

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed with keeping the v8 logic just in case

@schaable schaable added status:ready This issue is ready to be worked on v-next A Hardhat v3 development task and removed status:triaging labels Dec 30, 2024
@antico5 antico5 added this pull request to the merge queue Jan 3, 2025
Merged via the queue into v-next with commit 775db1b Jan 3, 2025
53 checks passed
@antico5 antico5 deleted the format-solidity-stack-traces branch January 3, 2025 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on v-next A Hardhat v3 development task
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants