Add x402 facilitator display#338
Draft
MatiasOS wants to merge 3 commits intoopenscan-explorer:devfrom
Draft
Conversation
Add static registry of known x402 payment facilitators keyed by chain ID and address. Extend AddressType union with "x402Facilitator" and detect facilitator addresses before contract type checks for instant lookup.
Add FacilitatorInfoCard showing facilitator metadata (name, logo, description, website, base URL, schemes, assets, capability badges) and X402FacilitatorDisplay with contract info conditional on code presence. Wire into address page routing with i18n support (en/es).
Add 11 e2e tests covering facilitator type detection, info card rendering (name, logo, description, website, base URL, schemes, assets, capability badges), balance, transaction history, and conditional contract details display. Add PayAI and Kobaru to Base test fixtures.
|
🚀 Preview: https://pr-338--openscan.netlify.app |
AugustoL
reviewed
Mar 21, 2026
Collaborator
There was a problem hiding this comment.
We can move this to our metadata repo, its ok for me if you want to do it after this PR or if you want to do it now. But if we dont do it now lets create an issue for it later.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds x402 payment facilitator detection and display to the address page. When viewing an address that matches a known x402 facilitator (e.g., PayAI, Bitrefill, Kobaru), OpenScan now shows a dedicated display with facilitator metadata including name, description, website, supported schemes, assets, and capabilities.
Related Issue
Type of Change
Changes Made
2b4dda6): Addedx402Facilitatoraddress type tosrc/types/index.tsand detection logic insrc/utils/addressTypeDetection.tsthat matches addresses against a static registrysrc/config/x402Facilitators.ts): Created a chain ID → address lookup map of known x402 facilitators across Base, Ethereum, Arbitrum, Optimism, BSC, Polygon, Avalanche, and Sepolia — includes facilitators like PayAI, Bitrefill, Coinbase Developer Platform, Kobaru, and others21eb9b5):X402FacilitatorDisplay— full address page display with contract verification, proxy detection, AI analysis, and transaction historyFacilitatorInfoCard— card showing facilitator name/logo, description, website, base URL, schemes, assets, and capability badges (verify/settle/supported/list)enandeslocalessrc/styles/components.css5201935): Playwright tests verifying facilitator detection, info card display, capability badges, and contract details for PayAI and Kobaru on BaseScreenshots (if applicable)
Checklist
npm run format:fixandnpm run lint:fixnpm run typecheckwith no errorsnpm run test:runAdditional Notes
The facilitator registry is a static config file. As new x402 facilitators emerge, entries can be added to
src/config/x402Facilitators.tswithout code changes beyond the config. The display component follows the same pattern as other address type displays (ERC20, ERC721, etc.).