Skip to main content

How to Know if an Address Is Blacklisted on TRON?

tokenviewAbout 2 min

How to Know if an Address Is Blacklisted on TRON?

Usually when you trade Tether USDT on TRON blockchain, you will need to know if the target address is blacklisted. Because blacklisted address could NOT transfer USDT out unless it is removed from the Tether's black address list. And even more the USDT in blacklisted address has the possibility to be destroyed by Tether, once destroyed, the balance will be zero.

Then, how to know if an address is blacklisted? Following is the best way to check:

  1. open https://trx.tokenview.io/en/bannedopen in new window
  2. find the address you want to check
  3. if you cannot find the address from the list, then the address is not blacklisted
  4. if the address is listed, then the address is blacklisted

You might ask is this list correct? What's the logical behind the list? Well, below is the explanation from technical side.

Tether USDT on TRON is a token, a contract, it is running with codes on TVM. The codes are used by Tether USDT issuer to control the issue, redeem, transfer and blacklist.

    function addBlackList (address _evilUser) public onlyOwner {
        isBlackListed[_evilUser] = true;
        AddedBlackList(_evilUser);
    }

    function removeBlackList (address _clearedUser) public onlyOwner {
        isBlackListed[_clearedUser] = false;
        RemovedBlackList(_clearedUser);
    }

Once Tether plans to add an address into blacklist, Tether will trigger "addBlackList" transaction from address MultiSigWalletopen in new window, and put the target blacklisted address as the "Input parameter", then TVM will execute this code piece, and generate a AddedBlackList(index_topic_1address_user) event, this event could be retrieved from the log in the transaction information.

For example, transaction hash "b3b38075f9987af64f56c7059f9adb1dd4233de2af36d2d60bf45d9e30446bc9" is a "addBlacklist" transaction, it added address "TU4isedhHXquDQQvyK4CVGNRDWTvwqTpxRopen in new window" into blacklist. Let's check its log information.

curl -H "Content-Type:application/json" -X POST http://<rpc node>/wallet/gettransactioninfobyid -d '{"value": "b3b38075f9987af64f56c7059f9adb1dd4233de2af36d2d60bf45d9e30446bc9"}'
{"id": "b3b38075f9987af64f56c7059f9adb1dd4233de2af36d2d60bf45d9e30446bc9","blockNumber": 57833080,"blockTimeStamp": 1704132882000,"contractResult": [""],"contract_address": "410fa695d6b065707cb4e0ef73b751c93347682bf2","receipt": {"energy_usage": 95895,"energy_usage_total": 95895,"net_usage": 313,"result": "SUCCESS","energy_penalty_total": 26102},"log": [{"address": "0fa695d6b065707cb4e0ef73b751c93347682bf2","topics": ["4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef","000000000000000000000000a89ae0805bbc6b0d7912d7103f216f3f2ff04f97","0000000000000000000000000000000000000000000000000000000000000419"]},{"address": "a614f803b6fd780986a42c78ec9c7f77e6ded13c","topics": ["42e160154868087d6bfdc0ca23d96a1c1cfa32f1b72ba9ba27b69b98a0d819dc","000000000000000000000000c67d47af3dc61a89364f47bd00183c0700cf4ed3"]},{"address": "0fa695d6b065707cb4e0ef73b751c93347682bf2","topics": ["33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed75","0000000000000000000000000000000000000000000000000000000000000419"]}],"internal_transactions": [{"hash": "470c634e035dd06b02d06725e3d2302f914af5b523ca5d327bab727b39a30100","caller_address": "410fa695d6b065707cb4e0ef73b751c93347682bf2","transferTo_address": "41a614f803b6fd780986a42c78ec9c7f77e6ded13c","callValueInfo": [{}],"note": "63616c6c"}]}

From the log, there is a topic "42e160154868087d6bfdc0ca23d96a1c1cfa32f1b72ba9ba27b69b98a0d819dc", this is the "addBlackList" function, then we could parse the parameter of this topic, "000000000000000000000000c67d47af3dc61a89364f47bd00183c0700cf4ed3", yes, this is the targetted blacklisted address. It is the ETH formatted address, you will see "TU4isedhHXquDQQvyK4CVGNRDWTvwqTpxRopen in new window" after changing the address format to be TRON format.

import base58
def base58Encode(hexStr):
    ret = base58.b58encode_check(bytes.fromhex(hexStr))
    if isinstance(ret,bytes):
        ret = ret.decode()
    return ret

ethAddress = log['topics'][1]
ethAddress = '41' + ethAddress[len(ethAddress)-40:]
tronAddress =base58Encode(ethAddress)

That's all. The list is from the on-chain data, you can verify them by yourself per your requests.

Tokenview is a blockchain data provider, all data are from chain, feel free to contact Tokenview to customize the data you want if you cannot find it from existing APIsopen in new window.

About Tokenview Blockchain APIs & Data Service Platform:

Tokenview blockchain APIs & data service platform contained 120+ blockchains has powerful endpoints that simplify complex blockchain data into single API calls. Code for all supported blockchains using unified API calls. From here to easily get transaction, address, gas, contract, token, NFT, logs and any information from chain. And Yes you can also send tx to chain. One-click configuration with APIKey helps developers to Use, to Create, to Build.
Last update: