Skip to content

Conversation

@AugustoL
Copy link
Collaborator

Description

Enable binary search transaction discovery for all networks by moving the implementation from EVMAdapter to the NetworkAdapter base class. Previously, only Ethereum mainnet had working transaction history - now it works on Arbitrum, Optimism, Base, Polygon, and BNB.

Related Issue

N/A

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactoring
  • Performance improvement
  • Other (please describe):

Changes Made

  • Add txSearch property and initTxSearch() method to NetworkAdapter base class
  • Move getAddressTransactions() implementation from EVMAdapter to NetworkAdapter
  • Update all adapters to call initTxSearch(client) in their constructors:
    • EVMAdapter
    • ArbitrumAdapter
    • OptimismAdapter
    • BaseAdapter
    • PolygonAdapter
    • BNBAdapter
  • Remove stub getAddressTransactions() implementations from all network-specific adapters

Result: 126 lines of duplicated code removed (93 added, 219 deleted)

Screenshots (if applicable)

N/A

Checklist

  • I have run npm run format:fix and npm run lint:fix
  • I have run npm run typecheck with no errors
  • I have run tests with npm run test:run
  • I have tested my changes locally
  • I have updated documentation if needed
  • My code follows the project's architecture patterns

Additional Notes

The binary search algorithm uses nonce/balance state changes to discover transactions without relying on indexers. This approach works on any EVM-compatible network with standard RPC methods (eth_getTransactionCount, eth_getBalance).

Move binary search transaction discovery from EVMAdapter to NetworkAdapter
base class, enabling it for all networks (Arbitrum, Optimism, Base, Polygon,
BNB) without code duplication.

- Add initTxSearch() method to NetworkAdapter base class
- Move getAddressTransactions() implementation to base class
- Update all adapters to call initTxSearch() in constructor
- Remove stub implementations from network-specific adapters
@github-actions
Copy link

🚀 Preview: https://pr-172--openscan.netlify.app
📝 Commit: 23ba368463464ae39a5bbd36dabcfe4ad36df02b

@AugustoL AugustoL merged commit d943001 into openscan-explorer:dev Jan 21, 2026
2 of 3 checks passed
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