A test dapp for the MetaMask Multichain API on Tron.
- Node.js (version 18 or higher)
- Yarn package manager
git clone <repository-url>
cd test-dapp-tron
yarn installFor basic testing, you can use the public TronGrid API (rate limited). For production use or higher rate limits, get an API key from TronGrid.
Copy the example environment file:
cp .env.example .envIf you have a TRON PRO API key, edit the .env file:
# TRON PRO API Key (optional)
# Get your API key from: https://www.trongrid.io/
VITE_TRON_PRO_API_KEY=your-tron-pro-api-key-here
# Default recipient address for testing (optional)
# If not provided, uses a default test address
VITE_DEFAULT_RECIPIENT=your-custom-test-addressNote: If no API key is provided, the application will use the public API which has rate limits but works for basic testing.
Start the development server:
yarn devThe application will be available at http://localhost:8081.
yarn buildOnce the development server is running, you can:
- Connect your Tron wallet (TronLink, MetaMask, etc.)
- Test message signing functionality
- Test TRX transfers
- Test USDT TRC-20 transfers
The application supports multiple Tron networks:
- Mainnet: Production network
- Shasta: Testnet for development
- Nile: Alternative testnet
Network configuration and contract addresses are managed in src/config.ts.