feat: Pr/2275 plugin: bridge, swap and transfer on Tron blockchain
Fork
#2275
Relates to
No specific issue or ticket is linked to this PR.
Risks
Low: This PR is for create a plugin that is not effecting the core functionality of the application.
Background
What does this PR do?
This PR creates a plugin that allows users integrate with TRON blockchain. including the following features:
- Native token transfers
- Cross-chain token bridging via Symbiosis
- Token swapping on Sunswap
- Wallet balance tracking
- Custom RPC endpoint configuration
What kind of change is this?
Features (non-breaking change which adds functionality)
Documentation changes needed?
My changes do not require a change to the project documentation.
Testing
Where should a reviewer start?
Review the new plugin from src/index.ts, actions/_ providers/_
Detailed testing steps
Please refer to the README.md for detailed testing steps.
lgtm as long as it builds; waiting for develop to be fixed
can you have a look @odilitime
hi @wtfsayo, is there anything else I need to do on this PR to get it merged?
[!WARNING] There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.
🔧 eslint
If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.
agent/src/index.ts
Oops! Something went wrong! :(
ESLint: 9.18.0
ESLint couldn't find an eslint.config.(js|mjs|cjs) file.
From ESLint v9.0.0, the default configuration file is now eslint.config.js. If you are using a .eslintrc.* file, please follow the migration guide to update your configuration file to the new format:
https://eslint.org/docs/latest/use/configure/migration-guide
If you still have problems after following the migration guide, please stop by https://eslint.org/chat/help to chat with the team.
📝 Walkthrough
Walkthrough
This pull request introduces a comprehensive Tron blockchain plugin for the Eliza OS ecosystem. The changes span multiple files, adding support for token transfers, swaps, and cross-chain bridging. A new plugin is created with detailed configuration, actions, and provider implementations, enabling seamless interaction with the Tron blockchain through environment variables and a structured plugin architecture.
Changes
| File | Change Summary |
|---|---|
.env.example |
Added Tron-specific environment variables TRON_PRIVATE_KEY and TRON_PROVIDER_URL |
agent/package.json |
Added @elizaos/plugin-tron as a workspace dependency |
agent/src/index.ts |
Integrated Tron plugin with conditional loading based on private key |
packages/plugin-tron/* |
Created comprehensive plugin with actions, providers, types, and configurations |
Possibly related PRs
- #2095: Agent configuration modifications
- #2298: Plugin integration patterns
- #2340: Blockchain token transfer actions
- #2463: Environment variable configuration enhancements
✨ Finishing Touches
- [ ] 📝 Generate Docstrings (Beta)
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR. (Beta)@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
[!WARNING] There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.
🔧 eslint
If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.
agent/src/index.ts
Oops! Something went wrong! :(
ESLint: 9.18.0
ESLint couldn't find an eslint.config.(js|mjs|cjs) file.
From ESLint v9.0.0, the default configuration file is now eslint.config.js. If you are using a .eslintrc.* file, please follow the migration guide to update your configuration file to the new format:
https://eslint.org/docs/latest/use/configure/migration-guide
If you still have problems after following the migration guide, please stop by https://eslint.org/chat/help to chat with the team.
📝 Walkthrough
Walkthrough
The pull request introduces a comprehensive TRON blockchain plugin for the Eliza OS ecosystem. It adds support for token transfers, cross-chain bridging, and token swapping on the TRON network. The plugin includes a wallet provider, action handlers, and necessary configurations to interact with TRON-based services like SunSwap and Symbiosis. New environment variables, ABIs, and type definitions are established to facilitate seamless blockchain interactions.
Changes
| File | Change Summary |
|---|---|
.env.example |
Added TRON blockchain configuration entries |
agent/package.json |
Added @elizaos/plugin-tron workspace dependency |
agent/src/index.ts |
Imported and conditionally initialized TRON plugin |
packages/plugin-tron/ |
Added complete plugin implementation with actions, providers, and configurations |
✨ Finishing Touches
- [ ] 📝 Generate Docstrings (Beta)
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR. (Beta)@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
[!WARNING] There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.
🔧 eslint
If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.
agent/src/index.ts
Oops! Something went wrong! :(
ESLint: 9.18.0
ESLint couldn't find an eslint.config.(js|mjs|cjs) file.
From ESLint v9.0.0, the default configuration file is now eslint.config.js. If you are using a .eslintrc.* file, please follow the migration guide to update your configuration file to the new format:
https://eslint.org/docs/latest/use/configure/migration-guide
If you still have problems after following the migration guide, please stop by https://eslint.org/chat/help to chat with the team.
📝 Walkthrough
Walkthrough
This pull request introduces a comprehensive TRON blockchain plugin for the Eliza OS ecosystem. The changes include adding configuration variables, creating a new plugin package with actions for token transfers, swaps, and cross-chain bridging, and implementing a wallet provider for TRON blockchain interactions. The plugin enables seamless integration of TRON blockchain functionalities into the existing agent framework.
Changes
| File | Change Summary |
|---|---|
.env.example |
Added TRON_PRIVATE_KEY and TRON_PROVIDER_URL configuration variables |
agent/package.json |
Added @elizaos/plugin-tron as a workspace dependency |
agent/src/index.ts |
Imported and conditionally included tronPlugin based on TRON private key |
packages/plugin-tron/* |
Created comprehensive plugin with actions, providers, ABIs, and configuration files |
Possibly related PRs
- #2095: Changes to agent plugin management
- #2298: Adding blockchain-related dependencies
- #2340: Blockchain token transfer action implementation
- #2463: Agent functionality expansion through plugin integration
✨ Finishing Touches
- [ ] 📝 Generate Docstrings (Beta)
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR. (Beta)@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
@tcm390 can you check this
hi @wtfsayo, is there anything else I need to do on this PR to get it merged?
can you check ai feedback; if you want you can push to original branch; some of the stuff from here! I would suggest opening a new PR so that all the comments are gone tho!
Hello,
We are changing our plugin development strategy to be more scalable. We have moved the plugins out into their own repos and we're looking for people to either maintain those or own them on their own Github.
If you'd like to be a maintainer, file an issue in the plugin repo and join our Discord https://discord.gg/elizaos to coordinate.
If you'd like to control the plugin on your own Github, please add an issue to the plugin repo pointing to your repo, and add a modification to the registry. Submit a PR to edit the registry here: https://github.com/elizaos-plugins/registry
Closing this PR for now. Let us know if you have any questions.