Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

adpthegreat
Copy link
Contributor

@adpthegreat adpthegreat commented Jan 15, 2025

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

Screenshot 2025-01-23 at 19 43 41 Screenshot 2025-01-23 at 19 42 32 Screenshot 2025-01-23 at 19 42 55

Token Management Suite

Screenshot 2025-01-28 at 20 39 55 Screenshot 2025-01-28 at 20 59 17 Screenshot 2025-01-25 at 09 08 15 Screenshot 2025-01-25 at 16 12 06 Screenshot 2025-01-26 at 01 44 43 Screenshot 2025-01-25 at 22 55 29
  • Token airdrop functionality - will probably test on devnet because of multiple ATA creation takes a lot of SOL

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.

@adpthegreat
Copy link
Contributor Author

@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

@thearyanag
Copy link
Member

hey @adpthegreat - the PR looks good

can you also attach prompt for each langchain tool along with SS

@adpthegreat
Copy link
Contributor Author

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?

@thearyanag
Copy link
Member

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

@adpthegreat
Copy link
Contributor Author

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

@adpthegreat
Copy link
Contributor Author

adpthegreat commented Jan 21, 2025

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
I'm rebasing now so you'll see the updated code
This is the issue I get -
Screenshot 2025-01-21 at 12 38 18

Screenshot 2025-01-21 at 12 39 06

Now the thing is, it worked once , but it didn't work again
Screenshot 2025-01-21 at 12 39 40
in

@adpthegreat
Copy link
Contributor Author

adpthegreat commented Jan 21, 2025

@@ -0,0 +1,115 @@
/* eslint-disable no-console */
import { fetchQuote, swapFromSolana } from "@mayanfinance/swap-sdk";
Copy link
Collaborator

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

Copy link
Contributor Author

@adpthegreat adpthegreat Jan 27, 2025

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

@adpthegreat
Copy link
Contributor Author

adpthegreat commented Jan 27, 2025

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 api.fluxbeam.xyz/v1/sendTransaction?bwmkt=true the signing and sending logic is in utils/fluxbeamClient.ts thats what qualifies it as being fluxbeam

@adpthegreat
Copy link
Contributor Author

adpthegreat commented Jan 27, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants