Skip to content

Commit aed5be3

Browse files
committed
Merge branch 'iq6900' of https://github.com/zo-eth/eliza into iq6900
2 parents 32ae3f8 + c07d576 commit aed5be3

File tree

3 files changed

+2312
-985
lines changed

3 files changed

+2312
-985
lines changed

agent/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@
7070
"@elizaos/plugin-sui": "workspace:*",
7171
"@elizaos/plugin-sgx": "workspace:*",
7272
"@elizaos/plugin-tee": "workspace:*",
73+
"@elizaos/plugin-tee-log": "workspace:*",
74+
"@elizaos/plugin-tee-marlin": "workspace:*",
75+
"@elizaos/plugin-iq6900": "workspace:*",
7376
"@elizaos/plugin-multiversx": "workspace:*",
7477
"@elizaos/plugin-near": "workspace:*",
7578
"@elizaos/plugin-zksync-era": "workspace:*",

agent/src/index.ts

+18-13
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ import { LensAgentClient } from "@elizaos/client-lens";
1010
import { SlackClientInterface } from "@elizaos/client-slack";
1111
import { TelegramClientInterface } from "@elizaos/client-telegram";
1212
import { TwitterClientInterface } from "@elizaos/client-twitter";
13+
// import { ReclaimAdapter } from "@elizaos/plugin-reclaim";
14+
import { PrimusAdapter } from "@elizaos/plugin-primus";
15+
16+
1317
import {
1418
AgentRuntime,
1519
CacheManager,
@@ -95,7 +99,10 @@ import { thirdwebPlugin } from "@elizaos/plugin-thirdweb";
9599
import { tonPlugin } from "@elizaos/plugin-ton";
96100
import { squidRouterPlugin } from "@elizaos/plugin-squid-router";
97101
import { webSearchPlugin } from "@elizaos/plugin-web-search";
98-
import { echoChamberPlugin } from "@elizaos/plugin-echochambers";
102+
import { zksyncEraPlugin } from "@elizaos/plugin-zksync-era";
103+
import { elizaCodeinPlugin, onchainJson } from "@elizaos/plugin-iq6900";
104+
105+
99106
import Database from "better-sqlite3";
100107
import fs from "fs";
101108
import net from "net";
@@ -149,6 +156,10 @@ function tryLoadFile(filePath: string): string | null {
149156
return null;
150157
}
151158
}
159+
160+
function isAllStrings(arr: unknown[]): boolean {
161+
return Array.isArray(arr) && arr.every((item) => typeof item === "string");
162+
}
152163
function mergeCharacters(base: Character, child: Character): Character {
153164
const mergeObjects = (baseObj: any, childObj: any) => {
154165
const result: any = {};
@@ -229,15 +240,6 @@ async function jsonToCharacter(
229240
return character;
230241
}
231242

232-
async function loadCharacter(filePath: string): Promise<Character> {
233-
const content = tryLoadFile(filePath);
234-
if (!content) {
235-
throw new Error(`Character file not found: ${filePath}`);
236-
}
237-
let character = JSON.parse(content);
238-
return jsonToCharacter(filePath, character);
239-
}
240-
241243
export async function loadCharacterFromOnchain(): Promise<Character[]> {
242244
const jsonText = onchainJson;
243245

@@ -844,6 +846,10 @@ export async function createAgent(
844846
getSecret(character, "WALLET_PUBLIC_KEY")?.startsWith("0x"))
845847
? evmPlugin
846848
: null,
849+
getSecret(character, "COSMOS_RECOVERY_PHRASE") &&
850+
getSecret(character, "COSMOS_AVAILABLE_CHAINS") &&
851+
createCosmosPlugin(),
852+
847853
(getSecret(character, "SOLANA_PUBLIC_KEY") ||
848854
(getSecret(character, "WALLET_PUBLIC_KEY") &&
849855
!getSecret(character, "WALLET_PUBLIC_KEY")?.startsWith(
@@ -942,10 +948,9 @@ export async function createAgent(
942948
: null,
943949
getSecret(character, "BIRDEYE_API_KEY") ? birdeyePlugin : null,
944950
getSecret(character, "ECHOCHAMBERS_API_URL") &&
945-
getSecret(character, "ECHOCHAMBERS_API_KEY")
946-
? echoChambersPlugin
951+
getSecret(character, "ECHOCHAMBERS_API_KEY")? echoChambersPlugin
947952
: null,
948-
getSecret(character, "LETZAI_API_KEY") ? letzAIPlugin : null,
953+
getSecret(character, "LETZAI_API_KEY") ? letzAIPlugin : null,
949954
getSecret(character, "STARGAZE_ENDPOINT") ? stargazePlugin : null,
950955
getSecret(character, "GIPHY_API_KEY") ? giphyPlugin : null,
951956
getSecret(character, "PASSPORT_API_KEY")

0 commit comments

Comments
 (0)