feat: add native TRX and TRC20 coin configs (wallet-only)#1722
Open
feat: add native TRX and TRC20 coin configs (wallet-only)#1722
Conversation
- TRX: TRON mainnet, wallet_only, HD path m/44'/195' - USDT-TRC20: Tether on TRON mainnet (TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t) - TRXT: TRON Nile testnet - USDT-TRC20-TEST: Tether on Nile testnet (TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf) - Node configs for mainnet (api.trongrid.io) and testnet (api.nileex.io, nile.trongrid.io) All entries are wallet_only pending swap contract support. Companion to GLEECBTC/komodo-defi-framework#2714 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cipig
reviewed
Mar 6, 2026
coins
Outdated
| } | ||
| }, | ||
| { | ||
| "coin": "USDT-TRC20-TEST", |
Collaborator
There was a problem hiding this comment.
- should only be used once in a ticker, like in USDC-AVX20_OLD
for testchains it's better to use a completely different ticker, like TESTUSDT-TRC20
if the ticker starts with USDT-, GUI will use the price of USDT for this
Author
There was a problem hiding this comment.
Done, renamed to TESTUSDT-TRC20 and updated the name field to match.
cipig
reviewed
Mar 6, 2026
| "decimals": 6, | ||
| "derivation_path": "m/44'/195'", | ||
| "protocol": { | ||
| "type": "TRC20", |
Collaborator
There was a problem hiding this comment.
type of tokens is ERC20, no matter which specific chain it's on
like in
"coin": "MASK-PLG20",
"chain_id": 137,
"protocol": {
"type": "ERC20",
"protocol_data": {
"platform": "MATIC",
"contract_address": "0x2B9E7ccDF0F4e5B24757c1E1a80e311E34Cb10c7"
Author
There was a problem hiding this comment.
TRC20 is a new coin type for tron
cipig
reviewed
Mar 6, 2026
| "required_confirmations": 1, | ||
| "derivation_path": "m/44'/195'", | ||
| "protocol": { | ||
| "type": "TRX", |
Collaborator
There was a problem hiding this comment.
on the other EVM chains, the main coin is configured like this
"coin": "MATIC",
"fname": "Polygon",
"protocol": {
"type": "ETH",
"protocol_data": {
"chain_id": 137
}
with type ETH and chain_id
has this changed for TRX?
Rename USDT-TRC20-TEST to TESTUSDT-TRC20 per review feedback: - Avoids double hyphen in ticker (convention: single hyphen only) - Prevents GUI from matching USDT price for testnet coin Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix: set TRX/TRXT coin type to TRC-20
TRX and TRXT had an empty "type" field because the protocol type
resolution in get_protocol_info() only handled ETH and QTUM as
platform coin protocols. TRON uses its own protocol type ("TRX")
rather than "ETH", so it fell through all type-assignment paths.
Add "TRX" to the platform protocol check so TRX resolves to "TRC-20"
via the existing protocols dict, matching how ETH resolves to "ERC-20".
* Update coins json file (#1741)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix(config): generate TRX type for Tron platform assets * Update coins json file (#1744) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Resolved conflicts in generated utils/*.json by taking master versions then re-running generate_app_configs.py so outputs match the merged tree.
…1747) * fix(config): generate TRX type for Tron platform assets * Update coins json file (#1744) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: add Tron-native RPC scanning and fix TRC20 token connectivity The scanner was probing TRX nodes with Ethereum JSON-RPC (eth_blockNumber) against the base URL, which TronGrid returns 405 for. This caused all TRX and TRC20 coins to be permanently delisted despite functional nodes. - Add TronServer class that probes /wallet/getnowblock (Tron HTTP API) - Route TRX-protocol coins to the new Tron scanner automatically - Add tron-rpc.publicnode.com as a second mainnet RPC node - Fix testnet TRC20 tokens mapping to wrong parent chain (TRX vs TRXT) - Add -TRC20 to token suffix list so TRC20 tokens inherit parent status * Update coins json file (#1748) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…add-tron-coins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wallet_onlypending swap contract supportCompanion to GLEECBTC/komodo-defi-framework#2714
Test plan
Activation
enable_eth_with_tokenstask::enable_eth::initenable_erc20_token/task::enable_erc20::initAddresses
T...address matches TronLink for same mnemonicBalances
Withdrawals
Fees
🤖 Generated with Claude Code