A Python API for interacting with the Tron (TRX)
A Command-Line Interface framework
You can install it in a system-wide location via pip:
sudo pip3 install tronpytool
Or install it locally using virtualenv:
virtualenv -p /usr/bin/python3 ~/tronpytool
source ~/tronpytool/bin/activate
pip3 install tronpytool
Usage
Specify the API endpoints:
Smart Contract
from tronpytool import HttpProvider
from tronpytool import Tron
full_node = HttpProvider('https://api.trongrid.io')
solidity_node = HttpProvider('https://api.trongrid.io')
event_server = HttpProvider('https://api.trongrid.io')
# option 1
tron = Tron(full_node=full_node,
solidity_node=solidity_node,
event_server=event_server)
# option 2
tron_v2 = Tron()
# option 3
tron_v3 = Tron(
default_address='TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY',
private_key='...'
)
# option 4
tron_v4 = Tron().setNetwork('nile')
Code compile
Integration of forge that can work perfectly with latest version with ONE LINE code.
# !/usr/bin/env python
# coding: utf-8
import os
from tronpytool import TronBrew, Evm
solidity_files = [
"vault/token/RaceToken.sol",
]
ROOT = '.../Documents/b95/devtron'
FACTORY = '$HOME/Documents/piplines/factoryabi'
print("-----> job from here")
print(ROOT)
print("-----> now its ready to go")
TronBrew(ROOT, FACTORY).setClassSolNames(solidity_files).setEvm(Evm.ISTANBUL).useForge().localTranspile()
Documentation
Read the library manual by the manual Documentation is available at docs.
Donations
Metadata
Release files for tronpytool 3.6.82
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tronpytool-3.6.82.tar.gz | 421.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tronpytool-3.6.82-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 521.1 kB
Release files / tronpytool-3.6.82.tar.gz
| Download URL | tronpytool-3.6.82.tar.gz |
|---|---|
| Size | 421.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d92054e9d853d3619545fe9f96580a1144d32d65ccde6255e591531a200912b5
|
|
BLAKE2b-256 checksum How to use checksums |
d135c0250f36b7eb394b7b58076ce74d5342f2f8e0d9b61cdca6ab156f938354
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|
Release files / tronpytool-3.6.82-py3-none-any.whl
| Download URL | tronpytool-3.6.82-py3-none-any.whl |
|---|---|
| Size | 99.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
683218ff0a90dae0ee50a5a157dafa1220d3d4927b1e8dffdd27f3096d721616
|
|
BLAKE2b-256 checksum How to use checksums |
7f819f72329c657e633d04b702a5ba1d9d440712f032af35c57ecb68a705a8d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|