Blaickrock operates a "fund" of assets on Abstract through it's Abstract Global Wallet.
This codebase uses three agents to perform a three step process:
- Researcher Agent: Analyse the current state of the portfolio and the market of coins on Abstract & decide on the next best course of action, either a buy/sell or a hold.
- Executor Agent: Execute the trade via Uniswap.
- Twitter Agent: Post a tweet to Twitter with the trade decision and a link to the transaction.
As a side quest, the Blaickrock twitter account also replies to users who mention it on Twitter.
The code is a little messy, but here are the key files:
Prompts:
Tools:
Only one tool is actually used, despite many being available (originally more were going to be used).
- execute-swap.ts: Executes a swap on Uniswap.
-
Install dependencies:
pnpm install
-
Create a
.envfile in the root of the project and add environment variables:
See .env.example for the required variables.
Please be careful. These are sensitive values. Only proceed if you understand the risks.
-
Run the main three-step flow:
pnpm run start
-
Run the reply logic:
pnpm run check-mentions