Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export enum TokenType {
ISO4217 = "ISO4217",
ERC20 = "ERC20",
ETH = "ETH",
// TODO change the token lists for Tron to use TRC20 after we fix https://github.com/RequestNetwork/requestNetwork/issues/1713
TRC20 = "TRC20",
}

Expand Down
6 changes: 3 additions & 3 deletions tokens/token-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": {
"major": 1,
"minor": 5,
"patch": 0
"patch": 1
},
"tokens": [
{
Expand Down Expand Up @@ -8176,7 +8176,7 @@
"decimals": 6,
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"network": "tron",
"type": "TRC20",
"type": "ERC20",
"hash": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"chainId": 728126428
},
Expand All @@ -8187,7 +8187,7 @@
"decimals": 6,
"address": "TEkxiTehnzSmSe2XqrBj4w32RUN966rdz8",
"network": "tron",
"type": "TRC20",
"type": "ERC20",
Comment on lines 8179 to +8190
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 ERC20 type on Tron network creates semantic collision for consumers

Both Tron tokens now carry "type": "ERC20" while retaining "network": "tron". Any downstream consumer that routes payments or builds transaction data based solely on type === "ERC20" will now encounter these Tron addresses in an EVM context. Tron addresses (e.g. TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t) are not valid EVM addresses, so any EVM-side operation (e.g. ABI encoding, ethers.utils.getAddress normalisation, smart contract calls) attempted against them will either throw or silently produce wrong output.

Consumers who correctly pair type with network will be unaffected, but anyone who trusts type alone—which is the primary filter field exposed by the schema—will be exposed to this mismatch. It is worth explicitly documenting this caveat in the PR/changelog (beyond the TODO comment in the enum) so that integrators are aware they must also check network !== "tron" when processing "type": "ERC20" entries for the duration of this workaround.

"hash": "TEkxiTehnzSmSe2XqrBj4w32RUN966rdz8",
"chainId": 728126428
}
Expand Down
Loading