Commit Graph

98 Commits

Author SHA1 Message Date
Damjan
925d0cf82b Merge remote-tracking branch 'sak/main' 2025-01-18 09:55:55 +01:00
aryan
343cf4c2d7 chore: docs + lint 2025-01-18 01:55:15 +05:30
aryan
89aed5452c Merge branch 'main' into quangkeu95/main 2025-01-18 01:49:33 +05:30
aryan
d8c67311a5 Add Voltr check balance, deposit and withdraw strategy (#128)
# Pull Request Description

## Related Issue
Fixes # (issue number)

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- Query Voltr vault and strategies balances
- Withdraw from Voltr strategies
- Deposit into Voltr strategies
  
## Implementation Details
<!-- Provide technical details about the implementation -->
- utilises Voltr's SDK `@voltr/sdk` to instantiate a `VoltrClient`  
- find and fetch relevant accounts to create instructions using
`VoltrClient`

## Transaction executed by agent 
<!-- If applicable, provide example usage, transactions, or screenshots
-->
Example transaction:
https://solana.fm/tx/GnUd38TMhtBYNv29nNAyESEWLwjHhUW6hraNrPE3RTF6LtdqNtnoBBqEKptT5JaWqv6TiFp6MeooUa9Rt7vMAu9?cluster=mainnet-alpha
Demo: https://x.com/voltrxyz/status/1875204418465059189

## Prompt Used
<!-- If relevant, include the prompt or configuration used -->
Tested on autonomous mode.
``` 
async function runAutonomousMode(agent: any, config: any, interval = 10) {
  console.log("Starting autonomous mode...");

  let iterations = 0;

  while (true) {
    try {
      const evenThought =
        "1. Get the total amount and amount for each strategy of a Voltr vault: 3ab3KVY9GbDbUUbRnYNSBDQqABTDup7HmdgADHGpB8Bq. " +
        "2. Take note of the strategies id with the their respective amount. " +
        "3. Calculate the sum of all strategy amounts. " +
        "4. Subtract that sum from the vault total to get the excess amount. " +
        "5. Indicate the excess amount and the strategy id with the lowest amount.";

      const oddThought =
        "Using the latest excess amount, if it is 0 then do nothing. " +
        "Else if it is more than 0, deposit the excess amount into the lowest strategy and vault: 3ab3KVY9GbDbUUbRnYNSBDQqABTDup7HmdgADHGpB8Bq.";

      const thought = iterations % 2 === 0 ? evenThought : oddThought;

      const stream = await agent.stream(
        { messages: [new HumanMessage(thought)] },
        config,
      );

      for await (const chunk of stream) {
        if ("agent" in chunk) {
          for (const message of chunk.agent.messages) {
            console.log(message.content);
          }
        } else if ("tools" in chunk) {
          for (const message of chunk.tools.messages) {
            console.log(message.content);
          }
        }
        console.log("-------------------");
      }

      iterations++;

      await new Promise((resolve) => setTimeout(resolve, interval * 1000));
    } catch (error) {
      if (error instanceof Error) {
        console.error("Error:", error.message);
      }
      process.exit(1);
    }
  }
}
```

## Additional Notes
<!-- Any additional information that reviewers should know -->

## Checklist
- [x] I have tested these changes locally
- [x] I have updated the documentation
- [x] I have added a transaction link
- [x] I have added the prompt used to test it
2025-01-18 01:14:34 +05:30
biccsdev
6bbb6d489c implemented nft creation with LP 2025-01-17 12:14:47 -06:00
Damjan
651ee9623e Implement getAsset tool 2025-01-16 13:44:55 +01:00
jakeyvee
2971bdaef4 feat: include Voltr into readme 2025-01-15 21:21:13 +08:00
jakeyvee
04cd1b2e28 chore: merge Voltr changes into remote branch 2025-01-15 21:18:14 +08:00
jakeyvee
c71f2159fd fix: changes for Voltr vault program upgrade 2025-01-15 18:15:35 +08:00
michaelessiet
69cfcd90d2 merge: main. Also removed eslint config from discord bot starter it was conflicting with global eslint config 2025-01-13 21:42:22 +01:00
quangkeu95
1e00dab4ff fix: Bump alpha vault sdk to 1.1.7 2025-01-13 12:21:51 +07:00
quangkeu95
2f0695400f chore: Merge main 2025-01-13 12:11:00 +07:00
aryan
fcbb2e18c6 chore: docs + version 2025-01-13 03:33:04 +05:30
Arihant Bansal
338cc410ea feat: move to tsx 2025-01-12 00:16:13 +05:30
quangkeu95
f85fe669d7 feat: Add functions to create Meteora pools + alpha vault 2025-01-11 07:45:46 +07:00
aryan
677d17491c chore: docs + lint 2025-01-11 02:29:52 +05:30
michaelessiet
b4b36e5adb feat: add drift vault tools 2025-01-09 21:13:00 +01:00
A91y
06e025c1a8 Merge branch 'main' into feat/squads_multisig 2025-01-08 22:58:50 +05:30
biccsdev
9892b39a0c refactor 2025-01-06 21:43:36 -06:00
biccsdev
b3555ebded test 2025-01-06 21:39:31 -06:00
biccsdev
e680ddd4f3 3land tools implementation 2025-01-06 21:37:08 -06:00
aryan
249cd70d23 fix: pkg version 2025-01-06 20:41:14 +05:30
aryan
2504450e1a chore: docs + lint 2025-01-06 20:39:55 +05:30
A91y
62749519a8 Merge branch 'main' into feat/squads_multisig 2025-01-06 15:19:01 +05:30
UjjwalGupta49
d90ee517d6 hermes client for flash price feed 2025-01-05 20:34:28 +05:30
UjjwalGupta49
a1088797b3 resolve conflicts 2025-01-05 17:21:25 +05:30
Arihant Bansal
6a84a16c1c merge fix 2025-01-05 12:44:52 +05:30
Arihant Bansal
f9d8261a16 fix 2025-01-05 11:17:41 +05:30
Arihant Bansal
b773f43c3c feat: add husky and lint-staged 2025-01-05 11:14:26 +05:30
DonDuala
3752d3f656 Fix manifest integration 2025-01-04 16:39:52 -04:00
aryan
9da44f0be3 fix: manifest sdk 2025-01-05 00:22:04 +05:30
UjjwalGupta49
42eb30a3b6 Add Flash.Trade leveraged open and close position 2025-01-04 18:55:09 +05:30
aryan
06ad5ba728 chore: docs + lint 2025-01-04 15:29:47 +05:30
jakeyvee
b56116df09 feat: add Voltr check balance, deposit and withdraw strategy 2025-01-04 13:05:31 +08:00
michaelessiet
c2bf6191ff fix: lint 2025-01-03 18:22:32 +01:00
michaelessiet
802f42ca6f fix: update to the new actions architecture and add the wallet address action 2025-01-01 05:11:03 +01:00
Michael Essiet
9b934d636f Merge branch 'main' into feature/vercel-ai-sdk 2025-01-01 04:11:57 +01:00
aryan
ff26c252fd fix: pkg for actions 2025-01-01 03:43:14 +05:30
aryan
18b719012b fix: pkg version 2025-01-01 03:23:17 +05:30
aryan
9bf1755c75 Merge branch 'main' into gib-bounty-sol756670 2025-01-01 03:04:34 +05:30
aryan
e438f8e4fa fix: dependency 2025-01-01 02:56:34 +05:30
DonDuala
a23156895f Merge branch 'main' into manifest 2024-12-31 14:53:50 -04:00
aryan
f1e4fb21ac depreceated issue 2024-12-31 23:54:31 +05:30
DonDuala
3d50b4bc3d Merge branch 'main' into manifest 2024-12-31 09:07:47 -04:00
Lautaro Suarez
05effae52a Merge branch 'main' into feature/tensor-sdk 2024-12-30 14:04:12 -03:00
DonDuala
8ec1ea5f65 Merge branch 'main' into manifest 2024-12-30 12:50:13 -04:00
Michael Essiet
9b9bdbaade Merge branch 'main' into feature/vercel-ai-sdk 2024-12-30 12:26:08 +01:00
aryan
dc181722c5 Upgrade NPM dependencies (#85)
# Pull Request Description

## Changes Made
Upgraded NPM dependencies to keep up to date.

The upgrades do not affect any specific SDKs, they upgrade the langchain
and openai SDK as well as other devDependencies
2024-12-30 14:21:36 +05:30
A91y
e24ba6e819 Merge branch 'main' into feat/squads_multisig 2024-12-30 11:02:17 +05:30
DonDuala
8428d99e4b Fix order type import 2024-12-29 22:25:23 -04:00