Skip to content

Commit

Permalink
Integrate Fluxbeam into Solana Agent Kit (#208)
Browse files Browse the repository at this point in the history
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
<img width="959" alt="Screenshot 2025-01-23 at 19 43 41"
src="https://github.com/user-attachments/assets/92414f4f-0f3e-4681-b3c0-849fcc244e01"
/>
<img width="978" alt="Screenshot 2025-01-23 at 19 42 32"
src="https://github.com/user-attachments/assets/b2513ad2-8ce8-4f18-9eac-6a6b3f8680eb"
/>
<img width="1139" alt="Screenshot 2025-01-23 at 19 42 55"
src="https://github.com/user-attachments/assets/1048c9ad-e4cc-456e-95b7-267d6530335e"
/>

- Token transfer Functionality 

https://solscan.io/tx/393xgGFqJktpwYLaXBtRgqMQ9gZMDPtxqjmqiJpaE1YnJSxRcinPvK7sGhQToh8RJprnnT4xsd2Hr94wG8yACg5a
- transfer spl token

https://solscan.io/tx/RTAu1rsygDt8KtgthqjaM8bGi91vW7iAAhWD754vz1nLn2ozLQX5nbcJyBnYWysg5izRMW7xwLFG3Sov9ePZSGY
- transfer sol
<img width="1431" alt="Screenshot 2025-01-27 at 19 02 14"
src="https://github.com/user-attachments/assets/f0bb17aa-c9ef-4c31-89b8-35dbca2b4803"
/>
<img width="1431" alt="Screenshot 2025-01-27 at 18 38 55"
src="https://github.com/user-attachments/assets/af541bec-d829-4677-96a4-ad2d60882c0d"
/>

- Cross-chain token bridging support (uses mayan finance sdk) it has
already been merged in another PR

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

Token v1 prompts
<img width="1205" alt="Screenshot 2025-01-28 at 20 39 55"
src="https://github.com/user-attachments/assets/50ade244-7b05-422e-a8ba-02f9269a9ac0"
/>
<img width="1205" alt="Screenshot 2025-01-28 at 20 59 17"
src="https://github.com/user-attachments/assets/23d46240-93fc-4d12-adf1-b6257c7ed7a7"
/>

Token v2 (Token 2022) prompts
<img width="1234" alt="Screenshot 2025-01-29 at 19 23 07"
src="https://github.com/user-attachments/assets/87f62c52-2b0c-423b-aa64-65d32df3b110"
/>
<img width="1133" alt="Screenshot 2025-01-30 at 14 23 23"
src="https://github.com/user-attachments/assets/079b92b9-11a3-4fe0-8733-f340bb5582ac"
/>


- Fee management interface 



https://solscan.io/tx/55aayZWF7QPGpt7GsW8ucgGzSDb8dhSvZ8PwxLNrWjUzMzUkkD5wawJVgB4Hrsqrhg1mbkECrz9NG1yHFDeiLk2S
- SubmitFeeClaim

<img width="1261" alt="Screenshot 2025-01-25 at 09 08 15"
src="https://github.com/user-attachments/assets/36fbb345-f80c-47f0-9205-68379f1782a9"
/>
<img width="1261" alt="Screenshot 2025-01-25 at 16 12 06"
src="https://github.com/user-attachments/assets/9e8d2931-1de8-4c23-a7fe-9827257a29eb"
/>


- Withheld amounts tracking 

- Token burning functionality 

https://solscan.io/tx/3TRW8uUdz5C5CKANu3xT6WkbyJthpm2DZSNzghP3vPkH76zvn1anBgFESsAjkV5eW1xGwLQhLrnZTsTLQ1ovjiKA
<img width="1109" alt="Screenshot 2025-01-26 at 01 44 43"
src="https://github.com/user-attachments/assets/d572cbb4-12d2-4a99-9182-5decd69f5865"
/>

- Token minting controls 

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)
<img width="1109" alt="Screenshot 2025-01-25 at 22 55 29"
src="https://github.com/user-attachments/assets/40e09a29-08a0-4b62-9c31-71b080028dca"
/>
<img width="1561" alt="Screenshot 2025-01-31 at 21 43 14"
src="https://github.com/user-attachments/assets/6ec480bb-b760-43b0-aceb-d29302afca72"
/>
<img width="1561" alt="Screenshot 2025-01-31 at 21 43 46"
src="https://github.com/user-attachments/assets/d02460bd-8436-476a-afb3-751c6da93e17"
/>


- 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.
  • Loading branch information
thearyanag authored Feb 7, 2025
2 parents 37a3184 + 5202a9e commit d99bf76
Show file tree
Hide file tree
Showing 15 changed files with 540 additions and 4 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
"@metaplex-foundation/mpl-toolbox": "^0.9.4",
"@metaplex-foundation/umi": "^0.9.2",
"@metaplex-foundation/umi-bundle-defaults": "^0.9.2",
"@metaplex-foundation/umi-options": "^1.0.0",
"@metaplex-foundation/umi-uploader-irys": "^1.0.0",
"@metaplex-foundation/umi-web3js-adapters": "^0.9.2",
"@meteora-ag/alpha-vault": "^1.1.7",
"@meteora-ag/dlmm": "^1.3.0",
Expand All @@ -63,6 +65,7 @@
"@pythnetwork/hermes-client": "^1.3.0",
"@raydium-io/raydium-sdk-v2": "0.1.95-alpha",
"@solana/spl-token": "^0.4.9",
"@solana/spl-token-metadata": "^0.1.6",
"@solana/web3.js": "^1.98.0",
"@solutiofi/sdk": "^1.0.2",
"@sqds/multisig": "^2.1.3",
Expand Down
210 changes: 210 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d99bf76

Please sign in to comment.