Enhancement: Fetching Recent Transactions & Transaction Status Tool #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
I worked on improving the transaction tools, specifically adding support for fetching recent transactions and enhancing the transaction status checking functionality. The goal was to ensure users can efficiently retrieve transaction details, including status, block number, sender/receiver, gas fees, and direct links to BaseScan.
Challenges Faced
While working on this quest, I encountered several issues, including:
Project Setup on Windows: The README lacks detailed setup instructions for Windows users. After following all the steps, the project still failed to run properly. I believe additional dependencies or configurations might be needed.
ES Module vs. CommonJS Issue: Running npm test failed due to ReferenceError: require is not defined in ES module scope. This issue arises because package.json specifies "type": "module", but the script uses require. A possible fix is renaming the script to .cjs or using import.
Suggested Improvements
Update README.md: Provide clearer installation and setup instructions. Coudn't succesfully test after all the readme instruction was followed and successfully acheived.
Fix Module Issues: Ensure compatibility between CommonJS and ES modules to prevent errors when running scripts.
Overview of the Tool I Built
This tool enhances transaction tracking by allowing users to:
Get the recent transactions and status of a specific transaction using a given wallet address.
Retrieve recent transactions made by a user, displaying details such as transaction hash, status, block number, sender, recipient, value, and a direct link to BaseScan.