Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ca11dc1

Browse files
committedJan 12, 2025··
chore: remove birdeye plugin and associated files from the project
1 parent 9cedc27 commit ca11dc1

30 files changed

+1604
-6728
lines changed
 

‎.cursorignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv)
2+
LICENSE
3+
CODE_OF_CONDUCT.md
4+
docs/community/*
5+
models/
6+
tests/*
7+
README_*
8+
*test.ts
9+
*.cjs

‎agent/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"@elizaos/plugin-abstract": "workspace:*",
3535
"@elizaos/plugin-aptos": "workspace:*",
3636
"@elizaos/plugin-bootstrap": "workspace:*",
37-
"@elizaos/plugin-birdeye": "workspace:*",
3837
"@elizaos/plugin-intiface": "workspace:*",
3938
"@elizaos/plugin-coinbase": "workspace:*",
4039
"@elizaos/plugin-conflux": "workspace:*",

‎agent/src/index.ts

+33-20
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ import {
2828
stringToUuid,
2929
validateCharacterConfig,
3030
} from "@elizaos/core";
31+
import { TrustScoreDatabase } from "@elizaos/plugin-trustdb";
3132
// import { zgPlugin } from "@elizaos/plugin-0g";
3233
import { bootstrapPlugin } from "@elizaos/plugin-bootstrap";
3334
import createGoatPlugin from "@elizaos/plugin-goat";
3435
// import { intifacePlugin } from "@elizaos/plugin-intiface";
3536
import { DirectClient } from "@elizaos/client-direct";
36-
import { ThreeDGenerationPlugin } from "@elizaos/plugin-3d-generation";
37+
// import { ThreeDGenerationPlugin } from "@elizaos/plugin-3d-generation";
3738
// import { abstractPlugin } from "@elizaos/plugin-abstract";
3839
// import { aptosPlugin } from "@elizaos/plugin-aptos";
3940
// import { avalanchePlugin } from "@elizaos/plugin-avalanche";
40-
import { birdeyePlugin } from "@elizaos/plugin-birdeye";
4141
import {
4242
advancedTradePlugin,
4343
coinbaseCommercePlugin,
@@ -72,6 +72,8 @@ import path from "path";
7272
import { fileURLToPath } from "url";
7373
import yargs from "yargs";
7474

75+
import { trustScoreProvider } from "@elizaos/plugin-solana";
76+
import { trustScoreEvaluator } from "./trustScoreEvaluator";
7577
import { whaleDataEvaluator } from "./whaleDataEvaluator";
7678
import { whaleDataProvider } from "./whaleDataProvider";
7779

@@ -383,9 +385,14 @@ function initializeDatabase(dataDir: string) {
383385
} else {
384386
const filePath =
385387
process.env.SQLITE_FILE ?? path.resolve(dataDir, "db.sqlite");
386-
// ":memory:";
387-
const db = new SqliteDatabaseAdapter(new Database(filePath));
388-
return db;
388+
const sqliteDb = new Database(filePath);
389+
const db = new SqliteDatabaseAdapter(sqliteDb);
390+
391+
// Initialize TrustScoreDatabase
392+
const trustDb = new TrustScoreDatabase(sqliteDb);
393+
elizaLogger.info("Initialized TrustScoreDatabase");
394+
395+
return { db, trustDb };
389396
}
390397
}
391398

@@ -491,7 +498,8 @@ export async function createAgent(
491498
character: Character,
492499
db: IDatabaseAdapter,
493500
cache: ICacheManager,
494-
token: string
501+
token: string,
502+
trustDb: TrustScoreDatabase
495503
): Promise<AgentRuntime> {
496504
elizaLogger.success(
497505
elizaLogger.successesTitle,
@@ -570,7 +578,7 @@ export async function createAgent(
570578
getSecret(character, "LIVEPEER_GATEWAY_URL")
571579
? imageGenerationPlugin
572580
: null,
573-
getSecret(character, "FAL_API_KEY") ? ThreeDGenerationPlugin : null,
581+
// getSecret(character, "FAL_API_KEY") ? ThreeDGenerationPlugin : null,
574582
...(getSecret(character, "COINBASE_API_KEY") &&
575583
getSecret(character, "COINBASE_PRIVATE_KEY")
576584
? [
@@ -609,14 +617,14 @@ export async function createAgent(
609617
// getSecret(character, "AVALANCHE_PRIVATE_KEY")
610618
// ? avalanchePlugin
611619
// : null,
612-
getSecret(character, "BIRDEYE_API_KEY") ? birdeyePlugin : null,
613620
getSecret(character, "ECHOCHAMBERS_API_URL") &&
614621
getSecret(character, "ECHOCHAMBERS_API_KEY")
615622
? echoChamberPlugin
616623
: null,
624+
trustDb ? { name: "trustdb", instance: trustDb } : null,
617625
].filter(Boolean),
618-
evaluators: [whaleDataEvaluator],
619-
providers: [whaleDataProvider],
626+
evaluators: [whaleDataEvaluator, trustScoreEvaluator],
627+
providers: [whaleDataProvider, trustScoreProvider],
620628
actions: [],
621629
services: [],
622630
managers: [],
@@ -680,7 +688,9 @@ async function startAgent(
680688
character: Character,
681689
directClient: DirectClient
682690
): Promise<AgentRuntime> {
683-
let db: IDatabaseAdapter & IDatabaseCacheAdapter;
691+
let dbAdapter: IDatabaseAdapter & IDatabaseCacheAdapter;
692+
let trustDb: TrustScoreDatabase;
693+
684694
try {
685695
character.id ??= stringToUuid(character.name);
686696
character.username ??= character.name;
@@ -692,22 +702,25 @@ async function startAgent(
692702
fs.mkdirSync(dataDir, { recursive: true });
693703
}
694704

695-
db = initializeDatabase(dataDir) as IDatabaseAdapter &
696-
IDatabaseCacheAdapter;
705+
const { db, trustDb: tdb } = initializeDatabase(dataDir) as any;
706+
dbAdapter = db;
707+
trustDb = tdb;
697708

698-
await db.init();
709+
await dbAdapter.init();
699710

700711
const cache = initializeCache(
701712
process.env.CACHE_STORE ?? CacheStore.DATABASE,
702713
character,
703714
"",
704-
db
705-
); // "" should be replaced with dir for file system caching. THOUGHTS: might probably make this into an env
715+
dbAdapter
716+
);
717+
706718
const runtime: AgentRuntime = await createAgent(
707719
character,
708-
db,
720+
dbAdapter,
709721
cache,
710-
token
722+
token,
723+
trustDb
711724
);
712725

713726
// start services/plugins/process knowledge
@@ -729,8 +742,8 @@ async function startAgent(
729742
error
730743
);
731744
elizaLogger.error(error);
732-
if (db) {
733-
await db.close();
745+
if (dbAdapter) {
746+
await dbAdapter.close();
734747
}
735748
throw error;
736749
}

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"build": "turbo run build --filter=!eliza-docs",
66
"build-docker": "turbo run build",
77
"cleanstart": "if [ -f agent/data/db.sqlite ]; then rm agent/data/db.sqlite; fi && pnpm --filter \"@elizaos/agent\" start --isRoot",
8-
"cleanstart:debug": "if [ -f agent/data/db.sqlite ]; then rm agent/data/db.sqlite; fi && cross-env NODE_ENV=development VERBOSE=true DEBUG=eliza:* pnpm --filter \"@elizaos/agent\" start --isRoot",
8+
"cleanstart:debug": "if [ -f agent/data/db.sqlite ]; then rm agent/data/db.sqlite; fi && cross-env NODE_ENV=development VERBOSE=true DEBUG=eliza:* pnpm --filter \"@elizaos/agent\" start --isRoot --characters=\"vergen.character.json\"",
99
"start": "pnpm --filter \"@elizaos/agent\" start --isRoot",
1010
"start:vergen": "pnpm --filter \"@elizaos/agent\" start --isRoot --characters=\"vergen.character.json\"",
1111
"start:client": "pnpm --dir client dev",

‎packages/plugin-birdeye/.npmignore

-6
This file was deleted.

‎packages/plugin-birdeye/.nvmrc

-1
This file was deleted.

‎packages/plugin-birdeye/README.md

-38
This file was deleted.

‎packages/plugin-birdeye/eslint.config.mjs

-3
This file was deleted.

‎packages/plugin-birdeye/package.json

-37
This file was deleted.

‎packages/plugin-birdeye/src/actions/test-all-endpoints.ts

-398
This file was deleted.

‎packages/plugin-birdeye/src/actions/token-search-address.ts

-289
This file was deleted.

‎packages/plugin-birdeye/src/actions/token-search-symbol.ts

-225
This file was deleted.

‎packages/plugin-birdeye/src/actions/wallet-search-address.ts

-176
This file was deleted.

‎packages/plugin-birdeye/src/birdeye.ts

-803
This file was deleted.

‎packages/plugin-birdeye/src/constants.ts

-71
This file was deleted.

‎packages/plugin-birdeye/src/index.ts

-20
This file was deleted.

‎packages/plugin-birdeye/src/providers/agent-portfolio-provider.ts

-52
This file was deleted.

‎packages/plugin-birdeye/src/tests/birdeye.test.ts

-510
This file was deleted.

‎packages/plugin-birdeye/src/types/api/common.ts

-301
This file was deleted.

‎packages/plugin-birdeye/src/types/api/defi.ts

-219
This file was deleted.

‎packages/plugin-birdeye/src/types/api/pair.ts

-199
This file was deleted.

‎packages/plugin-birdeye/src/types/api/search.ts

-85
This file was deleted.

‎packages/plugin-birdeye/src/types/api/token.ts

-634
This file was deleted.

‎packages/plugin-birdeye/src/types/api/trader.ts

-75
This file was deleted.

‎packages/plugin-birdeye/src/types/api/wallet.ts

-180
This file was deleted.

‎packages/plugin-birdeye/src/types/shared.ts

-23
This file was deleted.

‎packages/plugin-birdeye/src/utils.ts

-613
This file was deleted.

‎packages/plugin-birdeye/tsconfig.json

-10
This file was deleted.

‎packages/plugin-birdeye/tsup.config.ts

-29
This file was deleted.

‎pnpm-lock.yaml

+1,561-1,709
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.