Tron MooC

Help you better understand its development technology

How to build a Dapp quickly

How to use Tron develop document

https://github.com/maxisacoder/tron-dapp-demo/issues/1?from=timeline&isappinstalled=0

TRON 开发工具链 TRON 提供了完整的工具链为开发者提供合约开发,测试,部署,接口。尤其是对于熟悉以太坊智能合约的开发者,从语言到工具一定都非常熟悉。 tron-web:JavaScript接口,用于提供常用的账户,地址,转账,合约相关操作。相当于Ethereum的web3js。 tron-box:提供合约编译,部署,测试的命令行工具。作用相当于Ethereum的truffle工具链。 tronLink,tronPay: 提供浏览器环境的钱包插件,为dapp提供便利和安全的执行环境,相当于Ethereum的MetaMask,Scatter。 tron-grid:社区维护的主网和测试网HTTP API接口,相当于Ethereum社区中的Infura。 tron-studio: TRON集成开发环境,相当于以太坊中的Remix,不过现在功能和稳定性都有待提高,不推荐使用。 全流程Tutorial 本章节我们通过一个Token合约,来讲解基本的合约开发和dapp开发流程。本例中的所有代码都可以在该Repo中找到。 环境搭建 如果希望自己搭建一条本地私链进行调试。根据官方文档,TRON的私链可以通过官方提供的docker镜像来部署,以下为部署的指令: docker run -it -p 8091:8091 -p 8092:8092 -p 8090:8090 -p 50051:50051 -p 50052:50052 –rm –name tron trontools/quickstart:1.2.4

TronWeb Contract build account

The new TronGrid API serves a user-friendly read API

Reduce the delay

Improved consistency, availability, and partition tolerance

TronGrid JS is a JavaScript library

Call the TronGrid API to get the Tron blockchain data

It can be used independently

It can also be used as a plug-in for TronWeb

TronWeb Object

Create an instance of the tronWeb javascript library. It includes all relevant modules in addition to utility functions.

address

Helper object that allows you to convert between the hexadecimal/base58 and private key representations of a TRON address. Note: if you want to convert generic data to a hexadecimal string, use the function tronweb.tohex.

contract

Create the contract object that wraps the ABI. Allows you to easily call functions on a contract.

An optional ABI and address can be provided, although the ABI on the blockchain is included in all contracts on the field, so the ABI is not required.

Create account

The Helper function generates a new combination of private key and address. This account is not active on the network.

This API exposes the private key of the new address. Don’t use it in any unsafe environment.