The Tron Snap allows MetaMask and dapps to support all Tron-related networks and address types.
- MetaMask Flask
- Nodejs
22. We strongly recommend you install via NVM to avoid incompatibility issues between different node projects. - Once installed, you should also install Yarn with
npm i -g yarnto make working with this repository easiest.
nvm use
yarn installPlease see ./src/packages/.env.example for reference
yarn start- Snap server and debug page: http://localhost:8080/
- Example UI dapp: http://localhost:3000/
# Running Snap via watch mode
yarn workspace @metamask/tron-wallet-snap startThe snap.manifest.json contains a shasum that differs between local and production builds. Git hooks ensure the repository always contains production-ready builds:
- Detects if any
packages/snap/files are staged - Runs
build:prod→ updates manifest with production settings and shasum - Stages the updated
snap.manifest.json - Runs
lint:fixon all files
- Runs the test suite
- Push proceeds if tests pass
yarn start builds with local settings (adds localhost origins and dev permissions). These are automatically converted to production settings when you commit.