From 146b3f3eeb04168367058b524662312a7cc51ff5 Mon Sep 17 00:00:00 2001 From: cygaar Date: Tue, 24 Dec 2024 14:58:12 -0500 Subject: [PATCH] Rebase --- agent/src/index.ts | 4 ++ packages/plugin-abstract/package.json | 7 ++- .../plugin-abstract/src/actions/transfer.ts | 2 +- packages/plugin-abstract/src/environment.ts | 2 +- packages/plugin-abstract/src/index.ts | 2 +- packages/plugin-evm/src/templates/index.ts | 6 +-- packages/plugin-evm/src/types/index.ts | 5 +- pnpm-lock.yaml | 49 +++++++++---------- 8 files changed, 40 insertions(+), 37 deletions(-) diff --git a/agent/src/index.ts b/agent/src/index.ts index 264801743e..95f610543c 100644 --- a/agent/src/index.ts +++ b/agent/src/index.ts @@ -55,6 +55,7 @@ import { suiPlugin } from "@elizaos/plugin-sui"; import { TEEMode, teePlugin } from "@elizaos/plugin-tee"; import { tonPlugin } from "@elizaos/plugin-ton"; import { zksyncEraPlugin } from "@elizaos/plugin-zksync-era"; +import { abstractPlugin } from "@elizaos/plugin-abstract"; import Database from "better-sqlite3"; import fs from "fs"; import path from "path"; @@ -562,6 +563,9 @@ export async function createAgent( ? webhookPlugin : null, getSecret(character, "EVM_PROVIDER_URL") ? goatPlugin : null, + getSecret(character, "ABSTRACT_PRIVATE_KEY") + ? abstractPlugin + : null, getSecret(character, "FLOW_ADDRESS") && getSecret(character, "FLOW_PRIVATE_KEY") ? flowPlugin diff --git a/packages/plugin-abstract/package.json b/packages/plugin-abstract/package.json index 724f533be6..a35eeb128c 100644 --- a/packages/plugin-abstract/package.json +++ b/packages/plugin-abstract/package.json @@ -1,12 +1,11 @@ { - "name": "@ai16z/plugin-abstract", - "version": "0.1.6-alpha.4", + "name": "@elizaos/plugin-abstract", + "version": "0.1.7-alpha.1", "main": "dist/index.js", "type": "module", "types": "dist/index.d.ts", "dependencies": { - "@ai16z/eliza": "workspace:*", - "@ai16z/plugin-trustdb": "workspace:*", + "@elizaos/core": "workspace:*", "tsup": "^8.3.5", "web3": "^4.15.0", "viem": "2.21.53" diff --git a/packages/plugin-abstract/src/actions/transfer.ts b/packages/plugin-abstract/src/actions/transfer.ts index 0cf855ea35..4e58507637 100644 --- a/packages/plugin-abstract/src/actions/transfer.ts +++ b/packages/plugin-abstract/src/actions/transfer.ts @@ -10,7 +10,7 @@ import { elizaLogger, composeContext, generateObject, -} from "@ai16z/eliza"; +} from "@elizaos/core"; import { validateAbstractConfig } from "../environment"; import { Address, createWalletClient, http, parseEther } from "viem"; diff --git a/packages/plugin-abstract/src/environment.ts b/packages/plugin-abstract/src/environment.ts index 2e0d042b7a..e7801fc409 100644 --- a/packages/plugin-abstract/src/environment.ts +++ b/packages/plugin-abstract/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@ai16z/eliza"; +import { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const abstractEnvSchema = z.object({ diff --git a/packages/plugin-abstract/src/index.ts b/packages/plugin-abstract/src/index.ts index 0adb0ad4f3..4fc47c9470 100644 --- a/packages/plugin-abstract/src/index.ts +++ b/packages/plugin-abstract/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@ai16z/eliza"; +import { Plugin } from "@elizaos/core"; import transfer from "./actions/transfer.ts"; diff --git a/packages/plugin-evm/src/templates/index.ts b/packages/plugin-evm/src/templates/index.ts index ef7cac3b89..d4dea3f9d2 100644 --- a/packages/plugin-evm/src/templates/index.ts +++ b/packages/plugin-evm/src/templates/index.ts @@ -40,8 +40,8 @@ Respond with a JSON markdown block containing only the extracted values: \`\`\`json { "token": string | null, - "fromChain": "ethereum" | "base" | "sepolia" | "bsc" | "arbitrum" | "avalanche" | "polygon" | "optimism" | "cronos" | "gnosis" | "fantom" | "klaytn" | "celo" | "moonbeam" | "aurora" | "harmonyOne" | "moonriver" | "arbitrumNova" | "mantle" | "linea" | "scroll" | "filecoin" | "taiko" | "zksync" | "canto" | "alienx" | null, - "toChain": "ethereum" | "base" | "sepolia" | "bsc" | "arbitrum" | "avalanche" | "polygon" | "optimism" | "cronos" | "gnosis" | "fantom" | "klaytn" | "celo" | "moonbeam" | "aurora" | "harmonyOne" | "moonriver" | "arbitrumNova" | "mantle" | "linea" | "scroll" | "filecoin" | "taiko" | "zksync" | "canto" | "alienx" | null, + "fromChain": "ethereum" | "abstract" | "base" | "sepolia" | "bsc" | "arbitrum" | "avalanche" | "polygon" | "optimism" | "cronos" | "gnosis" | "fantom" | "klaytn" | "celo" | "moonbeam" | "aurora" | "harmonyOne" | "moonriver" | "arbitrumNova" | "mantle" | "linea" | "scroll" | "filecoin" | "taiko" | "zksync" | "canto" | "alienx" | null, + "toChain": "ethereum" | "abstract" | "base" | "sepolia" | "bsc" | "arbitrum" | "avalanche" | "polygon" | "optimism" | "cronos" | "gnosis" | "fantom" | "klaytn" | "celo" | "moonbeam" | "aurora" | "harmonyOne" | "moonriver" | "arbitrumNova" | "mantle" | "linea" | "scroll" | "filecoin" | "taiko" | "zksync" | "canto" | "alienx" | null, "amount": string | null, "toAddress": string | null } @@ -67,7 +67,7 @@ Respond with a JSON markdown block containing only the extracted values. Use nul "inputToken": string | null, "outputToken": string | null, "amount": string | null, - "chain": "ethereum" | "base" | "sepolia" | "bsc" | "arbitrum" | "avalanche" | "polygon" | "optimism" | "cronos" | "gnosis" | "fantom" | "klaytn" | "celo" | "moonbeam" | "aurora" | "harmonyOne" | "moonriver" | "arbitrumNova" | "mantle" | "linea" | "scroll" | "filecoin" | "taiko" | "zksync" | "canto" | "alienx" | null, + "chain": "ethereum" | "abstract" | "base" | "sepolia" | "bsc" | "arbitrum" | "avalanche" | "polygon" | "optimism" | "cronos" | "gnosis" | "fantom" | "klaytn" | "celo" | "moonbeam" | "aurora" | "harmonyOne" | "moonriver" | "arbitrumNova" | "mantle" | "linea" | "scroll" | "filecoin" | "taiko" | "zksync" | "canto" | "alienx" | null, "slippage": number | null } \`\`\` diff --git a/packages/plugin-evm/src/types/index.ts b/packages/plugin-evm/src/types/index.ts index 5d7028f50f..5db8d941f8 100644 --- a/packages/plugin-evm/src/types/index.ts +++ b/packages/plugin-evm/src/types/index.ts @@ -10,7 +10,9 @@ import type { } from "viem"; import * as viemChains from "viem/chains"; -const _SupportedChainList = Object.keys(viemChains) as Array; +const _SupportedChainList = Object.keys(viemChains) as Array< + keyof typeof viemChains +>; export type SupportedChain = (typeof _SupportedChainList)[number]; // Transaction types @@ -88,6 +90,7 @@ export interface BridgeParams { export interface EvmPluginConfig { rpcUrl?: { ethereum?: string; + abstract?: string; base?: string; sepolia?: string; bsc?: string; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 37237c53d6..0d506a566a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -541,12 +541,6 @@ importers: packages/client-discord: dependencies: - '@elizaos/core': - specifier: workspace:* - version: link:../core - '@elizaos/plugin-node': - specifier: workspace:* - version: link:../plugin-node '@discordjs/opus': specifier: github:discordjs/opus version: https://codeload.github.com/discordjs/opus/tar.gz/31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13) @@ -556,6 +550,12 @@ importers: '@discordjs/voice': specifier: 0.17.0 version: 0.17.0(@discordjs/opus@https://codeload.github.com/discordjs/opus/tar.gz/31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13))(bufferutil@4.0.8)(ffmpeg-static@5.2.0)(utf-8-validate@5.0.10) + '@elizaos/core': + specifier: workspace:* + version: link:../core + '@elizaos/plugin-node': + specifier: workspace:* + version: link:../plugin-node discord.js: specifier: 14.16.3 version: 14.16.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -943,15 +943,12 @@ importers: packages/plugin-abstract: dependencies: - '@ai16z/eliza': + '@elizaos/core': specifier: workspace:* version: link:../core - '@ai16z/plugin-trustdb': - specifier: workspace:* - version: link:../plugin-trustdb tsup: specifier: ^8.3.5 - version: 8.3.5(@swc/core@1.10.1(@swc/helpers@0.5.15))(jiti@2.4.1)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) + version: 8.3.5(@swc/core@1.10.1(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) viem: specifier: 2.21.53 version: 2.21.53(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) @@ -964,12 +961,12 @@ importers: packages/plugin-aptos: dependencies: - '@elizaos/core': - specifier: workspace:* - version: link:../core '@aptos-labs/ts-sdk': specifier: ^1.26.0 version: 1.33.1 + '@elizaos/core': + specifier: workspace:* + version: link:../core bignumber: specifier: 1.1.0 version: 1.1.0 @@ -1155,9 +1152,6 @@ importers: packages/plugin-icp: dependencies: - '@elizaos/core': - specifier: workspace:* - version: link:../core '@dfinity/agent': specifier: 2.1.3 version: 2.1.3(@dfinity/candid@2.1.3(@dfinity/principal@2.1.3))(@dfinity/principal@2.1.3) @@ -1170,6 +1164,9 @@ importers: '@dfinity/principal': specifier: 2.1.3 version: 2.1.3 + '@elizaos/core': + specifier: workspace:* + version: link:../core devDependencies: '@types/jest': specifier: 29.5.14 @@ -1318,9 +1315,6 @@ importers: packages/plugin-node: dependencies: - '@elizaos/core': - specifier: workspace:* - version: link:../core '@aws-sdk/client-s3': specifier: ^3.705.0 version: 3.713.0 @@ -1339,6 +1333,9 @@ importers: '@echogarden/speex-resampler-wasm': specifier: 0.2.1 version: 0.2.1 + '@elizaos/core': + specifier: workspace:* + version: link:../core '@huggingface/transformers': specifier: 3.0.2 version: 3.0.2 @@ -1496,6 +1493,9 @@ importers: packages/plugin-solana: dependencies: + '@coral-xyz/anchor': + specifier: 0.30.1 + version: 0.30.1(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) '@elizaos/core': specifier: workspace:* version: link:../core @@ -1505,9 +1505,6 @@ importers: '@elizaos/plugin-trustdb': specifier: workspace:* version: link:../plugin-trustdb - '@coral-xyz/anchor': - specifier: 0.30.1 - version: 0.30.1(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) '@solana/spl-token': specifier: 0.4.9 version: 0.4.9(@solana/web3.js@1.95.8(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3)(utf-8-validate@5.0.10) @@ -1547,15 +1544,15 @@ importers: packages/plugin-starknet: dependencies: + '@avnu/avnu-sdk': + specifier: 2.1.1 + version: 2.1.1(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(qs@6.13.1)(starknet@6.18.0(encoding@0.1.13)) '@elizaos/core': specifier: workspace:* version: link:../core '@elizaos/plugin-trustdb': specifier: workspace:* version: link:../plugin-trustdb - '@avnu/avnu-sdk': - specifier: 2.1.1 - version: 2.1.1(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(qs@6.13.1)(starknet@6.18.0(encoding@0.1.13)) '@uniswap/sdk-core': specifier: 6.0.0 version: 6.0.0