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

Update send transaction and orca tool #59

Conversation

calintje
Copy link
Contributor

@calintje calintje commented Dec 25, 2024

This PR adds the following 3 things:

  • Single Sided pool creation can now be done on Devnet
  • Changed the wrapping strategy for SOL to reduce transaction size in case the agent does not have WSOL account
  • Update send transaction logic. I noticed that Orca's tool is the only tool that utilizes the sendTx function, so I took the liberty to update the function to optimize it for transaction landing, which is especially important in DeFi operations, including:

Example transaction executed by the agent:
https://solscan.io/tx/3u59wSqNBGJqKJjN4n9vzhtx1w637wVDDhhsmBmtE1S8hgv1XRLPTbcrahot48Ya9YSZFcYqQHu3f9H87ssE8JNu?cluster=devnet

@thearyanag
Copy link
Member

this looks so good! can you share the prompt you used? would help in testing

@calintje
Copy link
Contributor Author

calintje commented Dec 25, 2024

The prompt I used:

single sided pool on orca: deposit amount, 1000000000000000, deposit mint: <MINT_ADDRESS>, other mint So11111111111111111111111111111111111111112, initial price 0.001, max price 1.0, fee tier 1

The cool thing is that <MINT_ADDRESS> was a mint created by the Agent as well. Would be cool to add a langchain function "Launch Token Project", that creates the token, and creates the SS Pool.

@calintje
Copy link
Contributor Author

I added;

  • a few more Orca tools:
    • create CLMM pool
    • open centered position
      • specify how wide the position is by setting priceOffsetBps
    • open a single sided positions
      • specify distance from current price in bps
      • specify width of the position in bps from the
  • update to deploy token to better reflect users intention when it comes to deploying a token amount

test
You should be able to execute the following prompts consecutively and include the necessary parameters

@thearyanag thearyanag merged commit b4ec76b into sendaifun:main Dec 30, 2024
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.

2 participants