What is TRC20? (2024)

What is TRC20? (3)

TRC20 (TRC20 Token Standard) is a token standard based on the implementation of smart contract when using TRON network to issue a token.

In order to swap, transfer, share token and be supported by digital wallets, all the TRC20 tokens follow a series of specifications which include 6 required items and 3 optional items.

What is TRC20? (4)

3 Optional Items:

  1. Token Name
string public constant name = “TRONEuropeRewardCoin”;

2. Token Abbreviation

For example, TERC is the abbreviation of TRONEuropeRewardCoin. TRONEuropeRewardCoin and TERC represent the same token, but TERC is more simple.

string public constant symbol = “TERC”;

3. Token Precision

Token precision is the minimum divisible unit. Precision 0 means the minimum divisible unit is 1. Precision 2 means the minimum divisible unit is 0.01. The maximum value of precision is 18.

uint8 public constant decimals = 6;

6 Required Items

The code below is a brief TRC20 smart contract:

contract TRC20 {function totalSupply() constant returns (uint theTotalSupply);function balanceOf(address _owner) constant returns (uint balance);function transfer(address _to, uint _value) returns (bool success);function transferFrom(address _from, address _to, uint _value) returns (bool success);function approve(address _spender, uint _value) returns (bool success);function allowance(address _owner, address _spender) constant returns (uint remaining);event Transfer(address indexed _from, address indexed _to, uint _value);event Approval(address indexed _owner, address indexed _spender, uint _value);}
  1. totalSupply()

This function returns the total supply of the token.

contract MyTRCToken { uint256 _totalSupply = 1000000; function totalSupply() constant returns (uint256 theTotalSuppl { theTotalSupply = _totalSupply; return theTotalSupply; }}

2. balanceOf()

This function returns the token balance of the specific account.

contract MyTRCToken { mapping(address => uint256) balances; address public owner; // Owner of this contract function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; }}

3. transfer()

This function is used to transfer an amount of tokens from the smart contract to a specific address.

contract MyTRCToken { mapping(address => uint256) balances; function transfer(address _to, uint256 _amount) returns (bool success) { if (balances[msg.sender] >= _amount && _amount > 0 && balances[_to] + _amount > balances[_to]) { balances[msg.sender] -= _amount; balances[_to] += _amount; Transfer(msg.sender, _to, _amount); // trigger event return true; } else { return false; } }}

4. approve()

This function is used to authorize the third party (like a DAPP smart contract) to transfer token from the token owner’s account.

contract MyTRCToken { mapping(address => mapping (address => uint256)) allowed; function approve(address _spender, uint256 _amount) returns (bool success) { allowed[msg.sender][_spender] = _amount;
// msg.sender is the third party's account
Approval(msg.sender, _spender, _amount);
// trigger event
return true; } }

5. transferFrom()

This function is used to allow the third party to transfer token from an owner account to a receiver account. The owner account must be approved to be called by the third party.

Compared to transfer(), what’s the meaning of transferFrom()?

By using transferFrom(), the third party can transfer token from your account to another account automatically.

contract MyTRCToken { mapping(address => uint256) balances; function transferFrom(address _from, address _to, uint256 _amount) returns (bool success) { if (balances[_from] >= _amount && allowed[_from][msg.sender] >= _amount && _amount > 0 && balances[_to] + _amount > balances[_to]) { balances[_from] -= _amount; balances[_to] += _amount; Transfer(_from, _to, _amount); return true; } else { return false; } }}

6. allowance()

This function is used to query the remaining amount of tokens the third party can transfer.

Approve() can authorize the third pay to transfer token from the owner account, then through transferFrom() it can transfer token to a receiver account.

For example:

Alice owns 1000 TRX, if he wants to allow the third part contract C to manipulate 100 TRX from his account:

  1. Call approve(C, 100) using Alice’s account
  2. Contract C wants to transfer 10 TRX to Bob from Alice. Call transferFrom(Alice, Bob, 10) using contract C’s account.
  3. Call allowance(Alice, C) to query the remaining tokens that the contract C can transfer from Alice’s account.

2 Event Functions

event Transfer(address indexed _from, address indexed _to, uint256 _value)

When token is successfully transferred, it has to trigger Transfer Event.

event Approval(address indexed _owner, address indexed _spender, uint256 _value)

When approval() is successfully called, it has to trigger Approval Event.

https://github.com/tronprotocol/tips/blob/master/tip-20.md

https://www.jianshu.com/p/cc81e7b66f8e

Github: https://github.com/tronprotocol

Telegram: https://t.me/troncoredevscommunity

What is TRC20? (2024)

FAQs

What is the TRC20? ›

A USDT TRC20 is a crypto wallet that uses the TRON network to store private keys and allow transactions. It utilizes USDT, a stablecoin pegged at 1:1 with the US Dollar, to facilitate cryptocurrency exchanges. TRON is a rapid-growing open-source blockchain network that's been gaining popularity as of late.

Is USDT TRC20 safe to use? ›

TRC20 tokens, like USDT (Tether) on the TRON blockchain, are generally considered safe to use, as long as you transact with reputable exchanges or wallets that support them securely. However, it's essential to exercise caution and ensure you're using legitimate platforms to avoid potential scams or security breaches.

Which wallet uses TRC20? ›

There are several wallets available that support TRC20-based tokens, including TronLink, Klever, and Trust Wallet. Simply download and install one of these wallets and follow the instructions. Is it safe to store Tether in a TRC20 wallet?

What is TRC20 payment? ›

Tether is considered a stablecoin because it is designed to be valued at USD $1.00. TRC20 refers to the type of Tron token protocol used for this payment method. Coinremitter offers loads of features to merchants such as multi-wallet support , creating an invoice, digital wallet and many more.

What is an example of a TRC20 address? ›

A TRC-20 address is an alphanumeric string starting with "T" that allows you to interact with TRC-20 tokens. These addresses contain a blend of uppercase and lowercase letters with numbers. An example of a USDT TRC-20 wallet address might look like this: TPAgKfYzRdK83Qocc4gXvEVu4jPKfeuer5.

How do I know if my wallet is TRC20? ›

The exchange will make it clear what type of chain they are using; however, one easy way to differentiate between these two is by the way the address is structured. An ERC20 Address only starts with '0' and 'x'. For example: 0xbc6e. A TRC20 Address only begins with a capital 'T'.

Who accepts USDT TRC20? ›

If you would like to know where to buy Tether USD (TRC-20) , the top cryptocurrency exchanges for trading in Tether USD (TRC-20) stock are currently Binance, OKX, Bitco*ke, DigiFinex, and FTX.

Can USDT TRC20 be traced? ›

To track a Tether USDT TRC20 transaction, visit the Bitquery Explorer, and enter the transaction ID or wallet address in the search bar to view the transaction history.

Is TRC20 good? ›

Hence, it's excellent for crypto investors to use it as a store of value and an easy transition point from fiat to crypto. TRC20 transactions are quite fast because of the speed of the TRON network. About 2000 transactions can go through in a second!

How can I withdraw my USDT to my bank account? ›

To withdraw USDT to a bank account, you can transfer your USDT to an exchange that supports the withdrawal of USDT to a bank account. Then, you can initiate a withdrawal request and provide the necessary information, such as the bank account number, name, etc. The withdrawal process may take a few days to complete.

How long does a TRC20 withdrawal take? ›

The time it takes to transfer USDT-TRC20 from Coinbase Exchange to Token Pocket can vary, but on average it takes anywhere from 1 to 10 minutes. This is because USDT-TRC20 uses the ERC-20 network, which is generally faster than other blockchain networks.

How to withdraw USDT in USA? ›

To withdraw USDT to a bank account is simple. First, transfer your USDT to an exchange or wallet that allows USDT withdrawals. Once it's there, initiate a withdrawal and provide your bank account details, including your account number and name. The withdrawal process typically takes a few business days to complete.

Is TRC20 the same as USDT? ›

Tether (USDT) exists in two primary variants: TRC20 and ERC20, each operating on different blockchain platforms. TRC20 Tether runs on the TRON blockchain, offering faster and cheaper transactions compared to ERC20 Tether, which operates on Ethereum.

What is the code TRC20? ›

Smart Contract Development

TRC-20 tokens are implemented as smart contracts on the TRON blockchain, written in Solidity or other compatible programming languages. Developers define the token's properties, such as name, symbol, total supply, and decimal precision, within the smart contract code.

Which app uses TRC20 wallet? ›

With Bitget Wallet, you gain seamless access to the rich TRC20 DApp ecosystem, enhancing your crypto experience. Not just limited to TRC20, Bitget Wallet supports over 100 other mainnets, making it a comprehensive digital asset management tool.

What's the difference between ERC20 and TRC20? ›

TRC20 and ETH20 are two different token standards that are used for the technical specification of tokens on the Tron and Ethereum networks. ERC20 is a token standard that implements API functionality for tokens within Ethereum smart contracts, while TRC20 is a token standard used for Tron assets.

Top Articles
How to Get Cash from a Credit Card at an ATM
The Three Pillars of Sustainability
Mickey Moniak Walk Up Song
Craigslist Warren Michigan Free Stuff
Cold Air Intake - High-flow, Roto-mold Tube - TOYOTA TACOMA V6-4.0
Jackerman Mothers Warmth Part 3
Mr Tire Prince Frederick Md 20678
O'reilly's In Monroe Georgia
Merlot Aero Crew Portal
Umn Pay Calendar
Guardians Of The Galaxy Vol 3 Full Movie 123Movies
iLuv Aud Click: Tragbarer Wi-Fi-Lautsprecher für Amazons Alexa - Portable Echo Alternative
State HOF Adds 25 More Players
Telegram Scat
Moviesda3.Com
Wisconsin Women's Volleyball Team Leaked Pictures
Troy Bilt Mower Carburetor Diagram
Parentvue Clarkston
Craigslist Sparta Nj
Concordia Apartment 34 Tarkov
Ahrefs Koopje
Talk To Me Showtimes Near Marcus Valley Grand Cinema
Baldur's Gate 3: Should You Obey Vlaakith?
eugene bicycles - craigslist
Essence Healthcare Otc 2023 Catalog
Best Middle Schools In Queens Ny
1773x / >
Violent Night Showtimes Near Johnstown Movieplex
2023 Ford Bronco Raptor for sale - Dallas, TX - craigslist
Have you seen this child? Caroline Victoria Teague
Kaiju Paradise Crafting Recipes
Σινεμά - Τι Ταινίες Παίζουν οι Κινηματογράφοι Σήμερα - Πρόγραμμα 2024 | iathens.gr
Greencastle Railcam
The Land Book 9 Release Date 2023
Flashscore.com Live Football Scores Livescore
The best Verizon phones for 2024
Bella Thorne Bikini Uncensored
Kelley Blue Book Recalls
Htb Forums
Citibank Branch Locations In Orlando Florida
SF bay area cars & trucks "chevrolet 50" - craigslist
Rage Of Harrogath Bugged
Gli italiani buttano sempre più cibo, quasi 7 etti a settimana (a testa)
Greg Steube Height
Sandra Sancc
Myra's Floral Princeton Wv
Pas Bcbs Prefix
Meee Ruh
Mytmoclaim Tracking
Erica Mena Net Worth Forbes
Gelato 47 Allbud
Shad Base Elevator
Latest Posts
Article information

Author: Patricia Veum II

Last Updated:

Views: 6454

Rating: 4.3 / 5 (44 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Patricia Veum II

Birthday: 1994-12-16

Address: 2064 Little Summit, Goldieton, MS 97651-0862

Phone: +6873952696715

Job: Principal Officer

Hobby: Rafting, Cabaret, Candle making, Jigsaw puzzles, Inline skating, Magic, Graffiti

Introduction: My name is Patricia Veum II, I am a vast, combative, smiling, famous, inexpensive, zealous, sparkling person who loves writing and wants to share my knowledge and understanding with you.