How tronprotocol/tronbox works
TronBox is a TRON smart-contract development framework. Its main workflow is a developer invoking a CLI command, compiling Solidity into artifacts, then running migrations that deploy contracts through a configured TRON/EVM runtime; the console supports later contract interaction. The graph also preserves project setup, template unboxing, and source flattening. Relationships are limited to excerpted imports/calls and README-documented capabilities; several substantial modules are indexed but unsampled, so their internal links are omitted.
Main entry points: command.js Command dispatch · WorkflowCompile.js Compile workflow · deploy.js Deployment actions · console.js Interactive console
Components 21
CLI and project setup
- CLI entry
src/index.js - Command dispatch
src/lib/command.js - Project config
src/components/Config.js - Project init
src/components/Init/index.js - Template boxes
src/components/Box - Source flattening
src/components/Flatten/index.js
Compilation and artifacts
- Compile workflow
src/components/WorkflowCompile.js - Solidity compiler
src/components/Compile/index.js - Dependency profiler
src/components/Compile/profiler.js - Solc integration
src/components/TronSolc.js - Source resolver
src/components/Resolver/index.js - Artifact writer
src/components/Artifactor.js
Deployment and runtime
- Migration runner
src/components/Migrate/index.js - Deployment actions
src/components/Deployer/src/actions/deploy.js - Contract provisioner
src/components/Provisioner.js - TRON/EVM runtime
src/components/TronWrap/index.js
Contract interaction
- Interactive console
src/lib/console.js - REPL manager
src/lib/repl.js - Contract abstraction
src/components/Contract/contract.js
Other components
- Developer
- TRON network
Connections 26
- Developer → CLI entry: runs commands
- CLI entry → Command dispatch: dispatches
src/index.js - Command dispatch → Project config: loads config
- Command dispatch → Compile workflow: runs compile
- Command dispatch → Migration runner: runs migrations
- Command dispatch → Interactive console: opens console
src/lib/console.js - Command dispatch → Project init: initializes project
- Command dispatch → Template boxes: unboxes template
- Command dispatch → Source flattening: flattens sources
- Compile workflow → Project config: uses settings
src/components/WorkflowCompile.js - Compile workflow → Source resolver: resolves imports
src/components/WorkflowCompile.js - Compile workflow → Solidity compiler: compiles sources
src/components/WorkflowCompile.js - Compile workflow → Artifact writer: writes artifacts
src/components/WorkflowCompile.js - Solidity compiler → Dependency profiler: profiles dependencies
src/components/Compile/index.js - Solidity compiler → Solc integration: invokes compiler
src/components/Compile/index.js - Source resolver → Contract abstraction: creates abstractions
src/components/Resolver/index.js - Source resolver → Contract provisioner: provisions contracts
src/components/Resolver/index.js - Migration runner → Deployment actions: runs deployer
src/components/Migrate/index.js - Migration runner → TRON/EVM runtime: connects runtime
src/components/Migrate/index.js - Deployment actions → TRON/EVM runtime: deploys contracts
src/components/Deployer/src/actions/deploy.js - Deployment actions → Contract abstraction: uses abstraction
src/components/Deployer/src/actions/deploy.js - Deployment actions → Contract provisioner: provisions deployment
src/components/Deployer/src/actions/deploy.js - TRON/EVM runtime → TRON network: sends transactions
- Interactive console → REPL manager: starts REPL
src/lib/console.js - Interactive console → TRON/EVM runtime: connects network
src/lib/console.js - Interactive console → Contract abstraction: loads contracts
src/lib/console.js