Tron • BitGo Docs (2024)

TRON

TRON (TRX) can be accessed with the following coin types:

EnvironmentCoin TypeFaucet
TRON Productiontrx
TRON Testnetttrxhttps://developers.tron.network/docs/networks#testnet

Explorer

https://tronscan.org/

Generating wallets

To create an Tron wallet using BitGoJS:

1234567891011121314bitgo .coin('ttrx') .wallets() .generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30', }) .then(function (wallet) { // print the new wallet console.dir(wallet); // print the new wallets address to send to console.dir(wallet.coinSpecific.rootAddress); });

You need to fund the wallet with 100 TRX as wallet creation costs this much for an individual user. You can find theaddress to fill on the rootAddress field above. TRON accounts must also maintain a minimum balance of 0.1 TRX or else the account will become deactivated and will not read data from the Tron blockchain.

To create an TRON wallet using the platform API:

12345678LABEL="My Test Wallet"PASSPHRASE="secretpassphrase1a5df8380e0e30"curl -X POST \-H "Content-Type: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN" \-d "{ \"label\": \"$LABEL\", \"passphrase\": \"$PASSPHRASE\" }" \http://$BITGO_EXPRESS_HOST:3080/api/v2/ttrx/wallet/generate

A similar operation will need to be provided above to the resultant rootAddress.

Creating addresses

BitGo supports multiple receive addresses for Tron. To create a new receive address in your TRX Wallet:

12const address = await wallet.createAddress({ label: 'My address' });console.log(address);

TRX and Token Withdrawal

You can send native TRX and TERC20 tokens with the .sendMany() method. However, TRX transactions support sending to only 1 recipient.

123456789101112const coin = 'ttrx:usdc'; // coin can be ttrx, trx or token nameconst basecoin = bitgo.coin(coin);const transaction = yield walletInstance.sendMany({ recipients: [ { amount: '10341234', address: 'TMtA4FQRddJaQ37yrdMmNsuC3jbkCs2Brt', }, ], walletPassphrase: walletPassphrase, type: 'TokenTransfer',});

Balances

Tronix (TRX) is the native asset of the TRON blockchain. The base unit of Tronix is sun:

  • 1 sun is (10-6) or 0.000001 Tronix.
  • 1 Tronix is (106) or 1000000 sun (1 million).

Balances are supported in string format: balanceString, confirmedBalanceString, and spendableBalanceString.

To obtain TRX and token balances for an entire wallet using BitGoJS:

123const basecoin = bitgo.coin(coin);const walletInfo = basecoin.wallets().get({ id: walletId, allTokens: true });// walletInfo.tokens() will return complete Tron Token information, including balances

You can also get balances (both native and tokens) based solely off address:

123const address = yield walletInstance.getAddress({ address: 'TTwW9apvyVL9EBqDVeTVDft15hf1Jnkpzy' });const bal = address.balance;return bal;

Fees

Tron uses a resource model based on bandwidth and energy to handle the cost of TRX transfer and smart contract transactions.

Bandwidth is the unit that measures the size of the transaction bytes stored in the blockchain database.

An account receives 600 free bandwidth points per day. When the available bandwidth is not enough to pay for the transaction,TRX is burned.

Energy is the unit that measures the computational resources required to execute smart contracts.

Energy can only be obtained by staking TRX. When energy is not available, TRX is burned.The energy quantity is calculated when the contract is executed. The energy consumption is also affected by the contract'senergy_factor, which is determined by the complexity of the contract.

Because exact fee calculation involves several variables and the system also burns the TRX paid if the transaction failsto execute successfully, BitGo uses a maximum fee approach to ensure transactions do not fail due to insufficient fees.The network calculates and burns only the cost of the transaction.

  • Transfer fee:
    • 2100000 sun (2.1 TRX) for TRX transactions
    • 35834875 sun (35.834875 TRX) for USDT token transactions
    • 17021500 sun (17.0215 TRX) for USDC token transactions
  • Wallet initialization fee:
    • 100000000 sun (100 TRX)

How to do a consolidation for TRX and TRON Tokens

To consolidate your receive address balances into the root address, enter the coin as TRX, or a Tron Token (trx:usdt, trx:usdc).

Note: It's recommended to consolidate tokens and then consolidate the remaining TRX in order to minimize the dust left on the address.

12345678910const consolidationTxes = await wallet.buildAccountConsolidations();try { for (const unsignedConsolidation of consolidationTxes) { const res = await wallet.sendAccountConsolidation({ walletPassphrase, prebuildTx: unsignedConsolidation }); console.dir(res, { depth: 6 }); }} catch (e) { console.error(e);}

Is this page helpful?

Tron • BitGo Docs (2024)
Top Articles
Error 403 - IQ Option Broker Official Blog
Child Support | How is Child Support Calculated in Texas?
Malluvilla In Malayalam Movies Download
Boostmaster Lin Yupoo
9Anime.tol
Kia North Huntingdon Pa
Stellaris Piracy Suppression
Remnant Graveyard Elf
YouTube Sperren mit Proxy umgehen - So geht's 2024 – PrivacyTutor
Kevin Murphy: Current: Faculty: Jacobs School of Music: Indiana University Bloomington
St Anthony Hospital Crown Point Visiting Hours
User account | Housing
Roanoke Skipthegames Com
Beacon Schneider La Porte
Six Broadway Wiki
Marla Raderman 1985
How To Breed A Loot Dragon In Dragonvale
Trejo's Blanchard Menu
Cbs Straight Up Picks
Unitek Enrollment Portal
O'reilly's In Mathis Texas
Southern Food Buffet Near Me
Black Panther 2 Showtimes Near Regal Treasure Coast Mall
Iron Drop Cafe
Flower Mound Distal Radius Fracture
Yalelightingconcepts
Livy's Ice Cream
Best Restaurants Westmont
Centricity Time And Attendance Premier Health
Bow Creek (U.S. National Park Service)
Transcript: ‘How to Supercharge Your Writing With AI Tools’
Tomorrow Tithi In Usa
Alumni of University of Michigan: class of 1978
Condo Uploader
Parent Portal Pat Med
Craigslist Snowblower
Samantha Mathis Feet
Excludes Notes A Symbol Used To Denote All Exclusion Notes
Stellaris Leader Cap
Fuego Azteca Mexican Bar And Grill Live Oak Photos
Skipthe Games.com
Lucki White House Lyrics
Teradata Rename Table
Boone County Sheriff 700 Report
12445 East Caley Avenue
Transcriptiedienst (Amberscript)
Craigslist Senatobia Ms
Here Are the Walmart Auto Services You May Not Have Heard About | Save.com
Vogler Funeral Home At Forsyth Memorial Park
Is replacing a clutch a big job?
Coors Field Seats In The Shade
Latest Posts
Article information

Author: Cheryll Lueilwitz

Last Updated:

Views: 6152

Rating: 4.3 / 5 (54 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Cheryll Lueilwitz

Birthday: 1997-12-23

Address: 4653 O'Kon Hill, Lake Juanstad, AR 65469

Phone: +494124489301

Job: Marketing Representative

Hobby: Reading, Ice skating, Foraging, BASE jumping, Hiking, Skateboarding, Kayaking

Introduction: My name is Cheryll Lueilwitz, I am a sparkling, clean, super, lucky, joyous, outstanding, lucky person who loves writing and wants to share my knowledge and understanding with you.