Sega DEX swap and pool functionality added to the sonic-agent-kit #2
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.
Pull Request Description
Successfully integrated the Sega DEX into the sonic-agent-kit :
Changes Made
This PR adds the following changes:
Features Added:
Implementation Details
New Files Created:
src/tools/sega/swap_compute.ts- API functions for computing swapssrc/tools/sega/swap_transaction.ts- API functions for generating swap transactionssrc/tools/sega/get_token_price.ts- API functions for token price and informationsrc/tools/sega/get_pool_info.ts- API functions for pool informationsrc/tools/sega/get_stats.ts- API functions for leaderboard and statisticssrc/tools/sega/index.ts- Export file for Sega DEX toolsdocs/examples/sega-dex-examples.md- Documentation with usage examplesUpdated Files:
src/tools/index.ts- Added export for Sega DEX toolssrc/agent/index.ts- Added Sega DEX methods to SonicAgentKit classsrc/types/index.ts- Added Sega DEX type definitionsTransaction executed by agent
Example transaction:
Prompt Used
Additional Notes
Checklist