Engineering
Sunhat TRON Development avatar

Sunhat TRON Development

Official Sunhat toolkit for end-to-end TRON smart contract lifecycle: development, compilation, cross-framework testing, and deployment.

Introduction

Sunhat is a comprehensive Hardhat-based plugin designed to streamline the TRON smart contract development lifecycle. This skill empowers developers to manage end-to-end workflows within a single unified environment, supporting both Solidity and Vyper languages. It is intended for blockchain developers, security researchers, and DevOps engineers who require a deterministic, trackable, and automated approach to deploying on TRON Mainnet, Nile, or Shasta networks.

  • Multi-language compilation: Effortlessly compile contracts using standard solc or TRON-specific tron-solc compilers with robust error handling.

  • Cross-framework testing: Leverage the flexibility to run test suites via Hardhat’s native environment or the high-performance Foundry toolkit for automated validation.

  • White Hat security auditing: Conduct systematic vulnerability analysis, including manual code review and automated exploit testing (PoC) using Foundry.

  • Deterministic deployments: Track and manage deployment history, simplify multi-network configurations, and utilize named accounts to replace ambiguous address references.

  • Integrated developer tools: Includes pre-configured workflows for project initialization, environment setup, and deployment scripting using the sunhat CLI.

  • To use this skill, ensure your environment is configured with Node.js version 22.14.0 or higher.

  • Initialize projects via the provided sunhat-init workflow to set up the necessary directory structure and hardhat.config.ts parameters.

  • Always verify your network settings in hardhat.config.ts and ensure your TRON_RPC_URL and PRIVATE_KEY are managed securely in a .env file.

  • For security audits, focus on identifying re-entrancy, arithmetic overflows, and access control issues; use Foundry to verify exploits through targeted unit tests.

  • The plugin assumes a standard convention of using a deployTron/ directory for all deployment scripts to maintain consistency across the project lifecycle.

Repository Stats

Stars
14
Forks
6
Open Issues
0
Language
TypeScript
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 11:24 PM
View on GitHub