-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate Fluxbeam into Solana Agent Kit #208
base: main
Are you sure you want to change the base?
Conversation
@metasal1 @thearyanag I have integrated most of the fluxbeam features, added the langhchain and action files and I'm still testing the rest, please review the ones I have done so far |
hey @adpthegreat - the PR looks good can you also attach prompt for each langchain tool along with SS |
Hey @thearyanag , damn i've added the langchain class and action classes and already tested but didn't take SS just pasted the txn link as you can see above, so this means i'll really have to go through and test all of them again? |
I just want to verify if it's working fine with langchain and prompts or not |
Alright, that will take a while though, after i'll rebase and clean the codebase up, already refactored to latest file structure and stuff, thanks, happy weekend |
Hey @aryan I think I need some help i've added the right descriptions , action langchain classes double checked but I still have issues testing the prompts , eg to wrap sol Now the thing is, it worked once , but it didn't work again |
- refactored fluxbeam into folder - refactored tools - removed unused imports
2210119
to
d17547e
Compare
@thearyanag https://github.com/sendaifun/solana-agent-kit/pull/208/files#diff-09425eb9645b65c962b0de9423e1b6db54adcbfa03834db9effa677259eb1db1 https://github.com/sendaifun/solana-agent-kit/pull/208/files#diff-b409a1b3ffe822e38282f313758f8081b19d60bec5400218366e633c0ab09671 |
@@ -0,0 +1,115 @@ | |||
/* eslint-disable no-console */ | |||
import { fetchQuote, swapFromSolana } from "@mayanfinance/swap-sdk"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that you're using Mayan finance instead of fluxbeam for bridging. Please can you make sure that all of the tools make use of the fluxbeam contracts.
After further review, I noticed that you also used polyfills for most of the other tools as well. Please ensure that all of the tools carry out their functions using the fluxbeam protocol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also fluxbeam doesn't have a bridge, it uses another protocol under the hood for bridging, its basically a wrapper around it the only thing inbuilt is the dex endpoints, every other thing needs to be written from scratch and send to the endpoint i defined below
Fluxbeam is mostly closed source, and it only has two endpoints exposed, one for swapping tokens and creating pools i used fluxbeam thoroughly to test and prove this , the way it works is that it constructs the transaction behind the scenes , signs it and converts it to base64 , then i send it as a POST request to an endpoint |
What i've been doing so far is i've been refactoring the tools and tssting each prompt to make sure they work, as @thearyanag told me to do, hence the screenshots i am adding to the first message in this thread @michaelessiet |
This PR Integrate FluxBeam's comprehensive DeFi toolkit into Solana Agent Kit to enable advanced token management, liquidity operations, and token creation capabilities.
Since there were only two endpoints available all other functionality had to be written from scratch and tested on main net which I am almost done with , I found an endpoint where fluxbeam send transactions using their blazing fast bandwidth markets, so I construct and sign the transaction and POST it to the endpoint as base64
Core Defi Operations
Token Swapping interface and execution
https://solscan.io/tx/fBkaLBZ62LGSPpUB6GELBAjfLwXnHA2EeTypHojFvXYKUcezg1KJD6KaLNArdFNAUqFoVhws4mXSGMEMrD5h79U
Liquidity Provision and management
Wrap and unwrap Sol
https://solscan.io/tx/czVPppfftPc3dq1rKVXmgcmWm6kfyojuj8irGzcgnFN8r83MZLeMdXjZR8ad5EgJ5oUz1Vzd2hoXiHTV4tZMyQm - wrap sol
https://solscan.io/tx/3JmHj72Lqg1EFf5x6zHxoWrTTqLbgGKjCb34kp1Cdyuc5bTzE8CRnECfYDgXE35BPrnZsPAsEXGEj5foiREB6A48 - unwrap sol
Token transfer Functionality
https://solscan.io/tx/393xgGFqJktpwYLaXBtRgqMQ9gZMDPtxqjmqiJpaE1YnJSxRcinPvK7sGhQToh8RJprnnT4xsd2Hr94wG8yACg5a - transfer spl token
https://solscan.io/tx/RTAu1rsygDt8KtgthqjaM8bGi91vW7iAAhWD754vz1nLn2ozLQX5nbcJyBnYWysg5izRMW7xwLFG3Sov9ePZSGY - transfer sol
Cross-chain token bridging support (uses mayan finance sdk)
https://solscan.io/tx/4RQQowChW9yn63eJ4axKVgMLzHyQZrsCNucvH5NZW5Do6DQPeC58BieVpQBA3qvZJ8cD7JUvCAsD7J5G8wZ4h2GG sent 0.020 sol
https://basescan.org/tx/0x75ba5a8753c051c9d691403e016aaf7b7ee3ccc8c15702ccb21f985c1982e87e received 0.00112 WETH
Token Management Suite
V1 and V2 token creation capabilities
https://solscan.io/tx/p6pBLzHAprRcLRpHSFaGUZ12PG6qAmb72Lq81xRkFRQVTp412xAnPFq69KKqcxiBePSEfaVN6hfAngj5H6jQA2s - create v1 Token (TSTFLWR)
https://solscan.io/tx/4PN5btZZunxgDEihh1xWNkCapMhzwbGjJ44T9ox6sCkrQBuGN2GAMhB9PtDwpV8ndcQV8tFvJwdTsRKTSUXCoBHg - my V2 flower
Pool creation and management - it works and returns a valid response but its hard landing a transaction right now

Token locking mechanisms
Problem with this is that the package (bonfida token vesting) is out of date so it doesn't use the latest typescript version, so it can't compile , but I got the logic down but commented it out
Metadata management system
https://solscan.io/tx/2VPELL2owe7zuuTuWM1HB6tbMkajeNbdEsdV3J7K71s5MRPVgir68GmFjdhNf7JMyWtsAP49aqnTfdZo6H9B1JxK - updated token v1 name and symbol to FLWRV1 and FLWR
https://solscan.io/tx/2wD31mdohoxbjcM4AezYwA4SW9N3rPPqvuMftnjnz6CsTA29v5mJUAsaAkbxfBnfASSu7bmRfhK4gGTF1tixA9xw - updated token v2 name and symbol UPDATEDFLOWERV2 and UFLWR
https://solscan.io/tx/55aayZWF7QPGpt7GsW8ucgGzSDb8dhSvZ8PwxLNrWjUzMzUkkD5wawJVgB4Hrsqrhg1mbkECrz9NG1yHFDeiLk2S - SubmitFeeClaim
Withheld amounts tracking
Token burning functionality
https://solscan.io/tx/3TRW8uUdz5C5CKANu3xT6WkbyJthpm2DZSNzghP3vPkH76zvn1anBgFESsAjkV5eW1xGwLQhLrnZTsTLQ1ovjiKA
https://solscan.io/tx/3RBnWjuNqoqWrfxkvyfkGrEuiKLC7mdZGwAAXrRYfDzYDs9oNmwudWeKk5jN1MtRVhAp5drM4SVhzk62fvc3Y6ra - mintTo account
https://solscan.io/tx/4x7vHG3QzK55XiCRSdsFdDdDhmsErUz1qt2nAtWv9QQvviT796ZusaW6qFVnHxS6BmopvFRNc3xy79hb3vGE8F7h - setAuthority mint tokens
https://solscan.io/tx/aAq1DyJpEPysa676wUEQmvZpLcieiBeiGGLZaNvxUyD5B3jj7NhDL3gBPuVVZ2j8cQ6oHX8TW456mzA5gE7j8Yv - revoke authority (set Authority to none)
This pull request was created for https://app.gib.work/bounties/12aae7aa-ee5f-4b65-84ec-49eea1a4081d in an attempt to solve a bounty #127 . Payment for the bounty is immediately sent to the contributor after merge.