TRON Developer Hub

The TRON Developer Hub

Welcome to the TRON developer hub. You'll find comprehensive guides and documentation to help you start working with TRON as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Getting Started

Introduction

Tron-Studio is an IDE for developing, deploying, and debugging smart contracts based on TVM. It uses gRPC to register accounts, deploy, and trigger smart contracts. Currently, there is no support for an HTTP gateway.

System Requirements

Important: Tron-Studio uses [
Oracle JDK1.8. (https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). Do not use Open JDK.

  • Windows 64Bit
  • Linux 64Bit
  • Mac

Download

Download the source code here.

Compile & Run

To compile, navigate into the tron-studio directory and then perform the gradlew build:

Linux

cd tron-studio
./gradlew build 

or

./gradlew build -x test -x check

to skip test

For Windows Remove ./

A successful gradlew build output is as follows:

C:\Users\tom\tron-studio>gradlew build -x test -x check
Starting a Gradle Daemon (subsequent builds will be faster)
Download http://maven.aliyun.com/nexus/content/groups/public/io/grpc/grpc-core/maven-metadata.xml
Download http://mvnrepository.com/io/grpc/grpc-core/maven-metadata.xml
Download http://maven.aliyun.com/nexus/content/groups/public/io/netty/netty-codec-http2/maven-metadata.xml
Download http://mvnrepository.com/io/netty/netty-codec-http2/maven-metadata.xml

> Task :compileJava
Malformed jar [aspectjtools-1.8.13.jar] found on classpath. Gradle 5.0 will no longer allow malformed jars on a classpath.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.


BUILD SUCCESSFUL in 1m 54s
13 actionable tasks: 13 executed

To launch Tron-Studio, execute the TronStudio.jar file within the same tron-studio directory:

C:\Users\tom\tron-studio>java -jar build/libs/TronStudio.jar

In addition to launching the IDE UI, a successful launch also outputs the following in the Terminal:

C:\Users\tom\tron-studio>java -jar build/libs/TronStudio.jar
16:28:05.695 INFO  [Thread-6] [Manager](Manager.java:348) create genesis block
16:28:05.703 INFO  [Thread-6] [Manager](Manager.java:354) save block: BlockCapsule
[ hash=0000000000000000fb81c56753c14d886b5065280089ffe8f1f1ca3bf854755c
number=0
parentId=957dc2d350daecc7bb6a38f3938ebde0a0c1cedafe15f0edae4256a2907449f6
witness address=41206e65772073797374656d206d75737420616c6c6f77206578697374696e672073797374656d7320746f206265206c696e6b656420746f67657468657220776974686f757420726571756972696e6720616e792063656e7472616c20636f6e74726f6c206f7220636f6f7264696e6174696f6e
generated by myself=true
generate time=1969-12-31 16:00:00.0
merkle root=_merkle root_
txs size=8
]
********register application shutdown hook********
09:58:19.475 INFO  [Thread-13] [Manager](Manager.java:564) begin to erase block:BlockCapsule
[ hash=00000000000014c15805f24709a2c7cde41f3a3dbc659aef8b26135c3974e9bb
number=5313
parentId=00000000000014c07f54e36334028b4267246e43829149cf031167b6482e2dc4
witness address=_witness address_
generated by myself=true
generate time=2018-10-22 09:56:21.0
txs are empty
]
09:58:19.481 INFO  [Thread-13] [Manager](Manager.java:567) end to erase block:BlockCapsule
[ hash=00000000000014c15805f24709a2c7cde41f3a3dbc659aef8b26135c3974e9bb
number=5313
parentId=00000000000014c07f54e36334028b4267246e43829149cf031167b6482e2dc4
witness address=_witness address_
generated by myself=true
generate time=2018-10-22 09:56:21.0
txs are empty
]

The UI IDE should look like below. The contract open in the editor may differ depending on which solidity files were opened since last launch.

Re-Launch

If you close the IDE and wish to re-launch it at a later time, simply navigate into the tron-studio directory and execute the TronStudio.jar file again. You only need to execute the jar file because the jar file has already been built from the gradlew build command.

C:\Users\tom\tron-studio>java -jar build/libs/TronStudio.jar