A beautiful, user-friendly web application that translates complex Sui blockchain transactions into plain, human-readable language. Simply paste a transaction digest or explorer link, and get a clear explanation of what happened, including object changes, transfers, gas usage, and smart contract calls.
- Transaction Parsing: Fetch and parse any Sui transaction by digest
- Human-Readable Summaries: Clear explanations like "Alice sends 249.50 USDC to Bob"
- Token Support: Displays all token transfers (USDC, USDT, WETH, etc.) with real logos
- NFT Recognition: Automatically detects and displays NFTs with preview images
- Object Tracking: See all objects that were created, modified, transferred, or deleted
- Gas Analytics: Precise gas usage breakdown in SUI
- Smart Contract Calls: Identify which Move functions were called and from which packages
- Flexible Input: Accept transaction digests or full explorer URLs (SuiScan, SuiVision, Sui Explorer)
- Visual Flow Diagrams: See transfer flows with animated arrows showing sender β recipient
- Token Icons: Real token logos from CoinGecko for all major cryptocurrencies
- NFT Previews: Hover over NFTs to see images and metadata, click to open in explorer
- Interactive Elements: Clickable user addresses and objects that open in SuiScan
- Modern UI: Beautiful gradient design with glassmorphism effects
- Responsive Design: Works seamlessly on desktop, tablet, and mobile
- Real-time Status: Loading states and error handling for a smooth experience
- Node.js 18+ and npm/yarn
- A Sui RPC endpoint (defaults to Sui mainnet)
- Clone the repository
git clone <repository-url>
cd explain- Install dependencies
npm install- Start the development server
npm run dev- Open your browser
Navigate to
http://localhost:5173
npm run build
npm run preview- Get a Transaction Digest: Find any Sui transaction on an explorer or from your wallet
- Paste into the App: Either paste the full URL or just the transaction digest
- Click "Explain": The app fetches and parses the transaction
- Read the Results: Get a plain-language explanation of what happened
Try these real transactions from Sui mainnet:
# USDC Transfer (249.50 USDC)
AoLRL9ix8BY2AZYFpPPsXCkAAia3CqHCYoBwmFjBy8Bu
# NFT Creation (4 Swarm Network Agent NFTs)
2NbyGSNjmqqxC6tHTz49Rb6JXQ4hh2fC2LTvf7yUrgPh
Or paste any transaction hash or URL from SuiScan/Sui Explorer!
The app can extract transaction digests from:
- SuiScan:
https://suiscan.xyz/mainnet/tx/[digest] - SuiVision:
https://suivision.xyz/txblock/[digest] - Sui Explorer:
https://explorer.sui.io/txblock/[digest]
- Frontend: React 18 + TypeScript
- Build Tool: Vite for fast development and optimized production builds
- Styling: Tailwind CSS with custom Sui-themed colors
- Icons: Lucide React for beautiful, consistent icons
- Blockchain: @mysten/sui.js SDK for Sui blockchain interaction
explain/
βββ src/
β βββ components/ # React components
β β βββ TransactionInput.tsx # Input form for transaction digest
β β βββ TransactionDisplay.tsx # Main display component
β β βββ TransactionVisualization.tsx # Flow visualization
β βββ services/ # Business logic
β β βββ suiService.ts # Sui RPC client and parsers
β βββ types/ # TypeScript type definitions
β β βββ transaction.ts # Transaction data structures
β βββ App.tsx # Main app component
β βββ main.tsx # App entry point
β βββ index.css # Global styles
βββ public/ # Static assets
βββ index.html # HTML template
βββ package.json # Dependencies and scripts
βββ tailwind.config.js # Tailwind configuration
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite configuration
- User Input β User enters transaction digest
- RPC Fetch β App calls Sui RPC via
@mysten/sui.js - Parsing β Transaction data is parsed into structured format
- Summary Generation β Human-readable summaries are generated
- Display β Components render the parsed data with visualizations
For more architectural details, see ARCHITECTURE.md
By default, the app connects to Sui mainnet. To use testnet or devnet, edit src/services/suiService.ts:
// Change 'mainnet' to 'testnet' or 'devnet'
const client = new SuiClient({ url: getFullnodeUrl('testnet') })To use a custom RPC endpoint:
const client = new SuiClient({ url: 'https://your-custom-rpc.com' })The app uses Tailwind CSS with custom Sui colors defined in tailwind.config.js:
colors: {
'sui-blue': '#4DA2FF',
'sui-dark': '#1A1B1F',
}The codebase is designed to be extensible:
- New Summary Rules: Add logic in
generateSummary()insuiService.ts - Custom Visualizations: Create new components in
src/components/ - Enhanced Parsing: Extend the
parseTransaction()function - Token Icons: Add new token logos in
TokenIcon.tsx(uses CoinGecko CDN) - Token Mappings: Add token addresses in
suiService.ts(seeTOKEN_MAPPINGS.md)
# Type checking
npm run build
# Linting (if configured)
npm run lintTest the app with various transaction types:
- Simple SUI transfers
- NFT minting and transfers
- Complex DeFi transactions
- Failed transactions
- Transactions with many object changes
The main service for interacting with the Sui blockchain.
Fetches and parses a transaction by its digest.
Parameters:
digest(string): The transaction digest hash
Returns:
- Promise resolving to a
ParsedTransactionobject
Throws:
- Error if transaction cannot be fetched or parsed
See src/types/transaction.ts for complete type definitions:
ParsedTransaction: Main transaction data structureObjectChange: Represents object creation, mutation, or deletionTransferChange: Represents object transfersPackageCall: Represents smart contract function calls
Contributions are welcome! Here are some ideas:
- Add support for more transaction types
- Improve summary generation with more patterns
- Add transaction comparison features
- Create shareable transaction reports
- Add transaction history tracking
MIT License - feel free to use this project for any purpose.
"Failed to fetch transaction"
- Check that the transaction digest is valid
- Ensure you have internet connectivity
- Verify the RPC endpoint is accessible
Slow Loading
- Some transactions with many operations may take longer to parse
- Consider implementing caching for repeated queries
Type Errors
- Sui transaction structures may vary; the parser handles most common cases
- Unknown object types will display as "Object"
For questions or issues, please open a GitHub issue or reach out to the maintainers.
Built with β€οΈ for the Sui community