feat: add Tron chain definitions for currency package#1688
feat: add Tron chain definitions for currency package#1688rodrigopavezi wants to merge 1 commit intofeat/tron-smart-contractsfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Greptile OverviewGreptile SummaryAdded comprehensive support for Tron blockchain to the currency package, enabling the system to handle Tron mainnet and Nile testnet chains.
The implementation follows the existing architectural patterns and is consistent with how other blockchain networks are integrated into the system. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant App as Application
participant TronChains as TronChains
participant ChainsAbstract as ChainsAbstract
participant TronDef as Tron/Nile Definitions
participant Types as Currency Types
App->>Types: Import TronChainName type
App->>TronChains: Import TronChains instance
TronChains->>TronDef: Load chain definitions (tron, nile)
TronChains->>ChainsAbstract: Initialize with chains & CURRENCY.ETH
ChainsAbstract->>ChainsAbstract: Register chain names
ChainsAbstract->>ChainsAbstract: Attempt to add native currencies
Note over ChainsAbstract: No native TRX currencies defined,<br/>so none are added
App->>TronChains: isChainSupported('tron')
TronChains-->>App: true
App->>TronChains: getChainId('tron')
TronChains->>TronDef: Access tron.chainId
TronDef-->>TronChains: 'tron'
TronChains-->>App: 'tron'
App->>TronChains: Access currencies for tron
TronChains->>TronDef: Access tron.currencies
TronDef-->>App: {USDT, USDC definitions}
|
6567549 to
5897325
Compare
62d10a1 to
2496888
Compare
- Add Tron mainnet and Nile testnet chain configurations - Add TronChains types and exports - Update currency-types with Tron chain support
2496888 to
80b8f33
Compare
MantisClone
left a comment
There was a problem hiding this comment.
Looks good to me so far.
Reviewed with Claude Code Opus 4.5
| @@ -0,0 +1,10 @@ | |||
| export const chainId = 'nile'; | |||
There was a problem hiding this comment.
Why is the tron definition added under declarative chains ? considering we are deploying the smart contract for it ?
There was a problem hiding this comment.
I approved this PR because I saw PR5 deleted these files.

Description of the changes
Added support for Tron blockchain and its Nile testnet:
Closes RequestNetwork/private-issues#223
Closes RequestNetwork/private-issues#224