Skip to content

feat: add transaction status tool #23

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KcPele
Copy link

@KcPele KcPele commented Mar 21, 2025

Description

This PR adds a new transaction status tool to the Base MCP server, allowing Claude to check the status and details of a transaction on the Base network using its hash. The tool accepts a transaction hash and an optional chain ID, and returns comprehensive transaction details including transaction status, block information, addresses, values, and a link to BaseScan.

The implementation follows existing project patterns and properly handles BigInt serialization for blockchain data, which is a critical aspect of working with on-chain data.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

How Has This Been Tested?

The implementation includes a dedicated test file (src/tools/transaction-status/test.ts) that can be run using:
node --loader ts-node/esm src/tools/transaction-status/test.ts

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Testing was performed with real transaction hashes on the Base network to verify:

  • Successful retrieval of transaction details
  • Proper handling of pending transactions
  • Correct error handling for invalid transaction hashes
  • Proper serialization of BigInt values in the response

Example test transaction hash used: 0xcf0bb80bfc5859cb33353c488045022811e2d412274e1963c75d83a4b038c22d

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if appropriate):

Screenshot from 2025-03-21 11-30-29

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.

1 participant