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

show blockexplorer link when transaction receipt is reverted #910

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

technophile-04
Copy link
Collaborator

Description

I think its nice UX to point to user to block explorer when transaction receipt is reverted. Viem does not give us the actual reason for transaction receipt revert as mentioned here they only give you status "reverted". So maybe its nice idea to point to block explorer for actual reason.

image

To test you could checkout:

git switch tx-revert-example

Checkout home page on how to make transaction revert or you could checkout Matt's video here. I have just bought Matt's example branch here and updated useTransactor with this branch code.

Demo video :
Screen.Recording.2024-08-16.at.9.27.51.AM.mov

Copy link
Collaborator

@damianmarti damianmarti left a comment

Choose a reason for hiding this comment

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

Worked ok and the code looks good! Thanks!!

@technophile-04
Copy link
Collaborator Author

Thanks @damianmarti ! Merging this 🙌

@technophile-04 technophile-04 merged commit a132cce into main Aug 19, 2024
1 check passed
@technophile-04 technophile-04 deleted the tx-reverted-link branch August 19, 2024 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants